@rindo/core 4.21.0 → 4.22.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/lib.es2023.array.d.ts +5 -5
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +3518 -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 +22 -8
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +24 -14
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.d.ts +6 -0
- package/internal/hydrate/runner.js +449 -244
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +8 -0
- package/internal/rindo-public-compiler.d.ts +34 -0
- package/internal/rindo-public-runtime.d.ts +4 -0
- package/internal/testing/index.js +21 -7
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +85 -6
- package/mock-doc/index.d.ts +24 -0
- package/mock-doc/index.js +85 -6
- 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/internal/package.json
CHANGED
|
@@ -4,6 +4,14 @@ import type { CPSerializable } from './child_process';
|
|
|
4
4
|
import type { BuildEvents, BuildLog, BuildResultsComponentGraph, CompilerBuildResults, CompilerFsStats, CompilerRequestResponse, CompilerSystem, Config, CopyResults, DevServerConfig, DevServerEditor, Diagnostic, Logger, LoggerLineUpdater, LoggerTimeSpan, OptimizeCssInput, OptimizeCssOutput, OutputTarget, OutputTargetWww, PageReloadStrategy, PrerenderConfig, StyleDoc, TaskCommand, ValidatedConfig } from './rindo-public-compiler';
|
|
5
5
|
import type { JsonDocMethodParameter } from './rindo-public-docs';
|
|
6
6
|
import type { ComponentInterface, ListenTargetOptions, VNode } from './rindo-public-runtime';
|
|
7
|
+
export interface DocData {
|
|
8
|
+
hostIds: number;
|
|
9
|
+
rootLevelIds: number;
|
|
10
|
+
staticComponents: Set<string>;
|
|
11
|
+
}
|
|
12
|
+
export type RindoDocument = Document & {
|
|
13
|
+
_rindoDocData: DocData;
|
|
14
|
+
};
|
|
7
15
|
export interface SourceMap {
|
|
8
16
|
file: string;
|
|
9
17
|
mappings: string;
|
|
@@ -2,6 +2,7 @@ import type { ConfigFlags } from '../cli/config-flags';
|
|
|
2
2
|
import type { PrerenderUrlResults, PrintLine } from '../internal';
|
|
3
3
|
import type { BuildCtx, CompilerCtx } from './rindo-private';
|
|
4
4
|
import type { JsonDocs } from './rindo-public-docs';
|
|
5
|
+
import type { ResolutionHandler } from './rindo-public-runtime';
|
|
5
6
|
export * from './rindo-public-docs';
|
|
6
7
|
/**
|
|
7
8
|
* https://rindojs.web.app/docs/config/
|
|
@@ -246,6 +247,7 @@ export interface RindoConfig {
|
|
|
246
247
|
env?: {
|
|
247
248
|
[prop: string]: string | undefined;
|
|
248
249
|
};
|
|
250
|
+
docs?: RindoDocsConfig;
|
|
249
251
|
globalScript?: string;
|
|
250
252
|
srcIndexHtml?: string;
|
|
251
253
|
watch?: boolean;
|
|
@@ -859,6 +861,11 @@ export interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
859
861
|
* @default true
|
|
860
862
|
*/
|
|
861
863
|
fullDocument?: boolean;
|
|
864
|
+
/**
|
|
865
|
+
* Style modes to render the component in.
|
|
866
|
+
* @see https://rindojs.web.app/docs/styling#style-modes
|
|
867
|
+
*/
|
|
868
|
+
modes?: ResolutionHandler[];
|
|
862
869
|
}
|
|
863
870
|
export interface HydrateFactoryOptions extends SerializeDocumentOptions {
|
|
864
871
|
serializeToHtml: boolean;
|
|
@@ -1558,6 +1565,33 @@ export interface CopyTask {
|
|
|
1558
1565
|
*/
|
|
1559
1566
|
keepDirStructure?: boolean;
|
|
1560
1567
|
}
|
|
1568
|
+
/**
|
|
1569
|
+
* Configuration for generating documentation from Rindo components.
|
|
1570
|
+
*/
|
|
1571
|
+
export interface RindoDocsConfig {
|
|
1572
|
+
/**
|
|
1573
|
+
* Options for processing and rendering Markdown documentation files.
|
|
1574
|
+
*/
|
|
1575
|
+
markdown?: {
|
|
1576
|
+
/**
|
|
1577
|
+
* Styling for how the target component will be represented within documentation (e.g., in component diagrams).
|
|
1578
|
+
*/
|
|
1579
|
+
targetComponent?: {
|
|
1580
|
+
/**
|
|
1581
|
+
* Background color used for nodes representing the component in diagrams (e.g., Mermaid graphs).
|
|
1582
|
+
* Use standard color names or hex codes.
|
|
1583
|
+
* @example '#f0f0f0' (light gray)
|
|
1584
|
+
*/
|
|
1585
|
+
background?: string;
|
|
1586
|
+
/**
|
|
1587
|
+
* Text color used within nodes representing the component in diagrams (e.g., Mermaid graphs).
|
|
1588
|
+
* Use standard color names or hex codes.
|
|
1589
|
+
* @example '#333' (dark gray)
|
|
1590
|
+
*/
|
|
1591
|
+
textColor?: string;
|
|
1592
|
+
};
|
|
1593
|
+
};
|
|
1594
|
+
}
|
|
1561
1595
|
export interface BundlingConfig {
|
|
1562
1596
|
/**
|
|
1563
1597
|
* @deprecated the `namedExports` field is no longer honored by `@rollup/plugin-commonjs` and is not used by Rindo.
|
|
@@ -1564,6 +1564,10 @@ export declare namespace JSXBase {
|
|
|
1564
1564
|
onSubmitCapture?: (event: Event) => void;
|
|
1565
1565
|
onInvalid?: (event: Event) => void;
|
|
1566
1566
|
onInvalidCapture?: (event: Event) => void;
|
|
1567
|
+
onBeforeToggle?: (event: Event) => void;
|
|
1568
|
+
onBeforeToggleCapture?: (event: Event) => void;
|
|
1569
|
+
onToggle?: (event: Event) => void;
|
|
1570
|
+
onToggleCapture?: (event: Event) => void;
|
|
1567
1571
|
onLoad?: (event: Event) => void;
|
|
1568
1572
|
onLoadCapture?: (event: Event) => void;
|
|
1569
1573
|
onError?: (event: Event) => void;
|
|
@@ -560,6 +560,12 @@ var HYDRATE_ID = "s-id";
|
|
|
560
560
|
var HYDRATED_STYLE_ID = "sty-id";
|
|
561
561
|
var HYDRATE_CHILD_ID = "c-id";
|
|
562
562
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
563
|
+
var RINDO_DOC_DATA = "_rindoDocData";
|
|
564
|
+
var DEFAULT_DOC_DATA = {
|
|
565
|
+
hostIds: 0,
|
|
566
|
+
rootLevelIds: 0,
|
|
567
|
+
staticComponents: /* @__PURE__ */ new Set()
|
|
568
|
+
};
|
|
563
569
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
564
570
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
565
571
|
var FORM_ASSOCIATED_CUSTOM_ELEMENT_CALLBACKS = [
|
|
@@ -1017,10 +1023,15 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
1017
1023
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
1018
1024
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
1019
1025
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1020
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling :
|
|
1026
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1021
1027
|
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
1022
1028
|
} else if ("host" in styleContainerNode) {
|
|
1023
|
-
styleContainerNode.
|
|
1029
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1030
|
+
if (existingStyleContainer) {
|
|
1031
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1032
|
+
} else {
|
|
1033
|
+
styleContainerNode.prepend(styleElm);
|
|
1034
|
+
}
|
|
1024
1035
|
} else {
|
|
1025
1036
|
styleContainerNode.append(styleElm);
|
|
1026
1037
|
}
|
|
@@ -2514,6 +2525,11 @@ var patchSlotAppendChild = (HostElementPrototype) => {
|
|
|
2514
2525
|
const slotName = newChild["s-sn"] = getSlotName(newChild);
|
|
2515
2526
|
const slotNode = getHostSlotNode(this.childNodes, slotName, this.tagName);
|
|
2516
2527
|
if (slotNode) {
|
|
2528
|
+
const slotPlaceholder = document.createTextNode("");
|
|
2529
|
+
slotPlaceholder["s-nr"] = newChild;
|
|
2530
|
+
slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
|
|
2531
|
+
newChild["s-ol"] = slotPlaceholder;
|
|
2532
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
2517
2533
|
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2518
2534
|
const appendAfter = slotChildNodes[slotChildNodes.length - 1];
|
|
2519
2535
|
const insertedNode = insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
@@ -2555,6 +2571,7 @@ var patchSlotPrepend = (HostElementPrototype) => {
|
|
|
2555
2571
|
slotPlaceholder["s-nr"] = newChild;
|
|
2556
2572
|
slotNode["s-cr"].parentNode.__appendChild(slotPlaceholder);
|
|
2557
2573
|
newChild["s-ol"] = slotPlaceholder;
|
|
2574
|
+
newChild["s-sh"] = slotNode["s-hn"];
|
|
2558
2575
|
const slotChildNodes = getHostSlotChildNodes(slotNode, slotName);
|
|
2559
2576
|
const appendAfter = slotChildNodes[0];
|
|
2560
2577
|
return insertBefore(appendAfter.parentNode, newChild, appendAfter.nextSibling);
|
|
@@ -3119,11 +3136,8 @@ var setPlatformOptions = (opts) => Object.assign(plt, opts);
|
|
|
3119
3136
|
// src/runtime/vdom/vdom-annotations.ts
|
|
3120
3137
|
var insertVdomAnnotations = (doc2, staticComponents) => {
|
|
3121
3138
|
if (doc2 != null) {
|
|
3122
|
-
const docData = {
|
|
3123
|
-
|
|
3124
|
-
rootLevelIds: 0,
|
|
3125
|
-
staticComponents: new Set(staticComponents)
|
|
3126
|
-
};
|
|
3139
|
+
const docData = RINDO_DOC_DATA in doc2 ? doc2[RINDO_DOC_DATA] : { ...DEFAULT_DOC_DATA };
|
|
3140
|
+
docData.staticComponents = new Set(staticComponents);
|
|
3127
3141
|
const orgLocationNodes = [];
|
|
3128
3142
|
parseVNodeAnnotations(doc2, doc2.body, docData, orgLocationNodes);
|
|
3129
3143
|
orgLocationNodes.forEach((orgLocationNode) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/testing",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.1",
|
|
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.22.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -60,6 +60,7 @@ var CONTENT_REF_ID = "r";
|
|
|
60
60
|
var ORG_LOCATION_ID = "o";
|
|
61
61
|
var SLOT_NODE_ID = "s";
|
|
62
62
|
var TEXT_NODE_ID = "t";
|
|
63
|
+
var HYDRATE_ID = "s-id";
|
|
63
64
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
64
65
|
|
|
65
66
|
// src/mock-doc/attribute.ts
|
|
@@ -6438,6 +6439,13 @@ style="${cssText}">`;
|
|
|
6438
6439
|
output.indent = output.indent + ((_h = opts.indentSpaces) != null ? _h : 0);
|
|
6439
6440
|
}
|
|
6440
6441
|
for (let i = 0; i < childNodeLength; i++) {
|
|
6442
|
+
const sId = node.attributes.getNamedItem(HYDRATE_ID);
|
|
6443
|
+
const isRindoDeclarativeShadowDOM = childNodes[i].nodeName.toLowerCase() === "template" && sId;
|
|
6444
|
+
if (isRindoDeclarativeShadowDOM) {
|
|
6445
|
+
yield `
|
|
6446
|
+
${" ".repeat(output.indent)}<!--r.${sId.value}-->`;
|
|
6447
|
+
continue;
|
|
6448
|
+
}
|
|
6441
6449
|
yield* streamToHtml(childNodes[i], opts, output);
|
|
6442
6450
|
}
|
|
6443
6451
|
if (ignoreTag === false) {
|
|
@@ -8926,6 +8934,71 @@ function resetPerformance(perf) {
|
|
|
8926
8934
|
}
|
|
8927
8935
|
}
|
|
8928
8936
|
|
|
8937
|
+
// src/mock-doc/resize-observer.ts
|
|
8938
|
+
var MockResizeObserver = class {
|
|
8939
|
+
constructor() {
|
|
8940
|
+
}
|
|
8941
|
+
disconnect() {
|
|
8942
|
+
}
|
|
8943
|
+
observe() {
|
|
8944
|
+
}
|
|
8945
|
+
takeRecords() {
|
|
8946
|
+
return [];
|
|
8947
|
+
}
|
|
8948
|
+
unobserve() {
|
|
8949
|
+
}
|
|
8950
|
+
};
|
|
8951
|
+
|
|
8952
|
+
// src/mock-doc/shadow-root.ts
|
|
8953
|
+
var MockShadowRoot = class extends MockDocumentFragment {
|
|
8954
|
+
get activeElement() {
|
|
8955
|
+
return null;
|
|
8956
|
+
}
|
|
8957
|
+
set adoptedStyleSheets(_adoptedStyleSheets) {
|
|
8958
|
+
throw new Error("Unimplemented");
|
|
8959
|
+
}
|
|
8960
|
+
get adoptedStyleSheets() {
|
|
8961
|
+
return [];
|
|
8962
|
+
}
|
|
8963
|
+
get cloneable() {
|
|
8964
|
+
return false;
|
|
8965
|
+
}
|
|
8966
|
+
get delegatesFocus() {
|
|
8967
|
+
return false;
|
|
8968
|
+
}
|
|
8969
|
+
get fullscreenElement() {
|
|
8970
|
+
return null;
|
|
8971
|
+
}
|
|
8972
|
+
get host() {
|
|
8973
|
+
let parent = this.parentElement();
|
|
8974
|
+
while (parent) {
|
|
8975
|
+
if (parent.nodeType === 11) {
|
|
8976
|
+
return parent;
|
|
8977
|
+
}
|
|
8978
|
+
parent = parent.parentElement();
|
|
8979
|
+
}
|
|
8980
|
+
return null;
|
|
8981
|
+
}
|
|
8982
|
+
get mode() {
|
|
8983
|
+
return "open";
|
|
8984
|
+
}
|
|
8985
|
+
get pictureInPictureElement() {
|
|
8986
|
+
return null;
|
|
8987
|
+
}
|
|
8988
|
+
get pointerLockElement() {
|
|
8989
|
+
return null;
|
|
8990
|
+
}
|
|
8991
|
+
get serializable() {
|
|
8992
|
+
return false;
|
|
8993
|
+
}
|
|
8994
|
+
get slotAssignment() {
|
|
8995
|
+
return "named";
|
|
8996
|
+
}
|
|
8997
|
+
get styleSheets() {
|
|
8998
|
+
return [];
|
|
8999
|
+
}
|
|
9000
|
+
};
|
|
9001
|
+
|
|
8929
9002
|
// src/mock-doc/storage.ts
|
|
8930
9003
|
var MockStorage = class {
|
|
8931
9004
|
constructor() {
|
|
@@ -8955,11 +9028,11 @@ var MockStorage = class {
|
|
|
8955
9028
|
};
|
|
8956
9029
|
|
|
8957
9030
|
// src/mock-doc/window.ts
|
|
8958
|
-
var nativeClearInterval = clearInterval;
|
|
8959
|
-
var nativeClearTimeout = clearTimeout;
|
|
8960
|
-
var nativeSetInterval = setInterval;
|
|
8961
|
-
var nativeSetTimeout = setTimeout;
|
|
8962
|
-
var nativeURL = URL;
|
|
9031
|
+
var nativeClearInterval = globalThis.clearInterval;
|
|
9032
|
+
var nativeClearTimeout = globalThis.clearTimeout;
|
|
9033
|
+
var nativeSetInterval = globalThis.setInterval;
|
|
9034
|
+
var nativeSetTimeout = globalThis.setTimeout;
|
|
9035
|
+
var nativeURL = globalThis.URL;
|
|
8963
9036
|
var nativeWindow = globalThis.window;
|
|
8964
9037
|
var MockWindow = class {
|
|
8965
9038
|
constructor(html = null) {
|
|
@@ -9054,6 +9127,9 @@ var MockWindow = class {
|
|
|
9054
9127
|
set DocumentFragment(docFragCstr) {
|
|
9055
9128
|
this.__docFragCstr = docFragCstr;
|
|
9056
9129
|
}
|
|
9130
|
+
get ShadowRoot() {
|
|
9131
|
+
return MockShadowRoot;
|
|
9132
|
+
}
|
|
9057
9133
|
get DocumentType() {
|
|
9058
9134
|
if (this.__docTypeCstr == null) {
|
|
9059
9135
|
const ownerDocument = this.document;
|
|
@@ -9165,6 +9241,9 @@ var MockWindow = class {
|
|
|
9165
9241
|
get IntersectionObserver() {
|
|
9166
9242
|
return MockIntersectionObserver;
|
|
9167
9243
|
}
|
|
9244
|
+
get ResizeObserver() {
|
|
9245
|
+
return MockResizeObserver;
|
|
9246
|
+
}
|
|
9168
9247
|
get localStorage() {
|
|
9169
9248
|
if (this.__localStorage == null) {
|
|
9170
9249
|
this.__localStorage = new MockStorage();
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -825,6 +825,13 @@ declare class MockResponse {
|
|
|
825
825
|
text(): Promise<string>;
|
|
826
826
|
clone(): MockResponse;
|
|
827
827
|
}
|
|
828
|
+
declare class MockResizeObserver {
|
|
829
|
+
constructor();
|
|
830
|
+
disconnect(): void;
|
|
831
|
+
observe(): void;
|
|
832
|
+
takeRecords(): any[];
|
|
833
|
+
unobserve(): void;
|
|
834
|
+
}
|
|
828
835
|
/**
|
|
829
836
|
* Check whether an element of interest matches a given selector.
|
|
830
837
|
*
|
|
@@ -893,6 +900,21 @@ interface SerializeNodeToHtmlOptions {
|
|
|
893
900
|
serializeShadowRoot?: boolean;
|
|
894
901
|
fullDocument?: boolean;
|
|
895
902
|
}
|
|
903
|
+
declare class MockShadowRoot extends MockDocumentFragment {
|
|
904
|
+
get activeElement(): HTMLElement | null;
|
|
905
|
+
set adoptedStyleSheets(_adoptedStyleSheets: StyleSheet[]);
|
|
906
|
+
get adoptedStyleSheets(): StyleSheet[];
|
|
907
|
+
get cloneable(): boolean;
|
|
908
|
+
get delegatesFocus(): boolean;
|
|
909
|
+
get fullscreenElement(): HTMLElement | null;
|
|
910
|
+
get host(): HTMLElement | null;
|
|
911
|
+
get mode(): 'open' | 'closed';
|
|
912
|
+
get pictureInPictureElement(): HTMLElement | null;
|
|
913
|
+
get pointerLockElement(): HTMLElement | null;
|
|
914
|
+
get serializable(): boolean;
|
|
915
|
+
get slotAssignment(): 'named' | 'manual';
|
|
916
|
+
get styleSheets(): StyleSheet[];
|
|
917
|
+
}
|
|
896
918
|
declare class MockStorage {
|
|
897
919
|
key(_value: number): void;
|
|
898
920
|
getItem(key: string): string;
|
|
@@ -947,6 +969,7 @@ declare class MockWindow {
|
|
|
947
969
|
set Document(docCstr: any);
|
|
948
970
|
get DocumentFragment(): any;
|
|
949
971
|
set DocumentFragment(docFragCstr: any);
|
|
972
|
+
get ShadowRoot(): typeof MockShadowRoot;
|
|
950
973
|
get DocumentType(): any;
|
|
951
974
|
set DocumentType(docTypeCstr: any);
|
|
952
975
|
get DOMTokenList(): any;
|
|
@@ -963,6 +986,7 @@ declare class MockWindow {
|
|
|
963
986
|
get HTMLElement(): any;
|
|
964
987
|
set HTMLElement(htmlElementCstr: any);
|
|
965
988
|
get IntersectionObserver(): typeof MockIntersectionObserver;
|
|
989
|
+
get ResizeObserver(): typeof MockResizeObserver;
|
|
966
990
|
get localStorage(): MockStorage;
|
|
967
991
|
set localStorage(locStorage: MockStorage);
|
|
968
992
|
get location(): MockLocation;
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc v4.
|
|
2
|
+
Rindo Mock Doc v4.22.1 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -7,6 +7,7 @@ var CONTENT_REF_ID = "r";
|
|
|
7
7
|
var ORG_LOCATION_ID = "o";
|
|
8
8
|
var SLOT_NODE_ID = "s";
|
|
9
9
|
var TEXT_NODE_ID = "t";
|
|
10
|
+
var HYDRATE_ID = "s-id";
|
|
10
11
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
11
12
|
|
|
12
13
|
// src/mock-doc/attribute.ts
|
|
@@ -6385,6 +6386,13 @@ style="${cssText}">`;
|
|
|
6385
6386
|
output.indent = output.indent + ((_h = opts.indentSpaces) != null ? _h : 0);
|
|
6386
6387
|
}
|
|
6387
6388
|
for (let i = 0; i < childNodeLength; i++) {
|
|
6389
|
+
const sId = node.attributes.getNamedItem(HYDRATE_ID);
|
|
6390
|
+
const isRindoDeclarativeShadowDOM = childNodes[i].nodeName.toLowerCase() === "template" && sId;
|
|
6391
|
+
if (isRindoDeclarativeShadowDOM) {
|
|
6392
|
+
yield `
|
|
6393
|
+
${" ".repeat(output.indent)}<!--r.${sId.value}-->`;
|
|
6394
|
+
continue;
|
|
6395
|
+
}
|
|
6388
6396
|
yield* streamToHtml(childNodes[i], opts, output);
|
|
6389
6397
|
}
|
|
6390
6398
|
if (ignoreTag === false) {
|
|
@@ -8873,6 +8881,71 @@ function resetPerformance(perf) {
|
|
|
8873
8881
|
}
|
|
8874
8882
|
}
|
|
8875
8883
|
|
|
8884
|
+
// src/mock-doc/resize-observer.ts
|
|
8885
|
+
var MockResizeObserver = class {
|
|
8886
|
+
constructor() {
|
|
8887
|
+
}
|
|
8888
|
+
disconnect() {
|
|
8889
|
+
}
|
|
8890
|
+
observe() {
|
|
8891
|
+
}
|
|
8892
|
+
takeRecords() {
|
|
8893
|
+
return [];
|
|
8894
|
+
}
|
|
8895
|
+
unobserve() {
|
|
8896
|
+
}
|
|
8897
|
+
};
|
|
8898
|
+
|
|
8899
|
+
// src/mock-doc/shadow-root.ts
|
|
8900
|
+
var MockShadowRoot = class extends MockDocumentFragment {
|
|
8901
|
+
get activeElement() {
|
|
8902
|
+
return null;
|
|
8903
|
+
}
|
|
8904
|
+
set adoptedStyleSheets(_adoptedStyleSheets) {
|
|
8905
|
+
throw new Error("Unimplemented");
|
|
8906
|
+
}
|
|
8907
|
+
get adoptedStyleSheets() {
|
|
8908
|
+
return [];
|
|
8909
|
+
}
|
|
8910
|
+
get cloneable() {
|
|
8911
|
+
return false;
|
|
8912
|
+
}
|
|
8913
|
+
get delegatesFocus() {
|
|
8914
|
+
return false;
|
|
8915
|
+
}
|
|
8916
|
+
get fullscreenElement() {
|
|
8917
|
+
return null;
|
|
8918
|
+
}
|
|
8919
|
+
get host() {
|
|
8920
|
+
let parent = this.parentElement();
|
|
8921
|
+
while (parent) {
|
|
8922
|
+
if (parent.nodeType === 11) {
|
|
8923
|
+
return parent;
|
|
8924
|
+
}
|
|
8925
|
+
parent = parent.parentElement();
|
|
8926
|
+
}
|
|
8927
|
+
return null;
|
|
8928
|
+
}
|
|
8929
|
+
get mode() {
|
|
8930
|
+
return "open";
|
|
8931
|
+
}
|
|
8932
|
+
get pictureInPictureElement() {
|
|
8933
|
+
return null;
|
|
8934
|
+
}
|
|
8935
|
+
get pointerLockElement() {
|
|
8936
|
+
return null;
|
|
8937
|
+
}
|
|
8938
|
+
get serializable() {
|
|
8939
|
+
return false;
|
|
8940
|
+
}
|
|
8941
|
+
get slotAssignment() {
|
|
8942
|
+
return "named";
|
|
8943
|
+
}
|
|
8944
|
+
get styleSheets() {
|
|
8945
|
+
return [];
|
|
8946
|
+
}
|
|
8947
|
+
};
|
|
8948
|
+
|
|
8876
8949
|
// src/mock-doc/storage.ts
|
|
8877
8950
|
var MockStorage = class {
|
|
8878
8951
|
constructor() {
|
|
@@ -8902,11 +8975,11 @@ var MockStorage = class {
|
|
|
8902
8975
|
};
|
|
8903
8976
|
|
|
8904
8977
|
// src/mock-doc/window.ts
|
|
8905
|
-
var nativeClearInterval = clearInterval;
|
|
8906
|
-
var nativeClearTimeout = clearTimeout;
|
|
8907
|
-
var nativeSetInterval = setInterval;
|
|
8908
|
-
var nativeSetTimeout = setTimeout;
|
|
8909
|
-
var nativeURL = URL;
|
|
8978
|
+
var nativeClearInterval = globalThis.clearInterval;
|
|
8979
|
+
var nativeClearTimeout = globalThis.clearTimeout;
|
|
8980
|
+
var nativeSetInterval = globalThis.setInterval;
|
|
8981
|
+
var nativeSetTimeout = globalThis.setTimeout;
|
|
8982
|
+
var nativeURL = globalThis.URL;
|
|
8910
8983
|
var nativeWindow = globalThis.window;
|
|
8911
8984
|
var MockWindow = class {
|
|
8912
8985
|
constructor(html = null) {
|
|
@@ -9001,6 +9074,9 @@ var MockWindow = class {
|
|
|
9001
9074
|
set DocumentFragment(docFragCstr) {
|
|
9002
9075
|
this.__docFragCstr = docFragCstr;
|
|
9003
9076
|
}
|
|
9077
|
+
get ShadowRoot() {
|
|
9078
|
+
return MockShadowRoot;
|
|
9079
|
+
}
|
|
9004
9080
|
get DocumentType() {
|
|
9005
9081
|
if (this.__docTypeCstr == null) {
|
|
9006
9082
|
const ownerDocument = this.document;
|
|
@@ -9112,6 +9188,9 @@ var MockWindow = class {
|
|
|
9112
9188
|
get IntersectionObserver() {
|
|
9113
9189
|
return MockIntersectionObserver;
|
|
9114
9190
|
}
|
|
9191
|
+
get ResizeObserver() {
|
|
9192
|
+
return MockResizeObserver;
|
|
9193
|
+
}
|
|
9115
9194
|
get localStorage() {
|
|
9116
9195
|
if (this.__localStorage == null) {
|
|
9117
9196
|
this.__localStorage = new MockStorage();
|
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.22.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/rindo-core/index.cjs",
|
|
6
6
|
"module": "./internal/rindo-core/index.js",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"semver": "^7.3.7",
|
|
184
184
|
"terser": "5.31.1",
|
|
185
185
|
"tsx": "^4.10.3",
|
|
186
|
-
"typescript": "~5.5.
|
|
186
|
+
"typescript": "~5.5.4",
|
|
187
187
|
"webpack": "^5.75.0",
|
|
188
188
|
"ws": "8.17.1"
|
|
189
189
|
},
|
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED