@stencil/core 4.21.0 → 4.22.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/cli/index.cjs +1 -1
- package/cli/index.js +1 -1
- package/cli/package.json +1 -1
- package/compiler/lib.es2023.array.d.ts +5 -5
- package/compiler/package.json +1 -1
- package/compiler/stencil.js +3517 -271
- package/dev-server/client/index.js +1 -1
- package/dev-server/client/package.json +1 -1
- package/dev-server/connector.html +2 -2
- package/dev-server/index.js +1 -1
- package/dev-server/package.json +1 -1
- package/dev-server/server-process.js +2 -2
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +8 -2
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +10 -8
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +6 -0
- package/internal/hydrate/runner.js +384 -239
- package/internal/package.json +1 -1
- package/internal/stencil-public-compiler.d.ts +34 -0
- package/internal/stencil-public-runtime.d.ts +4 -0
- package/internal/testing/index.js +7 -1
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +27 -1
- package/mock-doc/index.d.ts +8 -0
- package/mock-doc/index.js +27 -1
- package/mock-doc/package.json +1 -1
- package/package.json +2 -2
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/index.js +47 -45
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +2 -2
- package/testing/index.js +39 -1
- package/testing/package.json +1 -1
package/sys/node/package.json
CHANGED
package/sys/node/worker.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Node System Worker v4.
|
|
2
|
+
Stencil Node System Worker v4.22.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
|
-
"use strict";var f=Object.create;var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(n,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of E(t))!R.call(n,e)&&e!==r&&d(n,e,{get:()=>t[e],enumerable:!(s=p(t,e))||s.enumerable});return n};var c=(n,t,r)=>(r=n!=null?f(y(n)):{},g(t||!n||!n.__esModule?d(r,"default",{value:n,enumerable:!0}):r,n));var l=c(require("../../compiler/stencil.js")),m=c(require("
|
|
4
|
+
"use strict";var f=Object.create;var d=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var g=(n,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of E(t))!R.call(n,e)&&e!==r&&d(n,e,{get:()=>t[e],enumerable:!(s=p(t,e))||s.enumerable});return n};var c=(n,t,r)=>(r=n!=null?f(y(n)):{},g(t||!n||!n.__esModule?d(r,"default",{value:n,enumerable:!0}):r,n));var l=c(require("../../compiler/stencil.js")),m=c(require("../../sys/node/index.js"));var a=(n,t)=>{let r=e=>{e&&e.code==="ERR_IPC_CHANNEL_CLOSED"&&n.exit(0)},s=(e,o)=>{let i={stencilId:e,stencilRtnValue:null,stencilRtnError:"Error"};typeof o=="string"?i.stencilRtnError+=": "+o:o&&(o.stack?i.stencilRtnError+=": "+o.stack:o.message&&(i.stencilRtnError+=":"+o.message)),n.send(i,r)};n.on("message",async e=>{if(e&&typeof e.stencilId=="number")try{let o={stencilId:e.stencilId,stencilRtnValue:await t(e),stencilRtnError:null};n.send(o,r)}catch(o){s(e.stencilId,o)}}),n.on("unhandledRejection",e=>{s(-1,e)})};var k=m.createNodeSys({process}),M=l.createWorkerMessageHandler(k);a(process,M);
|
package/testing/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Stencil Testing v4.
|
|
2
|
+
Stencil Testing v4.22.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
@@ -5893,6 +5893,10 @@ var DEFAULT_HASHED_FILENAME_LENGTH = 8;
|
|
|
5893
5893
|
var MIN_HASHED_FILENAME_LENGTH = 4;
|
|
5894
5894
|
var MAX_HASHED_FILENAME_LENGTH = 32;
|
|
5895
5895
|
var DEFAULT_NAMESPACE = "App";
|
|
5896
|
+
var DEFAULT_TARGET_COMPONENT_STYLES = {
|
|
5897
|
+
background: "#f9f",
|
|
5898
|
+
textColor: "#333"
|
|
5899
|
+
};
|
|
5896
5900
|
|
|
5897
5901
|
// src/compiler/config/outputs/validate-collection.ts
|
|
5898
5902
|
var validateCollection = (config, userOutputs) => {
|
|
@@ -6623,6 +6627,39 @@ var validateDevServer = (config, diagnostics) => {
|
|
|
6623
6627
|
return devServer;
|
|
6624
6628
|
};
|
|
6625
6629
|
|
|
6630
|
+
// src/compiler/docs/readme/docs-util.ts
|
|
6631
|
+
var isHexColor = (str) => {
|
|
6632
|
+
const hexColorRegex = /^#([0-9A-Fa-f]{3}){1,2}$/;
|
|
6633
|
+
return hexColorRegex.test(str);
|
|
6634
|
+
};
|
|
6635
|
+
|
|
6636
|
+
// src/compiler/config/validate-docs.ts
|
|
6637
|
+
var validateDocs2 = (config, logger) => {
|
|
6638
|
+
var _a, _b, _c;
|
|
6639
|
+
const { background: defaultBackground, textColor: defaultTextColor } = DEFAULT_TARGET_COMPONENT_STYLES;
|
|
6640
|
+
let { background = defaultBackground, textColor = defaultTextColor } = (_c = (_b = (_a = config.docs) == null ? void 0 : _a.markdown) == null ? void 0 : _b.targetComponent) != null ? _c : DEFAULT_TARGET_COMPONENT_STYLES;
|
|
6641
|
+
if (!isHexColor(background)) {
|
|
6642
|
+
logger.warn(
|
|
6643
|
+
`'${background}' is not a valid hex color. The default value for diagram backgrounds ('${defaultBackground}') will be used.`
|
|
6644
|
+
);
|
|
6645
|
+
background = defaultBackground;
|
|
6646
|
+
}
|
|
6647
|
+
if (!isHexColor(textColor)) {
|
|
6648
|
+
logger.warn(
|
|
6649
|
+
`'${textColor}' is not a valid hex color. The default value for diagram text ('${defaultTextColor}') will be used.`
|
|
6650
|
+
);
|
|
6651
|
+
textColor = defaultTextColor;
|
|
6652
|
+
}
|
|
6653
|
+
return {
|
|
6654
|
+
markdown: {
|
|
6655
|
+
targetComponent: {
|
|
6656
|
+
background,
|
|
6657
|
+
textColor
|
|
6658
|
+
}
|
|
6659
|
+
}
|
|
6660
|
+
};
|
|
6661
|
+
};
|
|
6662
|
+
|
|
6626
6663
|
// src/compiler/config/validate-hydrated.ts
|
|
6627
6664
|
var validateHydrated = (config) => {
|
|
6628
6665
|
var _a;
|
|
@@ -7067,6 +7104,7 @@ var validateConfig = (userConfig = {}, bootstrapConfig) => {
|
|
|
7067
7104
|
rollupConfig: validateRollupConfig(config),
|
|
7068
7105
|
sys: (_h = (_g = config.sys) != null ? _g : bootstrapConfig.sys) != null ? _h : (0, import_sys_api_node.createNodeSys)({ logger }),
|
|
7069
7106
|
testing: (_i = config.testing) != null ? _i : {},
|
|
7107
|
+
docs: validateDocs2(config, logger),
|
|
7070
7108
|
transformAliasedImportPaths: isBoolean(userConfig.transformAliasedImportPaths) ? userConfig.transformAliasedImportPaths : true,
|
|
7071
7109
|
validatePrimaryPackageOutputTarget: (_j = userConfig.validatePrimaryPackageOutputTarget) != null ? _j : false,
|
|
7072
7110
|
...validateNamespace(config.namespace, config.fsNamespace, diagnostics),
|