@mgdis/core-ui-helpers 1.1.2 → 1.2.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.
- package/.turbo/turbo-build.log +17 -17
- package/CHANGELOG.md +11 -0
- package/dist/playwright/index.cjs +11 -5
- package/dist/playwright/index.cjs.map +1 -1
- package/dist/playwright/index.d.ts +7 -3
- package/dist/playwright/index.js +11 -5
- package/dist/playwright/index.js.map +1 -1
- package/dist/playwright/index.umd.js +11 -5
- package/dist/playwright/index.umd.js.map +1 -1
- package/dist/stencil/index.cjs +153 -13
- package/dist/stencil/index.cjs.map +1 -1
- package/dist/stencil/index.d.ts +113 -2
- package/dist/stencil/index.js +152 -14
- package/dist/stencil/index.js.map +1 -1
- package/dist/stencil/index.umd.js +153 -13
- package/dist/stencil/index.umd.js.map +1 -1
- package/dist/storybook/index.cjs +1 -1
- package/dist/storybook/index.cjs.map +1 -1
- package/dist/storybook/index.js +1 -1
- package/dist/storybook/index.js.map +1 -1
- package/dist/storybook/index.umd.js +1 -1
- package/dist/storybook/index.umd.js.map +1 -1
- package/json-doc.test.json +13 -2
- package/package.json +11 -11
- package/src/playwright/utils/__snapshots__/utils.spec.ts.snap +3 -3
- package/src/playwright/utils/utils.ts +10 -5
- package/src/stencil/ide/__snapshots__/cem.spec.ts.snap +248 -0
- package/src/stencil/ide/__snapshots__/ide.spec.ts.snap +11 -124
- package/src/stencil/ide/cem.spec.ts +35 -0
- package/src/stencil/ide/cem.ts +96 -0
- package/src/stencil/ide/ide.ts +33 -26
- package/src/stencil/ide/index.ts +1 -0
- package/src/stencil/index.ts +1 -0
- package/src/stencil/normalize-boolean-attributes/index.ts +1 -0
- package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.spec.ts +63 -0
- package/src/stencil/normalize-boolean-attributes/normalize-boolean-attributes.ts +40 -0
- package/src/storybook/stencil/__snapshots__/stencil.spec.ts.snap +1 -1
package/dist/stencil/index.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ declare const vsCodeGenerator: (jsonDocs: JsonDocs, storybookBaseUrl: string, so
|
|
|
75
75
|
name: string;
|
|
76
76
|
description: string;
|
|
77
77
|
attributes: {
|
|
78
|
-
name: string;
|
|
78
|
+
name: string | undefined;
|
|
79
79
|
description: string;
|
|
80
80
|
values: unknown[] | undefined;
|
|
81
81
|
references: {
|
|
@@ -108,4 +108,115 @@ declare const vsCodeCssGenerator: (jsonDocs: JsonDocs) => {
|
|
|
108
108
|
}[];
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
|
|
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 };
|
package/dist/stencil/index.js
CHANGED
|
@@ -25,52 +25,55 @@ const getSourcesUrl = (sourcesBaseUrl, filePath) => {
|
|
|
25
25
|
return `${sourcesBaseUrl}${filePath}`;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
|
-
* Get Component element description
|
|
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.
|
|
29
35
|
* @param component - Component
|
|
30
36
|
* @returns Component element description
|
|
31
37
|
*/
|
|
32
38
|
const getElementDescription = (component) => {
|
|
33
|
-
// Init description
|
|
34
39
|
let description = component.overview ? `${component.overview}\n\n` : '';
|
|
35
|
-
// Attributes
|
|
36
40
|
const attributes = component.props.filter(({ attr }) => attr !== undefined);
|
|
37
41
|
if (attributes.length) {
|
|
38
42
|
description += `Attributes:\n`;
|
|
39
43
|
description += attributes.map(({ attr, docs }) => `- \`${attr}\`: ${docs}\n`).join('');
|
|
40
44
|
description += '\n';
|
|
41
45
|
}
|
|
42
|
-
// Properties
|
|
43
46
|
const properties = component.props.filter(({ attr }) => attr === undefined);
|
|
44
47
|
if (properties.length) {
|
|
45
48
|
description += `Properties:\n`;
|
|
46
49
|
description += properties.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
|
|
47
50
|
description += '\n';
|
|
48
51
|
}
|
|
49
|
-
// Methods
|
|
50
52
|
if (component.methods.length) {
|
|
51
53
|
description += `Methods:\n`;
|
|
52
54
|
description += component.methods.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
|
|
53
55
|
description += '\n';
|
|
54
56
|
}
|
|
55
|
-
// Events
|
|
56
57
|
if (component.events.length) {
|
|
57
58
|
description += `Events:\n`;
|
|
58
59
|
description += component.events.map(({ event, docs }) => `- \`${event}\`: ${docs}\n`).join('');
|
|
59
60
|
description += '\n';
|
|
60
61
|
}
|
|
61
|
-
// Listeners
|
|
62
62
|
if (component.listeners.length) {
|
|
63
63
|
description += `Listeners:\n`;
|
|
64
64
|
description += component.listeners.map(({ event }) => `- \`${event}\`\n`).join('');
|
|
65
65
|
description += '\n';
|
|
66
66
|
}
|
|
67
|
-
// Slots
|
|
68
67
|
if (component.slots.length) {
|
|
69
68
|
description += `Slots:\n`;
|
|
70
|
-
description += component.slots
|
|
69
|
+
description += component.slots
|
|
70
|
+
.map(({ name, docs }) => {
|
|
71
|
+
const label = name ? `\`${name}\`` : 'default';
|
|
72
|
+
return `- ${label}: ${docs}\n`;
|
|
73
|
+
})
|
|
74
|
+
.join('');
|
|
71
75
|
description += '\n';
|
|
72
76
|
}
|
|
73
|
-
// Return
|
|
74
77
|
return description;
|
|
75
78
|
};
|
|
76
79
|
/**
|
|
@@ -119,7 +122,9 @@ const webTypesGenerator = (name, version, jsonDocs, storybookBaseUrl) => ({
|
|
|
119
122
|
},
|
|
120
123
|
})),
|
|
121
124
|
'js': {
|
|
122
|
-
properties: component.props
|
|
125
|
+
properties: component.props
|
|
126
|
+
.filter(prop => prop.attr === undefined)
|
|
127
|
+
.map(prop => ({
|
|
123
128
|
'name': prop.name,
|
|
124
129
|
'description': getAttributeDescription(prop),
|
|
125
130
|
'doc-url': docUrl,
|
|
@@ -186,8 +191,10 @@ const vsCodeGenerator = (jsonDocs, storybookBaseUrl, sourceBaseUrl) => ({
|
|
|
186
191
|
return {
|
|
187
192
|
name: component.tag,
|
|
188
193
|
description: getElementDescription(component),
|
|
189
|
-
attributes: component.props
|
|
190
|
-
|
|
194
|
+
attributes: component.props
|
|
195
|
+
.filter(prop => prop.attr !== undefined)
|
|
196
|
+
.map(prop => ({
|
|
197
|
+
name: prop.attr,
|
|
191
198
|
description: getAttributeDescription(prop),
|
|
192
199
|
values: getValues(prop),
|
|
193
200
|
references,
|
|
@@ -215,5 +222,136 @@ const vsCodeCssGenerator = (jsonDocs) => ({
|
|
|
215
222
|
}))),
|
|
216
223
|
});
|
|
217
224
|
|
|
218
|
-
|
|
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 };
|
|
219
357
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/storybook/stencil/stencil.ts","../../src/stencil/ide/ide.ts"],"sourcesContent":[null,null],"names":[],"mappings":"AAkJA;;;;;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;;AC3JD;;;;;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
|
|
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":"AAkJA;;;;;AAKG;AACI,MAAM,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AAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAS,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;QAClF,IAAI,OAAQ,MAAkC,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;YACtE,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5C;IACF;AACF;;;;"}
|
|
@@ -31,52 +31,55 @@
|
|
|
31
31
|
return `${sourcesBaseUrl}${filePath}`;
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* Get Component element description
|
|
34
|
+
* Get Component element description.
|
|
35
|
+
*
|
|
36
|
+
* Neither WebStorm nor VS Code render the structured `attributes` /
|
|
37
|
+
* `js.properties` arrays in the tag-level quick-doc — they only show this
|
|
38
|
+
* markdown description. So the attribute and property listings have to live
|
|
39
|
+
* here, even though they're redundant with the structured arrays used by the
|
|
40
|
+
* inline autocomplete.
|
|
35
41
|
* @param component - Component
|
|
36
42
|
* @returns Component element description
|
|
37
43
|
*/
|
|
38
44
|
const getElementDescription = (component) => {
|
|
39
|
-
// Init description
|
|
40
45
|
let description = component.overview ? `${component.overview}\n\n` : '';
|
|
41
|
-
// Attributes
|
|
42
46
|
const attributes = component.props.filter(({ attr }) => attr !== undefined);
|
|
43
47
|
if (attributes.length) {
|
|
44
48
|
description += `Attributes:\n`;
|
|
45
49
|
description += attributes.map(({ attr, docs }) => `- \`${attr}\`: ${docs}\n`).join('');
|
|
46
50
|
description += '\n';
|
|
47
51
|
}
|
|
48
|
-
// Properties
|
|
49
52
|
const properties = component.props.filter(({ attr }) => attr === undefined);
|
|
50
53
|
if (properties.length) {
|
|
51
54
|
description += `Properties:\n`;
|
|
52
55
|
description += properties.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
|
|
53
56
|
description += '\n';
|
|
54
57
|
}
|
|
55
|
-
// Methods
|
|
56
58
|
if (component.methods.length) {
|
|
57
59
|
description += `Methods:\n`;
|
|
58
60
|
description += component.methods.map(({ name, docs }) => `- \`${name}\`: ${docs}\n`).join('');
|
|
59
61
|
description += '\n';
|
|
60
62
|
}
|
|
61
|
-
// Events
|
|
62
63
|
if (component.events.length) {
|
|
63
64
|
description += `Events:\n`;
|
|
64
65
|
description += component.events.map(({ event, docs }) => `- \`${event}\`: ${docs}\n`).join('');
|
|
65
66
|
description += '\n';
|
|
66
67
|
}
|
|
67
|
-
// Listeners
|
|
68
68
|
if (component.listeners.length) {
|
|
69
69
|
description += `Listeners:\n`;
|
|
70
70
|
description += component.listeners.map(({ event }) => `- \`${event}\`\n`).join('');
|
|
71
71
|
description += '\n';
|
|
72
72
|
}
|
|
73
|
-
// Slots
|
|
74
73
|
if (component.slots.length) {
|
|
75
74
|
description += `Slots:\n`;
|
|
76
|
-
description += component.slots
|
|
75
|
+
description += component.slots
|
|
76
|
+
.map(({ name, docs }) => {
|
|
77
|
+
const label = name ? `\`${name}\`` : 'default';
|
|
78
|
+
return `- ${label}: ${docs}\n`;
|
|
79
|
+
})
|
|
80
|
+
.join('');
|
|
77
81
|
description += '\n';
|
|
78
82
|
}
|
|
79
|
-
// Return
|
|
80
83
|
return description;
|
|
81
84
|
};
|
|
82
85
|
/**
|
|
@@ -125,7 +128,9 @@
|
|
|
125
128
|
},
|
|
126
129
|
})),
|
|
127
130
|
'js': {
|
|
128
|
-
properties: component.props
|
|
131
|
+
properties: component.props
|
|
132
|
+
.filter(prop => prop.attr === undefined)
|
|
133
|
+
.map(prop => ({
|
|
129
134
|
'name': prop.name,
|
|
130
135
|
'description': getAttributeDescription(prop),
|
|
131
136
|
'doc-url': docUrl,
|
|
@@ -192,8 +197,10 @@
|
|
|
192
197
|
return {
|
|
193
198
|
name: component.tag,
|
|
194
199
|
description: getElementDescription(component),
|
|
195
|
-
attributes: component.props
|
|
196
|
-
|
|
200
|
+
attributes: component.props
|
|
201
|
+
.filter(prop => prop.attr !== undefined)
|
|
202
|
+
.map(prop => ({
|
|
203
|
+
name: prop.attr,
|
|
197
204
|
description: getAttributeDescription(prop),
|
|
198
205
|
values: getValues(prop),
|
|
199
206
|
references,
|
|
@@ -221,6 +228,139 @@
|
|
|
221
228
|
}))),
|
|
222
229
|
});
|
|
223
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Convert a Stencil component's JsonDocs into a CEM v2 module entry.
|
|
233
|
+
* @param component - Stencil component doc
|
|
234
|
+
* @returns CEM module
|
|
235
|
+
*/
|
|
236
|
+
const componentToModule = (component) => {
|
|
237
|
+
const className = component.tag
|
|
238
|
+
.split('-')
|
|
239
|
+
.map(part => part.charAt(0).toUpperCase() + part.slice(1))
|
|
240
|
+
.join('');
|
|
241
|
+
const attributes = component.props
|
|
242
|
+
.filter(prop => prop.attr !== undefined)
|
|
243
|
+
.map(prop => ({
|
|
244
|
+
name: prop.attr,
|
|
245
|
+
description: prop.docs,
|
|
246
|
+
type: { text: prop.type },
|
|
247
|
+
...(prop.default !== undefined && { default: prop.default }),
|
|
248
|
+
fieldName: prop.name,
|
|
249
|
+
}));
|
|
250
|
+
const fieldMembers = component.props.map(prop => ({
|
|
251
|
+
kind: 'field',
|
|
252
|
+
name: prop.name,
|
|
253
|
+
description: prop.docs,
|
|
254
|
+
type: { text: prop.type },
|
|
255
|
+
...(prop.default !== undefined && { default: prop.default }),
|
|
256
|
+
...(prop.attr !== undefined && { attribute: prop.attr }),
|
|
257
|
+
}));
|
|
258
|
+
const methodMembers = component.methods.map(method => ({
|
|
259
|
+
kind: 'method',
|
|
260
|
+
name: method.name,
|
|
261
|
+
description: method.docs,
|
|
262
|
+
}));
|
|
263
|
+
return {
|
|
264
|
+
kind: 'javascript-module',
|
|
265
|
+
path: component.filePath ?? '',
|
|
266
|
+
declarations: [
|
|
267
|
+
{
|
|
268
|
+
kind: 'class',
|
|
269
|
+
name: className,
|
|
270
|
+
tagName: component.tag,
|
|
271
|
+
customElement: true,
|
|
272
|
+
description: component.overview ?? '',
|
|
273
|
+
attributes,
|
|
274
|
+
members: [...fieldMembers, ...methodMembers],
|
|
275
|
+
events: component.events.map(event => ({
|
|
276
|
+
name: event.event,
|
|
277
|
+
description: event.docs,
|
|
278
|
+
type: { text: `CustomEvent<${event.detail}>` },
|
|
279
|
+
})),
|
|
280
|
+
slots: component.slots.map(slot => ({
|
|
281
|
+
name: slot.name,
|
|
282
|
+
description: slot.docs,
|
|
283
|
+
})),
|
|
284
|
+
cssProperties: component.styles.map(style => ({
|
|
285
|
+
name: style.name,
|
|
286
|
+
description: style.docs,
|
|
287
|
+
})),
|
|
288
|
+
cssParts: component.parts.map(part => ({
|
|
289
|
+
name: part.name,
|
|
290
|
+
description: part.docs,
|
|
291
|
+
})),
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
exports: [
|
|
295
|
+
{
|
|
296
|
+
kind: 'custom-element-definition',
|
|
297
|
+
name: component.tag,
|
|
298
|
+
declaration: {
|
|
299
|
+
name: className,
|
|
300
|
+
module: component.filePath ?? '',
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
],
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Generate a Custom Elements Manifest v2 from Stencil JSON docs.
|
|
308
|
+
* @param jsonDocs - Stencil JSON doc
|
|
309
|
+
* @returns CEM v2
|
|
310
|
+
* @example
|
|
311
|
+
* ```ts
|
|
312
|
+
* const cem = cemGenerator(jsonDocs);
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
315
|
+
const cemGenerator = (jsonDocs) => ({
|
|
316
|
+
schemaVersion: '2.0.0',
|
|
317
|
+
readme: '',
|
|
318
|
+
modules: jsonDocs.components.map(componentToModule),
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Per the HTML spec, a boolean attribute is `true` whenever it is present on the
|
|
323
|
+
* element, regardless of its value (including `="false"`). Stencil's default Prop
|
|
324
|
+
* parser converts the string `"false"` to the boolean `false`, which breaks this
|
|
325
|
+
* contract for consumers writing markup. Call this helper from `componentWillLoad`
|
|
326
|
+
* to re-normalize every present attribute that maps to a boolean-typed Prop.
|
|
327
|
+
*
|
|
328
|
+
* Iterates the host element's attributes and, for each one whose camelCase name
|
|
329
|
+
* matches a `typeof === 'boolean'` Prop on the instance, rewrites the attribute
|
|
330
|
+
* to `''` — Stencil's parser then turns that into `true` via the standard
|
|
331
|
+
* attribute → prop pipeline (no need for `mutable: true` on the Prop, since the
|
|
332
|
+
* write goes through Stencil's internal setter, not through user code).
|
|
333
|
+
*
|
|
334
|
+
* Non-boolean Props and non-Prop attributes (`class`, `id`, ...) are skipped
|
|
335
|
+
* naturally by the type check.
|
|
336
|
+
*
|
|
337
|
+
* @param target - the component instance (must expose `element` via `@Element()`)
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* ```typescript
|
|
341
|
+
* @Component({ tag: 'my-input' })
|
|
342
|
+
* export class MyInput {
|
|
343
|
+
* @Element() element: HTMLMyInputElement;
|
|
344
|
+
* @Prop() readonly = false;
|
|
345
|
+
* @Prop() disabled = false;
|
|
346
|
+
*
|
|
347
|
+
* componentWillLoad() {
|
|
348
|
+
* normalizeBooleanAttributes(this);
|
|
349
|
+
* }
|
|
350
|
+
* }
|
|
351
|
+
* ```
|
|
352
|
+
*/
|
|
353
|
+
const normalizeBooleanAttributes = (target) => {
|
|
354
|
+
for (const attr of Array.from(target.element.attributes)) {
|
|
355
|
+
const propName = attr.name.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
356
|
+
if (typeof target[propName] === 'boolean') {
|
|
357
|
+
target.element.setAttribute(attr.name, '');
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
exports.cemGenerator = cemGenerator;
|
|
363
|
+
exports.normalizeBooleanAttributes = normalizeBooleanAttributes;
|
|
224
364
|
exports.vsCodeCssGenerator = vsCodeCssGenerator;
|
|
225
365
|
exports.vsCodeGenerator = vsCodeGenerator;
|
|
226
366
|
exports.webTypesGenerator = webTypesGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.js","sources":["../../src/storybook/stencil/stencil.ts","../../src/stencil/ide/ide.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;IAkJA;;;;;IAKG;IACI,MAAM,eAAe,GAAG,CAAC,gBAAwB,EAAE,QAA4B,KAAwB;QAC5G,IAAI,CAAC,QAAQ,EAAE;YACb;QACF;QACA,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;QACjC,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;IACjF,CAAC;;IC3JD;;;;;IAKG;IACH,MAAM,aAAa,GAAG,CAAC,cAAsB,EAAE,QAA4B,KAAwB;QACjG,IAAI,CAAC,QAAQ,EAAE;YACb;QACF;IACA,IAAA,OAAO,CAAA,EAAG,cAAc,CAAA,EAAG,QAAQ,EAAE;IACvC,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"index.umd.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":";;;;;;IAkJA;;;;;IAKG;IACI,MAAM,eAAe,GAAG,CAAC,gBAAwB,EAAE,QAA4B,KAAwB;QAC5G,IAAI,CAAC,QAAQ,EAAE;YACb;QACF;QACA,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC;QACjC,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;IACjF,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