x-runtime-lib 0.8.52 → 0.8.53
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { Sandbox } from '@/sandbox';
|
|
3
3
|
import { Data, SandboxKind } from '@/types';
|
|
4
|
-
export declare function useSandbox(
|
|
4
|
+
export declare function useSandbox(data: Ref<Data | undefined>, kind: SandboxKind, id: string, refKey: string, parent: Sandbox | undefined): void;
|
package/dist/index.js
CHANGED
|
@@ -949,7 +949,7 @@ const al = /* @__PURE__ */ I({
|
|
|
949
949
|
},
|
|
950
950
|
setup(t) {
|
|
951
951
|
const e = t, i = ie(), o = be();
|
|
952
|
-
return qn(
|
|
952
|
+
return qn(i, "multipleRef", e.node.basic.id, "", o), Jn(e.refContext.compId, i), (s, r) => (x(), ee("div"));
|
|
953
953
|
}
|
|
954
954
|
}), pl = /* @__PURE__ */ I({
|
|
955
955
|
__name: "index",
|
|
@@ -960,7 +960,7 @@ const al = /* @__PURE__ */ I({
|
|
|
960
960
|
},
|
|
961
961
|
setup(t) {
|
|
962
962
|
const { t: e } = fo(), i = t, o = ie(), s = be();
|
|
963
|
-
qn(
|
|
963
|
+
qn(o, "reference", i.node.basic.id, "", s), Jn(i.refContext.compId, o);
|
|
964
964
|
const r = Ko(), { applySize: a } = ye(i), p = k(() => {
|
|
965
965
|
const u = {};
|
|
966
966
|
return o.value?.type === "common" && a(u), u;
|
|
@@ -1020,7 +1020,7 @@ const al = /* @__PURE__ */ I({
|
|
|
1020
1020
|
},
|
|
1021
1021
|
setup(t) {
|
|
1022
1022
|
const { t: e } = fo(), i = t, o = ie(), s = be();
|
|
1023
|
-
qn(
|
|
1023
|
+
qn(o, "slot", i.id, "", s), Jn(i.refContext.compId, o);
|
|
1024
1024
|
function r(p) {
|
|
1025
1025
|
const m = ze[p.basic.key];
|
|
1026
1026
|
if (!m)
|
|
@@ -8578,7 +8578,7 @@ function eo(t, ...e) {
|
|
|
8578
8578
|
class Ac {
|
|
8579
8579
|
kind;
|
|
8580
8580
|
id;
|
|
8581
|
-
|
|
8581
|
+
refKey;
|
|
8582
8582
|
parent;
|
|
8583
8583
|
children = {};
|
|
8584
8584
|
org;
|
|
@@ -8588,7 +8588,7 @@ class Ac {
|
|
|
8588
8588
|
eventBus = xr();
|
|
8589
8589
|
hooks;
|
|
8590
8590
|
constructor(e, i, o, s, r, a, p, m, d) {
|
|
8591
|
-
this.kind = e, this.id = i, this.
|
|
8591
|
+
this.kind = e, this.id = i, this.refKey = o, this.parent = s, this.org = r, this.env = a, this.mode = p, this.type = m, this.hooks = d, this.parent?.addChild(this), console.log(`Sandbox/constructor id='${this.id}'`);
|
|
8592
8592
|
}
|
|
8593
8593
|
dispose() {
|
|
8594
8594
|
this.parent?.removeChild(this.id), this.destroyInterpreter(), console.log(`Sandbox/dispose id='${this.id}'`);
|
|
@@ -8826,11 +8826,11 @@ function qn(t, e, i, o, s) {
|
|
|
8826
8826
|
),
|
|
8827
8827
|
L,
|
|
8828
8828
|
E ?? L
|
|
8829
|
-
]),
|
|
8829
|
+
]), t.value?.code.reactivity)) {
|
|
8830
8830
|
let F = "";
|
|
8831
8831
|
S instanceof Array ? F = S.join(".") : F = S, De(
|
|
8832
8832
|
g,
|
|
8833
|
-
|
|
8833
|
+
t.value.code.reactivity,
|
|
8834
8834
|
Pe({
|
|
8835
8835
|
type: "elementProperty",
|
|
8836
8836
|
nodeId: _,
|
|
@@ -8845,17 +8845,17 @@ function qn(t, e, i, o, s) {
|
|
|
8845
8845
|
ne("customPropertyChangeEvent", "globality", _),
|
|
8846
8846
|
S,
|
|
8847
8847
|
L ?? S
|
|
8848
|
-
]),
|
|
8848
|
+
]), t.value?.code.reactivity && De(
|
|
8849
8849
|
g,
|
|
8850
|
-
|
|
8850
|
+
t.value.code.reactivity,
|
|
8851
8851
|
Pe({ type: "customProperty", propertyId: _ }),
|
|
8852
8852
|
S,
|
|
8853
8853
|
L
|
|
8854
8854
|
));
|
|
8855
8855
|
}, b = (_, S, L) => {
|
|
8856
|
-
Z(p) &&
|
|
8856
|
+
Z(p) && t.value?.code.reactivity && De(
|
|
8857
8857
|
g,
|
|
8858
|
-
|
|
8858
|
+
t.value.code.reactivity,
|
|
8859
8859
|
Pe({ type: "adaptSlotProperty", propertyId: _ }),
|
|
8860
8860
|
S,
|
|
8861
8861
|
L
|
|
@@ -8865,14 +8865,14 @@ function qn(t, e, i, o, s) {
|
|
|
8865
8865
|
ne("stateChangeEvent", "globality", _),
|
|
8866
8866
|
S,
|
|
8867
8867
|
L ?? S
|
|
8868
|
-
]),
|
|
8868
|
+
]), t.value?.code.reactivity && De(
|
|
8869
8869
|
g,
|
|
8870
|
-
|
|
8870
|
+
t.value.code.reactivity,
|
|
8871
8871
|
Pe({ type: "state", stateId: _ }),
|
|
8872
8872
|
S,
|
|
8873
8873
|
L
|
|
8874
8874
|
));
|
|
8875
|
-
}, g = new Ac(e, i, o,
|
|
8875
|
+
}, g = new Ac(e, i, o, s, r, a, p, m, {
|
|
8876
8876
|
onElementPropertyChange: c,
|
|
8877
8877
|
onCustomPropertyChange: y,
|
|
8878
8878
|
onAdaptSlotPropertyChange: b,
|
|
@@ -8880,9 +8880,9 @@ function qn(t, e, i, o, s) {
|
|
|
8880
8880
|
});
|
|
8881
8881
|
vc(g);
|
|
8882
8882
|
const v = () => {
|
|
8883
|
-
Z(p) && (g.destroyInterpreter(), g.syncNodes(
|
|
8883
|
+
Z(p) && (g.destroyInterpreter(), g.syncNodes(t.value), g.resetCustomProperties(), g.resetAdaptSlotProperties(), g.resetStates(), !(!t.value || !t.value.code.script) && g.createInterpreter(t.value.code.script));
|
|
8884
8884
|
};
|
|
8885
|
-
v(), oe(
|
|
8885
|
+
v(), oe(t, () => {
|
|
8886
8886
|
v();
|
|
8887
8887
|
}), Ke(() => {
|
|
8888
8888
|
g.dispose();
|
|
@@ -10,7 +10,7 @@ interface Hooks {
|
|
|
10
10
|
export declare class Sandbox {
|
|
11
11
|
kind: SandboxKind;
|
|
12
12
|
id: string;
|
|
13
|
-
|
|
13
|
+
refKey: string;
|
|
14
14
|
parent: Sandbox | undefined;
|
|
15
15
|
children: {
|
|
16
16
|
[key: string]: Sandbox;
|
|
@@ -21,7 +21,7 @@ export declare class Sandbox {
|
|
|
21
21
|
type: 'page' | 'comp';
|
|
22
22
|
eventBus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
|
|
23
23
|
private hooks?;
|
|
24
|
-
constructor(kind: SandboxKind, id: string,
|
|
24
|
+
constructor(kind: SandboxKind, id: string, refKey: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks: Hooks);
|
|
25
25
|
dispose(): void;
|
|
26
26
|
private addChild;
|
|
27
27
|
private removeChild;
|