@supernova-studio/client 0.53.4 → 0.53.6

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
@@ -46,7 +46,6 @@ import { z as z30 } from "zod";
46
46
  import { z as z29 } from "zod";
47
47
  import { z as z33 } from "zod";
48
48
  import { z as z32 } from "zod";
49
- import deepEqual from "deep-equal";
50
49
  import { z as z40 } from "zod";
51
50
  import { z as z34 } from "zod";
52
51
  import slugifyImplementation from "@sindresorhus/slugify";
@@ -791,6 +790,27 @@ function groupBy(items, keyFn) {
791
790
  }
792
791
  return result;
793
792
  }
793
+ function areShallowObjectsEqual(lhs, rhs) {
794
+ if (lhs === void 0 !== (rhs === void 0))
795
+ return false;
796
+ if (lhs === void 0 || rhs === void 0)
797
+ return true;
798
+ if (lhs === null !== (rhs === null))
799
+ return false;
800
+ if (lhs === null || rhs === null)
801
+ return true;
802
+ for (const key in lhs) {
803
+ if (!(key in rhs) || lhs[key] !== rhs[key]) {
804
+ return false;
805
+ }
806
+ }
807
+ for (const key in rhs) {
808
+ if (!(key in lhs)) {
809
+ return false;
810
+ }
811
+ }
812
+ return true;
813
+ }
794
814
  var ContentLoadInstruction = z34.object({
795
815
  from: z34.string(),
796
816
  to: z34.string(),
@@ -1602,7 +1622,8 @@ var PageBlockTypeV1 = z40.enum([
1602
1622
  "Table",
1603
1623
  "TableRow",
1604
1624
  "TableCell",
1605
- "Guidelines"
1625
+ "Guidelines",
1626
+ "Guideline"
1606
1627
  ]);
1607
1628
  var PageBlockCodeLanguage = z40.enum([
1608
1629
  "Angular",
@@ -1798,7 +1819,7 @@ var PageBlockBaseV1 = z40.object({
1798
1819
  // Shortcuts block
1799
1820
  shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
1800
1821
  // Guidelines
1801
- guidelines: nullishToOptional(PageBlockGuideline.array()),
1822
+ guideline: nullishToOptional(PageBlockGuideline),
1802
1823
  // Custom blocks
1803
1824
  customBlockKey: nullishToOptional(z40.string()),
1804
1825
  customBlockProperties: nullishToOptional(z40.array(PageBlockCustomBlockPropertyValue)),
@@ -1868,7 +1889,7 @@ function areAttributesEqual(lhs, rhs) {
1868
1889
  const lhsMap = mapByUnique(lhs, (i) => i.type);
1869
1890
  for (const rhsAttribute of rhs) {
1870
1891
  const lhsAttribute = lhsMap.get(rhsAttribute.type);
1871
- if (!deepEqual(lhsAttribute, rhsAttribute))
1892
+ if (!areShallowObjectsEqual(lhsAttribute, rhsAttribute))
1872
1893
  return false;
1873
1894
  }
1874
1895
  return true;