@orangecheck/design 0.25.0 → 0.27.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.
@@ -17,7 +17,7 @@ import { ToasterProps } from 'sonner';
17
17
  import * as TabsPrimitive from '@radix-ui/react-tabs';
18
18
 
19
19
  declare const buttonVariants: (props?: ({
20
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "onBrand" | "onBrandOutline" | null | undefined;
20
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "onBrand" | "onBrandOutline" | null | undefined;
21
21
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
22
22
  } & class_variance_authority_types.ClassProp) | undefined) => string;
23
23
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
@@ -17,7 +17,7 @@ import { ToasterProps } from 'sonner';
17
17
  import * as TabsPrimitive from '@radix-ui/react-tabs';
18
18
 
19
19
  declare const buttonVariants: (props?: ({
20
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "onBrand" | "onBrandOutline" | null | undefined;
20
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "onBrand" | "onBrandOutline" | null | undefined;
21
21
  size?: "default" | "icon" | "sm" | "lg" | null | undefined;
22
22
  } & class_variance_authority_types.ClassProp) | undefined) => string;
23
23
  declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
@@ -225,9 +225,65 @@
225
225
  }
226
226
  }
227
227
 
228
+ /* Grain — the 2026 texture pass. A tiny repeating feTurbulence tile (160px,
229
+ luminance-only so it is skin-agnostic) riding inside the aurora slot, so it
230
+ inherits the radial edge fade and the intensity/mode dampening for free.
231
+ Static — unaffected by reduced-motion. Dial with --oc-grain-op; zero it
232
+ per-site with one CSS line. */
233
+ .oc-aurora__grain {
234
+ position: absolute;
235
+ inset: 0;
236
+ mix-blend-mode: overlay;
237
+ opacity: var(--oc-grain-op, 0.1);
238
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
239
+ background-repeat: repeat;
240
+ }
241
+ :root.dark .oc-aurora__grain {
242
+ opacity: calc(var(--oc-grain-op, 0.1) * 1.3);
243
+ }
244
+
228
245
  /* Motion-sensitive: hold the clouds still (they still recolour via tokens). */
229
246
  @media (prefers-reduced-motion: reduce) {
230
247
  .oc-aurora__blob {
231
248
  animation: none !important;
232
249
  }
233
250
  }
251
+
252
+ /* Ambient-motion switch (oc_motion cookie → data-oc-motion="off" on <html>,
253
+ applied pre-paint by getOcThemeInitScript). This is the WCAG 2.2.2
254
+ Pause/Stop/Hide mechanism — a user choice, distinct from the OS-level
255
+ prefers-reduced-motion above. `.oc-ambient` is the shared opt-in hook: any
256
+ decorative animation in the family adds the class and inherits the pause. */
257
+ :root[data-oc-motion='off'] .oc-aurora__blob,
258
+ :root[data-oc-motion='off'] .oc-ambient {
259
+ animation-play-state: paused !important;
260
+ }
261
+
262
+ /* ── OcAuroraGL (aurora depth R2) ─────────────────────────────────────
263
+ The lazy WebGL2 silk field renders inside the same container, so the radial
264
+ mask, the mode-op × intensity opacity, and ember's --au-* re-hue all govern
265
+ it for free. Once the first GL frame lands (`--gl-live`), the CSS blobs
266
+ pause AND hide — dimming alone does not stop blur rasterization; the page
267
+ pays for exactly one aurora at any moment. Any demotion removes the class
268
+ and the blobs resume, invisibly. */
269
+ .oc-aurora__gl {
270
+ position: absolute;
271
+ inset: 0;
272
+ width: 100%;
273
+ height: 100%;
274
+ opacity: 0;
275
+ transition: opacity 0.5s ease;
276
+ }
277
+ .oc-aurora--gl-live .oc-aurora__gl {
278
+ opacity: 1;
279
+ }
280
+ .oc-aurora--gl-live .oc-aurora__blob {
281
+ visibility: hidden;
282
+ animation-play-state: paused;
283
+ }
284
+ /* Canvas raster is NOT stripped by forced colors the way gradients are. */
285
+ @media (forced-colors: active) {
286
+ .oc-aurora__gl {
287
+ display: none;
288
+ }
289
+ }
@@ -311,6 +311,86 @@
311
311
  );
312
312
  background-size: 16px 16px;
313
313
  }
314
+ /* Guides — the quieter, 2026-register evolution of .bg-grid: a fainter
315
+ 56px lattice with plus-mark crosses at the intersections (crosses via a
316
+ masked ::before so their color stays token-reactive). Opt-in; .bg-grid
317
+ is untouched. */
318
+ .oc-guides {
319
+ position: relative;
320
+ background-image:
321
+ linear-gradient(
322
+ to right,
323
+ color-mix(in oklch, var(--foreground), transparent 96%) 1px,
324
+ transparent 1px
325
+ ),
326
+ linear-gradient(
327
+ to bottom,
328
+ color-mix(in oklch, var(--foreground), transparent 96%) 1px,
329
+ transparent 1px
330
+ );
331
+ background-size: 56px 56px;
332
+ }
333
+ .oc-guides::before {
334
+ content: '';
335
+ position: absolute;
336
+ inset: 0;
337
+ pointer-events: none;
338
+ background: color-mix(in oklch, var(--foreground), transparent 76%);
339
+ -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='56'%20height='56'%3E%3Cpath%20d='M27.5,23h1v10h-1zM23,27.5h10v1h-10z'/%3E%3C/svg%3E");
340
+ mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='56'%20height='56'%3E%3Cpath%20d='M27.5,23h1v10h-1zM23,27.5h10v1h-10z'/%3E%3C/svg%3E");
341
+ -webkit-mask-size: 56px 56px;
342
+ mask-size: 56px 56px;
343
+ -webkit-mask-position: -28px -28px;
344
+ mask-position: -28px -28px;
345
+ }
346
+ /* .oc-halo — the glyph-shaped glow plate (the sanctioned "plinth"): the
347
+ normalized orangecheck mark as a soft token-tinted mask behind a hero
348
+ artifact card. Zero JS, one composited layer, no motion. Absorbs the
349
+ hand-rolled `bg-primary/10 -inset-6 blur-3xl` pattern. Override the mark
350
+ per-site via --oc-halo-mask (a url(...) to another normalized 0..1024
351
+ media-kit glyph); dial with --oc-halo-op / --oc-halo-blur /
352
+ --oc-halo-color. Mount inside a `relative` wrapper, before the card in
353
+ source order. The default mask is the normalized media-kit render of the
354
+ mark (centering/flip transform baked in) — never the raw font-space path. */
355
+ .oc-halo {
356
+ position: absolute;
357
+ inset: -18%;
358
+ pointer-events: none;
359
+ background: var(--oc-halo-color, var(--primary));
360
+ opacity: var(--oc-halo-op, 0.3);
361
+ filter: blur(var(--oc-halo-blur, 40px));
362
+ -webkit-mask-image: var(
363
+ --oc-halo-mask,
364
+ url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%201024'%3E%3Cpath%20d='M518,856Q463,820,438.5,785.5Q414,751,414,711Q414,657,462.5,613.0Q511,569,711,473Q766,509,790.5,543.5Q815,578,815,621Q815,702,550,840ZM930,1460V1235Q845,1265,779.0,1279.5Q713,1294,659,1294Q583,1294,540.5,1265.0Q498,1236,498,1184Q498,1109,701,1004Q720,994,729,989Q943,879,1002.0,808.5Q1061,738,1061,637Q1061,548,1013.5,484.0Q966,420,864,373Q934,323,966.5,261.5Q999,200,999,119Q999,-28,894.5,-111.5Q790,-195,604,-195Q515,-195,429.0,-180.5Q343,-166,258,-137V92Q343,62,424.0,46.5Q505,31,578,31Q655,31,696.0,59.5Q737,88,737,141Q737,211,523,326L512,332L486,346Q170,516,170,688Q170,782,222.0,851.5Q274,921,371,954Q300,1004,268.0,1064.0Q236,1124,236,1206Q236,1348,340.0,1434.0Q444,1520,616,1520Q690,1520,768.5,1505.0Q847,1490,930,1460Z'%20transform='translate(195.9452,852.1889),scale(0.513493,-0.513493)'/%3E%3C/svg%3E")
365
+ );
366
+ mask-image: var(
367
+ --oc-halo-mask,
368
+ url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%201024'%3E%3Cpath%20d='M518,856Q463,820,438.5,785.5Q414,751,414,711Q414,657,462.5,613.0Q511,569,711,473Q766,509,790.5,543.5Q815,578,815,621Q815,702,550,840ZM930,1460V1235Q845,1265,779.0,1279.5Q713,1294,659,1294Q583,1294,540.5,1265.0Q498,1236,498,1184Q498,1109,701,1004Q720,994,729,989Q943,879,1002.0,808.5Q1061,738,1061,637Q1061,548,1013.5,484.0Q966,420,864,373Q934,323,966.5,261.5Q999,200,999,119Q999,-28,894.5,-111.5Q790,-195,604,-195Q515,-195,429.0,-180.5Q343,-166,258,-137V92Q343,62,424.0,46.5Q505,31,578,31Q655,31,696.0,59.5Q737,88,737,141Q737,211,523,326L512,332L486,346Q170,516,170,688Q170,782,222.0,851.5Q274,921,371,954Q300,1004,268.0,1064.0Q236,1124,236,1206Q236,1348,340.0,1434.0Q444,1520,616,1520Q690,1520,768.5,1505.0Q847,1490,930,1460Z'%20transform='translate(195.9452,852.1889),scale(0.513493,-0.513493)'/%3E%3C/svg%3E")
369
+ );
370
+ -webkit-mask-repeat: no-repeat;
371
+ mask-repeat: no-repeat;
372
+ -webkit-mask-position: center;
373
+ mask-position: center;
374
+ -webkit-mask-size: contain;
375
+ mask-size: contain;
376
+ }
377
+ /* Cypherpunk skins: hard borders, no soft shadows — the halo tightens to a
378
+ crisp edge-glow instead of a warm bloom (skin-coherent, per charter). */
379
+ :root[data-oc-theme='orangecheck'] .oc-halo,
380
+ :root[data-oc-theme='phosphor'] .oc-halo,
381
+ :root[data-oc-theme='lightning'] .oc-halo,
382
+ :root[data-oc-theme='gold'] .oc-halo {
383
+ filter: blur(var(--oc-halo-blur, 10px));
384
+ opacity: calc(var(--oc-halo-op, 0.3) * 0.6);
385
+ }
386
+ /* Decorative rasters are NOT auto-stripped by forced colors the way
387
+ gradients are — hide them explicitly. */
388
+ @media (forced-colors: active) {
389
+ .oc-halo,
390
+ .oc-aurora__grain {
391
+ display: none;
392
+ }
393
+ }
314
394
  /* currentColor-based textures for brand/CTA bands. NOT prefixed `bg-`:
315
395
  tailwind-merge misclassifies any `bg-*` class as a background-color and
316
396
  would drop a real `bg-brand`/`bg-card` sitting next to it in the same
package/dist/tokens.d.mts CHANGED
@@ -18,26 +18,35 @@ type OcThemeId = (typeof OC_THEMES)[number]['id'] | (string & {});
18
18
  declare function isKnownTheme(id: string | null | undefined): id is OcThemeId;
19
19
  declare function resolveTheme(id: string | null | undefined): string;
20
20
  declare const OC_SKIN_COOKIE = "oc_skin";
21
+ declare const OC_MOTION_COOKIE = "oc_motion";
21
22
 
22
23
  declare global {
23
24
  interface Window {
24
25
  __ocApplySkinChrome?: (skin: string) => void;
25
26
  }
26
27
  }
28
+ type OcMotion = 'on' | 'off';
27
29
  interface OcSkinContextValue {
28
30
  skin: string;
29
31
  setSkin: (id: string) => void;
30
32
  themes: readonly OcTheme[];
33
+ motion: OcMotion;
34
+ setMotion: (value: OcMotion) => void;
31
35
  }
32
36
  interface OcThemeProviderProps {
33
37
  children: ReactNode;
34
38
  defaultSkin?: string;
35
39
  aurora?: boolean | {
36
40
  intensity?: number;
41
+ gl?: boolean;
37
42
  };
38
43
  }
39
44
  declare function OcThemeProvider({ children, defaultSkin, aurora, }: OcThemeProviderProps): react_jsx_runtime.JSX.Element;
40
45
  declare function useOcSkin(): OcSkinContextValue;
46
+ declare function useOcMotion(): {
47
+ motion: OcMotion;
48
+ setMotion: (value: OcMotion) => void;
49
+ };
41
50
  declare function getOcThemeInitScript(defaultSkin?: string): string;
42
51
 
43
52
  declare function OcThemeBridge(): null;
@@ -61,8 +70,24 @@ declare function OcAppearanceMenu({ className, triggerClassName, popoverClassNam
61
70
 
62
71
  interface OcAuroraProps {
63
72
  intensity?: number;
73
+ gl?: boolean;
64
74
  className?: string;
65
75
  }
66
- declare function OcAurora({ intensity, className }: OcAuroraProps): react_jsx_runtime.JSX.Element;
76
+ declare function OcAurora({ intensity, gl, className }: OcAuroraProps): react_jsx_runtime.JSX.Element;
67
77
 
68
- export { AppearanceControls, DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, type OcAppearanceMenuProps, OcAurora, type OcAuroraProps, type OcTheme, OcThemeBridge, type OcThemeId, OcThemePicker, type OcThemePickerProps, OcThemeProvider, type OcThemeProviderProps, accentFor, cn, getOcThemeInitScript, isKnownTheme, resolveTheme, useOcSkin };
78
+ interface OcSceneRGB {
79
+ r: number;
80
+ g: number;
81
+ b: number;
82
+ }
83
+ interface OcSceneTokens {
84
+ palette: [OcSceneRGB, OcSceneRGB, OcSceneRGB, OcSceneRGB];
85
+ background: OcSceneRGB;
86
+ isDark: boolean;
87
+ motionOff: boolean;
88
+ }
89
+ declare function normalizeHue(c: OcSceneRGB, isDark: boolean): OcSceneRGB;
90
+ declare function readOcSceneTokens(host: HTMLElement): OcSceneTokens | null;
91
+ declare function subscribeOcTheme(cb: () => void): () => void;
92
+
93
+ export { AppearanceControls, DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_MOTION_COOKIE, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, type OcAppearanceMenuProps, OcAurora, type OcAuroraProps, type OcMotion, type OcSceneRGB, type OcSceneTokens, type OcTheme, OcThemeBridge, type OcThemeId, OcThemePicker, type OcThemePickerProps, OcThemeProvider, type OcThemeProviderProps, accentFor, cn, getOcThemeInitScript, isKnownTheme, normalizeHue, readOcSceneTokens, resolveTheme, subscribeOcTheme, useOcMotion, useOcSkin };
package/dist/tokens.d.ts CHANGED
@@ -18,26 +18,35 @@ type OcThemeId = (typeof OC_THEMES)[number]['id'] | (string & {});
18
18
  declare function isKnownTheme(id: string | null | undefined): id is OcThemeId;
19
19
  declare function resolveTheme(id: string | null | undefined): string;
20
20
  declare const OC_SKIN_COOKIE = "oc_skin";
21
+ declare const OC_MOTION_COOKIE = "oc_motion";
21
22
 
22
23
  declare global {
23
24
  interface Window {
24
25
  __ocApplySkinChrome?: (skin: string) => void;
25
26
  }
26
27
  }
28
+ type OcMotion = 'on' | 'off';
27
29
  interface OcSkinContextValue {
28
30
  skin: string;
29
31
  setSkin: (id: string) => void;
30
32
  themes: readonly OcTheme[];
33
+ motion: OcMotion;
34
+ setMotion: (value: OcMotion) => void;
31
35
  }
32
36
  interface OcThemeProviderProps {
33
37
  children: ReactNode;
34
38
  defaultSkin?: string;
35
39
  aurora?: boolean | {
36
40
  intensity?: number;
41
+ gl?: boolean;
37
42
  };
38
43
  }
39
44
  declare function OcThemeProvider({ children, defaultSkin, aurora, }: OcThemeProviderProps): react_jsx_runtime.JSX.Element;
40
45
  declare function useOcSkin(): OcSkinContextValue;
46
+ declare function useOcMotion(): {
47
+ motion: OcMotion;
48
+ setMotion: (value: OcMotion) => void;
49
+ };
41
50
  declare function getOcThemeInitScript(defaultSkin?: string): string;
42
51
 
43
52
  declare function OcThemeBridge(): null;
@@ -61,8 +70,24 @@ declare function OcAppearanceMenu({ className, triggerClassName, popoverClassNam
61
70
 
62
71
  interface OcAuroraProps {
63
72
  intensity?: number;
73
+ gl?: boolean;
64
74
  className?: string;
65
75
  }
66
- declare function OcAurora({ intensity, className }: OcAuroraProps): react_jsx_runtime.JSX.Element;
76
+ declare function OcAurora({ intensity, gl, className }: OcAuroraProps): react_jsx_runtime.JSX.Element;
67
77
 
68
- export { AppearanceControls, DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, type OcAppearanceMenuProps, OcAurora, type OcAuroraProps, type OcTheme, OcThemeBridge, type OcThemeId, OcThemePicker, type OcThemePickerProps, OcThemeProvider, type OcThemeProviderProps, accentFor, cn, getOcThemeInitScript, isKnownTheme, resolveTheme, useOcSkin };
78
+ interface OcSceneRGB {
79
+ r: number;
80
+ g: number;
81
+ b: number;
82
+ }
83
+ interface OcSceneTokens {
84
+ palette: [OcSceneRGB, OcSceneRGB, OcSceneRGB, OcSceneRGB];
85
+ background: OcSceneRGB;
86
+ isDark: boolean;
87
+ motionOff: boolean;
88
+ }
89
+ declare function normalizeHue(c: OcSceneRGB, isDark: boolean): OcSceneRGB;
90
+ declare function readOcSceneTokens(host: HTMLElement): OcSceneTokens | null;
91
+ declare function subscribeOcTheme(cb: () => void): () => void;
92
+
93
+ export { AppearanceControls, DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_MOTION_COOKIE, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, type OcAppearanceMenuProps, OcAurora, type OcAuroraProps, type OcMotion, type OcSceneRGB, type OcSceneTokens, type OcTheme, OcThemeBridge, type OcThemeId, OcThemePicker, type OcThemePickerProps, OcThemeProvider, type OcThemeProviderProps, accentFor, cn, getOcThemeInitScript, isKnownTheme, normalizeHue, readOcSceneTokens, resolveTheme, subscribeOcTheme, useOcMotion, useOcSkin };