@awc-ui/theme 1.0.0-beta

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.
@@ -0,0 +1,3 @@
1
+ /** Convert camelCase MD3 role names to kebab-case CSS token suffixes. */
2
+ export declare function tokenName(role: string): string;
3
+ //# sourceMappingURL=token-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-name.d.ts","sourceRoot":"","sources":["../src/token-name.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
@@ -0,0 +1,47 @@
1
+ export type PaletteKey = 'primary' | 'secondary' | 'tertiary' | 'neutral' | 'neutralVariant';
2
+ /** MD3 role names — matches --md-sys-color-* tokens and DynamicScheme getters. */
3
+ export declare const ROLE_KEYS: readonly ["primary", "onPrimary", "primaryContainer", "onPrimaryContainer", "inversePrimary", "secondary", "onSecondary", "secondaryContainer", "onSecondaryContainer", "tertiary", "onTertiary", "tertiaryContainer", "onTertiaryContainer", "error", "onError", "errorContainer", "onErrorContainer", "background", "onBackground", "surface", "onSurface", "surfaceVariant", "onSurfaceVariant", "surfaceContainerLowest", "surfaceContainerLow", "surfaceContainer", "surfaceContainerHigh", "surfaceContainerHighest", "surfaceDim", "surfaceBright", "outline", "outlineVariant", "inverseSurface", "inverseOnSurface", "shadow", "scrim", "surfaceTint"];
4
+ export type RoleKey = (typeof ROLE_KEYS)[number];
5
+ export type RoleMap = Record<RoleKey, string>;
6
+ export type ThemeComputeRequest = {
7
+ primaryHex: string;
8
+ secondaryHex?: string;
9
+ tertiaryHex?: string;
10
+ /**
11
+ * MD3 contrast level passed to DynamicScheme.
12
+ * -1 reduced, 0 standard (default), 0.5 medium, 1 high contrast.
13
+ */
14
+ contrastLevel?: number;
15
+ };
16
+ export type ThemeComputeResult = {
17
+ tones: Record<PaletteKey, Record<number, string>>;
18
+ roles: {
19
+ light: RoleMap;
20
+ dark: RoleMap;
21
+ };
22
+ sources: {
23
+ primary: string;
24
+ secondary: string;
25
+ tertiary: string;
26
+ };
27
+ contrastLevel: number;
28
+ durationMs: number;
29
+ };
30
+ export type ThemeWorkerRequest = ThemeComputeRequest & {
31
+ type: 'compute';
32
+ };
33
+ export type ThemeWorkerResponse = ({
34
+ type: 'palette';
35
+ } & ThemeComputeResult) | {
36
+ type: 'error';
37
+ message: string;
38
+ };
39
+ export declare const DEFAULT_SEED_COLORS: {
40
+ readonly primary: "#6750A4";
41
+ readonly secondary: "#625B71";
42
+ readonly tertiary: "#7D5260";
43
+ };
44
+ export declare const DEFAULT_FONT_FAMILY = "Roboto";
45
+ /** All 15 MD3 typescale slots that expose a font-family token. */
46
+ export declare const TYPESCALE_SLOTS: readonly ["display-large", "display-medium", "display-small", "headline-large", "headline-medium", "headline-small", "title-large", "title-medium", "title-small", "label-large", "label-medium", "label-small", "body-large", "body-medium", "body-small"];
47
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,gBAAgB,CAAC;AAErB,kFAAkF;AAClF,eAAO,MAAM,SAAS,ioBAsCZ,CAAC;AAEX,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AACjD,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE9C,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC;IACzC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAClE,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,mBAAmB,GAC3B,CAAC;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,kBAAkB,CAAC,GAC1C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvC,eAAO,MAAM,mBAAmB;;;;CAItB,CAAC;AAEX,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,kEAAkE;AAClE,eAAO,MAAM,eAAe,6PAgBlB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /// <reference lib="webworker" />
2
+ export {};
3
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../src/worker.ts"],"names":[],"mappings":""}