@rindo/core 4.22.3 → 4.23.1
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/rindo.js +1730 -158
- 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 +1506 -1161
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +1468 -1156
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +53 -39
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +72 -3
- package/internal/rindo-public-docs.d.ts +8 -0
- package/internal/testing/index.js +1478 -1166
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +20 -9
- package/mock-doc/index.js +20 -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 +12 -3
- package/testing/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/hydrate",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.23.1",
|
|
4
4
|
"description": "Rindo internal hydrate 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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Rindo Hydrate Runner v4.
|
|
2
|
+
Rindo Hydrate Runner v4.23.1 | MIT Licensed | https://rindojs.web.app
|
|
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,10 @@ 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
|
+
* If the node is a shadow root, we want to add the `shadowrootmode` attribute
|
|
10467
|
+
*/
|
|
10468
|
+
("host" in node || node.nodeName.toLocaleLowerCase() === shadowRootTag)) {
|
|
10466
10469
|
const mode = ` shadowrootmode="open"`;
|
|
10467
10470
|
yield mode;
|
|
10468
10471
|
output.currentLineWidth += mode.length;
|
|
@@ -10546,7 +10549,8 @@ style="${cssText}">`;
|
|
|
10546
10549
|
output.indent = output.indent + ((_c = opts.indentSpaces) != null ? _c : 0);
|
|
10547
10550
|
yield* streamToHtml(shadowRoot, opts, output);
|
|
10548
10551
|
output.indent = output.indent - ((_d = opts.indentSpaces) != null ? _d : 0);
|
|
10549
|
-
|
|
10552
|
+
const childNodes = getChildNodes(node);
|
|
10553
|
+
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
10554
|
yield "\n";
|
|
10551
10555
|
output.currentLineWidth = 0;
|
|
10552
10556
|
for (let i = 0; i < output.indent; i++) {
|
|
@@ -10557,7 +10561,7 @@ style="${cssText}">`;
|
|
|
10557
10561
|
}
|
|
10558
10562
|
if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
|
|
10559
10563
|
const tag = tagName === shadowRootTag ? "template" : tagName;
|
|
10560
|
-
const childNodes = tagName === "template" ? node.content.childNodes : node
|
|
10564
|
+
const childNodes = tagName === "template" ? node.content.childNodes : getChildNodes(node);
|
|
10561
10565
|
const childNodeLength = childNodes.length;
|
|
10562
10566
|
if (childNodeLength > 0) {
|
|
10563
10567
|
if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== "string" || childNodes[0].nodeValue.trim() === "")) {
|
|
@@ -10730,6 +10734,9 @@ function isWithinWhitespaceSensitive(node) {
|
|
|
10730
10734
|
}
|
|
10731
10735
|
return false;
|
|
10732
10736
|
}
|
|
10737
|
+
function getChildNodes(node) {
|
|
10738
|
+
return node.__childNodes || node.childNodes;
|
|
10739
|
+
}
|
|
10733
10740
|
var NON_ESCAPABLE_CONTENT = /* @__PURE__ */ new Set([
|
|
10734
10741
|
"STYLE",
|
|
10735
10742
|
"SCRIPT",
|
|
@@ -10999,10 +11006,12 @@ var MockElement = class extends MockNode2 {
|
|
|
10999
11006
|
attachInternals() {
|
|
11000
11007
|
return new Proxy({}, {
|
|
11001
11008
|
get: function(_target, prop, _receiver) {
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11009
|
+
if ("process" in globalThis && globalThis.process.env.__RINDO_SPEC_TESTS__) {
|
|
11010
|
+
console.error(
|
|
11011
|
+
`NOTE: Property ${String(prop)} was accessed on ElementInternals, but this property is not implemented.
|
|
11012
|
+
Testing components with ElementInternals is fully supported in e2e tests.`
|
|
11013
|
+
);
|
|
11014
|
+
}
|
|
11006
11015
|
}
|
|
11007
11016
|
});
|
|
11008
11017
|
}
|
|
@@ -11922,6 +11931,8 @@ function createElement(ownerDocument, tagName) {
|
|
|
11922
11931
|
return new MockTitleElement(ownerDocument);
|
|
11923
11932
|
case "ul":
|
|
11924
11933
|
return new MockUListElement(ownerDocument);
|
|
11934
|
+
case "slot-fb":
|
|
11935
|
+
return new MockHTMLElement(ownerDocument, tagName);
|
|
11925
11936
|
}
|
|
11926
11937
|
if (ownerDocument != null && tagName.includes("-")) {
|
|
11927
11938
|
const win2 = ownerDocument.defaultView;
|
|
@@ -14146,10 +14157,10 @@ var supportsConstructableStylesheets = BUILD5.constructableCSS ? /* @__PURE__ */
|
|
|
14146
14157
|
})() : false;
|
|
14147
14158
|
|
|
14148
14159
|
// src/client/index.ts
|
|
14149
|
-
import { BUILD as
|
|
14160
|
+
import { BUILD as BUILD28, Env, NAMESPACE as NAMESPACE2 } from "@rindo/core/internal/app-data";
|
|
14150
14161
|
|
|
14151
14162
|
// src/runtime/bootstrap-custom-element.ts
|
|
14152
|
-
import { BUILD as
|
|
14163
|
+
import { BUILD as BUILD25 } from "@rindo/core/internal/app-data";
|
|
14153
14164
|
|
|
14154
14165
|
// src/utils/helpers.ts
|
|
14155
14166
|
var isString = (v) => typeof v === "string";
|
|
@@ -14242,66 +14253,69 @@ var unwrapErr = (result) => {
|
|
|
14242
14253
|
};
|
|
14243
14254
|
|
|
14244
14255
|
// src/runtime/connected-callback.ts
|
|
14245
|
-
import { BUILD as
|
|
14256
|
+
import { BUILD as BUILD23 } from "@rindo/core/internal/app-data";
|
|
14246
14257
|
|
|
14247
14258
|
// src/runtime/client-hydrate.ts
|
|
14248
|
-
import { BUILD as
|
|
14259
|
+
import { BUILD as BUILD14 } from "@rindo/core/internal/app-data";
|
|
14249
14260
|
|
|
14250
|
-
// src/runtime/
|
|
14261
|
+
// src/runtime/dom-extras.ts
|
|
14262
|
+
import { BUILD as BUILD12 } from "@rindo/core/internal/app-data";
|
|
14263
|
+
|
|
14264
|
+
// src/runtime/slot-polyfill-utils.ts
|
|
14251
14265
|
import { BUILD as BUILD7 } from "@rindo/core/internal/app-data";
|
|
14252
14266
|
|
|
14267
|
+
// src/runtime/vdom/vdom-render.ts
|
|
14268
|
+
import { BUILD as BUILD11 } from "@rindo/core/internal/app-data";
|
|
14269
|
+
|
|
14253
14270
|
// src/runtime/vdom/h.ts
|
|
14254
14271
|
import { BUILD as BUILD8 } from "@rindo/core/internal/app-data";
|
|
14255
14272
|
|
|
14273
|
+
// src/runtime/vdom/update-element.ts
|
|
14274
|
+
import { BUILD as BUILD10 } from "@rindo/core/internal/app-data";
|
|
14275
|
+
|
|
14276
|
+
// src/runtime/vdom/set-accessor.ts
|
|
14277
|
+
import { BUILD as BUILD9 } from "@rindo/core/internal/app-data";
|
|
14278
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
14279
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
14280
|
+
|
|
14281
|
+
// src/runtime/profile.ts
|
|
14282
|
+
import { BUILD as BUILD13 } from "@rindo/core/internal/app-data";
|
|
14283
|
+
|
|
14256
14284
|
// src/runtime/initialize-component.ts
|
|
14257
|
-
import { BUILD as
|
|
14285
|
+
import { BUILD as BUILD22 } from "@rindo/core/internal/app-data";
|
|
14258
14286
|
|
|
14259
14287
|
// src/runtime/mode.ts
|
|
14260
14288
|
var setMode = (handler) => modeResolutionChain.push(handler);
|
|
14261
14289
|
|
|
14262
14290
|
// src/runtime/proxy-component.ts
|
|
14263
|
-
import { BUILD as
|
|
14291
|
+
import { BUILD as BUILD21 } from "@rindo/core/internal/app-data";
|
|
14264
14292
|
|
|
14265
14293
|
// src/runtime/set-value.ts
|
|
14266
|
-
import { BUILD as
|
|
14294
|
+
import { BUILD as BUILD20 } from "@rindo/core/internal/app-data";
|
|
14267
14295
|
|
|
14268
14296
|
// src/runtime/parse-property-value.ts
|
|
14269
|
-
import { BUILD as
|
|
14297
|
+
import { BUILD as BUILD15 } from "@rindo/core/internal/app-data";
|
|
14270
14298
|
|
|
14271
14299
|
// src/runtime/update-component.ts
|
|
14272
|
-
import { BUILD as
|
|
14300
|
+
import { BUILD as BUILD19, NAMESPACE } from "@rindo/core/internal/app-data";
|
|
14273
14301
|
|
|
14274
14302
|
// src/runtime/event-emitter.ts
|
|
14275
|
-
import { BUILD as
|
|
14303
|
+
import { BUILD as BUILD17 } from "@rindo/core/internal/app-data";
|
|
14276
14304
|
|
|
14277
14305
|
// src/runtime/element.ts
|
|
14278
|
-
import { BUILD as BUILD11 } from "@rindo/core/internal/app-data";
|
|
14279
|
-
|
|
14280
|
-
// src/runtime/styles.ts
|
|
14281
|
-
import { BUILD as BUILD13 } from "@rindo/core/internal/app-data";
|
|
14282
|
-
|
|
14283
|
-
// src/runtime/vdom/vdom-render.ts
|
|
14284
14306
|
import { BUILD as BUILD16 } from "@rindo/core/internal/app-data";
|
|
14285
14307
|
|
|
14286
|
-
// src/runtime/
|
|
14287
|
-
import { BUILD as
|
|
14288
|
-
|
|
14289
|
-
// src/runtime/vdom/set-accessor.ts
|
|
14290
|
-
import { BUILD as BUILD14 } from "@rindo/core/internal/app-data";
|
|
14291
|
-
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
14292
|
-
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
14308
|
+
// src/runtime/styles.ts
|
|
14309
|
+
import { BUILD as BUILD18 } from "@rindo/core/internal/app-data";
|
|
14293
14310
|
|
|
14294
14311
|
// src/runtime/disconnected-callback.ts
|
|
14295
|
-
import { BUILD as
|
|
14296
|
-
|
|
14297
|
-
// src/runtime/dom-extras.ts
|
|
14298
|
-
import { BUILD as BUILD23 } from "@rindo/core/internal/app-data";
|
|
14312
|
+
import { BUILD as BUILD24 } from "@rindo/core/internal/app-data";
|
|
14299
14313
|
|
|
14300
14314
|
// src/runtime/bootstrap-lazy.ts
|
|
14301
|
-
import { BUILD as
|
|
14315
|
+
import { BUILD as BUILD26 } from "@rindo/core/internal/app-data";
|
|
14302
14316
|
|
|
14303
14317
|
// src/runtime/host-listener.ts
|
|
14304
|
-
import { BUILD as
|
|
14318
|
+
import { BUILD as BUILD27 } from "@rindo/core/internal/app-data";
|
|
14305
14319
|
|
|
14306
14320
|
// src/compiler/html/canonical-link.ts
|
|
14307
14321
|
var updateCanonicalLink = (doc2, href) => {
|
package/internal/package.json
CHANGED
|
@@ -98,6 +98,7 @@ export interface BuildFeatures {
|
|
|
98
98
|
propBoolean: boolean;
|
|
99
99
|
propNumber: boolean;
|
|
100
100
|
propString: boolean;
|
|
101
|
+
modernPropertyDecls: boolean;
|
|
101
102
|
lifecycle: boolean;
|
|
102
103
|
cmpDidLoad: boolean;
|
|
103
104
|
cmpShouldUpdate: boolean;
|
|
@@ -464,6 +465,7 @@ export interface ComponentCompilerFeatures {
|
|
|
464
465
|
hasMember: boolean;
|
|
465
466
|
hasMethod: boolean;
|
|
466
467
|
hasMode: boolean;
|
|
468
|
+
hasModernPropertyDecls: boolean;
|
|
467
469
|
hasProp: boolean;
|
|
468
470
|
hasPropBoolean: boolean;
|
|
469
471
|
hasPropNumber: boolean;
|
|
@@ -581,6 +583,9 @@ export interface ComponentCompilerStaticProperty {
|
|
|
581
583
|
reflect?: boolean;
|
|
582
584
|
docs: CompilerJsDoc;
|
|
583
585
|
defaultValue?: string;
|
|
586
|
+
getter: boolean;
|
|
587
|
+
setter: boolean;
|
|
588
|
+
ogPropName?: string;
|
|
584
589
|
}
|
|
585
590
|
/**
|
|
586
591
|
* Intermediate Representation (IR) of a property on a Rindo component
|
|
@@ -984,6 +989,10 @@ export interface HostElement extends HTMLElement {
|
|
|
984
989
|
* do the work of actually updating the component in-place.
|
|
985
990
|
*/
|
|
986
991
|
['s-hmr']?: (versionId: string) => void;
|
|
992
|
+
/**
|
|
993
|
+
* A list of nested nested hydration promises that
|
|
994
|
+
* must be resolved for the top, ancestor component to be fully hydrated
|
|
995
|
+
*/
|
|
987
996
|
['s-p']?: Promise<void>[];
|
|
988
997
|
componentOnReady?: () => Promise<this>;
|
|
989
998
|
}
|
|
@@ -1199,9 +1208,10 @@ export interface RenderNode extends HostElement {
|
|
|
1199
1208
|
*/
|
|
1200
1209
|
['s-cn']?: boolean;
|
|
1201
1210
|
/**
|
|
1202
|
-
* Is a slot
|
|
1203
|
-
*
|
|
1204
|
-
*
|
|
1211
|
+
* Is a `slot` node when `shadow: false` (or `scoped: true`).
|
|
1212
|
+
*
|
|
1213
|
+
* This is a node (either empty text-node or `<slot-fb>` element)
|
|
1214
|
+
* that represents where a `<slot>` is located in the original JSX.
|
|
1205
1215
|
*/
|
|
1206
1216
|
['s-sr']?: boolean;
|
|
1207
1217
|
/**
|
|
@@ -1239,6 +1249,11 @@ export interface RenderNode extends HostElement {
|
|
|
1239
1249
|
* back to the node that's been moved around.
|
|
1240
1250
|
*/
|
|
1241
1251
|
['s-nr']?: RenderNode;
|
|
1252
|
+
/**
|
|
1253
|
+
* Original Order:
|
|
1254
|
+
* During SSR; a number representing the order of a slotted node
|
|
1255
|
+
*/
|
|
1256
|
+
['s-oo']?: number;
|
|
1242
1257
|
/**
|
|
1243
1258
|
* Scope Id
|
|
1244
1259
|
*/
|
|
@@ -1256,6 +1271,60 @@ export interface RenderNode extends HostElement {
|
|
|
1256
1271
|
* empty "" for shadow, "c" from scoped
|
|
1257
1272
|
*/
|
|
1258
1273
|
['s-en']?: '' | /*shadow*/ 'c';
|
|
1274
|
+
/**
|
|
1275
|
+
* On a `scoped: true` component
|
|
1276
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1277
|
+
* returns the internal `childNodes` of the component
|
|
1278
|
+
*/
|
|
1279
|
+
readonly __childNodes?: NodeListOf<ChildNode>;
|
|
1280
|
+
/**
|
|
1281
|
+
* On a `scoped: true` component
|
|
1282
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1283
|
+
* returns the internal `children` of the component
|
|
1284
|
+
*/
|
|
1285
|
+
readonly __children?: HTMLCollectionOf<Element>;
|
|
1286
|
+
/**
|
|
1287
|
+
* On a `scoped: true` component
|
|
1288
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1289
|
+
* returns the internal `firstChild` of the component
|
|
1290
|
+
*/
|
|
1291
|
+
readonly __firstChild?: ChildNode;
|
|
1292
|
+
/**
|
|
1293
|
+
* On a `scoped: true` component
|
|
1294
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1295
|
+
* returns the internal `lastChild` of the component
|
|
1296
|
+
*/
|
|
1297
|
+
readonly __lastChild?: ChildNode;
|
|
1298
|
+
/**
|
|
1299
|
+
* On a `scoped: true` component
|
|
1300
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1301
|
+
* returns the internal `textContent` of the component
|
|
1302
|
+
*/
|
|
1303
|
+
__textContent?: string;
|
|
1304
|
+
/**
|
|
1305
|
+
* On a `scoped: true` component
|
|
1306
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1307
|
+
* gives access to the original `append` method
|
|
1308
|
+
*/
|
|
1309
|
+
__append?: (...nodes: (Node | string)[]) => void;
|
|
1310
|
+
/**
|
|
1311
|
+
* On a `scoped: true` component
|
|
1312
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1313
|
+
* gives access to the original `prepend` method
|
|
1314
|
+
*/
|
|
1315
|
+
__prepend?: (...nodes: (Node | string)[]) => void;
|
|
1316
|
+
/**
|
|
1317
|
+
* On a `scoped: true` component
|
|
1318
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1319
|
+
* gives access to the original `appendChild` method
|
|
1320
|
+
*/
|
|
1321
|
+
__appendChild?: <T extends Node>(newChild: T) => T;
|
|
1322
|
+
/**
|
|
1323
|
+
* On a `scoped: true` component
|
|
1324
|
+
* with `experimentalSlotFixes` flag enabled,
|
|
1325
|
+
* gives access to the original `removeChild` method
|
|
1326
|
+
*/
|
|
1327
|
+
__removeChild?: <T extends Node>(child: T) => T;
|
|
1259
1328
|
}
|
|
1260
1329
|
export type LazyBundlesRuntimeData = LazyBundleRuntimeData[];
|
|
1261
1330
|
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;
|