@mgdis/core-ui-helpers 1.2.2 → 1.3.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.
Files changed (149) hide show
  1. package/dist/angular/index.cjs +27 -0
  2. package/dist/angular/index.cjs.map +1 -0
  3. package/dist/angular/index.d.ts +21 -0
  4. package/dist/angular/index.js +25 -0
  5. package/dist/angular/index.js.map +1 -0
  6. package/dist/angular/index.umd.js +33 -0
  7. package/dist/angular/index.umd.js.map +1 -0
  8. package/dist/locale/index.cjs +190 -0
  9. package/dist/locale/index.cjs.map +1 -0
  10. package/dist/locale/index.d.ts +110 -0
  11. package/dist/locale/index.js +181 -0
  12. package/dist/locale/index.js.map +1 -0
  13. package/dist/locale/index.umd.js +196 -0
  14. package/dist/locale/index.umd.js.map +1 -0
  15. package/dist/playwright/index.cjs +137 -0
  16. package/dist/playwright/index.cjs.map +1 -0
  17. package/dist/playwright/index.d.ts +39 -0
  18. package/dist/playwright/index.js +133 -0
  19. package/dist/playwright/index.js.map +1 -0
  20. package/dist/playwright/index.umd.js +143 -0
  21. package/dist/playwright/index.umd.js.map +1 -0
  22. package/dist/stencil/index.cjs +363 -0
  23. package/dist/stencil/index.cjs.map +1 -0
  24. package/dist/stencil/index.d.ts +222 -0
  25. package/dist/stencil/index.js +357 -0
  26. package/dist/stencil/index.js.map +1 -0
  27. package/dist/stencil/index.umd.js +369 -0
  28. package/dist/stencil/index.umd.js.map +1 -0
  29. package/dist/storybook/index.cjs +2335 -0
  30. package/dist/storybook/index.cjs.map +1 -0
  31. package/dist/storybook/index.d.ts +85 -0
  32. package/dist/storybook/index.js +2329 -0
  33. package/dist/storybook/index.js.map +1 -0
  34. package/dist/storybook/index.umd.js +2341 -0
  35. package/dist/storybook/index.umd.js.map +1 -0
  36. package/dist/tests/index.cjs +315 -0
  37. package/dist/tests/index.cjs.map +1 -0
  38. package/dist/tests/index.d.ts +100 -0
  39. package/dist/tests/index.js +309 -0
  40. package/dist/tests/index.js.map +1 -0
  41. package/dist/tests/index.umd.js +321 -0
  42. package/dist/tests/index.umd.js.map +1 -0
  43. package/dist/utils/index.cjs +441 -0
  44. package/dist/utils/index.cjs.map +1 -0
  45. package/dist/utils/index.d.ts +265 -0
  46. package/dist/utils/index.js +417 -0
  47. package/dist/utils/index.js.map +1 -0
  48. package/dist/utils/index.umd.js +447 -0
  49. package/dist/utils/index.umd.js.map +1 -0
  50. package/dist/vue/index.cjs +1935 -0
  51. package/dist/vue/index.cjs.map +1 -0
  52. package/dist/vue/index.d.ts +35 -0
  53. package/dist/vue/index.js +1933 -0
  54. package/dist/vue/index.js.map +1 -0
  55. package/dist/vue/index.umd.js +1941 -0
  56. package/dist/vue/index.umd.js.map +1 -0
  57. package/package.json +4 -1
  58. package/CHANGELOG.md +0 -101
  59. package/json-doc.test.json +0 -264
  60. package/rollup.config.mjs +0 -61
  61. package/src/angular/index.spec.ts +0 -8
  62. package/src/angular/index.ts +0 -1
  63. package/src/angular/mg-angular-logger/index.ts +0 -1
  64. package/src/angular/mg-angular-logger/mg-angular-logger.conf.ts +0 -3
  65. package/src/angular/mg-angular-logger/mg-angular-logger.spec.ts +0 -40
  66. package/src/angular/mg-angular-logger/mg-angular-logger.ts +0 -24
  67. package/src/locale/index.spec.ts +0 -24
  68. package/src/locale/index.ts +0 -1
  69. package/src/locale/locale.spec.ts +0 -291
  70. package/src/locale/locale.ts +0 -201
  71. package/src/playwright/config/index.ts +0 -43
  72. package/src/playwright/index.spec.ts +0 -16
  73. package/src/playwright/index.ts +0 -4
  74. package/src/playwright/utils/__snapshots__/utils.spec.ts.snap +0 -48
  75. package/src/playwright/utils/index.ts +0 -1
  76. package/src/playwright/utils/utils.spec.ts +0 -50
  77. package/src/playwright/utils/utils.ts +0 -77
  78. package/src/stencil/ide/__snapshots__/cem.spec.ts.snap +0 -248
  79. package/src/stencil/ide/__snapshots__/ide.spec.ts.snap +0 -414
  80. package/src/stencil/ide/cem.spec.ts +0 -35
  81. package/src/stencil/ide/cem.ts +0 -96
  82. package/src/stencil/ide/ide.spec.ts +0 -29
  83. package/src/stencil/ide/ide.ts +0 -221
  84. package/src/stencil/ide/index.ts +0 -2
  85. package/src/stencil/index.spec.ts +0 -16
  86. package/src/stencil/index.ts +0 -2
  87. package/src/stencil/normalize-boolean-attributes/index.ts +0 -1
  88. package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.spec.ts +0 -63
  89. package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.ts +0 -40
  90. package/src/storybook/index.spec.ts +0 -19
  91. package/src/storybook/index.ts +0 -1
  92. package/src/storybook/stencil/__snapshots__/stencil.spec.ts.snap +0 -329
  93. package/src/storybook/stencil/index.ts +0 -1
  94. package/src/storybook/stencil/stencil-shim.d.ts +0 -1
  95. package/src/storybook/stencil/stencil.conf.ts +0 -4
  96. package/src/storybook/stencil/stencil.spec.ts +0 -170
  97. package/src/storybook/stencil/stencil.ts +0 -377
  98. package/src/tests/index.spec.ts +0 -20
  99. package/src/tests/index.ts +0 -1
  100. package/src/tests/unit/__snapshots__/unit.spec.ts.snap +0 -52
  101. package/src/tests/unit/index.ts +0 -1
  102. package/src/tests/unit/unit.conf.ts +0 -16
  103. package/src/tests/unit/unit.spec.ts +0 -206
  104. package/src/tests/unit/unit.ts +0 -333
  105. package/src/utils/attributes/class-list/class-list.spec.ts +0 -36
  106. package/src/utils/attributes/class-list/class-list.ts +0 -51
  107. package/src/utils/attributes/class-list/index.ts +0 -1
  108. package/src/utils/attributes/id/id.spec.ts +0 -54
  109. package/src/utils/attributes/id/id.ts +0 -47
  110. package/src/utils/attributes/id/index.ts +0 -1
  111. package/src/utils/attributes/index.ts +0 -3
  112. package/src/utils/attributes/to-kebab-case/index.ts +0 -1
  113. package/src/utils/attributes/to-kebab-case/to-kebab-case.spec.ts +0 -29
  114. package/src/utils/attributes/to-kebab-case/to-kebab-case.ts +0 -23
  115. package/src/utils/components/__snapshots__/components.spec.ts.snap +0 -313
  116. package/src/utils/components/components.conf.ts +0 -11
  117. package/src/utils/components/components.spec.ts +0 -192
  118. package/src/utils/components/components.ts +0 -152
  119. package/src/utils/components/index.ts +0 -2
  120. package/src/utils/date/date.spec.ts +0 -12
  121. package/src/utils/date/date.ts +0 -20
  122. package/src/utils/date/index.ts +0 -1
  123. package/src/utils/elements/elements.spec.ts +0 -17
  124. package/src/utils/elements/elements.ts +0 -18
  125. package/src/utils/elements/index.ts +0 -1
  126. package/src/utils/index.spec.ts +0 -84
  127. package/src/utils/index.ts +0 -8
  128. package/src/utils/number/index.ts +0 -1
  129. package/src/utils/number/number.spec.ts +0 -14
  130. package/src/utils/number/number.ts +0 -6
  131. package/src/utils/object/index.ts +0 -2
  132. package/src/utils/object/object.conf.ts +0 -4
  133. package/src/utils/object/object.spec.ts +0 -110
  134. package/src/utils/object/object.ts +0 -27
  135. package/src/utils/string/index.ts +0 -1
  136. package/src/utils/string/string.spec.ts +0 -54
  137. package/src/utils/string/string.ts +0 -39
  138. package/src/utils/windows/index.ts +0 -1
  139. package/src/utils/windows/windows.spec.ts +0 -69
  140. package/src/utils/windows/windows.ts +0 -50
  141. package/src/vue/index.spec.ts +0 -8
  142. package/src/vue/index.ts +0 -1
  143. package/src/vue/mg-model/index.ts +0 -1
  144. package/src/vue/mg-model/mg-model.conf.ts +0 -6
  145. package/src/vue/mg-model/mg-model.spec.ts +0 -50
  146. package/src/vue/mg-model/mg-model.ts +0 -55
  147. package/tsconfig.json +0 -17
  148. package/typedoc.json +0 -14
  149. package/vitest.config.mts +0 -13
@@ -0,0 +1,222 @@
1
+ import { JsonDocs } from '@stencil/core/internal';
2
+
3
+ /**
4
+ * Generate Web Types metadata for IntelliJ's IDE
5
+ * @param name - Library name
6
+ * @param version - Library version
7
+ * @param jsonDocs - Stencil JSON doc
8
+ * @param storybookBaseUrl - Storybook Base Url
9
+ * @returns Web Types metadata
10
+ * @example
11
+ * ```ts
12
+ * const webTypesJson = webTypesGenerator('@mgdis/mg-components', '1.0.0', jsonDocs, 'https://storybook.example.com');
13
+ * ```
14
+ */
15
+ declare const webTypesGenerator: (name: string, version: string, jsonDocs: JsonDocs, storybookBaseUrl: string) => {
16
+ $schema: string;
17
+ name: string;
18
+ version: string;
19
+ 'description-markup': string;
20
+ contributions: {
21
+ html: {
22
+ elements: {
23
+ name: string;
24
+ description: string;
25
+ 'doc-url': string | undefined;
26
+ attributes: {
27
+ name: string | undefined;
28
+ description: string;
29
+ 'doc-url': string | undefined;
30
+ value: {
31
+ type: string;
32
+ default: string | undefined;
33
+ required: boolean;
34
+ };
35
+ }[];
36
+ js: {
37
+ properties: {
38
+ name: string;
39
+ description: string;
40
+ 'doc-url': string | undefined;
41
+ value: {
42
+ type: string;
43
+ default: string | undefined;
44
+ required: boolean;
45
+ };
46
+ }[];
47
+ events: {
48
+ name: string;
49
+ description: string;
50
+ }[];
51
+ };
52
+ css: {
53
+ properties: {
54
+ name: string;
55
+ description: string;
56
+ }[];
57
+ };
58
+ }[];
59
+ };
60
+ };
61
+ };
62
+ /**
63
+ * Generate custom HTML datasets for VS Code
64
+ * @param jsonDocs - Stencil JSON doc
65
+ * @param storybookBaseUrl - Storybook Base Url
66
+ * @returns custom HTML datasets
67
+ * @example
68
+ * ```ts
69
+ * const customDataJson = vsCodeGenerator(jsonDocs, 'https://storybook.example.com', 'https://sources.example.com');
70
+ * ```
71
+ */
72
+ declare const vsCodeGenerator: (jsonDocs: JsonDocs, storybookBaseUrl: string, sourceBaseUrl: string) => {
73
+ version: number;
74
+ tags: {
75
+ name: string;
76
+ description: string;
77
+ attributes: {
78
+ name: string | undefined;
79
+ description: string;
80
+ values: unknown[] | undefined;
81
+ references: {
82
+ name: string;
83
+ url: string | undefined;
84
+ }[];
85
+ }[];
86
+ references: {
87
+ name: string;
88
+ url: string | undefined;
89
+ }[];
90
+ }[];
91
+ globalAttributes: never[];
92
+ valueSets: never[];
93
+ };
94
+ /**
95
+ * Generate custom CSS datasets for VS Code
96
+ * @param jsonDocs - Stencil JSON doc
97
+ * @returns custom CSS datasets
98
+ * @example
99
+ * ```ts
100
+ * const customDataJson = vsCodeCssGenerator(jsonDocs);
101
+ * ```
102
+ */
103
+ declare const vsCodeCssGenerator: (jsonDocs: JsonDocs) => {
104
+ version: number;
105
+ properties: {
106
+ name: string;
107
+ description: string;
108
+ }[];
109
+ };
110
+
111
+ /**
112
+ * Generate a Custom Elements Manifest v2 from Stencil JSON docs.
113
+ * @param jsonDocs - Stencil JSON doc
114
+ * @returns CEM v2
115
+ * @example
116
+ * ```ts
117
+ * const cem = cemGenerator(jsonDocs);
118
+ * ```
119
+ */
120
+ declare const cemGenerator: (jsonDocs: JsonDocs) => {
121
+ schemaVersion: string;
122
+ readme: string;
123
+ modules: {
124
+ kind: "javascript-module";
125
+ path: string;
126
+ declarations: {
127
+ kind: "class";
128
+ name: string;
129
+ tagName: string;
130
+ customElement: boolean;
131
+ description: string;
132
+ attributes: {
133
+ fieldName: string;
134
+ default?: string | undefined;
135
+ name: string | undefined;
136
+ description: string;
137
+ type: {
138
+ text: string;
139
+ };
140
+ }[];
141
+ members: ({
142
+ attribute?: string | undefined;
143
+ default?: string | undefined;
144
+ kind: "field";
145
+ name: string;
146
+ description: string;
147
+ type: {
148
+ text: string;
149
+ };
150
+ } | {
151
+ kind: "method";
152
+ name: string;
153
+ description: string;
154
+ })[];
155
+ events: {
156
+ name: string;
157
+ description: string;
158
+ type: {
159
+ text: string;
160
+ };
161
+ }[];
162
+ slots: {
163
+ name: string;
164
+ description: string;
165
+ }[];
166
+ cssProperties: {
167
+ name: string;
168
+ description: string;
169
+ }[];
170
+ cssParts: {
171
+ name: string;
172
+ description: string;
173
+ }[];
174
+ }[];
175
+ exports: {
176
+ kind: "custom-element-definition";
177
+ name: string;
178
+ declaration: {
179
+ name: string;
180
+ module: string;
181
+ };
182
+ }[];
183
+ }[];
184
+ };
185
+
186
+ /**
187
+ * Per the HTML spec, a boolean attribute is `true` whenever it is present on the
188
+ * element, regardless of its value (including `="false"`). Stencil's default Prop
189
+ * parser converts the string `"false"` to the boolean `false`, which breaks this
190
+ * contract for consumers writing markup. Call this helper from `componentWillLoad`
191
+ * to re-normalize every present attribute that maps to a boolean-typed Prop.
192
+ *
193
+ * Iterates the host element's attributes and, for each one whose camelCase name
194
+ * matches a `typeof === 'boolean'` Prop on the instance, rewrites the attribute
195
+ * to `''` — Stencil's parser then turns that into `true` via the standard
196
+ * attribute → prop pipeline (no need for `mutable: true` on the Prop, since the
197
+ * write goes through Stencil's internal setter, not through user code).
198
+ *
199
+ * Non-boolean Props and non-Prop attributes (`class`, `id`, ...) are skipped
200
+ * naturally by the type check.
201
+ *
202
+ * @param target - the component instance (must expose `element` via `@Element()`)
203
+ *
204
+ * @example
205
+ * ```typescript
206
+ * @Component({ tag: 'my-input' })
207
+ * export class MyInput {
208
+ * @Element() element: HTMLMyInputElement;
209
+ * @Prop() readonly = false;
210
+ * @Prop() disabled = false;
211
+ *
212
+ * componentWillLoad() {
213
+ * normalizeBooleanAttributes(this);
214
+ * }
215
+ * }
216
+ * ```
217
+ */
218
+ declare const normalizeBooleanAttributes: (target: {
219
+ element: HTMLElement;
220
+ }) => void;
221
+
222
+ export { cemGenerator, normalizeBooleanAttributes, vsCodeCssGenerator, vsCodeGenerator, webTypesGenerator };
@@ -0,0 +1,357 @@
1
+ /**
2
+ * Retrieve Component Storybook URL from file path
3
+ * @param storybookBaseUrl - Storybook Base URL
4
+ * @param filePath - Component file path
5
+ * @returns Component Storybook URL
6
+ */
7
+ const getStorybookUrl = (storybookBaseUrl, filePath) => {
8
+ if (!filePath) {
9
+ return;
10
+ }
11
+ const split = filePath.split('/');
12
+ return `${storybookBaseUrl}${split.slice(2, split.length - 1).join('-')}--docs`;
13
+ };
14
+
15
+ /**
16
+ * Retrieve Component source URL from file path
17
+ * @param sourcesBaseUrl - Source base URL
18
+ * @param filePath - Component file path
19
+ * @returns Component source URL
20
+ */
21
+ const getSourcesUrl = (sourcesBaseUrl, filePath) => {
22
+ if (!filePath) {
23
+ return;
24
+ }
25
+ return `${sourcesBaseUrl}${filePath}`;
26
+ };
27
+ /**
28
+ * Get Component element description.
29
+ *
30
+ * Neither WebStorm nor VS Code render the structured `attributes` /
31
+ * `js.properties` arrays in the tag-level quick-doc — they only show this
32
+ * markdown description. So the attribute and property listings have to live
33
+ * here, even though they're redundant with the structured arrays used by the
34
+ * inline autocomplete.
35
+ * @param component - Component
36
+ * @returns Component element description
37
+ */
38
+ const getElementDescription = (component) => {
39
+ let description = component.overview ? `${component.overview}\n\n` : '';
40
+ const attributes = component.props.filter(({ attr }) => attr !== undefined);
41
+ if (attributes.length) {
42
+ description += `Attributes:\n`;
43
+ description += attributes.map(({ attr, docs }) => `- \`${attr}\`: ${docs}\n`).join('');
44
+ description += '\n';
45
+ }
46
+ const properties = component.props.filter(({ attr }) => attr === undefined);
47
+ if (properties.length) {
48
+ description += `Properties:\n`;
49
+ description += properties.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
50
+ description += '\n';
51
+ }
52
+ if (component.methods.length) {
53
+ description += `Methods:\n`;
54
+ description += component.methods.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
55
+ description += '\n';
56
+ }
57
+ if (component.events.length) {
58
+ description += `Events:\n`;
59
+ description += component.events.map(({ event, docs }) => `- \`${event}\`: ${docs}\n`).join('');
60
+ description += '\n';
61
+ }
62
+ if (component.listeners.length) {
63
+ description += `Listeners:\n`;
64
+ description += component.listeners.map(({ event }) => `- \`${event}\`\n`).join('');
65
+ description += '\n';
66
+ }
67
+ if (component.slots.length) {
68
+ description += `Slots:\n`;
69
+ description += component.slots
70
+ .map(({ name, docs }) => {
71
+ const label = name ? `\`${name}\`` : 'default';
72
+ return `- ${label}: ${docs}\n`;
73
+ })
74
+ .join('');
75
+ description += '\n';
76
+ }
77
+ return description;
78
+ };
79
+ /**
80
+ * Get Props Description
81
+ * @param prop - Component Property
82
+ * @returns Props Description
83
+ */
84
+ const getAttributeDescription = (prop) => {
85
+ return `${prop.docs}\n\nType: \`${prop.type}\``;
86
+ };
87
+ /**
88
+ * Generate Web Types metadata for IntelliJ's IDE
89
+ * @param name - Library name
90
+ * @param version - Library version
91
+ * @param jsonDocs - Stencil JSON doc
92
+ * @param storybookBaseUrl - Storybook Base Url
93
+ * @returns Web Types metadata
94
+ * @example
95
+ * ```ts
96
+ * const webTypesJson = webTypesGenerator('@mgdis/mg-components', '1.0.0', jsonDocs, 'https://storybook.example.com');
97
+ * ```
98
+ */
99
+ const webTypesGenerator = (name, version, jsonDocs, storybookBaseUrl) => ({
100
+ $schema: 'https://json.schemastore.org/web-types',
101
+ name,
102
+ version,
103
+ 'description-markup': 'markdown',
104
+ contributions: {
105
+ html: {
106
+ elements: jsonDocs.components.map((component) => {
107
+ const docUrl = getStorybookUrl(storybookBaseUrl, component.filePath);
108
+ return {
109
+ name: component.tag,
110
+ description: getElementDescription(component),
111
+ 'doc-url': docUrl,
112
+ attributes: component.props
113
+ .filter((prop) => prop.attr)
114
+ .map((prop) => ({
115
+ name: prop.attr,
116
+ description: getAttributeDescription(prop),
117
+ 'doc-url': docUrl,
118
+ value: {
119
+ type: prop.type,
120
+ default: prop.default,
121
+ required: prop.required,
122
+ },
123
+ })),
124
+ js: {
125
+ properties: component.props
126
+ .filter((prop) => prop.attr === undefined)
127
+ .map((prop) => ({
128
+ name: prop.name,
129
+ description: getAttributeDescription(prop),
130
+ 'doc-url': docUrl,
131
+ value: {
132
+ type: prop.type,
133
+ default: prop.default,
134
+ required: prop.required,
135
+ },
136
+ })),
137
+ events: component.events.map((event) => ({
138
+ name: event.event,
139
+ description: event.docs,
140
+ })),
141
+ },
142
+ css: {
143
+ properties: component.styles.map((style) => ({
144
+ name: style.name,
145
+ description: style.docs,
146
+ })),
147
+ },
148
+ };
149
+ }),
150
+ },
151
+ },
152
+ });
153
+ /**
154
+ * Create Storybook Reference
155
+ * @param storybookBaseUrl - Storybook Base Url
156
+ * @param filePath - Component file path
157
+ * @returns Storybook Reference
158
+ */
159
+ const getReferences = (storybookBaseUrl, sourceBaseUrl, filePath) => {
160
+ return [
161
+ { name: 'Storybook', url: getStorybookUrl(storybookBaseUrl, filePath) },
162
+ { name: 'Sources', url: getSourcesUrl(sourceBaseUrl, filePath) },
163
+ ];
164
+ };
165
+ /**
166
+ * Get Property possible values
167
+ * @param prop - Component Property
168
+ * @returns Property possible values
169
+ */
170
+ const getValues = (prop) => {
171
+ // Only values Array where all objects have a value seems to be usefull
172
+ if (prop.values.some(({ value }) => value === undefined)) {
173
+ return;
174
+ }
175
+ return prop.values.map(({ value }) => ({ name: value }));
176
+ };
177
+ /**
178
+ * Generate custom HTML datasets for VS Code
179
+ * @param jsonDocs - Stencil JSON doc
180
+ * @param storybookBaseUrl - Storybook Base Url
181
+ * @returns custom HTML datasets
182
+ * @example
183
+ * ```ts
184
+ * const customDataJson = vsCodeGenerator(jsonDocs, 'https://storybook.example.com', 'https://sources.example.com');
185
+ * ```
186
+ */
187
+ const vsCodeGenerator = (jsonDocs, storybookBaseUrl, sourceBaseUrl) => ({
188
+ version: 1.1,
189
+ tags: jsonDocs.components.map((component) => {
190
+ const references = getReferences(storybookBaseUrl, sourceBaseUrl, component.filePath);
191
+ return {
192
+ name: component.tag,
193
+ description: getElementDescription(component),
194
+ attributes: component.props
195
+ .filter((prop) => prop.attr !== undefined)
196
+ .map((prop) => ({
197
+ name: prop.attr,
198
+ description: getAttributeDescription(prop),
199
+ values: getValues(prop),
200
+ references,
201
+ })),
202
+ references,
203
+ };
204
+ }),
205
+ globalAttributes: [],
206
+ valueSets: [],
207
+ });
208
+ /**
209
+ * Generate custom CSS datasets for VS Code
210
+ * @param jsonDocs - Stencil JSON doc
211
+ * @returns custom CSS datasets
212
+ * @example
213
+ * ```ts
214
+ * const customDataJson = vsCodeCssGenerator(jsonDocs);
215
+ * ```
216
+ */
217
+ const vsCodeCssGenerator = (jsonDocs) => ({
218
+ version: 1.1,
219
+ properties: jsonDocs.components.flatMap((component) => component.styles.map((style) => ({
220
+ name: style.name,
221
+ description: style.docs,
222
+ }))),
223
+ });
224
+
225
+ /**
226
+ * Convert a Stencil component's JsonDocs into a CEM v2 module entry.
227
+ * @param component - Stencil component doc
228
+ * @returns CEM module
229
+ */
230
+ const componentToModule = (component) => {
231
+ const className = component.tag
232
+ .split('-')
233
+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))
234
+ .join('');
235
+ const attributes = component.props
236
+ .filter((prop) => prop.attr !== undefined)
237
+ .map((prop) => ({
238
+ name: prop.attr,
239
+ description: prop.docs,
240
+ type: { text: prop.type },
241
+ ...(prop.default !== undefined && { default: prop.default }),
242
+ fieldName: prop.name,
243
+ }));
244
+ const fieldMembers = component.props.map((prop) => ({
245
+ kind: 'field',
246
+ name: prop.name,
247
+ description: prop.docs,
248
+ type: { text: prop.type },
249
+ ...(prop.default !== undefined && { default: prop.default }),
250
+ ...(prop.attr !== undefined && { attribute: prop.attr }),
251
+ }));
252
+ const methodMembers = component.methods.map((method) => ({
253
+ kind: 'method',
254
+ name: method.name,
255
+ description: method.docs,
256
+ }));
257
+ return {
258
+ kind: 'javascript-module',
259
+ path: component.filePath ?? '',
260
+ declarations: [
261
+ {
262
+ kind: 'class',
263
+ name: className,
264
+ tagName: component.tag,
265
+ customElement: true,
266
+ description: component.overview ?? '',
267
+ attributes,
268
+ members: [...fieldMembers, ...methodMembers],
269
+ events: component.events.map((event) => ({
270
+ name: event.event,
271
+ description: event.docs,
272
+ type: { text: `CustomEvent<${event.detail}>` },
273
+ })),
274
+ slots: component.slots.map((slot) => ({
275
+ name: slot.name,
276
+ description: slot.docs,
277
+ })),
278
+ cssProperties: component.styles.map((style) => ({
279
+ name: style.name,
280
+ description: style.docs,
281
+ })),
282
+ cssParts: component.parts.map((part) => ({
283
+ name: part.name,
284
+ description: part.docs,
285
+ })),
286
+ },
287
+ ],
288
+ exports: [
289
+ {
290
+ kind: 'custom-element-definition',
291
+ name: component.tag,
292
+ declaration: {
293
+ name: className,
294
+ module: component.filePath ?? '',
295
+ },
296
+ },
297
+ ],
298
+ };
299
+ };
300
+ /**
301
+ * Generate a Custom Elements Manifest v2 from Stencil JSON docs.
302
+ * @param jsonDocs - Stencil JSON doc
303
+ * @returns CEM v2
304
+ * @example
305
+ * ```ts
306
+ * const cem = cemGenerator(jsonDocs);
307
+ * ```
308
+ */
309
+ const cemGenerator = (jsonDocs) => ({
310
+ schemaVersion: '2.0.0',
311
+ readme: '',
312
+ modules: jsonDocs.components.map(componentToModule),
313
+ });
314
+
315
+ /**
316
+ * Per the HTML spec, a boolean attribute is `true` whenever it is present on the
317
+ * element, regardless of its value (including `="false"`). Stencil's default Prop
318
+ * parser converts the string `"false"` to the boolean `false`, which breaks this
319
+ * contract for consumers writing markup. Call this helper from `componentWillLoad`
320
+ * to re-normalize every present attribute that maps to a boolean-typed Prop.
321
+ *
322
+ * Iterates the host element's attributes and, for each one whose camelCase name
323
+ * matches a `typeof === 'boolean'` Prop on the instance, rewrites the attribute
324
+ * to `''` — Stencil's parser then turns that into `true` via the standard
325
+ * attribute → prop pipeline (no need for `mutable: true` on the Prop, since the
326
+ * write goes through Stencil's internal setter, not through user code).
327
+ *
328
+ * Non-boolean Props and non-Prop attributes (`class`, `id`, ...) are skipped
329
+ * naturally by the type check.
330
+ *
331
+ * @param target - the component instance (must expose `element` via `@Element()`)
332
+ *
333
+ * @example
334
+ * ```typescript
335
+ * @Component({ tag: 'my-input' })
336
+ * export class MyInput {
337
+ * @Element() element: HTMLMyInputElement;
338
+ * @Prop() readonly = false;
339
+ * @Prop() disabled = false;
340
+ *
341
+ * componentWillLoad() {
342
+ * normalizeBooleanAttributes(this);
343
+ * }
344
+ * }
345
+ * ```
346
+ */
347
+ const normalizeBooleanAttributes = (target) => {
348
+ for (const attr of Array.from(target.element.attributes)) {
349
+ const propName = attr.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
350
+ if (typeof target[propName] === 'boolean') {
351
+ target.element.setAttribute(attr.name, '');
352
+ }
353
+ }
354
+ };
355
+
356
+ export { cemGenerator, normalizeBooleanAttributes, vsCodeCssGenerator, vsCodeGenerator, webTypesGenerator };
357
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/storybook/stencil/stencil.ts","../../src/stencil/ide/ide.ts","../../src/stencil/ide/cem.ts","../../src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.ts"],"sourcesContent":[null,null,null,null],"names":[],"mappings":"AA6JA;;;;;AAKG;AACI,MAAM,eAAe,GAAG,CAAC,gBAAwB,EAAE,QAA4B,KAAwB;IAC5G,IAAI,CAAC,QAAQ,EAAE;QACb;IACF;IACA,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;IACjC,OAAO,CAAA,EAAG,gBAAgB,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA,MAAA,CAAQ;AACjF,CAAC;;ACtKD;;;;;AAKG;AACH,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAE,QAA4B,KAAwB;IACjG,IAAI,CAAC,QAAQ,EAAE;QACb;IACF;AACA,IAAA,OAAO,CAAA,EAAG,cAAc,CAAA,EAAG,QAAQ,EAAE;AACvC,CAAC;AAED;;;;;;;;;;AAUG;AACH,MAAM,qBAAqB,GAAG,CAAC,SAA4B,KAAY;AACrE,IAAA,IAAI,WAAW,GAAG,SAAS,CAAC,QAAQ,GAAG,CAAA,EAAG,SAAS,CAAC,QAAQ,CAAA,IAAA,CAAM,GAAG,EAAE;AACvE,IAAA,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,KAAK,SAAS,CAAC;AAC3E,IAAA,IAAI,UAAU,CAAC,MAAM,EAAE;QACrB,WAAW,IAAI,eAAe;QAC9B,WAAW,IAAI,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,I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