@nan0web/ui 1.5.2 → 1.7.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.
Files changed (53) hide show
  1. package/README.md +36 -1
  2. package/package.json +89 -84
  3. package/src/ArchitectureMap/ArchitectureMap.js +111 -0
  4. package/src/ArchitectureMap/index.js +1 -0
  5. package/src/InterfaceTemplate/InterfaceTemplate.js +95 -0
  6. package/src/InterfaceTemplate/index.js +1 -0
  7. package/src/README.md.js +42 -1
  8. package/src/core/GeneratorRunner.js +213 -0
  9. package/src/core/Intent.js +168 -0
  10. package/src/core/IntentErrorModel.js +94 -0
  11. package/src/core/MaskHandler.js +125 -0
  12. package/src/core/index.js +7 -0
  13. package/src/domain/SandboxModel.js +193 -0
  14. package/src/domain/ShowcaseAppModel.js +88 -0
  15. package/src/domain/components/AutocompleteModel.js +58 -0
  16. package/src/domain/components/BreadcrumbModel.js +265 -0
  17. package/src/domain/components/ButtonModel.js +92 -0
  18. package/src/domain/components/ConfirmModel.js +64 -0
  19. package/src/domain/components/InputModel.js +142 -0
  20. package/src/domain/components/SelectModel.js +59 -0
  21. package/src/domain/components/SpinnerModel.js +58 -0
  22. package/src/domain/components/TableModel.js +60 -0
  23. package/src/domain/components/ToastModel.js +77 -0
  24. package/src/domain/components/TreeModel.js +53 -0
  25. package/src/domain/components/index.js +11 -0
  26. package/src/domain/index.js +16 -0
  27. package/src/format.js +21 -0
  28. package/src/index.js +6 -0
  29. package/types/ArchitectureMap/ArchitectureMap.d.ts +70 -0
  30. package/types/ArchitectureMap/index.d.ts +1 -0
  31. package/types/InterfaceTemplate/InterfaceTemplate.d.ts +67 -0
  32. package/types/InterfaceTemplate/index.d.ts +1 -0
  33. package/types/core/GeneratorRunner.d.ts +51 -0
  34. package/types/core/Intent.d.ts +227 -85
  35. package/types/core/IntentErrorModel.d.ts +55 -0
  36. package/types/core/MaskHandler.d.ts +33 -0
  37. package/types/core/index.d.ts +4 -0
  38. package/types/domain/SandboxModel.d.ts +59 -0
  39. package/types/domain/ShowcaseAppModel.d.ts +62 -0
  40. package/types/domain/components/AutocompleteModel.d.ts +47 -0
  41. package/types/domain/components/BreadcrumbModel.d.ts +164 -0
  42. package/types/domain/components/ButtonModel.d.ts +81 -0
  43. package/types/domain/components/ConfirmModel.d.ts +54 -0
  44. package/types/domain/components/InputModel.d.ts +121 -0
  45. package/types/domain/components/SelectModel.d.ts +48 -0
  46. package/types/domain/components/SpinnerModel.d.ts +45 -0
  47. package/types/domain/components/TableModel.d.ts +44 -0
  48. package/types/domain/components/ToastModel.d.ts +62 -0
  49. package/types/domain/components/TreeModel.d.ts +49 -0
  50. package/types/domain/components/index.d.ts +10 -0
  51. package/types/domain/index.d.ts +3 -0
  52. package/types/format.d.ts +5 -0
  53. package/types/index.d.ts +4 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @typedef {Object} AutocompleteData
3
+ * @property {string} [content]
4
+ * @property {string[]} [options]
5
+ */
6
+ /**
7
+ * Model-as-Schema for Autocomplete component.
8
+ * Represents a text input with search suggestions.
9
+ */
10
+ export class AutocompleteModel extends Model {
11
+ static content: {
12
+ help: string;
13
+ default: string;
14
+ type: string;
15
+ };
16
+ static options: {
17
+ help: string;
18
+ default: never[];
19
+ type: string;
20
+ };
21
+ /**
22
+ * @param {AutocompleteData | any} [data]
23
+ */
24
+ constructor(data?: AutocompleteData | any);
25
+ /** @type {string|undefined} */ content: string | undefined;
26
+ /** @type {string[]|undefined} */ options: string[] | undefined;
27
+ run(): AsyncGenerator<{
28
+ type: string;
29
+ field: string;
30
+ schema: {
31
+ help: string;
32
+ options: string[] | undefined;
33
+ };
34
+ component: string;
35
+ model: any;
36
+ }, {
37
+ type: string;
38
+ data: {
39
+ selected: string | undefined;
40
+ };
41
+ }, unknown>;
42
+ }
43
+ export type AutocompleteData = {
44
+ content?: string | undefined;
45
+ options?: string[] | undefined;
46
+ };
47
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,164 @@
1
+ /**
2
+ * @typedef {Object} BreadcrumbItem
3
+ * @property {string} label - Human-readable display name (e.g. "Sandbox", "Кнопка")
4
+ * @property {string} path - URL-safe segment (e.g. "sandbox", "button")
5
+ */
6
+ /**
7
+ * @typedef {Object} BreadcrumbData
8
+ * @property {BreadcrumbItem[]} [items]
9
+ * @property {string} [separator]
10
+ */
11
+ /**
12
+ * Model-as-Schema for Breadcrumb navigation.
13
+ *
14
+ * Each breadcrumb item has a `label` (display) and a `path` (URL segment).
15
+ * The full path is the join of all segments, mirroring both:
16
+ * - Web URL: /sandbox/button/export
17
+ * - DBFS URI: sandbox/button/export/index (relative to db.root)
18
+ * - Data path: {db.root}/sandbox/button/export/index.yaml
19
+ * - CLI nav: 🏖 Sandbox › Button › Export
20
+ *
21
+ * This is the universal "where am I?" model for any OLMUI application.
22
+ *
23
+ * ESC/Back = pop() one item. Empty stack = app exit.
24
+ * Ctrl+C = always exit (adapter responsibility).
25
+ */
26
+ export class BreadcrumbModel extends Model {
27
+ static items: {
28
+ help: string;
29
+ type: string;
30
+ default: never[];
31
+ };
32
+ static separator: {
33
+ help: string;
34
+ default: string;
35
+ type: string;
36
+ };
37
+ /**
38
+ * Reconstruct a BreadcrumbModel from a URL path string.
39
+ *
40
+ * @param {string} urlPath - e.g. "/sandbox/button" or "sandbox/button"
41
+ * @param {Record<string,string>} [labelMap={}] - Optional map of path→label for display names.
42
+ * @returns {BreadcrumbModel}
43
+ */
44
+ static fromPath(urlPath: string, labelMap?: Record<string, string>): BreadcrumbModel;
45
+ /**
46
+ * Create a URL-safe slug from any label.
47
+ * Handles Unicode (Cyrillic, etc.) by lowercasing and replacing spaces/special chars.
48
+ *
49
+ * @param {string} label
50
+ * @returns {string}
51
+ */
52
+ static slugify(label: string): string;
53
+ /**
54
+ * @param {BreadcrumbData | any} [data]
55
+ */
56
+ constructor(data?: BreadcrumbData | any);
57
+ /** @type {BreadcrumbItem[]} */ items: BreadcrumbItem[];
58
+ /** @type {string} */ separator: string;
59
+ /**
60
+ * Push a new level onto the navigation stack.
61
+ *
62
+ * @param {string} label - Display label (e.g. "Button", "Кнопка")
63
+ * @param {string} [path] - URL segment. Auto-slugified from label if omitted.
64
+ * @returns {this}
65
+ */
66
+ push(label: string, path?: string): this;
67
+ /**
68
+ * Pop the last level from the navigation stack.
69
+ *
70
+ * @returns {BreadcrumbItem|undefined} The removed item, or undefined if stack was empty.
71
+ */
72
+ pop(): BreadcrumbItem | undefined;
73
+ /**
74
+ * Whether the user can navigate back (stack has > 0 items after pop).
75
+ *
76
+ * @returns {boolean}
77
+ */
78
+ canGoBack(): boolean;
79
+ /**
80
+ * Navigate to a specific depth by truncating the stack.
81
+ *
82
+ * @param {number} depth - Target depth (0 = root only).
83
+ * @returns {this}
84
+ */
85
+ navigateTo(depth: number): this;
86
+ /**
87
+ * Full URL-style path: `/sandbox/button/export`
88
+ * @returns {string}
89
+ */
90
+ get path(): string;
91
+ /**
92
+ * Just the path segments array: `['sandbox', 'button', 'export']`
93
+ * @returns {string[]}
94
+ */
95
+ get segments(): string[];
96
+ /**
97
+ * Just the display labels: `['Sandbox', 'Button', 'Export']`
98
+ * @returns {string[]}
99
+ */
100
+ get labels(): string[];
101
+ /**
102
+ * Current (last) breadcrumb item.
103
+ * @returns {BreadcrumbItem|undefined}
104
+ */
105
+ get current(): BreadcrumbItem | undefined;
106
+ /**
107
+ * Current navigation depth (0 = no items).
108
+ * @returns {number}
109
+ */
110
+ get depth(): number;
111
+ /**
112
+ * Serialize to URL query param value: `sandbox/button/export`
113
+ * @returns {string}
114
+ */
115
+ toURL(): string;
116
+ /**
117
+ * DBFS document URI — the key you pass to `db.fetch()` or `db.get()`.
118
+ * Relative to `db.root`, without extension (DBFS resolves `.yaml`/`.json` automatically).
119
+ *
120
+ * @example
121
+ * nav.push('sandbox').push('button')
122
+ * nav.toURI() // → 'sandbox/button/index'
123
+ * db.fetch(nav.toURI()) // ← DBFS resolves to {root}/sandbox/button/index.yaml
124
+ *
125
+ * @param {string} [leaf='index'] - Document name without extension.
126
+ * @returns {string}
127
+ */
128
+ toURI(leaf?: string): string;
129
+ /**
130
+ * Full filesystem path relative to db.root: `sandbox/button/export/index.yaml`
131
+ * This is what DBFS resolves to on disk: `{cwd}/{root}/{toDataPath()}`.
132
+ *
133
+ * @param {string} [filename='index.yaml'] - Leaf filename with extension.
134
+ * @returns {string}
135
+ */
136
+ toDataPath(filename?: string): string;
137
+ /**
138
+ * Yields a log intent with the current breadcrumb path.
139
+ * This is a "display-only" run — it shows the navigation state.
140
+ */
141
+ run(): AsyncGenerator<any, {
142
+ type: string;
143
+ data: {
144
+ path: string;
145
+ items: BreadcrumbItem[];
146
+ depth: number;
147
+ };
148
+ }, unknown>;
149
+ }
150
+ export type BreadcrumbItem = {
151
+ /**
152
+ * - Human-readable display name (e.g. "Sandbox", "Кнопка")
153
+ */
154
+ label: string;
155
+ /**
156
+ * - URL-safe segment (e.g. "sandbox", "button")
157
+ */
158
+ path: string;
159
+ };
160
+ export type BreadcrumbData = {
161
+ items?: BreadcrumbItem[] | undefined;
162
+ separator?: string | undefined;
163
+ };
164
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,81 @@
1
+ /**
2
+ * @typedef {'primary'|'secondary'|'info'|'ok'|'warn'|'err'|'ghost'} ButtonVariant
3
+ * @typedef {'sm'|'md'|'lg'} ButtonSize
4
+ * @typedef {Object} ButtonData
5
+ * @property {string} [content]
6
+ * @property {ButtonVariant} [variant]
7
+ * @property {ButtonSize} [size]
8
+ * @property {boolean} [outline]
9
+ * @property {boolean} [disabled]
10
+ * @property {boolean} [loading]
11
+ */
12
+ /**
13
+ * Model-as-Schema for Button component.
14
+ * Represents the intention and state of a Button interaction.
15
+ * Used exclusively for schema definition and editor validation.
16
+ */
17
+ export class ButtonModel extends Model {
18
+ static content: {
19
+ help: string;
20
+ default: string;
21
+ type: string;
22
+ };
23
+ static variant: {
24
+ help: string;
25
+ default: string;
26
+ options: string[];
27
+ };
28
+ static size: {
29
+ help: string;
30
+ default: string;
31
+ options: string[];
32
+ };
33
+ static outline: {
34
+ help: string;
35
+ default: boolean;
36
+ type: string;
37
+ };
38
+ static disabled: {
39
+ help: string;
40
+ default: boolean;
41
+ type: string;
42
+ };
43
+ static loading: {
44
+ help: string;
45
+ default: boolean;
46
+ type: string;
47
+ };
48
+ /**
49
+ * @param {ButtonData | any} [data]
50
+ */
51
+ constructor(data?: ButtonData | any);
52
+ /** @type {string|undefined} */ content: string | undefined;
53
+ /** @type {ButtonVariant|undefined} */ variant: ButtonVariant | undefined;
54
+ /** @type {ButtonSize|undefined} */ size: ButtonSize | undefined;
55
+ /** @type {boolean|undefined} */ outline: boolean | undefined;
56
+ /** @type {boolean|undefined} */ disabled: boolean | undefined;
57
+ /** @type {boolean|undefined} */ loading: boolean | undefined;
58
+ run(): AsyncGenerator<{
59
+ type: string;
60
+ field: string;
61
+ schema: {
62
+ help: string;
63
+ };
64
+ component: string;
65
+ model: any;
66
+ }, {
67
+ type: string;
68
+ data: any;
69
+ }, unknown>;
70
+ }
71
+ export type ButtonVariant = "primary" | "secondary" | "info" | "ok" | "warn" | "err" | "ghost";
72
+ export type ButtonSize = "sm" | "md" | "lg";
73
+ export type ButtonData = {
74
+ content?: string | undefined;
75
+ variant?: ButtonVariant | undefined;
76
+ size?: ButtonSize | undefined;
77
+ outline?: boolean | undefined;
78
+ disabled?: boolean | undefined;
79
+ loading?: boolean | undefined;
80
+ };
81
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @typedef {Object} ConfirmData
3
+ * @property {string} [message]
4
+ * @property {string} [confirmText]
5
+ * @property {string} [cancelText]
6
+ */
7
+ /**
8
+ * Model-as-Schema for Confirm component.
9
+ */
10
+ export class ConfirmModel extends Model {
11
+ static message: {
12
+ help: string;
13
+ default: string;
14
+ type: string;
15
+ };
16
+ static confirmText: {
17
+ help: string;
18
+ default: string;
19
+ type: string;
20
+ };
21
+ static cancelText: {
22
+ help: string;
23
+ default: string;
24
+ type: string;
25
+ };
26
+ /**
27
+ * @param {ConfirmData | any} [data]
28
+ */
29
+ constructor(data?: ConfirmData | any);
30
+ /** @type {string|undefined} */ message: string | undefined;
31
+ /** @type {string|undefined} */ confirmText: string | undefined;
32
+ /** @type {string|undefined} */ cancelText: string | undefined;
33
+ run(): AsyncGenerator<{
34
+ type: string;
35
+ field: string;
36
+ schema: {
37
+ help: string | undefined;
38
+ type: string;
39
+ };
40
+ component: string;
41
+ model: any;
42
+ }, {
43
+ type: string;
44
+ data: {
45
+ confirmed: boolean;
46
+ };
47
+ }, unknown>;
48
+ }
49
+ export type ConfirmData = {
50
+ message?: string | undefined;
51
+ confirmText?: string | undefined;
52
+ cancelText?: string | undefined;
53
+ };
54
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,121 @@
1
+ /**
2
+ * @typedef {'text'|'email'|'password'|'number'|'tel'|'url'|'date'} InputType
3
+ * @typedef {Object} InputData
4
+ * @property {InputType} [type]
5
+ * @property {string} [label]
6
+ * @property {string} [placeholder]
7
+ * @property {boolean} [required]
8
+ * @property {string} [pattern]
9
+ * @property {string} [min]
10
+ * @property {string} [max]
11
+ * @property {string} [step]
12
+ * @property {string} [hint]
13
+ * @property {boolean} [disabled]
14
+ * @property {string} [content]
15
+ */
16
+ /**
17
+ * Model-as-Schema for Input component.
18
+ * Used exclusively for schema definition, validation, and editor reflection.
19
+ */
20
+ export class InputModel extends Model {
21
+ static type: {
22
+ help: string;
23
+ default: string;
24
+ options: string[];
25
+ };
26
+ static label: {
27
+ help: string;
28
+ default: string;
29
+ type: string;
30
+ };
31
+ static placeholder: {
32
+ help: string;
33
+ default: string;
34
+ type: string;
35
+ };
36
+ static required: {
37
+ help: string;
38
+ default: boolean;
39
+ type: string;
40
+ };
41
+ static pattern: {
42
+ help: string;
43
+ default: string;
44
+ type: string;
45
+ };
46
+ static min: {
47
+ help: string;
48
+ default: string;
49
+ type: string;
50
+ };
51
+ static max: {
52
+ help: string;
53
+ default: string;
54
+ type: string;
55
+ };
56
+ static step: {
57
+ help: string;
58
+ default: string;
59
+ type: string;
60
+ };
61
+ static hint: {
62
+ help: string;
63
+ default: string;
64
+ type: string;
65
+ };
66
+ static disabled: {
67
+ help: string;
68
+ default: boolean;
69
+ type: string;
70
+ };
71
+ static content: {
72
+ help: string;
73
+ default: string;
74
+ type: string;
75
+ };
76
+ /**
77
+ * @param {InputData | any} [data]
78
+ */
79
+ constructor(data?: InputData | any);
80
+ /** @type {InputType|undefined} */ type: InputType | undefined;
81
+ /** @type {string|undefined} */ label: string | undefined;
82
+ /** @type {string|undefined} */ placeholder: string | undefined;
83
+ /** @type {boolean|undefined} */ required: boolean | undefined;
84
+ /** @type {string|undefined} */ pattern: string | undefined;
85
+ /** @type {string|undefined} */ min: string | undefined;
86
+ /** @type {string|undefined} */ max: string | undefined;
87
+ /** @type {string|undefined} */ step: string | undefined;
88
+ /** @type {string|undefined} */ hint: string | undefined;
89
+ /** @type {boolean|undefined} */ disabled: boolean | undefined;
90
+ /** @type {string|undefined} */ content: string | undefined;
91
+ run(): AsyncGenerator<{
92
+ type: string;
93
+ field: string;
94
+ schema: {
95
+ help: string;
96
+ validate: (val: any) => true | "This field is required" | "Invalid format";
97
+ };
98
+ component: string;
99
+ model: any;
100
+ }, {
101
+ type: string;
102
+ data: {
103
+ value: string | undefined;
104
+ };
105
+ }, unknown>;
106
+ }
107
+ export type InputType = "text" | "email" | "password" | "number" | "tel" | "url" | "date";
108
+ export type InputData = {
109
+ type?: InputType | undefined;
110
+ label?: string | undefined;
111
+ placeholder?: string | undefined;
112
+ required?: boolean | undefined;
113
+ pattern?: string | undefined;
114
+ min?: string | undefined;
115
+ max?: string | undefined;
116
+ step?: string | undefined;
117
+ hint?: string | undefined;
118
+ disabled?: boolean | undefined;
119
+ content?: string | undefined;
120
+ };
121
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,48 @@
1
+ /**
2
+ * @typedef {Object} SelectData
3
+ * @property {string} [content]
4
+ * @property {string[]} [options]
5
+ */
6
+ /**
7
+ * Model-as-Schema for Select component.
8
+ * Represents a dropdown choice selection.
9
+ */
10
+ export class SelectModel extends Model {
11
+ static content: {
12
+ help: string;
13
+ default: string;
14
+ type: string;
15
+ };
16
+ static options: {
17
+ help: string;
18
+ default: string[];
19
+ type: string;
20
+ };
21
+ /**
22
+ * @param {SelectData | any} [data]
23
+ */
24
+ constructor(data?: SelectData | any);
25
+ /** @type {string|undefined} */ content: string | undefined;
26
+ /** @type {string[]|undefined} */ options: string[] | undefined;
27
+ run(): AsyncGenerator<{
28
+ type: string;
29
+ field: string;
30
+ schema: {
31
+ help: string;
32
+ options: string[] | undefined;
33
+ validate: (val: any) => true | "Invalid option selected";
34
+ };
35
+ component: string;
36
+ model: any;
37
+ }, {
38
+ type: string;
39
+ data: {
40
+ selected: string | undefined;
41
+ };
42
+ }, unknown>;
43
+ }
44
+ export type SelectData = {
45
+ content?: string | undefined;
46
+ options?: string[] | undefined;
47
+ };
48
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @typedef {'sm'|'md'|'lg'} SpinnerSize
3
+ * @typedef {Object} SpinnerData
4
+ * @property {SpinnerSize} [size]
5
+ * @property {string} [color]
6
+ */
7
+ /**
8
+ * Model-as-Schema for Spinner component.
9
+ * Represents a loading or progress state without user interaction.
10
+ */
11
+ export class SpinnerModel extends Model {
12
+ static size: {
13
+ help: string;
14
+ default: string;
15
+ options: string[];
16
+ };
17
+ static color: {
18
+ help: string;
19
+ type: string;
20
+ default: string;
21
+ };
22
+ /**
23
+ * @param {SpinnerData | any} [data]
24
+ */
25
+ constructor(data?: SpinnerData | any);
26
+ /** @type {SpinnerSize|undefined} */ size: SpinnerSize | undefined;
27
+ /** @type {string|undefined} */ color: string | undefined;
28
+ run(): AsyncGenerator<{
29
+ type: string;
30
+ message: string;
31
+ component: string;
32
+ model: any;
33
+ }, {
34
+ type: string;
35
+ data: {
36
+ completed: boolean;
37
+ };
38
+ }, unknown>;
39
+ }
40
+ export type SpinnerSize = "sm" | "md" | "lg";
41
+ export type SpinnerData = {
42
+ size?: SpinnerSize | undefined;
43
+ color?: string | undefined;
44
+ };
45
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @typedef {Object} TableData
3
+ * @property {string[]} [columns]
4
+ * @property {string[][]} [rows]
5
+ */
6
+ /**
7
+ * Model-as-Schema for Table Data component.
8
+ * Displays tabular string data in rows and columns.
9
+ */
10
+ export class TableModel extends Model {
11
+ static columns: {
12
+ help: string;
13
+ type: string;
14
+ default: string[];
15
+ };
16
+ static rows: {
17
+ help: string;
18
+ type: string;
19
+ default: string[][];
20
+ };
21
+ /**
22
+ * @param {TableData | any} [data]
23
+ */
24
+ constructor(data?: TableData | any);
25
+ /** @type {string[]|undefined} */ columns: string[] | undefined;
26
+ /** @type {string[][]|undefined} */ rows: string[][] | undefined;
27
+ run(): AsyncGenerator<{
28
+ type: string;
29
+ level: string;
30
+ message: string;
31
+ component: string;
32
+ model: any;
33
+ }, {
34
+ type: string;
35
+ data: {
36
+ rowsCount: number;
37
+ };
38
+ }, unknown>;
39
+ }
40
+ export type TableData = {
41
+ columns?: string[] | undefined;
42
+ rows?: string[][] | undefined;
43
+ };
44
+ import { Model } from '@nan0web/core';
@@ -0,0 +1,62 @@
1
+ /**
2
+ * @typedef {'success'|'error'|'info'|'warning'} ToastVariant
3
+ * @typedef {Object} ToastData
4
+ * @property {string} [message]
5
+ * @property {ToastVariant} [variant]
6
+ * @property {number} [duration]
7
+ * @property {boolean} [open]
8
+ */
9
+ /**
10
+ * Model-as-Schema for Toast notification component.
11
+ * Represents a transient message displayed to the user.
12
+ */
13
+ export class ToastModel extends Model {
14
+ static message: {
15
+ help: string;
16
+ default: string;
17
+ type: string;
18
+ };
19
+ static variant: {
20
+ help: string;
21
+ default: string;
22
+ options: string[];
23
+ };
24
+ static duration: {
25
+ help: string;
26
+ default: number;
27
+ type: string;
28
+ };
29
+ static open: {
30
+ help: string;
31
+ default: boolean;
32
+ type: string;
33
+ };
34
+ /**
35
+ * @param {ToastData | any} [data]
36
+ */
37
+ constructor(data?: ToastData | any);
38
+ /** @type {string|undefined} */ message: string | undefined;
39
+ /** @type {ToastVariant|undefined} */ variant: ToastVariant | undefined;
40
+ /** @type {number|undefined} */ duration: number | undefined;
41
+ /** @type {boolean|undefined} */ open: boolean | undefined;
42
+ run(): AsyncGenerator<{
43
+ type: string;
44
+ level: string;
45
+ message: string | undefined;
46
+ component: string;
47
+ model: any;
48
+ }, {
49
+ type: string;
50
+ data: {
51
+ closed: boolean;
52
+ };
53
+ }, unknown>;
54
+ }
55
+ export type ToastVariant = "success" | "error" | "info" | "warning";
56
+ export type ToastData = {
57
+ message?: string | undefined;
58
+ variant?: ToastVariant | undefined;
59
+ duration?: number | undefined;
60
+ open?: boolean | undefined;
61
+ };
62
+ import { Model } from '@nan0web/core';