@threadlabs/looma 0.2.15 → 0.2.16

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.
@@ -2676,12 +2676,15 @@ ${o}
2676
2676
  function xt(e, t, n = {}) {
2677
2677
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
2678
2678
  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) {
2679
- let c = [], l = (m, f) => {
2679
+ let c = Array.from(e.querySelectorAll("[data-looma-framework-slot]")).filter((w) => w.closest("[data-component-root]") === e);
2680
+ for (let w of c) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? "", Ve(w);
2681
+ let C2 = new Set(c), l = (m, f) => {
2680
2682
  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;
2681
2683
  for (let w of Array.from(m.childNodes)) {
2682
2684
  if (w instanceof Element) {
2683
- 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);
2684
- else {
2685
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) {
2686
+ if (!C2.has(w)) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? k2, Ve(w), c.push(w);
2687
+ } else {
2685
2688
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
2686
2689
  let b = v[S++];
2687
2690
  b !== void 0 && l(w, b);
@@ -2704,12 +2704,15 @@ ${o}
2704
2704
  function xt(e, t, n = {}) {
2705
2705
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
2706
2706
  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) {
2707
- let c = [], l = (m, f) => {
2707
+ let c = Array.from(e.querySelectorAll("[data-looma-framework-slot]")).filter((w) => w.closest("[data-component-root]") === e);
2708
+ for (let w of c) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? "", Ve(w);
2709
+ let C2 = new Set(c), l = (m, f) => {
2708
2710
  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;
2709
2711
  for (let w of Array.from(m.childNodes)) {
2710
2712
  if (w instanceof Element) {
2711
- 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);
2712
- else {
2713
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) {
2714
+ if (!C2.has(w)) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? k2, Ve(w), c.push(w);
2715
+ } else {
2713
2716
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
2714
2717
  let b = v[S++];
2715
2718
  b !== void 0 && l(w, b);
@@ -3,7 +3,7 @@ import {
3
3
  controllerFor,
4
4
  manageComponentLifecycle,
5
5
  registerLoomaPackage
6
- } from "./chunk-KW2YPKIP.js";
6
+ } from "./chunk-ECJQ4YGC.js";
7
7
  import "./chunk-MLKGABMK.js";
8
8
  export {
9
9
  attachLoomaComponent,
package/dist/index.cjs CHANGED
@@ -7468,12 +7468,15 @@ ${o}
7468
7468
  function xt(e, t, n = {}) {
7469
7469
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
7470
7470
  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) {
7471
- let c = [], l = (m, f) => {
7471
+ let c = Array.from(e.querySelectorAll("[data-looma-framework-slot]")).filter((w) => w.closest("[data-component-root]") === e);
7472
+ for (let w of c) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? "", Ve(w);
7473
+ let C2 = new Set(c), l = (m, f) => {
7472
7474
  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;
7473
7475
  for (let w of Array.from(m.childNodes)) {
7474
7476
  if (w instanceof Element) {
7475
- 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);
7476
- else {
7477
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) {
7478
+ if (!C2.has(w)) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? k2, Ve(w), c.push(w);
7479
+ } else {
7477
7480
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
7478
7481
  let b = v[S++];
7479
7482
  b !== void 0 && l(w, b);
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  controllerFor,
8
8
  manageComponentLifecycle,
9
9
  registerLoomaPackage
10
- } from "./chunk-KW2YPKIP.js";
10
+ } from "./chunk-ECJQ4YGC.js";
11
11
  import "./chunk-MLKGABMK.js";
12
12
 
13
13
  // src/input-modality.ts
package/dist/loader.cjs CHANGED
@@ -7444,12 +7444,15 @@ ${o}
7444
7444
  function xt(e, t, n = {}) {
7445
7445
  let r = e.ownerDocument, i = ke(r), o = i.definitions.get(t.contract.tag);
7446
7446
  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) {
7447
- let c = [], l = (m, f) => {
7447
+ let c = Array.from(e.querySelectorAll("[data-looma-framework-slot]")).filter((w) => w.closest("[data-component-root]") === e);
7448
+ for (let w of c) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? "", Ve(w);
7449
+ let C2 = new Set(c), l = (m, f) => {
7448
7450
  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;
7449
7451
  for (let w of Array.from(m.childNodes)) {
7450
7452
  if (w instanceof Element) {
7451
- 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);
7452
- else {
7453
+ if (!(w.getAttribute("data-component")?.split(/\s+/) ?? []).includes(t.contract.tag)) {
7454
+ if (!C2.has(w)) w.__loomaFrameworkSlot = w.getAttribute("data-looma-framework-slot") ?? k2, Ve(w), c.push(w);
7455
+ } else {
7453
7456
  for (; S < v.length && v[S].name !== w.localName; ) S += 1;
7454
7457
  let b = v[S++];
7455
7458
  b !== void 0 && l(w, b);
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-KW2YPKIP.js";
7
+ } from "./chunk-ECJQ4YGC.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.15",
3
+ "version": "0.2.16",
4
4
  "type": "module",
5
5
  "description": "Looma declarative components, responsive layout primitives, a complete editor, and supported Vue adapters.",
6
6
  "license": "MIT",