@stencil/core 5.0.0-rc.6 → 5.0.0-rc.7
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/dist/compiler/browser.js
CHANGED
|
@@ -1845,7 +1845,7 @@ const validateComponentTag = (tag) => {
|
|
|
1845
1845
|
};
|
|
1846
1846
|
//#endregion
|
|
1847
1847
|
//#region src/version.ts
|
|
1848
|
-
const version = "5.0.0-rc.
|
|
1848
|
+
const version = "5.0.0-rc.7";
|
|
1849
1849
|
//#endregion
|
|
1850
1850
|
//#region src/compiler/events.ts
|
|
1851
1851
|
const buildEvents = () => {
|
|
@@ -3888,6 +3888,24 @@ const validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
3888
3888
|
*/
|
|
3889
3889
|
const isJsDocComment = (commentText) => commentText.startsWith("*") || commentText.startsWith("!");
|
|
3890
3890
|
/**
|
|
3891
|
+
* An explicit `@prop` annotation tag in a CSS docstring. `@cssprop`/`@cssproperty` are also
|
|
3892
|
+
* recognized as synonyms (the more common names in other web-component-analyzer/docgen
|
|
3893
|
+
* ecosystems).
|
|
3894
|
+
*/
|
|
3895
|
+
const CSS_PROP_ANNOTATION_RE = /@(?:cssproperty|cssprop|prop)\b/;
|
|
3896
|
+
/**
|
|
3897
|
+
* An annotation tag that documents something by name (`@prop --x`, `@slot name`, ...) rather
|
|
3898
|
+
* than describing the node below its comment.
|
|
3899
|
+
*/
|
|
3900
|
+
const CSS_ANNOTATION_TAG_RE = /@(?:component|cssproperty|cssprop|prop|attr|slot)\b/;
|
|
3901
|
+
/**
|
|
3902
|
+
* Whether a comment describes the node immediately following it (a declaration, rule or
|
|
3903
|
+
* at-rule). A comment holding annotation tags documents the things it names instead.
|
|
3904
|
+
* @param commentText a postcss `Comment` node's `.text`
|
|
3905
|
+
* @returns `true` if the comment is a JSDoc-style description of the next node
|
|
3906
|
+
*/
|
|
3907
|
+
const isNodeDocComment = (commentText) => isJsDocComment(commentText) && !CSS_ANNOTATION_TAG_RE.test(commentText);
|
|
3908
|
+
/**
|
|
3891
3909
|
* Strip the leading `*`/`!` marker and per-line `*` prefixes, returning trimmed lines.
|
|
3892
3910
|
* @param commentText a postcss `Comment` node's `.text`
|
|
3893
3911
|
* @returns the comment's lines, delimiters and leading `*`s stripped
|
|
@@ -4001,7 +4019,7 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
4001
4019
|
const child = children[i];
|
|
4002
4020
|
if (child.type !== "decl" || !child.prop.startsWith("--") || hasName(child.prop)) continue;
|
|
4003
4021
|
const prev = children[i - 1];
|
|
4004
|
-
if (!prev || prev.type !== "comment" || !
|
|
4022
|
+
if (!prev || prev.type !== "comment" || !isNodeDocComment(prev.text)) continue;
|
|
4005
4023
|
styleDocs.push({
|
|
4006
4024
|
name: child.prop,
|
|
4007
4025
|
docs: normalizeJsDocText(prev.text),
|
|
@@ -4015,7 +4033,7 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
4015
4033
|
if (!propName.startsWith("--")) return;
|
|
4016
4034
|
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
4017
4035
|
const prev = node.prev();
|
|
4018
|
-
const docs = prev && prev.type === "comment" &&
|
|
4036
|
+
const docs = prev && prev.type === "comment" && isNodeDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
4019
4037
|
const existing = styleDocs.find((styleDoc) => styleDoc.name === propName);
|
|
4020
4038
|
if (existing) {
|
|
4021
4039
|
existing.docs ||= docs;
|
|
@@ -4068,12 +4086,6 @@ const CSS_DOC_START = /\/\*(\*|!)/;
|
|
|
4068
4086
|
* Closing syntax for a CSS docstring
|
|
4069
4087
|
*/
|
|
4070
4088
|
const CSS_DOC_END = "*/";
|
|
4071
|
-
/**
|
|
4072
|
-
* The `@prop` annotation we support within CSS docstrings. `@cssprop`/`@cssproperty` are also
|
|
4073
|
-
* recognized as synonyms (the more common names in other web-component-analyzer/docgen
|
|
4074
|
-
* ecosystems).
|
|
4075
|
-
*/
|
|
4076
|
-
const CSS_PROP_ANNOTATION_RE = /@(?:cssproperty|cssprop|prop)\b/;
|
|
4077
4089
|
//#endregion
|
|
4078
4090
|
//#region src/compiler/sys/browser-stubs/browserslist.ts
|
|
4079
4091
|
const browserslist = (_query) => [];
|
package/dist/compiler/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-
|
|
1
|
+
import { A as version, C as hasStencilHydrateImport, D as parseCssOnlyComponents, E as replaceStencilHydrateImport, M as scopeCss, O as buildId, S as hasStencilGlobalsImport, T as replaceStencilGlobalsImport, _ as cmpMetaToDocsComponent, a as createPrerenderer, b as buildHydrateCss, c as createWorkerContext, d as nodeRequire, f as optimizeCss, g as generateManifest, h as generateComponentTypesFile, i as createSystem, j as versions, k as vermoji, l as createWorkerMessageHandler, m as validateHydrated, n as transpile, o as loadConfig, p as validateConfig, r as transpileSync, s as createCompiler, t as ts, u as optimizeJs, v as getScopeId, w as replaceStencilCssComponentsImport, x as hasStencilCssComponentsImport, y as foldBuildFlags } from "../compiler-CH-Qh_aM.mjs";
|
|
2
2
|
import { a as LOG_LEVELS, i as CustomElementsExportBehaviorOptions } from "../node-Bsfi3pOs.mjs";
|
|
3
3
|
export { CustomElementsExportBehaviorOptions, LOG_LEVELS, buildHydrateCss, buildId, cmpMetaToDocsComponent, createCompiler, createPrerenderer, createSystem, createWorkerContext, createWorkerMessageHandler, foldBuildFlags, generateComponentTypesFile, generateManifest, getScopeId, hasStencilCssComponentsImport, hasStencilGlobalsImport, hasStencilHydrateImport, loadConfig, nodeRequire, optimizeCss, optimizeJs, parseCssOnlyComponents, replaceStencilCssComponentsImport, replaceStencilGlobalsImport, replaceStencilHydrateImport, scopeCss, transpile, transpileSync, ts, validateConfig, validateHydrated, vermoji, version, versions };
|
|
@@ -461,9 +461,9 @@ const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
|
|
461
461
|
};
|
|
462
462
|
//#endregion
|
|
463
463
|
//#region src/version.ts
|
|
464
|
-
const version = "5.0.0-rc.
|
|
465
|
-
const buildId = "
|
|
466
|
-
const vermoji = "
|
|
464
|
+
const version = "5.0.0-rc.7";
|
|
465
|
+
const buildId = "1795178487";
|
|
466
|
+
const vermoji = "⛳️";
|
|
467
467
|
/**
|
|
468
468
|
* Get the installed version of a tool/dependency.
|
|
469
469
|
* Handles packages with exports maps that point to subdirectories.
|
|
@@ -1527,6 +1527,24 @@ const propertyToStyleDoc = (prop) => ({
|
|
|
1527
1527
|
*/
|
|
1528
1528
|
const isJsDocComment = (commentText) => commentText.startsWith("*") || commentText.startsWith("!");
|
|
1529
1529
|
/**
|
|
1530
|
+
* An explicit `@prop` annotation tag in a CSS docstring. `@cssprop`/`@cssproperty` are also
|
|
1531
|
+
* recognized as synonyms (the more common names in other web-component-analyzer/docgen
|
|
1532
|
+
* ecosystems).
|
|
1533
|
+
*/
|
|
1534
|
+
const CSS_PROP_ANNOTATION_RE = /@(?:cssproperty|cssprop|prop)\b/;
|
|
1535
|
+
/**
|
|
1536
|
+
* An annotation tag that documents something by name (`@prop --x`, `@slot name`, ...) rather
|
|
1537
|
+
* than describing the node below its comment.
|
|
1538
|
+
*/
|
|
1539
|
+
const CSS_ANNOTATION_TAG_RE = /@(?:component|cssproperty|cssprop|prop|attr|slot)\b/;
|
|
1540
|
+
/**
|
|
1541
|
+
* Whether a comment describes the node immediately following it (a declaration, rule or
|
|
1542
|
+
* at-rule). A comment holding annotation tags documents the things it names instead.
|
|
1543
|
+
* @param commentText a postcss `Comment` node's `.text`
|
|
1544
|
+
* @returns `true` if the comment is a JSDoc-style description of the next node
|
|
1545
|
+
*/
|
|
1546
|
+
const isNodeDocComment = (commentText) => isJsDocComment(commentText) && !CSS_ANNOTATION_TAG_RE.test(commentText);
|
|
1547
|
+
/**
|
|
1530
1548
|
* Strip the leading `*`/`!` marker and per-line `*` prefixes, returning trimmed lines.
|
|
1531
1549
|
* @param commentText a postcss `Comment` node's `.text`
|
|
1532
1550
|
* @returns the comment's lines, delimiters and leading `*`s stripped
|
|
@@ -1706,7 +1724,7 @@ const parseCssComponentFile = async (filePath, cssText) => {
|
|
|
1706
1724
|
if (!propName.startsWith("--")) continue;
|
|
1707
1725
|
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
1708
1726
|
const prev = nodes[i - 1];
|
|
1709
|
-
const docs = prev && prev.type === "comment" &&
|
|
1727
|
+
const docs = prev && prev.type === "comment" && isNodeDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
1710
1728
|
for (const def of defs.values()) {
|
|
1711
1729
|
const existing = def.properties.find((p) => p.name === propName);
|
|
1712
1730
|
if (existing) {
|
|
@@ -1751,7 +1769,7 @@ const collectAutoDetectedSlots = (container, def) => {
|
|
|
1751
1769
|
for (const name of names) {
|
|
1752
1770
|
if (def.slots.some((s) => s.name === name)) continue;
|
|
1753
1771
|
const prev = nested.prev();
|
|
1754
|
-
const docs = prev && prev.type === "comment" &&
|
|
1772
|
+
const docs = prev && prev.type === "comment" && isNodeDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
1755
1773
|
def.slots.push({
|
|
1756
1774
|
name,
|
|
1757
1775
|
docs,
|
|
@@ -1857,7 +1875,7 @@ const collectAutoDetectedAttributes = (selector, def) => {
|
|
|
1857
1875
|
const collectAttributeRuleDocs = (container, defFor, out) => {
|
|
1858
1876
|
for (const node of container.nodes) {
|
|
1859
1877
|
const prev = node.prev();
|
|
1860
|
-
if (node.type !== "rule" || prev?.type !== "comment" || !
|
|
1878
|
+
if (node.type !== "rule" || prev?.type !== "comment" || !isNodeDocComment(prev.text)) continue;
|
|
1861
1879
|
let selectors;
|
|
1862
1880
|
try {
|
|
1863
1881
|
selectors = parseSelectorList(node.selector);
|
|
@@ -1887,7 +1905,7 @@ const collectAutoDetectedCustomProperties = (container, def) => {
|
|
|
1887
1905
|
if (child.type !== "decl" || !child.prop.startsWith("--")) continue;
|
|
1888
1906
|
if (def.properties.some((p) => p.name === child.prop)) continue;
|
|
1889
1907
|
const prev = children[i - 1];
|
|
1890
|
-
if (!prev || prev.type !== "comment" || !
|
|
1908
|
+
if (!prev || prev.type !== "comment" || !isNodeDocComment(prev.text)) continue;
|
|
1891
1909
|
def.properties.push({
|
|
1892
1910
|
name: child.prop,
|
|
1893
1911
|
docs: normalizeJsDocText(prev.text),
|
|
@@ -25410,7 +25428,7 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
25410
25428
|
const child = children[i];
|
|
25411
25429
|
if (child.type !== "decl" || !child.prop.startsWith("--") || hasName(child.prop)) continue;
|
|
25412
25430
|
const prev = children[i - 1];
|
|
25413
|
-
if (!prev || prev.type !== "comment" || !
|
|
25431
|
+
if (!prev || prev.type !== "comment" || !isNodeDocComment(prev.text)) continue;
|
|
25414
25432
|
styleDocs.push({
|
|
25415
25433
|
name: child.prop,
|
|
25416
25434
|
docs: normalizeJsDocText(prev.text),
|
|
@@ -25424,7 +25442,7 @@ function parseScopedAndNativeStyleDocs(styleDocs, styleText, mode, tag, encapsul
|
|
|
25424
25442
|
if (!propName.startsWith("--")) return;
|
|
25425
25443
|
const { syntax, initialValue } = parsePropertyAtRuleDescriptors(node);
|
|
25426
25444
|
const prev = node.prev();
|
|
25427
|
-
const docs = prev && prev.type === "comment" &&
|
|
25445
|
+
const docs = prev && prev.type === "comment" && isNodeDocComment(prev.text) ? normalizeJsDocText(prev.text) : "";
|
|
25428
25446
|
const existing = styleDocs.find((styleDoc) => styleDoc.name === propName);
|
|
25429
25447
|
if (existing) {
|
|
25430
25448
|
existing.docs ||= docs;
|
|
@@ -25477,12 +25495,6 @@ const CSS_DOC_START = /\/\*(\*|!)/;
|
|
|
25477
25495
|
* Closing syntax for a CSS docstring
|
|
25478
25496
|
*/
|
|
25479
25497
|
const CSS_DOC_END = "*/";
|
|
25480
|
-
/**
|
|
25481
|
-
* The `@prop` annotation we support within CSS docstrings. `@cssprop`/`@cssproperty` are also
|
|
25482
|
-
* recognized as synonyms (the more common names in other web-component-analyzer/docgen
|
|
25483
|
-
* ecosystems).
|
|
25484
|
-
*/
|
|
25485
|
-
const CSS_PROP_ANNOTATION_RE = /@(?:cssproperty|cssprop|prop)\b/;
|
|
25486
25498
|
//#endregion
|
|
25487
25499
|
//#region src/compiler/style/css-to-esm.ts
|
|
25488
25500
|
/**
|
package/dist/sys/node/worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as createWorkerMessageHandler } from "../../compiler-
|
|
1
|
+
import { l as createWorkerMessageHandler } from "../../compiler-CH-Qh_aM.mjs";
|
|
2
2
|
import { t as createNodeSys } from "../../node-Bsfi3pOs.mjs";
|
|
3
3
|
//#region src/sys/node/node-worker-thread.ts
|
|
4
4
|
/**
|
package/dist/testing/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.7",
|
|
4
4
|
"description": "A Compiler for Web Components and Progressive Web Apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"components",
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
"terser": "^5.50.0",
|
|
127
127
|
"tinyglobby": "^0.2.17",
|
|
128
128
|
"typescript": ">5.0.0 <7.0.0",
|
|
129
|
-
"@stencil/cli": "5.0.0-rc.
|
|
130
|
-
"@stencil/mock-doc": "5.0.0-rc.
|
|
131
|
-
"@stencil/dev-server": "5.0.0-rc.
|
|
129
|
+
"@stencil/cli": "5.0.0-rc.7",
|
|
130
|
+
"@stencil/mock-doc": "5.0.0-rc.7",
|
|
131
|
+
"@stencil/dev-server": "5.0.0-rc.7"
|
|
132
132
|
},
|
|
133
133
|
"devDependencies": {
|
|
134
134
|
"@ionic/prettier-config": "^4.0.0",
|