@supernova-studio/model 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.d.mts +267 -266
- package/dist/index.d.ts +267 -266
- package/dist/index.js +27 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -4
- package/src/dsm/elements/data/documentation-block-v1.ts +4 -4
- package/src/utils/common.ts +22 -0
package/dist/index.mjs
CHANGED
|
@@ -643,7 +643,6 @@ var ComponentElementData = z33.object({
|
|
|
643
643
|
});
|
|
644
644
|
|
|
645
645
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
646
|
-
import deepEqual from "deep-equal";
|
|
647
646
|
import { z as z40 } from "zod";
|
|
648
647
|
|
|
649
648
|
// src/utils/errors.ts
|
|
@@ -797,6 +796,27 @@ async function sleep(ms) {
|
|
|
797
796
|
function uniqueBy(items, prop) {
|
|
798
797
|
return Array.from(mapByUnique(items, prop).values());
|
|
799
798
|
}
|
|
799
|
+
function areShallowObjectsEqual(lhs, rhs) {
|
|
800
|
+
if (lhs === void 0 !== (rhs === void 0))
|
|
801
|
+
return false;
|
|
802
|
+
if (lhs === void 0 || rhs === void 0)
|
|
803
|
+
return true;
|
|
804
|
+
if (lhs === null !== (rhs === null))
|
|
805
|
+
return false;
|
|
806
|
+
if (lhs === null || rhs === null)
|
|
807
|
+
return true;
|
|
808
|
+
for (const key in lhs) {
|
|
809
|
+
if (!(key in rhs) || lhs[key] !== rhs[key]) {
|
|
810
|
+
return false;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
for (const key in rhs) {
|
|
814
|
+
if (!(key in lhs)) {
|
|
815
|
+
return false;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
return true;
|
|
819
|
+
}
|
|
800
820
|
|
|
801
821
|
// src/utils/content-loader-instruction.ts
|
|
802
822
|
import { z as z34 } from "zod";
|
|
@@ -1705,7 +1725,8 @@ var PageBlockTypeV1 = z40.enum([
|
|
|
1705
1725
|
"Table",
|
|
1706
1726
|
"TableRow",
|
|
1707
1727
|
"TableCell",
|
|
1708
|
-
"Guidelines"
|
|
1728
|
+
"Guidelines",
|
|
1729
|
+
"Guideline"
|
|
1709
1730
|
]);
|
|
1710
1731
|
var PageBlockCodeLanguage = z40.enum([
|
|
1711
1732
|
"Angular",
|
|
@@ -1901,7 +1922,7 @@ var PageBlockBaseV1 = z40.object({
|
|
|
1901
1922
|
// Shortcuts block
|
|
1902
1923
|
shortcuts: nullishToOptional(z40.array(PageBlockShortcut)),
|
|
1903
1924
|
// Guidelines
|
|
1904
|
-
|
|
1925
|
+
guideline: nullishToOptional(PageBlockGuideline),
|
|
1905
1926
|
// Custom blocks
|
|
1906
1927
|
customBlockKey: nullishToOptional(z40.string()),
|
|
1907
1928
|
customBlockProperties: nullishToOptional(z40.array(PageBlockCustomBlockPropertyValue)),
|
|
@@ -1977,7 +1998,7 @@ function areAttributesEqual(lhs, rhs) {
|
|
|
1977
1998
|
const lhsMap = mapByUnique(lhs, (i) => i.type);
|
|
1978
1999
|
for (const rhsAttribute of rhs) {
|
|
1979
2000
|
const lhsAttribute = lhsMap.get(rhsAttribute.type);
|
|
1980
|
-
if (!
|
|
2001
|
+
if (!areShallowObjectsEqual(lhsAttribute, rhsAttribute))
|
|
1981
2002
|
return false;
|
|
1982
2003
|
}
|
|
1983
2004
|
return true;
|
|
@@ -5754,6 +5775,7 @@ export {
|
|
|
5754
5775
|
ZIndexUnit,
|
|
5755
5776
|
ZIndexValue,
|
|
5756
5777
|
addImportModelCollections,
|
|
5778
|
+
areShallowObjectsEqual,
|
|
5757
5779
|
buildConstantEnum,
|
|
5758
5780
|
defaultDocumentationItemConfigurationV1,
|
|
5759
5781
|
defaultDocumentationItemConfigurationV2,
|