@threadlabs/looma 0.2.10 → 0.2.12

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 q2 = f.children.find((w) => w.kind === "slot"), k2 = q2?.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 = w.getAttribute("data-looma-framework-slot") ?? 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 && q2 !== void 0) {
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 q2 = f.children.find((w) => w.kind === "slot"), k2 = q2?.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 = w.getAttribute("data-looma-framework-slot") ?? 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 && q2 !== void 0) {
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-VWX2Q4XM.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 q2 = f.children.find((w) => w.kind === "slot"), k2 = q2?.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 = w.getAttribute("data-looma-framework-slot") ?? 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 && q2 !== void 0) {
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-VWX2Q4XM.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 q2 = f.children.find((w) => w.kind === "slot"), k2 = q2?.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 = w.getAttribute("data-looma-framework-slot") ?? 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 && q2 !== void 0) {
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-VWX2Q4XM.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.12",
4
4
  "type": "module",
5
5
  "description": "Looma declarative components, responsive layout primitives, a complete editor, and supported Vue adapters.",
6
6
  "license": "MIT",