toastory 0.1.0 → 0.1.2

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.
Files changed (131) hide show
  1. package/README.md +10 -10
  2. package/dist/angular.cjs +2 -2
  3. package/dist/angular.cjs.map +1 -1
  4. package/dist/angular.d.cts +11 -4
  5. package/dist/angular.d.ts +11 -4
  6. package/dist/angular.js +2 -2
  7. package/dist/angular.js.map +1 -1
  8. package/dist/core.cjs +1 -1
  9. package/dist/core.cjs.map +1 -1
  10. package/dist/core.d.cts +6 -6
  11. package/dist/core.d.ts +6 -6
  12. package/dist/core.js +1 -1
  13. package/dist/core.js.map +1 -1
  14. package/dist/{dialog-B08CfkHj.d.ts → dialog-Buemfm7I.d.ts} +1 -1
  15. package/dist/{dialog-B9Z_67Ry.d.ts → dialog-fziFV6J0.d.cts} +1 -1
  16. package/dist/index.cjs +3 -3
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +4 -4
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.js +3 -3
  21. package/dist/index.js.map +1 -1
  22. package/dist/native.cjs +1 -1
  23. package/dist/native.cjs.map +1 -1
  24. package/dist/native.js +1 -1
  25. package/dist/native.js.map +1 -1
  26. package/dist/react.cjs +2 -2
  27. package/dist/react.cjs.map +1 -1
  28. package/dist/react.d.cts +10 -7
  29. package/dist/react.d.ts +10 -7
  30. package/dist/react.js +2 -2
  31. package/dist/react.js.map +1 -1
  32. package/dist/svelte.cjs +2 -2
  33. package/dist/svelte.cjs.map +1 -1
  34. package/dist/svelte.d.cts +2 -2
  35. package/dist/svelte.d.ts +2 -2
  36. package/dist/svelte.js +2 -2
  37. package/dist/svelte.js.map +1 -1
  38. package/dist/themes/_base.css +1 -1
  39. package/dist/themes/_base.dialog.css +1 -1
  40. package/dist/themes/_base.toast.css +1 -1
  41. package/dist/themes/all.css +1 -0
  42. package/dist/themes/aurora.css +1 -1
  43. package/dist/themes/aurora.dialog.css +1 -1
  44. package/dist/themes/aurora.toast.css +1 -1
  45. package/dist/themes/basic.css +1 -1
  46. package/dist/themes/basic.dialog.css +1 -1
  47. package/dist/themes/basic.toast.css +1 -1
  48. package/dist/themes/brutal.css +1 -1
  49. package/dist/themes/brutal.dialog.css +1 -1
  50. package/dist/themes/brutal.toast.css +1 -1
  51. package/dist/themes/classic-bar.css +1 -1
  52. package/dist/themes/classic-bar.dialog.css +1 -1
  53. package/dist/themes/classic-bar.toast.css +1 -1
  54. package/dist/themes/classic-stack.css +1 -1
  55. package/dist/themes/classic-stack.dialog.css +1 -1
  56. package/dist/themes/classic-stack.toast.css +1 -1
  57. package/dist/themes/dialogs.css +1 -1
  58. package/dist/themes/dialogs.dialog.css +1 -1
  59. package/dist/themes/dialogs.toast.css +1 -1
  60. package/dist/themes/essentials.css +1 -1
  61. package/dist/themes/essentials.dialog.css +1 -1
  62. package/dist/themes/essentials.toast.css +1 -1
  63. package/dist/themes/flat.css +1 -1
  64. package/dist/themes/flat.dialog.css +1 -1
  65. package/dist/themes/flat.toast.css +1 -1
  66. package/dist/themes/gradient-strip.css +1 -1
  67. package/dist/themes/gradient-strip.dialog.css +1 -1
  68. package/dist/themes/gradient-strip.toast.css +1 -1
  69. package/dist/themes/gradient.css +1 -1
  70. package/dist/themes/gradient.dialog.css +1 -1
  71. package/dist/themes/gradient.toast.css +1 -1
  72. package/dist/themes/ios-glass.css +1 -1
  73. package/dist/themes/ios-glass.dialog.css +1 -1
  74. package/dist/themes/ios-glass.toast.css +1 -1
  75. package/dist/themes/liquid-glass.css +1 -1
  76. package/dist/themes/liquid-glass.dialog.css +1 -1
  77. package/dist/themes/liquid-glass.toast.css +1 -1
  78. package/dist/themes/material.css +1 -1
  79. package/dist/themes/material.dialog.css +1 -1
  80. package/dist/themes/material.toast.css +1 -1
  81. package/dist/themes/minimal.css +1 -1
  82. package/dist/themes/minimal.dialog.css +1 -1
  83. package/dist/themes/minimal.toast.css +1 -1
  84. package/dist/themes/neon.css +1 -1
  85. package/dist/themes/neon.dialog.css +1 -1
  86. package/dist/themes/neon.toast.css +1 -1
  87. package/dist/themes/outline.css +1 -1
  88. package/dist/themes/outline.dialog.css +1 -1
  89. package/dist/themes/outline.toast.css +1 -1
  90. package/dist/themes/pastel.css +1 -1
  91. package/dist/themes/pastel.dialog.css +1 -1
  92. package/dist/themes/pastel.toast.css +1 -1
  93. package/dist/themes/pill.css +1 -1
  94. package/dist/themes/pill.dialog.css +1 -1
  95. package/dist/themes/pill.toast.css +1 -1
  96. package/dist/themes/ripple.css +1 -1
  97. package/dist/themes/ripple.dialog.css +1 -1
  98. package/dist/themes/ripple.toast.css +1 -1
  99. package/dist/themes/showcase.css +1 -1
  100. package/dist/themes/showcase.dialog.css +1 -1
  101. package/dist/themes/showcase.toast.css +1 -1
  102. package/dist/themes/sweet.css +1 -1
  103. package/dist/themes/sweet.dialog.css +1 -1
  104. package/dist/themes/sweet.toast.css +1 -1
  105. package/dist/{toast-api-C3NL4zla.d.cts → toast-api-D6WYDtUy.d.cts} +5 -3
  106. package/dist/{toast-api-C3NL4zla.d.ts → toast-api-D6WYDtUy.d.ts} +5 -3
  107. package/dist/{ui-BRRU9D4b.d.ts → ui-Cs1AjRNH.d.ts} +2 -2
  108. package/dist/{ui-30FIsmS5.d.cts → ui-D5FwMD8Y.d.cts} +2 -2
  109. package/dist/vue.cjs +2 -2
  110. package/dist/vue.cjs.map +1 -1
  111. package/dist/vue.d.cts +130 -13
  112. package/dist/vue.d.ts +130 -13
  113. package/dist/vue.js +2 -2
  114. package/dist/vue.js.map +1 -1
  115. package/package.json +6 -6
  116. package/dist/dialog-BDLOS-N9.d.cts +0 -56
  117. package/dist/dialog-BwJckkzq.d.cts +0 -56
  118. package/dist/dialog-DWyGuoVI.d.cts +0 -56
  119. package/dist/dialog-D_JZtadd.d.cts +0 -56
  120. package/dist/dialog-GDDN2Jkl.d.ts +0 -56
  121. package/dist/dialog-zlFXWvsk.d.ts +0 -56
  122. package/dist/toast-api-DksXya0f.d.cts +0 -704
  123. package/dist/toast-api-DksXya0f.d.ts +0 -704
  124. package/dist/toast-api-TqsztUqW.d.cts +0 -704
  125. package/dist/toast-api-TqsztUqW.d.ts +0 -704
  126. package/dist/ui-Bk3-iiT3.d.cts +0 -97
  127. package/dist/ui-BwjuXLKj.d.ts +0 -97
  128. package/dist/ui-CVyKIiVQ.d.ts +0 -97
  129. package/dist/ui-Cma14-bn.d.cts +0 -97
  130. package/dist/ui-ImWgPMgJ.d.ts +0 -97
  131. package/dist/ui-u9GYcdbJ.d.cts +0 -97
@@ -1,97 +0,0 @@
1
- import { T as ToastApi, q as DialogOptions, Y as SheetOptions, d as BottomSheetOptions, B as BottomSheetHandle, H as LoadingOptions, F as LoadingHandle, G as GlazeConfig, b as ToastStore } from './toast-api-TqsztUqW.cjs';
2
- import { a as DialogPromise, S as StepsResult } from './dialog-D_JZtadd.cjs';
3
-
4
- /**
5
- * Theme definitions. The build script turns each definition into a CSS file; the tests check every
6
- * token pair for WCAG contrast. This file must stay free of TypeScript-only runtime constructs so
7
- * Node can load it directly.
8
- */
9
- interface ThemeTokens {
10
- /** Surface color. May be translucent for glass themes. */
11
- bg: string;
12
- /** Opaque stand-in used when `backdrop-filter` is unsupported and for form fields. */
13
- solid: string;
14
- /** Primary text. */
15
- fg: string;
16
- /** Secondary text. */
17
- muted: string;
18
- /** Border and divider color. */
19
- border: string;
20
- /** Box shadow value. */
21
- shadow: string;
22
- /** Accent color for actions, links and focus rings. */
23
- accent: string;
24
- /** Text on top of the accent color. */
25
- accentFg: string;
26
- /** Destructive button background. */
27
- danger: string;
28
- /** Text on top of the destructive background. */
29
- dangerFg: string;
30
- success: string;
31
- error: string;
32
- warning: string;
33
- info: string;
34
- }
35
-
36
- /** Options for registering a custom theme via `ui.defineTheme()`. */
37
- interface CustomThemeDefinition {
38
- radius?: string;
39
- blur?: string;
40
- saturate?: string;
41
- font?: string;
42
- ease?: string;
43
- duration?: string;
44
- borderWidth?: string;
45
- tokens?: {
46
- light?: Partial<ThemeTokens>;
47
- dark?: Partial<ThemeTokens>;
48
- } | Partial<ThemeTokens>;
49
- light?: Partial<ThemeTokens>;
50
- dark?: Partial<ThemeTokens>;
51
- css?: string;
52
- supportedVariants?: readonly string[];
53
- }
54
- /**
55
- * Defines a custom theme. Compiles the tokens to CSS, registers the theme name with glazekit,
56
- * and automatically injects a `<style data-gk-theme="<name>">` element when called in the browser.
57
- *
58
- * @returns The compiled CSS string.
59
- */
60
- declare function defineTheme(name: string, def: CustomThemeDefinition): string;
61
- /** Clears registered custom themes. Used for testing. */
62
- declare function clearCustomThemes(): void;
63
-
64
- /** The unified glazekit API. */
65
- interface Ui {
66
- /** Toast notifications. */
67
- toast: ToastApi;
68
- /** Confirmation dialog with confirm and cancel buttons. */
69
- confirm(options?: DialogOptions): DialogPromise;
70
- /** Informational dialog with a single button. */
71
- alert(options?: DialogOptions): DialogPromise;
72
- /** Dialog with an input. Defaults to a text input. */
73
- prompt(options?: DialogOptions): DialogPromise;
74
- /** Multi-step dialog flow with back navigation. */
75
- steps(steps: readonly DialogOptions[], backLabel?: string): Promise<StepsResult>;
76
- /** Action sheet. */
77
- sheet(options: SheetOptions): DialogPromise;
78
- /** Bottom sheet with snap points. */
79
- bottomSheet(options?: BottomSheetOptions): BottomSheetHandle;
80
- /** Blocking loading overlay. */
81
- loading(options?: LoadingOptions): LoadingHandle;
82
- /** Sets global configuration. Returns the resulting configuration. */
83
- configure(patch: Partial<GlazeConfig>): Readonly<GlazeConfig>;
84
- /** Defines a custom theme with tokens and optional CSS rules. */
85
- defineTheme(name: string, definition: CustomThemeDefinition): string;
86
- /** The underlying toast store. */
87
- readonly toastStore: ToastStore;
88
- }
89
- /** Builds the `ui` object. Called once at module load; touches no DOM. */
90
- declare function createUi(): Ui;
91
- /** The unified API: `ui.toast`, `ui.confirm`, `ui.sheet` and friends. */
92
- declare const ui: Ui;
93
- /** Toast API on its own. Importing only this keeps dialog code out of your bundle. */
94
- declare const toast: ToastApi;
95
-
96
- export { createUi as a, clearCustomThemes as c, defineTheme as d, toast as t, ui as u };
97
- export type { CustomThemeDefinition as C, Ui as U };
@@ -1,97 +0,0 @@
1
- import { T as ToastApi, q as DialogOptions, Y as SheetOptions, d as BottomSheetOptions, B as BottomSheetHandle, H as LoadingOptions, F as LoadingHandle, G as GlazeConfig, b as ToastStore } from './toast-api-TqsztUqW.js';
2
- import { a as DialogPromise, S as StepsResult } from './dialog-GDDN2Jkl.js';
3
-
4
- /**
5
- * Theme definitions. The build script turns each definition into a CSS file; the tests check every
6
- * token pair for WCAG contrast. This file must stay free of TypeScript-only runtime constructs so
7
- * Node can load it directly.
8
- */
9
- interface ThemeTokens {
10
- /** Surface color. May be translucent for glass themes. */
11
- bg: string;
12
- /** Opaque stand-in used when `backdrop-filter` is unsupported and for form fields. */
13
- solid: string;
14
- /** Primary text. */
15
- fg: string;
16
- /** Secondary text. */
17
- muted: string;
18
- /** Border and divider color. */
19
- border: string;
20
- /** Box shadow value. */
21
- shadow: string;
22
- /** Accent color for actions, links and focus rings. */
23
- accent: string;
24
- /** Text on top of the accent color. */
25
- accentFg: string;
26
- /** Destructive button background. */
27
- danger: string;
28
- /** Text on top of the destructive background. */
29
- dangerFg: string;
30
- success: string;
31
- error: string;
32
- warning: string;
33
- info: string;
34
- }
35
-
36
- /** Options for registering a custom theme via `ui.defineTheme()`. */
37
- interface CustomThemeDefinition {
38
- radius?: string;
39
- blur?: string;
40
- saturate?: string;
41
- font?: string;
42
- ease?: string;
43
- duration?: string;
44
- borderWidth?: string;
45
- tokens?: {
46
- light?: Partial<ThemeTokens>;
47
- dark?: Partial<ThemeTokens>;
48
- } | Partial<ThemeTokens>;
49
- light?: Partial<ThemeTokens>;
50
- dark?: Partial<ThemeTokens>;
51
- css?: string;
52
- supportedVariants?: readonly string[];
53
- }
54
- /**
55
- * Defines a custom theme. Compiles the tokens to CSS, registers the theme name with glazekit,
56
- * and automatically injects a `<style data-gk-theme="<name>">` element when called in the browser.
57
- *
58
- * @returns The compiled CSS string.
59
- */
60
- declare function defineTheme(name: string, def: CustomThemeDefinition): string;
61
- /** Clears registered custom themes. Used for testing. */
62
- declare function clearCustomThemes(): void;
63
-
64
- /** The unified glazekit API. */
65
- interface Ui {
66
- /** Toast notifications. */
67
- toast: ToastApi;
68
- /** Confirmation dialog with confirm and cancel buttons. */
69
- confirm(options?: DialogOptions): DialogPromise;
70
- /** Informational dialog with a single button. */
71
- alert(options?: DialogOptions): DialogPromise;
72
- /** Dialog with an input. Defaults to a text input. */
73
- prompt(options?: DialogOptions): DialogPromise;
74
- /** Multi-step dialog flow with back navigation. */
75
- steps(steps: readonly DialogOptions[], backLabel?: string): Promise<StepsResult>;
76
- /** Action sheet. */
77
- sheet(options: SheetOptions): DialogPromise;
78
- /** Bottom sheet with snap points. */
79
- bottomSheet(options?: BottomSheetOptions): BottomSheetHandle;
80
- /** Blocking loading overlay. */
81
- loading(options?: LoadingOptions): LoadingHandle;
82
- /** Sets global configuration. Returns the resulting configuration. */
83
- configure(patch: Partial<GlazeConfig>): Readonly<GlazeConfig>;
84
- /** Defines a custom theme with tokens and optional CSS rules. */
85
- defineTheme(name: string, definition: CustomThemeDefinition): string;
86
- /** The underlying toast store. */
87
- readonly toastStore: ToastStore;
88
- }
89
- /** Builds the `ui` object. Called once at module load; touches no DOM. */
90
- declare function createUi(): Ui;
91
- /** The unified API: `ui.toast`, `ui.confirm`, `ui.sheet` and friends. */
92
- declare const ui: Ui;
93
- /** Toast API on its own. Importing only this keeps dialog code out of your bundle. */
94
- declare const toast: ToastApi;
95
-
96
- export { createUi as a, clearCustomThemes as c, defineTheme as d, toast as t, ui as u };
97
- export type { CustomThemeDefinition as C, Ui as U };
@@ -1,97 +0,0 @@
1
- import { T as ToastApi, q as DialogOptions, Y as SheetOptions, d as BottomSheetOptions, B as BottomSheetHandle, H as LoadingOptions, F as LoadingHandle, G as GlazeConfig, b as ToastStore } from './toast-api-TqsztUqW.js';
2
- import { a as DialogPromise, S as StepsResult } from './dialog-zlFXWvsk.js';
3
-
4
- /**
5
- * Theme definitions. The build script turns each definition into a CSS file; the tests check every
6
- * token pair for WCAG contrast. This file must stay free of TypeScript-only runtime constructs so
7
- * Node can load it directly.
8
- */
9
- interface ThemeTokens {
10
- /** Surface color. May be translucent for glass themes. */
11
- bg: string;
12
- /** Opaque stand-in used when `backdrop-filter` is unsupported and for form fields. */
13
- solid: string;
14
- /** Primary text. */
15
- fg: string;
16
- /** Secondary text. */
17
- muted: string;
18
- /** Border and divider color. */
19
- border: string;
20
- /** Box shadow value. */
21
- shadow: string;
22
- /** Accent color for actions, links and focus rings. */
23
- accent: string;
24
- /** Text on top of the accent color. */
25
- accentFg: string;
26
- /** Destructive button background. */
27
- danger: string;
28
- /** Text on top of the destructive background. */
29
- dangerFg: string;
30
- success: string;
31
- error: string;
32
- warning: string;
33
- info: string;
34
- }
35
-
36
- /** Options for registering a custom theme via `ui.defineTheme()`. */
37
- interface CustomThemeDefinition {
38
- radius?: string;
39
- blur?: string;
40
- saturate?: string;
41
- font?: string;
42
- ease?: string;
43
- duration?: string;
44
- borderWidth?: string;
45
- tokens?: {
46
- light?: Partial<ThemeTokens>;
47
- dark?: Partial<ThemeTokens>;
48
- } | Partial<ThemeTokens>;
49
- light?: Partial<ThemeTokens>;
50
- dark?: Partial<ThemeTokens>;
51
- css?: string;
52
- supportedVariants?: readonly string[];
53
- }
54
- /**
55
- * Defines a custom theme. Compiles the tokens to CSS, registers the theme name with glazekit,
56
- * and automatically injects a `<style data-gk-theme="<name>">` element when called in the browser.
57
- *
58
- * @returns The compiled CSS string.
59
- */
60
- declare function defineTheme(name: string, def: CustomThemeDefinition): string;
61
- /** Clears registered custom themes. Used for testing. */
62
- declare function clearCustomThemes(): void;
63
-
64
- /** The unified glazekit API. */
65
- interface Ui {
66
- /** Toast notifications. */
67
- toast: ToastApi;
68
- /** Confirmation dialog with confirm and cancel buttons. */
69
- confirm(options?: DialogOptions): DialogPromise;
70
- /** Informational dialog with a single button. */
71
- alert(options?: DialogOptions): DialogPromise;
72
- /** Dialog with an input. Defaults to a text input. */
73
- prompt(options?: DialogOptions): DialogPromise;
74
- /** Multi-step dialog flow with back navigation. */
75
- steps(steps: readonly DialogOptions[], backLabel?: string): Promise<StepsResult>;
76
- /** Action sheet. */
77
- sheet(options: SheetOptions): DialogPromise;
78
- /** Bottom sheet with snap points. */
79
- bottomSheet(options?: BottomSheetOptions): BottomSheetHandle;
80
- /** Blocking loading overlay. */
81
- loading(options?: LoadingOptions): LoadingHandle;
82
- /** Sets global configuration. Returns the resulting configuration. */
83
- configure(patch: Partial<GlazeConfig>): Readonly<GlazeConfig>;
84
- /** Defines a custom theme with tokens and optional CSS rules. */
85
- defineTheme(name: string, definition: CustomThemeDefinition): string;
86
- /** The underlying toast store. */
87
- readonly toastStore: ToastStore;
88
- }
89
- /** Builds the `ui` object. Called once at module load; touches no DOM. */
90
- declare function createUi(): Ui;
91
- /** The unified API: `ui.toast`, `ui.confirm`, `ui.sheet` and friends. */
92
- declare const ui: Ui;
93
- /** Toast API on its own. Importing only this keeps dialog code out of your bundle. */
94
- declare const toast: ToastApi;
95
-
96
- export { createUi as a, clearCustomThemes as c, defineTheme as d, toast as t, ui as u };
97
- export type { CustomThemeDefinition as C, Ui as U };
@@ -1,97 +0,0 @@
1
- import { T as ToastApi, q as DialogOptions, Y as SheetOptions, d as BottomSheetOptions, B as BottomSheetHandle, H as LoadingOptions, F as LoadingHandle, G as GlazeConfig, b as ToastStore } from './toast-api-DksXya0f.cjs';
2
- import { a as DialogPromise, S as StepsResult } from './dialog-BwJckkzq.cjs';
3
-
4
- /**
5
- * Theme definitions. The build script turns each definition into a CSS file; the tests check every
6
- * token pair for WCAG contrast. This file must stay free of TypeScript-only runtime constructs so
7
- * Node can load it directly.
8
- */
9
- interface ThemeTokens {
10
- /** Surface color. May be translucent for glass themes. */
11
- bg: string;
12
- /** Opaque stand-in used when `backdrop-filter` is unsupported and for form fields. */
13
- solid: string;
14
- /** Primary text. */
15
- fg: string;
16
- /** Secondary text. */
17
- muted: string;
18
- /** Border and divider color. */
19
- border: string;
20
- /** Box shadow value. */
21
- shadow: string;
22
- /** Accent color for actions, links and focus rings. */
23
- accent: string;
24
- /** Text on top of the accent color. */
25
- accentFg: string;
26
- /** Destructive button background. */
27
- danger: string;
28
- /** Text on top of the destructive background. */
29
- dangerFg: string;
30
- success: string;
31
- error: string;
32
- warning: string;
33
- info: string;
34
- }
35
-
36
- /** Options for registering a custom theme via `ui.defineTheme()`. */
37
- interface CustomThemeDefinition {
38
- radius?: string;
39
- blur?: string;
40
- saturate?: string;
41
- font?: string;
42
- ease?: string;
43
- duration?: string;
44
- borderWidth?: string;
45
- tokens?: {
46
- light?: Partial<ThemeTokens>;
47
- dark?: Partial<ThemeTokens>;
48
- } | Partial<ThemeTokens>;
49
- light?: Partial<ThemeTokens>;
50
- dark?: Partial<ThemeTokens>;
51
- css?: string;
52
- supportedVariants?: readonly string[];
53
- }
54
- /**
55
- * Defines a custom theme. Compiles the tokens to CSS, registers the theme name with glazekit,
56
- * and automatically injects a `<style data-gk-theme="<name>">` element when called in the browser.
57
- *
58
- * @returns The compiled CSS string.
59
- */
60
- declare function defineTheme(name: string, def: CustomThemeDefinition): string;
61
- /** Clears registered custom themes. Used for testing. */
62
- declare function clearCustomThemes(): void;
63
-
64
- /** The unified glazekit API. */
65
- interface Ui {
66
- /** Toast notifications. */
67
- toast: ToastApi;
68
- /** Confirmation dialog with confirm and cancel buttons. */
69
- confirm(options?: DialogOptions): DialogPromise;
70
- /** Informational dialog with a single button. */
71
- alert(options?: DialogOptions): DialogPromise;
72
- /** Dialog with an input. Defaults to a text input. */
73
- prompt(options?: DialogOptions): DialogPromise;
74
- /** Multi-step dialog flow with back navigation. */
75
- steps(steps: readonly DialogOptions[], backLabel?: string): Promise<StepsResult>;
76
- /** Action sheet. */
77
- sheet(options: SheetOptions): DialogPromise;
78
- /** Bottom sheet with snap points. */
79
- bottomSheet(options?: BottomSheetOptions): BottomSheetHandle;
80
- /** Blocking loading overlay. */
81
- loading(options?: LoadingOptions): LoadingHandle;
82
- /** Sets global configuration. Returns the resulting configuration. */
83
- configure(patch: Partial<GlazeConfig>): Readonly<GlazeConfig>;
84
- /** Defines a custom theme with tokens and optional CSS rules. */
85
- defineTheme(name: string, definition: CustomThemeDefinition): string;
86
- /** The underlying toast store. */
87
- readonly toastStore: ToastStore;
88
- }
89
- /** Builds the `ui` object. Called once at module load; touches no DOM. */
90
- declare function createUi(): Ui;
91
- /** The unified API: `ui.toast`, `ui.confirm`, `ui.sheet` and friends. */
92
- declare const ui: Ui;
93
- /** Toast API on its own. Importing only this keeps dialog code out of your bundle. */
94
- declare const toast: ToastApi;
95
-
96
- export { createUi as a, clearCustomThemes as c, defineTheme as d, toast as t, ui as u };
97
- export type { CustomThemeDefinition as C, Ui as U };
@@ -1,97 +0,0 @@
1
- import { T as ToastApi, q as DialogOptions, Y as SheetOptions, d as BottomSheetOptions, B as BottomSheetHandle, H as LoadingOptions, F as LoadingHandle, G as GlazeConfig, b as ToastStore } from './toast-api-DksXya0f.js';
2
- import { a as DialogPromise, S as StepsResult } from './dialog-B9Z_67Ry.js';
3
-
4
- /**
5
- * Theme definitions. The build script turns each definition into a CSS file; the tests check every
6
- * token pair for WCAG contrast. This file must stay free of TypeScript-only runtime constructs so
7
- * Node can load it directly.
8
- */
9
- interface ThemeTokens {
10
- /** Surface color. May be translucent for glass themes. */
11
- bg: string;
12
- /** Opaque stand-in used when `backdrop-filter` is unsupported and for form fields. */
13
- solid: string;
14
- /** Primary text. */
15
- fg: string;
16
- /** Secondary text. */
17
- muted: string;
18
- /** Border and divider color. */
19
- border: string;
20
- /** Box shadow value. */
21
- shadow: string;
22
- /** Accent color for actions, links and focus rings. */
23
- accent: string;
24
- /** Text on top of the accent color. */
25
- accentFg: string;
26
- /** Destructive button background. */
27
- danger: string;
28
- /** Text on top of the destructive background. */
29
- dangerFg: string;
30
- success: string;
31
- error: string;
32
- warning: string;
33
- info: string;
34
- }
35
-
36
- /** Options for registering a custom theme via `ui.defineTheme()`. */
37
- interface CustomThemeDefinition {
38
- radius?: string;
39
- blur?: string;
40
- saturate?: string;
41
- font?: string;
42
- ease?: string;
43
- duration?: string;
44
- borderWidth?: string;
45
- tokens?: {
46
- light?: Partial<ThemeTokens>;
47
- dark?: Partial<ThemeTokens>;
48
- } | Partial<ThemeTokens>;
49
- light?: Partial<ThemeTokens>;
50
- dark?: Partial<ThemeTokens>;
51
- css?: string;
52
- supportedVariants?: readonly string[];
53
- }
54
- /**
55
- * Defines a custom theme. Compiles the tokens to CSS, registers the theme name with glazekit,
56
- * and automatically injects a `<style data-gk-theme="<name>">` element when called in the browser.
57
- *
58
- * @returns The compiled CSS string.
59
- */
60
- declare function defineTheme(name: string, def: CustomThemeDefinition): string;
61
- /** Clears registered custom themes. Used for testing. */
62
- declare function clearCustomThemes(): void;
63
-
64
- /** The unified glazekit API. */
65
- interface Ui {
66
- /** Toast notifications. */
67
- toast: ToastApi;
68
- /** Confirmation dialog with confirm and cancel buttons. */
69
- confirm(options?: DialogOptions): DialogPromise;
70
- /** Informational dialog with a single button. */
71
- alert(options?: DialogOptions): DialogPromise;
72
- /** Dialog with an input. Defaults to a text input. */
73
- prompt(options?: DialogOptions): DialogPromise;
74
- /** Multi-step dialog flow with back navigation. */
75
- steps(steps: readonly DialogOptions[], backLabel?: string): Promise<StepsResult>;
76
- /** Action sheet. */
77
- sheet(options: SheetOptions): DialogPromise;
78
- /** Bottom sheet with snap points. */
79
- bottomSheet(options?: BottomSheetOptions): BottomSheetHandle;
80
- /** Blocking loading overlay. */
81
- loading(options?: LoadingOptions): LoadingHandle;
82
- /** Sets global configuration. Returns the resulting configuration. */
83
- configure(patch: Partial<GlazeConfig>): Readonly<GlazeConfig>;
84
- /** Defines a custom theme with tokens and optional CSS rules. */
85
- defineTheme(name: string, definition: CustomThemeDefinition): string;
86
- /** The underlying toast store. */
87
- readonly toastStore: ToastStore;
88
- }
89
- /** Builds the `ui` object. Called once at module load; touches no DOM. */
90
- declare function createUi(): Ui;
91
- /** The unified API: `ui.toast`, `ui.confirm`, `ui.sheet` and friends. */
92
- declare const ui: Ui;
93
- /** Toast API on its own. Importing only this keeps dialog code out of your bundle. */
94
- declare const toast: ToastApi;
95
-
96
- export { createUi as a, clearCustomThemes as c, defineTheme as d, toast as t, ui as u };
97
- export type { CustomThemeDefinition as C, Ui as U };
@@ -1,97 +0,0 @@
1
- import { T as ToastApi, q as DialogOptions, Y as SheetOptions, d as BottomSheetOptions, B as BottomSheetHandle, H as LoadingOptions, F as LoadingHandle, G as GlazeConfig, b as ToastStore } from './toast-api-TqsztUqW.cjs';
2
- import { a as DialogPromise, S as StepsResult } from './dialog-BDLOS-N9.cjs';
3
-
4
- /**
5
- * Theme definitions. The build script turns each definition into a CSS file; the tests check every
6
- * token pair for WCAG contrast. This file must stay free of TypeScript-only runtime constructs so
7
- * Node can load it directly.
8
- */
9
- interface ThemeTokens {
10
- /** Surface color. May be translucent for glass themes. */
11
- bg: string;
12
- /** Opaque stand-in used when `backdrop-filter` is unsupported and for form fields. */
13
- solid: string;
14
- /** Primary text. */
15
- fg: string;
16
- /** Secondary text. */
17
- muted: string;
18
- /** Border and divider color. */
19
- border: string;
20
- /** Box shadow value. */
21
- shadow: string;
22
- /** Accent color for actions, links and focus rings. */
23
- accent: string;
24
- /** Text on top of the accent color. */
25
- accentFg: string;
26
- /** Destructive button background. */
27
- danger: string;
28
- /** Text on top of the destructive background. */
29
- dangerFg: string;
30
- success: string;
31
- error: string;
32
- warning: string;
33
- info: string;
34
- }
35
-
36
- /** Options for registering a custom theme via `ui.defineTheme()`. */
37
- interface CustomThemeDefinition {
38
- radius?: string;
39
- blur?: string;
40
- saturate?: string;
41
- font?: string;
42
- ease?: string;
43
- duration?: string;
44
- borderWidth?: string;
45
- tokens?: {
46
- light?: Partial<ThemeTokens>;
47
- dark?: Partial<ThemeTokens>;
48
- } | Partial<ThemeTokens>;
49
- light?: Partial<ThemeTokens>;
50
- dark?: Partial<ThemeTokens>;
51
- css?: string;
52
- supportedVariants?: readonly string[];
53
- }
54
- /**
55
- * Defines a custom theme. Compiles the tokens to CSS, registers the theme name with glazekit,
56
- * and automatically injects a `<style data-gk-theme="<name>">` element when called in the browser.
57
- *
58
- * @returns The compiled CSS string.
59
- */
60
- declare function defineTheme(name: string, def: CustomThemeDefinition): string;
61
- /** Clears registered custom themes. Used for testing. */
62
- declare function clearCustomThemes(): void;
63
-
64
- /** The unified glazekit API. */
65
- interface Ui {
66
- /** Toast notifications. */
67
- toast: ToastApi;
68
- /** Confirmation dialog with confirm and cancel buttons. */
69
- confirm(options?: DialogOptions): DialogPromise;
70
- /** Informational dialog with a single button. */
71
- alert(options?: DialogOptions): DialogPromise;
72
- /** Dialog with an input. Defaults to a text input. */
73
- prompt(options?: DialogOptions): DialogPromise;
74
- /** Multi-step dialog flow with back navigation. */
75
- steps(steps: readonly DialogOptions[], backLabel?: string): Promise<StepsResult>;
76
- /** Action sheet. */
77
- sheet(options: SheetOptions): DialogPromise;
78
- /** Bottom sheet with snap points. */
79
- bottomSheet(options?: BottomSheetOptions): BottomSheetHandle;
80
- /** Blocking loading overlay. */
81
- loading(options?: LoadingOptions): LoadingHandle;
82
- /** Sets global configuration. Returns the resulting configuration. */
83
- configure(patch: Partial<GlazeConfig>): Readonly<GlazeConfig>;
84
- /** Defines a custom theme with tokens and optional CSS rules. */
85
- defineTheme(name: string, definition: CustomThemeDefinition): string;
86
- /** The underlying toast store. */
87
- readonly toastStore: ToastStore;
88
- }
89
- /** Builds the `ui` object. Called once at module load; touches no DOM. */
90
- declare function createUi(): Ui;
91
- /** The unified API: `ui.toast`, `ui.confirm`, `ui.sheet` and friends. */
92
- declare const ui: Ui;
93
- /** Toast API on its own. Importing only this keeps dialog code out of your bundle. */
94
- declare const toast: ToastApi;
95
-
96
- export { createUi as a, clearCustomThemes as c, defineTheme as d, toast as t, ui as u };
97
- export type { CustomThemeDefinition as C, Ui as U };