@resq-systems/constants 0.3.1 → 0.4.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 +19 -14
- package/lib/brand.d.ts +22 -4
- package/lib/brand.d.ts.map +1 -1
- package/lib/brand.js +22 -4
- package/lib/brand.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/tokens.d.ts +64 -15
- package/lib/tokens.d.ts.map +1 -1
- package/lib/tokens.js +55 -10
- package/lib/tokens.js.map +1 -1
- package/package.json +8 -4
- package/src/tokens.css +55 -0
package/README.md
CHANGED
|
@@ -30,8 +30,9 @@ bun add @resq-systems/constants
|
|
|
30
30
|
| Import | Contents |
|
|
31
31
|
| --- | --- |
|
|
32
32
|
| `@resq-systems/constants` | everything below |
|
|
33
|
-
| `@resq-systems/constants/tokens` | `colors` (oklch source + email-safe hex), `fonts` (stacks + webfont href), `radii`, `themeColor` (light/dark PWA + viewport `theme-color`) |
|
|
34
|
-
| `@resq-systems/constants/brand` | `brand` — name, legal name, tagline, domains, email addresses, postal address |
|
|
33
|
+
| `@resq-systems/constants/tokens` | `colors` (`oklch` source + email-safe `hex` snapshot, incl. `info`/`success`/`warning`/`danger` status roles), `fonts` (stacks + webfont href), `radii`, `themeColor` (light/dark PWA + viewport `theme-color`), plus the color-role types `ColorRole`, `StatusRole`, `OklchColorRole`, `ColorTokenName` |
|
|
34
|
+
| `@resq-systems/constants/brand` | `brand` — name, product name, legal name, tagline, description, domains, email addresses, legal URLs, socials, company info, logo, postal address |
|
|
35
|
+
| `@resq-systems/constants/tokens.css` | Stylesheet mirroring `./tokens`: the `oklch` color roles, `--resq-chart-1..5` palette, `--resq-radius-*`, and `--resq-font-*` stacks as CSS custom properties on `:root`. `@import` it directly. |
|
|
35
36
|
|
|
36
37
|
Everything is `as const`, so values are literal-typed and tree-shakeable.
|
|
37
38
|
|
|
@@ -57,7 +58,7 @@ place by being reused across apps, not by being convenient to dump here.
|
|
|
57
58
|
## Rules
|
|
58
59
|
|
|
59
60
|
- **Zero runtime dependencies.** This package must stay dependency-free.
|
|
60
|
-
- Values are data only — no logic
|
|
61
|
+
- Values are data only — no logic; the JS is side-effect-free. Only the stylesheet (`tokens.css`) is a side-effectful import, declared via `sideEffects`.
|
|
61
62
|
- A change here ripples to every dependent; prefer additive, stable edits.
|
|
62
63
|
|
|
63
64
|
## Prerequisites
|
|
@@ -67,21 +68,25 @@ place by being reused across apps, not by being convenient to dump here.
|
|
|
67
68
|
|
|
68
69
|
## Consuming in CSS
|
|
69
70
|
|
|
70
|
-
|
|
71
|
-
`
|
|
72
|
-
|
|
71
|
+
Import the ready-made stylesheet — it declares the `oklch` color roles, the
|
|
72
|
+
`--resq-chart-1..5` palette, `--resq-radius-*`, and `--resq-font-*` stacks as CSS
|
|
73
|
+
custom properties on `:root`:
|
|
73
74
|
|
|
74
|
-
```
|
|
75
|
-
import
|
|
75
|
+
```css
|
|
76
|
+
@import "@resq-systems/constants/tokens.css";
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
--color-
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
.panel {
|
|
79
|
+
background: var(--resq-color-surface);
|
|
80
|
+
border: 1px solid var(--resq-color-border);
|
|
81
|
+
border-radius: var(--resq-radius-lg);
|
|
82
|
+
font-family: var(--resq-font-body);
|
|
83
|
+
}
|
|
81
84
|
```
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
The stylesheet mirrors `./tokens` (a test fails if the two drift). For Tailwind
|
|
87
|
+
v4, alias these custom properties inside your `@theme` block so utilities resolve
|
|
88
|
+
against the same source of truth. If you need the raw values in TypeScript — or
|
|
89
|
+
the email-safe `hex` snapshot — import the objects from `./tokens` instead.
|
|
85
90
|
|
|
86
91
|
## Testing
|
|
87
92
|
|
package/lib/brand.d.ts
CHANGED
|
@@ -15,8 +15,15 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
|
-
* ResQ Systems brand identity — names, domains, contact
|
|
19
|
-
* shared across apps (marketing site, dashboard,
|
|
18
|
+
* @fileoverview ResQ Systems brand identity constants — names, domains, contact
|
|
19
|
+
* addresses, and legal details shared across apps (marketing site, dashboard,
|
|
20
|
+
* transactional email).
|
|
21
|
+
*
|
|
22
|
+
* @module @resq-systems/constants/brand
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* ResQ Systems brand identity — names, domains, contact addresses, and legal
|
|
26
|
+
* details shared across apps (marketing site, dashboard, transactional email).
|
|
20
27
|
*
|
|
21
28
|
* The postal address is ResQ Systems, Inc.'s public Delaware registered-agent
|
|
22
29
|
* address (already public on the DE filing), included so commercial email stays
|
|
@@ -33,6 +40,11 @@ declare const brand: {
|
|
|
33
40
|
readonly tagline: "autonomous drone disaster response";
|
|
34
41
|
/** Long-form product description (metadata, manifest, store listings). */
|
|
35
42
|
readonly description: "The decentralized kinetic operating system for autonomous disaster response. Mesh-networked coordination when infrastructure fails.";
|
|
43
|
+
/**
|
|
44
|
+
* Absolute `https://` origins with no trailing slash, so a caller can append
|
|
45
|
+
* a path directly (`` `${brand.domains.marketing}/pricing` ``). `marketing`
|
|
46
|
+
* is the apex domain; the others are subdomains of it.
|
|
47
|
+
*/
|
|
36
48
|
readonly domains: {
|
|
37
49
|
readonly app: "https://app.resq.software";
|
|
38
50
|
readonly marketing: "https://resq.software";
|
|
@@ -40,6 +52,12 @@ declare const brand: {
|
|
|
40
52
|
readonly status: "https://status.resq.software";
|
|
41
53
|
};
|
|
42
54
|
readonly email: {
|
|
55
|
+
/**
|
|
56
|
+
* RFC 5322 display-name form (`Name <addr>`) for use as a message `From`
|
|
57
|
+
* header verbatim. Sends from the `send.resq.software` subdomain — the
|
|
58
|
+
* DKIM/SPF-authenticated envelope domain — which differs from the apex
|
|
59
|
+
* reply domain used by {@link support}/{@link contact}.
|
|
60
|
+
*/
|
|
43
61
|
readonly from: "ResQ Systems <updates@send.resq.software>";
|
|
44
62
|
readonly support: "support@resq.software";
|
|
45
63
|
readonly contact: "contact@resq.software";
|
|
@@ -56,8 +74,8 @@ declare const brand: {
|
|
|
56
74
|
readonly github: "https://github.com/resq-software";
|
|
57
75
|
};
|
|
58
76
|
readonly company: {
|
|
59
|
-
readonly stage: "Seed
|
|
60
|
-
readonly locations: readonly ["New York"
|
|
77
|
+
readonly stage: "Pre-Seed";
|
|
78
|
+
readonly locations: readonly ["Long Island, New York"];
|
|
61
79
|
};
|
|
62
80
|
readonly logo: "https://resq.software/logo.png";
|
|
63
81
|
readonly postalAddress: "ResQ Systems, Inc., 131 Continental Dr, Suite 305, Newark, DE 19713, USA";
|
package/lib/brand.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.d.ts","names":[],"sources":["../src/brand.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"brand.d.ts","names":[],"sources":["../src/brand.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgCa;;WAEZ;;WAEA;;WAEA;;WAEA;;WAEA;;;;;;WAOA;aACC;aACA;aACA;aACA;;WAED;;;;;;;aAOC;aACA;aACA;;WAED;aACC;aACA;;WAED;aACC;;aAEA;aACA;aACA;;WAED;aACC;aACA;;WAED;WACA"}
|
package/lib/brand.js
CHANGED
|
@@ -15,8 +15,15 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
|
-
* ResQ Systems brand identity — names, domains, contact
|
|
19
|
-
* shared across apps (marketing site, dashboard,
|
|
18
|
+
* @fileoverview ResQ Systems brand identity constants — names, domains, contact
|
|
19
|
+
* addresses, and legal details shared across apps (marketing site, dashboard,
|
|
20
|
+
* transactional email).
|
|
21
|
+
*
|
|
22
|
+
* @module @resq-systems/constants/brand
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* ResQ Systems brand identity — names, domains, contact addresses, and legal
|
|
26
|
+
* details shared across apps (marketing site, dashboard, transactional email).
|
|
20
27
|
*
|
|
21
28
|
* The postal address is ResQ Systems, Inc.'s public Delaware registered-agent
|
|
22
29
|
* address (already public on the DE filing), included so commercial email stays
|
|
@@ -33,6 +40,11 @@ const brand = {
|
|
|
33
40
|
tagline: "autonomous drone disaster response",
|
|
34
41
|
/** Long-form product description (metadata, manifest, store listings). */
|
|
35
42
|
description: "The decentralized kinetic operating system for autonomous disaster response. Mesh-networked coordination when infrastructure fails.",
|
|
43
|
+
/**
|
|
44
|
+
* Absolute `https://` origins with no trailing slash, so a caller can append
|
|
45
|
+
* a path directly (`` `${brand.domains.marketing}/pricing` ``). `marketing`
|
|
46
|
+
* is the apex domain; the others are subdomains of it.
|
|
47
|
+
*/
|
|
36
48
|
domains: {
|
|
37
49
|
app: "https://app.resq.software",
|
|
38
50
|
marketing: "https://resq.software",
|
|
@@ -40,6 +52,12 @@ const brand = {
|
|
|
40
52
|
status: "https://status.resq.software"
|
|
41
53
|
},
|
|
42
54
|
email: {
|
|
55
|
+
/**
|
|
56
|
+
* RFC 5322 display-name form (`Name <addr>`) for use as a message `From`
|
|
57
|
+
* header verbatim. Sends from the `send.resq.software` subdomain — the
|
|
58
|
+
* DKIM/SPF-authenticated envelope domain — which differs from the apex
|
|
59
|
+
* reply domain used by {@link support}/{@link contact}.
|
|
60
|
+
*/
|
|
43
61
|
from: "ResQ Systems <updates@send.resq.software>",
|
|
44
62
|
support: "support@resq.software",
|
|
45
63
|
contact: "contact@resq.software"
|
|
@@ -56,8 +74,8 @@ const brand = {
|
|
|
56
74
|
github: "https://github.com/resq-software"
|
|
57
75
|
},
|
|
58
76
|
company: {
|
|
59
|
-
stage: "Seed
|
|
60
|
-
locations: ["New York"
|
|
77
|
+
stage: "Pre-Seed",
|
|
78
|
+
locations: ["Long Island, New York"]
|
|
61
79
|
},
|
|
62
80
|
logo: "https://resq.software/logo.png",
|
|
63
81
|
postalAddress: "ResQ Systems, Inc., 131 Continental Dr, Suite 305, Newark, DE 19713, USA"
|
package/lib/brand.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand.js","names":[],"sources":["../src/brand.ts"],"sourcesContent":["/**\n * Copyright 2026 ResQ Systems, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * ResQ Systems brand identity — names, domains, contact addresses, and legal details\n * shared across apps (marketing site, dashboard, transactional email).\n *\n * The postal address is ResQ Systems, Inc.'s public Delaware registered-agent\n * address (already public on the DE filing), included so commercial email stays\n * CAN-SPAM compliant by default.\n */\nexport const brand = {\n\t/** Short brand name. */\n\tname: \"ResQ Systems\",\n\t/** Product name (marketing / app title). */\n\tproductName: \"ResQ Tactical OS\",\n\t/** Registered legal entity. */\n\tlegalName: \"ResQ Systems, Inc.\",\n\t/** One-line positioning tagline. */\n\ttagline: \"autonomous drone disaster response\",\n\t/** Long-form product description (metadata, manifest, store listings). */\n\tdescription:\n\t\t\"The decentralized kinetic operating system for autonomous disaster response. Mesh-networked coordination when infrastructure fails.\",\n\tdomains: {\n\t\tapp: \"https://app.resq.software\",\n\t\tmarketing: \"https://resq.software\",\n\t\tdocs: \"https://docs.resq.software\",\n\t\tstatus: \"https://status.resq.software\",\n\t},\n\temail: {\n\t\tfrom: \"ResQ Systems <updates@send.resq.software>\",\n\t\tsupport: \"support@resq.software\",\n\t\tcontact: \"contact@resq.software\",\n\t},\n\tlegal: {\n\t\ttermsUrl: \"https://resq.software/legal/terms\",\n\t\tprivacyUrl: \"https://resq.software/legal/privacy\",\n\t},\n\tsocials: {\n\t\tx: \"https://x.com/resqsystems_inc\",\n\t\t/** The `@handle` form for `twitter:creator`/`site` meta (matches the `x` profile). */\n\t\txHandle: \"@resqsystems_inc\",\n\t\tlinkedin: \"https://www.linkedin.com/company/resq-systems-inc\",\n\t\tgithub: \"https://github.com/resq-software\",\n\t},\n\tcompany: {\n\t\tstage: \"Seed
|
|
1
|
+
{"version":3,"file":"brand.js","names":[],"sources":["../src/brand.ts"],"sourcesContent":["/**\n * Copyright 2026 ResQ Systems, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview ResQ Systems brand identity constants — names, domains, contact\n * addresses, and legal details shared across apps (marketing site, dashboard,\n * transactional email).\n *\n * @module @resq-systems/constants/brand\n */\n\n/**\n * ResQ Systems brand identity — names, domains, contact addresses, and legal\n * details shared across apps (marketing site, dashboard, transactional email).\n *\n * The postal address is ResQ Systems, Inc.'s public Delaware registered-agent\n * address (already public on the DE filing), included so commercial email stays\n * CAN-SPAM compliant by default.\n */\nexport const brand = {\n\t/** Short brand name. */\n\tname: \"ResQ Systems\",\n\t/** Product name (marketing / app title). */\n\tproductName: \"ResQ Tactical OS\",\n\t/** Registered legal entity. */\n\tlegalName: \"ResQ Systems, Inc.\",\n\t/** One-line positioning tagline. */\n\ttagline: \"autonomous drone disaster response\",\n\t/** Long-form product description (metadata, manifest, store listings). */\n\tdescription:\n\t\t\"The decentralized kinetic operating system for autonomous disaster response. Mesh-networked coordination when infrastructure fails.\",\n\t/**\n\t * Absolute `https://` origins with no trailing slash, so a caller can append\n\t * a path directly (`` `${brand.domains.marketing}/pricing` ``). `marketing`\n\t * is the apex domain; the others are subdomains of it.\n\t */\n\tdomains: {\n\t\tapp: \"https://app.resq.software\",\n\t\tmarketing: \"https://resq.software\",\n\t\tdocs: \"https://docs.resq.software\",\n\t\tstatus: \"https://status.resq.software\",\n\t},\n\temail: {\n\t\t/**\n\t\t * RFC 5322 display-name form (`Name <addr>`) for use as a message `From`\n\t\t * header verbatim. Sends from the `send.resq.software` subdomain — the\n\t\t * DKIM/SPF-authenticated envelope domain — which differs from the apex\n\t\t * reply domain used by {@link support}/{@link contact}.\n\t\t */\n\t\tfrom: \"ResQ Systems <updates@send.resq.software>\",\n\t\tsupport: \"support@resq.software\",\n\t\tcontact: \"contact@resq.software\",\n\t},\n\tlegal: {\n\t\ttermsUrl: \"https://resq.software/legal/terms\",\n\t\tprivacyUrl: \"https://resq.software/legal/privacy\",\n\t},\n\tsocials: {\n\t\tx: \"https://x.com/resqsystems_inc\",\n\t\t/** The `@handle` form for `twitter:creator`/`site` meta (matches the `x` profile). */\n\t\txHandle: \"@resqsystems_inc\",\n\t\tlinkedin: \"https://www.linkedin.com/company/resq-systems-inc\",\n\t\tgithub: \"https://github.com/resq-software\",\n\t},\n\tcompany: {\n\t\tstage: \"Pre-Seed\",\n\t\tlocations: [\"Long Island, New York\"],\n\t},\n\tlogo: \"https://resq.software/logo.png\",\n\tpostalAddress: \"ResQ Systems, Inc., 131 Continental Dr, Suite 305, Newark, DE 19713, USA\",\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,MAAa,QAAQ;;CAEpB,MAAM;;CAEN,aAAa;;CAEb,WAAW;;CAEX,SAAS;;CAET,aACC;;;;;;CAMD,SAAS;EACR,KAAK;EACL,WAAW;EACX,MAAM;EACN,QAAQ;CACT;CACA,OAAO;;;;;;;EAON,MAAM;EACN,SAAS;EACT,SAAS;CACV;CACA,OAAO;EACN,UAAU;EACV,YAAY;CACb;CACA,SAAS;EACR,GAAG;;EAEH,SAAS;EACT,UAAU;EACV,QAAQ;CACT;CACA,SAAS;EACR,OAAO;EACP,WAAW,CAAC,uBAAuB;CACpC;CACA,MAAM;CACN,eAAe;AAChB"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { brand } from "./brand.js";
|
|
2
2
|
import { ColorRole, ColorTokenName, OklchColorRole, StatusRole, colors, fonts, radii, themeColor } from "./tokens.js";
|
|
3
|
-
export { ColorRole, ColorTokenName, OklchColorRole, StatusRole, brand, colors, fonts, radii, themeColor };
|
|
3
|
+
export { type ColorRole, type ColorTokenName, type OklchColorRole, type StatusRole, brand, colors, fonts, radii, themeColor };
|
package/lib/tokens.d.ts
CHANGED
|
@@ -15,29 +15,55 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
|
-
* ResQ Systems design tokens
|
|
19
|
-
* `@resq-systems/
|
|
18
|
+
* @fileoverview ResQ Systems design tokens (colors, theme colors, fonts, radii) —
|
|
19
|
+
* the single source of truth shared by `@resq-systems/ui`,
|
|
20
|
+
* `@resq-systems/email-templates`, and app surfaces. `oklch` is the design-system
|
|
21
|
+
* source of truth; `hex` is the email/legacy-safe snapshot (email clients and
|
|
22
|
+
* older targets do not support `oklch()`), so keep the two representations in sync
|
|
23
|
+
* when the palette changes.
|
|
20
24
|
*
|
|
21
|
-
*
|
|
22
|
-
* snapshot (email clients and older targets do not support `oklch()`). Keep the
|
|
23
|
-
* two representations in sync when the palette changes.
|
|
25
|
+
* @module @resq-systems/constants/tokens
|
|
24
26
|
*/
|
|
25
27
|
/**
|
|
26
28
|
* The six canonical color roles present in **both** representations. `oklch`
|
|
27
29
|
* (the design-system source of truth) and `hex` (the email-safe snapshot) must
|
|
28
30
|
* each define every one of these.
|
|
31
|
+
*
|
|
32
|
+
* These are semantic *roles*, not raw swatches: consumers reference
|
|
33
|
+
* `colors.oklch.primary`, never the literal channel values, so a palette change
|
|
34
|
+
* updates the token once. The union has no meaningful ordering — membership, not
|
|
35
|
+
* position, is the contract.
|
|
29
36
|
*/
|
|
30
37
|
type ColorRole = "background" | "surface" | "border" | "foreground" | "muted" | "primary";
|
|
31
38
|
/**
|
|
32
39
|
* Status roles that exist only in the email-safe `hex` snapshot. `oklch` does
|
|
33
40
|
* not define these, so they are indexable on `colors.hex` but never on
|
|
34
|
-
* `colors.oklch
|
|
41
|
+
* {@link ColorRole} / `colors.oklch` — the type split enforces that asymmetry at
|
|
42
|
+
* compile time. In apps these four states come from the `@resq-systems/ui`
|
|
43
|
+
* theme's own status tokens rather than from here; the hex copies exist so
|
|
44
|
+
* transactional email (which can't evaluate `oklch()`) still has them.
|
|
35
45
|
*/
|
|
36
46
|
type StatusRole = "info" | "success" | "warning" | "danger";
|
|
47
|
+
/**
|
|
48
|
+
* The canonical palette in its two representations. `oklch` is the source of
|
|
49
|
+
* truth; `hex` is a hand-maintained snapshot that must resolve to the same
|
|
50
|
+
* perceived color for each shared {@link ColorRole}, because email clients and
|
|
51
|
+
* older render targets can't evaluate `oklch()`. Editing one representation
|
|
52
|
+
* without the other silently drifts email away from the app — the two are only
|
|
53
|
+
* *structurally* linked by the `satisfies` clause below, not value-checked.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* import { colors } from "@resq-systems/constants/tokens";
|
|
58
|
+
*
|
|
59
|
+
* colors.oklch.primary; // → "oklch(58.50% 0.1877 24.72)"
|
|
60
|
+
* colors.hex.danger; // → "#D43E3F" (status role — hex only)
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
37
63
|
declare const colors: {
|
|
38
64
|
readonly oklch: {
|
|
39
65
|
readonly background: "oklch(16.63% 0.0262 269.37)";
|
|
40
|
-
readonly surface: "oklch(
|
|
66
|
+
readonly surface: "oklch(19.72% 0.0231 268.80)";
|
|
41
67
|
readonly border: "oklch(26.45% 0.0386 270.81)";
|
|
42
68
|
readonly foreground: "oklch(96.19% 0.0109 274.89)";
|
|
43
69
|
readonly muted: "oklch(64.00% 0.0535 266.82)";
|
|
@@ -55,6 +81,12 @@ declare const colors: {
|
|
|
55
81
|
readonly warning: "#E0A100";
|
|
56
82
|
readonly danger: "#D43E3F";
|
|
57
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Categorical data-visualization palette — the five `--chart-1..5` oklch
|
|
86
|
+
* values shipped by `@resq-systems/ui` (canonical dark `:root` scale). Charts
|
|
87
|
+
* cycle these in order for series colors. `oklch` only (not email-safe).
|
|
88
|
+
*/
|
|
89
|
+
readonly chart: readonly ["oklch(58.50% 0.1877 24.72)", "oklch(64.20% 0.1560 252.61)", "oklch(73.39% 0.1538 161.68)", "oklch(78.37% 0.1587 72.99)", "oklch(68.62% 0.0471 261.10)"];
|
|
58
90
|
};
|
|
59
91
|
/**
|
|
60
92
|
* Roles indexable on `colors.oklch` — exactly {@link ColorRole}. Type any
|
|
@@ -65,14 +97,27 @@ type OklchColorRole = keyof typeof colors.oklch;
|
|
|
65
97
|
/** Every token name present on the email-safe `hex` snapshot. */
|
|
66
98
|
type ColorTokenName = keyof typeof colors.hex;
|
|
67
99
|
/**
|
|
68
|
-
* Browser + PWA `theme-color` / viewport meta colors
|
|
69
|
-
*
|
|
100
|
+
* Browser + PWA `theme-color` / viewport meta colors, keyed by
|
|
101
|
+
* `prefers-color-scheme`. `dark` is aliased to {@link colors}`.hex.background`
|
|
102
|
+
* (not a re-typed copy) so the browser chrome always matches the dark page
|
|
103
|
+
* background exactly; `light` is a standalone light-mode chrome color with no
|
|
104
|
+
* palette counterpart. Hex, not oklch, because `<meta name="theme-color">`
|
|
105
|
+
* across browsers doesn't accept `oklch()`.
|
|
70
106
|
*/
|
|
71
107
|
declare const themeColor: {
|
|
72
108
|
readonly light: "#E8EAF0";
|
|
73
109
|
readonly dark: "#0A0E1A";
|
|
74
110
|
};
|
|
75
|
-
/**
|
|
111
|
+
/**
|
|
112
|
+
* Brand typefaces, ready-to-use CSS font stacks, and the webfont stylesheet.
|
|
113
|
+
*
|
|
114
|
+
* Within each {@link fonts.stacks} array the **first** entry is the brand face
|
|
115
|
+
* and the rest are ordered fallbacks the browser walks until one resolves;
|
|
116
|
+
* multi-word family names are pre-quoted so the array can be joined into a
|
|
117
|
+
* `font-family` value verbatim. {@link fonts.googleFontsHref} must stay in sync
|
|
118
|
+
* with these families and the weights they're actually rendered at — a face or
|
|
119
|
+
* weight used in the app but missing from the href won't load.
|
|
120
|
+
*/
|
|
76
121
|
declare const fonts: {
|
|
77
122
|
readonly display: "Syne";
|
|
78
123
|
readonly body: "DM Sans";
|
|
@@ -84,12 +129,16 @@ declare const fonts: {
|
|
|
84
129
|
};
|
|
85
130
|
readonly googleFontsHref: "https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500&family=DM+Mono:wght@500&display=swap";
|
|
86
131
|
};
|
|
87
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Border radius scale (px, email-safe). Mirrors the shipped `@resq-systems/ui`
|
|
134
|
+
* `--radius-*` scale: `sm`→token (3px), `md`→control (4px), `lg`→panel (6px),
|
|
135
|
+
* `xl` (panel + 4px = 10px). `full` is the pill radius (no UI counterpart).
|
|
136
|
+
*/
|
|
88
137
|
declare const radii: {
|
|
89
|
-
readonly sm: "
|
|
90
|
-
readonly md: "
|
|
91
|
-
readonly lg: "
|
|
92
|
-
readonly xl: "
|
|
138
|
+
readonly sm: "3px";
|
|
139
|
+
readonly md: "4px";
|
|
140
|
+
readonly lg: "6px";
|
|
141
|
+
readonly xl: "10px";
|
|
93
142
|
readonly full: "999px";
|
|
94
143
|
};
|
|
95
144
|
//#endregion
|
package/lib/tokens.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","names":[],"sources":["../src/tokens.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","names":[],"sources":["../src/tokens.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAqCY;;;;;;;;;KAUA;;;;;;;;;;;;;;;;;cAkBC;;aAEX;aACA;aACA;aACA;aACA;aACA;;;aAGA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;;;;;;;;KAyBU,8BAA8B,OAAO;;KAGrC,8BAA8B,OAAO;;;;;;;;;cAUpC;WACZ;WACA;;;;;;;;;;;;cAaY;WACZ;WACA;WACA;WACA;aACC;aACA;aAUA;;WAED;;;;;;;cASY;WACZ;WACA;WACA;WACA;WACA"}
|
package/lib/tokens.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
//#region src/tokens.ts
|
|
2
|
+
/**
|
|
3
|
+
* The canonical palette in its two representations. `oklch` is the source of
|
|
4
|
+
* truth; `hex` is a hand-maintained snapshot that must resolve to the same
|
|
5
|
+
* perceived color for each shared {@link ColorRole}, because email clients and
|
|
6
|
+
* older render targets can't evaluate `oklch()`. Editing one representation
|
|
7
|
+
* without the other silently drifts email away from the app — the two are only
|
|
8
|
+
* *structurally* linked by the `satisfies` clause below, not value-checked.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { colors } from "@resq-systems/constants/tokens";
|
|
13
|
+
*
|
|
14
|
+
* colors.oklch.primary; // → "oklch(58.50% 0.1877 24.72)"
|
|
15
|
+
* colors.hex.danger; // → "#D43E3F" (status role — hex only)
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
2
18
|
const colors = {
|
|
3
19
|
oklch: {
|
|
4
20
|
background: "oklch(16.63% 0.0262 269.37)",
|
|
5
|
-
surface: "oklch(
|
|
21
|
+
surface: "oklch(19.72% 0.0231 268.80)",
|
|
6
22
|
border: "oklch(26.45% 0.0386 270.81)",
|
|
7
23
|
foreground: "oklch(96.19% 0.0109 274.89)",
|
|
8
24
|
muted: "oklch(64.00% 0.0535 266.82)",
|
|
@@ -19,17 +35,42 @@ const colors = {
|
|
|
19
35
|
success: "#3FB984",
|
|
20
36
|
warning: "#E0A100",
|
|
21
37
|
danger: "#D43E3F"
|
|
22
|
-
}
|
|
38
|
+
},
|
|
39
|
+
/**
|
|
40
|
+
* Categorical data-visualization palette — the five `--chart-1..5` oklch
|
|
41
|
+
* values shipped by `@resq-systems/ui` (canonical dark `:root` scale). Charts
|
|
42
|
+
* cycle these in order for series colors. `oklch` only (not email-safe).
|
|
43
|
+
*/
|
|
44
|
+
chart: [
|
|
45
|
+
"oklch(58.50% 0.1877 24.72)",
|
|
46
|
+
"oklch(64.20% 0.1560 252.61)",
|
|
47
|
+
"oklch(73.39% 0.1538 161.68)",
|
|
48
|
+
"oklch(78.37% 0.1587 72.99)",
|
|
49
|
+
"oklch(68.62% 0.0471 261.10)"
|
|
50
|
+
]
|
|
23
51
|
};
|
|
24
52
|
/**
|
|
25
|
-
* Browser + PWA `theme-color` / viewport meta colors
|
|
26
|
-
*
|
|
53
|
+
* Browser + PWA `theme-color` / viewport meta colors, keyed by
|
|
54
|
+
* `prefers-color-scheme`. `dark` is aliased to {@link colors}`.hex.background`
|
|
55
|
+
* (not a re-typed copy) so the browser chrome always matches the dark page
|
|
56
|
+
* background exactly; `light` is a standalone light-mode chrome color with no
|
|
57
|
+
* palette counterpart. Hex, not oklch, because `<meta name="theme-color">`
|
|
58
|
+
* across browsers doesn't accept `oklch()`.
|
|
27
59
|
*/
|
|
28
60
|
const themeColor = {
|
|
29
61
|
light: "#E8EAF0",
|
|
30
62
|
dark: colors.hex.background
|
|
31
63
|
};
|
|
32
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Brand typefaces, ready-to-use CSS font stacks, and the webfont stylesheet.
|
|
66
|
+
*
|
|
67
|
+
* Within each {@link fonts.stacks} array the **first** entry is the brand face
|
|
68
|
+
* and the rest are ordered fallbacks the browser walks until one resolves;
|
|
69
|
+
* multi-word family names are pre-quoted so the array can be joined into a
|
|
70
|
+
* `font-family` value verbatim. {@link fonts.googleFontsHref} must stay in sync
|
|
71
|
+
* with these families and the weights they're actually rendered at — a face or
|
|
72
|
+
* weight used in the app but missing from the href won't load.
|
|
73
|
+
*/
|
|
33
74
|
const fonts = {
|
|
34
75
|
display: "Syne",
|
|
35
76
|
body: "DM Sans",
|
|
@@ -62,12 +103,16 @@ const fonts = {
|
|
|
62
103
|
},
|
|
63
104
|
googleFontsHref: "https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500&family=DM+Mono:wght@500&display=swap"
|
|
64
105
|
};
|
|
65
|
-
/**
|
|
106
|
+
/**
|
|
107
|
+
* Border radius scale (px, email-safe). Mirrors the shipped `@resq-systems/ui`
|
|
108
|
+
* `--radius-*` scale: `sm`→token (3px), `md`→control (4px), `lg`→panel (6px),
|
|
109
|
+
* `xl` (panel + 4px = 10px). `full` is the pill radius (no UI counterpart).
|
|
110
|
+
*/
|
|
66
111
|
const radii = {
|
|
67
|
-
sm: "
|
|
68
|
-
md: "
|
|
69
|
-
lg: "
|
|
70
|
-
xl: "
|
|
112
|
+
sm: "3px",
|
|
113
|
+
md: "4px",
|
|
114
|
+
lg: "6px",
|
|
115
|
+
xl: "10px",
|
|
71
116
|
full: "999px"
|
|
72
117
|
};
|
|
73
118
|
//#endregion
|
package/lib/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","names":[],"sources":["../src/tokens.ts"],"sourcesContent":["/**\n * Copyright 2026 ResQ Systems, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * ResQ Systems design tokens
|
|
1
|
+
{"version":3,"file":"tokens.js","names":[],"sources":["../src/tokens.ts"],"sourcesContent":["/**\n * Copyright 2026 ResQ Systems, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview ResQ Systems design tokens (colors, theme colors, fonts, radii) —\n * the single source of truth shared by `@resq-systems/ui`,\n * `@resq-systems/email-templates`, and app surfaces. `oklch` is the design-system\n * source of truth; `hex` is the email/legacy-safe snapshot (email clients and\n * older targets do not support `oklch()`), so keep the two representations in sync\n * when the palette changes.\n *\n * @module @resq-systems/constants/tokens\n */\n\n/**\n * The six canonical color roles present in **both** representations. `oklch`\n * (the design-system source of truth) and `hex` (the email-safe snapshot) must\n * each define every one of these.\n *\n * These are semantic *roles*, not raw swatches: consumers reference\n * `colors.oklch.primary`, never the literal channel values, so a palette change\n * updates the token once. The union has no meaningful ordering — membership, not\n * position, is the contract.\n */\nexport type ColorRole = \"background\" | \"surface\" | \"border\" | \"foreground\" | \"muted\" | \"primary\";\n\n/**\n * Status roles that exist only in the email-safe `hex` snapshot. `oklch` does\n * not define these, so they are indexable on `colors.hex` but never on\n * {@link ColorRole} / `colors.oklch` — the type split enforces that asymmetry at\n * compile time. In apps these four states come from the `@resq-systems/ui`\n * theme's own status tokens rather than from here; the hex copies exist so\n * transactional email (which can't evaluate `oklch()`) still has them.\n */\nexport type StatusRole = \"info\" | \"success\" | \"warning\" | \"danger\";\n\n/**\n * The canonical palette in its two representations. `oklch` is the source of\n * truth; `hex` is a hand-maintained snapshot that must resolve to the same\n * perceived color for each shared {@link ColorRole}, because email clients and\n * older render targets can't evaluate `oklch()`. Editing one representation\n * without the other silently drifts email away from the app — the two are only\n * *structurally* linked by the `satisfies` clause below, not value-checked.\n *\n * @example\n * ```ts\n * import { colors } from \"@resq-systems/constants/tokens\";\n *\n * colors.oklch.primary; // → \"oklch(58.50% 0.1877 24.72)\"\n * colors.hex.danger; // → \"#D43E3F\" (status role — hex only)\n * ```\n */\nexport const colors = {\n\toklch: {\n\t\tbackground: \"oklch(16.63% 0.0262 269.37)\",\n\t\tsurface: \"oklch(19.72% 0.0231 268.80)\",\n\t\tborder: \"oklch(26.45% 0.0386 270.81)\",\n\t\tforeground: \"oklch(96.19% 0.0109 274.89)\",\n\t\tmuted: \"oklch(64.00% 0.0535 266.82)\",\n\t\tprimary: \"oklch(58.50% 0.1877 24.72)\",\n\t},\n\thex: {\n\t\tbackground: \"#0A0E1A\",\n\t\tsurface: \"#171C2B\",\n\t\tborder: \"#1E2438\",\n\t\tforeground: \"#F0F2FA\",\n\t\tmuted: \"#7D8CAE\",\n\t\tprimary: \"#D43E3F\",\n\t\tinfo: \"#7D8CAE\",\n\t\tsuccess: \"#3FB984\",\n\t\twarning: \"#E0A100\",\n\t\tdanger: \"#D43E3F\",\n\t},\n\t/**\n\t * Categorical data-visualization palette — the five `--chart-1..5` oklch\n\t * values shipped by `@resq-systems/ui` (canonical dark `:root` scale). Charts\n\t * cycle these in order for series colors. `oklch` only (not email-safe).\n\t */\n\tchart: [\n\t\t\"oklch(58.50% 0.1877 24.72)\",\n\t\t\"oklch(64.20% 0.1560 252.61)\",\n\t\t\"oklch(73.39% 0.1538 161.68)\",\n\t\t\"oklch(78.37% 0.1587 72.99)\",\n\t\t\"oklch(68.62% 0.0471 261.10)\",\n\t],\n} as const satisfies {\n\toklch: Record<ColorRole, `oklch(${string})`>;\n\thex: Record<ColorRole | StatusRole, `#${string}`>;\n\tchart: readonly `oklch(${string})`[];\n};\n\n/**\n * Roles indexable on `colors.oklch` — exactly {@link ColorRole}. Type any\n * lookup into the oklch source with this so a hex-only {@link StatusRole} can\n * never index it (which would type as `string` yet be `undefined` at runtime).\n */\nexport type OklchColorRole = keyof typeof colors.oklch;\n\n/** Every token name present on the email-safe `hex` snapshot. */\nexport type ColorTokenName = keyof typeof colors.hex;\n\n/**\n * Browser + PWA `theme-color` / viewport meta colors, keyed by\n * `prefers-color-scheme`. `dark` is aliased to {@link colors}`.hex.background`\n * (not a re-typed copy) so the browser chrome always matches the dark page\n * background exactly; `light` is a standalone light-mode chrome color with no\n * palette counterpart. Hex, not oklch, because `<meta name=\"theme-color\">`\n * across browsers doesn't accept `oklch()`.\n */\nexport const themeColor = {\n\tlight: \"#E8EAF0\",\n\tdark: colors.hex.background,\n} as const;\n\n/**\n * Brand typefaces, ready-to-use CSS font stacks, and the webfont stylesheet.\n *\n * Within each {@link fonts.stacks} array the **first** entry is the brand face\n * and the rest are ordered fallbacks the browser walks until one resolves;\n * multi-word family names are pre-quoted so the array can be joined into a\n * `font-family` value verbatim. {@link fonts.googleFontsHref} must stay in sync\n * with these families and the weights they're actually rendered at — a face or\n * weight used in the app but missing from the href won't load.\n */\nexport const fonts = {\n\tdisplay: \"Syne\",\n\tbody: \"DM Sans\",\n\tmono: \"DM Mono\",\n\tstacks: {\n\t\tdisplay: [\"Syne\", \"'Helvetica Neue'\", \"Arial\", \"sans-serif\"],\n\t\tbody: [\n\t\t\t\"'DM Sans'\",\n\t\t\t\"-apple-system\",\n\t\t\t\"BlinkMacSystemFont\",\n\t\t\t\"'Segoe UI'\",\n\t\t\t\"Roboto\",\n\t\t\t\"Helvetica\",\n\t\t\t\"Arial\",\n\t\t\t\"sans-serif\",\n\t\t],\n\t\tmono: [\"'DM Mono'\", \"ui-monospace\", \"'SF Mono'\", \"Menlo\", \"Consolas\", \"monospace\"],\n\t},\n\tgoogleFontsHref:\n\t\t\"https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:wght@400;500&family=DM+Mono:wght@500&display=swap\",\n} as const;\n\n/**\n * Border radius scale (px, email-safe). Mirrors the shipped `@resq-systems/ui`\n * `--radius-*` scale: `sm`→token (3px), `md`→control (4px), `lg`→panel (6px),\n * `xl` (panel + 4px = 10px). `full` is the pill radius (no UI counterpart).\n */\nexport const radii = {\n\tsm: \"3px\",\n\tmd: \"4px\",\n\tlg: \"6px\",\n\txl: \"10px\",\n\tfull: \"999px\",\n} as const;\n"],"mappings":";;;;;;;;;;;;;;;;;AAiEA,MAAa,SAAS;CACrB,OAAO;EACN,YAAY;EACZ,SAAS;EACT,QAAQ;EACR,YAAY;EACZ,OAAO;EACP,SAAS;CACV;CACA,KAAK;EACJ,YAAY;EACZ,SAAS;EACT,QAAQ;EACR,YAAY;EACZ,OAAO;EACP,SAAS;EACT,MAAM;EACN,SAAS;EACT,SAAS;EACT,QAAQ;CACT;;;;;;CAMA,OAAO;EACN;EACA;EACA;EACA;EACA;CACD;AACD;;;;;;;;;AAwBA,MAAa,aAAa;CACzB,OAAO;CACP,MAAM,OAAO,IAAI;AAClB;;;;;;;;;;;AAYA,MAAa,QAAQ;CACpB,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;EACP,SAAS;GAAC;GAAQ;GAAoB;GAAS;EAAY;EAC3D,MAAM;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACD;EACA,MAAM;GAAC;GAAa;GAAgB;GAAa;GAAS;GAAY;EAAW;CAClF;CACA,iBACC;AACF;;;;;;AAOA,MAAa,QAAQ;CACpB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;AACP"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resq-systems/constants",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Shared, zero-dependency constants for ResQ Systems apps: design tokens (oklch + email-safe hex), brand identity, and cross-app values",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -22,14 +22,18 @@
|
|
|
22
22
|
"types": "./lib/brand.d.ts",
|
|
23
23
|
"import": "./lib/brand.js",
|
|
24
24
|
"default": "./lib/brand.js"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"./tokens.css": "./src/tokens.css"
|
|
26
27
|
},
|
|
27
28
|
"main": "lib/index.js",
|
|
28
29
|
"module": "lib/index.js",
|
|
29
30
|
"types": "lib/index.d.ts",
|
|
30
|
-
"sideEffects":
|
|
31
|
+
"sideEffects": [
|
|
32
|
+
"**/*.css"
|
|
33
|
+
],
|
|
31
34
|
"files": [
|
|
32
35
|
"lib",
|
|
36
|
+
"src/tokens.css",
|
|
33
37
|
"README.md"
|
|
34
38
|
],
|
|
35
39
|
"scripts": {
|
|
@@ -41,7 +45,7 @@
|
|
|
41
45
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
42
46
|
"@types/node": "^26.1.1",
|
|
43
47
|
"@vitest/coverage-v8": "4.1.10",
|
|
44
|
-
"tsdown": "^0.22.
|
|
48
|
+
"tsdown": "^0.22.9",
|
|
45
49
|
"typescript": "7.0.2",
|
|
46
50
|
"vitest": "4.1.8"
|
|
47
51
|
},
|
package/src/tokens.css
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 ResQ Systems, Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* ResQ Systems design tokens as CSS custom properties — the CSS-consumable
|
|
19
|
+
* mirror of `src/tokens.ts` (`colors.oklch`, `colors.chart`, `radii`, `fonts`).
|
|
20
|
+
* The `--resq-*` prefix avoids collisions with app-local custom properties.
|
|
21
|
+
*
|
|
22
|
+
* `@import "@resq-systems/constants/tokens.css";`
|
|
23
|
+
*
|
|
24
|
+
* Values are the `oklch` design-system source of truth. `tests/tokens-css.test.ts`
|
|
25
|
+
* fails if any value here drifts from `src/tokens.ts` — keep them in sync.
|
|
26
|
+
*/
|
|
27
|
+
:root {
|
|
28
|
+
/* Canonical color roles (oklch — design-system source of truth) */
|
|
29
|
+
--resq-color-background: oklch(16.63% 0.0262 269.37);
|
|
30
|
+
--resq-color-surface: oklch(19.72% 0.0231 268.8);
|
|
31
|
+
--resq-color-border: oklch(26.45% 0.0386 270.81);
|
|
32
|
+
--resq-color-foreground: oklch(96.19% 0.0109 274.89);
|
|
33
|
+
--resq-color-muted: oklch(64.00% 0.0535 266.82);
|
|
34
|
+
--resq-color-primary: oklch(58.50% 0.1877 24.72);
|
|
35
|
+
|
|
36
|
+
/* Categorical data-visualization palette (--resq-chart-1..5) */
|
|
37
|
+
--resq-chart-1: oklch(58.50% 0.1877 24.72);
|
|
38
|
+
--resq-chart-2: oklch(64.20% 0.156 252.61);
|
|
39
|
+
--resq-chart-3: oklch(73.39% 0.1538 161.68);
|
|
40
|
+
--resq-chart-4: oklch(78.37% 0.1587 72.99);
|
|
41
|
+
--resq-chart-5: oklch(68.62% 0.0471 261.1);
|
|
42
|
+
|
|
43
|
+
/* Border radius scale */
|
|
44
|
+
--resq-radius-sm: 3px;
|
|
45
|
+
--resq-radius-md: 4px;
|
|
46
|
+
--resq-radius-lg: 6px;
|
|
47
|
+
--resq-radius-xl: 10px;
|
|
48
|
+
--resq-radius-full: 999px;
|
|
49
|
+
|
|
50
|
+
/* Font stacks */
|
|
51
|
+
--resq-font-display: Syne, "Helvetica Neue", Arial, sans-serif;
|
|
52
|
+
--resq-font-body:
|
|
53
|
+
"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
54
|
+
--resq-font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
|
55
|
+
}
|