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
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "toastory",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Complete UI feedback toolkit: toast notifications, confirm / prompt / alert dialogs, sheets and loading overlays with frosted glass design.",
5
5
  "license": "MIT",
6
- "author": "TA Shanto <shanto@glazekit.dev>",
7
- "homepage": "https://glazekit.dev",
6
+ "author": "TA Shanto <shanto@toastory.tashanto.com>",
7
+ "homepage": "https://toastory.tashanto.com",
8
8
  "bugs": {
9
- "url": "https://github.com/iamtashanto/glazekit/issues"
9
+ "url": "https://github.com/iamtashanto/toastory/issues"
10
10
  },
11
11
  "type": "module",
12
12
  "sideEffects": [
@@ -36,7 +36,7 @@
36
36
  ],
37
37
  "repository": {
38
38
  "type": "git",
39
- "url": "git+https://github.com/iamtashanto/glazekit.git"
39
+ "url": "git+https://github.com/iamtashanto/toastory.git"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -156,7 +156,7 @@
156
156
  "build": "tsup && node scripts/build-themes.mjs",
157
157
  "size": "node scripts/size.mjs",
158
158
  "readme:check": "node scripts/check-readme.mjs",
159
- "check": "npm run typecheck && npm run lint && npm run test && npm run contrast && npm run build && npm run size && npm run readme:check",
159
+ "check": "npm run typecheck && npm run lint && npm run build && npm run test && npm run contrast && npm run size && npm run readme:check",
160
160
  "check:all": "npm run check && npm run test:e2e",
161
161
  "changeset": "changeset",
162
162
  "release": "npm run check && changeset publish"
@@ -1,56 +0,0 @@
1
- import { s as DialogResult, n as DialogHandle, q as DialogOptions, L as Listener, am as Unsubscribe, y as DismissReason } from './toast-api-TqsztUqW.cjs';
2
-
3
- /** Observable view of a running dialog. */
4
- interface DialogState {
5
- /** Current merged options. */
6
- options: DialogOptions;
7
- /** Which button is busy. */
8
- loading: 'confirm' | 'deny' | null;
9
- /** Inline error. */
10
- error: string | undefined;
11
- /** `true` until the dialog resolves. */
12
- open: boolean;
13
- /** Increments on every change. */
14
- revision: number;
15
- }
16
- /** Drives validation, async hooks, timer and result of one dialog. No DOM. */
17
- interface DialogController {
18
- /** Control surface shared with user callbacks. */
19
- readonly handle: DialogHandle;
20
- /** Current state. */
21
- getState(): DialogState;
22
- /** Subscribes to state changes. */
23
- subscribe(listener: Listener): Unsubscribe;
24
- /** Renderer supplies the function that reads the current input value. */
25
- setValueReader(reader: () => unknown): void;
26
- /** Renderer calls this once mounted. Starts the timer and fires `didOpen`. */
27
- opened(): void;
28
- /** Runs confirm or deny. Resolves after hooks have run. */
29
- submit(kind: 'confirm' | 'deny'): Promise<void>;
30
- /** Dismisses when allowed. Returns whether the dialog closed. */
31
- dismiss(reason: DismissReason): boolean;
32
- }
33
- /** Creates the controller for a dialog. */
34
- declare function createDialogController(initial: DialogOptions): DialogController;
35
- /** Promise returned by dialog helpers, with the live handle attached. */
36
- type DialogPromise<R = DialogResult> = Promise<R> & {
37
- handle: DialogHandle;
38
- };
39
- /** Result of `ui.steps`. */
40
- interface StepsResult extends DialogResult {
41
- /** Confirmed values of every completed step. */
42
- values: unknown[];
43
- /** Zero based index of the step the flow ended on. */
44
- step: number;
45
- }
46
- /**
47
- * Runs dialogs one after another. From the second step on, the deny button becomes a "back"
48
- * button using `backLabel`, and activating it returns to the previous step.
49
- * @param steps Options of each step.
50
- * @param open Opens one dialog.
51
- * @param backLabel Label for the back button.
52
- */
53
- declare function runSteps(steps: readonly DialogOptions[], open: (options: DialogOptions) => Promise<DialogResult>, backLabel?: string): Promise<StepsResult>;
54
-
55
- export { createDialogController as c, runSteps as r };
56
- export type { DialogController as D, StepsResult as S, DialogPromise as a };
@@ -1,56 +0,0 @@
1
- import { s as DialogResult, n as DialogHandle, q as DialogOptions, L as Listener, am as Unsubscribe, y as DismissReason } from './toast-api-DksXya0f.cjs';
2
-
3
- /** Observable view of a running dialog. */
4
- interface DialogState {
5
- /** Current merged options. */
6
- options: DialogOptions;
7
- /** Which button is busy. */
8
- loading: 'confirm' | 'deny' | null;
9
- /** Inline error. */
10
- error: string | undefined;
11
- /** `true` until the dialog resolves. */
12
- open: boolean;
13
- /** Increments on every change. */
14
- revision: number;
15
- }
16
- /** Drives validation, async hooks, timer and result of one dialog. No DOM. */
17
- interface DialogController {
18
- /** Control surface shared with user callbacks. */
19
- readonly handle: DialogHandle;
20
- /** Current state. */
21
- getState(): DialogState;
22
- /** Subscribes to state changes. */
23
- subscribe(listener: Listener): Unsubscribe;
24
- /** Renderer supplies the function that reads the current input value. */
25
- setValueReader(reader: () => unknown): void;
26
- /** Renderer calls this once mounted. Starts the timer and fires `didOpen`. */
27
- opened(): void;
28
- /** Runs confirm or deny. Resolves after hooks have run. */
29
- submit(kind: 'confirm' | 'deny'): Promise<void>;
30
- /** Dismisses when allowed. Returns whether the dialog closed. */
31
- dismiss(reason: DismissReason): boolean;
32
- }
33
- /** Creates the controller for a dialog. */
34
- declare function createDialogController(initial: DialogOptions): DialogController;
35
- /** Promise returned by dialog helpers, with the live handle attached. */
36
- type DialogPromise<R = DialogResult> = Promise<R> & {
37
- handle: DialogHandle;
38
- };
39
- /** Result of `ui.steps`. */
40
- interface StepsResult extends DialogResult {
41
- /** Confirmed values of every completed step. */
42
- values: unknown[];
43
- /** Zero based index of the step the flow ended on. */
44
- step: number;
45
- }
46
- /**
47
- * Runs dialogs one after another. From the second step on, the deny button becomes a "back"
48
- * button using `backLabel`, and activating it returns to the previous step.
49
- * @param steps Options of each step.
50
- * @param openOrManager Opens one dialog, or a DialogManager instance.
51
- * @param backLabel Label for the back button.
52
- */
53
- declare function runSteps(steps: readonly DialogOptions[], open: (options: DialogOptions) => Promise<DialogResult>, backLabel?: string): Promise<StepsResult>;
54
-
55
- export { createDialogController as c, runSteps as r };
56
- export type { DialogController as D, StepsResult as S, DialogPromise as a };
@@ -1,56 +0,0 @@
1
- import { s as DialogResult, n as DialogHandle, q as DialogOptions, L as Listener, am as Unsubscribe, y as DismissReason } from './toast-api-C3NL4zla.cjs';
2
-
3
- /** Observable view of a running dialog. */
4
- interface DialogState {
5
- /** Current merged options. */
6
- options: DialogOptions;
7
- /** Which button is busy. */
8
- loading: 'confirm' | 'deny' | null;
9
- /** Inline error. */
10
- error: string | undefined;
11
- /** `true` until the dialog resolves. */
12
- open: boolean;
13
- /** Increments on every change. */
14
- revision: number;
15
- }
16
- /** Drives validation, async hooks, timer and result of one dialog. No DOM. */
17
- interface DialogController {
18
- /** Control surface shared with user callbacks. */
19
- readonly handle: DialogHandle;
20
- /** Current state. */
21
- getState(): DialogState;
22
- /** Subscribes to state changes. */
23
- subscribe(listener: Listener): Unsubscribe;
24
- /** Renderer supplies the function that reads the current input value. */
25
- setValueReader(reader: () => unknown): void;
26
- /** Renderer calls this once mounted. Starts the timer and fires `didOpen`. */
27
- opened(): void;
28
- /** Runs confirm or deny. Resolves after hooks have run. */
29
- submit(kind: 'confirm' | 'deny'): Promise<void>;
30
- /** Dismisses when allowed. Returns whether the dialog closed. */
31
- dismiss(reason: DismissReason): boolean;
32
- }
33
- /** Creates the controller for a dialog. */
34
- declare function createDialogController(initial: DialogOptions): DialogController;
35
- /** Promise returned by dialog helpers, with the live handle attached. */
36
- type DialogPromise<R = DialogResult> = Promise<R> & {
37
- handle: DialogHandle;
38
- };
39
- /** Result of `ui.steps`. */
40
- interface StepsResult extends DialogResult {
41
- /** Confirmed values of every completed step. */
42
- values: unknown[];
43
- /** Zero based index of the step the flow ended on. */
44
- step: number;
45
- }
46
- /**
47
- * Runs dialogs one after another. From the second step on, the deny button becomes a "back"
48
- * button using `backLabel`, and activating it returns to the previous step.
49
- * @param steps Options of each step.
50
- * @param openOrManager Opens one dialog, or a DialogManager instance.
51
- * @param backLabel Label for the back button.
52
- */
53
- declare function runSteps(steps: readonly DialogOptions[], open: (options: DialogOptions) => Promise<DialogResult>, backLabel?: string): Promise<StepsResult>;
54
-
55
- export { createDialogController as c, runSteps as r };
56
- export type { DialogController as D, StepsResult as S, DialogPromise as a };
@@ -1,56 +0,0 @@
1
- import { s as DialogResult, n as DialogHandle, q as DialogOptions, L as Listener, am as Unsubscribe, y as DismissReason } from './toast-api-TqsztUqW.cjs';
2
-
3
- /** Observable view of a running dialog. */
4
- interface DialogState {
5
- /** Current merged options. */
6
- options: DialogOptions;
7
- /** Which button is busy. */
8
- loading: 'confirm' | 'deny' | null;
9
- /** Inline error. */
10
- error: string | undefined;
11
- /** `true` until the dialog resolves. */
12
- open: boolean;
13
- /** Increments on every change. */
14
- revision: number;
15
- }
16
- /** Drives validation, async hooks, timer and result of one dialog. No DOM. */
17
- interface DialogController {
18
- /** Control surface shared with user callbacks. */
19
- readonly handle: DialogHandle;
20
- /** Current state. */
21
- getState(): DialogState;
22
- /** Subscribes to state changes. */
23
- subscribe(listener: Listener): Unsubscribe;
24
- /** Renderer supplies the function that reads the current input value. */
25
- setValueReader(reader: () => unknown): void;
26
- /** Renderer calls this once mounted. Starts the timer and fires `didOpen`. */
27
- opened(): void;
28
- /** Runs confirm or deny. Resolves after hooks have run. */
29
- submit(kind: 'confirm' | 'deny'): Promise<void>;
30
- /** Dismisses when allowed. Returns whether the dialog closed. */
31
- dismiss(reason: DismissReason): boolean;
32
- }
33
- /** Creates the controller for a dialog. */
34
- declare function createDialogController(initial: DialogOptions): DialogController;
35
- /** Promise returned by dialog helpers, with the live handle attached. */
36
- type DialogPromise<R = DialogResult> = Promise<R> & {
37
- handle: DialogHandle;
38
- };
39
- /** Result of `ui.steps`. */
40
- interface StepsResult extends DialogResult {
41
- /** Confirmed values of every completed step. */
42
- values: unknown[];
43
- /** Zero based index of the step the flow ended on. */
44
- step: number;
45
- }
46
- /**
47
- * Runs dialogs one after another. From the second step on, the deny button becomes a "back"
48
- * button using `backLabel`, and activating it returns to the previous step.
49
- * @param steps Options of each step.
50
- * @param openOrManager Opens one dialog, or a DialogManager instance.
51
- * @param backLabel Label for the back button.
52
- */
53
- declare function runSteps(steps: readonly DialogOptions[], open: (options: DialogOptions) => Promise<DialogResult>, backLabel?: string): Promise<StepsResult>;
54
-
55
- export { createDialogController as c, runSteps as r };
56
- export type { DialogController as D, StepsResult as S, DialogPromise as a };
@@ -1,56 +0,0 @@
1
- import { s as DialogResult, n as DialogHandle, q as DialogOptions, L as Listener, am as Unsubscribe, y as DismissReason } from './toast-api-TqsztUqW.js';
2
-
3
- /** Observable view of a running dialog. */
4
- interface DialogState {
5
- /** Current merged options. */
6
- options: DialogOptions;
7
- /** Which button is busy. */
8
- loading: 'confirm' | 'deny' | null;
9
- /** Inline error. */
10
- error: string | undefined;
11
- /** `true` until the dialog resolves. */
12
- open: boolean;
13
- /** Increments on every change. */
14
- revision: number;
15
- }
16
- /** Drives validation, async hooks, timer and result of one dialog. No DOM. */
17
- interface DialogController {
18
- /** Control surface shared with user callbacks. */
19
- readonly handle: DialogHandle;
20
- /** Current state. */
21
- getState(): DialogState;
22
- /** Subscribes to state changes. */
23
- subscribe(listener: Listener): Unsubscribe;
24
- /** Renderer supplies the function that reads the current input value. */
25
- setValueReader(reader: () => unknown): void;
26
- /** Renderer calls this once mounted. Starts the timer and fires `didOpen`. */
27
- opened(): void;
28
- /** Runs confirm or deny. Resolves after hooks have run. */
29
- submit(kind: 'confirm' | 'deny'): Promise<void>;
30
- /** Dismisses when allowed. Returns whether the dialog closed. */
31
- dismiss(reason: DismissReason): boolean;
32
- }
33
- /** Creates the controller for a dialog. */
34
- declare function createDialogController(initial: DialogOptions): DialogController;
35
- /** Promise returned by dialog helpers, with the live handle attached. */
36
- type DialogPromise<R = DialogResult> = Promise<R> & {
37
- handle: DialogHandle;
38
- };
39
- /** Result of `ui.steps`. */
40
- interface StepsResult extends DialogResult {
41
- /** Confirmed values of every completed step. */
42
- values: unknown[];
43
- /** Zero based index of the step the flow ended on. */
44
- step: number;
45
- }
46
- /**
47
- * Runs dialogs one after another. From the second step on, the deny button becomes a "back"
48
- * button using `backLabel`, and activating it returns to the previous step.
49
- * @param steps Options of each step.
50
- * @param openOrManager Opens one dialog, or a DialogManager instance.
51
- * @param backLabel Label for the back button.
52
- */
53
- declare function runSteps(steps: readonly DialogOptions[], open: (options: DialogOptions) => Promise<DialogResult>, backLabel?: string): Promise<StepsResult>;
54
-
55
- export { createDialogController as c, runSteps as r };
56
- export type { DialogController as D, StepsResult as S, DialogPromise as a };
@@ -1,56 +0,0 @@
1
- import { s as DialogResult, n as DialogHandle, q as DialogOptions, L as Listener, am as Unsubscribe, y as DismissReason } from './toast-api-TqsztUqW.js';
2
-
3
- /** Observable view of a running dialog. */
4
- interface DialogState {
5
- /** Current merged options. */
6
- options: DialogOptions;
7
- /** Which button is busy. */
8
- loading: 'confirm' | 'deny' | null;
9
- /** Inline error. */
10
- error: string | undefined;
11
- /** `true` until the dialog resolves. */
12
- open: boolean;
13
- /** Increments on every change. */
14
- revision: number;
15
- }
16
- /** Drives validation, async hooks, timer and result of one dialog. No DOM. */
17
- interface DialogController {
18
- /** Control surface shared with user callbacks. */
19
- readonly handle: DialogHandle;
20
- /** Current state. */
21
- getState(): DialogState;
22
- /** Subscribes to state changes. */
23
- subscribe(listener: Listener): Unsubscribe;
24
- /** Renderer supplies the function that reads the current input value. */
25
- setValueReader(reader: () => unknown): void;
26
- /** Renderer calls this once mounted. Starts the timer and fires `didOpen`. */
27
- opened(): void;
28
- /** Runs confirm or deny. Resolves after hooks have run. */
29
- submit(kind: 'confirm' | 'deny'): Promise<void>;
30
- /** Dismisses when allowed. Returns whether the dialog closed. */
31
- dismiss(reason: DismissReason): boolean;
32
- }
33
- /** Creates the controller for a dialog. */
34
- declare function createDialogController(initial: DialogOptions): DialogController;
35
- /** Promise returned by dialog helpers, with the live handle attached. */
36
- type DialogPromise<R = DialogResult> = Promise<R> & {
37
- handle: DialogHandle;
38
- };
39
- /** Result of `ui.steps`. */
40
- interface StepsResult extends DialogResult {
41
- /** Confirmed values of every completed step. */
42
- values: unknown[];
43
- /** Zero based index of the step the flow ended on. */
44
- step: number;
45
- }
46
- /**
47
- * Runs dialogs one after another. From the second step on, the deny button becomes a "back"
48
- * button using `backLabel`, and activating it returns to the previous step.
49
- * @param steps Options of each step.
50
- * @param open Opens one dialog.
51
- * @param backLabel Label for the back button.
52
- */
53
- declare function runSteps(steps: readonly DialogOptions[], open: (options: DialogOptions) => Promise<DialogResult>, backLabel?: string): Promise<StepsResult>;
54
-
55
- export { createDialogController as c, runSteps as r };
56
- export type { DialogController as D, StepsResult as S, DialogPromise as a };