@resq-systems/constants 0.3.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 +98 -0
- package/lib/brand.d.ts +67 -0
- package/lib/brand.d.ts.map +1 -0
- package/lib/brand.js +68 -0
- package/lib/brand.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/tokens.d.ts +97 -0
- package/lib/tokens.d.ts.map +1 -0
- package/lib/tokens.js +76 -0
- package/lib/tokens.js.map +1 -0
- package/package.json +68 -0
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# @resq-systems/constants
|
|
18
|
+
|
|
19
|
+
Shared, **zero-dependency** constants for ResQ Systems apps — one source of truth reused
|
|
20
|
+
across the marketing site, dashboard, and transactional email.
|
|
21
|
+
|
|
22
|
+
## Install
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
bun add @resq-systems/constants
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Subpaths
|
|
29
|
+
|
|
30
|
+
| Import | Contents |
|
|
31
|
+
| --- | --- |
|
|
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 |
|
|
35
|
+
|
|
36
|
+
Everything is `as const`, so values are literal-typed and tree-shakeable.
|
|
37
|
+
|
|
38
|
+
## Usage
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { colors, fonts } from "@resq-systems/constants/tokens";
|
|
42
|
+
import { brand } from "@resq-systems/constants/brand";
|
|
43
|
+
|
|
44
|
+
element.style.background = colors.hex.background; // "#0A0E1A"
|
|
45
|
+
const from = brand.email.from; // "ResQ Systems <updates@send.resq.software>"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`@resq-systems/email-templates` sources its default theme colors and fonts from
|
|
49
|
+
`./tokens`, so rebranding the palette in one place updates every email.
|
|
50
|
+
|
|
51
|
+
## Adding constants
|
|
52
|
+
|
|
53
|
+
Group by domain in its own module (`src/<domain>.ts`), export `as const`, and add
|
|
54
|
+
a subpath in `package.json` `exports`. Keep it curated — constants earn their
|
|
55
|
+
place by being reused across apps, not by being convenient to dump here.
|
|
56
|
+
|
|
57
|
+
## Rules
|
|
58
|
+
|
|
59
|
+
- **Zero runtime dependencies.** This package must stay dependency-free.
|
|
60
|
+
- Values are data only — no logic, no side effects (`sideEffects: false`).
|
|
61
|
+
- A change here ripples to every dependent; prefer additive, stable edits.
|
|
62
|
+
|
|
63
|
+
## Prerequisites
|
|
64
|
+
|
|
65
|
+
- **Runtime**: Bun 1.1+ or Node.js 20+
|
|
66
|
+
- **Module format**: ESM only (`"type": "module"`); every value is a plain `as const` object.
|
|
67
|
+
|
|
68
|
+
## Consuming in CSS
|
|
69
|
+
|
|
70
|
+
This package ships **TypeScript token objects, not a stylesheet** — there is no
|
|
71
|
+
`tokens.css` export. To expose the palette as CSS custom properties, generate them
|
|
72
|
+
from the tokens at build time, or reference the hex values directly:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { colors, radii } from "@resq-systems/constants/tokens";
|
|
76
|
+
|
|
77
|
+
const rootVars = `:root {
|
|
78
|
+
--color-background: ${colors.hex.background}; /* #0A0E1A */
|
|
79
|
+
--radius-md: ${radii.md}; /* 8px */
|
|
80
|
+
}`;
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For Tailwind v4, map the tokens into your `@theme` block (or a generated file) so
|
|
84
|
+
utilities resolve against the same source of truth as the rest of the platform.
|
|
85
|
+
|
|
86
|
+
## Testing
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
bun --filter @resq-systems/constants test
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
- **`Cannot find module '@resq-systems/constants/tokens.css'`**: There is no CSS export.
|
|
95
|
+
Import the token objects from `@resq-systems/constants/tokens` and emit variables yourself.
|
|
96
|
+
- **Colors look wrong in email or older targets**: use the email-safe `colors.hex.*`
|
|
97
|
+
values, not the `oklch` source — many mail clients drop `oklch()`.
|
|
98
|
+
|
package/lib/brand.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
//#region src/brand.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2026 ResQ Systems, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* ResQ Systems brand identity — names, domains, contact addresses, and legal details
|
|
19
|
+
* shared across apps (marketing site, dashboard, transactional email).
|
|
20
|
+
*
|
|
21
|
+
* The postal address is ResQ Systems, Inc.'s public Delaware registered-agent
|
|
22
|
+
* address (already public on the DE filing), included so commercial email stays
|
|
23
|
+
* CAN-SPAM compliant by default.
|
|
24
|
+
*/
|
|
25
|
+
declare const brand: {
|
|
26
|
+
/** Short brand name. */
|
|
27
|
+
readonly name: "ResQ Systems";
|
|
28
|
+
/** Product name (marketing / app title). */
|
|
29
|
+
readonly productName: "ResQ Tactical OS";
|
|
30
|
+
/** Registered legal entity. */
|
|
31
|
+
readonly legalName: "ResQ Systems, Inc.";
|
|
32
|
+
/** One-line positioning tagline. */
|
|
33
|
+
readonly tagline: "autonomous drone disaster response";
|
|
34
|
+
/** Long-form product description (metadata, manifest, store listings). */
|
|
35
|
+
readonly description: "The decentralized kinetic operating system for autonomous disaster response. Mesh-networked coordination when infrastructure fails.";
|
|
36
|
+
readonly domains: {
|
|
37
|
+
readonly app: "https://app.resq.software";
|
|
38
|
+
readonly marketing: "https://resq.software";
|
|
39
|
+
readonly docs: "https://docs.resq.software";
|
|
40
|
+
readonly status: "https://status.resq.software";
|
|
41
|
+
};
|
|
42
|
+
readonly email: {
|
|
43
|
+
readonly from: "ResQ Systems <updates@send.resq.software>";
|
|
44
|
+
readonly support: "support@resq.software";
|
|
45
|
+
readonly contact: "contact@resq.software";
|
|
46
|
+
};
|
|
47
|
+
readonly legal: {
|
|
48
|
+
readonly termsUrl: "https://resq.software/legal/terms";
|
|
49
|
+
readonly privacyUrl: "https://resq.software/legal/privacy";
|
|
50
|
+
};
|
|
51
|
+
readonly socials: {
|
|
52
|
+
readonly x: "https://x.com/resqsystems_inc";
|
|
53
|
+
/** The `@handle` form for `twitter:creator`/`site` meta (matches the `x` profile). */
|
|
54
|
+
readonly xHandle: "@resqsystems_inc";
|
|
55
|
+
readonly linkedin: "https://www.linkedin.com/company/resq-systems-inc";
|
|
56
|
+
readonly github: "https://github.com/resq-software";
|
|
57
|
+
};
|
|
58
|
+
readonly company: {
|
|
59
|
+
readonly stage: "Seed Stage";
|
|
60
|
+
readonly locations: readonly ["New York", "Texas"];
|
|
61
|
+
};
|
|
62
|
+
readonly logo: "https://resq.software/logo.png";
|
|
63
|
+
readonly postalAddress: "ResQ Systems, Inc., 131 Continental Dr, Suite 305, Newark, DE 19713, USA";
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { brand };
|
|
67
|
+
//# sourceMappingURL=brand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand.d.ts","names":[],"sources":["../src/brand.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;cAwBa;;WAEZ;;WAEA;;WAEA;;WAEA;;WAEA;WAEA;aACC;aACA;aACA;aACA;;WAED;aACC;aACA;aACA;;WAED;aACC;aACA;;WAED;aACC;;aAEA;aACA;aACA;;WAED;aACC;aACA;;WAED;WACA"}
|
package/lib/brand.js
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
//#region src/brand.ts
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2026 ResQ Systems, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* ResQ Systems brand identity — names, domains, contact addresses, and legal details
|
|
19
|
+
* shared across apps (marketing site, dashboard, transactional email).
|
|
20
|
+
*
|
|
21
|
+
* The postal address is ResQ Systems, Inc.'s public Delaware registered-agent
|
|
22
|
+
* address (already public on the DE filing), included so commercial email stays
|
|
23
|
+
* CAN-SPAM compliant by default.
|
|
24
|
+
*/
|
|
25
|
+
const brand = {
|
|
26
|
+
/** Short brand name. */
|
|
27
|
+
name: "ResQ Systems",
|
|
28
|
+
/** Product name (marketing / app title). */
|
|
29
|
+
productName: "ResQ Tactical OS",
|
|
30
|
+
/** Registered legal entity. */
|
|
31
|
+
legalName: "ResQ Systems, Inc.",
|
|
32
|
+
/** One-line positioning tagline. */
|
|
33
|
+
tagline: "autonomous drone disaster response",
|
|
34
|
+
/** Long-form product description (metadata, manifest, store listings). */
|
|
35
|
+
description: "The decentralized kinetic operating system for autonomous disaster response. Mesh-networked coordination when infrastructure fails.",
|
|
36
|
+
domains: {
|
|
37
|
+
app: "https://app.resq.software",
|
|
38
|
+
marketing: "https://resq.software",
|
|
39
|
+
docs: "https://docs.resq.software",
|
|
40
|
+
status: "https://status.resq.software"
|
|
41
|
+
},
|
|
42
|
+
email: {
|
|
43
|
+
from: "ResQ Systems <updates@send.resq.software>",
|
|
44
|
+
support: "support@resq.software",
|
|
45
|
+
contact: "contact@resq.software"
|
|
46
|
+
},
|
|
47
|
+
legal: {
|
|
48
|
+
termsUrl: "https://resq.software/legal/terms",
|
|
49
|
+
privacyUrl: "https://resq.software/legal/privacy"
|
|
50
|
+
},
|
|
51
|
+
socials: {
|
|
52
|
+
x: "https://x.com/resqsystems_inc",
|
|
53
|
+
/** The `@handle` form for `twitter:creator`/`site` meta (matches the `x` profile). */
|
|
54
|
+
xHandle: "@resqsystems_inc",
|
|
55
|
+
linkedin: "https://www.linkedin.com/company/resq-systems-inc",
|
|
56
|
+
github: "https://github.com/resq-software"
|
|
57
|
+
},
|
|
58
|
+
company: {
|
|
59
|
+
stage: "Seed Stage",
|
|
60
|
+
locations: ["New York", "Texas"]
|
|
61
|
+
},
|
|
62
|
+
logo: "https://resq.software/logo.png",
|
|
63
|
+
postalAddress: "ResQ Systems, Inc., 131 Continental Dr, Suite 305, Newark, DE 19713, USA"
|
|
64
|
+
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { brand };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=brand.js.map
|
package/lib/brand.js.map
ADDED
|
@@ -0,0 +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 Stage\",\n\t\tlocations: [\"New York\", \"Texas\"],\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":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAa,QAAQ;;CAEpB,MAAM;;CAEN,aAAa;;CAEb,WAAW;;CAEX,SAAS;;CAET,aACC;CACD,SAAS;EACR,KAAK;EACL,WAAW;EACX,MAAM;EACN,QAAQ;CACT;CACA,OAAO;EACN,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,YAAY,OAAO;CAChC;CACA,MAAM;CACN,eAAe;AAChB"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
package/lib/tokens.d.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
//#region src/tokens.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2026 ResQ Systems, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* ResQ Systems design tokens — the single source of truth shared by `@resq-systems/ui`,
|
|
19
|
+
* `@resq-systems/email-templates`, and app surfaces.
|
|
20
|
+
*
|
|
21
|
+
* `oklch` is the design-system source of truth; `hex` is the email/legacy-safe
|
|
22
|
+
* snapshot (email clients and older targets do not support `oklch()`). Keep the
|
|
23
|
+
* two representations in sync when the palette changes.
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* The six canonical color roles present in **both** representations. `oklch`
|
|
27
|
+
* (the design-system source of truth) and `hex` (the email-safe snapshot) must
|
|
28
|
+
* each define every one of these.
|
|
29
|
+
*/
|
|
30
|
+
type ColorRole = "background" | "surface" | "border" | "foreground" | "muted" | "primary";
|
|
31
|
+
/**
|
|
32
|
+
* Status roles that exist only in the email-safe `hex` snapshot. `oklch` does
|
|
33
|
+
* not define these, so they are indexable on `colors.hex` but never on
|
|
34
|
+
* `colors.oklch`.
|
|
35
|
+
*/
|
|
36
|
+
type StatusRole = "info" | "success" | "warning" | "danger";
|
|
37
|
+
declare const colors: {
|
|
38
|
+
readonly oklch: {
|
|
39
|
+
readonly background: "oklch(16.63% 0.0262 269.37)";
|
|
40
|
+
readonly surface: "oklch(22.90% 0.0302 269.75)";
|
|
41
|
+
readonly border: "oklch(26.45% 0.0386 270.81)";
|
|
42
|
+
readonly foreground: "oklch(96.19% 0.0109 274.89)";
|
|
43
|
+
readonly muted: "oklch(64.00% 0.0535 266.82)";
|
|
44
|
+
readonly primary: "oklch(58.50% 0.1877 24.72)";
|
|
45
|
+
};
|
|
46
|
+
readonly hex: {
|
|
47
|
+
readonly background: "#0A0E1A";
|
|
48
|
+
readonly surface: "#171C2B";
|
|
49
|
+
readonly border: "#1E2438";
|
|
50
|
+
readonly foreground: "#F0F2FA";
|
|
51
|
+
readonly muted: "#7D8CAE";
|
|
52
|
+
readonly primary: "#D43E3F";
|
|
53
|
+
readonly info: "#7D8CAE";
|
|
54
|
+
readonly success: "#3FB984";
|
|
55
|
+
readonly warning: "#E0A100";
|
|
56
|
+
readonly danger: "#D43E3F";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Roles indexable on `colors.oklch` — exactly {@link ColorRole}. Type any
|
|
61
|
+
* lookup into the oklch source with this so a hex-only {@link StatusRole} can
|
|
62
|
+
* never index it (which would type as `string` yet be `undefined` at runtime).
|
|
63
|
+
*/
|
|
64
|
+
type OklchColorRole = keyof typeof colors.oklch;
|
|
65
|
+
/** Every token name present on the email-safe `hex` snapshot. */
|
|
66
|
+
type ColorTokenName = keyof typeof colors.hex;
|
|
67
|
+
/**
|
|
68
|
+
* Browser + PWA `theme-color` / viewport meta colors. `dark` tracks the
|
|
69
|
+
* canonical page background; `light` is the light-mode chrome color.
|
|
70
|
+
*/
|
|
71
|
+
declare const themeColor: {
|
|
72
|
+
readonly light: "#E8EAF0";
|
|
73
|
+
readonly dark: "#0A0E1A";
|
|
74
|
+
};
|
|
75
|
+
/** Brand typefaces, ready-to-use CSS font stacks, and the webfont stylesheet. */
|
|
76
|
+
declare const fonts: {
|
|
77
|
+
readonly display: "Syne";
|
|
78
|
+
readonly body: "DM Sans";
|
|
79
|
+
readonly mono: "DM Mono";
|
|
80
|
+
readonly stacks: {
|
|
81
|
+
readonly display: readonly ["Syne", "'Helvetica Neue'", "Arial", "sans-serif"];
|
|
82
|
+
readonly body: readonly ["'DM Sans'", "-apple-system", "BlinkMacSystemFont", "'Segoe UI'", "Roboto", "Helvetica", "Arial", "sans-serif"];
|
|
83
|
+
readonly mono: readonly ["'DM Mono'", "ui-monospace", "'SF Mono'", "Menlo", "Consolas", "monospace"];
|
|
84
|
+
};
|
|
85
|
+
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
|
+
};
|
|
87
|
+
/** Border radius scale (px, email-safe). */
|
|
88
|
+
declare const radii: {
|
|
89
|
+
readonly sm: "6px";
|
|
90
|
+
readonly md: "8px";
|
|
91
|
+
readonly lg: "12px";
|
|
92
|
+
readonly xl: "14px";
|
|
93
|
+
readonly full: "999px";
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
export { ColorRole, ColorTokenName, OklchColorRole, StatusRole, colors, fonts, radii, themeColor };
|
|
97
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","names":[],"sources":["../src/tokens.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6BY;;;;;;KAOA;cAEC;;aAEX;aACA;aACA;aACA;aACA;aACA;;;aAGA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;;KAYU,8BAA8B,OAAO;;KAGrC,8BAA8B,OAAO;;;;;cAMpC;WACZ;WACA;;;cAIY;WACZ;WACA;WACA;WACA;aACC;aACA;aAUA;;WAED;;;cAKY;WACZ;WACA;WACA;WACA;WACA"}
|
package/lib/tokens.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
//#region src/tokens.ts
|
|
2
|
+
const colors = {
|
|
3
|
+
oklch: {
|
|
4
|
+
background: "oklch(16.63% 0.0262 269.37)",
|
|
5
|
+
surface: "oklch(22.90% 0.0302 269.75)",
|
|
6
|
+
border: "oklch(26.45% 0.0386 270.81)",
|
|
7
|
+
foreground: "oklch(96.19% 0.0109 274.89)",
|
|
8
|
+
muted: "oklch(64.00% 0.0535 266.82)",
|
|
9
|
+
primary: "oklch(58.50% 0.1877 24.72)"
|
|
10
|
+
},
|
|
11
|
+
hex: {
|
|
12
|
+
background: "#0A0E1A",
|
|
13
|
+
surface: "#171C2B",
|
|
14
|
+
border: "#1E2438",
|
|
15
|
+
foreground: "#F0F2FA",
|
|
16
|
+
muted: "#7D8CAE",
|
|
17
|
+
primary: "#D43E3F",
|
|
18
|
+
info: "#7D8CAE",
|
|
19
|
+
success: "#3FB984",
|
|
20
|
+
warning: "#E0A100",
|
|
21
|
+
danger: "#D43E3F"
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Browser + PWA `theme-color` / viewport meta colors. `dark` tracks the
|
|
26
|
+
* canonical page background; `light` is the light-mode chrome color.
|
|
27
|
+
*/
|
|
28
|
+
const themeColor = {
|
|
29
|
+
light: "#E8EAF0",
|
|
30
|
+
dark: colors.hex.background
|
|
31
|
+
};
|
|
32
|
+
/** Brand typefaces, ready-to-use CSS font stacks, and the webfont stylesheet. */
|
|
33
|
+
const fonts = {
|
|
34
|
+
display: "Syne",
|
|
35
|
+
body: "DM Sans",
|
|
36
|
+
mono: "DM Mono",
|
|
37
|
+
stacks: {
|
|
38
|
+
display: [
|
|
39
|
+
"Syne",
|
|
40
|
+
"'Helvetica Neue'",
|
|
41
|
+
"Arial",
|
|
42
|
+
"sans-serif"
|
|
43
|
+
],
|
|
44
|
+
body: [
|
|
45
|
+
"'DM Sans'",
|
|
46
|
+
"-apple-system",
|
|
47
|
+
"BlinkMacSystemFont",
|
|
48
|
+
"'Segoe UI'",
|
|
49
|
+
"Roboto",
|
|
50
|
+
"Helvetica",
|
|
51
|
+
"Arial",
|
|
52
|
+
"sans-serif"
|
|
53
|
+
],
|
|
54
|
+
mono: [
|
|
55
|
+
"'DM Mono'",
|
|
56
|
+
"ui-monospace",
|
|
57
|
+
"'SF Mono'",
|
|
58
|
+
"Menlo",
|
|
59
|
+
"Consolas",
|
|
60
|
+
"monospace"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
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
|
+
};
|
|
65
|
+
/** Border radius scale (px, email-safe). */
|
|
66
|
+
const radii = {
|
|
67
|
+
sm: "6px",
|
|
68
|
+
md: "8px",
|
|
69
|
+
lg: "12px",
|
|
70
|
+
xl: "14px",
|
|
71
|
+
full: "999px"
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { colors, fonts, radii, themeColor };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +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 — the single source of truth shared by `@resq-systems/ui`,\n * `@resq-systems/email-templates`, and app surfaces.\n *\n * `oklch` is the design-system source of truth; `hex` is the email/legacy-safe\n * snapshot (email clients and older targets do not support `oklch()`). Keep the\n * two representations in sync when the palette changes.\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 */\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 * `colors.oklch`.\n */\nexport type StatusRole = \"info\" | \"success\" | \"warning\" | \"danger\";\n\nexport const colors = {\n\toklch: {\n\t\tbackground: \"oklch(16.63% 0.0262 269.37)\",\n\t\tsurface: \"oklch(22.90% 0.0302 269.75)\",\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} as const satisfies {\n\toklch: Record<ColorRole, string>;\n\thex: Record<ColorRole | StatusRole, 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. `dark` tracks the\n * canonical page background; `light` is the light-mode chrome color.\n */\nexport const themeColor = {\n\tlight: \"#E8EAF0\",\n\tdark: colors.hex.background,\n} as const;\n\n/** Brand typefaces, ready-to-use CSS font stacks, and the webfont stylesheet. */\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/** Border radius scale (px, email-safe). */\nexport const radii = {\n\tsm: \"6px\",\n\tmd: \"8px\",\n\tlg: \"12px\",\n\txl: \"14px\",\n\tfull: \"999px\",\n} as const;\n"],"mappings":";AAsCA,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;AACD;;;;;AAmBA,MAAa,aAAa;CACzB,OAAO;CACP,MAAM,OAAO,IAAI;AAClB;;AAGA,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;;AAGA,MAAa,QAAQ;CACpB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,MAAM;AACP"}
|
package/package.json
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@resq-systems/constants",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Shared, zero-dependency constants for ResQ Systems apps: design tokens (oklch + email-safe hex), brand identity, and cross-app values",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "ResQ Systems, Inc."
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./lib/index.d.ts",
|
|
13
|
+
"import": "./lib/index.js",
|
|
14
|
+
"default": "./lib/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./tokens": {
|
|
17
|
+
"types": "./lib/tokens.d.ts",
|
|
18
|
+
"import": "./lib/tokens.js",
|
|
19
|
+
"default": "./lib/tokens.js"
|
|
20
|
+
},
|
|
21
|
+
"./brand": {
|
|
22
|
+
"types": "./lib/brand.d.ts",
|
|
23
|
+
"import": "./lib/brand.js",
|
|
24
|
+
"default": "./lib/brand.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"main": "lib/index.js",
|
|
28
|
+
"module": "lib/index.js",
|
|
29
|
+
"types": "lib/index.d.ts",
|
|
30
|
+
"sideEffects": false,
|
|
31
|
+
"files": [
|
|
32
|
+
"lib",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsdown",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"tsc": "tsc --noEmit"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@total-typescript/ts-reset": "^0.6.1",
|
|
42
|
+
"@types/node": "^26.1.1",
|
|
43
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
44
|
+
"tsdown": "^0.22.4",
|
|
45
|
+
"typescript": "7.0.2",
|
|
46
|
+
"vitest": "4.1.8"
|
|
47
|
+
},
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public",
|
|
50
|
+
"provenance": true,
|
|
51
|
+
"registry": "https://registry.npmjs.org/"
|
|
52
|
+
},
|
|
53
|
+
"repository": {
|
|
54
|
+
"type": "git",
|
|
55
|
+
"url": "git+https://github.com/resq-software/npm.git",
|
|
56
|
+
"directory": "packages/constants"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"constants",
|
|
60
|
+
"design-tokens",
|
|
61
|
+
"brand",
|
|
62
|
+
"oklch",
|
|
63
|
+
"theme"
|
|
64
|
+
],
|
|
65
|
+
"engines": {
|
|
66
|
+
"node": ">=20.19.0"
|
|
67
|
+
}
|
|
68
|
+
}
|