@stencil/core 4.22.3 → 4.23.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/package.json +1 -1
- package/compiler/stencil.js +1610 -30
- 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 +1213 -1019
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +1213 -1019
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +41 -35
- package/internal/package.json +1 -1
- package/internal/stencil-private.d.ts +13 -0
- package/internal/stencil-public-docs.d.ts +8 -0
- package/internal/testing/index.js +1215 -1021
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +15 -9
- package/mock-doc/index.js +15 -9
- 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 +13 -13
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +11 -3
- package/testing/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stencil/core/internal/hydrate",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.0",
|
|
4
4
|
"description": "Stencil internal hydrate platform to be imported by the Stencil Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Stencil Hydrate Runner v4.
|
|
2
|
+
Stencil Hydrate Runner v4.23.0 | MIT Licensed | https://stenciljs.com
|
|
3
3
|
*/
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
@@ -10429,7 +10429,7 @@ function serializeNodeToHtml(elm, serializationOptions = {}) {
|
|
|
10429
10429
|
text: []
|
|
10430
10430
|
};
|
|
10431
10431
|
let renderedNode = "";
|
|
10432
|
-
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(elm
|
|
10432
|
+
const children = !opts.fullDocument && elm.body ? Array.from(elm.body.childNodes) : opts.outerHtml ? [elm] : Array.from(getChildNodes(elm));
|
|
10433
10433
|
for (let i = 0, ii = children.length; i < ii; i++) {
|
|
10434
10434
|
const child = children[i];
|
|
10435
10435
|
const chunks = Array.from(streamToHtml(child, opts, output));
|
|
@@ -10462,7 +10462,7 @@ function* streamToHtml(node, opts, output) {
|
|
|
10462
10462
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
10463
10463
|
yield "<" + tag;
|
|
10464
10464
|
output.currentLineWidth += tag.length + 1;
|
|
10465
|
-
if (tag === "template") {
|
|
10465
|
+
if (tag === "template" && (!node.getAttribute || !node.getAttribute("shadowrootmode"))) {
|
|
10466
10466
|
const mode = ` shadowrootmode="open"`;
|
|
10467
10467
|
yield mode;
|
|
10468
10468
|
output.currentLineWidth += mode.length;
|
|
@@ -10546,7 +10546,8 @@ style="${cssText}">`;
|
|
|
10546
10546
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
10547
10547
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
10548
10548
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
|
10549
|
-
|
|
10549
|
+
const childNodes = getChildNodes(node);
|
|
10550
|
+
if (opts.newLines && (childNodes.length === 0 || childNodes.length === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && ((_e = childNodes[0].nodeValue) == null ? void 0 : _e.trim()) === "")) {
|
|
10550
10551
|
yield "\n";
|
|
10551
10552
|
output.currentLineWidth = 0;
|
|
10552
10553
|
for (let i = 0; i < output.indent; i++) {
|
|
@@ -10557,7 +10558,7 @@ style="${cssText}">`;
|
|
|
10557
10558
|
}
|
|
10558
10559
|
if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
|
|
10559
10560
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
10560
|
-
const childNodes = tagName === "template" ? node.content.childNodes : node
|
|
10561
|
+
const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
|
|
10561
10562
|
const childNodeLength = childNodes.length;
|
|
10562
10563
|
if (childNodeLength > 0) {
|
|
10563
10564
|
if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
|
|
@@ -10730,6 +10731,9 @@ function isWithinWhitespaceSensitive(node) {
|
|
|
10730
10731
|
}
|
|
10731
10732
|
return false;
|
|
10732
10733
|
}
|
|
10734
|
+
function getChildNodes(node) {
|
|
10735
|
+
return node.__childNodes || node.childNodes;
|
|
10736
|
+
}
|
|
10733
10737
|
var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
|
|
10734
10738
|
"STYLE",
|
|
10735
10739
|
"SCRIPT",
|
|
@@ -10999,10 +11003,12 @@ var MockElement = class extends MockNode2 {
|
|
|
10999
11003
|
attachInternals() {
|
|
11000
11004
|
return new Proxy({}, {
|
|
11001
11005
|
get: function(_target, prop, _receiver) {
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
+
if ("process" in globalThis && globalThis.process.env.__STENCIL_SPEC_TESTS__) {
|
|
11007
|
+
console.error(
|
|
11008
|
+
`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
|
|
11009
|
+
Testing components with ElementInternals is fully supported in e2e tests.`
|
|
11010
|
+
);
|
|
11011
|
+
}
|
|
11006
11012
|
}
|
|
11007
11013
|
});
|
|
11008
11014
|
}
|
|
@@ -14242,59 +14248,59 @@ var unwrapErr = (result) => {
|
|
|
14242
14248
|
};
|
|
14243
14249
|
|
|
14244
14250
|
// src/runtime/connected-callback.ts
|
|
14245
|
-
import { BUILD as
|
|
14251
|
+
import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
|
|
14246
14252
|
|
|
14247
14253
|
// src/runtime/client-hydrate.ts
|
|
14248
|
-
import { BUILD as
|
|
14254
|
+
import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
|
|
14249
14255
|
|
|
14250
|
-
// src/runtime/
|
|
14251
|
-
import { BUILD as
|
|
14256
|
+
// src/runtime/dom-extras.ts
|
|
14257
|
+
import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
|
|
14258
|
+
|
|
14259
|
+
// src/runtime/vdom/vdom-render.ts
|
|
14260
|
+
import { BUILD as BUILD10 } from "@stencil/core/internal/app-data";
|
|
14252
14261
|
|
|
14253
14262
|
// src/runtime/vdom/h.ts
|
|
14263
|
+
import { BUILD as BUILD7 } from "@stencil/core/internal/app-data";
|
|
14264
|
+
|
|
14265
|
+
// src/runtime/vdom/update-element.ts
|
|
14266
|
+
import { BUILD as BUILD9 } from "@stencil/core/internal/app-data";
|
|
14267
|
+
|
|
14268
|
+
// src/runtime/vdom/set-accessor.ts
|
|
14254
14269
|
import { BUILD as BUILD8 } from "@stencil/core/internal/app-data";
|
|
14270
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
14271
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
14272
|
+
|
|
14273
|
+
// src/runtime/profile.ts
|
|
14274
|
+
import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
|
|
14255
14275
|
|
|
14256
14276
|
// src/runtime/initialize-component.ts
|
|
14257
|
-
import { BUILD as
|
|
14277
|
+
import { BUILD as BUILD21 } from "@stencil/core/internal/app-data";
|
|
14258
14278
|
|
|
14259
14279
|
// src/runtime/mode.ts
|
|
14260
14280
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
14261
14281
|
|
|
14262
14282
|
// src/runtime/proxy-component.ts
|
|
14263
|
-
import { BUILD as
|
|
14283
|
+
import { BUILD as BUILD20 } from "@stencil/core/internal/app-data";
|
|
14264
14284
|
|
|
14265
14285
|
// src/runtime/set-value.ts
|
|
14266
|
-
import { BUILD as
|
|
14286
|
+
import { BUILD as BUILD19 } from "@stencil/core/internal/app-data";
|
|
14267
14287
|
|
|
14268
14288
|
// src/runtime/parse-property-value.ts
|
|
14269
|
-
import { BUILD as
|
|
14289
|
+
import { BUILD as BUILD14 } from "@stencil/core/internal/app-data";
|
|
14270
14290
|
|
|
14271
14291
|
// src/runtime/update-component.ts
|
|
14272
|
-
import { BUILD as
|
|
14292
|
+
import { BUILD as BUILD18, NAMESPACE } from "@stencil/core/internal/app-data";
|
|
14273
14293
|
|
|
14274
14294
|
// src/runtime/event-emitter.ts
|
|
14275
|
-
import { BUILD as BUILD12 } from "@stencil/core/internal/app-data";
|
|
14276
|
-
|
|
14277
|
-
// src/runtime/element.ts
|
|
14278
|
-
import { BUILD as BUILD11 } from "@stencil/core/internal/app-data";
|
|
14279
|
-
|
|
14280
|
-
// src/runtime/styles.ts
|
|
14281
|
-
import { BUILD as BUILD13 } from "@stencil/core/internal/app-data";
|
|
14282
|
-
|
|
14283
|
-
// src/runtime/vdom/vdom-render.ts
|
|
14284
14295
|
import { BUILD as BUILD16 } from "@stencil/core/internal/app-data";
|
|
14285
14296
|
|
|
14286
|
-
// src/runtime/
|
|
14297
|
+
// src/runtime/element.ts
|
|
14287
14298
|
import { BUILD as BUILD15 } from "@stencil/core/internal/app-data";
|
|
14288
14299
|
|
|
14289
|
-
// src/runtime/
|
|
14290
|
-
import { BUILD as
|
|
14291
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
14292
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
14300
|
+
// src/runtime/styles.ts
|
|
14301
|
+
import { BUILD as BUILD17 } from "@stencil/core/internal/app-data";
|
|
14293
14302
|
|
|
14294
14303
|
// src/runtime/disconnected-callback.ts
|
|
14295
|
-
import { BUILD as BUILD22 } from "@stencil/core/internal/app-data";
|
|
14296
|
-
|
|
14297
|
-
// src/runtime/dom-extras.ts
|
|
14298
14304
|
import { BUILD as BUILD23 } from "@stencil/core/internal/app-data";
|
|
14299
14305
|
|
|
14300
14306
|
// src/runtime/bootstrap-lazy.ts
|
package/internal/package.json
CHANGED
|
@@ -581,6 +581,8 @@ export interface ComponentCompilerStaticProperty {
|
|
|
581
581
|
reflect?: boolean;
|
|
582
582
|
docs: CompilerJsDoc;
|
|
583
583
|
defaultValue?: string;
|
|
584
|
+
getter: boolean;
|
|
585
|
+
setter: boolean;
|
|
584
586
|
}
|
|
585
587
|
/**
|
|
586
588
|
* Intermediate Representation (IR) of a property on a Stencil component
|
|
@@ -1239,6 +1241,11 @@ export interface RenderNode extends HostElement {
|
|
|
1239
1241
|
* back to the node that's been moved around.
|
|
1240
1242
|
*/
|
|
1241
1243
|
['s-nr']?: RenderNode;
|
|
1244
|
+
/**
|
|
1245
|
+
* Original Order:
|
|
1246
|
+
* During SSR; a number representing the order of a slotted node
|
|
1247
|
+
*/
|
|
1248
|
+
['s-oo']?: number;
|
|
1242
1249
|
/**
|
|
1243
1250
|
* Scope Id
|
|
1244
1251
|
*/
|
|
@@ -1256,6 +1263,12 @@ export interface RenderNode extends HostElement {
|
|
|
1256
1263
|
* empty "" for shadow, "c" from scoped
|
|
1257
1264
|
*/
|
|
1258
1265
|
['s-en']?: '' | /*shadow*/ 'c';
|
|
1266
|
+
/**
|
|
1267
|
+
* On a `scoped: true` component
|
|
1268
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1269
|
+
* returns the internal `childNodes` of the scoped element
|
|
1270
|
+
*/
|
|
1271
|
+
readonly __childNodes?: NodeListOf<ChildNode>;
|
|
1259
1272
|
}
|
|
1260
1273
|
export type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
|
|
1261
1274
|
export type LazyBundleRuntimeData = [
|
|
@@ -311,6 +311,14 @@ export interface JsonDocsProp {
|
|
|
311
311
|
* ```
|
|
312
312
|
*/
|
|
313
313
|
required: boolean;
|
|
314
|
+
/**
|
|
315
|
+
* `true` if the prop has a `get()`. `false` otherwise
|
|
316
|
+
*/
|
|
317
|
+
getter: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* `true` if the prop has a `set()`. `false` otherwise
|
|
320
|
+
*/
|
|
321
|
+
setter: boolean;
|
|
314
322
|
}
|
|
315
323
|
export interface JsonDocsMethod {
|
|
316
324
|
name: string;
|