@theme-registry/refract-json 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # @theme-registry/refract-json
2
+
3
+ > **Experimental.** Reachable via the npm `experimental` dist-tag; the output shape may still change.
4
+
5
+ The **JSON adapter** for [refract](https://www.npmjs.com/package/@theme-registry/refract) — emits
6
+ refract's own richer document (tokens plus rule-sets, keyframes, and composition) as address-keyed JSON.
7
+ Proves the adapter contract is format-generic (`TUnit = object`).
8
+
9
+ **Docs, live playground & API:** <https://theme-registry.github.io/refract/>
10
+
11
+ ```bash
12
+ npm install @theme-registry/refract @theme-registry/refract-json
13
+ ```
14
+
15
+ ```ts
16
+ import { createTheme } from "@theme-registry/refract";
17
+ import { createJsonAdapter } from "@theme-registry/refract-json";
18
+
19
+ const theme = createTheme(raw, { adapter: createJsonAdapter() });
20
+ theme.json; // the Model as data
21
+ ```
22
+
23
+ > For standardized W3C **DTCG** token interchange (Figma / Style Dictionary), use core's `./dtcg`
24
+ > subpath instead — that's property-token interop, not this richer app-facing document.
25
+
26
+ Peer-depends on `@theme-registry/refract`. See the [JSON adapter docs](https://theme-registry.github.io/refract/a-json).
27
+
28
+ MIT © Petyo Stoyanov
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theme-registry/refract-json",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "The JSON output adapter for @theme-registry/refract — lowers a ThemeModel to a structured JSON document.",
5
5
  "author": {
6
6
  "name": "Petyo Stoyanov",
@@ -32,7 +32,7 @@
32
32
  "./package.json": "./package.json"
33
33
  },
34
34
  "peerDependencies": {
35
- "@theme-registry/refract": "^0.1.0"
35
+ "@theme-registry/refract": "^0.1.2"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@rollup/plugin-terser": "^0.4.4",
@@ -42,7 +42,7 @@
42
42
  "rollup-plugin-peer-deps-external": "^2.2.4",
43
43
  "typescript": "^5.4.2",
44
44
  "vitest": "^4.1.10",
45
- "@theme-registry/refract": "^0.1.0",
45
+ "@theme-registry/refract": "^0.1.2",
46
46
  "@theme-registry/theme-fixtures": "^0.0.0"
47
47
  },
48
48
  "scripts": {