@rindo/core 4.23.2 → 4.25.3
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 +2 -5
- package/cli/index.js +2 -5
- package/cli/package.json +1 -1
- package/compiler/package.json +1 -1
- package/compiler/rindo.js +2441 -841
- 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 +10 -10
- package/internal/app-data/package.json +1 -1
- package/internal/client/index.js +2006 -1881
- package/internal/client/package.json +1 -1
- package/internal/client/patch-browser.js +1 -1
- package/internal/hydrate/index.js +2029 -1852
- package/internal/hydrate/package.json +1 -1
- package/internal/hydrate/runner.js +111 -42
- package/internal/package.json +1 -1
- package/internal/rindo-private.d.ts +70 -2
- package/internal/rindo-public-compiler.d.ts +9 -11
- package/internal/testing/index.js +1803 -1685
- package/internal/testing/package.json +1 -1
- package/mock-doc/index.cjs +69 -5
- package/mock-doc/index.d.ts +9 -0
- package/mock-doc/index.js +69 -5
- package/mock-doc/package.json +1 -1
- package/package.json +3 -3
- package/screenshot/index.js +1 -1
- package/screenshot/package.json +1 -1
- package/screenshot/pixel-match.js +1 -1
- package/sys/node/autoprefixer.js +2 -2
- package/sys/node/glob.js +1 -1
- package/sys/node/index.js +1 -1
- package/sys/node/package.json +1 -1
- package/sys/node/worker.js +1 -1
- package/testing/index.js +28 -19
- package/testing/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rindo/core/internal/testing",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.3",
|
|
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.25.3 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
"use strict";
|
|
5
5
|
var __defProp = Object.defineProperty;
|
|
@@ -6841,7 +6841,7 @@ var MockNode2 = class {
|
|
|
6841
6841
|
}
|
|
6842
6842
|
remove() {
|
|
6843
6843
|
if (this.parentNode != null) {
|
|
6844
|
-
this.parentNode.removeChild(this);
|
|
6844
|
+
this.__parentNode ? this.__parentNode.removeChild(this) : this.parentNode.removeChild(this);
|
|
6845
6845
|
}
|
|
6846
6846
|
}
|
|
6847
6847
|
replaceChild(newChild, oldChild) {
|
|
@@ -7795,6 +7795,10 @@ function createElement(ownerDocument, tagName) {
|
|
|
7795
7795
|
return new MockMetaElement(ownerDocument);
|
|
7796
7796
|
case "script":
|
|
7797
7797
|
return new MockScriptElement(ownerDocument);
|
|
7798
|
+
case "slot":
|
|
7799
|
+
return new MockSlotElement(ownerDocument);
|
|
7800
|
+
case "slot-fb":
|
|
7801
|
+
return new MockHTMLElement(ownerDocument, tagName);
|
|
7798
7802
|
case "style":
|
|
7799
7803
|
return new MockStyleElement(ownerDocument);
|
|
7800
7804
|
case "template":
|
|
@@ -7803,8 +7807,6 @@ function createElement(ownerDocument, tagName) {
|
|
|
7803
7807
|
return new MockTitleElement(ownerDocument);
|
|
7804
7808
|
case "ul":
|
|
7805
7809
|
return new MockUListElement(ownerDocument);
|
|
7806
|
-
case "slot-fb":
|
|
7807
|
-
return new MockHTMLElement(ownerDocument, tagName);
|
|
7808
7810
|
}
|
|
7809
7811
|
if (ownerDocument != null && tagName.includes("-")) {
|
|
7810
7812
|
const win = ownerDocument.defaultView;
|
|
@@ -8224,6 +8226,68 @@ var MockUListElement = class extends MockHTMLElement {
|
|
|
8224
8226
|
super(ownerDocument, "ul");
|
|
8225
8227
|
}
|
|
8226
8228
|
};
|
|
8229
|
+
var MockSlotElement = class _MockSlotElement extends MockHTMLElement {
|
|
8230
|
+
constructor(ownerDocument) {
|
|
8231
|
+
super(ownerDocument, "slot");
|
|
8232
|
+
}
|
|
8233
|
+
assignedNodes(opts) {
|
|
8234
|
+
let nodesToReturn = [];
|
|
8235
|
+
const ownerHost = this.getRootNode().host;
|
|
8236
|
+
if (!ownerHost) return nodesToReturn;
|
|
8237
|
+
if (ownerHost.childNodes.length) {
|
|
8238
|
+
if (this.name) {
|
|
8239
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8240
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && n.getAttribute("slot") === this.name
|
|
8241
|
+
);
|
|
8242
|
+
} else {
|
|
8243
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8244
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && !n.getAttribute("slot") || n.nodeType !== 1 /* ELEMENT_NODE */
|
|
8245
|
+
);
|
|
8246
|
+
}
|
|
8247
|
+
if (nodesToReturn.length) return nodesToReturn;
|
|
8248
|
+
}
|
|
8249
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.childNodes.filter((n) => !(n instanceof _MockSlotElement));
|
|
8250
|
+
return this.childNodes.reduce(
|
|
8251
|
+
(acc, node) => {
|
|
8252
|
+
if (node instanceof _MockSlotElement) {
|
|
8253
|
+
acc.push(...node.assignedNodes(opts));
|
|
8254
|
+
} else {
|
|
8255
|
+
acc.push(node);
|
|
8256
|
+
}
|
|
8257
|
+
return acc;
|
|
8258
|
+
},
|
|
8259
|
+
[]
|
|
8260
|
+
);
|
|
8261
|
+
}
|
|
8262
|
+
assignedElements(opts) {
|
|
8263
|
+
let elesToReturn = [];
|
|
8264
|
+
const ownerHost = this.getRootNode().host;
|
|
8265
|
+
if (!ownerHost) return elesToReturn;
|
|
8266
|
+
if (ownerHost.children.length) {
|
|
8267
|
+
if (this.name) {
|
|
8268
|
+
elesToReturn = ownerHost.children.filter((n) => n.getAttribute("slot") == this.name);
|
|
8269
|
+
} else {
|
|
8270
|
+
elesToReturn = ownerHost.children.filter((n) => !n.getAttribute("slot"));
|
|
8271
|
+
}
|
|
8272
|
+
if (elesToReturn.length) return elesToReturn;
|
|
8273
|
+
}
|
|
8274
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.children.filter((n) => !(n instanceof _MockSlotElement));
|
|
8275
|
+
return this.children.reduce(
|
|
8276
|
+
(acc, node) => {
|
|
8277
|
+
if (node instanceof _MockSlotElement) {
|
|
8278
|
+
acc.push(...node.assignedElements(opts));
|
|
8279
|
+
} else {
|
|
8280
|
+
acc.push(node);
|
|
8281
|
+
}
|
|
8282
|
+
return acc;
|
|
8283
|
+
},
|
|
8284
|
+
[]
|
|
8285
|
+
);
|
|
8286
|
+
}
|
|
8287
|
+
};
|
|
8288
|
+
patchPropAttributes(MockSlotElement.prototype, {
|
|
8289
|
+
name: String
|
|
8290
|
+
});
|
|
8227
8291
|
var CanvasRenderingContext = class {
|
|
8228
8292
|
constructor(context, contextAttributes) {
|
|
8229
8293
|
this.context = context;
|
|
@@ -9644,7 +9708,7 @@ function resetWindowDefaults(win) {
|
|
|
9644
9708
|
win.__clearTimeout = nativeClearTimeout;
|
|
9645
9709
|
win.__setInterval = nativeSetInterval;
|
|
9646
9710
|
win.__setTimeout = nativeSetTimeout;
|
|
9647
|
-
win.__maxTimeout =
|
|
9711
|
+
win.__maxTimeout = 6e4;
|
|
9648
9712
|
win.__allowInterval = true;
|
|
9649
9713
|
win.URL = nativeURL;
|
|
9650
9714
|
}
|
package/mock-doc/index.d.ts
CHANGED
|
@@ -312,6 +312,15 @@ declare class MockTitleElement extends MockHTMLElement {
|
|
|
312
312
|
declare class MockUListElement extends MockHTMLElement {
|
|
313
313
|
constructor(ownerDocument: any);
|
|
314
314
|
}
|
|
315
|
+
declare class MockSlotElement extends MockHTMLElement {
|
|
316
|
+
constructor(ownerDocument: any);
|
|
317
|
+
assignedNodes(opts?: {
|
|
318
|
+
flatten: boolean;
|
|
319
|
+
}): (MockNode | Node)[];
|
|
320
|
+
assignedElements(opts?: {
|
|
321
|
+
flatten: boolean;
|
|
322
|
+
}): (Element | MockHTMLElement)[];
|
|
323
|
+
}
|
|
315
324
|
type CanvasContext = '2d' | 'webgl' | 'webgl2' | 'bitmaprenderer';
|
|
316
325
|
declare class CanvasRenderingContext {
|
|
317
326
|
context: CanvasContext;
|
package/mock-doc/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
Rindo Mock Doc v4.
|
|
2
|
+
Rindo Mock Doc v4.25.3 | MIT Licensed | https://rindojs.web.app
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// src/runtime/runtime-constants.ts
|
|
@@ -6788,7 +6788,7 @@ var MockNode2 = class {
|
|
|
6788
6788
|
}
|
|
6789
6789
|
remove() {
|
|
6790
6790
|
if (this.parentNode != null) {
|
|
6791
|
-
this.parentNode.removeChild(this);
|
|
6791
|
+
this.__parentNode ? this.__parentNode.removeChild(this) : this.parentNode.removeChild(this);
|
|
6792
6792
|
}
|
|
6793
6793
|
}
|
|
6794
6794
|
replaceChild(newChild, oldChild) {
|
|
@@ -7742,6 +7742,10 @@ function createElement(ownerDocument, tagName) {
|
|
|
7742
7742
|
return new MockMetaElement(ownerDocument);
|
|
7743
7743
|
case "script":
|
|
7744
7744
|
return new MockScriptElement(ownerDocument);
|
|
7745
|
+
case "slot":
|
|
7746
|
+
return new MockSlotElement(ownerDocument);
|
|
7747
|
+
case "slot-fb":
|
|
7748
|
+
return new MockHTMLElement(ownerDocument, tagName);
|
|
7745
7749
|
case "style":
|
|
7746
7750
|
return new MockStyleElement(ownerDocument);
|
|
7747
7751
|
case "template":
|
|
@@ -7750,8 +7754,6 @@ function createElement(ownerDocument, tagName) {
|
|
|
7750
7754
|
return new MockTitleElement(ownerDocument);
|
|
7751
7755
|
case "ul":
|
|
7752
7756
|
return new MockUListElement(ownerDocument);
|
|
7753
|
-
case "slot-fb":
|
|
7754
|
-
return new MockHTMLElement(ownerDocument, tagName);
|
|
7755
7757
|
}
|
|
7756
7758
|
if (ownerDocument != null && tagName.includes("-")) {
|
|
7757
7759
|
const win = ownerDocument.defaultView;
|
|
@@ -8171,6 +8173,68 @@ var MockUListElement = class extends MockHTMLElement {
|
|
|
8171
8173
|
super(ownerDocument, "ul");
|
|
8172
8174
|
}
|
|
8173
8175
|
};
|
|
8176
|
+
var MockSlotElement = class _MockSlotElement extends MockHTMLElement {
|
|
8177
|
+
constructor(ownerDocument) {
|
|
8178
|
+
super(ownerDocument, "slot");
|
|
8179
|
+
}
|
|
8180
|
+
assignedNodes(opts) {
|
|
8181
|
+
let nodesToReturn = [];
|
|
8182
|
+
const ownerHost = this.getRootNode().host;
|
|
8183
|
+
if (!ownerHost) return nodesToReturn;
|
|
8184
|
+
if (ownerHost.childNodes.length) {
|
|
8185
|
+
if (this.name) {
|
|
8186
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8187
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && n.getAttribute("slot") === this.name
|
|
8188
|
+
);
|
|
8189
|
+
} else {
|
|
8190
|
+
nodesToReturn = ownerHost.childNodes.filter(
|
|
8191
|
+
(n) => n.nodeType === 1 /* ELEMENT_NODE */ && !n.getAttribute("slot") || n.nodeType !== 1 /* ELEMENT_NODE */
|
|
8192
|
+
);
|
|
8193
|
+
}
|
|
8194
|
+
if (nodesToReturn.length) return nodesToReturn;
|
|
8195
|
+
}
|
|
8196
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.childNodes.filter((n) => !(n instanceof _MockSlotElement));
|
|
8197
|
+
return this.childNodes.reduce(
|
|
8198
|
+
(acc, node) => {
|
|
8199
|
+
if (node instanceof _MockSlotElement) {
|
|
8200
|
+
acc.push(...node.assignedNodes(opts));
|
|
8201
|
+
} else {
|
|
8202
|
+
acc.push(node);
|
|
8203
|
+
}
|
|
8204
|
+
return acc;
|
|
8205
|
+
},
|
|
8206
|
+
[]
|
|
8207
|
+
);
|
|
8208
|
+
}
|
|
8209
|
+
assignedElements(opts) {
|
|
8210
|
+
let elesToReturn = [];
|
|
8211
|
+
const ownerHost = this.getRootNode().host;
|
|
8212
|
+
if (!ownerHost) return elesToReturn;
|
|
8213
|
+
if (ownerHost.children.length) {
|
|
8214
|
+
if (this.name) {
|
|
8215
|
+
elesToReturn = ownerHost.children.filter((n) => n.getAttribute("slot") == this.name);
|
|
8216
|
+
} else {
|
|
8217
|
+
elesToReturn = ownerHost.children.filter((n) => !n.getAttribute("slot"));
|
|
8218
|
+
}
|
|
8219
|
+
if (elesToReturn.length) return elesToReturn;
|
|
8220
|
+
}
|
|
8221
|
+
if (!(opts == null ? void 0 : opts.flatten)) return this.children.filter((n) => !(n instanceof _MockSlotElement));
|
|
8222
|
+
return this.children.reduce(
|
|
8223
|
+
(acc, node) => {
|
|
8224
|
+
if (node instanceof _MockSlotElement) {
|
|
8225
|
+
acc.push(...node.assignedElements(opts));
|
|
8226
|
+
} else {
|
|
8227
|
+
acc.push(node);
|
|
8228
|
+
}
|
|
8229
|
+
return acc;
|
|
8230
|
+
},
|
|
8231
|
+
[]
|
|
8232
|
+
);
|
|
8233
|
+
}
|
|
8234
|
+
};
|
|
8235
|
+
patchPropAttributes(MockSlotElement.prototype, {
|
|
8236
|
+
name: String
|
|
8237
|
+
});
|
|
8174
8238
|
var CanvasRenderingContext = class {
|
|
8175
8239
|
constructor(context, contextAttributes) {
|
|
8176
8240
|
this.context = context;
|
|
@@ -9591,7 +9655,7 @@ function resetWindowDefaults(win) {
|
|
|
9591
9655
|
win.__clearTimeout = nativeClearTimeout;
|
|
9592
9656
|
win.__setInterval = nativeSetInterval;
|
|
9593
9657
|
win.__setTimeout = nativeSetTimeout;
|
|
9594
|
-
win.__maxTimeout =
|
|
9658
|
+
win.__maxTimeout = 6e4;
|
|
9595
9659
|
win.__allowInterval = true;
|
|
9596
9660
|
win.URL = nativeURL;
|
|
9597
9661
|
}
|
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.25.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./internal/rindo-core/index.cjs",
|
|
6
6
|
"module": "./internal/rindo-core/index.js",
|
|
@@ -177,12 +177,12 @@
|
|
|
177
177
|
"postcss": "^8.2.8",
|
|
178
178
|
"prettier": "3.3.1",
|
|
179
179
|
"prompts": "2.4.2",
|
|
180
|
-
"puppeteer": "^
|
|
180
|
+
"puppeteer": "^24.1.0",
|
|
181
181
|
"rimraf": "^6.0.1",
|
|
182
182
|
"rollup": "2.56.3",
|
|
183
183
|
"semver": "^7.3.7",
|
|
184
184
|
"terser": "5.31.1",
|
|
185
|
-
"tsx": "^4.
|
|
185
|
+
"tsx": "^4.19.2",
|
|
186
186
|
"typescript": "~5.5.4",
|
|
187
187
|
"webpack": "^5.75.0",
|
|
188
188
|
"ws": "8.17.1"
|
package/screenshot/index.js
CHANGED
package/screenshot/package.json
CHANGED