x-runtime-lib 0.8.138 → 0.8.139
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/dist/index.js +17 -11
- package/dist/types/kind.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -193,8 +193,9 @@ function Wi(t) {
|
|
|
193
193
|
switch (t) {
|
|
194
194
|
case "refProperty":
|
|
195
195
|
case "multipleRefProperty":
|
|
196
|
+
case "slotProperty":
|
|
197
|
+
case "multipleSlotProperty":
|
|
196
198
|
case "customProperty":
|
|
197
|
-
case "customSlotProperty":
|
|
198
199
|
case "adaptSlotCustomProperty":
|
|
199
200
|
return !1;
|
|
200
201
|
}
|
|
@@ -204,8 +205,9 @@ function Bi(t) {
|
|
|
204
205
|
switch (t) {
|
|
205
206
|
case "refMethod":
|
|
206
207
|
case "multipleRefMethod":
|
|
208
|
+
case "slotMethod":
|
|
209
|
+
case "multipleSlotMethod":
|
|
207
210
|
case "customMethod":
|
|
208
|
-
case "customSlotMethod":
|
|
209
211
|
case "adaptSlotCustomMethod":
|
|
210
212
|
return !1;
|
|
211
213
|
}
|
|
@@ -215,13 +217,15 @@ function Ri(t) {
|
|
|
215
217
|
switch (t) {
|
|
216
218
|
case "refEvent":
|
|
217
219
|
case "multipleRefEvent":
|
|
220
|
+
case "slotEvent":
|
|
221
|
+
case "multipleSlotEvent":
|
|
218
222
|
case "customEvent":
|
|
219
|
-
case "customSlotEvent":
|
|
220
223
|
case "adaptSlotCustomEvent":
|
|
221
224
|
case "refPropertyChangeEvent":
|
|
222
225
|
case "multipleRefPropertyChangeEvent":
|
|
226
|
+
case "slotPropertyChangeEvent":
|
|
227
|
+
case "multipleSlotPropertyChangeEvent":
|
|
223
228
|
case "customPropertyChangeEvent":
|
|
224
|
-
case "customSlotPropertyChangeEvent":
|
|
225
229
|
case "adaptSlotCustomPropertyChangeEvent":
|
|
226
230
|
case "stateChangeEvent":
|
|
227
231
|
return !1;
|
|
@@ -324,17 +328,17 @@ function ln(t, n, e) {
|
|
|
324
328
|
function wu(t, n) {
|
|
325
329
|
const { i18n: e } = ue;
|
|
326
330
|
let o = "";
|
|
327
|
-
return t === "elementProperty" || (t === "refProperty" || t === "multipleRefProperty" || t === "
|
|
331
|
+
return t === "elementProperty" || (t === "refProperty" || t === "multipleRefProperty" || t === "slotProperty" || t === "multipleSlotProperty" || t === "customProperty" ? o = e.global.t("x-runtime-lib.custom") : t === "adaptSlotElementProperty" || t === "adaptSlotCustomProperty" ? o = e.global.t("x-runtime-lib.adaptSlot") : console.assert(!1)), ln(o, n, Wi(t));
|
|
328
332
|
}
|
|
329
333
|
function Iu(t, n) {
|
|
330
334
|
const { i18n: e } = ue;
|
|
331
335
|
let o = "";
|
|
332
|
-
return t === "elementMethod" || (t === "refMethod" || t === "multipleRefMethod" || t === "
|
|
336
|
+
return t === "elementMethod" || (t === "refMethod" || t === "multipleRefMethod" || t === "slotMethod" || t === "multipleSlotMethod" || t === "customMethod" ? o = e.global.t("x-runtime-lib.custom") : t === "adaptSlotElementMethod" || t === "adaptSlotCustomMethod" ? o = e.global.t("x-runtime-lib.adaptSlot") : console.assert(!1)), ln(o, n, Bi(t));
|
|
333
337
|
}
|
|
334
338
|
function Su(t, n) {
|
|
335
339
|
const { i18n: e } = ue;
|
|
336
340
|
let o = "";
|
|
337
|
-
return t === "elementEvent" || (t === "refEvent" || t === "multipleRefEvent" || t === "
|
|
341
|
+
return t === "elementEvent" || (t === "refEvent" || t === "multipleRefEvent" || t === "slotEvent" || t === "multipleSlotEvent" || t === "customEvent" ? o = e.global.t("x-runtime-lib.custom") : t === "adaptSlotElementEvent" || t === "adaptSlotCustomEvent" ? o = e.global.t("x-runtime-lib.adaptSlot") : t === "elementPropertyChangeEvent" || t === "refPropertyChangeEvent" || t === "multipleRefPropertyChangeEvent" || t === "slotPropertyChangeEvent" || t === "multipleSlotPropertyChangeEvent" || t === "customPropertyChangeEvent" || t === "adaptSlotElementPropertyChangeEvent" || t === "adaptSlotCustomPropertyChangeEvent" ? o = e.global.t("x-runtime-lib.propertyChange") : t === "stateChangeEvent" ? o = e.global.t("x-runtime-lib.stateChange") : console.assert(!1)), ln(o, n, Ri(t));
|
|
338
342
|
}
|
|
339
343
|
const Ki = ["position", "ratation", "scale"], We = /* @__PURE__ */ S({
|
|
340
344
|
__name: "index",
|
|
@@ -9490,7 +9494,9 @@ function Qc(t) {
|
|
|
9490
9494
|
{
|
|
9491
9495
|
var p = [];
|
|
9492
9496
|
try {
|
|
9493
|
-
const j = Ve(p, n.newString(
|
|
9497
|
+
const j = Ve(p, n.newString(
|
|
9498
|
+
le("refEvent", t.nodeId, l)
|
|
9499
|
+
));
|
|
9494
9500
|
n.callFunction(G, n.global, j, ...o);
|
|
9495
9501
|
} catch (f) {
|
|
9496
9502
|
var _ = f, g = !0;
|
|
@@ -9528,7 +9534,7 @@ function Qc(t) {
|
|
|
9528
9534
|
} else if (l === "multipleRefProperty") {
|
|
9529
9535
|
const d = t.children[c + "/" + i];
|
|
9530
9536
|
d && (m = d.getCustomProperty(u));
|
|
9531
|
-
} else l === "customProperty" ? m = t.getCustomProperty(u) : l === "
|
|
9537
|
+
} else l === "slotProperty" || l === "multipleSlotProperty" || (l === "customProperty" ? m = t.getCustomProperty(u) : l === "adaptSlotElementProperty" || l === "adaptSlotCustomProperty" ? m = t.getAdaptSlotProperty(u) : console.assert(!1));
|
|
9532
9538
|
return He(n, m);
|
|
9533
9539
|
}).consume((e) => n.setProp(n.global, "__getPropertyV1__", e)), n.newFunction("__setPropertyV1__", (e, o, r) => {
|
|
9534
9540
|
const i = n.getString(e), l = n.getString(o), c = n.dump(r), { kind: u, nodeId: m, propertyKey: d } = vo(i);
|
|
@@ -9540,7 +9546,7 @@ function Qc(t) {
|
|
|
9540
9546
|
} else if (u === "multipleRefProperty") {
|
|
9541
9547
|
const p = t.children[m + "/" + l];
|
|
9542
9548
|
p && p.setCustomProperty(d, c);
|
|
9543
|
-
} else u === "customProperty" ? t.setCustomProperty(d, c) : u === "
|
|
9549
|
+
} else u === "slotProperty" || u === "multipleSlotProperty" || (u === "customProperty" ? t.setCustomProperty(d, c) : u === "adaptSlotElementProperty" || u === "adaptSlotCustomProperty" ? t.setAdaptSlotProperty(d, c) : console.assert(!1));
|
|
9544
9550
|
}).consume((e) => n.setProp(n.global, "__setPropertyV1__", e)), n.newFunction("__callMethodV1__", (e, o, r) => {
|
|
9545
9551
|
const i = n.getString(e), l = n.getString(o), c = n.dump(r), { kind: u, nodeId: m, methodKey: d } = Qo(i);
|
|
9546
9552
|
let p;
|
|
@@ -9552,7 +9558,7 @@ function Qc(t) {
|
|
|
9552
9558
|
} else if (u === "multipleRefMethod") {
|
|
9553
9559
|
const f = t.children[m + "/" + l];
|
|
9554
9560
|
f && (p = f.callCustomMethod(d, c));
|
|
9555
|
-
} else u === "
|
|
9561
|
+
} else u === "slotMethod" || u === "multipleSlotMethod" || u === "customMethod" || u === "adaptSlotElementMethod" || u === "adaptSlotCustomMethod" || console.assert(!1);
|
|
9556
9562
|
return p;
|
|
9557
9563
|
}).consume((e) => n.setProp(n.global, "__callMethodV1__", e)), n.newFunction("__getStateV1__", (e) => {
|
|
9558
9564
|
const o = n.getString(e), r = t.getState(o);
|
package/dist/types/kind.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export type SandboxKind = 'root' | 'ref' | 'multipleRef' | 'slot' | 'multipleSlot';
|
|
2
|
-
export type PropertyKind = 'elementProperty' | 'refProperty' | 'multipleRefProperty' | '
|
|
2
|
+
export type PropertyKind = 'elementProperty' | 'refProperty' | 'multipleRefProperty' | 'slotProperty' | 'multipleSlotProperty' | 'customProperty' | 'adaptSlotElementProperty' | 'adaptSlotCustomProperty';
|
|
3
3
|
export declare function isLocaleOfPropertyKind(kind: PropertyKind | ''): boolean;
|
|
4
|
-
export type MethodKind = 'elementMethod' | '
|
|
4
|
+
export type MethodKind = 'elementMethod' | 'refMethod' | 'multipleRefMethod' | 'slotMethod' | 'multipleSlotMethod' | 'customMethod' | 'adaptSlotElementMethod' | 'adaptSlotCustomMethod';
|
|
5
5
|
export declare function isLocaleOfMethodKind(kind: MethodKind | ''): boolean;
|
|
6
|
-
export type EventKind = 'elementEvent' | 'refEvent' | 'multipleRefEvent' | '
|
|
6
|
+
export type EventKind = 'elementEvent' | 'refEvent' | 'multipleRefEvent' | 'slotEvent' | 'multipleSlotEvent' | 'customEvent' | 'adaptSlotElementEvent' | 'adaptSlotCustomEvent' | 'elementPropertyChangeEvent' | 'refPropertyChangeEvent' | 'multipleRefPropertyChangeEvent' | 'slotPropertyChangeEvent' | 'multipleSlotPropertyChangeEvent' | 'customPropertyChangeEvent' | 'adaptSlotElementPropertyChangeEvent' | 'adaptSlotCustomPropertyChangeEvent' | 'stateChangeEvent';
|
|
7
7
|
export declare function isLocaleOfEventKind(kind: EventKind | ''): boolean;
|
|
8
8
|
export type SlotKind = 'elementSlot' | 'customSlot';
|
|
9
9
|
export declare function isLocaleOfSlotKind(kind: SlotKind | ''): boolean;
|