@drawnagency/primitives 0.1.13 → 0.1.15
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/components/sections/register-schemas.d.ts +1 -1
- package/dist/components/sections/register-schemas.d.ts.map +1 -1
- package/dist/components/sections/register.d.ts +1 -1
- package/dist/components/sections/register.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/sections/register-schemas.ts +9 -1
- package/src/components/sections/register.ts +9 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function ensureSchemasRegistered(): number;
|
|
2
2
|
//# sourceMappingURL=register-schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-schemas.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register-schemas.ts"],"names":[],"mappings":"AAoBA,wBAAgB,uBAAuB,IAAI,MAAM,CAMhD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare function ensureSectionsRegistered(): number;
|
|
2
2
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/components/sections/register.ts"],"names":[],"mappings":"AAoBA,wBAAgB,wBAAwB,IAAI,MAAM,CAMjD"}
|
package/package.json
CHANGED
|
@@ -14,6 +14,14 @@ import iconList from "./IconList";
|
|
|
14
14
|
const allDefs = [linkHeading, subHeading, subSubHeading, prose, mediaGrid,
|
|
15
15
|
splitContent, button, colors, doDontList, doDontImageGrid, iconList,
|
|
16
16
|
];
|
|
17
|
+
|
|
17
18
|
allDefs.forEach((def) => registerSchema(def.type, def.schema));
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
let _ensured = false;
|
|
21
|
+
export function ensureSchemasRegistered(): number {
|
|
22
|
+
if (!_ensured) {
|
|
23
|
+
allDefs.forEach((def) => registerSchema(def.type, def.schema));
|
|
24
|
+
_ensured = true;
|
|
25
|
+
}
|
|
26
|
+
return allDefs.length;
|
|
27
|
+
}
|
|
@@ -14,6 +14,14 @@ import iconList from "./IconList";
|
|
|
14
14
|
const allDefs = [linkHeading, subHeading, subSubHeading, prose, mediaGrid,
|
|
15
15
|
splitContent, button, colors, doDontList, doDontImageGrid, iconList,
|
|
16
16
|
];
|
|
17
|
+
|
|
17
18
|
allDefs.forEach(registerSection);
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
let _ensured = false;
|
|
21
|
+
export function ensureSectionsRegistered(): number {
|
|
22
|
+
if (!_ensured) {
|
|
23
|
+
allDefs.forEach(registerSection);
|
|
24
|
+
_ensured = true;
|
|
25
|
+
}
|
|
26
|
+
return allDefs.length;
|
|
27
|
+
}
|