@iveri/tokens 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,8 @@
1
1
  # @iveri/tokens
2
2
 
3
3
  The Iveri design tokens — **one** copy of the palette, the radii and the motion scale, readable
4
- from a browser bundle, a Tailwind config and React Native alike. Zero runtime dependencies.
4
+ from a browser bundle, a Tailwind theme and React Native alike. Zero runtime dependencies.
5
+ Published as native ES modules only; Metro and Node 26 load it through `require` as well.
5
6
 
6
7
  ```bash
7
8
  pnpm add @iveri/tokens
@@ -95,4 +95,3 @@ export type ProductColorName = keyof typeof productColor;
95
95
  * close enough to be deliberate.
96
96
  */
97
97
  export declare function toRgbChannels(hex: HexColor): string;
98
- //# sourceMappingURL=color.d.ts.map
@@ -110,4 +110,3 @@ export function toRgbChannels(hex) {
110
110
  const channels = [value.slice(0, 2), value.slice(2, 4), value.slice(4, 6)];
111
111
  return channels.map((channel) => Number.parseInt(channel, 16)).join(' ');
112
112
  }
113
- //# sourceMappingURL=color.js.map
@@ -1,3 +1,2 @@
1
1
  export * from './color.js';
2
2
  export * from './scale.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export * from './color.js';
2
2
  export * from './scale.js';
3
- //# sourceMappingURL=index.js.map
@@ -40,4 +40,3 @@ export declare const easingPoints: {
40
40
  };
41
41
  export type RadiusName = keyof typeof radius;
42
42
  export type DurationName = keyof typeof duration;
43
- //# sourceMappingURL=scale.d.ts.map
@@ -38,4 +38,3 @@ export const easing = {
38
38
  export const easingPoints = {
39
39
  standard: [0.2, 0, 0, 1],
40
40
  };
41
- //# sourceMappingURL=scale.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iveri/tokens",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "The Iveri design tokens — one copy of the palette, the radii and the motion scale, for the web and for React Native. Zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -10,19 +10,15 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
+ "type": "module",
13
14
  "engines": {
14
- "node": ">=22"
15
+ "node": ">=26"
15
16
  },
16
- "packageManager": "pnpm@9.12.0",
17
- "type": "commonjs",
18
- "main": "./dist/cjs/index.js",
19
- "module": "./dist/esm/index.js",
20
- "types": "./dist/cjs/index.d.ts",
17
+ "packageManager": "pnpm@12.18.0",
21
18
  "exports": {
22
19
  ".": {
23
- "types": "./dist/cjs/index.d.ts",
24
- "import": "./dist/esm/index.js",
25
- "require": "./dist/cjs/index.js"
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.js"
26
22
  },
27
23
  "./package.json": "./package.json"
28
24
  },
@@ -32,26 +28,23 @@
32
28
  "README.md"
33
29
  ],
34
30
  "scripts": {
35
- "clean": "rimraf dist tsconfig.*.tsbuildinfo",
36
- "build": "pnpm clean && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && node ./scripts/write-dist-package-json.mjs && node ./scripts/verify-zero-runtime-deps.mjs && node ./scripts/verify-loadable.mjs",
31
+ "clean": "rimraf dist",
32
+ "build": "pnpm clean && tsc -p tsconfig.build.json && node ./scripts/verify-zero-runtime-deps.mjs && node ./scripts/verify-loadable.mjs",
37
33
  "typecheck": "tsc -p tsconfig.json --noEmit",
38
- "test": "jest",
34
+ "test": "vitest run",
39
35
  "lint": "eslint .",
40
36
  "format": "prettier --write .",
41
37
  "format:check": "prettier --check ."
42
38
  },
43
39
  "prettier": "@iveri/prettier-config",
44
40
  "devDependencies": {
45
- "@iveri/eslint-config": "^0.1.0",
41
+ "@iveri/eslint-config": "^0.2.3",
46
42
  "@iveri/prettier-config": "^0.1.0",
47
- "@iveri/tsconfig": "^0.1.0",
48
- "@types/jest": "^29.5.14",
49
- "@types/node": "^22.10.7",
50
- "eslint": "^9.18.0",
51
- "jest": "^29.7.0",
52
- "prettier": "^3.4.2",
53
- "rimraf": "^6.0.1",
54
- "ts-jest": "^29.2.5",
55
- "typescript": "^5.7.3"
43
+ "@iveri/tsconfig": "^0.2.1",
44
+ "eslint": "^10.14.0",
45
+ "prettier": "^3.9.10",
46
+ "rimraf": "^6.1.4",
47
+ "typescript": "~6.0.3",
48
+ "vitest": "^5.1.0"
56
49
  }
57
50
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,qFAAqF;AACrF,MAAM,MAAM,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK;;;;IAQd,0EAA0E;;;IAG1E,wFAAwF;;;;;;;;;IAexF,6FAA6F;;;IAG7F,iFAAiF;;;;;;;;;;CAexC,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;IACrB,+CAA+C;;IAE/C,gCAAgC;;IAEhC,qEAAqE;;IAGrE,sEAAsE;;;IAGtE,iEAAiE;;;IAGjE,wCAAwC;;CAEC,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,YAAY,CAAC;AAEzD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAUnD"}
package/dist/cjs/color.js DELETED
@@ -1,117 +0,0 @@
1
- "use strict";
2
- /**
3
- * The Iveri palette, as hex.
4
- *
5
- * **Hex is the canonical form and the other shapes are derived from it.** The web needs channel
6
- * triplets so a CSS custom property can be used with an alpha (`rgb(var(--color-accent) / 0.1)`),
7
- * and React Native needs a plain colour string; a package that shipped triplets would make the
8
- * mobile apps parse them, and one that shipped only CSS would be unusable from React Native at
9
- * all. `toRgbChannels` is the one conversion, so there is one place to be wrong.
10
- *
11
- * **Why this package exists.** Every panel used to declare the palette in its own `index.css`,
12
- * and `@iveri/react-kit@0.6.0` reduced six copies to one — for the web. Both Expo apps still kept
13
- * a hand-maintained `theme.ts`, because the kit is a React **DOM** package whose stylesheet
14
- * imports webfonts: depending on it from React Native pulls a `react-dom` peer and a CSS file
15
- * Metro has no use for. So the fleet went from six copies to three, and the three could only be
16
- * kept in step by a spec in each repo that said, in its own comment, that it could not see drift
17
- * against the others.
18
- */
19
- Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.productColor = exports.color = void 0;
21
- exports.toRgbChannels = toRgbChannels;
22
- /**
23
- * The semantic palette every Iveri surface draws from.
24
- *
25
- * The names are the design standard's, which is why the two mobile apps' local `success` /
26
- * `warning` / `danger` become aliases rather than the other way round: `design.md` and six web
27
- * panels already speak `positive` / `caution` / `critical`, and a token package that renamed
28
- * them would make the standard and the package disagree on the day it shipped.
29
- */
30
- exports.color = {
31
- /* ---- Neutrals ---------------------------------------------------------------------
32
- * Cool and very slightly blue-shifted, and deliberately **not** Tailwind's `slate`: that
33
- * ramp is the most recognisable palette on the web, and a product wearing it reads as
34
- * generated before a single word is read. */
35
- canvas: '#F7F8FB',
36
- surface: '#FFFFFF',
37
- raised: '#F1F3F8',
38
- /** A well *below* the surface — a table header, a grouped field, code. */
39
- sunken: '#EDEFF5',
40
- line: '#E4E7EF',
41
- /** For a divider that has to be seen rather than felt, and an input border on hover. */
42
- lineStrong: '#CFD4E2',
43
- /* ---- Text -------------------------------------------------------------------------
44
- * Four genuine levels. `faint` carried `muted`'s value in all six panels until 0.6.0, so
45
- * the hierarchy the standard describes was two levels wearing three names. */
46
- ink: '#111729',
47
- inkSoft: '#3A4257',
48
- muted: '#5C6579',
49
- faint: '#8A92A6',
50
- /* ---- Brand ------------------------------------------------------------------------ */
51
- accent: '#1B2D72',
52
- accentHover: '#14235C',
53
- accentInk: '#FFFFFF',
54
- /** The selected-row and hover wash. Navy at 10% alpha goes grey; a mixed tint stays blue. */
55
- accentSoft: '#EEF1FA',
56
- accentLine: '#C7CFE8',
57
- /** A lighter navy for links: the brand navy at body size reads as near-black. */
58
- link: '#2A46A8',
59
- /* ---- Status -----------------------------------------------------------------------
60
- * Each deepened enough to carry 14px text on its own subtle background, and `info` is a
61
- * real blue rather than a second copy of the accent — which is what made an info badge and
62
- * an accent badge the same badge. */
63
- positive: '#157A4B',
64
- positiveSoft: '#E3F5EA',
65
- caution: '#9A6412',
66
- cautionSoft: '#FBF1DC',
67
- critical: '#BE2C3C',
68
- criticalSoft: '#FBE9EB',
69
- info: '#1F6FA8',
70
- infoSoft: '#E5F1FA',
71
- };
72
- /**
73
- * The louder half of the system: the navy hero panel and the warm accent that goes on it.
74
- *
75
- * **These are a product voice, not panel chrome.** Taxi, Delivery and the shop open on a navy
76
- * card with a gold rule; an admin console does not, and should not start. They are a separate
77
- * export so a panel cannot reach for them by accident, and so the next product app has them.
78
- *
79
- * ⚠ **`hero` deliberately holds the same value as `color.accentHover`.** The two product web
80
- * apps had been writing `#17285d` inline — eight occurrences in one, six in the other, a navy
81
- * three parts in 255 away from the one the palette already had. Keeping the near-miss would have
82
- * made it a twenty-fifth colour nobody chose; collapsing it onto the deep navy that already
83
- * existed is the honest reading, and the difference is not visible.
84
- */
85
- exports.productColor = {
86
- /** The deep navy a hero card is painted in. */
87
- hero: '#14235C',
88
- /** Text and rules on `hero`. */
89
- heroInk: '#FFFFFF',
90
- /** An error on a hero card, where `critical` would be unreadable. */
91
- heroCritical: '#FFD2DA',
92
- /** Iveri's warm accent. Used sparingly, and never to carry status. */
93
- gold: '#F6C76D',
94
- goldHover: '#FFDA91',
95
- /** The rule beside a page heading, and a route marker's ring. */
96
- goldLine: '#E3AD50',
97
- goldSoft: '#FFF2D6',
98
- /** Text on `gold` and on `goldSoft`. */
99
- goldInk: '#8D5C16',
100
- };
101
- /**
102
- * `#1B2D72` → `27 45 114`, the form a CSS custom property needs.
103
- *
104
- * Space-separated rather than comma-separated, because that is the syntax
105
- * `rgb(var(--color-accent) / 0.16)` requires — a comma-separated triplet silently fails to parse
106
- * there, and the browser drops the declaration, leaving the inherited colour. Which usually looks
107
- * close enough to be deliberate.
108
- */
109
- function toRgbChannels(hex) {
110
- const value = hex.replace('#', '');
111
- if (!/^[0-9a-f]{6}$/i.test(value)) {
112
- throw new Error(`Not a six-digit hex colour: ${hex}`);
113
- }
114
- const channels = [value.slice(0, 2), value.slice(2, 4), value.slice(4, 6)];
115
- return channels.map((channel) => Number.parseInt(channel, 16)).join(' ');
116
- }
117
- //# sourceMappingURL=color.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/color.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAqGH,sCAUC;AA1GD;;;;;;;GAOG;AACU,QAAA,KAAK,GAAG;IACjB;;;iDAG6C;IAC7C,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;IACjB,0EAA0E;IAC1E,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,wFAAwF;IACxF,UAAU,EAAE,SAAS;IAErB;;kFAE8E;IAC9E,GAAG,EAAE,SAAS;IACd,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAEhB,yFAAyF;IACzF,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,6FAA6F;IAC7F,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,iFAAiF;IACjF,IAAI,EAAE,SAAS;IAEf;;;yCAGqC;IACrC,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;CACsB,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACU,QAAA,YAAY,GAAG;IACxB,+CAA+C;IAC/C,IAAI,EAAE,SAAS;IACf,gCAAgC;IAChC,OAAO,EAAE,SAAS;IAClB,qEAAqE;IACrE,YAAY,EAAE,SAAS;IAEvB,sEAAsE;IACtE,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,SAAS;IACpB,iEAAiE;IACjE,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,wCAAwC;IACxC,OAAO,EAAE,SAAS;CACuB,CAAC;AAK9C;;;;;;;GAOG;AACH,SAAgB,aAAa,CAAC,GAAa;IACvC,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAEnC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE3E,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7E,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
package/dist/cjs/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./color.js"), exports);
18
- __exportStar(require("./scale.js"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "commonjs"
3
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/scale.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uFAAuF;AACvF,eAAO,MAAM,MAAM;IACf,mCAAmC;;IAEnC,cAAc;;IAEd,0BAA0B;;CAEpB,CAAC;AAEX,6CAA6C;AAC7C,eAAO,MAAM,QAAQ;IACjB,oDAAoD;;IAEpD,+BAA+B;;IAE/B,kDAAkD;;CAE5C,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;CAET,CAAC;AAEX,yFAAyF;AACzF,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC"}
package/dist/cjs/scale.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- /**
3
- * The non-colour scales both platforms share.
4
- *
5
- * ⚠ **These values are `design-system/tokens.json`'s, by its own names**, and this package
6
- * cannot read that file: the standard lives outside any package and is not published. So this is
7
- * a copy, and a change belongs in both places deliberately — which is exactly the mistake
8
- * `@iveri/react-kit`'s first preset made, inventing 10px, 14px, 180ms and 260ms where the
9
- * standard already said 12px, 16px, 200ms and 320ms.
10
- */
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.easingPoints = exports.easing = exports.duration = exports.radius = void 0;
13
- /** Corner radii, in pixels. The web converts to rem; React Native wants the number. */
14
- exports.radius = {
15
- /** A button, an input, a badge. */
16
- control: 8,
17
- /** A card. */
18
- card: 12,
19
- /** A panel or a sheet. */
20
- panel: 16,
21
- };
22
- /** Transition durations, in milliseconds. */
23
- exports.duration = {
24
- /** A small state change — a hover, a focus ring. */
25
- fast: 120,
26
- /** The standard transition. */
27
- normal: 200,
28
- /** A panel or an overlay, and nothing smaller. */
29
- slow: 320,
30
- };
31
- /**
32
- * The standard's easing, verbatim.
33
- *
34
- * A decelerating curve, so a thing arrives rather than coasting to a stop. React Native's
35
- * `Easing.bezier` takes the same four numbers, which is why they are exported as numbers too.
36
- */
37
- exports.easing = {
38
- standard: 'cubic-bezier(0.2, 0, 0, 1)',
39
- };
40
- /** `easing.standard`'s control points, for a platform that cannot parse the CSS form. */
41
- exports.easingPoints = {
42
- standard: [0.2, 0, 0, 1],
43
- };
44
- //# sourceMappingURL=scale.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scale.js","sourceRoot":"","sources":["../../src/scale.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,uFAAuF;AAC1E,QAAA,MAAM,GAAG;IAClB,mCAAmC;IACnC,OAAO,EAAE,CAAC;IACV,cAAc;IACd,IAAI,EAAE,EAAE;IACR,0BAA0B;IAC1B,KAAK,EAAE,EAAE;CACH,CAAC;AAEX,6CAA6C;AAChC,QAAA,QAAQ,GAAG;IACpB,oDAAoD;IACpD,IAAI,EAAE,GAAG;IACT,+BAA+B;IAC/B,MAAM,EAAE,GAAG;IACX,kDAAkD;IAClD,IAAI,EAAE,GAAG;CACH,CAAC;AAEX;;;;;GAKG;AACU,QAAA,MAAM,GAAG;IAClB,QAAQ,EAAE,4BAA4B;CAChC,CAAC;AAEX,yFAAyF;AAC5E,QAAA,YAAY,GAAG;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CAClB,CAAC"}
@@ -1,98 +0,0 @@
1
- /**
2
- * The Iveri palette, as hex.
3
- *
4
- * **Hex is the canonical form and the other shapes are derived from it.** The web needs channel
5
- * triplets so a CSS custom property can be used with an alpha (`rgb(var(--color-accent) / 0.1)`),
6
- * and React Native needs a plain colour string; a package that shipped triplets would make the
7
- * mobile apps parse them, and one that shipped only CSS would be unusable from React Native at
8
- * all. `toRgbChannels` is the one conversion, so there is one place to be wrong.
9
- *
10
- * **Why this package exists.** Every panel used to declare the palette in its own `index.css`,
11
- * and `@iveri/react-kit@0.6.0` reduced six copies to one — for the web. Both Expo apps still kept
12
- * a hand-maintained `theme.ts`, because the kit is a React **DOM** package whose stylesheet
13
- * imports webfonts: depending on it from React Native pulls a `react-dom` peer and a CSS file
14
- * Metro has no use for. So the fleet went from six copies to three, and the three could only be
15
- * kept in step by a spec in each repo that said, in its own comment, that it could not see drift
16
- * against the others.
17
- */
18
- /** A `#rrggbb` string. Lowercase is not required; `toRgbChannels` accepts either. */
19
- export type HexColor = `#${string}`;
20
- /**
21
- * The semantic palette every Iveri surface draws from.
22
- *
23
- * The names are the design standard's, which is why the two mobile apps' local `success` /
24
- * `warning` / `danger` become aliases rather than the other way round: `design.md` and six web
25
- * panels already speak `positive` / `caution` / `critical`, and a token package that renamed
26
- * them would make the standard and the package disagree on the day it shipped.
27
- */
28
- export declare const color: {
29
- readonly canvas: "#F7F8FB";
30
- readonly surface: "#FFFFFF";
31
- readonly raised: "#F1F3F8";
32
- /** A well *below* the surface — a table header, a grouped field, code. */
33
- readonly sunken: "#EDEFF5";
34
- readonly line: "#E4E7EF";
35
- /** For a divider that has to be seen rather than felt, and an input border on hover. */
36
- readonly lineStrong: "#CFD4E2";
37
- readonly ink: "#111729";
38
- readonly inkSoft: "#3A4257";
39
- readonly muted: "#5C6579";
40
- readonly faint: "#8A92A6";
41
- readonly accent: "#1B2D72";
42
- readonly accentHover: "#14235C";
43
- readonly accentInk: "#FFFFFF";
44
- /** The selected-row and hover wash. Navy at 10% alpha goes grey; a mixed tint stays blue. */
45
- readonly accentSoft: "#EEF1FA";
46
- readonly accentLine: "#C7CFE8";
47
- /** A lighter navy for links: the brand navy at body size reads as near-black. */
48
- readonly link: "#2A46A8";
49
- readonly positive: "#157A4B";
50
- readonly positiveSoft: "#E3F5EA";
51
- readonly caution: "#9A6412";
52
- readonly cautionSoft: "#FBF1DC";
53
- readonly critical: "#BE2C3C";
54
- readonly criticalSoft: "#FBE9EB";
55
- readonly info: "#1F6FA8";
56
- readonly infoSoft: "#E5F1FA";
57
- };
58
- /**
59
- * The louder half of the system: the navy hero panel and the warm accent that goes on it.
60
- *
61
- * **These are a product voice, not panel chrome.** Taxi, Delivery and the shop open on a navy
62
- * card with a gold rule; an admin console does not, and should not start. They are a separate
63
- * export so a panel cannot reach for them by accident, and so the next product app has them.
64
- *
65
- * ⚠ **`hero` deliberately holds the same value as `color.accentHover`.** The two product web
66
- * apps had been writing `#17285d` inline — eight occurrences in one, six in the other, a navy
67
- * three parts in 255 away from the one the palette already had. Keeping the near-miss would have
68
- * made it a twenty-fifth colour nobody chose; collapsing it onto the deep navy that already
69
- * existed is the honest reading, and the difference is not visible.
70
- */
71
- export declare const productColor: {
72
- /** The deep navy a hero card is painted in. */
73
- readonly hero: "#14235C";
74
- /** Text and rules on `hero`. */
75
- readonly heroInk: "#FFFFFF";
76
- /** An error on a hero card, where `critical` would be unreadable. */
77
- readonly heroCritical: "#FFD2DA";
78
- /** Iveri's warm accent. Used sparingly, and never to carry status. */
79
- readonly gold: "#F6C76D";
80
- readonly goldHover: "#FFDA91";
81
- /** The rule beside a page heading, and a route marker's ring. */
82
- readonly goldLine: "#E3AD50";
83
- readonly goldSoft: "#FFF2D6";
84
- /** Text on `gold` and on `goldSoft`. */
85
- readonly goldInk: "#8D5C16";
86
- };
87
- export type ColorName = keyof typeof color;
88
- export type ProductColorName = keyof typeof productColor;
89
- /**
90
- * `#1B2D72` → `27 45 114`, the form a CSS custom property needs.
91
- *
92
- * Space-separated rather than comma-separated, because that is the syntax
93
- * `rgb(var(--color-accent) / 0.16)` requires — a comma-separated triplet silently fails to parse
94
- * there, and the browser drops the declaration, leaving the inherited colour. Which usually looks
95
- * close enough to be deliberate.
96
- */
97
- export declare function toRgbChannels(hex: HexColor): string;
98
- //# sourceMappingURL=color.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,qFAAqF;AACrF,MAAM,MAAM,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;AAEpC;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK;;;;IAQd,0EAA0E;;;IAG1E,wFAAwF;;;;;;;;;IAexF,6FAA6F;;;IAG7F,iFAAiF;;;;;;;;;;CAexC,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY;IACrB,+CAA+C;;IAE/C,gCAAgC;;IAEhC,qEAAqE;;IAGrE,sEAAsE;;;IAGtE,iEAAiE;;;IAGjE,wCAAwC;;CAEC,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,KAAK,CAAC;AAC3C,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,YAAY,CAAC;AAEzD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,MAAM,CAUnD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/color.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB;;;iDAG6C;IAC7C,MAAM,EAAE,SAAS;IACjB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,SAAS;IACjB,0EAA0E;IAC1E,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,SAAS;IACf,wFAAwF;IACxF,UAAU,EAAE,SAAS;IAErB;;kFAE8E;IAC9E,GAAG,EAAE,SAAS;IACd,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAEhB,yFAAyF;IACzF,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,SAAS,EAAE,SAAS;IACpB,6FAA6F;IAC7F,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,iFAAiF;IACjF,IAAI,EAAE,SAAS;IAEf;;;yCAGqC;IACrC,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,SAAS;CACsB,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,+CAA+C;IAC/C,IAAI,EAAE,SAAS;IACf,gCAAgC;IAChC,OAAO,EAAE,SAAS;IAClB,qEAAqE;IACrE,YAAY,EAAE,SAAS;IAEvB,sEAAsE;IACtE,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,SAAS;IACpB,iEAAiE;IACjE,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,wCAAwC;IACxC,OAAO,EAAE,SAAS;CACuB,CAAC;AAK9C;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,GAAa;IACvC,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAEnC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,+BAA+B,GAAG,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,MAAM,QAAQ,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE3E,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7E,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './color.js';
2
- export * from './scale.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC"}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1,43 +0,0 @@
1
- /**
2
- * The non-colour scales both platforms share.
3
- *
4
- * ⚠ **These values are `design-system/tokens.json`'s, by its own names**, and this package
5
- * cannot read that file: the standard lives outside any package and is not published. So this is
6
- * a copy, and a change belongs in both places deliberately — which is exactly the mistake
7
- * `@iveri/react-kit`'s first preset made, inventing 10px, 14px, 180ms and 260ms where the
8
- * standard already said 12px, 16px, 200ms and 320ms.
9
- */
10
- /** Corner radii, in pixels. The web converts to rem; React Native wants the number. */
11
- export declare const radius: {
12
- /** A button, an input, a badge. */
13
- readonly control: 8;
14
- /** A card. */
15
- readonly card: 12;
16
- /** A panel or a sheet. */
17
- readonly panel: 16;
18
- };
19
- /** Transition durations, in milliseconds. */
20
- export declare const duration: {
21
- /** A small state change — a hover, a focus ring. */
22
- readonly fast: 120;
23
- /** The standard transition. */
24
- readonly normal: 200;
25
- /** A panel or an overlay, and nothing smaller. */
26
- readonly slow: 320;
27
- };
28
- /**
29
- * The standard's easing, verbatim.
30
- *
31
- * A decelerating curve, so a thing arrives rather than coasting to a stop. React Native's
32
- * `Easing.bezier` takes the same four numbers, which is why they are exported as numbers too.
33
- */
34
- export declare const easing: {
35
- readonly standard: "cubic-bezier(0.2, 0, 0, 1)";
36
- };
37
- /** `easing.standard`'s control points, for a platform that cannot parse the CSS form. */
38
- export declare const easingPoints: {
39
- readonly standard: readonly [0.2, 0, 0, 1];
40
- };
41
- export type RadiusName = keyof typeof radius;
42
- export type DurationName = keyof typeof duration;
43
- //# sourceMappingURL=scale.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/scale.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uFAAuF;AACvF,eAAO,MAAM,MAAM;IACf,mCAAmC;;IAEnC,cAAc;;IAEd,0BAA0B;;CAEpB,CAAC;AAEX,6CAA6C;AAC7C,eAAO,MAAM,QAAQ;IACjB,oDAAoD;;IAEpD,+BAA+B;;IAE/B,kDAAkD;;CAE5C,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,MAAM;;CAET,CAAC;AAEX,yFAAyF;AACzF,eAAO,MAAM,YAAY;;CAEf,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAC;AAC7C,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scale.js","sourceRoot":"","sources":["../../src/scale.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,uFAAuF;AACvF,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,mCAAmC;IACnC,OAAO,EAAE,CAAC;IACV,cAAc;IACd,IAAI,EAAE,EAAE;IACR,0BAA0B;IAC1B,KAAK,EAAE,EAAE;CACH,CAAC;AAEX,6CAA6C;AAC7C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACpB,oDAAoD;IACpD,IAAI,EAAE,GAAG;IACT,+BAA+B;IAC/B,MAAM,EAAE,GAAG;IACX,kDAAkD;IAClD,IAAI,EAAE,GAAG;CACH,CAAC;AAEX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,QAAQ,EAAE,4BAA4B;CAChC,CAAC;AAEX,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,QAAQ,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CAClB,CAAC"}