diff --git a/packages/analyzer/CHANGELOG.md b/packages/analyzer/CHANGELOG.md index 3ebbdf6..0381dab 100644 --- a/packages/analyzer/CHANGELOG.md +++ b/packages/analyzer/CHANGELOG.md @@ -1,3 +1,6 @@ +## Release 0.10.0 +- Added support for new `cssState` addition to the schema + ## Release 0.9.9 - Support `@attribute` jsdoc better diff --git a/packages/analyzer/browser/index.js b/packages/analyzer/browser/index.js index 63e7f77..9aa14a7 100644 --- a/packages/analyzer/browser/index.js +++ b/packages/analyzer/browser/index.js @@ -204041,7 +204041,8 @@ function createClass(node, moduleDoc, context) { slots: [], members: [], events: [], - attributes: [] + attributes: [], + cssStates: [] }; node?.members?.forEach((member) => { if (isProperty(member)) { @@ -204540,6 +204541,12 @@ function classJsDocPlugin() { case "element": classDoc.tagName = jsDoc2?.name || ""; break; + case "cssState": + case "cssstate": + let statePropertyDoc = {}; + statePropertyDoc = handleClassJsDoc(statePropertyDoc, jsDoc2); + classDoc.cssStates.push(statePropertyDoc); + break; case "deprecated": classDoc.deprecated = jsDoc2?.name ? `${jsDoc2.name} ${jsDoc2?.description}`.trim() : "true"; break; @@ -204664,7 +204671,7 @@ function cleanupClassesPlugin() { moduleLinkPhase({ moduleDoc }) { const classes = moduleDoc?.declarations?.filter((declaration) => declaration.kind === "class" || declaration.kind === "mixin"); classes?.forEach((klass) => { - ["cssProperties", "cssParts", "slots", "members", "attributes", "events"].forEach((field) => { + ["cssProperties", "cssParts", "slots", "members", "attributes", "events", "cssStates"].forEach((field) => { if (!has(klass[field])) { delete klass[field]; } @@ -204907,7 +204914,7 @@ function applyInheritancePlugin() { if (klass?.name === customElement.name) { return; } - ["slots", "cssParts", "cssProperties", "attributes", "members", "events"].forEach((type) => { + ["slots", "cssParts", "cssProperties", "attributes", "members", "events", "cssStates"].forEach((type) => { klass?.[type]?.forEach((currItem) => { const containingModulePath = getModuleForClassLike(allManifests, klass.name); const containingModule = getModuleFromManifests(allManifests, containingModulePath); diff --git a/packages/analyzer/package.json b/packages/analyzer/package.json index d6753ac..7e47101 100644 --- a/packages/analyzer/package.json +++ b/packages/analyzer/package.json @@ -1,6 +1,6 @@ { "name": "@custom-elements-manifest/analyzer", - "version": "0.9.9", + "version": "0.10.0", "description": "", "license": "MIT", "type": "module",