@consciousclouds/tokens 0.1.0 → 0.1.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/CHANGELOG.md +54 -0
- package/README.md +16 -0
- package/dist/index.d.ts +12 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +18 -6
- package/dist/index.js.map +1 -1
- package/dist/motion.d.ts +77 -0
- package/dist/motion.d.ts.map +1 -0
- package/dist/motion.js +78 -0
- package/dist/motion.js.map +1 -0
- package/dist/schema.d.ts +6 -3
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +11 -1
- package/dist/schema.js.map +1 -1
- package/dist/shadow.d.ts +39 -0
- package/dist/shadow.d.ts.map +1 -0
- package/dist/shadow.js +39 -0
- package/dist/shadow.js.map +1 -0
- package/package.json +13 -5
- package/styles/house.css +91 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
Versioned on the independent frontend-SDK lifecycle (NOT `contract_version`).
|
|
4
4
|
|
|
5
|
+
## [0.1.1] — local release candidate, 2026-11-01
|
|
6
|
+
|
|
7
|
+
- Publish the existing motion/shadow/status exports in a new immutable candidate; explicitly declare the existing React DOM peer requirement.
|
|
8
|
+
- Pack lifecycle builds fresh distributable output. Historical 0.1.0 is unchanged.
|
|
9
|
+
- Candidate only: no registry publication or published-digest claim.
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Status color roles**: `success`, `warning` and `info`, each with a
|
|
16
|
+
`-foreground` for solid fills, exposed as `bg-success` / `text-warning` /
|
|
17
|
+
`border-info` and so on through `@theme inline`. `COLOR_TOKEN_ROLES` grows from
|
|
18
|
+
27 to 33. Every text-bearing role clears WCAG AA (4.5:1) as text on the page
|
|
19
|
+
background and on its own 5% tint, in both modes.
|
|
20
|
+
- **`text-2xs` type step** (0.6875rem / 1rem): one step below `text-xs`, for
|
|
21
|
+
eyebrows, section labels and dense metadata — the home for off-scale
|
|
22
|
+
`text-[11px]`.
|
|
23
|
+
- **`overlay` shadow role** (`shadow-overlay`): the floating elevation of a
|
|
24
|
+
surface above the content, such as a drawer over a scrim. Light uses Tailwind's
|
|
25
|
+
`shadow-2xl` value, so the surfaces that inlined it look the same; dark deepens
|
|
26
|
+
the alpha, the same treatment as `panel`. `SHADOW_TOKEN_ROLES` grows from 1 to 2.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **Light `warning` `32 95% 32%` → `29%` and `success` `142 72% 29%` → `25%`.**
|
|
31
|
+
The registry Alert paints its description at `/90`, where they read 4.48:1
|
|
32
|
+
and 4.22:1 on the card. They now read 5.12:1 and 5.14:1 on the card, and
|
|
33
|
+
4.93:1 and 4.95:1 on the framed workspace. Found by F4's axe sweep on the
|
|
34
|
+
not-connected notice.
|
|
35
|
+
- **`muted-foreground` (light) `46.1%` → `43%` and `sidebar-foreground` (light)
|
|
36
|
+
`26.1%` → `20%`**: muted text on the muted surface read 4.39:1, and the
|
|
37
|
+
registry sidebar's `/70` group labels read 4.26:1. Both now clear AA (4.91:1 and
|
|
38
|
+
4.94:1). Dark values already passed and are unchanged.
|
|
39
|
+
- **`destructive` re-valued for legibility** (light `0 84.2% 60.2%` → `0 74% 45%`;
|
|
40
|
+
dark `0 62.8% 45%` → `0 90% 67%`). As text on its own 5% tint the light value
|
|
41
|
+
read 3.53:1 and the dark value 3.25:1 on the page; both now clear 4.5:1,
|
|
42
|
+
including the registry Alert's `/90` description in dark (4.88:1).
|
|
43
|
+
- **Dark `destructive-foreground` is `240 10% 5%`** (was `0 0% 98%`), so text on a
|
|
44
|
+
solid dark destructive fill reads 6.30:1 rather than 2.98:1. Nothing painted that
|
|
45
|
+
pair yet; the registry Button and Badge use `text-white` over `/60`.
|
|
46
|
+
- **Dark `primary` is a light indigo with a dark foreground** (`243 75% 64%` on
|
|
47
|
+
white → `243 80% 72%` on `240 10% 5%`; `ring`, `sidebar-primary` and
|
|
48
|
+
`sidebar-ring` follow). `text-primary` is text in about 20 places; it read
|
|
49
|
+
3.71:1 on the framed workspace and now reads 5.36:1. The foreground on a primary
|
|
50
|
+
fill is 5.84:1. Light mode is unchanged.
|
|
51
|
+
|
|
52
|
+
- **Shadow (elevation) tokens** (`src/shadow.ts`): the `panel` role — the resting
|
|
53
|
+
shadow a content container/panel sits at — exposed as the `shadow-panel`
|
|
54
|
+
Tailwind utility (raw var `--shadow-panel-raw` in `:root`/`.dark`, mapped
|
|
55
|
+
through `@theme inline`). Mode-aware (strengthened alpha on dark). Harvested
|
|
56
|
+
from the Omni SPA's container surface (Tailwind's subtle default `shadow`).
|
|
57
|
+
New public symbols: `SHADOW_TOKEN_ROLES`, `ShadowTokenRole`, `shadowCssVariable`.
|
|
58
|
+
|
|
5
59
|
## [0.1.0] — 2026-07-04
|
|
6
60
|
|
|
7
61
|
### Added
|
package/README.md
CHANGED
|
@@ -50,3 +50,19 @@ reads that same instance through `useTheme`.
|
|
|
50
50
|
Governed by `docs/design/frontend-platform-doctrine.md` and
|
|
51
51
|
`docs/design/operator-platform-contracts.md` (§6 package graph). Platform overview + the
|
|
52
52
|
full adoption path: [`platform/frontend/README.md`](../README.md).
|
|
53
|
+
|
|
54
|
+
## Unit 1 compatibility candidate (0.1.1, unpublished)
|
|
55
|
+
|
|
56
|
+
Publish the existing motion/shadow/status exports in a new immutable candidate; explicitly declare the existing React DOM peer requirement.
|
|
57
|
+
|
|
58
|
+
Use public package exports. No product checkout, application runtime or Universal source alias is required.
|
|
59
|
+
React 19, React Router 7/Vite 6 and Next.js 16/Tailwind 4 are the Unit 1 verification targets.
|
|
60
|
+
The existing React >=18 peer range is preserved; this unit does not certify every version in that range.
|
|
61
|
+
For CSS consumers, import Tailwind first, then `@consciousclouds/tokens/styles/house.css`,
|
|
62
|
+
`@consciousclouds/ui/styles/source.css`, and `@consciousclouds/shell-primitive/styles/source.css`
|
|
63
|
+
when using the frame. The CSS source registrations scan installed `dist` files.
|
|
64
|
+
Theme colors remain HSL channel triples (for example `145 65% 28%`), not full `hsl(...)` or `oklch(...)` values.
|
|
65
|
+
Product fonts, logos, navigation, flavors and authority remain consumer-owned.
|
|
66
|
+
Brand overrides target the document root; multiple independently themed embedded roots need a separately approved scoping contract.
|
|
67
|
+
See `scripts/frontend-foundation-unit1/README.md` in the source repository for reproducible candidate verification,
|
|
68
|
+
publication ordering and release limitations.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @consciousclouds/tokens — Token System (Layer 1 of the Frontend Platform).
|
|
3
3
|
*
|
|
4
|
-
* The universal design-token vocabulary (the
|
|
5
|
-
* sidebar
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* (
|
|
9
|
-
*
|
|
4
|
+
* The universal design-token vocabulary (the 33 color roles including the
|
|
5
|
+
* status and sidebar sets, radius, the motion roles — durations/easings/offsets — and the
|
|
6
|
+
* shadow/elevation roles), typed role/value shapes, the CSS-variable naming rule
|
|
7
|
+
* (tokenCssVariable / motion*CssVariable / shadowCssVariable), and theme state
|
|
8
|
+
* (ThemeProvider/useTheme over next-themes). The house theme VALUES ship as CSS
|
|
9
|
+
* (./styles/house.css); the motion values ship as both JS (./motion.ts) and CSS
|
|
10
|
+
* mirror — this module carries vocabulary and behavior only: no components, no
|
|
11
|
+
* brand meaning, no product.
|
|
10
12
|
*/
|
|
11
13
|
export { COLOR_TOKEN_ROLES, RADIUS_TOKEN_ROLE, TOKEN_ROLES, tokenCssVariable, } from "./schema.js";
|
|
12
14
|
export type { ColorTokenRole, RadiusTokenRole, TokenRole, TokenValues, TokenMode, TokenModeValues, } from "./schema.js";
|
|
13
15
|
export { ThemeProvider, useTheme } from "./theme-provider.js";
|
|
14
16
|
export type { ThemeProviderProps } from "./theme-provider.js";
|
|
17
|
+
export { MOTION_DURATION_ROLES, MOTION_EASING_ROLES, MOTION_OFFSET_ROLES, MOTION_TOKEN_ROLES, motionTokens, motionDurationCssVariable, motionEasingCssVariable, } from "./motion.js";
|
|
18
|
+
export type { CubicBezier, MotionDurationRole, MotionEasingRole, MotionOffsetRole, MotionTokens, } from "./motion.js";
|
|
19
|
+
export { SHADOW_TOKEN_ROLES, shadowCssVariable } from "./shadow.js";
|
|
20
|
+
export type { ShadowTokenRole } from "./shadow.js";
|
|
15
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,cAAc,EACd,eAAe,EACf,SAAS,EACT,WAAW,EACX,SAAS,EACT,eAAe,GAChB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAM9D,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,GACb,MAAM,aAAa,CAAC;AAMrB,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @consciousclouds/tokens — Token System (Layer 1 of the Frontend Platform).
|
|
3
3
|
*
|
|
4
|
-
* The universal design-token vocabulary (the
|
|
5
|
-
* sidebar
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* (
|
|
9
|
-
*
|
|
4
|
+
* The universal design-token vocabulary (the 33 color roles including the
|
|
5
|
+
* status and sidebar sets, radius, the motion roles — durations/easings/offsets — and the
|
|
6
|
+
* shadow/elevation roles), typed role/value shapes, the CSS-variable naming rule
|
|
7
|
+
* (tokenCssVariable / motion*CssVariable / shadowCssVariable), and theme state
|
|
8
|
+
* (ThemeProvider/useTheme over next-themes). The house theme VALUES ship as CSS
|
|
9
|
+
* (./styles/house.css); the motion values ship as both JS (./motion.ts) and CSS
|
|
10
|
+
* mirror — this module carries vocabulary and behavior only: no components, no
|
|
11
|
+
* brand meaning, no product.
|
|
10
12
|
*/
|
|
11
13
|
export { COLOR_TOKEN_ROLES, RADIUS_TOKEN_ROLE, TOKEN_ROLES, tokenCssVariable, } from "./schema.js";
|
|
12
14
|
export { ThemeProvider, useTheme } from "./theme-provider.js";
|
|
15
|
+
// Motion tokens — the doctrine's "motion curves" role, made concrete. JS-native
|
|
16
|
+
// values (durations/easings/offsets) the motion runtime consumes directly, plus
|
|
17
|
+
// the `--motion-*` CSS mirror in styles/house.css. Brand-neutral geometry;
|
|
18
|
+
// overridable via @consciousclouds/brand's BrandMotion seam. See ./motion.ts.
|
|
19
|
+
export { MOTION_DURATION_ROLES, MOTION_EASING_ROLES, MOTION_OFFSET_ROLES, MOTION_TOKEN_ROLES, motionTokens, motionDurationCssVariable, motionEasingCssVariable, } from "./motion.js";
|
|
20
|
+
// Shadow (elevation) tokens — the resting shadow a content container/panel sits
|
|
21
|
+
// at, harvested from the Omni container surface. A CSS-utility token like
|
|
22
|
+
// color/radius (values in styles/house.css → the `shadow-<role>` utility);
|
|
23
|
+
// mode-aware so it reads in both themes. See ./shadow.ts.
|
|
24
|
+
export { SHADOW_TOKEN_ROLES, shadowCssVariable } from "./shadow.js";
|
|
13
25
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAUrB,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAG9D,gFAAgF;AAChF,gFAAgF;AAChF,2EAA2E;AAC3E,8EAA8E;AAC9E,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AASrB,gFAAgF;AAChF,0EAA0E;AAC1E,2EAA2E;AAC3E,0DAA0D;AAC1D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/motion.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ConsciousClouds motion token vocabulary — the "motion curves" role the
|
|
3
|
+
* Frontend Platform doctrine reserves, made concrete. Motion is a shared
|
|
4
|
+
* mechanism every shell inherits.
|
|
5
|
+
*
|
|
6
|
+
* Unlike the color/radius roles (CSS strings resolved by Tailwind), motion
|
|
7
|
+
* tokens carry JS-native values — durations in seconds and easings as
|
|
8
|
+
* cubic-bézier tuples — because the motion runtime (`motion/react`) consumes
|
|
9
|
+
* them directly in a `transition` object. The same values ALSO surface as CSS
|
|
10
|
+
* custom properties (`--motion-*`, see styles/house.css) for CSS-driven
|
|
11
|
+
* animation. Motion is brand-neutral geometry: mode-independent (no `.dark`
|
|
12
|
+
* variant), and a Brand MAY override the defaults (see @consciousclouds/brand's
|
|
13
|
+
* BrandMotion seam) but never invents new roles.
|
|
14
|
+
*
|
|
15
|
+
* Ported from the Omni motion system's `ANIMATION` single source of truth
|
|
16
|
+
* (duration 0.18s · ease [0.25, 0.1, 0.25, 1] · enter y:8 · exit y:-4). The
|
|
17
|
+
* governance travels with the values: no component may inline a duration,
|
|
18
|
+
* curve, or offset — it reads them here.
|
|
19
|
+
*/
|
|
20
|
+
/** A cubic-bézier easing curve: the four control-point coordinates. */
|
|
21
|
+
export type CubicBezier = [number, number, number, number];
|
|
22
|
+
/** Duration token roles — a small, deliberate scale (values in seconds). */
|
|
23
|
+
export declare const MOTION_DURATION_ROLES: readonly ["fast", "base", "slow"];
|
|
24
|
+
/** A duration token role name. */
|
|
25
|
+
export type MotionDurationRole = (typeof MOTION_DURATION_ROLES)[number];
|
|
26
|
+
/**
|
|
27
|
+
* Easing token roles. `standard`/`ease-out` share the Omni curve (CSS `ease`);
|
|
28
|
+
* `linear` is uncurved.
|
|
29
|
+
*/
|
|
30
|
+
export declare const MOTION_EASING_ROLES: readonly ["standard", "ease-out", "linear"];
|
|
31
|
+
/** An easing token role name. */
|
|
32
|
+
export type MotionEasingRole = (typeof MOTION_EASING_ROLES)[number];
|
|
33
|
+
/** Directional offset token roles — the enter/exit nudge distances (px, one axis). */
|
|
34
|
+
export declare const MOTION_OFFSET_ROLES: readonly ["enter", "exit"];
|
|
35
|
+
/** An offset token role name. */
|
|
36
|
+
export type MotionOffsetRole = (typeof MOTION_OFFSET_ROLES)[number];
|
|
37
|
+
/**
|
|
38
|
+
* The motion token roles, grouped by kind — the motion analogue of
|
|
39
|
+
* COLOR_TOKEN_ROLES / RADIUS_TOKEN_ROLE. A Brand override is typed against
|
|
40
|
+
* these role names; it never adds a role.
|
|
41
|
+
*/
|
|
42
|
+
export declare const MOTION_TOKEN_ROLES: {
|
|
43
|
+
readonly duration: readonly ["fast", "base", "slow"];
|
|
44
|
+
readonly easing: readonly ["standard", "ease-out", "linear"];
|
|
45
|
+
readonly offset: readonly ["enter", "exit"];
|
|
46
|
+
};
|
|
47
|
+
/** The shape of the motion token values (role → value, per kind). */
|
|
48
|
+
export interface MotionTokens {
|
|
49
|
+
/** Durations in seconds, by role. */
|
|
50
|
+
duration: Record<MotionDurationRole, number>;
|
|
51
|
+
/** Easing curves as cubic-bézier tuples, by role. */
|
|
52
|
+
easing: Record<MotionEasingRole, CubicBezier>;
|
|
53
|
+
/** Enter/exit offsets — the y-nudge (px) applied on appear/disappear. */
|
|
54
|
+
offset: {
|
|
55
|
+
enter: {
|
|
56
|
+
y: number;
|
|
57
|
+
};
|
|
58
|
+
exit: {
|
|
59
|
+
y: number;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* The house motion values — the single source of truth every motion component
|
|
65
|
+
* imports. Kept as JS values (not CSS strings) so `motion/react` can consume
|
|
66
|
+
* them directly; the CSS mirror lives in styles/house.css.
|
|
67
|
+
*/
|
|
68
|
+
export declare const motionTokens: MotionTokens;
|
|
69
|
+
/**
|
|
70
|
+
* The CSS custom-property name for a motion duration role (mirrors
|
|
71
|
+
* tokenCssVariable for color/radius). Keeps the `--motion-*` names in
|
|
72
|
+
* styles/house.css in one typed vocabulary.
|
|
73
|
+
*/
|
|
74
|
+
export declare function motionDurationCssVariable(role: MotionDurationRole): `--motion-duration-${MotionDurationRole}`;
|
|
75
|
+
/** The CSS custom-property name for a motion easing role. */
|
|
76
|
+
export declare function motionEasingCssVariable(role: MotionEasingRole): `--motion-ease-${MotionEasingRole}`;
|
|
77
|
+
//# sourceMappingURL=motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../src/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,uEAAuE;AACvE,MAAM,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAE3D,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,mCAAoC,CAAC;AAEvE,kCAAkC;AAClC,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,mBAAmB,6CAA8C,CAAC;AAE/E,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,sFAAsF;AACtF,eAAO,MAAM,mBAAmB,4BAA6B,CAAC;AAE9D,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;CAIrB,CAAC;AAEX,qEAAqE;AACrE,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAC7C,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;IAC9C,yEAAyE;IACzE,MAAM,EAAE;QACN,KAAK,EAAE;YAAE,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACrB,IAAI,EAAE;YAAE,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACrB,CAAC;CACH;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAAE,YAqB1B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,kBAAkB,GACvB,qBAAqB,kBAAkB,EAAE,CAE3C;AAED,6DAA6D;AAC7D,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,gBAAgB,GACrB,iBAAiB,gBAAgB,EAAE,CAErC"}
|
package/dist/motion.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ConsciousClouds motion token vocabulary — the "motion curves" role the
|
|
3
|
+
* Frontend Platform doctrine reserves, made concrete. Motion is a shared
|
|
4
|
+
* mechanism every shell inherits.
|
|
5
|
+
*
|
|
6
|
+
* Unlike the color/radius roles (CSS strings resolved by Tailwind), motion
|
|
7
|
+
* tokens carry JS-native values — durations in seconds and easings as
|
|
8
|
+
* cubic-bézier tuples — because the motion runtime (`motion/react`) consumes
|
|
9
|
+
* them directly in a `transition` object. The same values ALSO surface as CSS
|
|
10
|
+
* custom properties (`--motion-*`, see styles/house.css) for CSS-driven
|
|
11
|
+
* animation. Motion is brand-neutral geometry: mode-independent (no `.dark`
|
|
12
|
+
* variant), and a Brand MAY override the defaults (see @consciousclouds/brand's
|
|
13
|
+
* BrandMotion seam) but never invents new roles.
|
|
14
|
+
*
|
|
15
|
+
* Ported from the Omni motion system's `ANIMATION` single source of truth
|
|
16
|
+
* (duration 0.18s · ease [0.25, 0.1, 0.25, 1] · enter y:8 · exit y:-4). The
|
|
17
|
+
* governance travels with the values: no component may inline a duration,
|
|
18
|
+
* curve, or offset — it reads them here.
|
|
19
|
+
*/
|
|
20
|
+
/** Duration token roles — a small, deliberate scale (values in seconds). */
|
|
21
|
+
export const MOTION_DURATION_ROLES = ["fast", "base", "slow"];
|
|
22
|
+
/**
|
|
23
|
+
* Easing token roles. `standard`/`ease-out` share the Omni curve (CSS `ease`);
|
|
24
|
+
* `linear` is uncurved.
|
|
25
|
+
*/
|
|
26
|
+
export const MOTION_EASING_ROLES = ["standard", "ease-out", "linear"];
|
|
27
|
+
/** Directional offset token roles — the enter/exit nudge distances (px, one axis). */
|
|
28
|
+
export const MOTION_OFFSET_ROLES = ["enter", "exit"];
|
|
29
|
+
/**
|
|
30
|
+
* The motion token roles, grouped by kind — the motion analogue of
|
|
31
|
+
* COLOR_TOKEN_ROLES / RADIUS_TOKEN_ROLE. A Brand override is typed against
|
|
32
|
+
* these role names; it never adds a role.
|
|
33
|
+
*/
|
|
34
|
+
export const MOTION_TOKEN_ROLES = {
|
|
35
|
+
duration: MOTION_DURATION_ROLES,
|
|
36
|
+
easing: MOTION_EASING_ROLES,
|
|
37
|
+
offset: MOTION_OFFSET_ROLES,
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* The house motion values — the single source of truth every motion component
|
|
41
|
+
* imports. Kept as JS values (not CSS strings) so `motion/react` can consume
|
|
42
|
+
* them directly; the CSS mirror lives in styles/house.css.
|
|
43
|
+
*/
|
|
44
|
+
export const motionTokens = {
|
|
45
|
+
duration: {
|
|
46
|
+
/** The Omni page/menu-transition value — snappy, sub-perceptual. */
|
|
47
|
+
fast: 0.18,
|
|
48
|
+
/** The default for most element-level transitions. */
|
|
49
|
+
base: 0.3,
|
|
50
|
+
/** Deliberate, for larger surfaces. */
|
|
51
|
+
slow: 0.5,
|
|
52
|
+
},
|
|
53
|
+
easing: {
|
|
54
|
+
/** The Omni curve — CSS `ease`; the platform default. */
|
|
55
|
+
standard: [0.25, 0.1, 0.25, 1],
|
|
56
|
+
/** Same curve, named for intent (accelerate-out). */
|
|
57
|
+
"ease-out": [0.25, 0.1, 0.25, 1],
|
|
58
|
+
/** Uncurved. */
|
|
59
|
+
linear: [0, 0, 1, 1],
|
|
60
|
+
},
|
|
61
|
+
offset: {
|
|
62
|
+
enter: { y: 8 },
|
|
63
|
+
exit: { y: -4 },
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The CSS custom-property name for a motion duration role (mirrors
|
|
68
|
+
* tokenCssVariable for color/radius). Keeps the `--motion-*` names in
|
|
69
|
+
* styles/house.css in one typed vocabulary.
|
|
70
|
+
*/
|
|
71
|
+
export function motionDurationCssVariable(role) {
|
|
72
|
+
return `--motion-duration-${role}`;
|
|
73
|
+
}
|
|
74
|
+
/** The CSS custom-property name for a motion easing role. */
|
|
75
|
+
export function motionEasingCssVariable(role) {
|
|
76
|
+
return `--motion-ease-${role}`;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=motion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"motion.js","sourceRoot":"","sources":["../src/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAU,CAAC;AAKvE;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAK/E,sFAAsF;AACtF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAK9D;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,QAAQ,EAAE,qBAAqB;IAC/B,MAAM,EAAE,mBAAmB;IAC3B,MAAM,EAAE,mBAAmB;CACnB,CAAC;AAeX;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,QAAQ,EAAE;QACR,oEAAoE;QACpE,IAAI,EAAE,IAAI;QACV,sDAAsD;QACtD,IAAI,EAAE,GAAG;QACT,uCAAuC;QACvC,IAAI,EAAE,GAAG;KACV;IACD,MAAM,EAAE;QACN,yDAAyD;QACzD,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9B,qDAAqD;QACrD,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;QAChC,gBAAgB;QAChB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;KACrB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;QACf,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;KAChB;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CACvC,IAAwB;IAExB,OAAO,qBAAqB,IAAI,EAAE,CAAC;AACrC,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,uBAAuB,CACrC,IAAsB;IAEtB,OAAO,iBAAiB,IAAI,EAAE,CAAC;AACjC,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
* `"243 75% 59%"`) so `hsl(var(--role))` composes; the radius role holds a
|
|
9
9
|
* CSS length (e.g. `"0.625rem"`).
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
12
|
-
|
|
11
|
+
/**
|
|
12
|
+
* The 33 color token roles: the 19 core shadcn roles, the 6-role status set,
|
|
13
|
+
* and the 8-role sidebar set.
|
|
14
|
+
*/
|
|
15
|
+
export declare const COLOR_TOKEN_ROLES: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "success", "success-foreground", "warning", "warning-foreground", "info", "info-foreground", "sidebar-background", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring"];
|
|
13
16
|
/** A color token role name (CSS variable name without the `--` prefix). */
|
|
14
17
|
export type ColorTokenRole = (typeof COLOR_TOKEN_ROLES)[number];
|
|
15
18
|
/** The radius token role — a CSS length; `sm`/`md`/`lg` derive from it. */
|
|
@@ -18,7 +21,7 @@ export type RadiusTokenRole = typeof RADIUS_TOKEN_ROLE;
|
|
|
18
21
|
/** Every token role a theme (or a Brand override) may assign a value to. */
|
|
19
22
|
export type TokenRole = ColorTokenRole | RadiusTokenRole;
|
|
20
23
|
/** All token roles, in declaration order (colors first, then radius). */
|
|
21
|
-
export declare const TOKEN_ROLES: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "sidebar-background", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring", "radius"];
|
|
24
|
+
export declare const TOKEN_ROLES: readonly ["background", "foreground", "card", "card-foreground", "popover", "popover-foreground", "primary", "primary-foreground", "secondary", "secondary-foreground", "muted", "muted-foreground", "accent", "accent-foreground", "destructive", "destructive-foreground", "border", "input", "ring", "success", "success-foreground", "warning", "warning-foreground", "info", "info-foreground", "sidebar-background", "sidebar-foreground", "sidebar-primary", "sidebar-primary-foreground", "sidebar-accent", "sidebar-accent-foreground", "sidebar-border", "sidebar-ring", "radius"];
|
|
22
25
|
/**
|
|
23
26
|
* A partial assignment of values to token roles — the shape of a Brand's
|
|
24
27
|
* token overrides. Color values are HSL channel triples; radius is a length.
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,ojBAqCpB,CAAC;AAEX,2EAA2E;AAC3E,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,EAAG,QAAiB,CAAC;AAEnD,MAAM,MAAM,eAAe,GAAG,OAAO,iBAAiB,CAAC;AAEvD,4EAA4E;AAC5E,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,eAAe,CAAC;AAEzD,yEAAyE;AACzE,eAAO,MAAM,WAAW,8jBAAqD,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAE7D,iFAAiF;AACjF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEzC,gFAAgF;AAChF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC;AAEtE,+EAA+E;AAC/E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,KAAK,SAAS,EAAE,CAElE"}
|
package/dist/schema.js
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* `"243 75% 59%"`) so `hsl(var(--role))` composes; the radius role holds a
|
|
9
9
|
* CSS length (e.g. `"0.625rem"`).
|
|
10
10
|
*/
|
|
11
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The 33 color token roles: the 19 core shadcn roles, the 6-role status set,
|
|
13
|
+
* and the 8-role sidebar set.
|
|
14
|
+
*/
|
|
12
15
|
export const COLOR_TOKEN_ROLES = [
|
|
13
16
|
// Core surface + semantic roles.
|
|
14
17
|
"background",
|
|
@@ -30,6 +33,13 @@ export const COLOR_TOKEN_ROLES = [
|
|
|
30
33
|
"border",
|
|
31
34
|
"input",
|
|
32
35
|
"ring",
|
|
36
|
+
// Status set — success / warning / info, each with a foreground for solid fills.
|
|
37
|
+
"success",
|
|
38
|
+
"success-foreground",
|
|
39
|
+
"warning",
|
|
40
|
+
"warning-foreground",
|
|
41
|
+
"info",
|
|
42
|
+
"info-foreground",
|
|
33
43
|
// Sidebar set (the operator chrome).
|
|
34
44
|
"sidebar-background",
|
|
35
45
|
"sidebar-foreground",
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,iCAAiC;IACjC,YAAY;IACZ,YAAY;IACZ,MAAM;IACN,iBAAiB;IACjB,SAAS;IACT,oBAAoB;IACpB,SAAS;IACT,oBAAoB;IACpB,WAAW;IACX,sBAAsB;IACtB,OAAO;IACP,kBAAkB;IAClB,QAAQ;IACR,mBAAmB;IACnB,aAAa;IACb,wBAAwB;IACxB,QAAQ;IACR,OAAO;IACP,MAAM;IACN,iFAAiF;IACjF,SAAS;IACT,oBAAoB;IACpB,SAAS;IACT,oBAAoB;IACpB,MAAM;IACN,iBAAiB;IACjB,qCAAqC;IACrC,oBAAoB;IACpB,oBAAoB;IACpB,iBAAiB;IACjB,4BAA4B;IAC5B,gBAAgB;IAChB,2BAA2B;IAC3B,gBAAgB;IAChB,cAAc;CACN,CAAC;AAKX,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAiB,CAAC;AAOnD,yEAAyE;AACzE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAG,iBAAiB,EAAE,iBAAiB,CAAU,CAAC;AAc9E,+EAA+E;AAC/E,MAAM,UAAU,gBAAgB,CAAC,IAAe;IAC9C,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC"}
|
package/dist/shadow.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ConsciousClouds shadow (elevation) token vocabulary — the resting shadow
|
|
3
|
+
* a content container/panel sits at, made a universal role.
|
|
4
|
+
*
|
|
5
|
+
* Like the color/radius roles (and UNLIKE motion), a shadow token is a CSS
|
|
6
|
+
* string consumed as a Tailwind utility, so it follows the color pattern rather
|
|
7
|
+
* than motion's JS-value one: the house VALUES live in styles/house.css
|
|
8
|
+
* (`--shadow-<role>-raw` in `:root`/`.dark`, mapped to the `shadow-<role>`
|
|
9
|
+
* utility through the `@theme inline` block); this module carries only the role
|
|
10
|
+
* vocabulary and the CSS-variable naming rule — no values. A Brand may override
|
|
11
|
+
* the values (typed against these role names) but never invents new roles.
|
|
12
|
+
*
|
|
13
|
+
* The `panel` role is the HARVEST of the Omni SPA's container surface (Tailwind's
|
|
14
|
+
* subtle default `shadow` — two hairline layers, "a bit of a shadow"): the one
|
|
15
|
+
* resting elevation every content card/panel — including the AI conversation
|
|
16
|
+
* container — sits at. Mode-aware (the raw var flips on `.dark`, strengthened so
|
|
17
|
+
* it reads on dark surfaces) so the token is genuinely universal, not light-only.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Shadow (elevation) token roles — a small, deliberate scale keyed by container
|
|
21
|
+
* ROLE (not size), the elevation analogue of COLOR_TOKEN_ROLES. `panel` is the
|
|
22
|
+
* resting content-container shadow; `overlay` is the floating elevation of a
|
|
23
|
+
* surface that sits ABOVE the content (a drawer over a scrim — the assistant's
|
|
24
|
+
* below-`lg` drawer). Further elevations are added here as roles before they
|
|
25
|
+
* are used, never inlined.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SHADOW_TOKEN_ROLES: readonly ["panel", "overlay"];
|
|
28
|
+
/** A shadow token role name. */
|
|
29
|
+
export type ShadowTokenRole = (typeof SHADOW_TOKEN_ROLES)[number];
|
|
30
|
+
/**
|
|
31
|
+
* The CSS custom-property name holding a shadow role's raw value (mirrors
|
|
32
|
+
* tokenCssVariable / motion*CssVariable). The `-raw` var is the source of truth
|
|
33
|
+
* in `:root`/`.dark`; the `@theme inline` block maps it to the `shadow-<role>`
|
|
34
|
+
* Tailwind utility (leaving Tailwind's own `--shadow-<role>` theme namespace
|
|
35
|
+
* uncollided). Consume the token as the `shadow-<role>` class in almost all
|
|
36
|
+
* cases; reach for this var only for hand-written CSS.
|
|
37
|
+
*/
|
|
38
|
+
export declare function shadowCssVariable(role: ShadowTokenRole): `--shadow-${ShadowTokenRole}-raw`;
|
|
39
|
+
//# sourceMappingURL=shadow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow.d.ts","sourceRoot":"","sources":["../src/shadow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,+BAAgC,CAAC;AAEhE,gCAAgC;AAChC,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,eAAe,MAAM,CAE1F"}
|
package/dist/shadow.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ConsciousClouds shadow (elevation) token vocabulary — the resting shadow
|
|
3
|
+
* a content container/panel sits at, made a universal role.
|
|
4
|
+
*
|
|
5
|
+
* Like the color/radius roles (and UNLIKE motion), a shadow token is a CSS
|
|
6
|
+
* string consumed as a Tailwind utility, so it follows the color pattern rather
|
|
7
|
+
* than motion's JS-value one: the house VALUES live in styles/house.css
|
|
8
|
+
* (`--shadow-<role>-raw` in `:root`/`.dark`, mapped to the `shadow-<role>`
|
|
9
|
+
* utility through the `@theme inline` block); this module carries only the role
|
|
10
|
+
* vocabulary and the CSS-variable naming rule — no values. A Brand may override
|
|
11
|
+
* the values (typed against these role names) but never invents new roles.
|
|
12
|
+
*
|
|
13
|
+
* The `panel` role is the HARVEST of the Omni SPA's container surface (Tailwind's
|
|
14
|
+
* subtle default `shadow` — two hairline layers, "a bit of a shadow"): the one
|
|
15
|
+
* resting elevation every content card/panel — including the AI conversation
|
|
16
|
+
* container — sits at. Mode-aware (the raw var flips on `.dark`, strengthened so
|
|
17
|
+
* it reads on dark surfaces) so the token is genuinely universal, not light-only.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Shadow (elevation) token roles — a small, deliberate scale keyed by container
|
|
21
|
+
* ROLE (not size), the elevation analogue of COLOR_TOKEN_ROLES. `panel` is the
|
|
22
|
+
* resting content-container shadow; `overlay` is the floating elevation of a
|
|
23
|
+
* surface that sits ABOVE the content (a drawer over a scrim — the assistant's
|
|
24
|
+
* below-`lg` drawer). Further elevations are added here as roles before they
|
|
25
|
+
* are used, never inlined.
|
|
26
|
+
*/
|
|
27
|
+
export const SHADOW_TOKEN_ROLES = ["panel", "overlay"];
|
|
28
|
+
/**
|
|
29
|
+
* The CSS custom-property name holding a shadow role's raw value (mirrors
|
|
30
|
+
* tokenCssVariable / motion*CssVariable). The `-raw` var is the source of truth
|
|
31
|
+
* in `:root`/`.dark`; the `@theme inline` block maps it to the `shadow-<role>`
|
|
32
|
+
* Tailwind utility (leaving Tailwind's own `--shadow-<role>` theme namespace
|
|
33
|
+
* uncollided). Consume the token as the `shadow-<role>` class in almost all
|
|
34
|
+
* cases; reach for this var only for hand-written CSS.
|
|
35
|
+
*/
|
|
36
|
+
export function shadowCssVariable(role) {
|
|
37
|
+
return `--shadow-${role}-raw`;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=shadow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadow.js","sourceRoot":"","sources":["../src/shadow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,SAAS,CAAU,CAAC;AAKhE;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAAqB;IACrD,OAAO,YAAY,IAAI,MAAM,CAAC;AAChC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consciousclouds/tokens",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "ConsciousClouds Token System
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "ConsciousClouds Token System \u2014 the universal design-token vocabulary (27 color roles incl. the sidebar set, plus radius), the house theme values, and theme state (ThemeProvider over next-themes). Layer 1 of the Frontend Platform; carries no components, no brand meaning, no product.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -13,18 +13,26 @@
|
|
|
13
13
|
},
|
|
14
14
|
"./styles/house.css": "./styles/house.css"
|
|
15
15
|
},
|
|
16
|
-
"files": [
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"styles",
|
|
19
|
+
"README.md",
|
|
20
|
+
"CHANGELOG.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
17
23
|
"scripts": {
|
|
18
24
|
"build": "tsc -p tsconfig.build.json",
|
|
19
25
|
"clean": "rm -rf dist",
|
|
20
26
|
"type-check": "tsc --noEmit",
|
|
21
|
-
"prepublishOnly": "bun run clean && bun run build && bun run type-check"
|
|
27
|
+
"prepublishOnly": "bun run clean && bun run build && bun run type-check",
|
|
28
|
+
"prepack": "bun run clean && bun run build && bun run type-check"
|
|
22
29
|
},
|
|
23
30
|
"dependencies": {
|
|
24
31
|
"next-themes": "^0.4.6"
|
|
25
32
|
},
|
|
26
33
|
"peerDependencies": {
|
|
27
|
-
"react": ">=18.0.0"
|
|
34
|
+
"react": ">=18.0.0",
|
|
35
|
+
"react-dom": ">=18.0.0"
|
|
28
36
|
},
|
|
29
37
|
"devDependencies": {
|
|
30
38
|
"@types/react": "^19.2.7",
|
package/styles/house.css
CHANGED
|
@@ -33,6 +33,15 @@
|
|
|
33
33
|
--color-accent-foreground: hsl(var(--accent-foreground));
|
|
34
34
|
--color-destructive: hsl(var(--destructive));
|
|
35
35
|
--color-destructive-foreground: hsl(var(--destructive-foreground));
|
|
36
|
+
/* Status roles — the states an operator surface reports that are neither
|
|
37
|
+
* brand (primary) nor failure (destructive). Each pairs with a foreground for
|
|
38
|
+
* text on a solid fill; the role itself is AA-legible as text on the page. */
|
|
39
|
+
--color-success: hsl(var(--success));
|
|
40
|
+
--color-success-foreground: hsl(var(--success-foreground));
|
|
41
|
+
--color-warning: hsl(var(--warning));
|
|
42
|
+
--color-warning-foreground: hsl(var(--warning-foreground));
|
|
43
|
+
--color-info: hsl(var(--info));
|
|
44
|
+
--color-info-foreground: hsl(var(--info-foreground));
|
|
36
45
|
--color-border: hsl(var(--border));
|
|
37
46
|
--color-input: hsl(var(--input));
|
|
38
47
|
--color-ring: hsl(var(--ring));
|
|
@@ -50,6 +59,19 @@
|
|
|
50
59
|
--radius-md: calc(var(--radius) - 2px);
|
|
51
60
|
--radius-lg: var(--radius);
|
|
52
61
|
|
|
62
|
+
/* Type — one step below Tailwind's `text-xs`, for eyebrows, section labels and
|
|
63
|
+
* dense metadata (the `text-2xs` utility). The scale's only addition: every
|
|
64
|
+
* other size is Tailwind's own, so an off-scale `text-[11px]` has a home. */
|
|
65
|
+
--text-2xs: 0.6875rem;
|
|
66
|
+
--text-2xs--line-height: 1rem;
|
|
67
|
+
|
|
68
|
+
/* Elevation — the resting shadow a content container/panel sits at, exposed
|
|
69
|
+
* as the `shadow-panel` utility. References the raw var below so `.dark`
|
|
70
|
+
* flips it (same shape as `--color-*: hsl(var(--*))`). See src/shadow.ts. */
|
|
71
|
+
--shadow-panel: var(--shadow-panel-raw);
|
|
72
|
+
/* The floating elevation of a surface above the content (`shadow-overlay`). */
|
|
73
|
+
--shadow-overlay: var(--shadow-overlay-raw);
|
|
74
|
+
|
|
53
75
|
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
54
76
|
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
55
77
|
|
|
@@ -85,24 +107,60 @@
|
|
|
85
107
|
--secondary: 240 4.8% 95.9%;
|
|
86
108
|
--secondary-foreground: 240 5.9% 10%;
|
|
87
109
|
--muted: 240 4.8% 95.9%;
|
|
88
|
-
|
|
110
|
+
/* 43% (was 46.1%): AA on the muted surface itself (avatar fallbacks, muted
|
|
111
|
+
* chips), where 46.1% read 4.39:1. Now 4.91:1 on muted, 5.40:1 on white. */
|
|
112
|
+
--muted-foreground: 240 3.8% 43%;
|
|
89
113
|
--accent: 243 30% 96%;
|
|
90
114
|
--accent-foreground: 243 75% 45%;
|
|
91
|
-
|
|
115
|
+
/* Every text-bearing role below clears WCAG AA (4.5:1) as text on the page
|
|
116
|
+
* background AND on its own 5% tint (the alert/banner surface), and at the /90
|
|
117
|
+
* the registry Alert gives its description, on the card and on the framed
|
|
118
|
+
* workspace. The former destructive (0 84.2% 60.2%) read 3.53:1 on that tint;
|
|
119
|
+
* warning at 32% and success at 29% read 4.48:1 and 4.22:1 at /90. */
|
|
120
|
+
--destructive: 0 74% 45%;
|
|
92
121
|
--destructive-foreground: 0 0% 98%;
|
|
122
|
+
--success: 142 72% 25%;
|
|
123
|
+
--success-foreground: 0 0% 100%;
|
|
124
|
+
--warning: 32 95% 29%;
|
|
125
|
+
--warning-foreground: 0 0% 100%;
|
|
126
|
+
--info: 221 83% 45%;
|
|
127
|
+
--info-foreground: 0 0% 100%;
|
|
93
128
|
--border: 240 5.9% 90%;
|
|
94
129
|
--input: 240 5.9% 90%;
|
|
95
130
|
--ring: 243 75% 59%;
|
|
96
131
|
--radius: 0.625rem;
|
|
97
132
|
|
|
98
133
|
--sidebar-background: 240 5% 98%;
|
|
99
|
-
|
|
134
|
+
/* 20% (was 26.1%): the registry sidebar paints group labels at /70, which read
|
|
135
|
+
* 4.26:1; now 4.94:1. */
|
|
136
|
+
--sidebar-foreground: 240 5.3% 20%;
|
|
100
137
|
--sidebar-primary: 243 75% 59%;
|
|
101
138
|
--sidebar-primary-foreground: 0 0% 98%;
|
|
102
139
|
--sidebar-accent: 243 30% 96%;
|
|
103
140
|
--sidebar-accent-foreground: 243 75% 45%;
|
|
104
141
|
--sidebar-border: 240 5.9% 90%;
|
|
105
142
|
--sidebar-ring: 243 75% 59%;
|
|
143
|
+
|
|
144
|
+
/* Motion — the CSS mirror of the motion tokens (see src/motion.ts). Motion is
|
|
145
|
+
* brand-neutral geometry, so these live in :root only (no .dark variant). The
|
|
146
|
+
* JS-native values drive motion/react; these vars drive CSS-native animation. */
|
|
147
|
+
--motion-duration-fast: 0.18s;
|
|
148
|
+
--motion-duration-base: 0.3s;
|
|
149
|
+
--motion-duration-slow: 0.5s;
|
|
150
|
+
--motion-ease-standard: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
151
|
+
--motion-ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
152
|
+
--motion-ease-linear: linear;
|
|
153
|
+
--motion-enter-y: 8px;
|
|
154
|
+
--motion-exit-y: -4px;
|
|
155
|
+
|
|
156
|
+
/* Elevation — the container/panel resting shadow (mapped to the `shadow-panel`
|
|
157
|
+
* utility in @theme above). The LITERAL harvested from the Omni SPA's content
|
|
158
|
+
* card (Tailwind's subtle default `shadow`): two hairline layers, "a bit of a
|
|
159
|
+
* shadow". The one resting elevation every content container sits at. */
|
|
160
|
+
--shadow-panel-raw: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
161
|
+
/* The floating overlay elevation: Tailwind's `shadow-2xl` value, which the
|
|
162
|
+
* assistant's drawer used inline before this role existed (no visual change in light). */
|
|
163
|
+
--shadow-overlay-raw: 0 25px 50px -12px rgb(0 0 0 / 0.25);
|
|
106
164
|
}
|
|
107
165
|
|
|
108
166
|
.dark {
|
|
@@ -112,28 +170,50 @@
|
|
|
112
170
|
--card-foreground: 0 0% 98%;
|
|
113
171
|
--popover: 240 10% 7%;
|
|
114
172
|
--popover-foreground: 0 0% 98%;
|
|
115
|
-
|
|
116
|
-
|
|
173
|
+
/* Dark primary is a LIGHT indigo with a dark foreground (the registry's dark
|
|
174
|
+
* shape). The former 243 75% 64% under white read 4.05:1 as text on the page
|
|
175
|
+
* and 3.71:1 on the framed workspace, and text-primary is text in ~20 places
|
|
176
|
+
* (eyebrows, links, chips). Now 5.36:1 as text; 5.84:1 for its foreground. */
|
|
177
|
+
--primary: 243 80% 72%;
|
|
178
|
+
--primary-foreground: 240 10% 5%;
|
|
117
179
|
--secondary: 240 6% 14%;
|
|
118
180
|
--secondary-foreground: 0 0% 98%;
|
|
119
181
|
--muted: 240 6% 14%;
|
|
120
182
|
--muted-foreground: 240 5% 64.9%;
|
|
121
183
|
--accent: 243 25% 16%;
|
|
122
184
|
--accent-foreground: 243 80% 78%;
|
|
123
|
-
|
|
124
|
-
|
|
185
|
+
/* Dark: the roles are light enough to read as text on the dark surfaces (the
|
|
186
|
+
* former destructive, 0 62.8% 45%, read 3.25:1). Solid fills carry a dark
|
|
187
|
+
* foreground (destructive-foreground 6.30:1 on a solid fill). The registry's
|
|
188
|
+
* filled destructive controls paint text-white over /60 instead (ui
|
|
189
|
+
* Button/Badge, 6.78:1). Destructive
|
|
190
|
+
* is 67% so the registry Alert's /90 description still clears 4.5:1 on the
|
|
191
|
+
* framed workspace (4.88:1). */
|
|
192
|
+
--destructive: 0 90% 67%;
|
|
193
|
+
--destructive-foreground: 240 10% 5%;
|
|
194
|
+
--success: 142 69% 58%;
|
|
195
|
+
--success-foreground: 240 10% 5%;
|
|
196
|
+
--warning: 38 92% 50%;
|
|
197
|
+
--warning-foreground: 240 10% 5%;
|
|
198
|
+
--info: 213 94% 68%;
|
|
199
|
+
--info-foreground: 240 10% 5%;
|
|
125
200
|
--border: 240 6% 18%;
|
|
126
201
|
--input: 240 6% 18%;
|
|
127
|
-
--ring: 243
|
|
202
|
+
--ring: 243 80% 72%;
|
|
128
203
|
|
|
129
204
|
--sidebar-background: 240 8% 9%;
|
|
130
205
|
--sidebar-foreground: 240 4.8% 90%;
|
|
131
|
-
--sidebar-primary: 243
|
|
132
|
-
--sidebar-primary-foreground:
|
|
206
|
+
--sidebar-primary: 243 80% 72%;
|
|
207
|
+
--sidebar-primary-foreground: 240 10% 5%;
|
|
133
208
|
--sidebar-accent: 243 25% 16%;
|
|
134
209
|
--sidebar-accent-foreground: 243 80% 78%;
|
|
135
210
|
--sidebar-border: 240 6% 18%;
|
|
136
|
-
--sidebar-ring: 243
|
|
211
|
+
--sidebar-ring: 243 80% 72%;
|
|
212
|
+
|
|
213
|
+
/* Same geometry as light, deeper alpha — a 10%-black shadow vanishes against a
|
|
214
|
+
* dark surface, so the elevation is strengthened to keep it readable. */
|
|
215
|
+
--shadow-panel-raw: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
|
|
216
|
+
--shadow-overlay-raw: 0 25px 50px -12px rgb(0 0 0 / 0.6);
|
|
137
217
|
}
|
|
138
218
|
|
|
139
219
|
@layer base {
|