@rindo/core 4.19.1 → 4.20.0-dev.1737933003.7d01dba
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.dom.asynciterable.d.ts +5 -0
- package/compiler/lib.dom.d.ts +211 -33
- package/compiler/lib.dom.iterable.d.ts +8 -0
- package/compiler/lib.es2015.core.d.ts +40 -0
- package/compiler/lib.es2018.intl.d.ts +16 -4
- package/compiler/lib.es2019.intl.d.ts +1 -1
- package/compiler/lib.es2020.bigint.d.ts +2 -3
- package/compiler/lib.es2020.intl.d.ts +32 -7
- package/compiler/lib.es2021.weakref.d.ts +1 -1
- package/compiler/lib.es2022.regexp.d.ts +1 -1
- package/compiler/lib.es2023.d.ts +1 -0
- package/compiler/lib.es2023.intl.d.ts +56 -0
- package/compiler/lib.es5.d.ts +31 -9
- package/compiler/lib.esnext.array.d.ts +35 -0
- package/compiler/lib.esnext.collection.d.ts +77 -0
- package/compiler/lib.esnext.d.ts +3 -0
- package/compiler/lib.esnext.intl.d.ts +1 -8
- package/compiler/lib.esnext.regexp.d.ts +25 -0
- package/compiler/lib.esnext.string.d.ts +29 -0
- package/compiler/lib.webworker.asynciterable.d.ts +5 -0
- package/compiler/lib.webworker.d.ts +20 -6
- package/compiler/lib.webworker.iterable.d.ts +5 -0
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +212817 -210315
- 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 +53 -37
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/client/shadow-css.js +6 -30
- package/internal/hydrate/index.js +57 -43
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +7 -7
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +0 -1
- package/internal/rindo-public-compiler.d.ts +8 -5
- package/internal/testing/index.js +52 -36
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +3 -3
- package/mock-doc/index.d.ts +1 -1
- package/mock-doc/index.js +3 -3
- package/mock-doc/package.json +1 -1
- package/package.json +26 -7
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/screenshot/screenshot-compare.d.ts +1 -2
- package/screenshot/screenshot-fs.d.ts +0 -1
- package/sys/node/index.js +6 -6
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +31 -2
- package/testing/jest/jest-27-and-under/jest-facade.d.ts +41 -41
- package/testing/jest/jest-28/jest-facade.d.ts +35 -53
- package/testing/jest/jest-29/jest-facade.d.ts +36 -55
- package/testing/package.json +1 -1
- package/testing/puppeteer/puppeteer-declarations.d.ts +0 -1
- package/testing/puppeteer/puppeteer-screenshot.d.ts +1 -1
- package/testing/testing-utils.d.ts +0 -1
|
@@ -784,17 +784,6 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
|
-
for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
|
|
788
|
-
clientHydrate(
|
|
789
|
-
parentVNode,
|
|
790
|
-
childRenderNodes,
|
|
791
|
-
slotNodes,
|
|
792
|
-
shadowRootNodes,
|
|
793
|
-
hostElm,
|
|
794
|
-
node.childNodes[i2],
|
|
795
|
-
hostId
|
|
796
|
-
);
|
|
797
|
-
}
|
|
798
787
|
if (node.shadowRoot) {
|
|
799
788
|
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
800
789
|
clientHydrate(
|
|
@@ -808,6 +797,17 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
808
797
|
);
|
|
809
798
|
}
|
|
810
799
|
}
|
|
800
|
+
for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
|
|
801
|
+
clientHydrate(
|
|
802
|
+
parentVNode,
|
|
803
|
+
childRenderNodes,
|
|
804
|
+
slotNodes,
|
|
805
|
+
shadowRootNodes,
|
|
806
|
+
hostElm,
|
|
807
|
+
node.childNodes[i2],
|
|
808
|
+
hostId
|
|
809
|
+
);
|
|
810
|
+
}
|
|
811
811
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
812
812
|
childIdSplt = node.nodeValue.split(".");
|
|
813
813
|
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
@@ -885,14 +885,14 @@ var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes,
|
|
|
885
885
|
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
886
886
|
if (node.nodeType === 1 /* ElementNode */) {
|
|
887
887
|
let i2 = 0;
|
|
888
|
-
for (; i2 < node.childNodes.length; i2++) {
|
|
889
|
-
initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
|
|
890
|
-
}
|
|
891
888
|
if (node.shadowRoot) {
|
|
892
|
-
for (
|
|
889
|
+
for (; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
893
890
|
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
894
891
|
}
|
|
895
892
|
}
|
|
893
|
+
for (i2 = 0; i2 < node.childNodes.length; i2++) {
|
|
894
|
+
initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
|
|
895
|
+
}
|
|
896
896
|
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
897
897
|
const childIdSplt = node.nodeValue.split(".");
|
|
898
898
|
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
@@ -987,8 +987,6 @@ var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
|
987
987
|
};
|
|
988
988
|
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
989
989
|
var _a;
|
|
990
|
-
const styleContainerDocument = styleContainerNode;
|
|
991
|
-
const styleContainerShadowRoot = styleContainerNode;
|
|
992
990
|
const scopeId2 = getScopeId(cmpMeta, mode);
|
|
993
991
|
const style = styles.get(scopeId2);
|
|
994
992
|
if (!import_app_data7.BUILD.attachStyles) {
|
|
@@ -997,14 +995,14 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
997
995
|
styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : doc;
|
|
998
996
|
if (style) {
|
|
999
997
|
if (typeof style === "string") {
|
|
1000
|
-
styleContainerNode =
|
|
998
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1001
999
|
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1002
1000
|
let styleElm;
|
|
1003
1001
|
if (!appliedStyles) {
|
|
1004
1002
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1005
1003
|
}
|
|
1006
1004
|
if (!appliedStyles.has(scopeId2)) {
|
|
1007
|
-
if (import_app_data7.BUILD.hydrateClientSide &&
|
|
1005
|
+
if (import_app_data7.BUILD.hydrateClientSide && styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
1008
1006
|
styleElm.innerHTML = style;
|
|
1009
1007
|
} else {
|
|
1010
1008
|
styleElm = doc.createElement("style");
|
|
@@ -1013,10 +1011,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1013
1011
|
if (nonce != null) {
|
|
1014
1012
|
styleElm.setAttribute("nonce", nonce);
|
|
1015
1013
|
}
|
|
1016
|
-
if (import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) {
|
|
1014
|
+
if ((import_app_data7.BUILD.hydrateServerSide || import_app_data7.BUILD.hotModuleReplacement) && cmpMeta.$flags$ & 2 /* scopedCssEncapsulation */) {
|
|
1017
1015
|
styleElm.setAttribute(HYDRATED_STYLE_ID, scopeId2);
|
|
1018
1016
|
}
|
|
1019
|
-
|
|
1017
|
+
const injectStyle = (
|
|
1018
|
+
/**
|
|
1019
|
+
* we render a scoped component
|
|
1020
|
+
*/
|
|
1021
|
+
!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) || /**
|
|
1022
|
+
* we are using shadow dom and render the style tag within the shadowRoot
|
|
1023
|
+
*/
|
|
1024
|
+
cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD"
|
|
1025
|
+
);
|
|
1026
|
+
if (injectStyle) {
|
|
1027
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
1028
|
+
}
|
|
1020
1029
|
}
|
|
1021
1030
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
1022
1031
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -1025,8 +1034,8 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1025
1034
|
appliedStyles.add(scopeId2);
|
|
1026
1035
|
}
|
|
1027
1036
|
}
|
|
1028
|
-
} else if (import_app_data7.BUILD.constructableCSS && !
|
|
1029
|
-
|
|
1037
|
+
} else if (import_app_data7.BUILD.constructableCSS && !styleContainerNode.adoptedStyleSheets.includes(style)) {
|
|
1038
|
+
styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
|
|
1030
1039
|
}
|
|
1031
1040
|
}
|
|
1032
1041
|
return scopeId2;
|
|
@@ -1041,7 +1050,7 @@ var attachStyles = (hostRef) => {
|
|
|
1041
1050
|
cmpMeta,
|
|
1042
1051
|
hostRef.$modeName$
|
|
1043
1052
|
);
|
|
1044
|
-
if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */) {
|
|
1053
|
+
if ((import_app_data7.BUILD.shadowDom || import_app_data7.BUILD.scoped) && import_app_data7.BUILD.cssAnnotations && flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
1045
1054
|
elm["s-sc"] = scopeId2;
|
|
1046
1055
|
elm.classList.add(scopeId2 + "-h");
|
|
1047
1056
|
if (import_app_data7.BUILD.scoped && flags & 2 /* scopedCssEncapsulation */) {
|
|
@@ -1051,7 +1060,6 @@ var attachStyles = (hostRef) => {
|
|
|
1051
1060
|
endAttachStyles();
|
|
1052
1061
|
};
|
|
1053
1062
|
var getScopeId = (cmp, mode) => "sc-" + (import_app_data7.BUILD.mode && mode && cmp.$flags$ & 32 /* hasMode */ ? cmp.$tagName$ + "-" + mode : cmp.$tagName$);
|
|
1054
|
-
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
1055
1063
|
|
|
1056
1064
|
// src/runtime/vdom/vdom-render.ts
|
|
1057
1065
|
var import_app_data10 = require("@rindo/core/internal/app-data");
|
|
@@ -1247,7 +1255,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
1247
1255
|
if (import_app_data10.BUILD.vdomAttribute) {
|
|
1248
1256
|
updateElement(null, newVNode2, isSvgMode);
|
|
1249
1257
|
}
|
|
1250
|
-
|
|
1258
|
+
const rootNode = elm.getRootNode();
|
|
1259
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
1260
|
+
if (!isElementWithinShadowRoot && import_app_data10.BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
1251
1261
|
elm.classList.add(elm["s-si"] = scopeId);
|
|
1252
1262
|
}
|
|
1253
1263
|
if (import_app_data10.BUILD.scoped) {
|
|
@@ -1461,6 +1471,15 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
1461
1471
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1462
1472
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1463
1473
|
if (import_app_data10.BUILD.slotRelocation && leftVNode.$tag$ === "slot") {
|
|
1474
|
+
if (
|
|
1475
|
+
// The component gets hydrated and no VDOM has been initialized.
|
|
1476
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
1477
|
+
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
1478
|
+
// hydration comments to be removed
|
|
1479
|
+
leftVNode.$elm$.nodeType !== 8
|
|
1480
|
+
) {
|
|
1481
|
+
return false;
|
|
1482
|
+
}
|
|
1464
1483
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1465
1484
|
}
|
|
1466
1485
|
if (import_app_data10.BUILD.vdomKey && !isInitialRender) {
|
|
@@ -1502,7 +1521,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
1502
1521
|
elm.textContent = "";
|
|
1503
1522
|
}
|
|
1504
1523
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1505
|
-
} else if (
|
|
1524
|
+
} else if (
|
|
1525
|
+
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
1526
|
+
!isInitialRender && import_app_data10.BUILD.updatable && oldChildren !== null
|
|
1527
|
+
) {
|
|
1506
1528
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1507
1529
|
}
|
|
1508
1530
|
if (import_app_data10.BUILD.svg && isSvgMode && tag === "svg") {
|
|
@@ -2194,7 +2216,8 @@ More information: https://rindojs.web.app/docs/properties#prop-mutability`
|
|
|
2194
2216
|
if (this.hasOwnProperty(propName)) {
|
|
2195
2217
|
newValue = this[propName];
|
|
2196
2218
|
delete this[propName];
|
|
2197
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
2219
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
2220
|
+
this[propName] == newValue) {
|
|
2198
2221
|
return;
|
|
2199
2222
|
} else if (propName == null) {
|
|
2200
2223
|
const hostRef = getHostRef(this);
|
|
@@ -2301,7 +2324,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
2301
2324
|
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
2302
2325
|
if (!import_app_data14.BUILD.hydrateServerSide && import_app_data14.BUILD.shadowDom && // TODO(RINDO-854): Remove code related to legacy shadowDomShim field
|
|
2303
2326
|
import_app_data14.BUILD.shadowDomShim && cmpMeta.$flags$ & 8 /* needsShadowDomShim */) {
|
|
2304
|
-
style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2
|
|
2327
|
+
style = await import("../client/shadow-css.js").then((m) => m.scopeCss(style, scopeId2));
|
|
2305
2328
|
}
|
|
2306
2329
|
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));
|
|
2307
2330
|
endRegisterStyles();
|
|
@@ -2870,10 +2893,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2870
2893
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
2871
2894
|
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
|
2872
2895
|
const deferredConnectedCallbacks = [];
|
|
2873
|
-
const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
2874
2896
|
let appLoadFallback;
|
|
2875
2897
|
let isBootstrapping = true;
|
|
2876
|
-
let i2 = 0;
|
|
2877
2898
|
Object.assign(plt, options);
|
|
2878
2899
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
2879
2900
|
if (import_app_data19.BUILD.asyncQueue) {
|
|
@@ -2884,11 +2905,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
2884
2905
|
if (import_app_data19.BUILD.hydrateClientSide) {
|
|
2885
2906
|
plt.$flags$ |= 2 /* appLoaded */;
|
|
2886
2907
|
}
|
|
2887
|
-
if (import_app_data19.BUILD.hydrateClientSide && import_app_data19.BUILD.shadowDom) {
|
|
2888
|
-
for (; i2 < styles2.length; i2++) {
|
|
2889
|
-
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
2890
|
-
}
|
|
2891
|
-
}
|
|
2892
2908
|
let hasSlotRelocation = false;
|
|
2893
2909
|
lazyBundles.map((lazyBundle) => {
|
|
2894
2910
|
lazyBundle[1].map((compactMeta) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/testing",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0-dev.1737933003.7d01dba",
|
|
4
4
|
"description": "Rindo internal testing platform to be imported by the Rindo Compiler. Breaking changes can and will happen at any time.",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"private": true
|
package/mock-doc/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc (CommonJS) v4.
|
|
2
|
+
Rindo Mock Doc (CommonJS) v4.20.0-dev.1737933003.7d01dba | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -6287,7 +6287,7 @@ function normalizeSerializationOptions(opts = {}) {
|
|
|
6287
6287
|
removeAttributeQuotes: typeof opts.removeAttributeQuotes !== "boolean" ? false : opts.removeAttributeQuotes,
|
|
6288
6288
|
removeBooleanAttributeQuotes: typeof opts.removeBooleanAttributeQuotes !== "boolean" ? false : opts.removeBooleanAttributeQuotes,
|
|
6289
6289
|
removeHtmlComments: typeof opts.removeHtmlComments !== "boolean" ? false : opts.removeHtmlComments,
|
|
6290
|
-
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ?
|
|
6290
|
+
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : opts.serializeShadowRoot,
|
|
6291
6291
|
fullDocument: typeof opts.fullDocument !== "boolean" ? true : opts.fullDocument
|
|
6292
6292
|
};
|
|
6293
6293
|
}
|
|
@@ -6413,7 +6413,7 @@ style="${cssText}">`;
|
|
|
6413
6413
|
}
|
|
6414
6414
|
if (EMPTY_ELEMENTS.has(tagName) === false) {
|
|
6415
6415
|
const shadowRoot = node.shadowRoot;
|
|
6416
|
-
if (
|
|
6416
|
+
if (shadowRoot != null && opts.serializeShadowRoot) {
|
|
6417
6417
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
6418
6418
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
6419
6419
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -975,7 +975,7 @@ declare class MockWindow {
|
|
|
975
975
|
addEventListener: (_type: string, _handler: (ev?: any) => void) => void;
|
|
976
976
|
removeEventListener: (_type: string, _handler: (ev?: any) => void) => void;
|
|
977
977
|
dispatchEvent: (_ev: any) => void;
|
|
978
|
-
onchange: (this: MediaQueryList, ev: MediaQueryListEvent) => any;
|
|
978
|
+
onchange: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null;
|
|
979
979
|
};
|
|
980
980
|
get Node(): any;
|
|
981
981
|
get NodeList(): any;
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc v4.
|
|
2
|
+
Rindo Mock Doc v4.20.0-dev.1737933003.7d01dba | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -6234,7 +6234,7 @@ function normalizeSerializationOptions(opts = {}) {
|
|
|
6234
6234
|
removeAttributeQuotes: typeof opts.removeAttributeQuotes !== "boolean" ? false : opts.removeAttributeQuotes,
|
|
6235
6235
|
removeBooleanAttributeQuotes: typeof opts.removeBooleanAttributeQuotes !== "boolean" ? false : opts.removeBooleanAttributeQuotes,
|
|
6236
6236
|
removeHtmlComments: typeof opts.removeHtmlComments !== "boolean" ? false : opts.removeHtmlComments,
|
|
6237
|
-
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ?
|
|
6237
|
+
serializeShadowRoot: typeof opts.serializeShadowRoot !== "boolean" ? true : opts.serializeShadowRoot,
|
|
6238
6238
|
fullDocument: typeof opts.fullDocument !== "boolean" ? true : opts.fullDocument
|
|
6239
6239
|
};
|
|
6240
6240
|
}
|
|
@@ -6360,7 +6360,7 @@ style="${cssText}">`;
|
|
|
6360
6360
|
}
|
|
6361
6361
|
if (EMPTY_ELEMENTS.has(tagName) === false) {
|
|
6362
6362
|
const shadowRoot = node.shadowRoot;
|
|
6363
|
-
if (
|
|
6363
|
+
if (shadowRoot != null && opts.serializeShadowRoot) {
|
|
6364
6364
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
6365
6365
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
6366
6366
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
package/mock-doc/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0-dev.1737933003.7d01dba",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/rindo-core/index.cjs",
|
|
6
6
|
"module": "./internal/rindo-core/index.js",
|
|
@@ -37,10 +37,12 @@
|
|
|
37
37
|
"types": "./internal/index.d.ts"
|
|
38
38
|
},
|
|
39
39
|
"./internal/client": {
|
|
40
|
-
"import": "./internal/client/index.js"
|
|
40
|
+
"import": "./internal/client/index.js",
|
|
41
|
+
"require": "./internal/client/index.js"
|
|
41
42
|
},
|
|
42
43
|
"./internal/testing": {
|
|
43
|
-
"import": "./internal/testing/index.js"
|
|
44
|
+
"import": "./internal/testing/index.js",
|
|
45
|
+
"require": "./internal/testing/index.js"
|
|
44
46
|
},
|
|
45
47
|
"./internal/testing/*": {
|
|
46
48
|
"import": "./internal/testing/*"
|
|
@@ -61,7 +63,12 @@
|
|
|
61
63
|
"types": "./compiler/rindo.d.ts"
|
|
62
64
|
},
|
|
63
65
|
"./compiler/*": {
|
|
64
|
-
"import": "./compiler/*"
|
|
66
|
+
"import": "./compiler/*",
|
|
67
|
+
"types": "./compiler/*"
|
|
68
|
+
},
|
|
69
|
+
"./screenshot": {
|
|
70
|
+
"require": "./screenshot/index.js",
|
|
71
|
+
"types": "./screenshot/index.d.ts"
|
|
65
72
|
},
|
|
66
73
|
"./sys/node": {
|
|
67
74
|
"import": "./sys/node/index.js",
|
|
@@ -71,6 +78,18 @@
|
|
|
71
78
|
"./sys/node/*": {
|
|
72
79
|
"import": "./sys/node/*",
|
|
73
80
|
"require": "./sys/node/*"
|
|
81
|
+
},
|
|
82
|
+
"./testing": {
|
|
83
|
+
"import": "./testing/index.js",
|
|
84
|
+
"types": "./testing/index.d.ts",
|
|
85
|
+
"require": "./testing/index.js"
|
|
86
|
+
},
|
|
87
|
+
"./testing/jest-preset": {
|
|
88
|
+
"require": "./testing/jest-preset.js"
|
|
89
|
+
},
|
|
90
|
+
"./testing/*": {
|
|
91
|
+
"import": "./testing/*",
|
|
92
|
+
"require": "./testing/*"
|
|
74
93
|
}
|
|
75
94
|
},
|
|
76
95
|
"scripts": {
|
|
@@ -80,7 +99,7 @@
|
|
|
80
99
|
"clean": "rm -rf build/ cli/ compiler/ dev-server/ internal/ mock-doc/ sys/ testing/ && npm run clean:scripts && npm run clean.screenshots",
|
|
81
100
|
"clean.screenshots": "rm -rf test/end-to-end/screenshot/builds test/end-to-end/screenshot/images",
|
|
82
101
|
"clean:scripts": "rm -rf scripts/build",
|
|
83
|
-
"lint": "eslint
|
|
102
|
+
"lint": "eslint 'bin/*' 'scripts/*.ts' 'scripts/**/*.ts' 'src/*.ts' 'src/**/*.ts' 'src/**/*.tsx'",
|
|
84
103
|
"install.jest": "bash ./src/testing/jest/install-dependencies.sh",
|
|
85
104
|
"prettier": "npm run prettier.base -- --write",
|
|
86
105
|
"prettier.base": "prettier --cache \"./({bin,scripts,src,test}/**/*.{ts,tsx,js,jsx})|bin/rindo|.github/(**/)?*.(yml|yaml)|*.js\"",
|
|
@@ -135,7 +154,7 @@
|
|
|
135
154
|
"eslint-plugin-jest": "^28.0.0",
|
|
136
155
|
"eslint-plugin-jsdoc": "^48.0.0",
|
|
137
156
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
138
|
-
"execa": "
|
|
157
|
+
"execa": "9.3.0",
|
|
139
158
|
"exit": "^0.1.2",
|
|
140
159
|
"fs-extra": "^11.0.0",
|
|
141
160
|
"glob": "10.4.1",
|
|
@@ -162,7 +181,7 @@
|
|
|
162
181
|
"semver": "^7.3.7",
|
|
163
182
|
"terser": "5.31.1",
|
|
164
183
|
"tsx": "^4.10.3",
|
|
165
|
-
"typescript": "~5.
|
|
184
|
+
"typescript": "~5.5.3",
|
|
166
185
|
"webpack": "^5.75.0",
|
|
167
186
|
"ws": "8.17.1"
|
|
168
187
|
},
|
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type * as d from '@rindo/core/internal';
|
|
3
2
|
export declare function compareScreenshot(emulateConfig: d.EmulateConfig, screenshotBuildData: d.ScreenshotBuildData, currentScreenshotBuf: Buffer, screenshotTimeoutMs: number | null, desc: string, width: number, height: number, testPath: string, pixelmatchThreshold: number): Promise<{
|
|
4
3
|
id: string;
|
|
@@ -17,5 +16,5 @@ export declare function compareScreenshot(emulateConfig: d.EmulateConfig, screen
|
|
|
17
16
|
allowableMismatchedPixels: number;
|
|
18
17
|
allowableMismatchedRatio: number;
|
|
19
18
|
testPath: string;
|
|
20
|
-
cacheKey: string;
|
|
19
|
+
cacheKey: string | undefined;
|
|
21
20
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type * as d from '@rindo/core/internal';
|
|
3
2
|
export declare function writeScreenshotImage(imagePath: string, screenshotBuf: Buffer): Promise<void>;
|
|
4
3
|
export declare function writeScreenshotData(dataDir: string, screenshotData: d.Screenshot): Promise<void>;
|