xmlui 0.7.29 → 0.7.31

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 (44) hide show
  1. package/dist/{apiInterceptorWorker-BXh2BMZL.mjs → apiInterceptorWorker-CaRsvFsP.mjs} +1 -1
  2. package/dist/{grammar.tmLanguage-JAlHWPqw.mjs → grammar.tmLanguage-CiYpNgdH.mjs} +3 -17
  3. package/dist/{index-B3eDGXIR.mjs → index-C2wZyJh9.mjs} +19785 -26255
  4. package/dist/index.css +1 -1
  5. package/dist/lint-Fx8P7hBr.mjs +5645 -0
  6. package/dist/scripts/bin/build-lib.js +8 -5
  7. package/dist/scripts/bin/start.js +1 -0
  8. package/dist/scripts/src/components/ComponentProvider.js +1 -16
  9. package/dist/scripts/src/components/DatePicker/DatePicker.js +31 -2
  10. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +3 -34
  11. package/dist/scripts/src/components/FlowLayout/FlowLayout.js +0 -1
  12. package/dist/scripts/src/components/HtmlTags/HtmlTags.js +444 -315
  13. package/dist/scripts/src/components/IconProvider.js +2 -4
  14. package/dist/scripts/src/components/List/List.js +6 -0
  15. package/dist/scripts/src/components/List/ListNative.js +7 -6
  16. package/dist/scripts/src/components/Markdown/MarkdownNative.js +84 -85
  17. package/dist/scripts/src/components/{ThemeChanger → ToneChangerButton}/ToneChangerButton.js +0 -1
  18. package/dist/scripts/src/components-core/ComponentDecorator.js +45 -67
  19. package/dist/scripts/src/components-core/InspectorContext.js +15 -5
  20. package/dist/scripts/src/components-core/descriptorHelper.js +16 -3
  21. package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +1 -1
  22. package/dist/scripts/src/components-core/theming/layout-resolver.js +40 -9
  23. package/dist/scripts/src/components-core/utils/extractParam.js +66 -0
  24. package/dist/scripts/src/parsers/style-parser/StyleParser.js +15 -603
  25. package/dist/scripts/src/syntax/grammar.tmLanguage.json +4 -17
  26. package/dist/style.css +1 -1
  27. package/dist/xmlui-metadata.mjs +5179 -5314
  28. package/dist/xmlui-metadata.umd.js +11 -88
  29. package/dist/xmlui-parser.d.ts +1488 -0
  30. package/dist/xmlui-parser.mjs +407 -0
  31. package/dist/xmlui-standalone.umd.js +150 -227
  32. package/dist/xmlui.d.ts +1 -1
  33. package/dist/xmlui.mjs +1 -1
  34. package/package.json +12 -3
  35. package/dist/scripts/src/components/Icon/MoonIcon.js +0 -10
  36. package/dist/scripts/src/components/Icon/SunIcon.js +0 -10
  37. package/dist/scripts/src/components/IconInfoCard/IconInfoCard.js +0 -40
  38. package/dist/scripts/src/components/PageHeader/PageHeader.js +0 -36
  39. package/dist/scripts/src/components/TableHeader/TableHeader.js +0 -34
  40. package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +0 -115
  41. package/dist/scripts/src/components/Toolbar/Toolbar.js +0 -32
  42. package/dist/scripts/src/components/ToolbarButton/ToolbarButton.js +0 -38
  43. package/dist/scripts/src/components/TrendLabel/TrendLabel.js +0 -37
  44. package/dist/scripts/src/parsers/style-parser/style-compiler.js +0 -562
@@ -0,0 +1,1488 @@
1
+ declare type ApiInterceptorDefinition = {
2
+ type?: string;
3
+ config?: Record<string, any>;
4
+ schemaDescriptor?: SchemaDescriptor;
5
+ apiUrl?: string;
6
+ initialData?: Record<string, any[]> | (() => Promise<Record<string, any[]>>);
7
+ helpers?: Record<string, any>;
8
+ initialize?: string;
9
+ operations?: Record<string, InterceptorOperationDef>;
10
+ auth?: AuthDefinition;
11
+ };
12
+
13
+ declare interface ArrayDestructure extends DestructureBase {
14
+ type: "ADestr";
15
+ }
16
+
17
+ declare interface ArrayLiteral extends ExpressionBase {
18
+ type: "ALitE";
19
+ items: Expression[];
20
+ loose?: boolean;
21
+ }
22
+
23
+ declare interface ArrowExpression extends ExpressionBase {
24
+ type: "ArrowE";
25
+ name?: string;
26
+ args: Expression[];
27
+ statement: Statement;
28
+ closureContext?: BlockScope[];
29
+ }
30
+
31
+ declare interface ArrowExpressionStatement extends StatementBase {
32
+ type: "ArrowS";
33
+ expression: ArrowExpression;
34
+ }
35
+
36
+ declare interface AssignmentExpression extends ExpressionBase {
37
+ type: "AsgnE";
38
+ leftValue: Expression;
39
+ operator: AssignmentSymbols;
40
+ operand: Expression;
41
+ }
42
+
43
+ declare type AssignmentSymbols = "=" | "+=" | "-=" | "**=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" | "&&=" | "||=" | "??=";
44
+
45
+ declare type AuthDefinition = {
46
+ defaultLoggedInUser?: any;
47
+ };
48
+
49
+ declare interface BaseNode {
50
+ /**
51
+ * Node type discriminator
52
+ */
53
+ type: Node_3["type"];
54
+ /**
55
+ * Start position (inclusive) of the node
56
+ */
57
+ startPosition?: number;
58
+ /**
59
+ * End position (exclusive)
60
+ */
61
+ endPosition?: number;
62
+ /**
63
+ * Start line number of the start token of the node
64
+ */
65
+ startLine?: number;
66
+ /**
67
+ * End line number of the end token of the node
68
+ */
69
+ endLine?: number;
70
+ /**
71
+ * Start column number (inclusive) of the node
72
+ */
73
+ startColumn?: number;
74
+ /**
75
+ * End column number (exclusive) of the node
76
+ */
77
+ endColumn?: number;
78
+ /**
79
+ * The source code of the expression
80
+ */
81
+ source?: string;
82
+ /**
83
+ * The start token of the node
84
+ */
85
+ startToken?: Token;
86
+ /**
87
+ * The end token of the node
88
+ */
89
+ endToken?: Token;
90
+ }
91
+
92
+ declare interface BinaryExpression extends ExpressionBase {
93
+ type: "BinaryE";
94
+ operator: BinaryOpSymbols;
95
+ left: Expression;
96
+ right: Expression;
97
+ }
98
+
99
+ declare type BinaryOpSymbols = "**" | "*" | "/" | "%" | "+" | "-" | "<<" | ">>" | ">>>" | "<" | "<=" | ">" | ">=" | "==" | "===" | "!=" | "!==" | "&" | "|" | "^" | "&&" | "||" | "??" | "in";
100
+
101
+ declare type BlockScope = {
102
+ vars: Record<string, any>;
103
+ constVars?: Set<string>;
104
+ returnValue?: any;
105
+ };
106
+
107
+ declare interface BlockStatement extends StatementBase {
108
+ type: "BlockS";
109
+ statements: Statement[];
110
+ }
111
+
112
+ declare interface BreakStatement extends StatementBase {
113
+ type: "BrkS";
114
+ }
115
+
116
+ declare interface CalculatedMemberAccessExpression extends ExpressionBase {
117
+ type: "CMembE";
118
+ object: Expression;
119
+ member: Expression;
120
+ }
121
+
122
+ export declare const enum CharacterCodes {
123
+ EOF = -1,
124
+ nullCharacter = 0,
125
+ maxAsciiCharacter = 127,
126
+ lineFeed = 10,
127
+ carriageReturn = 13,
128
+ lineSeparator = 8232,
129
+ paragraphSeparator = 8233,
130
+ nextLine = 133,
131
+ space = 32,
132
+ nonBreakingSpace = 160,
133
+ enQuad = 8192,
134
+ emQuad = 8193,
135
+ enSpace = 8194,
136
+ emSpace = 8195,
137
+ threePerEmSpace = 8196,
138
+ fourPerEmSpace = 8197,
139
+ sixPerEmSpace = 8198,
140
+ figureSpace = 8199,
141
+ punctuationSpace = 8200,
142
+ thinSpace = 8201,
143
+ hairSpace = 8202,
144
+ zeroWidthSpace = 8203,
145
+ narrowNoBreakSpace = 8239,
146
+ ideographicSpace = 12288,
147
+ mathematicalSpace = 8287,
148
+ ogham = 5760,
149
+ replacementCharacter = 65533,
150
+ _ = 95,
151
+ $ = 36,
152
+ _0 = 48,
153
+ _1 = 49,
154
+ _2 = 50,
155
+ _3 = 51,
156
+ _4 = 52,
157
+ _5 = 53,
158
+ _6 = 54,
159
+ _7 = 55,
160
+ _8 = 56,
161
+ _9 = 57,
162
+ a = 97,
163
+ b = 98,
164
+ c = 99,
165
+ d = 100,
166
+ e = 101,
167
+ f = 102,
168
+ g = 103,
169
+ h = 104,
170
+ i = 105,
171
+ j = 106,
172
+ k = 107,
173
+ l = 108,
174
+ m = 109,
175
+ n = 110,
176
+ o = 111,
177
+ p = 112,
178
+ q = 113,
179
+ r = 114,
180
+ s = 115,
181
+ t = 116,
182
+ u = 117,
183
+ v = 118,
184
+ w = 119,
185
+ x = 120,
186
+ y = 121,
187
+ z = 122,
188
+ A = 65,
189
+ B = 66,
190
+ C = 67,
191
+ D = 68,
192
+ E = 69,
193
+ F = 70,
194
+ G = 71,
195
+ H = 72,
196
+ I = 73,
197
+ J = 74,
198
+ K = 75,
199
+ L = 76,
200
+ M = 77,
201
+ N = 78,
202
+ O = 79,
203
+ P = 80,
204
+ Q = 81,
205
+ R = 82,
206
+ S = 83,
207
+ T = 84,
208
+ U = 85,
209
+ V = 86,
210
+ W = 87,
211
+ X = 88,
212
+ Y = 89,
213
+ Z = 90,
214
+ ampersand = 38,
215
+ asterisk = 42,
216
+ at = 64,
217
+ backslash = 92,
218
+ backtick = 96,
219
+ bar = 124,
220
+ caret = 94,
221
+ closeBrace = 125,
222
+ closeBracket = 93,
223
+ closeParen = 41,
224
+ colon = 58,
225
+ comma = 44,
226
+ dot = 46,
227
+ doubleQuote = 34,
228
+ equals = 61,
229
+ exclamation = 33,
230
+ greaterThan = 62,
231
+ hash = 35,
232
+ lessThan = 60,
233
+ minus = 45,
234
+ openBrace = 123,
235
+ openBracket = 91,
236
+ openParen = 40,
237
+ percent = 37,
238
+ plus = 43,
239
+ question = 63,
240
+ semicolon = 59,
241
+ singleQuote = 39,
242
+ slash = 47,
243
+ tilde = 126,
244
+ backspace = 8,
245
+ formFeed = 12,
246
+ byteOrderMark = 65279,
247
+ tab = 9,
248
+ verticalTab = 11
249
+ }
250
+
251
+ export declare const codeBehindFileExtension = "xmlui.xs";
252
+
253
+ declare type CodeDeclaration = {
254
+ source?: string;
255
+ tree: Expression;
256
+ [x: string]: unknown;
257
+ };
258
+
259
+ declare type CollectedDeclarations = {
260
+ vars: Record<string, CodeDeclaration>;
261
+ functions: Record<string, CodeDeclaration>;
262
+ moduleErrors?: ModuleErrors;
263
+ };
264
+
265
+ /**
266
+ * This interface represents the properties of a component definition.
267
+ */
268
+ declare interface ComponentDef<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentDefCore, Scriptable {
269
+ props?: Record<keyof TMd["props"], any>;
270
+ events?: Record<keyof TMd["events"], any>;
271
+ /**
272
+ * Components may have an API that other components can use to interact with them. This property holds
273
+ * the API methods associated with this component definition.
274
+ */
275
+ api?: Record<keyof TMd["apis"], any>;
276
+ /**
277
+ * Components may provide context variables that can be used to in expressions and event handlers
278
+ * within the component.
279
+ * REVIEW: This property can be removed after migration to the new componend definition type.
280
+ */
281
+ contextVars?: Record<keyof TMd["contextVars"], string>;
282
+ }
283
+
284
+ /**
285
+ * This interface represents the core properties of a component definition (independent
286
+ * of component metadata).
287
+ */
288
+ declare interface ComponentDefCore {
289
+ type: string;
290
+ uid?: string;
291
+ testId?: string;
292
+ /**
293
+ * A component can define namespaces on it, with the <ComponentName xmlns:KEY="VALUE" /> syntax
294
+ * these are used later to resolve the `type` of the componentDef.
295
+ * <KEY:Button/> will have type `VALUE.Button` (joined with a "." (dot) )
296
+ */
297
+ namespaces?: Record<string, string>;
298
+ /**
299
+ * Though components manage their state internally, the app logic may require user state management.
300
+ * Components may have user *variables*, which the UI logic uses to manage the application state.
301
+ * This property holds the variables (name and value pairs) associated with this component definition.
302
+ */
303
+ vars?: Record<string, any>;
304
+ /**
305
+ * Each component may have child components to constitute a hierarchy of components. This property
306
+ * holds the definition of these nested children.
307
+ */
308
+ children?: ComponentDef[];
309
+ /**
310
+ * Components may have slots that can be filled with other components. This property holds the
311
+ * contents of the slots
312
+ */
313
+ slots?: Record<string, ComponentDef[]>;
314
+ /**
315
+ * This property is evaluated to a Boolean value during run time. When this value is `true`, the
316
+ * component with its children chain is rendered; otherwise, the entire component hierarchy is omitted
317
+ * from the rendered tree.
318
+ */
319
+ when?: string | boolean;
320
+ /**
321
+ * Some components work with data obtained asynchronously. Fetching this data requires some state
322
+ * management handling the complexity (including error handling) of data access. A *loader* is
323
+ * responsible for managing this logic. This property holds the loaders associated with this component
324
+ * definition.
325
+ */
326
+ loaders?: ComponentDef[];
327
+ /**
328
+ * Components may have functions that are used to perform some logic. This property holds the functions
329
+ * (name and function body) associated with this component definition.
330
+ */
331
+ functions?: Record<string, any>;
332
+ /**
333
+ * Components managing state through variables or loaders are wrapped with containers responsible
334
+ * for this job. Just as components, containers form a hierarchy. While working with this hierarchy,
335
+ * parent components may flow state values (key and value pairs) to their child containers. This
336
+ * property holds the name of state values to flow down to the direct child containers.
337
+ */
338
+ uses?: string[];
339
+ /**
340
+ * Arbitrary debug information that can be attached to a component definition.
341
+ * Current usage:
342
+ * - `debug: { source: { start: number, end: number } }` Ther start and end positions of of the source
343
+ * belonging to the particular component definition.
344
+ */
345
+ debug?: Record<string, any>;
346
+ }
347
+
348
+ export declare const componentFileExtension = "xmlui";
349
+
350
+ /**
351
+ * Sometimes, components and compound components can both be used
352
+ */
353
+ declare type ComponentLike = ComponentDef | CompoundComponentDef;
354
+
355
+ export declare type ComponentLints = {
356
+ lints: {
357
+ message: string;
358
+ kind: LintDiagKind;
359
+ }[];
360
+ componentName: string;
361
+ };
362
+
363
+ /**
364
+ * Components have metadata that the rendering engine uses to render the
365
+ * component. This type defines the structure of such metadata.
366
+ *
367
+ * The type has generic parameters to ensure that type-checking works with
368
+ * the metadata defined here in concert with the renderer object using the
369
+ * same metadata type.
370
+ */
371
+ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>> = {
372
+ status?: "stable" | "experimental" | "deprecated" | "in progress";
373
+ description?: string;
374
+ shortDescription?: string;
375
+ props?: TProps;
376
+ events?: TEvents;
377
+ contextVars?: TContextValues;
378
+ apis?: TApis;
379
+ nonVisual?: boolean;
380
+ opaque?: boolean;
381
+ themeVars?: Array<string>;
382
+ defaultThemeVars?: DefaultThemeVars;
383
+ toneSpecificThemeVars?: Record<string, Record<string, string>>;
384
+ allowArbitraryProps?: boolean;
385
+ specializedFrom?: string;
386
+ docFolder?: string;
387
+ isHtmlTag?: boolean;
388
+ };
389
+
390
+ /**
391
+ * Components have properties, events, context values, and exposed API
392
+ * endpoints, each holding metadata the rendering engine uses at run time.
393
+ * This type defines the structure of such metadata.
394
+ */
395
+ declare type ComponentPropertyMetadata = {
396
+ /**
397
+ * This field defines the description explaining the property. You can use
398
+ * markdown, as the UI may display this value.
399
+ */
400
+ readonly description: string;
401
+ /**
402
+ * This field defines the type of the property. The rendering engine uses this
403
+ * information to validate the property value.
404
+ */
405
+ readonly valueType?: PropertyValueType;
406
+ /**
407
+ * This field defines the available values of the property. The rendering engine
408
+ * uses this information to validate the property value.
409
+ */
410
+ readonly availableValues?: readonly PropertyValueDescription[];
411
+ /**
412
+ * This field defines the default value of the property. The rendering engine uses
413
+ * this information to set the default value of the property.
414
+ */
415
+ defaultValue?: any;
416
+ /**
417
+ * This field defines a validation function that the rendering engine uses to validate
418
+ * the property value. The function returns one or more hinst if the property value is
419
+ * invalid.
420
+ */
421
+ isValid?: IsValidFunction<any>;
422
+ /**
423
+ * Indicates that a particular property is internal and should not be exposed in the
424
+ * documentation
425
+ */
426
+ isInternal?: boolean;
427
+ /**
428
+ * Indicates that a particular property is required for the component to essentially function.
429
+ */
430
+ isRequired?: boolean;
431
+ };
432
+
433
+ export declare const COMPOUND_COMP_ID = "Component";
434
+
435
+ /**
436
+ * XMLUI allows the creation of reusable components assembled from other XMLUI components (with markup).
437
+ * This type represents such components. The name `CompoundComponent` refers to the assembled nature
438
+ * of reusable components.
439
+ */
440
+ declare interface CompoundComponentDef extends Scriptable {
441
+ /**
442
+ * Each compound component must have a unique name. The markup uses this name to refer to the
443
+ * particular compound component.
444
+ */
445
+ name: string;
446
+ /**
447
+ * Each compound component must have a single root component defining the component contents.
448
+ */
449
+ component: ComponentDef;
450
+ /**
451
+ * Compound components may provide an API that other components can use to interact with them. This
452
+ * property holds the API methods associated with this compound component definition.
453
+ */
454
+ api?: Record<string, any>;
455
+ /**
456
+ * This property holds the variables (name and value pairs) associated with this compound component
457
+ * definition.
458
+ */
459
+ vars?: Record<string, any>;
460
+ /**
461
+ * A component can define namespaces on it, with the <ComponentName xmlns:KEY="VALUE" /> syntax
462
+ * these are used later to resolve the `type` of the componentDef.
463
+ * <KEY:Button/> will have type `VALUE.Button` (joined with a "." (dot) )
464
+ */
465
+ namespaces?: Record<string, string>;
466
+ /**
467
+ * Arbitrary debug information that can be attached to a component definition.
468
+ * Current usage:
469
+ * - `debug: { source: { start: number, end: number } }` Ther start and end positions of of the source
470
+ * belonging to the particular component definition.
471
+ */
472
+ debug?: Record<string, any>;
473
+ }
474
+
475
+ declare interface ConditionalExpression extends ExpressionBase {
476
+ type: "CondE";
477
+ condition: Expression;
478
+ consequent: Expression;
479
+ alternate: Expression;
480
+ }
481
+
482
+ declare interface ConstStatement extends StatementBase {
483
+ type: "ConstS";
484
+ declarations: VarDeclaration[];
485
+ isExported?: boolean;
486
+ }
487
+
488
+ declare interface ContinueStatement extends StatementBase {
489
+ type: "ContS";
490
+ }
491
+
492
+ export declare const CORE_NAMESPACE_VALUE = "#xmlui-core-ns";
493
+
494
+ export declare function createScanner(skipTrivia: boolean, textInitial?: string, onError?: ScannerErrorCallback, start?: number, length?: number): Scanner;
495
+
496
+ export declare function createXmlUiParser(source: string): {
497
+ parse: () => ParseResult;
498
+ getText: GetText;
499
+ };
500
+
501
+ declare type DefaultThemeVars = Record<string | ThemeTone, string | Record<string, string>>;
502
+
503
+ declare interface Destructure extends DestructureBase {
504
+ type: "Destr";
505
+ arrayDestruct?: ArrayDestructure[];
506
+ objectDestruct?: ObjectDestructure[];
507
+ }
508
+
509
+ declare interface DestructureBase extends ExpressionBase {
510
+ id?: string;
511
+ arrayDestruct?: ArrayDestructure[];
512
+ objectDestruct?: ObjectDestructure[];
513
+ }
514
+
515
+ export declare const Diag_Attr_Identifier_Expected: {
516
+ readonly category: DiagnosticCategory.Error;
517
+ readonly code: ErrCodes.expAttrIdent;
518
+ readonly message: "An attribute identifier expected.";
519
+ };
520
+
521
+ export declare const Diag_Attr_Value_Expected: {
522
+ readonly category: DiagnosticCategory.Error;
523
+ readonly code: ErrCodes.expAttrValue;
524
+ readonly message: "An attribute value expected.";
525
+ };
526
+
527
+ export declare const Diag_CloseNodeStart_Token_Expected: {
528
+ readonly category: DiagnosticCategory.Error;
529
+ readonly code: ErrCodes.expCloseStart;
530
+ readonly message: "A '</' token expected.";
531
+ };
532
+
533
+ export declare const Diag_End_Or_Close_Token_Expected: {
534
+ readonly category: DiagnosticCategory.Error;
535
+ readonly code: ErrCodes.expEndOrClose;
536
+ readonly message: "A '>' or '/>' token expected.";
537
+ };
538
+
539
+ export declare const Diag_End_Token_Expected: {
540
+ readonly category: DiagnosticCategory.Error;
541
+ readonly code: ErrCodes.expEnd;
542
+ readonly message: "A '>' token expected.";
543
+ };
544
+
545
+ export declare const Diag_Eq_Token_Expected: {
546
+ readonly category: DiagnosticCategory.Error;
547
+ readonly code: ErrCodes.expEq;
548
+ readonly message: "An '=' token expected.";
549
+ };
550
+
551
+ export declare const Diag_Invalid_Character: {
552
+ readonly code: ErrCodes.invalidChar;
553
+ readonly category: DiagnosticCategory.Error;
554
+ readonly message: "Invalid character.";
555
+ };
556
+
557
+ export declare const Diag_OpenNodeStart_Token_Expected: {
558
+ readonly category: DiagnosticCategory.Error;
559
+ readonly code: ErrCodes.expTagOpen;
560
+ readonly message: "A '<' token expected.";
561
+ };
562
+
563
+ export declare const Diag_Tag_Identifier_Expected: {
564
+ readonly category: DiagnosticCategory.Error;
565
+ readonly code: ErrCodes.expTagIdent;
566
+ readonly message: "A tag identifier expected.";
567
+ };
568
+
569
+ export declare const Diag_Unterminated_CData: {
570
+ readonly code: ErrCodes.untermCData;
571
+ readonly category: DiagnosticCategory.Error;
572
+ readonly message: "Unterminated CDATA section";
573
+ };
574
+
575
+ export declare const Diag_Unterminated_Comment: {
576
+ readonly code: ErrCodes.untermComment;
577
+ readonly category: DiagnosticCategory.Error;
578
+ readonly message: "Unterminated comment";
579
+ };
580
+
581
+ export declare const Diag_Unterminated_Script: {
582
+ readonly code: ErrCodes.untermScript;
583
+ readonly category: DiagnosticCategory.Error;
584
+ readonly message: "Unterminated script section";
585
+ };
586
+
587
+ export declare const Diag_Unterminated_String_Literal: {
588
+ readonly code: ErrCodes.untermStr;
589
+ readonly category: DiagnosticCategory.Error;
590
+ readonly message: "Unterminated string literal.";
591
+ };
592
+
593
+ export declare enum DiagnosticCategory {
594
+ Warning = 0,
595
+ Error = 1,
596
+ Suggestion = 2,
597
+ Message = 3
598
+ }
599
+
600
+ export declare function diagnosticCategoryName(d: {
601
+ category: DiagnosticCategory;
602
+ }, lowerCase?: boolean): string;
603
+
604
+ export declare type DiagnosticMessage = DiagnosticMessageFromScanner | DiagnosticMessageFromParser;
605
+
606
+ declare type DiagnosticMessageFromParser = typeof Diag_End_Token_Expected | typeof Diag_CloseNodeStart_Token_Expected | typeof Diag_Tag_Identifier_Expected | typeof Diag_Attr_Value_Expected | typeof Diag_Eq_Token_Expected | typeof Diag_OpenNodeStart_Token_Expected | typeof Diag_End_Or_Close_Token_Expected | typeof Diag_Attr_Identifier_Expected;
607
+
608
+ export declare type DiagnosticMessageFromScanner = typeof Diag_Invalid_Character | typeof Diag_Unterminated_String_Literal | typeof Diag_Unterminated_Comment | typeof Diag_Unterminated_CData | typeof Diag_Unterminated_Script;
609
+
610
+ declare interface DoWhileStatement extends StatementBase {
611
+ type: "DoWS";
612
+ condition: Expression;
613
+ body: Statement;
614
+ }
615
+
616
+ declare interface EmptyStatement extends StatementBase {
617
+ type: "EmptyS";
618
+ }
619
+
620
+ export declare enum ErrCodes {
621
+ onlyOneElem = "U002",
622
+ expTagOpen = "U003",
623
+ expTagIdent = "U004",
624
+ expCloseStart = "U005",
625
+ expEndOrClose = "U006",
626
+ tagNameMismatch = "U007",
627
+ expEnd = "U008",
628
+ expAttrIdent = "U009",
629
+ expEq = "U010",
630
+ expAttrValue = "U011",
631
+ duplAttr = "U012",
632
+ uppercaseAttr = "U013",
633
+ invalidChar = "W001",
634
+ untermStr = "W002",
635
+ untermComment = "W007",
636
+ untermCData = "W008",
637
+ untermScript = "W009"
638
+ }
639
+
640
+ declare interface Error_2 {
641
+ readonly category: DiagnosticCategory;
642
+ readonly code: ErrCodes;
643
+ readonly message: string;
644
+ readonly pos: number;
645
+ readonly end: number;
646
+ }
647
+ export { Error_2 as Error }
648
+
649
+ export declare type ErrorCodes = "U001" | "U002" | "U003" | "U004" | "U005" | "U006" | "U007" | "U008" | "U009" | "U010" | "U011" | "U012" | "U013" | "U014" | "U015" | "T001" | "T002" | "T003" | "T004" | "T005" | "T006" | "T007" | "T008" | "T009" | "T010" | "T011" | "T012" | "T013" | "T014" | "T015" | "T016" | "T017" | "T018" | "T019" | "T020" | "T021" | "T022" | "T023" | "T024" | "T025" | "T026" | "T027" | "T028" | "T029";
650
+
651
+ export declare const errorMessages: ErrorText;
652
+
653
+ declare type ErrorText = Record<ErrorCodes, string>;
654
+
655
+ declare type Expression = UnaryExpression | BinaryExpression | SequenceExpression | ConditionalExpression | FunctionInvocationExpression | MemberAccessExpression | CalculatedMemberAccessExpression | Identifier | Literal | ArrayLiteral | ObjectLiteral | SpreadExpression | AssignmentExpression | NoArgExpression | ArrowExpression | PrefixOpExpression | PostfixOpExpression | ReactiveVarDeclaration | VarDeclaration | Destructure | ObjectDestructure | ArrayDestructure | TemplateLiteralExpression;
656
+
657
+ declare interface ExpressionBase extends BaseNode {
658
+ value?: any;
659
+ parenthesized?: number;
660
+ valueScope?: any;
661
+ valueIndex?: string | number;
662
+ }
663
+
664
+ declare interface ExpressionStatement extends StatementBase {
665
+ type: "ExprS";
666
+ expression: Expression;
667
+ }
668
+
669
+ export declare function findTokenAtPos(node: Node_2, position: number): FindTokenSuccess | undefined;
670
+
671
+ /** If the position is in-between two tokens, the chain to the token just before the cursor is provided as well, but the shared parents are inside field chainAtPos */
672
+ declare type FindTokenSuccess = {
673
+ chainAtPos: Node_2[];
674
+ /** If the position is in-between two tokens, the chain to the token just before the position is provided.
675
+ stores syntax elements from the fork point to the token */
676
+ chainBeforePos?: Node_2[];
677
+ /** Only undefined when chainBeforePos is.
678
+ * chainBeforePos starts with the first node or token after the fork point.
679
+ * This field specifies the index of the 0th element of the chainBeforePos if it's parents were part of the array as well. */
680
+ sharedParents?: number;
681
+ };
682
+
683
+ /**
684
+ * This type describes a font definition resource.
685
+ */
686
+ declare type FontDef = {
687
+ /**
688
+ * Specifies a name that will be used as the font face value for font properties
689
+ */
690
+ fontFamily: string;
691
+ /**
692
+ * A font-style value. Accepts two values to specify a range that is supported by a font-face,
693
+ * for example `font-style: oblique 20deg 50deg`
694
+ */
695
+ fontStyle?: string;
696
+ /**
697
+ * A font-weight value. Accepts two values to specify a range that is supported by a font-face,
698
+ * for example `font-weight: 100 900`
699
+ */
700
+ fontWeight?: string;
701
+ /**
702
+ * This property determines how a font face is displayed based on whether and when it is downloaded
703
+ * and ready to use.
704
+ */
705
+ fontDisplay?: string;
706
+ /**
707
+ * The mime type of the font file
708
+ */
709
+ format?: string;
710
+ /**
711
+ * Specifies references to font resources.
712
+ */
713
+ src: string;
714
+ } | string;
715
+
716
+ declare interface ForInStatement extends StatementBase {
717
+ type: "ForInS";
718
+ varBinding: ForVarBinding;
719
+ id: string;
720
+ expression: Expression;
721
+ body: Statement;
722
+ keys?: string[];
723
+ keyIndex?: number;
724
+ }
725
+
726
+ declare interface ForOfStatement extends StatementBase {
727
+ type: "ForOfS";
728
+ varBinding: ForVarBinding;
729
+ id: string;
730
+ expression: Expression;
731
+ body: Statement;
732
+ iterator?: any;
733
+ }
734
+
735
+ declare interface ForStatement extends StatementBase {
736
+ type: "ForS";
737
+ init?: ExpressionStatement | LetStatement;
738
+ condition?: Expression;
739
+ update?: Expression;
740
+ body: Statement;
741
+ }
742
+
743
+ declare type ForVarBinding = "let" | "const" | "none";
744
+
745
+ declare interface FunctionDeclaration extends StatementBase {
746
+ type: "FuncD";
747
+ name?: string;
748
+ args: Expression[];
749
+ statement: BlockStatement;
750
+ isExported?: boolean;
751
+ closureContext?: BlockScope[];
752
+ }
753
+
754
+ declare interface FunctionInvocationExpression extends ExpressionBase {
755
+ type: "InvokeE";
756
+ object: Expression;
757
+ arguments: Expression[];
758
+ }
759
+
760
+ export declare interface GeneralDiagnosticMessage {
761
+ code: ErrCodes;
762
+ category: DiagnosticCategory;
763
+ message: string;
764
+ }
765
+
766
+ export declare function getLintSeverity(lintSeverityOption: string | undefined): LintSeverity;
767
+
768
+ export declare function getSyntaxKindStrRepr(kind: SyntaxKind): string;
769
+
770
+ export declare type GetText = (n: Node_2, ignoreTrivia?: boolean) => string;
771
+
772
+ declare interface Identifier extends ExpressionBase {
773
+ type: "IdE";
774
+ name: string;
775
+ isGlobal?: boolean;
776
+ }
777
+
778
+ declare interface IfStatement extends StatementBase {
779
+ type: "IfS";
780
+ condition: Expression;
781
+ thenBranch: Statement;
782
+ elseBranch?: Statement;
783
+ }
784
+
785
+ declare interface ImportDeclaration extends StatementBase {
786
+ type: "ImportD";
787
+ imports: Record<string, string>;
788
+ moduleFile: string;
789
+ module?: ScriptModule | null;
790
+ }
791
+
792
+ declare type InterceptorOperationDef = {
793
+ method: "get" | "post" | "put" | "delete";
794
+ url: string | Array<string>;
795
+ handler: string;
796
+ requestShape?: any;
797
+ responseShape?: any;
798
+ pathParamTypes?: Record<string, string>;
799
+ queryParamTypes?: Record<string, string>;
800
+ successStatusCode?: number;
801
+ };
802
+
803
+ export declare function isIdentifierStart(ch: number): boolean;
804
+
805
+ export declare function isInnerNode(token: SyntaxKind): boolean;
806
+
807
+ export declare function isTrivia(token: SyntaxKind): boolean;
808
+
809
+ declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;
810
+
811
+ declare interface LetStatement extends StatementBase {
812
+ type: "LetS";
813
+ declarations: VarDeclaration[];
814
+ }
815
+
816
+ export declare function lint({ component, metadataByComponent, }: {
817
+ component: CompoundComponentDef | ComponentDef;
818
+ metadataByComponent: Record<string, ComponentMetadata>;
819
+ }): LintDiagnostic[];
820
+
821
+ export declare function lintApp({ appDef, metadataByComponent, }: {
822
+ appDef: StandaloneAppDescription;
823
+ metadataByComponent: Record<string, ComponentMetadata>;
824
+ }): ComponentLints[];
825
+
826
+ export declare enum LintDiagKind {
827
+ UnrecognisedProp = 0
828
+ }
829
+
830
+ declare type LintDiagnostic = {
831
+ message: string;
832
+ kind: LintDiagKind;
833
+ };
834
+
835
+ export declare function lintErrorsComponent(lints: ComponentLints[]): ComponentDef<ComponentMetadata<Record<string, any>, Record<string, any>, Record<string, any>, Record<string, any>>>;
836
+
837
+ export declare enum LintSeverity {
838
+ Skip = 0,
839
+ Warning = 1,
840
+ Error = 2
841
+ }
842
+
843
+ declare interface Literal extends ExpressionBase {
844
+ type: "LitE";
845
+ value: any;
846
+ }
847
+
848
+ declare interface MemberAccessExpression extends ExpressionBase {
849
+ type: "MembE";
850
+ object: Expression;
851
+ member: string;
852
+ isOptional?: boolean;
853
+ }
854
+
855
+ /**
856
+ * Represents a module error
857
+ */
858
+ declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;
859
+
860
+ export declare const moduleFileExtension = "xs";
861
+
862
+ declare type ModuleResolver = (sourceModule: string, moduleName: string) => string | null;
863
+
864
+ declare interface NoArgExpression extends ExpressionBase {
865
+ type: "NoArgE";
866
+ }
867
+
868
+ declare interface Node_2 extends ReadonlyTextRange {
869
+ readonly kind: SyntaxKind;
870
+ readonly start: number;
871
+ readonly triviaBefore?: Node_2[];
872
+ readonly children?: Node_2[];
873
+ }
874
+ export { Node_2 as Node }
875
+
876
+ declare type Node_3 = Statement | Expression | SwitchCase;
877
+
878
+ export declare function nodeToComponentDef(node: Node_2, originalGetText: GetText, fileId: string | number, moduleResolver?: ModuleResolver): ComponentDef | CompoundComponentDef | null;
879
+
880
+ declare interface ObjectDestructure extends DestructureBase {
881
+ type: "ODestr";
882
+ id: string;
883
+ alias?: string;
884
+ }
885
+
886
+ declare interface ObjectLiteral extends ExpressionBase {
887
+ type: "OLitE";
888
+ props: (SpreadExpression | [Expression, Expression])[];
889
+ }
890
+
891
+ export declare const onPrefixRegex: RegExp;
892
+
893
+ export declare class ParserError extends Error {
894
+ code?: string;
895
+ constructor(message: string, code?: string);
896
+ }
897
+
898
+ export declare interface ParserErrorMessage {
899
+ code: ErrorCodes;
900
+ text: string;
901
+ position: number;
902
+ line: number;
903
+ column: number;
904
+ }
905
+
906
+ export declare type ParseResult = {
907
+ node: Node_2;
908
+ errors: Error_2[];
909
+ };
910
+
911
+ export declare function parseXmlUiMarkup(text: string): ParseResult;
912
+
913
+ declare interface PostfixOpExpression extends ExpressionBase {
914
+ type: "PostfE";
915
+ operator: PrefixOpSymbol;
916
+ operand: Expression;
917
+ }
918
+
919
+ declare interface PrefixOpExpression extends ExpressionBase {
920
+ type: "PrefE";
921
+ operator: PrefixOpSymbol;
922
+ operand: Expression;
923
+ }
924
+
925
+ declare type PrefixOpSymbol = "++" | "--";
926
+
927
+ export declare function printComponentLints(lintDiags: ComponentLints): void;
928
+
929
+ /**
930
+ * This type represents the description of a property value, which can be a string, a number,
931
+ * or an object with a value and a description. This type is used in the metadata of a component.
932
+ */
933
+ declare type PropertyValueDescription = string | number | {
934
+ value: string | number;
935
+ description: string;
936
+ };
937
+
938
+ declare type PropertyValueType = "boolean" | "string" | "number" | "any" | "ComponentDef";
939
+
940
+ declare interface ReactiveVarDeclaration extends ExpressionBase {
941
+ type: "RVarD";
942
+ id: string;
943
+ expression: Expression;
944
+ }
945
+
946
+ declare interface ReadonlyTextRange {
947
+ readonly pos: number;
948
+ readonly end: number;
949
+ }
950
+
951
+ declare interface ReturnStatement extends StatementBase {
952
+ type: "RetS";
953
+ expression?: Expression;
954
+ }
955
+
956
+ export declare interface Scanner {
957
+ getStartPos(): number;
958
+ getToken(): SyntaxKind;
959
+ getTokenStart(): number;
960
+ getTokenEnd(): number;
961
+ getTokenText(): string;
962
+ getTokenValue(): string;
963
+ isIdentifier(): boolean;
964
+ peekChar(ahead?: number): number | null;
965
+ scanChar(): number | null;
966
+ scan(): SyntaxKind;
967
+ scanTrivia(): SyntaxKind | null;
968
+ scanText(): SyntaxKind;
969
+ getText(): string;
970
+ setText(text: string | undefined, start?: number, length?: number): void;
971
+ setOnError(onError: ScannerErrorCallback | undefined): void;
972
+ resetTokenState(pos: number): void;
973
+ back(): void;
974
+ }
975
+
976
+ export declare type ScannerErrorCallback = (message: DiagnosticMessageFromScanner, length: number, arg0?: any) => void;
977
+
978
+ declare type SchemaDescriptor = {
979
+ tables: Array<TableDescriptor>;
980
+ relationships?: any;
981
+ dtos?: any;
982
+ };
983
+
984
+ /**
985
+ * This interface holds the properties representing a scriptable component definition.
986
+ */
987
+ declare interface Scriptable {
988
+ /**
989
+ * This property holds the text defined in all <script> sections attached to a component.
990
+ */
991
+ script?: string;
992
+ /**
993
+ * This property holds the parsed form of scripts stored in code-behind files.
994
+ */
995
+ scriptCollected?: CollectedDeclarations;
996
+ /**
997
+ * This property holds errors coming from parsing the code-behind scripts.
998
+ */
999
+ scriptError?: any;
1000
+ }
1001
+
1002
+ /**
1003
+ * Represents a parsed and resolved module
1004
+ */
1005
+ declare type ScriptModule = {
1006
+ type: "ScriptModule";
1007
+ name: string;
1008
+ parent?: ScriptModule | null;
1009
+ exports: Map<string, any>;
1010
+ imports: Record<string, Record<string, any>>;
1011
+ importedModules: ScriptModule[];
1012
+ functions: Record<string, FunctionDeclaration>;
1013
+ statements: Statement[];
1014
+ executed: boolean;
1015
+ };
1016
+
1017
+ declare interface ScriptParserErrorMessage {
1018
+ code: ScriptParsingErrorCodes;
1019
+ text: string;
1020
+ position?: number;
1021
+ line?: number;
1022
+ column?: number;
1023
+ }
1024
+
1025
+ declare type ScriptParsingErrorCodes = "W001" | "W002" | "W003" | "W004" | "W005" | "W006" | "W007" | "W008" | "W009" | "W010" | "W011" | "W012" | "W013" | "W014" | "W015" | "W016" | "W017" | "W018" | "W019" | "W020" | "W021" | "W022" | "W023" | "W024" | "W025" | "W026" | "W027" | "W028" | "W029" | "W030" | "W031";
1026
+
1027
+ declare interface SequenceExpression extends ExpressionBase {
1028
+ type: "SeqE";
1029
+ expressions: Expression[];
1030
+ loose?: boolean;
1031
+ }
1032
+
1033
+ declare interface SpreadExpression extends ExpressionBase {
1034
+ type: "SpreadE";
1035
+ operand: Expression;
1036
+ }
1037
+
1038
+ declare type StandaloneAppDescription = {
1039
+ name?: string;
1040
+ version?: string;
1041
+ entryPoint?: ComponentLike;
1042
+ components?: CompoundComponentDef[];
1043
+ themes?: ThemeDefinition[];
1044
+ defaultTheme?: string;
1045
+ defaultTone?: string;
1046
+ resources?: Record<string, string>;
1047
+ resourceMap?: Record<string, string>;
1048
+ appGlobals?: Record<string, any>;
1049
+ apiInterceptor?: ApiInterceptorDefinition;
1050
+ sources?: Record<string, string>;
1051
+ };
1052
+
1053
+ declare type Statement = BlockStatement | EmptyStatement | ExpressionStatement | ArrowExpressionStatement | LetStatement | ConstStatement | VarStatement | IfStatement | ReturnStatement | BreakStatement | ContinueStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ThrowStatement | TryStatement | SwitchStatement | FunctionDeclaration | ImportDeclaration;
1054
+
1055
+ declare interface StatementBase extends BaseNode {
1056
+ guard?: boolean;
1057
+ removeBlockScope?: boolean;
1058
+ completeTryBlock?: boolean;
1059
+ completeCatchBlock?: boolean;
1060
+ completeFinallyBlock?: boolean;
1061
+ }
1062
+
1063
+ declare interface SwitchCase extends BaseNode {
1064
+ type: "SwitchC";
1065
+ caseExpression?: Expression;
1066
+ statements?: Statement[];
1067
+ }
1068
+
1069
+ declare interface SwitchStatement extends StatementBase {
1070
+ type: "SwitchS";
1071
+ expression: Expression;
1072
+ cases: SwitchCase[];
1073
+ }
1074
+
1075
+ /** tokens and nodes combined. Order is significant since the functions below use the numeric values of this enum to check for a range of possible values*/
1076
+ export declare const enum SyntaxKind {
1077
+ Unknown = 0,
1078
+ EndOfFileToken = 1,
1079
+ CommentTrivia = 2,
1080
+ NewLineTrivia = 3,
1081
+ WhitespaceTrivia = 4,
1082
+ Identifier = 5,
1083
+ OpenNodeStart = 6,
1084
+ CloseNodeStart = 7,
1085
+ NodeEnd = 8,
1086
+ NodeClose = 9,
1087
+ Colon = 10,
1088
+ Equal = 11,
1089
+ StringLiteral = 12,
1090
+ CData = 13,
1091
+ Script = 14,
1092
+ TextNode = 15,
1093
+ AmpersandEntity = 16,
1094
+ LessThanEntity = 17,
1095
+ GreaterThanEntity = 18,
1096
+ SingleQuoteEntity = 19,
1097
+ DoubleQuoteEntity = 20,
1098
+ ElementNode = 21,
1099
+ AttributeNode = 22,
1100
+ AttributeKeyNode = 23,
1101
+ ContentListNode = 24,
1102
+ AttributeListNode = 25,
1103
+ TagNameNode = 26,
1104
+ ErrorNode = 27
1105
+ }
1106
+
1107
+ declare type TableDescriptor = {
1108
+ name: string;
1109
+ fields?: Record<string, any>;
1110
+ pk: Array<string>;
1111
+ indexes?: Array<string>;
1112
+ };
1113
+
1114
+ /** Disregards error nodes amongst the children of the 2 compared name node. (Those reported an error earlyer anyways)*/
1115
+ export declare function tagNameNodesWithoutErrorsMatch(name1: Node_2, name2: Node_2, getText: GetText): boolean;
1116
+
1117
+ declare interface TemplateLiteralExpression extends ExpressionBase {
1118
+ type: "TempLitE";
1119
+ segments: (Literal | Expression)[];
1120
+ }
1121
+
1122
+ /**
1123
+ * This type represents a theme definition object. Theme files can use this object's JSON-serialized
1124
+ * format to define an app theme; an app can have multiple theme files.
1125
+ */
1126
+ declare interface ThemeDefinition extends ThemeDefinitionDetails {
1127
+ /**
1128
+ * Theme id
1129
+ */
1130
+ id: string;
1131
+ /**
1132
+ * Optional theme name
1133
+ */
1134
+ name?: string;
1135
+ /**
1136
+ * A theme can extend existing themes. The extension means that the theme variable values defined
1137
+ * in the new theme override the base theme's variable values.
1138
+ */
1139
+ extends?: string | Array<string>;
1140
+ /**
1141
+ * This property defines the tone-dependent theme variable values. When a theme variable value is
1142
+ * resolved, the common theme variable values are overridden with their theme-specific values.
1143
+ */
1144
+ tones?: Record<string | ThemeTone_2, ThemeDefinitionDetails>;
1145
+ }
1146
+
1147
+ declare interface ThemeDefinitionDetails {
1148
+ themeVars?: Record<string, string>;
1149
+ resources?: Record<string, string | FontDef>;
1150
+ }
1151
+
1152
+ /**
1153
+ * This type describes one the available theme tones.
1154
+ */
1155
+ declare type ThemeTone = (typeof ThemeToneKeys)[number];
1156
+
1157
+ /**
1158
+ * This type describes one the available theme tones.
1159
+ */
1160
+ declare type ThemeTone_2 = (typeof ThemeToneKeys_2)[number];
1161
+
1162
+ /**
1163
+ * Each theme can have a light or a dark tone.
1164
+ */
1165
+ declare const ThemeToneKeys: readonly ["light", "dark"];
1166
+
1167
+ /**
1168
+ * Each theme can have a light or a dark tone.
1169
+ */
1170
+ declare const ThemeToneKeys_2: readonly ["light", "dark"];
1171
+
1172
+ declare interface ThrowStatement extends StatementBase {
1173
+ type: "ThrowS";
1174
+ expression: Expression;
1175
+ }
1176
+
1177
+ export declare function toDbgString(node: Node_2, getText: (node: Node_2) => string, indentationLvl?: number): string;
1178
+
1179
+ declare type Token = {
1180
+ readonly text: string;
1181
+ readonly type: TokenType;
1182
+ readonly location: TokenLocation;
1183
+ };
1184
+
1185
+ declare interface TokenLocation {
1186
+ readonly startPosition: number;
1187
+ readonly endPosition: number;
1188
+ readonly startLine: number;
1189
+ readonly endLine: number;
1190
+ readonly startColumn: number;
1191
+ readonly endColumn: number;
1192
+ }
1193
+
1194
+ declare const enum TokenType {
1195
+ Eof = -1,
1196
+ Ws = -2,
1197
+ BlockComment = -3,
1198
+ EolComment = -4,
1199
+ Unknown = 0,
1200
+ LParent = 1,
1201
+ RParent = 2,
1202
+ Identifier = 3,
1203
+ Exponent = 4,
1204
+ Divide = 5,
1205
+ Multiply = 6,
1206
+ Remainder = 7,
1207
+ Plus = 8,
1208
+ Minus = 9,
1209
+ BitwiseXor = 10,
1210
+ BitwiseOr = 11,
1211
+ LogicalOr = 12,
1212
+ BitwiseAnd = 13,
1213
+ LogicalAnd = 14,
1214
+ IncOp = 15,
1215
+ DecOp = 16,
1216
+ Assignment = 17,
1217
+ AddAssignment = 18,
1218
+ SubtractAssignment = 19,
1219
+ ExponentAssignment = 20,
1220
+ MultiplyAssignment = 21,
1221
+ DivideAssignment = 22,
1222
+ RemainderAssignment = 23,
1223
+ ShiftLeftAssignment = 24,
1224
+ ShiftRightAssignment = 25,
1225
+ SignedShiftRightAssignment = 26,
1226
+ BitwiseAndAssignment = 27,
1227
+ BitwiseXorAssignment = 28,
1228
+ BitwiseOrAssignment = 29,
1229
+ LogicalAndAssignment = 30,
1230
+ LogicalOrAssignment = 31,
1231
+ NullCoalesceAssignment = 32,
1232
+ Semicolon = 33,
1233
+ Comma = 34,
1234
+ Colon = 35,
1235
+ LSquare = 36,
1236
+ RSquare = 37,
1237
+ QuestionMark = 38,
1238
+ NullCoalesce = 39,
1239
+ OptionalChaining = 40,
1240
+ BinaryNot = 41,
1241
+ LBrace = 42,
1242
+ RBrace = 43,
1243
+ Equal = 44,
1244
+ StrictEqual = 45,
1245
+ LogicalNot = 46,
1246
+ NotEqual = 47,
1247
+ StrictNotEqual = 48,
1248
+ LessThan = 49,
1249
+ LessThanOrEqual = 50,
1250
+ ShiftLeft = 51,
1251
+ GreaterThan = 52,
1252
+ GreaterThanOrEqual = 53,
1253
+ ShiftRight = 54,
1254
+ SignedShiftRight = 55,
1255
+ Dot = 56,
1256
+ Spread = 57,
1257
+ Global = 58,
1258
+ Backtick = 59,
1259
+ DollarLBrace = 60,
1260
+ Arrow = 61,
1261
+ DecimalLiteral = 62,
1262
+ HexadecimalLiteral = 63,
1263
+ BinaryLiteral = 64,
1264
+ RealLiteral = 65,
1265
+ StringLiteral = 66,
1266
+ Infinity = 67,
1267
+ NaN = 68,
1268
+ True = 69,
1269
+ False = 70,
1270
+ Typeof = 71,
1271
+ Null = 72,
1272
+ Undefined = 73,
1273
+ In = 74,
1274
+ Let = 75,
1275
+ Const = 76,
1276
+ Var = 77,
1277
+ If = 78,
1278
+ Else = 79,
1279
+ Return = 80,
1280
+ Break = 81,
1281
+ Continue = 82,
1282
+ Do = 83,
1283
+ While = 84,
1284
+ For = 85,
1285
+ Of = 86,
1286
+ Try = 87,
1287
+ Catch = 88,
1288
+ Finally = 89,
1289
+ Throw = 90,
1290
+ Switch = 91,
1291
+ Case = 92,
1292
+ Default = 93,
1293
+ Delete = 94,
1294
+ Function = 95,
1295
+ Export = 96,
1296
+ Import = 97,
1297
+ As = 98,
1298
+ From = 99
1299
+ }
1300
+
1301
+ declare interface TryStatement extends StatementBase {
1302
+ type: "TryS";
1303
+ tryBlock: BlockStatement;
1304
+ catchBlock?: BlockStatement;
1305
+ catchVariable?: string;
1306
+ finallyBlock?: BlockStatement;
1307
+ }
1308
+
1309
+ export declare const UCRegex: RegExp;
1310
+
1311
+ declare interface UnaryExpression extends ExpressionBase {
1312
+ type: "UnaryE";
1313
+ operator: UnaryOpSymbols;
1314
+ operand: Expression;
1315
+ }
1316
+
1317
+ declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
1318
+
1319
+ declare interface VarDeclaration extends ExpressionBase {
1320
+ type: "VarD";
1321
+ id?: string;
1322
+ arrayDestruct?: ArrayDestructure[];
1323
+ objectDestruct?: ObjectDestructure[];
1324
+ expression?: Expression;
1325
+ }
1326
+
1327
+ declare interface VarStatement extends StatementBase {
1328
+ type: "VarS";
1329
+ declarations: ReactiveVarDeclaration[];
1330
+ }
1331
+
1332
+ declare interface WhileStatement extends StatementBase {
1333
+ type: "WhileS";
1334
+ condition: Expression;
1335
+ body: Statement;
1336
+ }
1337
+
1338
+ export declare interface XmlUiAttribute extends XmlUiNodeBase {
1339
+ type: "XmlUiAttribute";
1340
+ name: string;
1341
+ namespace?: string;
1342
+ value?: string;
1343
+ preserveQuotes?: boolean;
1344
+ preserveSpaces?: boolean;
1345
+ }
1346
+
1347
+ export declare interface XmlUiComment extends XmlUiNodeBase {
1348
+ type: "XmlUiComment";
1349
+ text?: string;
1350
+ }
1351
+
1352
+ export declare interface XmlUiElement extends XmlUiNodeBase {
1353
+ type: "XmlUiElement";
1354
+ name: string;
1355
+ namespace?: string;
1356
+ attributes?: XmlUiAttribute[];
1357
+ text?: string;
1358
+ preserveSpaces?: boolean;
1359
+ childNodes?: XmlUiNode[];
1360
+ }
1361
+
1362
+ export declare type XmlUiFragment = XmlUiNode | XmlUiNode[];
1363
+
1364
+ /**
1365
+ * Helper class for UEML serialization and parsing
1366
+ */
1367
+ export declare class XmlUiHelper {
1368
+ /**
1369
+ * Serialize the specified XML fragment into a string
1370
+ * @param xml XML fragment to serialize
1371
+ * @param options Formatting options to use
1372
+ */
1373
+ serialize(xml: XmlUiFragment, options?: XmluiSerializationOptions): string;
1374
+ /**
1375
+ * Transform the specified component definition into an UEML node
1376
+ * @param def Component definitions
1377
+ * @param options Transformation options
1378
+ */
1379
+ transformComponentDefinition(def: ComponentDef | CompoundComponentDef, options?: XmlUiTransformOptions): XmlUiFragment;
1380
+ /**
1381
+ * Transform the specified object into an UEML nodes
1382
+ * @param def Object definition
1383
+ * @param options Transformation options
1384
+ */
1385
+ transformObject(def: Record<string, any>, options?: XmlUiTransformOptions): XmlUiNode[] | null;
1386
+ /**
1387
+ * Transforms the specified simple component definition into an UEML node
1388
+ * @param def Component definition
1389
+ * @param options Transformation options
1390
+ */
1391
+ private transformSimpleComponentDefinition;
1392
+ /**
1393
+ * Transforms the specified simple component definition into an Xml node
1394
+ * @param def Compound component definition
1395
+ * @param options Transformation options
1396
+ */
1397
+ private transformCompoundComponentDefinition;
1398
+ /**
1399
+ * Transforms a value into an UEML element
1400
+ * @param nodeName Name of the value node
1401
+ * @param name Optional (property) name
1402
+ * @param value Value to transform
1403
+ * @param options Transformation options
1404
+ */
1405
+ private transformValue;
1406
+ /**
1407
+ * Transforms the specified simple component definition into an Xml node
1408
+ * @param name Element name
1409
+ * @param value Value to transform
1410
+ * @param options Transformation options
1411
+ */
1412
+ private transformObjectValue;
1413
+ /**
1414
+ * Add a property to the specified UEML element
1415
+ * @param element XML element
1416
+ * @param name Element name
1417
+ * @param value Element value
1418
+ * @param options Transformation options
1419
+ */
1420
+ private addProperty;
1421
+ private addComponentElement;
1422
+ /**
1423
+ * Adds a list to the specified XML element
1424
+ * @param element XML element
1425
+ * @param name Name of the list (child in `element`)
1426
+ * @param prefix Prefix to use for the list
1427
+ * @param list List with items
1428
+ * @param options Transformation options
1429
+ */
1430
+ private addList;
1431
+ /**
1432
+ * Adds a component list to the specified element
1433
+ * @param element XML element
1434
+ * @param name Name to use for the wrapper element
1435
+ * @param list List with component items
1436
+ * @private
1437
+ */
1438
+ private addComponentList;
1439
+ }
1440
+
1441
+ export declare type XmlUiNode = XmlUiComment | XmlUiAttribute | XmlUiElement;
1442
+
1443
+ export declare interface XmlUiNodeBase {
1444
+ type: XmlUiNode["type"];
1445
+ }
1446
+
1447
+ export declare type XmluiSerializationOptions = {
1448
+ prettify?: boolean;
1449
+ indents?: number;
1450
+ lineLength?: number;
1451
+ useQuotes?: boolean;
1452
+ useSpaceBeforeClose?: boolean;
1453
+ breakClosingTag?: boolean;
1454
+ };
1455
+
1456
+ /**
1457
+ * Options to use with markup transformation from memory format to UEML structure
1458
+ */
1459
+ export declare type XmlUiTransformOptions = {
1460
+ preserveLineBreaks?: boolean;
1461
+ preserveSpecialChars?: boolean;
1462
+ removeQuotes?: boolean;
1463
+ extractProps?: boolean;
1464
+ preferTextToValue?: boolean;
1465
+ };
1466
+
1467
+ export { }
1468
+
1469
+
1470
+ declare module "@tanstack/table-core" {
1471
+ interface TableMeta<TData extends RowData> {
1472
+ cellRenderer: (...args: any[]) => any;
1473
+ }
1474
+ interface ColumnMeta<TData extends RowData, TValue> {
1475
+ style?: CSSProperties;
1476
+ starSizedWidth?: string;
1477
+ accessorKey?: string;
1478
+ pinTo?: string;
1479
+ cellRenderer?: (row: any, rowIdx: number, colIdx: number, value?: any) => ReactNode;
1480
+ }
1481
+ }
1482
+
1483
+
1484
+ declare global {
1485
+ interface Window {
1486
+ TEST_ENV: StandaloneAppDescription | undefined;
1487
+ }
1488
+ }