@zywave/customelement-manifest-element 1.6.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,6 +165,11 @@ a:active {
165
165
 
166
166
  code {
167
167
  font-family: monospace;
168
+ background-color: hsla(var(--schema-primary-color-h), var(--schema-primary-color-s), var(--schema-primary-color-l), 0.08);
169
+ color: var(--schema-primary-color);
170
+ padding: 0.125rem 0.375rem;
171
+ border-radius: 0.1875rem;
172
+ font-size: 0.9em;
168
173
  }
169
174
 
170
175
  select {
@@ -12,6 +12,10 @@ import type { PropertyValues, TemplateResult } from "lit";
12
12
  * @csspart cssprops - Select the section that pertains to the CSS Custom Properties documentation
13
13
  * @csspart methods - Select the section that pertains to the Methods documentation
14
14
  * @csspart cssstates - Select the section that pertains to the CSS Custom States documentation
15
+ * @csspart markdown-bold - Style bold text rendered from markdown (`**text**`)
16
+ * @csspart markdown-italic - Style italic text rendered from markdown (`*text*`)
17
+ * @csspart markdown-code - Style inline code rendered from markdown (`` `code` ``)
18
+ * @csspart markdown-link - Style links rendered from markdown (`[text](url)` or plain URLs)
15
19
  *
16
20
  * @cssState loading - Applied when the element is in the process of loading the schema resource
17
21
  *
@@ -40,12 +40,7 @@ function renderDescription(str) {
40
40
  if (str.startsWith("-")) {
41
41
  str = str.substring(1);
42
42
  }
43
- const parts = str.split(" ");
44
- let result = html ``;
45
- for (const part of parts) {
46
- result = html `${result} ${prettify(part)}`;
47
- }
48
- return result;
43
+ return parseMarkdown(str);
49
44
  }
50
45
  function renderMethodSignature(obj) {
51
46
  const methodReturn = () => {
@@ -78,21 +73,66 @@ function renderMethodSignature(obj) {
78
73
  return html `${obj.name}(): ${methodReturn()}`;
79
74
  }
80
75
  }
81
- function prettify(str) {
82
- let regexMatch;
83
- const linkRegex = /^https?:\/\//;
84
- const codeBlockRegex = /`(?<contents>.*)`/;
85
- if ((regexMatch = str.match(linkRegex))) {
86
- return html `<a href="${str}">${str}</a>`;
87
- }
88
- else if ((regexMatch = str.match(codeBlockRegex))) {
89
- const innerContents = regexMatch.groups?.["contents"];
90
- const parts = str.split(`\`${innerContents}\``);
91
- return innerContents ? html `${parts[0] ?? ""}<code>${innerContents}</code>${parts[1] ?? ""}` : str;
92
- }
93
- else {
94
- return str;
76
+ /**
77
+ * Lightweight markdown parser that handles common patterns without dependencies.
78
+ * Supports: inline code, bold, italic, links, and plain URLs.
79
+ * Patterns are processed in order to avoid conflicts (e.g., code blocks processed first).
80
+ * Each markdown element is given a CSS part for styling customization.
81
+ */
82
+ function parseMarkdown(str) {
83
+ const tokens = [];
84
+ const remaining = str;
85
+ let position = 0;
86
+ while (position < remaining.length) {
87
+ let matched = false;
88
+ // Pattern 1: Inline code `text` (process first to avoid parsing markdown inside code)
89
+ const codeMatch = remaining.slice(position).match(/^`([^`]+)`/);
90
+ if (codeMatch) {
91
+ tokens.push(html `<code part="markdown-code">${codeMatch[1]}</code>`);
92
+ position += codeMatch[0].length;
93
+ matched = true;
94
+ continue;
95
+ }
96
+ // Pattern 2: Markdown links [text](url)
97
+ const linkMatch = remaining.slice(position).match(/^\[([^\]]+)\]\(([^)]+)\)/);
98
+ if (linkMatch) {
99
+ tokens.push(html `<a part="markdown-link" href="${linkMatch[2]}">${linkMatch[1]}</a>`);
100
+ position += linkMatch[0].length;
101
+ matched = true;
102
+ continue;
103
+ }
104
+ // Pattern 3: Plain URLs (http:// or https://)
105
+ const urlMatch = remaining.slice(position).match(/^(https?:\/\/[^\s]+)/);
106
+ if (urlMatch) {
107
+ tokens.push(html `<a part="markdown-link" href="${urlMatch[1]}">${urlMatch[1]}</a>`);
108
+ position += urlMatch[0].length;
109
+ matched = true;
110
+ continue;
111
+ }
112
+ // Pattern 4: Bold **text**
113
+ const boldMatch = remaining.slice(position).match(/^\*\*([^*]+)\*\*/);
114
+ if (boldMatch) {
115
+ tokens.push(html `<strong part="markdown-bold">${boldMatch[1]}</strong>`);
116
+ position += boldMatch[0].length;
117
+ matched = true;
118
+ continue;
119
+ }
120
+ // Pattern 5: Italic *text* (but not ** which is bold)
121
+ const italicMatch = remaining.slice(position).match(/^\*([^*]+)\*/);
122
+ if (italicMatch) {
123
+ tokens.push(html `<em part="markdown-italic">${italicMatch[1]}</em>`);
124
+ position += italicMatch[0].length;
125
+ matched = true;
126
+ continue;
127
+ }
128
+ // No pattern matched, consume one character as plain text
129
+ if (!matched) {
130
+ tokens.push(remaining[position]);
131
+ position++;
132
+ }
95
133
  }
134
+ // Combine all tokens into a single template result
135
+ return html `${tokens}`;
96
136
  }
97
137
  function getBasePath() {
98
138
  return window.location.href.replace(window.location.hash, "");
@@ -109,6 +149,10 @@ function getBasePath() {
109
149
  * @csspart cssprops - Select the section that pertains to the CSS Custom Properties documentation
110
150
  * @csspart methods - Select the section that pertains to the Methods documentation
111
151
  * @csspart cssstates - Select the section that pertains to the CSS Custom States documentation
152
+ * @csspart markdown-bold - Style bold text rendered from markdown (`**text**`)
153
+ * @csspart markdown-italic - Style italic text rendered from markdown (`*text*`)
154
+ * @csspart markdown-code - Style inline code rendered from markdown (`` `code` ``)
155
+ * @csspart markdown-link - Style links rendered from markdown (`[text](url)` or plain URLs)
112
156
  *
113
157
  * @cssState loading - Applied when the element is in the process of loading the schema resource
114
158
  *
package/index.bundle.js CHANGED
@@ -4,18 +4,18 @@ import t from"./customelement-manifest-element.css"with{type:"css"};function e(t
4
4
  * Copyright 2019 Google LLC
5
5
  * SPDX-License-Identifier: BSD-3-Clause
6
6
  */
7
- const s=globalThis,i=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let a=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&n.set(e,t))}return t}toString(){return this.cssText}};const o=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:h,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,$=globalThis,m=$.trustedTypes,f=m?m.emptyScript:"",v=$.reactiveElementPolyfillSupport,y=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},g=(t,e)=>!h(t,e),A={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:g};
7
+ const s=globalThis,i=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),n=new WeakMap;let a=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(i&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&n.set(e,t))}return t}toString(){return this.cssText}};const o=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,r))(e)})(t):t,{is:h,defineProperty:l,getOwnPropertyDescriptor:c,getOwnPropertyNames:d,getOwnPropertySymbols:p,getPrototypeOf:u}=Object,m=globalThis,$=m.trustedTypes,f=$?$.emptyScript:"",v=m.reactiveElementPolyfillSupport,y=(t,e)=>t,_={toAttribute(t,e){switch(e){case Boolean:t=t?f:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},g=(t,e)=>!h(t,e),A={attribute:!0,type:String,converter:_,reflect:!1,useDefault:!1,hasChanged:g};
8
8
  /**
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */Symbol.metadata??=Symbol("metadata"),$.litPropertyMetadata??=new WeakMap;let E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&l(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);r?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...d(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:_).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=i;const n=r.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,r=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??g)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==r||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[y("elementProperties")]=new Map,E[y("finalized")]=new Map,v?.({ReactiveElement:E}),($.reactiveElementVersions??=[]).push("2.1.1");
12
+ */Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;let E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&l(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:r}=c(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);r?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??A}static _$Ei(){if(this.hasOwnProperty(y("elementProperties")))return;const t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(y("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(y("properties"))){const t=this.properties,e=[...d(t),...p(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(o(t))}else void 0!==t&&e.push(o(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(i)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const i of e){const e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:_).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(i):this.setAttribute(i,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:_;this._$Em=i;const n=r.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,r=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??g)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==r||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[y("elementProperties")]=new Map,E[y("finalized")]=new Map,v?.({ReactiveElement:E}),(m.reactiveElementVersions??=[]).push("2.1.1");
13
13
  /**
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
17
  */
18
- const b=globalThis,S=b.trustedTypes,w=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+C,N=`<${H}>`,x=document,L=()=>x.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,M="[ \t\n\f\r]",I=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,T=/-->/g,k=/>/g,R=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,j=/"/g,z=/^(?:script|style|textarea|title)$/i,q=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),B=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),V=new WeakMap,J=x.createTreeWalker(x,129);function K(t,e){if(!O(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==w?w.createHTML(e):e}const Z=(t,e)=>{const s=t.length-1,i=[];let r,n=2===e?"<svg>":3===e?"<math>":"",a=I;for(let e=0;e<s;e++){const s=t[e];let o,h,l=-1,c=0;for(;c<s.length&&(a.lastIndex=c,h=a.exec(s),null!==h);)c=a.lastIndex,a===I?"!--"===h[1]?a=T:void 0!==h[1]?a=k:void 0!==h[2]?(z.test(h[2])&&(r=RegExp("</"+h[2],"g")),a=R):void 0!==h[3]&&(a=R):a===R?">"===h[0]?(a=r??I,l=-1):void 0===h[1]?l=-2:(l=a.lastIndex-h[2].length,o=h[1],a=void 0===h[3]?R:'"'===h[3]?j:D):a===j||a===D?a=R:a===T||a===k?a=I:(a=R,r=void 0);const d=a===R&&t[e+1].startsWith("/>")?" ":"";n+=a===I?s+N:l>=0?(i.push(o),s.slice(0,l)+P+s.slice(l)+C+d):s+C+(-2===l?e:d)}return[K(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class F{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0;const a=t.length-1,o=this.parts,[h,l]=Z(t,e);if(this.el=F.createElement(h,s),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=J.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(P)){const e=l[n++],s=i.getAttribute(t).split(C),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:r,name:a[2],strings:s,ctor:"."===a[1]?tt:"?"===a[1]?et:"@"===a[1]?st:Y}),i.removeAttribute(t)}else t.startsWith(C)&&(o.push({type:6,index:r}),i.removeAttribute(t));if(z.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=S?S.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],L()),J.nextNode(),o.push({type:2,index:++r});i.append(t[e],L())}}}else if(8===i.nodeType)if(i.data===H)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)o.push({type:7,index:r}),t+=C.length-1}r++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function G(t,e,s=t,i){if(e===B)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=U(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=G(t,r._$AS(t,e.values),r,i)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??x).importNode(e,!0);J.currentNode=i;let r=J.nextNode(),n=0,a=0,o=s[0];for(;void 0!==o;){if(n===o.index){let e;2===o.type?e=new X(r,r.nextSibling,this,t):1===o.type?e=new o.ctor(r,o.name,o.strings,this,t):6===o.type&&(e=new it(r,this,t)),this._$AV.push(e),o=s[++a]}n!==o?.index&&(r=J.nextNode(),n++)}return J.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),U(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==W&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=F.createElement(K(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new F(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new X(this.O(L()),this.O(L()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=W}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=G(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==B,n&&(this._$AH=t);else{const i=t;let a,o;for(t=r[0],a=0;a<r.length-1;a++)o=G(this,i[s+a],e,a),o===B&&(o=this._$AH[a]),n||=!U(o)||o!==this._$AH[a],o===W?t=W:t!==W&&(t+=(o??"")+r[a+1]),this._$AH[a]=o}n&&!i&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class st extends Y{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=G(this,t,e,0)??W)===B)return;const s=this._$AH,i=t===W&&s!==W||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==W&&(s===W||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const rt=b.litHtmlPolyfillSupport;rt?.(F,X),(b.litHtmlVersions??=[]).push("3.3.1");const nt=globalThis;
18
+ const b=globalThis,S=b.trustedTypes,w=S?S.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,H="?"+C,N=`<${H}>`,x=document,L=()=>x.createComment(""),U=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,M="[ \t\n\f\r]",k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,T=/>/g,R=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,j=/"/g,z=/^(?:script|style|textarea|title)$/i,q=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),B=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),V=new WeakMap,J=x.createTreeWalker(x,129);function K(t,e){if(!O(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==w?w.createHTML(e):e}const Z=(t,e)=>{const s=t.length-1,i=[];let r,n=2===e?"<svg>":3===e?"<math>":"",a=k;for(let e=0;e<s;e++){const s=t[e];let o,h,l=-1,c=0;for(;c<s.length&&(a.lastIndex=c,h=a.exec(s),null!==h);)c=a.lastIndex,a===k?"!--"===h[1]?a=I:void 0!==h[1]?a=T:void 0!==h[2]?(z.test(h[2])&&(r=RegExp("</"+h[2],"g")),a=R):void 0!==h[3]&&(a=R):a===R?">"===h[0]?(a=r??k,l=-1):void 0===h[1]?l=-2:(l=a.lastIndex-h[2].length,o=h[1],a=void 0===h[3]?R:'"'===h[3]?j:D):a===j||a===D?a=R:a===I||a===T?a=k:(a=R,r=void 0);const d=a===R&&t[e+1].startsWith("/>")?" ":"";n+=a===k?s+N:l>=0?(i.push(o),s.slice(0,l)+P+s.slice(l)+C+d):s+C+(-2===l?e:d)}return[K(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class F{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let r=0,n=0;const a=t.length-1,o=this.parts,[h,l]=Z(t,e);if(this.el=F.createElement(h,s),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=J.nextNode())&&o.length<a;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(P)){const e=l[n++],s=i.getAttribute(t).split(C),a=/([.?@])?(.*)/.exec(e);o.push({type:1,index:r,name:a[2],strings:s,ctor:"."===a[1]?tt:"?"===a[1]?et:"@"===a[1]?st:Y}),i.removeAttribute(t)}else t.startsWith(C)&&(o.push({type:6,index:r}),i.removeAttribute(t));if(z.test(i.tagName)){const t=i.textContent.split(C),e=t.length-1;if(e>0){i.textContent=S?S.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],L()),J.nextNode(),o.push({type:2,index:++r});i.append(t[e],L())}}}else if(8===i.nodeType)if(i.data===H)o.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(C,t+1));)o.push({type:7,index:r}),t+=C.length-1}r++}}static createElement(t,e){const s=x.createElement("template");return s.innerHTML=t,s}}function G(t,e,s=t,i){if(e===B)return e;let r=void 0!==i?s._$Co?.[i]:s._$Cl;const n=U(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),void 0===n?r=void 0:(r=new n(t),r._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=r:s._$Cl=r),void 0!==r&&(e=G(t,r._$AS(t,e.values),r,i)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??x).importNode(e,!0);J.currentNode=i;let r=J.nextNode(),n=0,a=0,o=s[0];for(;void 0!==o;){if(n===o.index){let e;2===o.type?e=new X(r,r.nextSibling,this,t):1===o.type?e=new o.ctor(r,o.name,o.strings,this,t):6===o.type&&(e=new it(r,this,t)),this._$AV.push(e),o=s[++a]}n!==o?.index&&(r=J.nextNode(),n++)}return J.currentNode=x,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class X{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=G(this,t,e),U(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==B&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>O(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==W&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=F.createElement(K(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=V.get(t.strings);return void 0===e&&V.set(t.strings,e=new F(t)),e}k(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const r of t)i===e.length?e.push(s=new X(this.O(L()),this.O(L()),this,this.options)):s=e[i],s._$AI(r),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class Y{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,r){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=W}_$AI(t,e=this,s,i){const r=this.strings;let n=!1;if(void 0===r)t=G(this,t,e,0),n=!U(t)||t!==this._$AH&&t!==B,n&&(this._$AH=t);else{const i=t;let a,o;for(t=r[0],a=0;a<r.length-1;a++)o=G(this,i[s+a],e,a),o===B&&(o=this._$AH[a]),n||=!U(o)||o!==this._$AH[a],o===W?t=W:t!==W&&(t+=(o??"")+r[a+1]),this._$AH[a]=o}n&&!i&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class tt extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}class et extends Y{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==W)}}class st extends Y{constructor(t,e,s,i,r){super(t,e,s,i,r),this.type=5}_$AI(t,e=this){if((t=G(this,t,e,0)??W)===B)return;const s=this._$AH,i=t===W&&s!==W||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==W&&(s===W||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){G(this,t)}}const rt=b.litHtmlPolyfillSupport;rt?.(F,X),(b.litHtmlVersions??=[]).push("3.3.1");const nt=globalThis;
19
19
  /**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
@@ -36,72 +36,72 @@ const ht={attribute:!0,type:String,converter:_,reflect:!1,hasChanged:g},lt=(t=ht
36
36
  * @license
37
37
  * Copyright 2020 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */const dt=Symbol.for(""),pt=t=>{if(t?.r===dt)return t?._$litStatic$},ut=new Map,$t=(t=>(e,...s)=>{const i=s.length;let r,n;const a=[],o=[];let h,l=0,c=!1;for(;l<i;){for(h=e[l];l<i&&void 0!==(n=s[l],r=pt(n));)h+=r+e[++l],c=!0;l!==i&&o.push(n),a.push(h),l++}if(l===i&&a.push(e[i]),c){const t=a.join("$$lit$$");void 0===(e=ut.get(t))&&(a.raw=a,ut.set(t,e=a)),s=o}return t(e,...s)})(q);function mt(t){return t.modules.flatMap(t=>t.exports).filter(t=>"custom-element-definition"===t?.kind)}function ft(t){return!(t.privacy&&"public"!==t.privacy||t.name.startsWith("_")||t.name.startsWith("#"))}function vt(t){return(t=>({_$litStatic$:t,r:dt}))(`h${t}`)}function yt(t,e){const s=t.map(t=>{let s=$t``;for(const i of e){const e=`${i.type}`,r=i.valueAccessor(t);s=$t`${s}${$t`<td class="${e}">${r?$t`<span>${r}</span>`:W}</td>`}`}return $t`<tr>${s}</tr>`}),i=e.map(t=>$t`<th class="${t.type}">${t.header}</th>`);return $t`<table cellpadding="0" cellspacing="0">
39
+ */const dt=Symbol.for(""),pt=t=>{if(t?.r===dt)return t?._$litStatic$},ut=new Map,mt=(t=>(e,...s)=>{const i=s.length;let r,n;const a=[],o=[];let h,l=0,c=!1;for(;l<i;){for(h=e[l];l<i&&void 0!==(n=s[l],r=pt(n));)h+=r+e[++l],c=!0;l!==i&&o.push(n),a.push(h),l++}if(l===i&&a.push(e[i]),c){const t=a.join("$$lit$$");void 0===(e=ut.get(t))&&(a.raw=a,ut.set(t,e=a)),s=o}return t(e,...s)})(q);function $t(t){return t.modules.flatMap(t=>t.exports).filter(t=>"custom-element-definition"===t?.kind)}function ft(t){return!(t.privacy&&"public"!==t.privacy||t.name.startsWith("_")||t.name.startsWith("#"))}function vt(t){return(t=>({_$litStatic$:t,r:dt}))(`h${t}`)}function yt(t,e){const s=t.map(t=>{let s=mt``;for(const i of e){const e=`${i.type}`,r=i.valueAccessor(t);s=mt`${s}${mt`<td class="${e}">${r?mt`<span>${r}</span>`:W}</td>`}`}return mt`<tr>${s}</tr>`}),i=e.map(t=>mt`<th class="${t.type}">${t.header}</th>`);return mt`<table cellpadding="0" cellspacing="0">
40
40
  <thead>
41
41
  <tr> ${i} </tr>
42
42
  </thead>
43
43
  <tbody> ${s} </tbody>
44
- </table>`}function _t(t){if(!t)return t;t.startsWith("-")&&(t=t.substring(1));const e=t.split(" ");let s=$t``;for(const t of e)s=$t`${s} ${gt(t)}`;return s}function gt(t){let e;if(e=t.match(/^https?:\/\//))return $t`<a href="${t}">${t}</a>`;if(e=t.match(/`(?<contents>.*)`/)){const s=e.groups?.contents,i=t.split(`\`${s}\``);return s?$t`${i[0]??""}<code>${s}</code>${i[1]??""}`:t}return t}let At=class extends at{get initialHeaderLevel(){return this.#t}set initialHeaderLevel(t){t>3&&(t=3);const e=this.#t;this.#t=t,this.requestUpdate("initialHeaderLevel",e)}static{this.styles=[t]}#t;#e;#s;#i;#r;#n;#a;get#o(){if(!this.#s)return[];let t=mt(this.#s).map(t=>t?.name).filter(t=>t);return this.elementNames&&(t=t.filter(t=>this.elementNames.includes(t))),t.sort((t,e)=>t.localeCompare(e))}get#h(){if(this.#s&&(this.#i??=this.#o[0],this.#i))return function(t,e){const s=mt(t).find(t=>t?.name===e);if(!s)return;const i=t.modules.find(t=>t.path===s.declaration.module);if(!i)return;const r=i.declarations?.find(t=>"class"===t.kind&&t.name===s.declaration.name);return r}(this.#s,this.#i)}constructor(){super(),this.src=null,this.elementNames=null,this.initialElementName=null,this.headerIdPrefix=null,this.#t=1,this.#e=!1,this.#a=window.location.href.replace(window.location.hash,""),this.attachInternals&&(this.#n=this.attachInternals())}firstUpdated(t){super.firstUpdated(t),this.#e||this.#s||!this.src||this.#l(),this.#c(),window.addEventListener("hashchange",()=>this.#c,{capture:!0})}update(t){super.update(t),t.has("src")&&this.#l()}render(){return this.#e?$t`Loading...`:this.#r?$t`An error was encountered trying to load schema from ${this.src}`:this.#h?$t`<article>
44
+ </table>`}function _t(t){return t?(t.startsWith("-")&&(t=t.substring(1)),function(t){const e=[],s=t;let i=0;for(;i<s.length;){let t=!1;const r=s.slice(i).match(/^`([^`]+)`/);if(r){e.push(mt`<code part="markdown-code">${r[1]}</code>`),i+=r[0].length,t=!0;continue}const n=s.slice(i).match(/^\[([^\]]+)\]\(([^)]+)\)/);if(n){e.push(mt`<a part="markdown-link" href="${n[2]}">${n[1]}</a>`),i+=n[0].length,t=!0;continue}const a=s.slice(i).match(/^(https?:\/\/[^\s]+)/);if(a){e.push(mt`<a part="markdown-link" href="${a[1]}">${a[1]}</a>`),i+=a[0].length,t=!0;continue}const o=s.slice(i).match(/^\*\*([^*]+)\*\*/);if(o){e.push(mt`<strong part="markdown-bold">${o[1]}</strong>`),i+=o[0].length,t=!0;continue}const h=s.slice(i).match(/^\*([^*]+)\*/);h?(e.push(mt`<em part="markdown-italic">${h[1]}</em>`),i+=h[0].length,t=!0):t||(e.push(s[i]),i++)}return mt`${e}`}(t)):t}let gt=class extends at{get initialHeaderLevel(){return this.#t}set initialHeaderLevel(t){t>3&&(t=3);const e=this.#t;this.#t=t,this.requestUpdate("initialHeaderLevel",e)}static{this.styles=[t]}#t;#e;#s;#i;#r;#n;#a;get#o(){if(!this.#s)return[];let t=$t(this.#s).map(t=>t?.name).filter(t=>t);return this.elementNames&&(t=t.filter(t=>this.elementNames.includes(t))),t.sort((t,e)=>t.localeCompare(e))}get#h(){if(this.#s&&(this.#i??=this.#o[0],this.#i))return function(t,e){const s=$t(t).find(t=>t?.name===e);if(!s)return;const i=t.modules.find(t=>t.path===s.declaration.module);if(!i)return;const r=i.declarations?.find(t=>"class"===t.kind&&t.name===s.declaration.name);return r}(this.#s,this.#i)}constructor(){super(),this.src=null,this.elementNames=null,this.initialElementName=null,this.headerIdPrefix=null,this.#t=1,this.#e=!1,this.#a=window.location.href.replace(window.location.hash,""),this.attachInternals&&(this.#n=this.attachInternals())}firstUpdated(t){super.firstUpdated(t),this.#e||this.#s||!this.src||this.#l(),this.#c(),window.addEventListener("hashchange",()=>this.#c,{capture:!0})}update(t){super.update(t),t.has("src")&&this.#l()}render(){return this.#e?mt`Loading...`:this.#r?mt`An error was encountered trying to load schema from ${this.src}`:this.#h?mt`<article>
45
45
  <div class="header-row">${this.#d()}</div>
46
46
  <div>${_t(this.#h.description)}</div>
47
- ${this.#p()} ${this.#u()} ${this.#$()}
48
- ${this.#m()} ${this.#f()} ${this.#v()} ${this.#y()}
47
+ ${this.#p()} ${this.#u()} ${this.#m()}
48
+ ${this.#$()} ${this.#f()} ${this.#v()} ${this.#y()}
49
49
  ${this.#_()}
50
- </article>`:W}#d(){if(this.#o.length>1){let t=this.#o.find(t=>t===this.#i);t||(t=this.#o[0]);const e=this.#o.map(e=>$t`<option ?selected="${e===t}" value="${e}">${e}</option>`);return $t`
50
+ </article>`:W}#d(){if(this.#o.length>1){let t=this.#o.find(t=>t===this.#i);t||(t=this.#o[0]);const e=this.#o.map(e=>mt`<option ?selected="${e===t}" value="${e}">${e}</option>`);return mt`
51
51
  <${vt(this.initialHeaderLevel)}>
52
52
  <select part="chooser" @change="${this.#g}">${e}</select>
53
- </${vt(this.initialHeaderLevel)}>`}return $t`<${vt(this.initialHeaderLevel)}>${this.#i}</${vt(this.initialHeaderLevel)}>`}#p(){const t=this.#h?.attributes;if(t?.length){const e=yt(t,[{header:"Attribute",valueAccessor:t=>t.name,type:"name"},{header:"Description",type:"summary",valueAccessor:t=>_t(t.description)},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return $t`
53
+ </${vt(this.initialHeaderLevel)}>`}return mt`<${vt(this.initialHeaderLevel)}>${this.#i}</${vt(this.initialHeaderLevel)}>`}#p(){const t=this.#h?.attributes;if(t?.length){const e=yt(t,[{header:"Attribute",valueAccessor:t=>t.name,type:"name"},{header:"Description",type:"summary",valueAccessor:t=>_t(t.description)},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return mt`
54
54
  <section part="attributes">
55
55
  <a class="header-link" id="${this.#A("attributes")}" href="${this.#a}#${this.#A("attributes")}">
56
56
  <${vt(this.initialHeaderLevel+1)}>Attributes</${vt(this.initialHeaderLevel+1)}></a>
57
57
  ${e}
58
58
  </section>
59
- `}return W}#u(){const t=this.#h?.members?.filter(t=>"field"===t.kind&&ft(t));if(t?.length){const e=yt(t,[{header:"Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return $t`
59
+ `}return W}#u(){const t=this.#h?.members?.filter(t=>"field"===t.kind&&ft(t));if(t?.length){const e=yt(t,[{header:"Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return mt`
60
60
  <section part="properties">
61
61
  <a class="header-link" id="${this.#A("properties")}" href="${this.#a}#${this.#A("properties")}">
62
62
  <${vt(this.initialHeaderLevel+1)}>Properties</${vt(this.initialHeaderLevel+1)}></a>
63
63
  ${e}
64
64
  </section>
65
- `}return W}#$(){const t=this.#h?.cssProperties;if(t?.length){const e=yt(t,[{header:"CSS Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return $t`
65
+ `}return W}#m(){const t=this.#h?.cssProperties;if(t?.length){const e=yt(t,[{header:"CSS Property",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Default",valueAccessor:t=>t.default,type:"default"}]);return mt`
66
66
  <section part="cssprops">
67
67
  <a class="header-link" id="${this.#A("cssprops")}" href="${this.#a}#${this.#A("cssprops")}"> <${vt(this.initialHeaderLevel+1)} )}">CSS Custom Properties</${vt(this.initialHeaderLevel+1)}></a>
68
68
  ${e}
69
69
  </section>
70
- `}return W}#m(){const t=this.#h?.cssParts;if(t?.length){const e=yt(t,[{header:"CSS Part",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return $t`
70
+ `}return W}#$(){const t=this.#h?.cssParts;if(t?.length){const e=yt(t,[{header:"CSS Part",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return mt`
71
71
  <section part="cssparts">
72
72
  <a class="header-link" id="${this.#A("parts")}" href="${this.#a}#${this.#A("parts")}"> <${vt(this.initialHeaderLevel+1)}>CSS Shadow Parts</${vt(this.initialHeaderLevel+1)}></a>
73
73
  ${e}
74
74
  </section>
75
- `}return W}#f(){const t=this.#h?.events;if(t?.length){const e=yt(t,[{header:"Event",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"}]);return $t`
75
+ `}return W}#f(){const t=this.#h?.events;if(t?.length){const e=yt(t,[{header:"Event",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Type",valueAccessor:t=>t.type?.text,type:"type"}]);return mt`
76
76
  <section part="events">
77
77
  <a class="header-link" id="${this.#A("events")}" href="${this.#a}#${this.#A("events")}">
78
78
  <${vt(this.initialHeaderLevel+1)}>Events</${vt(this.initialHeaderLevel+1)}></a>
79
79
  ${e}
80
80
  </section>
81
- `}return W}#v(){const t=this.#h?.members?.filter(t=>"method"===t.kind&&ft(t));if(t?.length){const e=yt(t,[{header:"Method",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Signature",valueAccessor:t=>function(t){const e=()=>{const e=t.return?.type?.text;return 0===e?.length?"void":e??"unknown"};if(t.parameters){const s=t.parameters?.map(t=>t.name+(t.optional?"?":"")).join(", "),i=t.parameters?.map(t=>{const e=`: ${t?.type?.text}${t.default?` = ${t.default}`:""}`,s=t.name+(t.optional?"?":"")+e;return $t`
81
+ `}return W}#v(){const t=this.#h?.members?.filter(t=>"method"===t.kind&&ft(t));if(t?.length){const e=yt(t,[{header:"Method",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"},{header:"Signature",valueAccessor:t=>function(t){const e=()=>{const e=t.return?.type?.text;return 0===e?.length?"void":e??"unknown"};if(t.parameters){const s=t.parameters?.map(t=>t.name+(t.optional?"?":"")).join(", "),i=t.parameters?.map(t=>{const e=`: ${t?.type?.text}${t.default?` = ${t.default}`:""}`,s=t.name+(t.optional?"?":"")+e;return mt`
82
82
  <div class="param-container">
83
83
  <div class="param">${s}</div>
84
- ${t.description?$t`<div class="param-description">${_t(t.description)}</div>`:W}
84
+ ${t.description?mt`<div class="param-description">${_t(t.description)}</div>`:W}
85
85
  </div>
86
- `});return $t`<details>
86
+ `});return mt`<details>
87
87
  <summary>${t.name}(${s}): ${e()}</summary>
88
88
  <div class="expanded-details">${i}</div>
89
- </details>`}return $t`${t.name}(): ${e()}`}(t),type:"signature"}]);return $t`
89
+ </details>`}return mt`${t.name}(): ${e()}`}(t),type:"signature"}]);return mt`
90
90
  <section part="methods">
91
91
  <a class="header-link" id="${this.#A("methods")}" href="${this.#a}#${this.#A("methods")}">
92
92
  <${vt(this.initialHeaderLevel+1)}>Methods</${vt(this.initialHeaderLevel+1)}></a>
93
93
  ${e}
94
94
  </section>
95
- `}return W}#y(){const t=this.#h?.slots;if(t?.length){const e=yt(t,[{header:"Slot",valueAccessor(t){let e=t.name;return e.startsWith("-")&&(e=e.substring(1)),e},type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return $t`
95
+ `}return W}#y(){const t=this.#h?.slots;if(t?.length){const e=yt(t,[{header:"Slot",valueAccessor(t){let e=t.name;return e.startsWith("-")&&(e=e.substring(1)),e},type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return mt`
96
96
  <section part="slots">
97
97
  <a class="header-link" id="${this.#A("slots")}" href="${this.#a}#${this.#A("slots")}">
98
98
  <${vt(this.initialHeaderLevel+1)}>Slots</${vt(this.initialHeaderLevel+1)}></a>
99
99
  ${e}
100
100
  </section>
101
- `}return W}#_(){const t=this.#h?.cssStates;if(t?.length){const e=yt(t,[{header:"State",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return $t`
101
+ `}return W}#_(){const t=this.#h?.cssStates;if(t?.length){const e=yt(t,[{header:"State",valueAccessor:t=>t.name,type:"name"},{header:"Description",valueAccessor:t=>_t(t.description),type:"summary"}]);return mt`
102
102
  <section part="cssstates">
103
103
  <a class="header-link" id="${this.#A("states")}" href="${this.#a}#${this.#A("states")}">
104
104
  <${vt(this.initialHeaderLevel+1)}>CSS Custom States</${vt(this.initialHeaderLevel+1)}></a>
105
105
  ${e}
106
106
  </section>
107
- `}return W}#g(t){this.#i=t.target.value||void 0,this.requestUpdate()}async#l(){if(this.src){this.#e=!0,this.#n?.states?.add("loading");const t=await fetch(this.src);if(t.ok){const e=await t.json();this.#s=e,this.initialElementName&&this.#o.includes(this.initialElementName)?this.#i=this.initialElementName:this.#i=this.#o[0],this.requestUpdate()}else this.#r=!0;this.#e=!1,this.#n?.states?.delete("loading"),this.#c(),this.dispatchEvent(new CustomEvent("load",{detail:{success:!this.#r}}))}}#A(t,e=!1){let s=t;return this.#i&&(s=`${this.#i}${e?"\\":""}~${s}`),this.headerIdPrefix&&(s=`${this.headerIdPrefix}_${s}`),s}async#c(){if(!window.location.hash)return;const t=window.location.hash.substring(1),e=new RegExp((this.headerIdPrefix?`(?<prefix>${this.headerIdPrefix})_`:"")+"(?<element>.*)~(?<id>.*)").exec(t);e&&this.#o?.includes(e.groups?.element)&&(this.#i=e.groups?.element,this.requestUpdate(),await this.updateComplete,this.renderRoot.querySelector(`#${this.#A(e.groups.id,!0)}`)?.scrollIntoView({behavior:"smooth",block:"start"}))}};e([ct({type:String})],At.prototype,"src",void 0),e([ct({type:Array})],At.prototype,"elementNames",void 0),e([ct({type:String})],At.prototype,"initialElementName",void 0),e([ct({type:Number})],At.prototype,"initialHeaderLevel",null),e([ct({type:String})],At.prototype,"headerIdPrefix",void 0),At=e([(t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("customelement-manifest-element")],At);export{At as CustomElementManifestElement};
107
+ `}return W}#g(t){this.#i=t.target.value||void 0,this.requestUpdate()}async#l(){if(this.src){this.#e=!0,this.#n?.states?.add("loading");const t=await fetch(this.src);if(t.ok){const e=await t.json();this.#s=e,this.initialElementName&&this.#o.includes(this.initialElementName)?this.#i=this.initialElementName:this.#i=this.#o[0],this.requestUpdate()}else this.#r=!0;this.#e=!1,this.#n?.states?.delete("loading"),this.#c(),this.dispatchEvent(new CustomEvent("load",{detail:{success:!this.#r}}))}}#A(t,e=!1){let s=t;return this.#i&&(s=`${this.#i}${e?"\\":""}~${s}`),this.headerIdPrefix&&(s=`${this.headerIdPrefix}_${s}`),s}async#c(){if(!window.location.hash)return;const t=window.location.hash.substring(1),e=new RegExp((this.headerIdPrefix?`(?<prefix>${this.headerIdPrefix})_`:"")+"(?<element>.*)~(?<id>.*)").exec(t);e&&this.#o?.includes(e.groups?.element)&&(this.#i=e.groups?.element,this.requestUpdate(),await this.updateComplete,this.renderRoot.querySelector(`#${this.#A(e.groups.id,!0)}`)?.scrollIntoView({behavior:"smooth",block:"start"}))}};e([ct({type:String})],gt.prototype,"src",void 0),e([ct({type:Array})],gt.prototype,"elementNames",void 0),e([ct({type:String})],gt.prototype,"initialElementName",void 0),e([ct({type:Number})],gt.prototype,"initialHeaderLevel",null),e([ct({type:String})],gt.prototype,"headerIdPrefix",void 0),gt=e([(t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)})("customelement-manifest-element")],gt);export{gt as CustomElementManifestElement};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zywave/customelement-manifest-element",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "main": "index.js",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -18,43 +18,43 @@
18
18
  "custom-elements.json"
19
19
  ],
20
20
  "devDependencies": {
21
- "@custom-elements-manifest/analyzer": "^0.10.5",
21
+ "@custom-elements-manifest/analyzer": "^0.11.0",
22
22
  "@custom-elements-manifest/to-markdown": "^0.1.0",
23
- "@eslint/eslintrc": "^3.3.1",
24
- "@eslint/js": "^9.34.0",
23
+ "@eslint/eslintrc": "^3.3.3",
24
+ "@eslint/js": "^9.39.2",
25
25
  "@esm-bundle/chai": "^4.3.4",
26
- "@rollup/plugin-node-resolve": "^16.0.1",
26
+ "@rollup/plugin-node-resolve": "^16.0.3",
27
27
  "@rollup/plugin-terser": "^0.4.4",
28
- "@semantic-release/gitlab": "^13.2.6",
28
+ "@semantic-release/gitlab": "^13.3.0",
29
29
  "@semantic-release/gitlab-config": "^14.0.1",
30
30
  "@types/mocha": "^10.0.10",
31
- "@types/node": "^24.3.0",
32
- "@typescript-eslint/eslint-plugin": "^8.39.1",
33
- "@typescript-eslint/parser": "^8.39.1",
31
+ "@types/node": "^25.2.3",
32
+ "@typescript-eslint/eslint-plugin": "^8.55.0",
33
+ "@typescript-eslint/parser": "^8.55.0",
34
34
  "@web/dev-server": "0.4.6",
35
35
  "@web/test-runner": "^0.20.2",
36
36
  "@web/test-runner-junit-reporter": "^0.8.0",
37
37
  "@web/test-runner-playwright": "^0.11.1",
38
- "@zywave/zui-sass-scripts": "^4.0.16",
39
- "chai": "^5.2.1",
40
- "chokidar": "^4.0.3",
38
+ "@zywave/zui-sass-scripts": "^4.0.18",
39
+ "chai": "^6.2.2",
40
+ "chokidar": "^5.0.0",
41
41
  "custom-elements-manifest": "^2.1.0",
42
- "es-module-shims": "^2.6.2",
43
- "eslint": "^9.33.0",
42
+ "es-module-shims": "^2.8.0",
43
+ "eslint": "^9.39.2",
44
44
  "eslint-config-prettier": "^10.1.8",
45
- "eslint-plugin-lit": "^2.1.1",
46
- "eslint-plugin-prettier": "^5.5.4",
47
- "globals": "^16.3.0",
48
- "mocha": "^11.7.1",
49
- "playwright": "^1.54.2",
50
- "prettier": "^3.6.2",
51
- "rollup": "^4.46.2",
52
- "sass": "^1.90.0",
53
- "semantic-release": "^24.2.7",
54
- "sinon": "^21.0.0",
55
- "terser": "^5.43.1",
45
+ "eslint-plugin-lit": "^2.2.1",
46
+ "eslint-plugin-prettier": "^5.5.5",
47
+ "globals": "^17.3.0",
48
+ "mocha": "^11.7.5",
49
+ "playwright": "^1.58.2",
50
+ "prettier": "^3.8.1",
51
+ "rollup": "^4.57.1",
52
+ "sass": "^1.97.3",
53
+ "semantic-release": "^25.0.3",
54
+ "sinon": "^21.0.1",
55
+ "terser": "^5.46.0",
56
56
  "tslib": "^2.8.1",
57
- "typescript": "^5.9.2"
57
+ "typescript": "^5.9.3"
58
58
  },
59
59
  "scripts": {
60
60
  "analyze": "cem analyze --globs \"src/customelement-manifest-element.ts\" --litelement",