Schemas / v0.4

Components

Definitions-only, composable lifecycle fragments for Custom Elements Manifest entries. This document is not a validator for a full Custom Elements Manifest; consumers apply the relevant definition alongside their pinned CEM schema.

This is not the Custom Elements Manifest (CEM) schema itself, and it defines no manifest of its own — the fragment has no root scope to validate. It defines extension fields that a design system may add to CEM entries — declarations, attributes, members, slots, cssProperties, cssParts, and events — to record lifecycle metadata: status, deprecation details, and migration targets. Consumers apply the relevant definition alongside their pinned CEM schema.

Applying the extensions

The snippet below is a Custom Elements Manifest declaration with the extension fields applied: status and deprecated on the declaration, and a deprecated attribute value with its migration path. The fragment does not validate the surrounding CEM document, so this example is illustrative rather than validated against the fragment; the extension fields themselves follow the definitions below. Extension fields are additive — a valid CEM remains valid without them.

{
  "schemaVersion": "1.0.0",
  "modules": [
    {
      "kind": "javascript-module",
      "path": "src/lasagna-button.js",
      "declarations": [
        {
          "kind": "class",
          "name": "LasagnaButton",
          "tagName": "lasagna-button",
          "status": "deprecated",
          "deprecated": "Use “lasagna-action-button” instead.",
          "attributes": [
            {
              "name": "variant",
              "enum": [
                "primary",
                "ghost"
              ],
              "deprecatedValues": [
                {
                  "value": "flat",
                  "message": "Use “ghost” instead."
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}

Lifecycle fields

The LifecycleFields definition is the composable set of optional lifecycle fields a design system may add to a CEM entry. The alias definitions below apply it at declaration, member, slot, cssProperty, cssPart, and event scope.

Field Type Description
— Standard CEM deprecation marker: a boolean flag, or a string that carries the human-readable deprecation message.

Use when: Use `true` for a plain deprecation flag, or a string when the message should sit directly on the CEM entry.

Origin: Authored metadata; composed alongside the pinned CEM schema.

Related: status, removal, replacement

Example usage

{
  "deprecated": "Use \"lasagna-action-button\" instead."
}
lifecycle.json#/definitions/Status Lifecycle status from the shared v0.4 lifecycle fragment; only `deprecated` and `removed` are normative, any other value is informational.

Use when: Declare the normative lifecycle state of the entry, or carry informational states such as `stable`.

Origin: Authored metadata.

Related: deprecated, removal, replacement

Example usage

{
  "status": "deprecated"
}
string Removal target for a deprecated entry: an ISO date (YYYY-MM-DD), a semver (X.Y.Z), or a quarter (YYYY-Qn).

Use when: Use alongside a deprecation notice so consumers can schedule migration before the entry disappears.

Origin: Authored metadata.

Related: deprecated, replacement

Example usage

{
  "removal": "2026-07-01"
}
string Machine-readable replacement identifier, scoped to the same CEM entity kind and owner.

Use when: Use to point tooling and consumers at the durable identity of the successor entry.

Origin: Authored metadata.

Related: deprecated, removal

Example usage

{
  "replacement": "lasagna-action-button"
}

Attribute extensions

The AttributeExtensions definition extends a CEM attribute entry with its allowed value set, attribute-level lifecycle fields, and per-value deprecation records. Attribute-level lifecycle and deprecatedValues are independent axes.

Field Type Description
array The allowed values for a CEM attribute.

Use when: Use to advertise the attribute's value set so autocomplete and validation tooling can check it.

Origin: Authored metadata, mirroring the standard CEM attribute `enum` field.

Related: deprecatedValues

Example usage

{
  "enum": [
    "primary",
    "ghost"
  ]
}
— Deprecation marker for a CEM attribute: a boolean flag, or a string that carries the deprecation message.

Use when: Use `true` for a plain flag, or a string when the message should sit directly on the attribute entry.

Origin: Authored metadata; composed alongside the pinned CEM schema.

Related: status, removal, replacement, deprecatedValues

Example usage

{
  "deprecated": "Use the variant attribute instead."
}
lifecycle.json#/definitions/Status Lifecycle status from the shared v0.4 lifecycle fragment; only `deprecated` and `removed` are normative, any other value is informational.

Use when: Declare the normative lifecycle state of the attribute, or carry informational states such as `stable`.

Origin: Authored metadata.

Related: deprecated, removal, replacement

Example usage

{
  "status": "stable"
}
string Removal target for a deprecated attribute: an ISO date (YYYY-MM-DD), a semver (X.Y.Z), or a quarter (YYYY-Qn).

Use when: Use alongside attribute deprecation so consumers can plan the removal.

Origin: Authored metadata.

Related: deprecated, replacement

Example usage

{
  "removal": "3.0.0"
}
string Machine-readable replacement identifier, scoped to the same CEM entity kind and owner.

Use when: Use to provide the migration target when the attribute is going away.

Origin: Authored metadata.

Related: deprecated, removal

Example usage

{
  "replacement": "lasagna-button-lg"
}
array Per-value deprecation records for a CEM attribute; each entry is a lifecycle `DeprecatedValue` with the required `value` and `message` pair.

Use when: Use when only some of an attribute's values are deprecated and each needs its own migration story, as an axis independent of the attribute-level lifecycle fields.

Origin: Authored metadata.

Related: enum, deprecated

Example usage

{
  "deprecatedValues": [
    {
      "value": "flat",
      "message": "Use \"ghost\" instead."
    }
  ]
}

Nested definitions

Reusable shapes referenced by the fields above.

CssPartExtensions

Extension fields for a CEM cssPart entry: the shared lifecycle fields applied at cssPart scope.

Alias for LifecycleFields.

CssPropertyExtensions

Extension fields for a CEM cssProperty entry: the shared lifecycle fields applied at cssProperty scope.

Alias for LifecycleFields.

DeclarationExtensions

Extension fields for a CEM class declaration entry: the shared lifecycle fields applied at declaration scope.

Alias for LifecycleFields.

DeprecatedValue

Deprecation record for one specific attribute value; defined in the shared lifecycle fragment (lifecycle.json) and referenced from this schema. It requires the `value` and `message` pair and stays permissive of unknown properties.

Reference to lifecycle.json#/definitions/DeprecatedValue in the shared v0.4 lifecycle fragment.

EventExtensions

Extension fields for a CEM event entry: the shared lifecycle fields applied at event scope.

Alias for LifecycleFields.

MemberExtensions

Extension fields for a CEM member entry (a property or method): the shared lifecycle fields applied at member scope.

Alias for LifecycleFields.

SlotExtensions

Extension fields for a CEM slot entry: the shared lifecycle fields applied at slot scope.

Alias for LifecycleFields.

All schemas