@unpunnyfuns/swatchbook-blocks 0.10.1 → 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 +1 -1
- package/dist/index.mjs +6 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# swatchbook-blocks
|
|
2
2
|
|
|
3
3
|
Published as `@unpunnyfuns/swatchbook-blocks`. Storybook MDX doc blocks for DTCG design tokens. React components for rendering token documentation inside `.mdx` pages or regular stories. Self-mount the addon's CSS and react to axis changes from the toolbar; work inside the docs container even though story decorators don't.
|
|
4
4
|
|
package/dist/index.mjs
CHANGED
|
@@ -433,13 +433,13 @@ function snapshotToData(snapshot) {
|
|
|
433
433
|
/**
|
|
434
434
|
* Reads project data either from a mounted {@link SwatchbookProvider}
|
|
435
435
|
* (preferred — the addon's preview decorator installs one around every
|
|
436
|
-
* story) or
|
|
437
|
-
*
|
|
436
|
+
* story) or, when no provider is present, from the virtual module plus
|
|
437
|
+
* Storybook globals directly.
|
|
438
438
|
*
|
|
439
|
-
* The
|
|
440
|
-
* blocks and autodocs renders where no story is active. It
|
|
441
|
-
* the virtual module's per-theme CSS and tracks the active
|
|
442
|
-
* `globalsUpdated` channel event; {@link useGlobals} from
|
|
439
|
+
* The provider-less path is what makes the hook safe to call from MDX
|
|
440
|
+
* doc blocks and autodocs renders where no story is active. It
|
|
441
|
+
* self-mounts the virtual module's per-theme CSS and tracks the active
|
|
442
|
+
* tuple via the `globalsUpdated` channel event; {@link useGlobals} from
|
|
443
443
|
* `storybook/preview-api` would throw outside a story render.
|
|
444
444
|
*/
|
|
445
445
|
function useProject() {
|
|
@@ -1020,9 +1020,6 @@ function DimensionBar({ path, kind = "length" }) {
|
|
|
1020
1020
|
* respecting the active color format for color-typed tokens and the
|
|
1021
1021
|
* color sub-values of composite types (border, shadow, gradient).
|
|
1022
1022
|
*
|
|
1023
|
-
* Replaces the old `formatValue` one-shot that hex-short-circuited
|
|
1024
|
-
* colors and fell through to raw JSON for known composites.
|
|
1025
|
-
*
|
|
1026
1023
|
* Shape by type:
|
|
1027
1024
|
* - `color` → `formatColor(value, colorFormat)` — e.g. `#3b82f6`, `oklch(...)`, `raw` JSON.
|
|
1028
1025
|
* - `dimension|duration` → `value + unit` — e.g. `16px`, `200ms`.
|