x-runtime-lib 0.9.12 → 0.9.14

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.
Files changed (2) hide show
  1. package/dist/index.js +48 -44
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2677,20 +2677,22 @@ function Fr(e, t, n) {
2677
2677
  return;
2678
2678
  }
2679
2679
  let i = { nodeId: t.id };
2680
- return Pn(t.key) && (i.refContext = {
2680
+ Pn(t.key) && (i.refContext = {
2681
2681
  parent: e,
2682
2682
  compId: t.compId
2683
- }), T(n.comp, {
2683
+ });
2684
+ let a = {};
2685
+ return !n.leaf && t.children && (a = Fn(t.children, r)), T(n.comp, {
2684
2686
  key: t.id,
2685
2687
  ...i
2686
- }, () => {
2687
- if (!n.leaf && t.children) return Fn(t.children, r);
2688
- });
2688
+ }, a);
2689
2689
  }
2690
2690
  return { render: () => {
2691
2691
  let { i18n: i } = je;
2692
2692
  if (Mt(e, t)) return T("div", null, i.global.t("x-runtime-lib.circularReference"));
2693
- if (n.value && n.value.type === "ui") return T("div", {}, { default: () => n.value.view.nodeLites.map((e) => r(e)) });
2693
+ if (!n.value) return;
2694
+ let a = Fn(n.value.view.nodeLites, r);
2695
+ if (n.value.type === "ui") return T("div", {}, a);
2694
2696
  } };
2695
2697
  }
2696
2698
  //#endregion
@@ -3936,18 +3938,19 @@ var bi = g, xi = /* @__PURE__ */ w({
3936
3938
  return;
3937
3939
  }
3938
3940
  let r = { nodeId: t.id };
3939
- return Pn(t.key) && (r.refContext = {
3941
+ Pn(t.key) && (r.refContext = {
3940
3942
  parent: e.refContext,
3941
3943
  compId: t.compId
3942
- }), T(n.comp, {
3944
+ });
3945
+ let i = {};
3946
+ return !n.leaf && t.children && (i = Fn(t.children, o)), T(n.comp, {
3943
3947
  key: t.id,
3944
3948
  ...r
3945
- }, () => {
3946
- if (!n.leaf && t.children) return Fn(t.children, o);
3947
- });
3949
+ }, i);
3948
3950
  }, s = () => {
3949
- if (e.subtype === "ui") return T("div", null, { default: () => a.value?.view.nodeLites.map((e) => o(e)) });
3950
- if (e.subtype === "3d") return T("TresGroup", null, { default: () => a.value?.view.nodeLites.map((e) => o(e)) });
3951
+ let t = {};
3952
+ if (a.value && (t = Fn(a.value.view.nodeLites, o)), e.subtype === "ui") return T("div", null, t);
3953
+ if (e.subtype === "3d") return T("TresGroup", null, t);
3951
3954
  };
3952
3955
  return (e, t) => (D(), b(s));
3953
3956
  }
@@ -4092,18 +4095,19 @@ var bi = g, xi = /* @__PURE__ */ w({
4092
4095
  return;
4093
4096
  }
4094
4097
  let r = { nodeId: t.id };
4095
- return Pn(t.key) && (r.refContext = {
4098
+ Pn(t.key) && (r.refContext = {
4096
4099
  parent: e.refContext,
4097
4100
  compId: t.compId
4098
- }), T(n.comp, {
4101
+ });
4102
+ let i = {};
4103
+ return !n.leaf && t.children && (i = Fn(t.children, o)), T(n.comp, {
4099
4104
  key: t.id,
4100
4105
  ...r
4101
- }, () => {
4102
- if (!n.leaf && t.children) return Fn(t.children, o);
4103
- });
4106
+ }, i);
4104
4107
  }, s = () => {
4105
- if (e.subtype === "ui") return T("div", null, { default: () => a.value?.view.nodeLites.map((e) => o(e)) });
4106
- if (e.subtype === "3d") return T("TresGroup", null, { default: () => a.value?.view.nodeLites.map((e) => o(e)) });
4108
+ let t = {};
4109
+ if (a.value && (t = Fn(a.value.view.nodeLites, o)), e.subtype === "ui") return T("div", null, t);
4110
+ if (e.subtype === "3d") return T("TresGroup", null, t);
4107
4111
  };
4108
4112
  return (e, t) => (D(), b(s));
4109
4113
  }
@@ -4242,15 +4246,15 @@ var bi = g, xi = /* @__PURE__ */ w({
4242
4246
  return;
4243
4247
  }
4244
4248
  let r = { nodeId: e.id };
4245
- return Pn(e.key) && (r.refContext = {
4249
+ Pn(e.key) && (r.refContext = {
4246
4250
  parent: n.refContext,
4247
4251
  compId: e.compId
4248
- }), T(t.comp, {
4252
+ });
4253
+ let i = {};
4254
+ return !t.leaf && e.children && (i = Fn(e.children, m)), T(t.comp, {
4249
4255
  key: e.id,
4250
4256
  ...r
4251
- }, () => {
4252
- if (!t.leaf && e.children) return Fn(e.children, m);
4253
- });
4257
+ }, i);
4254
4258
  }, h = () => {
4255
4259
  if (!n.refContext) {
4256
4260
  console.assert(!1, "invalid ref context");
@@ -4284,17 +4288,17 @@ var bi = g, xi = /* @__PURE__ */ w({
4284
4288
  console.assert(!1, "subtype not match");
4285
4289
  return;
4286
4290
  }
4287
- let r = s.value.type;
4288
- if (r === "ui") return T("div", {
4291
+ let r = Fn(s.value.view.nodeLites, m);
4292
+ if (s.value.type === "ui") return T("div", {
4289
4293
  id: t.id,
4290
4294
  style: u.value
4291
- }, { default: () => s.value?.view.nodeLites.map((e) => m(e)) });
4292
- if (r === "3d") return T(Ei, {
4295
+ }, r);
4296
+ if (s.value.type === "3d") return T(Ei, {
4293
4297
  name: t.name,
4294
4298
  position: d.value,
4295
4299
  rotation: f.value,
4296
4300
  scale: p.value
4297
- }, { default: () => s.value?.view.nodeLites.map((e) => m(e)) });
4301
+ }, r);
4298
4302
  };
4299
4303
  return (e, t) => (D(), b(h));
4300
4304
  }
@@ -4347,15 +4351,15 @@ var Ii = /* @__PURE__ */ ni(Pi, [["render", Fi]]), Li = /* @__PURE__ */ w({
4347
4351
  return;
4348
4352
  }
4349
4353
  let r = { nodeId: e.id };
4350
- return Pn(e.key) && (r.refContext = {
4354
+ Pn(e.key) && (r.refContext = {
4351
4355
  parent: n.refContext,
4352
4356
  compId: e.compId
4353
- }), T(t.comp, {
4357
+ });
4358
+ let i = {};
4359
+ return !t.leaf && e.children && (i = Fn(e.children, p)), T(t.comp, {
4354
4360
  key: e.id,
4355
4361
  ...r
4356
- }, () => {
4357
- if (!t.leaf && e.children) return Fn(e.children, p);
4358
- });
4362
+ }, i);
4359
4363
  }
4360
4364
  let m = () => {
4361
4365
  if (!n.refContext) {
@@ -4390,17 +4394,17 @@ var Ii = /* @__PURE__ */ ni(Pi, [["render", Fi]]), Li = /* @__PURE__ */ w({
4390
4394
  console.assert(!1, "subtype not match");
4391
4395
  return;
4392
4396
  }
4393
- let r = s.value.type;
4394
- if (r === "ui") return T("div", {
4397
+ let r = Fn(s.value.view.nodeLites, p);
4398
+ if (s.value.type === "ui") return T("div", {
4395
4399
  id: t.id,
4396
4400
  style: l.value
4397
- }, { default: () => s.value?.view.nodeLites.map((e) => p(e)) });
4398
- if (r === "3d") return T(Ei, {
4401
+ }, r);
4402
+ if (s.value.type === "3d") return T(Ei, {
4399
4403
  name: t.name,
4400
4404
  position: u.value,
4401
4405
  rotation: d.value,
4402
4406
  scale: f.value
4403
- }, { default: () => s.value?.view.nodeLites.map((e) => p(e)) });
4407
+ }, r);
4404
4408
  };
4405
4409
  return (e, t) => (D(), b(m));
4406
4410
  }
@@ -12454,19 +12458,19 @@ function vl(t, n, r, i, a, o, s, c) {
12454
12458
  if (!_.vm) return;
12455
12459
  let { kind: a, nodeId: o, propertyKey: c } = Rn(t);
12456
12460
  if (await _.triggerEvent(U(`${a}ChangeEvent`, o, c), [n, r], i), s.value?.code.reactivity && hl(_, s.value.code.reactivity, nr("propertyTrigger", t)), a === "elementProperty") {
12457
- if (e(c, ct(["settings", "group"]))) {
12461
+ if (e(c, "settings.group")) {
12458
12462
  let e = s.value?.view.nodeLites.find((e) => e.id === o);
12459
12463
  e ? Mn(e.key) && (e.group = n) : console.assert(!1);
12460
12464
  }
12461
- if (e(c, ct(["settings", "open"]))) {
12465
+ if (e(c, "settings.open")) {
12462
12466
  let e = s.value?.view.nodeLites.find((e) => e.id === o);
12463
12467
  e ? jn(e.key) && (e.render = n) : console.assert(!1);
12464
12468
  }
12465
- if (e(c, ct(["settings", "slot"]))) {
12469
+ if (e(c, "settings.slot")) {
12466
12470
  let e = s.value?.view.nodeLites.find((e) => e.id === o);
12467
12471
  e ? e.slotId = n : console.assert(!1);
12468
12472
  }
12469
- if (e(c, ct(["settings", "comp"]))) {
12473
+ if (e(c, "settings.comp")) {
12470
12474
  let e = s.value?.view.nodeLites.find((e) => e.id === o);
12471
12475
  e ? e.compId = n : console.assert(!1);
12472
12476
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.9.12",
4
+ "version": "0.9.14",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",