@nxds/core 0.13.0 → 0.14.0
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 -2
- package/dist/runtime/catalogue.cjs +1195 -898
- package/dist/runtime/catalogue.cjs.map +1 -1
- package/dist/runtime/catalogue.d.cts +28 -18
- package/dist/runtime/catalogue.d.ts +28 -18
- package/dist/runtime/catalogue.js +1195 -898
- package/dist/runtime/catalogue.js.map +1 -1
- package/dist/runtime/index.cjs +142 -412
- package/dist/runtime/index.cjs.map +1 -1
- package/dist/runtime/index.d.cts +5 -5
- package/dist/runtime/index.d.ts +5 -5
- package/dist/runtime/index.js +139 -412
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/palette.cjs.map +1 -1
- package/dist/runtime/palette.js.map +1 -1
- package/dist/runtime/{surface-ladder-Cqo5DfZW.d.ts → surface-ladder-B8LyPHC_.d.ts} +61 -2
- package/dist/runtime/{surface-ladder-DZQFqJvm.d.cts → surface-ladder-DQ9Yfwie.d.cts} +61 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Custom brand ramps and raw surface-tone references retain their separate algorit
|
|
|
63
63
|
|
|
64
64
|
## Token catalogue
|
|
65
65
|
|
|
66
|
-
The browser-safe `@nxds/core/catalogue` entry describes every token family for tools and docs: colour, typography, spacing, radius, border width, shadow, motion, z-index, and
|
|
66
|
+
The browser-safe `@nxds/core/catalogue` entry describes every token family for tools and docs: colour, typography, spacing, radius, border width, shadow, motion, z-index, breakpoints, and the UI scale factor and page widths. Each token has its `--nx-*` name, aliases, values per theme mode and preset as the generated CSS declares them, the authored source leaf, and the appearance settings that write it. It builds a fresh array and derives both runtime colour modes on each call, so call it once per build or page, not per render.
|
|
67
67
|
|
|
68
68
|
```ts
|
|
69
69
|
import { createTokenCatalogue } from '@nxds/core/catalogue';
|
|
@@ -148,7 +148,7 @@ All tokens follow the [Design Tokens Community Group](https://tr.designtokens.or
|
|
|
148
148
|
- Output: Tailwind v4 `@theme` block (semantic color via `@theme inline`, accepting runtime `--nx-color-*` overrides) + per-mode `[data-density="X"]` blocks
|
|
149
149
|
- Example: `--color-background: var(--nx-color-background, oklch(1 0 0))` (engine color floor), `--nx-spacing-4: 16px`
|
|
150
150
|
|
|
151
|
-
> **Spacing is two-tier, not three.** Unlike color/radius/shadow/typography, spacing has no `--nx-size-*` primitive layer — `semantic/spacing-{mode}.json` files carry direct px
|
|
151
|
+
> **Spacing is two-tier, not three.** Unlike color/radius/shadow/typography, spacing has no `--nx-size-*` primitive layer — `semantic/spacing-{mode}.json` files carry direct px steps and role tokens that reference a step in the same file (`{spacing.6}`), and the build emits per-mode `[data-density="X"]` blocks plus role utilities (`nx:p-container`, `nx:gap-layout-section`, …). Mode swap is runtime via the `data-density` attribute on `<html>`.
|
|
152
152
|
|
|
153
153
|
**Component** (future)
|
|
154
154
|
|