x-block-lib 0.9.24 → 0.9.25

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 +18 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1682,7 +1682,7 @@ function getAllPropertyInfos(e, y) {
1682
1682
  if (isSlotNode(E.key) && T.slot && b.type === "comp" && x.meta.slots) {
1683
1683
  let y = x.meta.slots.find((e) => e.id === T.slot);
1684
1684
  if (y && y.properties) for (let b of y.properties) C.push({
1685
- id: makePropertyId("customSlotProperty", e, makePropertyKeyOfCustomSlot("placeholder", y.id, b.id)),
1685
+ id: makePropertyId("customSlotProperty", e, makePropertyKeyOfCustomSlot(x.id, y.id, b.id)),
1686
1686
  kind: "customSlotProperty",
1687
1687
  names: [y.name, b.name],
1688
1688
  meta: { raw: { type: b.type } }
@@ -1691,7 +1691,7 @@ function getAllPropertyInfos(e, y) {
1691
1691
  if (isMultipleSlotNode(E.key) && T.slot && b.type === "comp" && x.meta.slots) {
1692
1692
  let y = x.meta.slots.find((e) => e.id === T.slot);
1693
1693
  if (y && y.properties) for (let b of y.properties) C.push({
1694
- id: makePropertyId("multipleCustomSlotProperty", e, makePropertyKeyOfCustomSlot("placeholder", y.id, b.id)),
1694
+ id: makePropertyId("multipleCustomSlotProperty", e, makePropertyKeyOfCustomSlot(x.id, y.id, b.id)),
1695
1695
  kind: "multipleCustomSlotProperty",
1696
1696
  names: [y.name, b.name],
1697
1697
  meta: { raw: { type: b.type } }
@@ -1789,32 +1789,32 @@ function getPropertyInfo(e) {
1789
1789
  }
1790
1790
  } else if (C === "customSlotProperty") {
1791
1791
  if (isSlotNode(D.key) && E.slot && y.type === "comp" && b.meta.slots) {
1792
- let { slotId: y, propertyId: x } = unwrapPropertyKeyOfCustomSlot(T);
1793
- if (E.slot === y) {
1794
- let S = b.meta.slots.find((e) => e.id === y);
1795
- if (S && S.properties) {
1796
- let y = S.properties.find((e) => e.id === x);
1797
- if (y) return {
1792
+ let { compId: y, slotId: x, propertyId: S } = unwrapPropertyKeyOfCustomSlot(T);
1793
+ if (b.id === y && E.slot === x) {
1794
+ let y = b.meta.slots.find((e) => e.id === x);
1795
+ if (y && y.properties) {
1796
+ let b = y.properties.find((e) => e.id === S);
1797
+ if (b) return {
1798
1798
  id: e,
1799
1799
  kind: C,
1800
- names: [S.name, y.name],
1801
- meta: { raw: { type: y.type } }
1800
+ names: [y.name, b.name],
1801
+ meta: { raw: { type: b.type } }
1802
1802
  };
1803
1803
  }
1804
1804
  }
1805
1805
  }
1806
1806
  } else if (C === "multipleCustomSlotProperty") {
1807
1807
  if (isMultipleSlotNode(D.key) && E.slot && y.type === "comp" && b.meta.slots) {
1808
- let { slotId: y, propertyId: x } = unwrapPropertyKeyOfCustomSlot(T);
1809
- if (E.slot === y) {
1810
- let S = b.meta.slots.find((e) => e.id === y);
1811
- if (S && S.properties) {
1812
- let y = S.properties.find((e) => e.id === x);
1813
- if (y) return {
1808
+ let { compId: y, slotId: x, propertyId: S } = unwrapPropertyKeyOfCustomSlot(T);
1809
+ if (b.id === y && E.slot === x) {
1810
+ let y = b.meta.slots.find((e) => e.id === x);
1811
+ if (y && y.properties) {
1812
+ let b = y.properties.find((e) => e.id === S);
1813
+ if (b) return {
1814
1814
  id: e,
1815
1815
  kind: C,
1816
- names: [S.name, y.name],
1817
- meta: { raw: { type: y.type } }
1816
+ names: [y.name, b.name],
1817
+ meta: { raw: { type: b.type } }
1818
1818
  };
1819
1819
  }
1820
1820
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-block-lib",
3
3
  "private": false,
4
- "version": "0.9.24",
4
+ "version": "0.9.25",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",