@stridge/noctis-design-tokens 1.0.0-beta.0 → 1.0.0-beta.3

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 CHANGED
@@ -1,5 +1,7 @@
1
1
  # @stridge/noctis-design-tokens
2
2
 
3
+ ![license](https://img.shields.io/badge/license-MIT-blue) ![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)
4
+
3
5
  The semantic token layer on top of `@stridge/noctis-theme-engine`. The engine generates the private
4
6
  primitive ramp; this package maps it to intent-named **semantic roles** as framework-neutral CSS
5
7
  variables (`--noctis-color-*`), ships the foundation scales, and wires the **elevation scopes**.
@@ -15,6 +15,7 @@ function role(uuid, id, label, group, utility, primitive, description, usage, br
15
15
  category: "color",
16
16
  group,
17
17
  utility,
18
+ /* v8 ignore next -- every SEMANTIC_TOKENS entry passes a bridge and `role` is private, so the no-bridge falsy branch is unreachable */
18
19
  ...bridge ? { bridge } : {}
19
20
  };
20
21
  }
@@ -1,4 +1,4 @@
1
- import { ThemeInput, ThemeOverrides } from "@stridge/noctis-theme-engine";
1
+ import { ThemeInput, ThemeOverrides, ThemePreset } from "@stridge/noctis-theme-engine";
2
2
  import { ReactNode } from "react";
3
3
 
4
4
  //#region src/react/provider.d.ts
@@ -7,6 +7,8 @@ interface ThemeProviderProps {
7
7
  initialInput?: ThemeInput;
8
8
  /** Generation-time primitive overrides, threaded to the engine provider and the scope sets. */
9
9
  overrides?: ThemeOverrides;
10
+ /** Selectable presets exposed via `useTheme().presets`; defaults to the engine's shipped presets. */
11
+ presets?: readonly ThemePreset[];
10
12
  children: ReactNode;
11
13
  }
12
14
  /**
@@ -17,6 +19,7 @@ interface ThemeProviderProps {
17
19
  declare function ThemeProvider({
18
20
  initialInput,
19
21
  overrides,
22
+ presets,
20
23
  children
21
24
  }: ThemeProviderProps): ReactNode;
22
25
  //#endregion
@@ -17,10 +17,11 @@ function ElevationScopes() {
17
17
  * root theme and the `elevated`/`sunken` scope sets are emitted together and stay in sync
18
18
  * across theme changes. Components reach scopes with a `data-elevation` attribute.
19
19
  */
20
- function ThemeProvider$1({ initialInput, overrides, children }) {
20
+ function ThemeProvider$1({ initialInput, overrides, presets, children }) {
21
21
  return /* @__PURE__ */ jsxs(ThemeProvider, {
22
22
  initialInput,
23
23
  overrides,
24
+ presets,
24
25
  children: [/* @__PURE__ */ jsx(ElevationScopes, {}), children]
25
26
  });
26
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stridge/noctis-design-tokens",
3
- "version": "1.0.0-beta.0",
3
+ "version": "1.0.0-beta.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "zod": "4.4.3",
31
- "@stridge/noctis-theme-engine": "1.0.0-beta.0"
31
+ "@stridge/noctis-theme-engine": "1.0.0-beta.3"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "react": "19.2.7"
@@ -54,6 +54,7 @@
54
54
  "tsdown": "0.21.10",
55
55
  "typescript": "6.0.3",
56
56
  "vitest": "4.1.8",
57
+ "@vitest/coverage-v8": "4.1.8",
57
58
  "@stridge/noctis-typescript": "0.0.0"
58
59
  },
59
60
  "scripts": {
@@ -61,7 +62,7 @@
61
62
  "check:publint": "publint",
62
63
  "check:publish": "pnpm run check:publint",
63
64
  "check:types": "tsc --noEmit",
64
- "test": "vitest --run",
65
+ "test": "vitest --run --coverage",
65
66
  "tokens:gen": "node --import ./scripts/register-ts.mjs scripts/generate.ts"
66
67
  }
67
68
  }