@nan0web/ui 1.10.0 → 1.12.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 (101) hide show
  1. package/README.md +69 -3
  2. package/package.json +65 -29
  3. package/src/App/Command/DepsCommand.js +3 -4
  4. package/src/Frame/Props.js +12 -18
  5. package/src/InterfaceTemplate/InterfaceTemplate.js +9 -7
  6. package/src/Model/index.js +61 -6
  7. package/src/StdIn.js +2 -6
  8. package/src/cli.js +1 -0
  9. package/src/core/GeneratorRunner.js +67 -7
  10. package/src/core/InputAdapter.js +22 -5
  11. package/src/core/Intent.js +230 -18
  12. package/src/core/Message/Message.js +4 -7
  13. package/src/core/Message/OutputMessage.js +4 -9
  14. package/src/core/StreamEntry.js +20 -28
  15. package/src/core/index.js +4 -0
  16. package/src/domain/Content.js +198 -0
  17. package/src/domain/Document.js +25 -0
  18. package/src/domain/FooterModel.js +37 -19
  19. package/src/domain/HeaderModel.js +47 -21
  20. package/src/domain/HeroModel.js +24 -22
  21. package/src/domain/LayoutModel.js +43 -0
  22. package/src/domain/ModelAsApp.js +46 -0
  23. package/src/domain/SandboxModel.js +19 -16
  24. package/src/domain/app/GalleryCommand.js +53 -0
  25. package/src/domain/app/GalleryRenderIntent.js +77 -0
  26. package/src/domain/app/SnapshotAuditor.js +399 -0
  27. package/src/domain/app/SnapshotRunner.js +264 -0
  28. package/src/domain/app/UIApp.js +78 -0
  29. package/src/domain/components/BreadcrumbModel.js +10 -6
  30. package/src/domain/components/FeatureGridModel.js +62 -0
  31. package/src/domain/components/MarkdownModel.js +24 -0
  32. package/src/domain/components/ShellModel.js +243 -0
  33. package/src/domain/components/TableModel.js +10 -6
  34. package/src/domain/components/ToastModel.js +10 -6
  35. package/src/domain/components/index.js +3 -1
  36. package/src/domain/index.js +14 -4
  37. package/src/index.js +23 -2
  38. package/src/inspect.js +2 -0
  39. package/src/test/ScenarioAdapter.js +59 -0
  40. package/src/test/ScenarioTest.js +51 -0
  41. package/src/test/ScenarioTest.story.js +56 -0
  42. package/src/testing/CrashReporter.js +56 -0
  43. package/src/testing/GalleryGenerator.js +15 -71
  44. package/src/testing/LogicInspector.js +4 -4
  45. package/src/testing/SnapshotRunner.js +22 -0
  46. package/src/testing/SpecAdapter.js +114 -0
  47. package/src/testing/SpecRunner.js +121 -0
  48. package/src/testing/VisualAdapter.js +24 -19
  49. package/src/testing/index.js +5 -1
  50. package/src/testing/verifySnapshot.js +17 -0
  51. package/types/App/Command/DepsCommand.d.ts +0 -2
  52. package/types/Model/index.d.ts +56 -62
  53. package/types/StdIn.d.ts +3 -3
  54. package/types/cli.d.ts +1 -0
  55. package/types/core/GeneratorRunner.d.ts +14 -1
  56. package/types/core/InputAdapter.d.ts +50 -6
  57. package/types/core/Intent.d.ts +280 -32
  58. package/types/core/Message/Message.d.ts +2 -2
  59. package/types/core/Message/OutputMessage.d.ts +0 -2
  60. package/types/core/index.d.ts +4 -0
  61. package/types/domain/Content.d.ts +344 -0
  62. package/types/domain/Document.d.ts +40 -0
  63. package/types/domain/FooterModel.d.ts +22 -12
  64. package/types/domain/HeaderModel.d.ts +36 -13
  65. package/types/domain/HeroModel.d.ts +19 -17
  66. package/types/domain/LayoutModel.d.ts +34 -0
  67. package/types/domain/ModelAsApp.d.ts +23 -0
  68. package/types/domain/SandboxModel.d.ts +10 -0
  69. package/types/domain/app/GalleryCommand.d.ts +55 -0
  70. package/types/domain/app/GalleryRenderIntent.d.ts +31 -0
  71. package/types/domain/app/SnapshotAuditor.d.ts +99 -0
  72. package/types/domain/app/SnapshotRunner.d.ts +45 -0
  73. package/types/domain/app/UIApp.d.ts +60 -0
  74. package/types/domain/components/BreadcrumbModel.d.ts +6 -8
  75. package/types/domain/components/FeatureGridModel.d.ts +50 -0
  76. package/types/domain/components/MarkdownModel.d.ts +19 -0
  77. package/types/domain/components/ShellModel.d.ts +56 -0
  78. package/types/domain/components/TableModel.d.ts +4 -0
  79. package/types/domain/components/ToastModel.d.ts +4 -0
  80. package/types/domain/components/index.d.ts +3 -0
  81. package/types/domain/index.d.ts +10 -4
  82. package/types/index.d.ts +21 -1
  83. package/types/inspect.d.ts +2 -0
  84. package/types/test/ScenarioAdapter.d.ts +43 -0
  85. package/types/test/ScenarioTest.d.ts +24 -0
  86. package/types/test/ScenarioTest.story.d.ts +1 -0
  87. package/types/testing/CrashReporter.d.ts +13 -0
  88. package/types/testing/SnapshotRunner.d.ts +7 -0
  89. package/types/testing/SpecAdapter.d.ts +58 -0
  90. package/types/testing/SpecRunner.d.ts +41 -0
  91. package/types/testing/VisualAdapter.d.ts +0 -6
  92. package/types/testing/index.d.ts +5 -1
  93. package/types/testing/verifySnapshot.d.ts +14 -0
  94. package/src/testing/SnapshotInspector.js +0 -84
  95. package/types/App/Command/Options.d.ts +0 -43
  96. package/types/App/Command/index.d.ts +0 -8
  97. package/types/App/User/Command/Options.d.ts +0 -34
  98. package/types/core/Message/InputMessage.d.ts +0 -71
  99. package/types/domain/components/HeroModel.d.ts +0 -24
  100. package/types/domain/components/ShowcaseAppModel.d.ts +0 -32
  101. package/types/testing/SnapshotInspector.d.ts +0 -17
@@ -18,8 +18,6 @@ export default class OutputMessage extends UiMessage {
18
18
  * @returns {OutputMessage}
19
19
  */
20
20
  static from(input: any): OutputMessage;
21
- /** @type {string[]} */
22
- body: string[];
23
21
  /** @type {Object} */
24
22
  meta: any;
25
23
  /** @type {Error|null} */
@@ -7,6 +7,10 @@ export { default as UiAdapter } from "./UiAdapter.js";
7
7
  export { IntentErrorModel } from "./IntentErrorModel.js";
8
8
  export { runGenerator } from "./GeneratorRunner.js";
9
9
  export { MaskHandler } from "./MaskHandler.js";
10
+ export { LayoutModel } from "../domain/LayoutModel.js";
11
+ export type Intent = import("./Intent.js").Intent;
12
+ export type AskResponse = import("./Intent.js").AskResponse;
13
+ export type AskOptions = import("./InputAdapter.js").AskOptions;
10
14
  import UIStream from './Stream.js';
11
15
  import StreamEntry from './StreamEntry.js';
12
16
  import UIForm from './Form/Form.js';
@@ -0,0 +1,344 @@
1
+ /**
2
+ * @typedef {Object} HTML5Elements
3
+ * @property {string|ContentData[]} [a]
4
+ * @property {string|ContentData[]} [abbr]
5
+ * @property {string|ContentData[]} [address]
6
+ * @property {string|ContentData[]} [area]
7
+ * @property {string|ContentData[]} [article]
8
+ * @property {string|ContentData[]} [aside]
9
+ * @property {string|ContentData[]} [audio]
10
+ * @property {string|ContentData[]} [b]
11
+ * @property {string|ContentData[]} [base]
12
+ * @property {string|ContentData[]} [bdi]
13
+ * @property {string|ContentData[]} [bdo]
14
+ * @property {string|ContentData[]} [blockquote]
15
+ * @property {string|ContentData[]} [body]
16
+ * @property {boolean|object} [br]
17
+ * @property {string|ContentData[]} [canvas]
18
+ * @property {string|ContentData[]} [caption]
19
+ * @property {string|ContentData[]} [cite]
20
+ * @property {string|ContentData[]} [code]
21
+ * @property {string|ContentData[]} [col]
22
+ * @property {string|ContentData[]} [colgroup]
23
+ * @property {string|ContentData[]} [data]
24
+ * @property {string|ContentData[]} [datalist]
25
+ * @property {string|ContentData[]} [dd]
26
+ * @property {string|ContentData[]} [del]
27
+ * @property {string|ContentData[]} [details]
28
+ * @property {string|ContentData[]} [dfn]
29
+ * @property {string|ContentData[]} [dialog]
30
+ * @property {string|ContentData[]} [div]
31
+ * @property {string|ContentData[]} [dl]
32
+ * @property {string|ContentData[]} [dt]
33
+ * @property {string|ContentData[]} [em]
34
+ * @property {string|ContentData[]} [embed]
35
+ * @property {string|ContentData[]} [fieldset]
36
+ * @property {string|ContentData[]} [figcaption]
37
+ * @property {string|ContentData[]} [figure]
38
+ * @property {any} [footer]
39
+ * @property {string|ContentData[]} [form]
40
+ * @property {string|ContentData[]} [h1]
41
+ * @property {string|ContentData[]} [h2]
42
+ * @property {string|ContentData[]} [h3]
43
+ * @property {string|ContentData[]} [h4]
44
+ * @property {string|ContentData[]} [h5]
45
+ * @property {string|ContentData[]} [h6]
46
+ * @property {string|ContentData[]} [head]
47
+ * @property {any} [header]
48
+ * @property {string|ContentData[]} [hgroup]
49
+ * @property {boolean|object} [hr]
50
+ * @property {string|ContentData[]} [html]
51
+ * @property {string|ContentData[]} [i]
52
+ * @property {string|ContentData[]} [iframe]
53
+ * @property {string|ContentData[]} [img]
54
+ * @property {string|ContentData[]} [ins]
55
+ * @property {string|ContentData[]} [kbd]
56
+ * @property {string|ContentData[]} [label]
57
+ * @property {string|ContentData[]} [legend]
58
+ * @property {string|ContentData[]} [li]
59
+ * @property {string|ContentData[]} [link]
60
+ * @property {string|ContentData[]} [main]
61
+ * @property {string|ContentData[]} [map]
62
+ * @property {string|ContentData[]} [mark]
63
+ * @property {string|ContentData[]} [meta]
64
+ * @property {string|ContentData[]} [meter]
65
+ * @property {boolean|any} [input]
66
+ * @property {boolean|any} [button]
67
+ * @property {boolean|any} [select]
68
+ * @property {string|ContentData[]} [nav]
69
+ * @property {string|ContentData[]} [noscript]
70
+ * @property {string|ContentData[]} [object]
71
+ * @property {string|ContentData[]} [ol]
72
+ * @property {string|ContentData[]} [optgroup]
73
+ * @property {string|ContentData[]} [option]
74
+ * @property {string|ContentData[]} [output]
75
+ * @property {string|ContentData[]} [p]
76
+ * @property {string|ContentData[]} [picture]
77
+ * @property {string|ContentData[]} [pre]
78
+ * @property {string|ContentData[]} [progress]
79
+ * @property {string|ContentData[]} [q]
80
+ * @property {string|ContentData[]} [rp]
81
+ * @property {string|ContentData[]} [rt]
82
+ * @property {string|ContentData[]} [ruby]
83
+ * @property {string|ContentData[]} [s]
84
+ * @property {string|ContentData[]} [samp]
85
+ * @property {string|ContentData[]} [script]
86
+ * @property {string|ContentData[]} [section]
87
+ * @property {string|ContentData[]} [slot]
88
+ * @property {string|ContentData[]} [small]
89
+ * @property {string|ContentData[]} [source]
90
+ * @property {string|ContentData[]} [span]
91
+ * @property {string|ContentData[]} [strong]
92
+ * @property {string|ContentData[]} [style]
93
+ * @property {string|ContentData[]} [sub]
94
+ * @property {string|ContentData[]} [summary]
95
+ * @property {string|ContentData[]} [sup]
96
+ * @property {string|ContentData[]} [table]
97
+ * @property {string|ContentData[]} [tbody]
98
+ * @property {string|ContentData[]} [td]
99
+ * @property {string|ContentData[]} [template]
100
+ * @property {string|ContentData[]} [textarea]
101
+ * @property {string|ContentData[]} [tfoot]
102
+ * @property {string|ContentData[]} [th]
103
+ * @property {string|ContentData[]} [thead]
104
+ * @property {string|ContentData[]} [time]
105
+ * @property {string|ContentData[]} [title]
106
+ * @property {string|ContentData[]} [tr]
107
+ * @property {string|ContentData[]} [track]
108
+ * @property {string|ContentData[]} [u]
109
+ * @property {string|ContentData[]} [ul]
110
+ * @property {string|ContentData[]} [var]
111
+ * @property {string|ContentData[]} [video]
112
+ * @property {string|ContentData[]} [wbr]
113
+ * @property {string|ContentData[]} [svg]
114
+ * @property {string|ContentData[]} [path]
115
+ * @property {string|ContentData[]} [circle]
116
+ * @property {string|ContentData[]} [rect]
117
+ * @property {string|ContentData[]} [line]
118
+ * @property {string|ContentData[]} [polyline]
119
+ * @property {string|ContentData[]} [polygon]
120
+ * @property {string|ContentData[]} [g]
121
+ * @property {string|ContentData[]} [defs]
122
+ * @property {string|ContentData[]} [symbol]
123
+ * @property {string|ContentData[]} [use]
124
+ * @property {string|ContentData[]} [text]
125
+ */
126
+ /**
127
+ * @typedef {Object} CoreUIElements
128
+ * @property {import('./components/AccordionModel.js').AccordionModel} [accordion]
129
+ * @property {import('./components/AutocompleteModel.js').AutocompleteModel} [autocomplete]
130
+ * @property {import('./components/BannerModel.js').BannerModel} [banner]
131
+ * @property {import('./components/BreadcrumbModel.js').BreadcrumbModel} [breadcrumb]
132
+ * @property {import('./components/ButtonModel.js').ButtonModel} [button]
133
+ * @property {import('./components/CommentModel.js').CommentModel} [comment]
134
+ * @property {import('./components/ConfirmModel.js').ConfirmModel} [confirm]
135
+ * @property {import('./components/EmptyStateModel.js').EmptyStateModel} [emptyState]
136
+ * @property {import('./components/FAQModel.js').FAQModel} [faq]
137
+ * @property {import('./components/FeatureGridModel.js').FeatureGridModel} [featureGrid]
138
+ * @property {import('./components/GalleryModel.js').GalleryModel} [gallery]
139
+ * @property {import('./HeaderModel.js').HeaderModel} [header]
140
+ * @property {import('./FooterModel.js').FooterModel} [footer]
141
+ * @property {import('./components/InputModel.js').InputModel} [input]
142
+ * @property {import('./components/MarkdownModel.js').MarkdownModel} [markdown]
143
+ * @property {import('./components/PriceModel.js').PriceModel} [price]
144
+ * @property {import('./components/PricingModel.js').PricingModel} [pricing]
145
+ * @property {import('./components/PricingSectionModel.js').PricingSectionModel} [pricingSection]
146
+ * @property {import('./components/ProfileDropdownModel.js').ProfileDropdownModel} [profileDropdown]
147
+ * @property {import('./components/SelectModel.js').SelectModel} [select]
148
+ * @property {import('./components/ShellModel.js').ShellModel} [shell]
149
+ * @property {import('./components/SpinnerModel.js').SpinnerModel} [spinner]
150
+ * @property {import('./components/StatsItemModel.js').StatsItemModel} [statsItem]
151
+ * @property {import('./components/StatsModel.js').StatsModel} [stats]
152
+ * @property {import('./components/TableModel.js').TableModel} [tableUI]
153
+ * @property {import('./components/TabsModel.js').TabsModel} [tabs]
154
+ * @property {import('./components/TestimonialModel.js').TestimonialModel} [testimonial]
155
+ * @property {import('./components/TimelineItemModel.js').TimelineItemModel} [timelineItem]
156
+ * @property {import('./components/TimelineModel.js').TimelineModel} [timeline]
157
+ * @property {import('./components/ToastModel.js').ToastModel} [toast]
158
+ * @property {import('./components/TreeModel.js').TreeModel} [tree]
159
+ * @property {ContentData[]} [sortable] - Інтерактивний Drag-n-Drop контейнер
160
+ */
161
+ /**
162
+ * @typedef {Partial<Content & HTML5Elements & CoreUIElements> & Record<string, any>} ContentData
163
+ */
164
+ export class Content extends Model {
165
+ static content: {
166
+ type: string;
167
+ help: string;
168
+ };
169
+ static children: {
170
+ type: string;
171
+ model: typeof Content;
172
+ help: string;
173
+ };
174
+ /**
175
+ * @param {ContentData | string} [data={}]
176
+ * @param {import('@nan0web/types').ModelOptions} [options={}]
177
+ */
178
+ constructor(data?: ContentData | string, options?: import("@nan0web/types").ModelOptions);
179
+ /** @type {string|undefined} Content */ content: string | undefined;
180
+ /** @type {Array<Content>|undefined} Children */ children: Array<Content> | undefined;
181
+ }
182
+ export type HTML5Elements = {
183
+ a?: string | ContentData[] | undefined;
184
+ abbr?: string | ContentData[] | undefined;
185
+ address?: string | ContentData[] | undefined;
186
+ area?: string | ContentData[] | undefined;
187
+ article?: string | ContentData[] | undefined;
188
+ aside?: string | ContentData[] | undefined;
189
+ audio?: string | ContentData[] | undefined;
190
+ b?: string | ContentData[] | undefined;
191
+ base?: string | ContentData[] | undefined;
192
+ bdi?: string | ContentData[] | undefined;
193
+ bdo?: string | ContentData[] | undefined;
194
+ blockquote?: string | ContentData[] | undefined;
195
+ body?: string | ContentData[] | undefined;
196
+ br?: boolean | object;
197
+ canvas?: string | ContentData[] | undefined;
198
+ caption?: string | ContentData[] | undefined;
199
+ cite?: string | ContentData[] | undefined;
200
+ code?: string | ContentData[] | undefined;
201
+ col?: string | ContentData[] | undefined;
202
+ colgroup?: string | ContentData[] | undefined;
203
+ data?: string | ContentData[] | undefined;
204
+ datalist?: string | ContentData[] | undefined;
205
+ dd?: string | ContentData[] | undefined;
206
+ del?: string | ContentData[] | undefined;
207
+ details?: string | ContentData[] | undefined;
208
+ dfn?: string | ContentData[] | undefined;
209
+ dialog?: string | ContentData[] | undefined;
210
+ div?: string | ContentData[] | undefined;
211
+ dl?: string | ContentData[] | undefined;
212
+ dt?: string | ContentData[] | undefined;
213
+ em?: string | ContentData[] | undefined;
214
+ embed?: string | ContentData[] | undefined;
215
+ fieldset?: string | ContentData[] | undefined;
216
+ figcaption?: string | ContentData[] | undefined;
217
+ figure?: string | ContentData[] | undefined;
218
+ footer?: any;
219
+ form?: string | ContentData[] | undefined;
220
+ h1?: string | ContentData[] | undefined;
221
+ h2?: string | ContentData[] | undefined;
222
+ h3?: string | ContentData[] | undefined;
223
+ h4?: string | ContentData[] | undefined;
224
+ h5?: string | ContentData[] | undefined;
225
+ h6?: string | ContentData[] | undefined;
226
+ head?: string | ContentData[] | undefined;
227
+ header?: any;
228
+ hgroup?: string | ContentData[] | undefined;
229
+ hr?: boolean | object;
230
+ html?: string | ContentData[] | undefined;
231
+ i?: string | ContentData[] | undefined;
232
+ iframe?: string | ContentData[] | undefined;
233
+ img?: string | ContentData[] | undefined;
234
+ ins?: string | ContentData[] | undefined;
235
+ kbd?: string | ContentData[] | undefined;
236
+ label?: string | ContentData[] | undefined;
237
+ legend?: string | ContentData[] | undefined;
238
+ li?: string | ContentData[] | undefined;
239
+ link?: string | ContentData[] | undefined;
240
+ main?: string | ContentData[] | undefined;
241
+ map?: string | ContentData[] | undefined;
242
+ mark?: string | ContentData[] | undefined;
243
+ meta?: string | ContentData[] | undefined;
244
+ meter?: string | ContentData[] | undefined;
245
+ input?: boolean | any;
246
+ button?: boolean | any;
247
+ select?: boolean | any;
248
+ nav?: string | ContentData[] | undefined;
249
+ noscript?: string | ContentData[] | undefined;
250
+ object?: string | ContentData[] | undefined;
251
+ ol?: string | ContentData[] | undefined;
252
+ optgroup?: string | ContentData[] | undefined;
253
+ option?: string | ContentData[] | undefined;
254
+ output?: string | ContentData[] | undefined;
255
+ p?: string | ContentData[] | undefined;
256
+ picture?: string | ContentData[] | undefined;
257
+ pre?: string | ContentData[] | undefined;
258
+ progress?: string | ContentData[] | undefined;
259
+ q?: string | ContentData[] | undefined;
260
+ rp?: string | ContentData[] | undefined;
261
+ rt?: string | ContentData[] | undefined;
262
+ ruby?: string | ContentData[] | undefined;
263
+ s?: string | ContentData[] | undefined;
264
+ samp?: string | ContentData[] | undefined;
265
+ script?: string | ContentData[] | undefined;
266
+ section?: string | ContentData[] | undefined;
267
+ slot?: string | ContentData[] | undefined;
268
+ small?: string | ContentData[] | undefined;
269
+ source?: string | ContentData[] | undefined;
270
+ span?: string | ContentData[] | undefined;
271
+ strong?: string | ContentData[] | undefined;
272
+ style?: string | ContentData[] | undefined;
273
+ sub?: string | ContentData[] | undefined;
274
+ summary?: string | ContentData[] | undefined;
275
+ sup?: string | ContentData[] | undefined;
276
+ table?: string | ContentData[] | undefined;
277
+ tbody?: string | ContentData[] | undefined;
278
+ td?: string | ContentData[] | undefined;
279
+ template?: string | ContentData[] | undefined;
280
+ textarea?: string | ContentData[] | undefined;
281
+ tfoot?: string | ContentData[] | undefined;
282
+ th?: string | ContentData[] | undefined;
283
+ thead?: string | ContentData[] | undefined;
284
+ time?: string | ContentData[] | undefined;
285
+ title?: string | ContentData[] | undefined;
286
+ tr?: string | ContentData[] | undefined;
287
+ track?: string | ContentData[] | undefined;
288
+ u?: string | ContentData[] | undefined;
289
+ ul?: string | ContentData[] | undefined;
290
+ var?: string | ContentData[] | undefined;
291
+ video?: string | ContentData[] | undefined;
292
+ wbr?: string | ContentData[] | undefined;
293
+ svg?: string | ContentData[] | undefined;
294
+ path?: string | ContentData[] | undefined;
295
+ circle?: string | ContentData[] | undefined;
296
+ rect?: string | ContentData[] | undefined;
297
+ line?: string | ContentData[] | undefined;
298
+ polyline?: string | ContentData[] | undefined;
299
+ polygon?: string | ContentData[] | undefined;
300
+ g?: string | ContentData[] | undefined;
301
+ defs?: string | ContentData[] | undefined;
302
+ symbol?: string | ContentData[] | undefined;
303
+ use?: string | ContentData[] | undefined;
304
+ text?: string | ContentData[] | undefined;
305
+ };
306
+ export type CoreUIElements = {
307
+ accordion?: import("./components/AccordionModel.js").AccordionModel | undefined;
308
+ autocomplete?: import("./components/AutocompleteModel.js").AutocompleteModel | undefined;
309
+ banner?: import("./components/BannerModel.js").BannerModel | undefined;
310
+ breadcrumb?: import("./components/BreadcrumbModel.js").BreadcrumbModel | undefined;
311
+ button?: import("./components/ButtonModel.js").ButtonModel | undefined;
312
+ comment?: import("./components/CommentModel.js").CommentModel | undefined;
313
+ confirm?: import("./components/ConfirmModel.js").ConfirmModel | undefined;
314
+ emptyState?: import("./components/EmptyStateModel.js").EmptyStateModel | undefined;
315
+ faq?: import("./components/FAQModel.js").FAQModel | undefined;
316
+ featureGrid?: import("./components/FeatureGridModel.js").FeatureGridModel | undefined;
317
+ gallery?: import("./components/GalleryModel.js").GalleryModel | undefined;
318
+ header?: import("./HeaderModel.js").HeaderModel | undefined;
319
+ footer?: import("./FooterModel.js").FooterModel | undefined;
320
+ input?: import("./components/InputModel.js").InputModel | undefined;
321
+ markdown?: import("./components/MarkdownModel.js").MarkdownModel | undefined;
322
+ price?: import("./components/PriceModel.js").PriceModel | undefined;
323
+ pricing?: import("./components/PricingModel.js").PricingModel | undefined;
324
+ pricingSection?: import("./components/PricingSectionModel.js").PricingSectionModel | undefined;
325
+ profileDropdown?: import("./components/ProfileDropdownModel.js").ProfileDropdownModel | undefined;
326
+ select?: import("./components/SelectModel.js").SelectModel | undefined;
327
+ shell?: import("./components/ShellModel.js").ShellModel | undefined;
328
+ spinner?: import("./components/SpinnerModel.js").SpinnerModel | undefined;
329
+ statsItem?: import("./components/StatsItemModel.js").StatsItemModel | undefined;
330
+ stats?: import("./components/StatsModel.js").StatsModel | undefined;
331
+ tableUI?: import("./components/TableModel.js").TableModel | undefined;
332
+ tabs?: import("./components/TabsModel.js").TabsModel | undefined;
333
+ testimonial?: import("./components/TestimonialModel.js").TestimonialModel | undefined;
334
+ timelineItem?: import("./components/TimelineItemModel.js").TimelineItemModel | undefined;
335
+ timeline?: import("./components/TimelineModel.js").TimelineModel | undefined;
336
+ toast?: import("./components/ToastModel.js").ToastModel | undefined;
337
+ tree?: import("./components/TreeModel.js").TreeModel | undefined;
338
+ /**
339
+ * - Інтерактивний Drag-n-Drop контейнер
340
+ */
341
+ sortable?: ContentData[] | undefined;
342
+ };
343
+ export type ContentData = Partial<Content & HTML5Elements & CoreUIElements> & Record<string, any>;
344
+ import { Model } from '@nan0web/types';
@@ -0,0 +1,40 @@
1
+ export class Document extends Model {
2
+ static title: {
3
+ type: string;
4
+ help: string;
5
+ };
6
+ static content: {
7
+ type: string;
8
+ model: typeof Content;
9
+ help: string;
10
+ };
11
+ static $content: {
12
+ type: string;
13
+ model: typeof Content;
14
+ help: string;
15
+ };
16
+ static nav: {
17
+ type: string;
18
+ model: typeof Navigation;
19
+ help: string;
20
+ };
21
+ static langs: {
22
+ type: string;
23
+ model: any;
24
+ help: string;
25
+ };
26
+ /**
27
+ *
28
+ * @param {Partial<Document>} [data]
29
+ * @param {import('@nan0web/types').ModelOptions} [options]
30
+ */
31
+ constructor(data?: Partial<Document>, options?: import("@nan0web/types").ModelOptions);
32
+ /** @type {string} Title */ title: string;
33
+ /** @type {Array<Content>} Content */ content: Array<Content>;
34
+ /** @type {Array<Content>} Layout configuration */ $content: Array<Content>;
35
+ /** @type {Navigation|string|Array<Navigation>} Navigation config */ nav: Navigation | string | Array<Navigation>;
36
+ /** @type {Array<Language>} Supported languages */ langs: Array<Language>;
37
+ }
38
+ import { Model } from '@nan0web/types';
39
+ import { Content } from './Content.js';
40
+ import Navigation from './Navigation.js';
@@ -1,8 +1,8 @@
1
1
  /**
2
- * FooterModel — OLMUI Model-as-Schema
3
- * Universal footer structure: copyright, version, license, navigation, sharing, languages.
2
+ * FooterModel — OLMUI Component Model
3
+ * Universal footer structure.
4
4
  */
5
- export default class FooterModel extends Model {
5
+ export class FooterModel extends Model {
6
6
  static $id: string;
7
7
  static copyright: {
8
8
  help: string;
@@ -31,22 +31,32 @@ export default class FooterModel extends Model {
31
31
  hint: typeof Navigation;
32
32
  default: never[];
33
33
  };
34
+ static lang: {
35
+ help: string;
36
+ default: null;
37
+ };
34
38
  static langs: {
35
39
  help: string;
36
40
  type: string;
41
+ hint: any;
37
42
  default: never[];
38
43
  };
39
44
  /**
40
- * @param {Partial<FooterModel> | Record<string, any>} data Model input data.
41
- * @param {object} [options] Extended options (db, etc.)
45
+ * @param {Partial<FooterModel>} data
42
46
  */
43
- constructor(data?: Partial<FooterModel> | Record<string, any>, options?: object);
44
- /** @type {string} Copyright text */ copyright: string;
45
- /** @type {string} Application version string */ version: string;
46
- /** @type {string} License type */ license: string;
47
- /** @type {Navigation[]} Footer navigation links */ nav: Navigation[];
48
- /** @type {Navigation[]} Social sharing links */ share: Navigation[];
49
- /** @type {any[]} Available languages for switcher */ langs: any[];
47
+ constructor(data?: Partial<FooterModel>);
48
+ /** @type {string} */ copyright: string;
49
+ /** @type {string} */ version: string;
50
+ /** @type {string} */ license: string;
51
+ /** @type {Navigation[]} */
52
+ nav: Navigation[];
53
+ /** @type {Navigation[]} */
54
+ share: Navigation[];
55
+ /** @type {Language|null} */
56
+ lang: Language | null;
57
+ /** @type {Language[]} */
58
+ langs: Language[];
59
+ #private;
50
60
  }
51
61
  import { Model } from '@nan0web/types';
52
62
  import Navigation from './Navigation.js';
@@ -1,8 +1,8 @@
1
1
  /**
2
- * HeaderModel — OLMUI Model-as-Schema
3
- * Universal header structure: logo, navigation, language switcher, actions.
2
+ * HeaderModel — OLMUI Component Model
3
+ * Universal header structure with logo, navigation, and language controls.
4
4
  */
5
- export default class HeaderModel extends Model {
5
+ export class HeaderModel extends Model {
6
6
  static $id: string;
7
7
  static title: {
8
8
  help: string;
@@ -14,32 +14,55 @@ export default class HeaderModel extends Model {
14
14
  placeholder: string;
15
15
  default: string;
16
16
  };
17
+ static logoDark: {
18
+ help: string;
19
+ placeholder: string;
20
+ default: string;
21
+ };
22
+ static nav: {
23
+ help: string;
24
+ type: string;
25
+ hint: typeof Navigation;
26
+ default: never[];
27
+ };
17
28
  static actions: {
18
29
  help: string;
19
30
  type: string;
20
31
  hint: typeof Navigation;
21
32
  default: never[];
22
33
  };
23
- static lang: {
34
+ static share: {
24
35
  help: string;
25
36
  type: string;
37
+ hint: typeof Navigation;
38
+ default: never[];
39
+ };
40
+ static lang: {
41
+ help: string;
26
42
  default: null;
27
43
  };
28
44
  static langs: {
29
45
  help: string;
30
- type: string;
31
46
  default: never[];
32
47
  };
33
48
  /**
34
- * @param {Partial<HeaderModel> | Record<string, any>} data Model input data.
35
- * @param {object} [options] Extended options (db, etc.)
49
+ * @param {Partial<HeaderModel>} data
36
50
  */
37
- constructor(data?: Partial<HeaderModel> | Record<string, any>, options?: object);
38
- /** @type {string} Site or app title displayed in the header */ title: string;
39
- /** @type {string} Logo image URL or icon name */ logo: string;
40
- /** @type {Navigation[]} Header action links (CTA, Sign In, etc.) */ actions: Navigation[];
41
- /** @type {any|null} Currently active language */ lang: any | null;
42
- /** @type {any[]} Available languages for switcher */ langs: any[];
51
+ constructor(data?: Partial<HeaderModel>);
52
+ /** @type {string} */ title: string;
53
+ /** @type {string} */ logo: string;
54
+ /** @type {string} */ logoDark: string;
55
+ /** @type {Navigation[]} */
56
+ nav: Navigation[];
57
+ /** @type {Navigation[]} */
58
+ actions: Navigation[];
59
+ /** @type {Navigation[]} */
60
+ share: Navigation[];
61
+ /** @type {any} */
62
+ lang: any;
63
+ /** @type {any[]} */
64
+ langs: any[];
65
+ #private;
43
66
  }
44
67
  import { Model } from '@nan0web/types';
45
68
  import Navigation from './Navigation.js';
@@ -1,43 +1,45 @@
1
1
  /**
2
- * HeroModel — OLMUI Model-as-Schema
3
- * Universal hero/banner section for landing pages.
4
- * Uses Navigation[] for actions instead of a single CTA.
2
+ * HeroModel — OLMUI Component Model
3
+ * Represents the top presentation section of a page.
5
4
  */
6
- export default class HeroModel extends Model {
5
+ export class HeroModel extends Model {
7
6
  static $id: string;
7
+ static badge: {
8
+ help: string;
9
+ placeholder: string;
10
+ default: string;
11
+ };
8
12
  static title: {
9
13
  help: string;
10
14
  placeholder: string;
11
15
  default: string;
12
16
  required: boolean;
13
17
  };
14
- static description: {
18
+ static subtitle: {
15
19
  help: string;
16
20
  placeholder: string;
17
21
  default: string;
18
22
  };
19
- static image: {
23
+ static code: {
20
24
  help: string;
21
- placeholder: string;
22
- hint: string;
23
- upload: boolean;
24
25
  default: string;
25
26
  };
26
27
  static actions: {
27
28
  help: string;
28
29
  type: string;
29
- hint: typeof Navigation;
30
+ model: typeof Navigation;
30
31
  default: never[];
31
32
  };
32
33
  /**
33
- * @param {Partial<HeroModel> | Record<string, any>} data Model input data.
34
- * @param {object} [options] Extended options (db, etc.)
34
+ * @param {Partial<HeroModel | Record<string, any>>} [data={}]
35
+ * @param {import('@nan0web/types').ModelOptions} [options={}]
35
36
  */
36
- constructor(data?: Partial<HeroModel> | Record<string, any>, options?: object);
37
- /** @type {string} Hero main headline */ title: string;
38
- /** @type {string} Hero sub-headline or description text */ description: string;
39
- /** @type {string} Hero background or feature image URL */ image: string;
40
- /** @type {Navigation[]} Call-to-action buttons (multiple CTA support) */ actions: Navigation[];
37
+ constructor(data?: Partial<HeroModel | Record<string, any>>, options?: import("@nan0web/types").ModelOptions);
38
+ /** @type {string} Top small badge text ior icon */ badge: string;
39
+ /** @type {string} Hero heading */ title: string;
40
+ /** @type {string} Hero secondary text */ subtitle: string;
41
+ /** @type {string} Code snippet or secondary markup */ code: string;
42
+ /** @type {Navigation[]} CTA buttons */ actions: Navigation[];
41
43
  }
42
44
  import { Model } from '@nan0web/types';
43
45
  import Navigation from './Navigation.js';
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @typedef {'flow'|'sticky-bottom'|'sticky-top'|'dialog-modal'|'spatial-xyz'} LayoutType
3
+ */
4
+ /**
5
+ * Universal Layout Interface for OLMUI.
6
+ * Defines the semantic spatial placement of a component in any renderer.
7
+ */
8
+ export class LayoutModel extends Model {
9
+ static type: {
10
+ help: string;
11
+ default: string;
12
+ options: {
13
+ value: string;
14
+ label: string;
15
+ }[];
16
+ };
17
+ static coordinates: {
18
+ help: string;
19
+ default: null;
20
+ type: string;
21
+ };
22
+ /**
23
+ * Creates a new LayoutModel instance to define spatial placement.
24
+ * @param {Partial<LayoutModel> | Record<string, any>} [data] Input model data.
25
+ * @param {object} [options] Model options.
26
+ */
27
+ constructor(data?: Partial<LayoutModel> | Record<string, any>, options?: object);
28
+ /** @type {LayoutType} Base layout type */
29
+ type: LayoutType;
30
+ /** @type {object | null} Configuration or specific layout parameters */
31
+ coordinates: object | null;
32
+ }
33
+ export type LayoutType = "flow" | "sticky-bottom" | "sticky-top" | "dialog-modal" | "spatial-xyz";
34
+ import { Model } from '@nan0web/types';
@@ -0,0 +1,23 @@
1
+ /** @typedef {import('@nan0web/types').ModelOptions & { adapter: InputAdapter }} ModelAsAppOptions */
2
+ /**
3
+ * The model with a run generator.
4
+ */
5
+ export class ModelAsApp extends Model {
6
+ /**
7
+ * @param {Partial<ModelAsApp> | Record<string, any>} [data={}]
8
+ * @param {ModelAsAppOptions} [options={}]
9
+ */
10
+ constructor(data?: Partial<ModelAsApp> | Record<string, any>, options?: ModelAsAppOptions);
11
+ /** @returns {ModelAsAppOptions} */
12
+ get _(): ModelAsAppOptions;
13
+ /**
14
+ * @returns {AsyncGenerator<import('@nan0web/ui').Intent, import('@nan0web/ui').ResultIntent, any>}
15
+ */
16
+ run(): AsyncGenerator<import("@nan0web/ui").Intent, import("@nan0web/ui").ResultIntent, any>;
17
+ #private;
18
+ }
19
+ export type ModelAsAppOptions = import("@nan0web/types").ModelOptions & {
20
+ adapter: InputAdapter;
21
+ };
22
+ import { Model } from '@nan0web/types';
23
+ import { InputAdapter } from '../core/InputAdapter.js';