declarative-spec 1.2.1 → 1.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declarative-spec",
3
- "version": "1.2.1",
3
+ "version": "1.5.1",
4
4
  "description": "High-level declarative UI component blueprints, option configurations, and assembly contracts for JSON-to-DOM compilers.",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -20,7 +20,8 @@
20
20
  "url": "git+https://github.com/keshavsoft/declarative-spec.git"
21
21
  },
22
22
  "scripts": {
23
- "build": "npx @keshavsoft/build-cli"
23
+ "build:json": "node scripts/sync-latest-json.mjs",
24
+ "build": "npx @keshavsoft/build-cli && npm run build:json"
24
25
  },
25
26
  "keywords": [
26
27
  "declarative-ui",
package/src/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export { default } from "./v1/index.js";
2
- export * from "./v1/index.js";
1
+ export { default } from "./v5/index.js";
2
+
3
+ export * from "./v5/index.js";
@@ -0,0 +1,8 @@
1
+ import spec from "./spec.json" with { type: "json" };
2
+ import meta from "./meta.js";
3
+ import registerGlobal from "./register.js";
4
+
5
+ export { spec, meta };
6
+ export default spec;
7
+
8
+ registerGlobal(spec);
package/src/v3/meta.js ADDED
@@ -0,0 +1,6 @@
1
+ export const meta = {
2
+ name: "declarative-spec",
3
+ version: "1.3.1"
4
+ };
5
+
6
+ export default meta;
@@ -0,0 +1,11 @@
1
+ import meta from "./meta.js";
2
+
3
+ const registerGlobal = (spec) => {
4
+ if (typeof globalThis === "undefined") return;
5
+
6
+ globalThis.ks ??= {};
7
+ globalThis.ks.declarative ??= {};
8
+ globalThis.ks.declarative.spec = { meta, data: spec };
9
+ };
10
+
11
+ export default registerGlobal;