@unpunnyfuns/swatchbook-addon 0.11.0 → 0.11.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/README.md +2 -4
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swatchbook-addon
|
|
2
2
|
|
|
3
|
-
Published as `@unpunnyfuns/swatchbook-addon`. Storybook 10 addon for DTCG design tokens. Loads your tokens at config time (via `@unpunnyfuns/swatchbook-core`), exposes the resolved graph to the preview through a virtual module, renders
|
|
3
|
+
Published as `@unpunnyfuns/swatchbook-addon`. Storybook 10 addon for DTCG design tokens. Loads your tokens at config time (via `@unpunnyfuns/swatchbook-core`), exposes the resolved graph to the preview through a virtual module, renders a toolbar popover with one dropdown per modifier axis (`mode`, `brand`, and so on) alongside preset pills and a color-format picker, and ships a `useToken()` hook with typed paths. Re-exports the full blocks + switcher React surface so `import { TokenTable, ThemeSwitcher, useToken } from '@unpunnyfuns/swatchbook-addon'` works without a second install.
|
|
4
4
|
|
|
5
5
|
> **Documentation:** [unpunnyfuns.github.io/swatchbook](https://unpunnyfuns.github.io/swatchbook/). Token parsing powered by [Terrazzo](https://terrazzo.app/) by the [Terrazzo team](https://github.com/terrazzoapp) via `@unpunnyfuns/swatchbook-core`.
|
|
6
6
|
|
|
@@ -106,8 +106,6 @@ export const DarkBrandA = meta.story({
|
|
|
106
106
|
|
|
107
107
|
- ✅ Use `useToken` for typed lookups when you need the resolved value at runtime (aria labels, conditional rendering, …).
|
|
108
108
|
- ✅ Prefer `var(--…)` in CSS; `useToken().cssVar` gives you the right string programmatically.
|
|
109
|
-
- ❌ Don't import from `virtual:swatchbook/tokens` directly in consumer code. Go through `useToken` / the panel / the doc blocks so the API stays stable if we change the virtual module's shape.
|
|
110
|
-
- ❌ Don't combine `parameters.swatchbook.theme` *and* the toolbar for the same story — the parameter wins and the toolbar change won't stick.
|
|
111
109
|
|
|
112
110
|
## See also
|
|
113
111
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unpunnyfuns/swatchbook-addon",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Storybook addon for DTCG design tokens — toolbar, panel, and useToken hook.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "unpunnyfuns <unpunnyfuns@gmail.com>",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"jiti": "^2.4.0",
|
|
72
72
|
"picomatch": "^4.0.4",
|
|
73
|
-
"@unpunnyfuns/swatchbook-blocks": "0.11.
|
|
74
|
-
"@unpunnyfuns/swatchbook-core": "0.11.
|
|
75
|
-
"@unpunnyfuns/swatchbook-switcher": "0.11.
|
|
73
|
+
"@unpunnyfuns/swatchbook-blocks": "0.11.1",
|
|
74
|
+
"@unpunnyfuns/swatchbook-core": "0.11.1",
|
|
75
|
+
"@unpunnyfuns/swatchbook-switcher": "0.11.1"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"react": ">=18",
|