@resq-systems/constants 0.3.0 → 0.3.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/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 — 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"}
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, `oklch(${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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resq-systems/constants",
3
- "version": "0.3.0",
3
+ "version": "0.3.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": {