@conductor-by-89soone/tokens 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Conductor Design System contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # @conductor-by-89soone/tokens
2
+
3
+ Theme-aware design tokens and validation CLIs for the Conductor Design System. Dark is the canonical theme; light uses the same semantic keys.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ pnpm add @conductor-by-89soone/tokens
9
+ ```
10
+
11
+ ## Use
12
+
13
+ ```ts
14
+ import { breakpoints, tokens } from "@conductor-by-89soone/tokens";
15
+
16
+ console.log(tokens.surface.raised);
17
+ console.log(breakpoints.md);
18
+ ```
19
+
20
+ Import the generated custom properties directly when React components are not needed:
21
+
22
+ ```css
23
+ @import "@conductor-by-89soone/tokens/tokens.css";
24
+ ```
25
+
26
+ The package also exports `tokens.json`, `contrast-report.json`, and three executables:
27
+
28
+ ```bash
29
+ conductor-build-tokens
30
+ conductor-check-contrast
31
+ conductor-lint-tokens <paths...>
32
+ ```
33
+
34
+ `src/tokens.ts` and `src/breakpoints.ts` are generated during the repository build; edit the token source files instead.
35
+
36
+ ## Requirements
37
+
38
+ Node.js 20 or newer.
39
+
40
+ ## License
41
+
42
+ MIT
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ // Bin shim for API-TOK-001. The CLI itself is `dist/cli.js`; this wrapper exists so the
3
+ // executable carries a shebang without the bundler having to inject one.
4
+ import "../dist/cli.js";
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ // Bin shim for API-TOK-003. The CLI itself is `dist/contrast-cli.js`; this wrapper exists so the
3
+ // executable carries a shebang without the bundler having to inject one.
4
+ //
5
+ // `dist/` is a build artifact, so on a clean checkout the CLI does not exist until `pnpm build` has
6
+ // run. A module-resolution stack trace does not say that; this does.
7
+ import { existsSync } from "node:fs";
8
+ import { fileURLToPath } from "node:url";
9
+
10
+ const cli = new URL("../dist/contrast-cli.js", import.meta.url);
11
+
12
+ if (existsSync(fileURLToPath(cli))) {
13
+ await import(cli.href);
14
+ } else {
15
+ console.error("error[TOK-BUILD]: packages/tokens/dist/contrast-cli.js is missing");
16
+ console.error(" hint: run `pnpm build` before `pnpm check:contrast`.");
17
+ process.exitCode = 1;
18
+ }
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ // Bin shim for FR-TOK-001 AC-3. The CLI itself is `dist/lint-cli.js`; this wrapper exists so the
3
+ // executable carries a shebang without the bundler having to inject one.
4
+ //
5
+ // `dist/` is a build artifact, so on a clean checkout the CLI does not exist until `pnpm build` has
6
+ // run. A module-resolution stack trace does not say that; this does.
7
+ import { existsSync } from "node:fs";
8
+ import { fileURLToPath } from "node:url";
9
+
10
+ const cli = new URL("../dist/lint-cli.js", import.meta.url);
11
+
12
+ if (existsSync(fileURLToPath(cli))) {
13
+ await import(cli.href);
14
+ } else {
15
+ console.error("error[TOK-BUILD]: packages/tokens/dist/lint-cli.js is missing");
16
+ console.error(" hint: run `pnpm build` before `pnpm lint:tokens`.");
17
+ process.exitCode = 1;
18
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Generated by @conductor-by-89soone/tokens. Do not edit.
3
+ * Run `pnpm --filter @conductor-by-89soone/tokens run build` to regenerate.
4
+ *
5
+ * Literal pixel numbers, unlike `tokens`: a custom property does not evaluate inside a media
6
+ * query condition, so JS that computes a breakpoint needs the number itself (FR-TOK-009 AC-3).
7
+ */
8
+ declare const breakpoints: {
9
+ readonly sm: 560;
10
+ readonly md: 800;
11
+ readonly lg: 1080;
12
+ };
13
+ /** Shape of the breakpoint object, with every value narrowed to its own numeric literal. */
14
+ type Breakpoints = typeof breakpoints;
15
+
16
+ export { type Breakpoints, breakpoints };
@@ -0,0 +1,8 @@
1
+ // src/breakpoints.ts
2
+ var breakpoints = {
3
+ sm: 560,
4
+ md: 800,
5
+ lg: 1080
6
+ };
7
+
8
+ export { breakpoints };