@measured/puck-plugin-heading-analyzer 0.21.0-canary.6dae6cb7 → 0.21.0-canary.73664fc6

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.
package/dist/index.mjs CHANGED
@@ -91,7 +91,7 @@ var require_classnames = __commonJS({
91
91
  init_react_import();
92
92
  (function() {
93
93
  "use strict";
94
- var hasOwn = {}.hasOwnProperty;
94
+ var hasOwn2 = {}.hasOwnProperty;
95
95
  function classNames() {
96
96
  var classes = "";
97
97
  for (var i = 0; i < arguments.length; i++) {
@@ -117,7 +117,7 @@ var require_classnames = __commonJS({
117
117
  }
118
118
  var classes = "";
119
119
  for (var key in arg) {
120
- if (hasOwn.call(arg, key) && arg[key]) {
120
+ if (hasOwn2.call(arg, key) && arg[key]) {
121
121
  classes = appendClass(classes, key);
122
122
  }
123
123
  }
@@ -206,11 +206,11 @@ var require_flat = __commonJS({
206
206
  }
207
207
  function isEmpty(val) {
208
208
  const type = Object.prototype.toString.call(val);
209
- const isArray = type === "[object Array]";
209
+ const isArray2 = type === "[object Array]";
210
210
  const isObject = type === "[object Object]";
211
211
  if (!val) {
212
212
  return true;
213
- } else if (isArray) {
213
+ } else if (isArray2) {
214
214
  return !val.length;
215
215
  } else if (isObject) {
216
216
  return !Object.keys(val).length;
@@ -260,42 +260,6 @@ var require_flat = __commonJS({
260
260
  }
261
261
  });
262
262
 
263
- // ../../node_modules/fast-deep-equal/index.js
264
- var require_fast_deep_equal = __commonJS({
265
- "../../node_modules/fast-deep-equal/index.js"(exports, module) {
266
- "use strict";
267
- init_react_import();
268
- module.exports = function equal(a, b) {
269
- if (a === b) return true;
270
- if (a && b && typeof a == "object" && typeof b == "object") {
271
- if (a.constructor !== b.constructor) return false;
272
- var length, i, keys;
273
- if (Array.isArray(a)) {
274
- length = a.length;
275
- if (length != b.length) return false;
276
- for (i = length; i-- !== 0; )
277
- if (!equal(a[i], b[i])) return false;
278
- return true;
279
- }
280
- if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
281
- if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
282
- if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
283
- keys = Object.keys(a);
284
- length = keys.length;
285
- if (length !== Object.keys(b).length) return false;
286
- for (i = length; i-- !== 0; )
287
- if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
288
- for (i = length; i-- !== 0; ) {
289
- var key = keys[i];
290
- if (!equal(a[key], b[key])) return false;
291
- }
292
- return true;
293
- }
294
- return a !== a && b !== b;
295
- };
296
- }
297
- });
298
-
299
263
  // index.ts
300
264
  init_react_import();
301
265
 
@@ -842,10 +806,10 @@ var insert = (list, index, item) => {
842
806
  // ../core/lib/generate-id.ts
843
807
  init_react_import();
844
808
 
845
- // ../../node_modules/uuid/dist/esm-node/index.js
809
+ // ../core/node_modules/uuid/dist/esm-node/index.js
846
810
  init_react_import();
847
811
 
848
- // ../../node_modules/uuid/dist/esm-node/rng.js
812
+ // ../core/node_modules/uuid/dist/esm-node/rng.js
849
813
  init_react_import();
850
814
  import crypto from "crypto";
851
815
  var rnds8Pool = new Uint8Array(256);
@@ -858,7 +822,7 @@ function rng() {
858
822
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
859
823
  }
860
824
 
861
- // ../../node_modules/uuid/dist/esm-node/stringify.js
825
+ // ../core/node_modules/uuid/dist/esm-node/stringify.js
862
826
  init_react_import();
863
827
  var byteToHex = [];
864
828
  for (let i = 0; i < 256; ++i) {
@@ -868,17 +832,17 @@ function unsafeStringify(arr, offset = 0) {
868
832
  return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
869
833
  }
870
834
 
871
- // ../../node_modules/uuid/dist/esm-node/v4.js
835
+ // ../core/node_modules/uuid/dist/esm-node/v4.js
872
836
  init_react_import();
873
837
 
874
- // ../../node_modules/uuid/dist/esm-node/native.js
838
+ // ../core/node_modules/uuid/dist/esm-node/native.js
875
839
  init_react_import();
876
840
  import crypto2 from "crypto";
877
841
  var native_default = {
878
842
  randomUUID: crypto2.randomUUID
879
843
  };
880
844
 
881
- // ../../node_modules/uuid/dist/esm-node/v4.js
845
+ // ../core/node_modules/uuid/dist/esm-node/v4.js
882
846
  function v4(options, buf, offset) {
883
847
  if (native_default.randomUUID && !buf && !options) {
884
848
  return native_default.randomUUID();
@@ -1030,7 +994,9 @@ var replaceAction = (state, action, appStore) => {
1030
994
  });
1031
995
  });
1032
996
  });
1033
- const stateWithDeepSlotsRemoved = __spreadValues({}, state);
997
+ const stateWithDeepSlotsRemoved = __spreadProps(__spreadValues({}, state), {
998
+ ui: __spreadValues(__spreadValues({}, state.ui), action.ui)
999
+ });
1034
1000
  Object.keys(state.indexes.zones).forEach((zoneCompound) => {
1035
1001
  const id = zoneCompound.split(":")[0];
1036
1002
  if (id === originalId) {
@@ -1458,7 +1424,7 @@ var createStoreImpl = (createState) => {
1458
1424
  const initialState = state = createState(setState, getState, api);
1459
1425
  return api;
1460
1426
  };
1461
- var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
1427
+ var createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
1462
1428
 
1463
1429
  // ../../node_modules/zustand/esm/react.mjs
1464
1430
  init_react_import();
@@ -1467,8 +1433,8 @@ var identity = (arg) => arg;
1467
1433
  function useStore(api, selector = identity) {
1468
1434
  const slice = React2.useSyncExternalStore(
1469
1435
  api.subscribe,
1470
- () => selector(api.getState()),
1471
- () => selector(api.getInitialState())
1436
+ React2.useCallback(() => selector(api.getState()), [api, selector]),
1437
+ React2.useCallback(() => selector(api.getInitialState()), [api, selector])
1472
1438
  );
1473
1439
  React2.useDebugValue(slice);
1474
1440
  return slice;
@@ -1479,13 +1445,13 @@ var createImpl = (createState) => {
1479
1445
  Object.assign(useBoundStore, api);
1480
1446
  return useBoundStore;
1481
1447
  };
1482
- var create = (createState) => createState ? createImpl(createState) : createImpl;
1448
+ var create = ((createState) => createState ? createImpl(createState) : createImpl);
1483
1449
 
1484
1450
  // ../../node_modules/zustand/esm/middleware.mjs
1485
1451
  init_react_import();
1486
1452
  var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
1487
1453
  const origSubscribe = api.subscribe;
1488
- api.subscribe = (selector, optListener, options) => {
1454
+ api.subscribe = ((selector, optListener, options) => {
1489
1455
  let listener = selector;
1490
1456
  if (optListener) {
1491
1457
  const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;
@@ -1502,7 +1468,7 @@ var subscribeWithSelectorImpl = (fn) => (set, get, api) => {
1502
1468
  }
1503
1469
  }
1504
1470
  return origSubscribe(listener);
1505
- };
1471
+ });
1506
1472
  const initialState = fn(set, get, api);
1507
1473
  return initialState;
1508
1474
  };
@@ -1542,9 +1508,9 @@ function debounce(func, timeout = 300) {
1542
1508
  var tidyState = (state) => {
1543
1509
  return __spreadProps(__spreadValues({}, state), {
1544
1510
  ui: __spreadProps(__spreadValues({}, state.ui), {
1545
- field: {
1511
+ field: __spreadProps(__spreadValues({}, state.ui.field), {
1546
1512
  focus: null
1547
- }
1513
+ })
1548
1514
  })
1549
1515
  });
1550
1516
  };
@@ -1678,7 +1644,7 @@ var flattenData = (state, config) => {
1678
1644
  (content) => content,
1679
1645
  (item) => {
1680
1646
  data.push(item);
1681
- return null;
1647
+ return item;
1682
1648
  }
1683
1649
  );
1684
1650
  return data;
@@ -1686,42 +1652,462 @@ var flattenData = (state, config) => {
1686
1652
 
1687
1653
  // ../core/lib/get-changed.ts
1688
1654
  init_react_import();
1689
- var import_fast_deep_equal = __toESM(require_fast_deep_equal());
1655
+
1656
+ // ../../node_modules/fast-equals/dist/esm/index.mjs
1657
+ init_react_import();
1658
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
1659
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
1660
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
1661
+ function combineComparators(comparatorA, comparatorB) {
1662
+ return function isEqual(a, b, state) {
1663
+ return comparatorA(a, b, state) && comparatorB(a, b, state);
1664
+ };
1665
+ }
1666
+ function createIsCircular(areItemsEqual) {
1667
+ return function isCircular(a, b, state) {
1668
+ if (!a || !b || typeof a !== "object" || typeof b !== "object") {
1669
+ return areItemsEqual(a, b, state);
1670
+ }
1671
+ var cache2 = state.cache;
1672
+ var cachedA = cache2.get(a);
1673
+ var cachedB = cache2.get(b);
1674
+ if (cachedA && cachedB) {
1675
+ return cachedA === b && cachedB === a;
1676
+ }
1677
+ cache2.set(a, b);
1678
+ cache2.set(b, a);
1679
+ var result = areItemsEqual(a, b, state);
1680
+ cache2.delete(a);
1681
+ cache2.delete(b);
1682
+ return result;
1683
+ };
1684
+ }
1685
+ function getStrictProperties(object) {
1686
+ return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object));
1687
+ }
1688
+ var hasOwn = Object.hasOwn || (function(object, property) {
1689
+ return hasOwnProperty.call(object, property);
1690
+ });
1691
+ function sameValueZeroEqual(a, b) {
1692
+ return a === b || !a && !b && a !== a && b !== b;
1693
+ }
1694
+ var PREACT_VNODE = "__v";
1695
+ var PREACT_OWNER = "__o";
1696
+ var REACT_OWNER = "_owner";
1697
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1698
+ var keys = Object.keys;
1699
+ function areArraysEqual(a, b, state) {
1700
+ var index = a.length;
1701
+ if (b.length !== index) {
1702
+ return false;
1703
+ }
1704
+ while (index-- > 0) {
1705
+ if (!state.equals(a[index], b[index], index, index, a, b, state)) {
1706
+ return false;
1707
+ }
1708
+ }
1709
+ return true;
1710
+ }
1711
+ function areDatesEqual(a, b) {
1712
+ return sameValueZeroEqual(a.getTime(), b.getTime());
1713
+ }
1714
+ function areErrorsEqual(a, b) {
1715
+ return a.name === b.name && a.message === b.message && a.cause === b.cause && a.stack === b.stack;
1716
+ }
1717
+ function areFunctionsEqual(a, b) {
1718
+ return a === b;
1719
+ }
1720
+ function areMapsEqual(a, b, state) {
1721
+ var size = a.size;
1722
+ if (size !== b.size) {
1723
+ return false;
1724
+ }
1725
+ if (!size) {
1726
+ return true;
1727
+ }
1728
+ var matchedIndices = new Array(size);
1729
+ var aIterable = a.entries();
1730
+ var aResult;
1731
+ var bResult;
1732
+ var index = 0;
1733
+ while (aResult = aIterable.next()) {
1734
+ if (aResult.done) {
1735
+ break;
1736
+ }
1737
+ var bIterable = b.entries();
1738
+ var hasMatch = false;
1739
+ var matchIndex = 0;
1740
+ while (bResult = bIterable.next()) {
1741
+ if (bResult.done) {
1742
+ break;
1743
+ }
1744
+ if (matchedIndices[matchIndex]) {
1745
+ matchIndex++;
1746
+ continue;
1747
+ }
1748
+ var aEntry = aResult.value;
1749
+ var bEntry = bResult.value;
1750
+ if (state.equals(aEntry[0], bEntry[0], index, matchIndex, a, b, state) && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) {
1751
+ hasMatch = matchedIndices[matchIndex] = true;
1752
+ break;
1753
+ }
1754
+ matchIndex++;
1755
+ }
1756
+ if (!hasMatch) {
1757
+ return false;
1758
+ }
1759
+ index++;
1760
+ }
1761
+ return true;
1762
+ }
1763
+ var areNumbersEqual = sameValueZeroEqual;
1764
+ function areObjectsEqual(a, b, state) {
1765
+ var properties = keys(a);
1766
+ var index = properties.length;
1767
+ if (keys(b).length !== index) {
1768
+ return false;
1769
+ }
1770
+ while (index-- > 0) {
1771
+ if (!isPropertyEqual(a, b, state, properties[index])) {
1772
+ return false;
1773
+ }
1774
+ }
1775
+ return true;
1776
+ }
1777
+ function areObjectsEqualStrict(a, b, state) {
1778
+ var properties = getStrictProperties(a);
1779
+ var index = properties.length;
1780
+ if (getStrictProperties(b).length !== index) {
1781
+ return false;
1782
+ }
1783
+ var property;
1784
+ var descriptorA;
1785
+ var descriptorB;
1786
+ while (index-- > 0) {
1787
+ property = properties[index];
1788
+ if (!isPropertyEqual(a, b, state, property)) {
1789
+ return false;
1790
+ }
1791
+ descriptorA = getOwnPropertyDescriptor(a, property);
1792
+ descriptorB = getOwnPropertyDescriptor(b, property);
1793
+ if ((descriptorA || descriptorB) && (!descriptorA || !descriptorB || descriptorA.configurable !== descriptorB.configurable || descriptorA.enumerable !== descriptorB.enumerable || descriptorA.writable !== descriptorB.writable)) {
1794
+ return false;
1795
+ }
1796
+ }
1797
+ return true;
1798
+ }
1799
+ function arePrimitiveWrappersEqual(a, b) {
1800
+ return sameValueZeroEqual(a.valueOf(), b.valueOf());
1801
+ }
1802
+ function areRegExpsEqual(a, b) {
1803
+ return a.source === b.source && a.flags === b.flags;
1804
+ }
1805
+ function areSetsEqual(a, b, state) {
1806
+ var size = a.size;
1807
+ if (size !== b.size) {
1808
+ return false;
1809
+ }
1810
+ if (!size) {
1811
+ return true;
1812
+ }
1813
+ var matchedIndices = new Array(size);
1814
+ var aIterable = a.values();
1815
+ var aResult;
1816
+ var bResult;
1817
+ while (aResult = aIterable.next()) {
1818
+ if (aResult.done) {
1819
+ break;
1820
+ }
1821
+ var bIterable = b.values();
1822
+ var hasMatch = false;
1823
+ var matchIndex = 0;
1824
+ while (bResult = bIterable.next()) {
1825
+ if (bResult.done) {
1826
+ break;
1827
+ }
1828
+ if (!matchedIndices[matchIndex] && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) {
1829
+ hasMatch = matchedIndices[matchIndex] = true;
1830
+ break;
1831
+ }
1832
+ matchIndex++;
1833
+ }
1834
+ if (!hasMatch) {
1835
+ return false;
1836
+ }
1837
+ }
1838
+ return true;
1839
+ }
1840
+ function areTypedArraysEqual(a, b) {
1841
+ var index = a.length;
1842
+ if (b.length !== index) {
1843
+ return false;
1844
+ }
1845
+ while (index-- > 0) {
1846
+ if (a[index] !== b[index]) {
1847
+ return false;
1848
+ }
1849
+ }
1850
+ return true;
1851
+ }
1852
+ function areUrlsEqual(a, b) {
1853
+ return a.hostname === b.hostname && a.pathname === b.pathname && a.protocol === b.protocol && a.port === b.port && a.hash === b.hash && a.username === b.username && a.password === b.password;
1854
+ }
1855
+ function isPropertyEqual(a, b, state, property) {
1856
+ if ((property === REACT_OWNER || property === PREACT_OWNER || property === PREACT_VNODE) && (a.$$typeof || b.$$typeof)) {
1857
+ return true;
1858
+ }
1859
+ return hasOwn(b, property) && state.equals(a[property], b[property], property, property, a, b, state);
1860
+ }
1861
+ var ARGUMENTS_TAG = "[object Arguments]";
1862
+ var BOOLEAN_TAG = "[object Boolean]";
1863
+ var DATE_TAG = "[object Date]";
1864
+ var ERROR_TAG = "[object Error]";
1865
+ var MAP_TAG = "[object Map]";
1866
+ var NUMBER_TAG = "[object Number]";
1867
+ var OBJECT_TAG = "[object Object]";
1868
+ var REG_EXP_TAG = "[object RegExp]";
1869
+ var SET_TAG = "[object Set]";
1870
+ var STRING_TAG = "[object String]";
1871
+ var URL_TAG = "[object URL]";
1872
+ var isArray = Array.isArray;
1873
+ var isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView ? ArrayBuffer.isView : null;
1874
+ var assign = Object.assign;
1875
+ var getTag = Object.prototype.toString.call.bind(Object.prototype.toString);
1876
+ function createEqualityComparator(_a) {
1877
+ var areArraysEqual2 = _a.areArraysEqual, areDatesEqual2 = _a.areDatesEqual, areErrorsEqual2 = _a.areErrorsEqual, areFunctionsEqual2 = _a.areFunctionsEqual, areMapsEqual2 = _a.areMapsEqual, areNumbersEqual2 = _a.areNumbersEqual, areObjectsEqual2 = _a.areObjectsEqual, arePrimitiveWrappersEqual2 = _a.arePrimitiveWrappersEqual, areRegExpsEqual2 = _a.areRegExpsEqual, areSetsEqual2 = _a.areSetsEqual, areTypedArraysEqual2 = _a.areTypedArraysEqual, areUrlsEqual2 = _a.areUrlsEqual;
1878
+ return function comparator(a, b, state) {
1879
+ if (a === b) {
1880
+ return true;
1881
+ }
1882
+ if (a == null || b == null) {
1883
+ return false;
1884
+ }
1885
+ var type = typeof a;
1886
+ if (type !== typeof b) {
1887
+ return false;
1888
+ }
1889
+ if (type !== "object") {
1890
+ if (type === "number") {
1891
+ return areNumbersEqual2(a, b, state);
1892
+ }
1893
+ if (type === "function") {
1894
+ return areFunctionsEqual2(a, b, state);
1895
+ }
1896
+ return false;
1897
+ }
1898
+ var constructor = a.constructor;
1899
+ if (constructor !== b.constructor) {
1900
+ return false;
1901
+ }
1902
+ if (constructor === Object) {
1903
+ return areObjectsEqual2(a, b, state);
1904
+ }
1905
+ if (isArray(a)) {
1906
+ return areArraysEqual2(a, b, state);
1907
+ }
1908
+ if (isTypedArray != null && isTypedArray(a)) {
1909
+ return areTypedArraysEqual2(a, b, state);
1910
+ }
1911
+ if (constructor === Date) {
1912
+ return areDatesEqual2(a, b, state);
1913
+ }
1914
+ if (constructor === RegExp) {
1915
+ return areRegExpsEqual2(a, b, state);
1916
+ }
1917
+ if (constructor === Map) {
1918
+ return areMapsEqual2(a, b, state);
1919
+ }
1920
+ if (constructor === Set) {
1921
+ return areSetsEqual2(a, b, state);
1922
+ }
1923
+ var tag = getTag(a);
1924
+ if (tag === DATE_TAG) {
1925
+ return areDatesEqual2(a, b, state);
1926
+ }
1927
+ if (tag === REG_EXP_TAG) {
1928
+ return areRegExpsEqual2(a, b, state);
1929
+ }
1930
+ if (tag === MAP_TAG) {
1931
+ return areMapsEqual2(a, b, state);
1932
+ }
1933
+ if (tag === SET_TAG) {
1934
+ return areSetsEqual2(a, b, state);
1935
+ }
1936
+ if (tag === OBJECT_TAG) {
1937
+ return typeof a.then !== "function" && typeof b.then !== "function" && areObjectsEqual2(a, b, state);
1938
+ }
1939
+ if (tag === URL_TAG) {
1940
+ return areUrlsEqual2(a, b, state);
1941
+ }
1942
+ if (tag === ERROR_TAG) {
1943
+ return areErrorsEqual2(a, b, state);
1944
+ }
1945
+ if (tag === ARGUMENTS_TAG) {
1946
+ return areObjectsEqual2(a, b, state);
1947
+ }
1948
+ if (tag === BOOLEAN_TAG || tag === NUMBER_TAG || tag === STRING_TAG) {
1949
+ return arePrimitiveWrappersEqual2(a, b, state);
1950
+ }
1951
+ return false;
1952
+ };
1953
+ }
1954
+ function createEqualityComparatorConfig(_a) {
1955
+ var circular = _a.circular, createCustomConfig = _a.createCustomConfig, strict = _a.strict;
1956
+ var config = {
1957
+ areArraysEqual: strict ? areObjectsEqualStrict : areArraysEqual,
1958
+ areDatesEqual,
1959
+ areErrorsEqual,
1960
+ areFunctionsEqual,
1961
+ areMapsEqual: strict ? combineComparators(areMapsEqual, areObjectsEqualStrict) : areMapsEqual,
1962
+ areNumbersEqual,
1963
+ areObjectsEqual: strict ? areObjectsEqualStrict : areObjectsEqual,
1964
+ arePrimitiveWrappersEqual,
1965
+ areRegExpsEqual,
1966
+ areSetsEqual: strict ? combineComparators(areSetsEqual, areObjectsEqualStrict) : areSetsEqual,
1967
+ areTypedArraysEqual: strict ? areObjectsEqualStrict : areTypedArraysEqual,
1968
+ areUrlsEqual
1969
+ };
1970
+ if (createCustomConfig) {
1971
+ config = assign({}, config, createCustomConfig(config));
1972
+ }
1973
+ if (circular) {
1974
+ var areArraysEqual$1 = createIsCircular(config.areArraysEqual);
1975
+ var areMapsEqual$1 = createIsCircular(config.areMapsEqual);
1976
+ var areObjectsEqual$1 = createIsCircular(config.areObjectsEqual);
1977
+ var areSetsEqual$1 = createIsCircular(config.areSetsEqual);
1978
+ config = assign({}, config, {
1979
+ areArraysEqual: areArraysEqual$1,
1980
+ areMapsEqual: areMapsEqual$1,
1981
+ areObjectsEqual: areObjectsEqual$1,
1982
+ areSetsEqual: areSetsEqual$1
1983
+ });
1984
+ }
1985
+ return config;
1986
+ }
1987
+ function createInternalEqualityComparator(compare) {
1988
+ return function(a, b, _indexOrKeyA, _indexOrKeyB, _parentA, _parentB, state) {
1989
+ return compare(a, b, state);
1990
+ };
1991
+ }
1992
+ function createIsEqual(_a) {
1993
+ var circular = _a.circular, comparator = _a.comparator, createState = _a.createState, equals = _a.equals, strict = _a.strict;
1994
+ if (createState) {
1995
+ return function isEqual(a, b) {
1996
+ var _a2 = createState(), _b = _a2.cache, cache2 = _b === void 0 ? circular ? /* @__PURE__ */ new WeakMap() : void 0 : _b, meta = _a2.meta;
1997
+ return comparator(a, b, {
1998
+ cache: cache2,
1999
+ equals,
2000
+ meta,
2001
+ strict
2002
+ });
2003
+ };
2004
+ }
2005
+ if (circular) {
2006
+ return function isEqual(a, b) {
2007
+ return comparator(a, b, {
2008
+ cache: /* @__PURE__ */ new WeakMap(),
2009
+ equals,
2010
+ meta: void 0,
2011
+ strict
2012
+ });
2013
+ };
2014
+ }
2015
+ var state = {
2016
+ cache: void 0,
2017
+ equals,
2018
+ meta: void 0,
2019
+ strict
2020
+ };
2021
+ return function isEqual(a, b) {
2022
+ return comparator(a, b, state);
2023
+ };
2024
+ }
2025
+ var deepEqual = createCustomEqual();
2026
+ var strictDeepEqual = createCustomEqual({ strict: true });
2027
+ var circularDeepEqual = createCustomEqual({ circular: true });
2028
+ var strictCircularDeepEqual = createCustomEqual({
2029
+ circular: true,
2030
+ strict: true
2031
+ });
2032
+ var shallowEqual = createCustomEqual({
2033
+ createInternalComparator: function() {
2034
+ return sameValueZeroEqual;
2035
+ }
2036
+ });
2037
+ var strictShallowEqual = createCustomEqual({
2038
+ strict: true,
2039
+ createInternalComparator: function() {
2040
+ return sameValueZeroEqual;
2041
+ }
2042
+ });
2043
+ var circularShallowEqual = createCustomEqual({
2044
+ circular: true,
2045
+ createInternalComparator: function() {
2046
+ return sameValueZeroEqual;
2047
+ }
2048
+ });
2049
+ var strictCircularShallowEqual = createCustomEqual({
2050
+ circular: true,
2051
+ createInternalComparator: function() {
2052
+ return sameValueZeroEqual;
2053
+ },
2054
+ strict: true
2055
+ });
2056
+ function createCustomEqual(options) {
2057
+ if (options === void 0) {
2058
+ options = {};
2059
+ }
2060
+ var _a = options.circular, circular = _a === void 0 ? false : _a, createCustomInternalComparator = options.createInternalComparator, createState = options.createState, _b = options.strict, strict = _b === void 0 ? false : _b;
2061
+ var config = createEqualityComparatorConfig(options);
2062
+ var comparator = createEqualityComparator(config);
2063
+ var equals = createCustomInternalComparator ? createCustomInternalComparator(comparator) : createInternalEqualityComparator(comparator);
2064
+ return createIsEqual({ circular, comparator, createState, equals, strict });
2065
+ }
2066
+
2067
+ // ../core/lib/get-changed.ts
1690
2068
  var getChanged = (newItem, oldItem) => {
1691
2069
  return newItem ? Object.keys(newItem.props || {}).reduce((acc, item) => {
1692
2070
  const newItemProps = (newItem == null ? void 0 : newItem.props) || {};
1693
2071
  const oldItemProps = (oldItem == null ? void 0 : oldItem.props) || {};
1694
2072
  return __spreadProps(__spreadValues({}, acc), {
1695
- [item]: !(0, import_fast_deep_equal.default)(oldItemProps[item], newItemProps[item])
2073
+ [item]: !deepEqual(oldItemProps[item], newItemProps[item])
1696
2074
  });
1697
2075
  }, {}) : {};
1698
2076
  };
1699
2077
 
1700
2078
  // ../core/store/slices/permissions.ts
1701
2079
  var createPermissionsSlice = (set, get) => {
1702
- const resolvePermissions = (..._0) => __async(void 0, [..._0], function* (params = {}, force) {
2080
+ const resolvePermissions = (..._0) => __async(null, [..._0], function* (params = {}, force) {
1703
2081
  const { state, permissions, config } = get();
1704
2082
  const { cache: cache2, globalPermissions } = permissions;
1705
- const resolveDataForItem = (item2, force2 = false) => __async(void 0, null, function* () {
1706
- var _a, _b, _c;
2083
+ const resolvePermissionsForItem = (item2, force2 = false) => __async(null, null, function* () {
2084
+ var _a, _b;
1707
2085
  const { config: config2, state: appState, setComponentLoading } = get();
2086
+ const itemCache = cache2[item2.props.id];
2087
+ const nodes = appState.indexes.nodes;
2088
+ const parentId = (_a = nodes[item2.props.id]) == null ? void 0 : _a.parentId;
2089
+ const parentNode = parentId ? nodes[parentId] : null;
2090
+ const parentData = (_b = parentNode == null ? void 0 : parentNode.data) != null ? _b : null;
1708
2091
  const componentConfig = item2.type === "root" ? config2.root : config2.components[item2.type];
1709
2092
  if (!componentConfig) {
1710
2093
  return;
1711
2094
  }
1712
2095
  const initialPermissions = __spreadValues(__spreadValues({}, globalPermissions), componentConfig.permissions);
1713
2096
  if (componentConfig.resolvePermissions) {
1714
- const changed = getChanged(item2, (_a = cache2[item2.props.id]) == null ? void 0 : _a.lastData);
1715
- if (Object.values(changed).some((el) => el === true) || force2) {
2097
+ const changed = getChanged(item2, itemCache == null ? void 0 : itemCache.lastData);
2098
+ const propsChanged = Object.values(changed).some((el) => el === true);
2099
+ const parentChanged = (itemCache == null ? void 0 : itemCache.lastParentId) !== parentId;
2100
+ if (propsChanged || parentChanged || force2) {
1716
2101
  const clearTimeout2 = setComponentLoading(item2.props.id, true, 50);
1717
2102
  const resolvedPermissions = yield componentConfig.resolvePermissions(
1718
2103
  item2,
1719
2104
  {
1720
2105
  changed,
1721
- lastPermissions: ((_b = cache2[item2.props.id]) == null ? void 0 : _b.lastPermissions) || null,
2106
+ lastPermissions: (itemCache == null ? void 0 : itemCache.lastPermissions) || null,
1722
2107
  permissions: initialPermissions,
1723
2108
  appState: makeStatePublic(appState),
1724
- lastData: ((_c = cache2[item2.props.id]) == null ? void 0 : _c.lastData) || null
2109
+ lastData: (itemCache == null ? void 0 : itemCache.lastData) || null,
2110
+ parent: parentData
1725
2111
  }
1726
2112
  );
1727
2113
  const latest = get().permissions;
@@ -1729,6 +2115,7 @@ var createPermissionsSlice = (set, get) => {
1729
2115
  permissions: __spreadProps(__spreadValues({}, latest), {
1730
2116
  cache: __spreadProps(__spreadValues({}, latest.cache), {
1731
2117
  [item2.props.id]: {
2118
+ lastParentId: parentId,
1732
2119
  lastData: item2,
1733
2120
  lastPermissions: resolvedPermissions
1734
2121
  }
@@ -1742,9 +2129,9 @@ var createPermissionsSlice = (set, get) => {
1742
2129
  }
1743
2130
  }
1744
2131
  });
1745
- const resolveDataForRoot = (force2 = false) => {
2132
+ const resolvePermissionsForRoot = (force2 = false) => {
1746
2133
  const { state: appState } = get();
1747
- resolveDataForItem(
2134
+ resolvePermissionsForItem(
1748
2135
  // Shim the root data in by conforming to component data shape
1749
2136
  {
1750
2137
  type: "root",
@@ -1755,16 +2142,16 @@ var createPermissionsSlice = (set, get) => {
1755
2142
  };
1756
2143
  const { item, type, root } = params;
1757
2144
  if (item) {
1758
- yield resolveDataForItem(item, force);
2145
+ yield resolvePermissionsForItem(item, force);
1759
2146
  } else if (type) {
1760
- flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(void 0, null, function* () {
1761
- yield resolveDataForItem(item2, force);
2147
+ flattenData(state, config).filter((item2) => item2.type === type).map((item2) => __async(null, null, function* () {
2148
+ yield resolvePermissionsForItem(item2, force);
1762
2149
  }));
1763
2150
  } else if (root) {
1764
- resolveDataForRoot(force);
2151
+ resolvePermissionsForRoot(force);
1765
2152
  } else {
1766
- flattenData(state, config).map((item2) => __async(void 0, null, function* () {
1767
- yield resolveDataForItem(item2, force);
2153
+ flattenData(state, config).map((item2) => __async(null, null, function* () {
2154
+ yield resolvePermissionsForItem(item2, force);
1768
2155
  }));
1769
2156
  }
1770
2157
  });
@@ -1817,16 +2204,15 @@ var createFieldsSlice = (_set, _get) => {
1817
2204
 
1818
2205
  // ../core/lib/resolve-component-data.ts
1819
2206
  init_react_import();
1820
- var import_fast_deep_equal2 = __toESM(require_fast_deep_equal());
1821
2207
  var cache = { lastChange: {} };
1822
- var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
2208
+ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
1823
2209
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
1824
2210
  const resolvedItem = __spreadValues({}, item);
1825
2211
  const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
1826
2212
  const id = "id" in item.props ? item.props.id : "root";
1827
2213
  if (shouldRunResolver) {
1828
2214
  const { item: oldItem = null, resolved = {} } = cache.lastChange[id] || {};
1829
- if (trigger !== "force" && item && (0, import_fast_deep_equal2.default)(item, oldItem)) {
2215
+ if (trigger !== "force" && item && deepEqual(item, oldItem)) {
1830
2216
  return { node: resolved, didChange: false };
1831
2217
  }
1832
2218
  const changed = getChanged(item, oldItem);
@@ -1847,11 +2233,11 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
1847
2233
  let itemWithResolvedChildren = yield mapFields(
1848
2234
  resolvedItem,
1849
2235
  {
1850
- slot: (_02) => __async(void 0, [_02], function* ({ value }) {
2236
+ slot: (_02) => __async(null, [_02], function* ({ value }) {
1851
2237
  const content = value;
1852
2238
  return yield Promise.all(
1853
2239
  content.map(
1854
- (childItem) => __async(void 0, null, function* () {
2240
+ (childItem) => __async(null, null, function* () {
1855
2241
  return (yield resolveComponentData(
1856
2242
  childItem,
1857
2243
  config,
@@ -1876,7 +2262,7 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
1876
2262
  };
1877
2263
  return {
1878
2264
  node: itemWithResolvedChildren,
1879
- didChange: !(0, import_fast_deep_equal2.default)(item, itemWithResolvedChildren)
2265
+ didChange: !deepEqual(item, itemWithResolvedChildren)
1880
2266
  };
1881
2267
  });
1882
2268
 
@@ -2041,7 +2427,7 @@ var createAppStore = (initialAppStore) => create()(
2041
2427
  const selectedItem = state.ui.itemSelector ? getItem(state.ui.itemSelector, state) : null;
2042
2428
  return __spreadProps(__spreadValues({}, s), { state, selectedItem });
2043
2429
  }),
2044
- resolveComponentData: (componentData, trigger) => __async(void 0, null, function* () {
2430
+ resolveComponentData: (componentData, trigger) => __async(null, null, function* () {
2045
2431
  const { config, metadata, setComponentLoading, permissions } = get();
2046
2432
  const timeouts = {};
2047
2433
  return yield resolveComponentData(
@@ -2052,7 +2438,7 @@ var createAppStore = (initialAppStore) => create()(
2052
2438
  const id = "id" in item.props ? item.props.id : "root";
2053
2439
  timeouts[id] = setComponentLoading(id, true, 50);
2054
2440
  },
2055
- (item) => __async(void 0, null, function* () {
2441
+ (item) => __async(null, null, function* () {
2056
2442
  const id = "id" in item.props ? item.props.id : "root";
2057
2443
  if ("type" in item) {
2058
2444
  yield permissions.refreshPermissions({ item });
@@ -2064,7 +2450,7 @@ var createAppStore = (initialAppStore) => create()(
2064
2450
  trigger
2065
2451
  );
2066
2452
  }),
2067
- resolveAndCommitData: () => __async(void 0, null, function* () {
2453
+ resolveAndCommitData: () => __async(null, null, function* () {
2068
2454
  const { config, state, dispatch, resolveComponentData: resolveComponentData2 } = get();
2069
2455
  walkAppState(
2070
2456
  state,
@@ -2491,45 +2877,10 @@ classnames/index.js:
2491
2877
  *)
2492
2878
 
2493
2879
  lucide-react/dist/esm/shared/src/utils.js:
2494
- (**
2495
- * @license lucide-react v0.468.0 - ISC
2496
- *
2497
- * This source code is licensed under the ISC license.
2498
- * See the LICENSE file in the root directory of this source tree.
2499
- *)
2500
-
2501
2880
  lucide-react/dist/esm/defaultAttributes.js:
2502
- (**
2503
- * @license lucide-react v0.468.0 - ISC
2504
- *
2505
- * This source code is licensed under the ISC license.
2506
- * See the LICENSE file in the root directory of this source tree.
2507
- *)
2508
-
2509
2881
  lucide-react/dist/esm/Icon.js:
2510
- (**
2511
- * @license lucide-react v0.468.0 - ISC
2512
- *
2513
- * This source code is licensed under the ISC license.
2514
- * See the LICENSE file in the root directory of this source tree.
2515
- *)
2516
-
2517
2882
  lucide-react/dist/esm/createLucideIcon.js:
2518
- (**
2519
- * @license lucide-react v0.468.0 - ISC
2520
- *
2521
- * This source code is licensed under the ISC license.
2522
- * See the LICENSE file in the root directory of this source tree.
2523
- *)
2524
-
2525
2883
  lucide-react/dist/esm/icons/chevron-right.js:
2526
- (**
2527
- * @license lucide-react v0.468.0 - ISC
2528
- *
2529
- * This source code is licensed under the ISC license.
2530
- * See the LICENSE file in the root directory of this source tree.
2531
- *)
2532
-
2533
2884
  lucide-react/dist/esm/lucide-react.js:
2534
2885
  (**
2535
2886
  * @license lucide-react v0.468.0 - ISC