@threadlabs/looma 0.2.10 → 0.2.11

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.
@@ -2451,7 +2451,7 @@ ${o}
2451
2451
  return i;
2452
2452
  }
2453
2453
  function Ei(e) {
2454
- return e instanceof Element ? e.getAttribute("slot") ?? "" : "";
2454
+ return e.__loomaFrameworkSlot ?? (e instanceof Element ? e.getAttribute("slot") ?? "" : "");
2455
2455
  }
2456
2456
  function xi(e, t, n, r) {
2457
2457
  let i = e.nameExpression === void 0 ? e.name ?? "" : L(W(e.nameExpression, t)), o = r.projectedNodes.filter((s) => Ei(s) === i);
@@ -2674,10 +2674,10 @@ ${o}
2674
2674
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
2675
2675
  if (o === void 0 ? ze(i, t.contract.tag, { definition: t, style: void 0 }) : JSON.stringify(o.definition) !== JSON.stringify(t) && y("HR001", `More than one definition declares <${t.contract.tag}>.`), J(e) === void 0) {
2676
2676
  let c = [], l = (m, f) => {
2677
- let p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
2677
+ let k2 = f.children.find((w) => w.kind === "slot")?.name ?? "", p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
2678
2678
  for (let w of Array.from(m.childNodes)) {
2679
2679
  if (w instanceof Element) {
2680
- if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) Ve(w), c.push(w);
2680
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) w.__loomaFrameworkSlot = k2, Ve(w), c.push(w);
2681
2681
  else {
2682
2682
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
2683
2683
  let b = v[S++];
@@ -2685,6 +2685,10 @@ ${o}
2685
2685
  }
2686
2686
  continue;
2687
2687
  }
2688
+ if (w instanceof Comment) {
2689
+ w.__loomaFrameworkSlot = k2, c.push(w);
2690
+ continue;
2691
+ }
2688
2692
  if (w instanceof Text && w.data.trim() !== "") {
2689
2693
  for (; h < p.length && p[h] !== w.data; ) h += 1;
2690
2694
  h < p.length ? h += 1 : c.push(w);
@@ -2479,7 +2479,7 @@ ${o}
2479
2479
  return i;
2480
2480
  }
2481
2481
  function Ei(e) {
2482
- return e instanceof Element ? e.getAttribute("slot") ?? "" : "";
2482
+ return e.__loomaFrameworkSlot ?? (e instanceof Element ? e.getAttribute("slot") ?? "" : "");
2483
2483
  }
2484
2484
  function xi(e, t, n, r) {
2485
2485
  let i = e.nameExpression === void 0 ? e.name ?? "" : L(W(e.nameExpression, t)), o = r.projectedNodes.filter((s) => Ei(s) === i);
@@ -2702,10 +2702,10 @@ ${o}
2702
2702
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
2703
2703
  if (o === void 0 ? ze(i, t.contract.tag, { definition: t, style: void 0 }) : JSON.stringify(o.definition) !== JSON.stringify(t) && y("HR001", `More than one definition declares <${t.contract.tag}>.`), J(e) === void 0) {
2704
2704
  let c = [], l = (m, f) => {
2705
- let p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
2705
+ let k2 = f.children.find((w) => w.kind === "slot")?.name ?? "", p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
2706
2706
  for (let w of Array.from(m.childNodes)) {
2707
2707
  if (w instanceof Element) {
2708
- if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) Ve(w), c.push(w);
2708
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) w.__loomaFrameworkSlot = k2, Ve(w), c.push(w);
2709
2709
  else {
2710
2710
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
2711
2711
  let b = v[S++];
@@ -2713,6 +2713,10 @@ ${o}
2713
2713
  }
2714
2714
  continue;
2715
2715
  }
2716
+ if (w instanceof Comment) {
2717
+ w.__loomaFrameworkSlot = k2, c.push(w);
2718
+ continue;
2719
+ }
2716
2720
  if (w instanceof Text && w.data.trim() !== "") {
2717
2721
  for (; h < p.length && p[h] !== w.data; ) h += 1;
2718
2722
  h < p.length ? h += 1 : c.push(w);
@@ -3,7 +3,7 @@ import {
3
3
  controllerFor,
4
4
  manageComponentLifecycle,
5
5
  registerLoomaPackage
6
- } from "./chunk-7DFU2ZEC.js";
6
+ } from "./chunk-ZR4QVFFS.js";
7
7
  import "./chunk-MLKGABMK.js";
8
8
  export {
9
9
  attachLoomaComponent,
package/dist/index.cjs CHANGED
@@ -7243,7 +7243,7 @@ ${o}
7243
7243
  return i;
7244
7244
  }
7245
7245
  function Ei(e) {
7246
- return e instanceof Element ? e.getAttribute("slot") ?? "" : "";
7246
+ return e.__loomaFrameworkSlot ?? (e instanceof Element ? e.getAttribute("slot") ?? "" : "");
7247
7247
  }
7248
7248
  function xi(e, t, n, r) {
7249
7249
  let i = e.nameExpression === void 0 ? e.name ?? "" : L(W(e.nameExpression, t)), o = r.projectedNodes.filter((s) => Ei(s) === i);
@@ -7466,10 +7466,10 @@ ${o}
7466
7466
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
7467
7467
  if (o === void 0 ? ze(i, t.contract.tag, { definition: t, style: void 0 }) : JSON.stringify(o.definition) !== JSON.stringify(t) && y("HR001", `More than one definition declares <${t.contract.tag}>.`), J(e) === void 0) {
7468
7468
  let c = [], l = (m, f) => {
7469
- let p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
7469
+ let k2 = f.children.find((w) => w.kind === "slot")?.name ?? "", p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
7470
7470
  for (let w of Array.from(m.childNodes)) {
7471
7471
  if (w instanceof Element) {
7472
- if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) Ve(w), c.push(w);
7472
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) w.__loomaFrameworkSlot = k2, Ve(w), c.push(w);
7473
7473
  else {
7474
7474
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
7475
7475
  let b = v[S++];
@@ -7477,6 +7477,10 @@ ${o}
7477
7477
  }
7478
7478
  continue;
7479
7479
  }
7480
+ if (w instanceof Comment) {
7481
+ w.__loomaFrameworkSlot = k2, c.push(w);
7482
+ continue;
7483
+ }
7480
7484
  if (w instanceof Text && w.data.trim() !== "") {
7481
7485
  for (; h < p.length && p[h] !== w.data; ) h += 1;
7482
7486
  h < p.length ? h += 1 : c.push(w);
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  controllerFor,
8
8
  manageComponentLifecycle,
9
9
  registerLoomaPackage
10
- } from "./chunk-7DFU2ZEC.js";
10
+ } from "./chunk-ZR4QVFFS.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
 
13
13
  // src/input-modality.ts
package/dist/loader.cjs CHANGED
@@ -7219,7 +7219,7 @@ ${o}
7219
7219
  return i;
7220
7220
  }
7221
7221
  function Ei(e) {
7222
- return e instanceof Element ? e.getAttribute("slot") ?? "" : "";
7222
+ return e.__loomaFrameworkSlot ?? (e instanceof Element ? e.getAttribute("slot") ?? "" : "");
7223
7223
  }
7224
7224
  function xi(e, t, n, r) {
7225
7225
  let i = e.nameExpression === void 0 ? e.name ?? "" : L(W(e.nameExpression, t)), o = r.projectedNodes.filter((s) => Ei(s) === i);
@@ -7442,10 +7442,10 @@ ${o}
7442
7442
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
7443
7443
  if (o === void 0 ? ze(i, t.contract.tag, { definition: t, style: void 0 }) : JSON.stringify(o.definition) !== JSON.stringify(t) && y("HR001", `More than one definition declares <${t.contract.tag}>.`), J(e) === void 0) {
7444
7444
  let c = [], l = (m, f) => {
7445
- let p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
7445
+ let k2 = f.children.find((w) => w.kind === "slot")?.name ?? "", p = f.children.filter((w) => w.kind === "text").map((w) => w.value), h = 0, v = f.children.filter((w) => w.kind === "element"), S = 0;
7446
7446
  for (let w of Array.from(m.childNodes)) {
7447
7447
  if (w instanceof Element) {
7448
- if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) Ve(w), c.push(w);
7448
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) w.__loomaFrameworkSlot = k2, Ve(w), c.push(w);
7449
7449
  else {
7450
7450
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
7451
7451
  let b = v[S++];
@@ -7453,6 +7453,10 @@ ${o}
7453
7453
  }
7454
7454
  continue;
7455
7455
  }
7456
+ if (w instanceof Comment) {
7457
+ w.__loomaFrameworkSlot = k2, c.push(w);
7458
+ continue;
7459
+ }
7456
7460
  if (w instanceof Text && w.data.trim() !== "") {
7457
7461
  for (; h < p.length && p[h] !== w.data; ) h += 1;
7458
7462
  h < p.length ? h += 1 : c.push(w);
package/dist/loader.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-A5MSXQ7Y.js";
5
5
  import {
6
6
  registerLoomaPackage
7
- } from "./chunk-7DFU2ZEC.js";
7
+ } from "./chunk-ZR4QVFFS.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
 
10
10
  // src/loader.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "type": "module",
5
5
  "description": "Looma declarative components, responsive layout primitives, a complete editor, and supported Vue adapters.",
6
6
  "license": "MIT",
@@ -739,7 +739,7 @@ var UiCombobox_default = /* @__PURE__ */ _defineComponent10({
739
739
  /* CACHED */
740
740
  )),
741
741
  _createElementVNode6("div", _hoisted_25, [
742
- _renderSlot9(_ctx.$slots, "start"),
742
+ _createElementVNode6("span", { slot: "start", "data-looma-framework-slot": "start", style: { display: "contents" } }, [_renderSlot9(_ctx.$slots, "start")]),
743
743
  _cache[1] || (_cache[1] = _createElementVNode6(
744
744
  "div",
745
745
  {
@@ -844,7 +844,7 @@ var UiCombobox_default = /* @__PURE__ */ _defineComponent10({
844
844
  -1
845
845
  /* CACHED */
846
846
  )),
847
- _renderSlot9(_ctx.$slots, "footer")
847
+ _createElementVNode6("span", { slot: "footer", "data-looma-framework-slot": "footer", style: { display: "contents" } }, [_renderSlot9(_ctx.$slots, "footer")])
848
848
  ]),
849
849
  _cache[7] || (_cache[7] = _createElementVNode6(
850
850
  "div",
@@ -1003,7 +1003,7 @@ var UiContextMenu_default = /* @__PURE__ */ _defineComponent12({
1003
1003
  ref: root
1004
1004
  }),
1005
1005
  [
1006
- _renderSlot11(_ctx.$slots, "trigger"),
1006
+ _createElementVNode8("span", { slot: "trigger", "data-looma-framework-slot": "trigger", style: { display: "contents" } }, [_renderSlot11(_ctx.$slots, "trigger")]),
1007
1007
  _createElementVNode8("div", _hoisted_111, [
1008
1008
  _createVNode2(_unref2(UiMenu_default), { "data-component": "ui-context-menu" }, {
1009
1009
  default: _withCtx2(() => [
@@ -1196,10 +1196,10 @@ var UiEditable_default = /* @__PURE__ */ _defineComponent15({
1196
1196
  ref: root
1197
1197
  }), [
1198
1198
  _createElementVNode10("div", _hoisted_26, [
1199
- _renderSlot14(_ctx.$slots, "preview")
1199
+ _createElementVNode10("span", { slot: "preview", "data-looma-framework-slot": "preview", style: { display: "contents" } }, [_renderSlot14(_ctx.$slots, "preview")])
1200
1200
  ]),
1201
1201
  _createElementVNode10("div", _hoisted_34, [
1202
- _renderSlot14(_ctx.$slots, "edit")
1202
+ _createElementVNode10("span", { slot: "edit", "data-looma-framework-slot": "edit", style: { display: "contents" } }, [_renderSlot14(_ctx.$slots, "edit")])
1203
1203
  ])
1204
1204
  ], 16, _hoisted_113);
1205
1205
  };
@@ -1728,21 +1728,21 @@ var UiSearchResultRow_default = /* @__PURE__ */ _defineComponent24({
1728
1728
  "data-component": "ui-search-result-row"
1729
1729
  }, [
1730
1730
  _createElementVNode15("span", _hoisted_210, [
1731
- _renderSlot23(_ctx.$slots, "leading")
1731
+ _createElementVNode15("span", { slot: "leading", "data-looma-framework-slot": "leading", style: { display: "contents" } }, [_renderSlot23(_ctx.$slots, "leading")])
1732
1732
  ]),
1733
1733
  _createElementVNode15("span", _hoisted_35, [
1734
1734
  _createElementVNode15("span", _hoisted_42, [
1735
- _renderSlot23(_ctx.$slots, "title")
1735
+ _createElementVNode15("span", { slot: "title", "data-looma-framework-slot": "title", style: { display: "contents" } }, [_renderSlot23(_ctx.$slots, "title")])
1736
1736
  ]),
1737
1737
  _createElementVNode15("span", _hoisted_52, [
1738
- _renderSlot23(_ctx.$slots, "meta")
1738
+ _createElementVNode15("span", { slot: "meta", "data-looma-framework-slot": "meta", style: { display: "contents" } }, [_renderSlot23(_ctx.$slots, "meta")])
1739
1739
  ]),
1740
1740
  _createElementVNode15("span", _hoisted_6, [
1741
- _renderSlot23(_ctx.$slots, "excerpt")
1741
+ _createElementVNode15("span", { slot: "excerpt", "data-looma-framework-slot": "excerpt", style: { display: "contents" } }, [_renderSlot23(_ctx.$slots, "excerpt")])
1742
1742
  ])
1743
1743
  ]),
1744
1744
  _createElementVNode15("span", _hoisted_7, [
1745
- _renderSlot23(_ctx.$slots, "trailing")
1745
+ _createElementVNode15("span", { slot: "trailing", "data-looma-framework-slot": "trailing", style: { display: "contents" } }, [_renderSlot23(_ctx.$slots, "trailing")])
1746
1746
  ])
1747
1747
  ], 8, _hoisted_122)
1748
1748
  ],
@@ -1821,19 +1821,19 @@ var UiSearchShell_default = /* @__PURE__ */ _defineComponent25({
1821
1821
  }),
1822
1822
  [
1823
1823
  _createElementVNode16("div", _hoisted_123, [
1824
- _renderSlot24(_ctx.$slots, "backdrop"),
1824
+ _createElementVNode16("span", { slot: "backdrop", "data-looma-framework-slot": "backdrop", style: { display: "contents" } }, [_renderSlot24(_ctx.$slots, "backdrop")]),
1825
1825
  _createElementVNode16("div", _hoisted_211, [
1826
1826
  _createElementVNode16("div", _hoisted_36, [
1827
- _renderSlot24(_ctx.$slots, "search")
1827
+ _createElementVNode16("span", { slot: "search", "data-looma-framework-slot": "search", style: { display: "contents" } }, [_renderSlot24(_ctx.$slots, "search")])
1828
1828
  ]),
1829
1829
  _createElementVNode16("div", _hoisted_43, [
1830
- _renderSlot24(_ctx.$slots, "status")
1830
+ _createElementVNode16("span", { slot: "status", "data-looma-framework-slot": "status", style: { display: "contents" } }, [_renderSlot24(_ctx.$slots, "status")])
1831
1831
  ]),
1832
1832
  _createElementVNode16("div", _hoisted_53, [
1833
- _renderSlot24(_ctx.$slots, "body")
1833
+ _createElementVNode16("span", { slot: "body", "data-looma-framework-slot": "body", style: { display: "contents" } }, [_renderSlot24(_ctx.$slots, "body")])
1834
1834
  ]),
1835
1835
  _createElementVNode16("div", _hoisted_62, [
1836
- _renderSlot24(_ctx.$slots, "footer")
1836
+ _createElementVNode16("span", { slot: "footer", "data-looma-framework-slot": "footer", style: { display: "contents" } }, [_renderSlot24(_ctx.$slots, "footer")])
1837
1837
  ])
1838
1838
  ])
1839
1839
  ])
@@ -2188,16 +2188,16 @@ var UiTopBar_default = /* @__PURE__ */ _defineComponent31({
2188
2188
  [
2189
2189
  _createElementVNode18("header", _hoisted_128, [
2190
2190
  _createElementVNode18("div", _hoisted_213, [
2191
- _renderSlot30(_ctx.$slots, "leading")
2191
+ _createElementVNode18("span", { slot: "leading", "data-looma-framework-slot": "leading", style: { display: "contents" } }, [_renderSlot30(_ctx.$slots, "leading")])
2192
2192
  ]),
2193
2193
  _createElementVNode18("div", _hoisted_37, [
2194
2194
  _renderSlot30(_ctx.$slots, "default")
2195
2195
  ]),
2196
2196
  _createElementVNode18("div", _hoisted_44, [
2197
- _renderSlot30(_ctx.$slots, "search")
2197
+ _createElementVNode18("span", { slot: "search", "data-looma-framework-slot": "search", style: { display: "contents" } }, [_renderSlot30(_ctx.$slots, "search")])
2198
2198
  ]),
2199
2199
  _createElementVNode18("div", _hoisted_54, [
2200
- _renderSlot30(_ctx.$slots, "actions")
2200
+ _createElementVNode18("span", { slot: "actions", "data-looma-framework-slot": "actions", style: { display: "contents" } }, [_renderSlot30(_ctx.$slots, "actions")])
2201
2201
  ])
2202
2202
  ])
2203
2203
  ],
@@ -2334,13 +2334,13 @@ var UiTreeItem_default = /* @__PURE__ */ _defineComponent32({
2334
2334
  /* CACHED */
2335
2335
  )),
2336
2336
  _createElementVNode19("span", _hoisted_38, [
2337
- _renderSlot31(_ctx.$slots, "leading")
2337
+ _createElementVNode19("span", { slot: "leading", "data-looma-framework-slot": "leading", style: { display: "contents" } }, [_renderSlot31(_ctx.$slots, "leading")])
2338
2338
  ]),
2339
2339
  _createElementVNode19("span", _hoisted_45, [
2340
2340
  _renderSlot31(_ctx.$slots, "default")
2341
2341
  ]),
2342
2342
  _createElementVNode19("span", _hoisted_55, [
2343
- _renderSlot31(_ctx.$slots, "actions")
2343
+ _createElementVNode19("span", { slot: "actions", "data-looma-framework-slot": "actions", style: { display: "contents" } }, [_renderSlot31(_ctx.$slots, "actions")])
2344
2344
  ]),
2345
2345
  _cache[2] || (_cache[2] = _createElementVNode19(
2346
2346
  "span",
@@ -2356,7 +2356,7 @@ var UiTreeItem_default = /* @__PURE__ */ _defineComponent32({
2356
2356
  ))
2357
2357
  ]),
2358
2358
  props.container ? _createElementVNode19("div", _hoisted_63, [
2359
- _renderSlot31(_ctx.$slots, "children")
2359
+ _createElementVNode19("span", { slot: "children", "data-looma-framework-slot": "children", style: { display: "contents" } }, [_renderSlot31(_ctx.$slots, "children")])
2360
2360
  ]) : _createCommentVNode("v-if", true),
2361
2361
  _cache[3] || (_cache[3] = _createElementVNode19(
2362
2362
  "span",
@@ -10,7 +10,7 @@ import {
10
10
  UiEditorToolbar_default,
11
11
  createAdapterComponent,
12
12
  toHTMLElement
13
- } from "../chunk-KQTGO5WQ.js";
13
+ } from "../chunk-Q7P562HU.js";
14
14
 
15
15
  // src/editor/index.ts
16
16
  import "@threadlabs/looma/editor";
package/vue/index.js CHANGED
@@ -43,7 +43,7 @@ import {
43
43
  Tree,
44
44
  TreeItem,
45
45
  VUE_ADAPTER_NOTE
46
- } from "./chunk-KQTGO5WQ.js";
46
+ } from "./chunk-Q7P562HU.js";
47
47
  export {
48
48
  ADAPTER_COMPONENT_TAG_MAP,
49
49
  AffordanceScope,