xmlui 0.7.24 → 0.7.25

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 (39) hide show
  1. package/dist/{apiInterceptorWorker-C6UAUhRI.mjs → apiInterceptorWorker-B0H9MD6w.mjs} +1 -1
  2. package/dist/{index-BcnKqeXb.mjs → index-Brmiu4kS.mjs} +12373 -11797
  3. package/dist/index.css +1 -1
  4. package/dist/scripts/src/components/Badge/Badge.js +2 -6
  5. package/dist/scripts/src/components/Card/Card.js +1 -2
  6. package/dist/scripts/src/components/Checkbox/Checkbox.js +8 -2
  7. package/dist/scripts/src/components/ComponentProvider.js +4 -0
  8. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +2 -2
  9. package/dist/scripts/src/components/Footer/Footer.js +1 -1
  10. package/dist/scripts/src/components/FormItem/FormItem.js +10 -4
  11. package/dist/scripts/src/components/FormItem/FormItemNative.js +3 -3
  12. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +2 -2
  13. package/dist/scripts/src/components/FormSection/FormSection.js +2 -1
  14. package/dist/scripts/src/components/Heading/Heading.js +7 -14
  15. package/dist/scripts/src/components/HtmlTags/HtmlTags.js +39 -0
  16. package/dist/scripts/src/components/Markdown/Markdown.js +1 -1
  17. package/dist/scripts/src/components/Markdown/MarkdownNative.js +90 -2
  18. package/dist/scripts/src/components/Option/Option.js +7 -2
  19. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +7 -4
  20. package/dist/scripts/src/components/RadioGroup/RadioItem.js +19 -0
  21. package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +49 -0
  22. package/dist/scripts/src/components/Splitter/Splitter.js +8 -10
  23. package/dist/scripts/src/components/Stack/Stack.js +30 -15
  24. package/dist/scripts/src/components/Toggle/Toggle.js +36 -18
  25. package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +1 -3
  26. package/dist/scripts/src/components-core/theming/ThemeProvider.js +1 -1
  27. package/dist/scripts/src/components-core/theming/extendThemeUtils.js +0 -67
  28. package/dist/scripts/src/components-core/theming/layout-resolver.js +1 -20
  29. package/dist/scripts/src/components-core/theming/transformThemeVars.js +185 -49
  30. package/dist/scripts/src/components-core/xmlui-parser.js +17 -2
  31. package/dist/scripts/src/parsers/xmlui-parser/ParserError.js +2 -2
  32. package/dist/scripts/src/parsers/xmlui-parser/transform.js +3 -3
  33. package/dist/style.css +1 -1
  34. package/dist/xmlui-metadata.mjs +2593 -2559
  35. package/dist/xmlui-metadata.umd.js +19 -18
  36. package/dist/xmlui-standalone.umd.js +198 -197
  37. package/dist/xmlui.d.ts +1 -8
  38. package/dist/xmlui.mjs +1 -1
  39. package/package.json +3 -2
@@ -142,6 +142,8 @@ function generateButtonTones(theme) {
142
142
  return ret;
143
143
  }
144
144
  const paddingRegEx = /^padding-(?!(?:horizontal|vertical|left|right|top|bottom)-)(.+)$/;
145
+ const paddingHorizontalRegEx = /^padding-(horizontal)-(.+)$/;
146
+ const paddingVerticalRegEx = /^padding-(vertical)-(.+)$/;
145
147
  /**
146
148
  * Segment the padding values into top, right, bottom, left to provide consistency
147
149
  */
@@ -152,9 +154,26 @@ function generatePaddingSegments(theme) {
152
154
  const result = Object.assign({}, theme);
153
155
  // --- Iterate through theme variables and split padding values
154
156
  Object.entries(theme).forEach(([key, value]) => {
155
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
156
- var _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7;
157
- const match = paddingRegEx.exec(key);
157
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
158
+ var _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
159
+ // --- Check the "padding-horizontal" theme variables
160
+ let match = paddingHorizontalRegEx.exec(key);
161
+ if (match) {
162
+ // --- We have a padding-horizontal value to segment
163
+ const remainder = match[2];
164
+ (_a = result[_w = `padding-left-${remainder}`]) !== null && _a !== void 0 ? _a : (result[_w] = value);
165
+ (_b = result[_x = `padding-right-${remainder}`]) !== null && _b !== void 0 ? _b : (result[_x] = value);
166
+ }
167
+ // --- Check the "padding-vertical" theme variables
168
+ match = paddingVerticalRegEx.exec(key);
169
+ if (match) {
170
+ // --- We have a padding-vertical value to segment
171
+ const remainder = match[2];
172
+ (_c = result[_y = `padding-top-${remainder}`]) !== null && _c !== void 0 ? _c : (result[_y] = value);
173
+ (_d = result[_z = `padding-bottom-${remainder}`]) !== null && _d !== void 0 ? _d : (result[_z] = value);
174
+ }
175
+ // --- Check the "padding" theme variables
176
+ match = paddingRegEx.exec(key);
158
177
  if (!match)
159
178
  return;
160
179
  const remainder = match[1];
@@ -165,28 +184,28 @@ function generatePaddingSegments(theme) {
165
184
  const segments = value.trim().replace(/ +/g, " ").split(" ");
166
185
  switch (segments.length) {
167
186
  case 1:
168
- (_a = result[_s = `padding-top-${remainder}`]) !== null && _a !== void 0 ? _a : (result[_s] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
169
- (_b = result[_t = `padding-right-${remainder}`]) !== null && _b !== void 0 ? _b : (result[_t] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[0]);
170
- (_c = result[_u = `padding-bottom-${remainder}`]) !== null && _c !== void 0 ? _c : (result[_u] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
171
- (_d = result[_v = `padding-left-${remainder}`]) !== null && _d !== void 0 ? _d : (result[_v] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[0]);
187
+ (_e = result[_0 = `padding-top-${remainder}`]) !== null && _e !== void 0 ? _e : (result[_0] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
188
+ (_f = result[_1 = `padding-right-${remainder}`]) !== null && _f !== void 0 ? _f : (result[_1] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[0]);
189
+ (_g = result[_2 = `padding-bottom-${remainder}`]) !== null && _g !== void 0 ? _g : (result[_2] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
190
+ (_h = result[_3 = `padding-left-${remainder}`]) !== null && _h !== void 0 ? _h : (result[_3] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[0]);
172
191
  break;
173
192
  case 2:
174
- (_e = result[_w = `padding-top-${remainder}`]) !== null && _e !== void 0 ? _e : (result[_w] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
175
- (_f = result[_x = `padding-right-${remainder}`]) !== null && _f !== void 0 ? _f : (result[_x] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
176
- (_g = result[_y = `padding-bottom-${remainder}`]) !== null && _g !== void 0 ? _g : (result[_y] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
177
- (_h = result[_z = `padding-left-${remainder}`]) !== null && _h !== void 0 ? _h : (result[_z] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
193
+ (_j = result[_4 = `padding-top-${remainder}`]) !== null && _j !== void 0 ? _j : (result[_4] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
194
+ (_k = result[_5 = `padding-right-${remainder}`]) !== null && _k !== void 0 ? _k : (result[_5] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
195
+ (_l = result[_6 = `padding-bottom-${remainder}`]) !== null && _l !== void 0 ? _l : (result[_6] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
196
+ (_m = result[_7 = `padding-left-${remainder}`]) !== null && _m !== void 0 ? _m : (result[_7] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
178
197
  break;
179
198
  case 3:
180
- (_j = result[_0 = `padding-top-${remainder}`]) !== null && _j !== void 0 ? _j : (result[_0] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
181
- (_k = result[_1 = `padding-right-${remainder}`]) !== null && _k !== void 0 ? _k : (result[_1] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
182
- (_l = result[_2 = `padding-bottom-${remainder}`]) !== null && _l !== void 0 ? _l : (result[_2] = vertical !== null && vertical !== void 0 ? vertical : segments[2]);
183
- (_m = result[_3 = `padding-left-${remainder}`]) !== null && _m !== void 0 ? _m : (result[_3] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
199
+ (_o = result[_8 = `padding-top-${remainder}`]) !== null && _o !== void 0 ? _o : (result[_8] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
200
+ (_p = result[_9 = `padding-right-${remainder}`]) !== null && _p !== void 0 ? _p : (result[_9] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
201
+ (_q = result[_10 = `padding-bottom-${remainder}`]) !== null && _q !== void 0 ? _q : (result[_10] = vertical !== null && vertical !== void 0 ? vertical : segments[2]);
202
+ (_r = result[_11 = `padding-left-${remainder}`]) !== null && _r !== void 0 ? _r : (result[_11] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
184
203
  break;
185
204
  case 4:
186
- (_o = result[_4 = `padding-top-${remainder}`]) !== null && _o !== void 0 ? _o : (result[_4] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
187
- (_p = result[_5 = `padding-right-${remainder}`]) !== null && _p !== void 0 ? _p : (result[_5] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
188
- (_q = result[_6 = `padding-bottom-${remainder}`]) !== null && _q !== void 0 ? _q : (result[_6] = vertical !== null && vertical !== void 0 ? vertical : segments[2]);
189
- (_r = result[_7 = `padding-left-${remainder}`]) !== null && _r !== void 0 ? _r : (result[_7] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[3]);
205
+ (_s = result[_12 = `padding-top-${remainder}`]) !== null && _s !== void 0 ? _s : (result[_12] = vertical !== null && vertical !== void 0 ? vertical : segments[0]);
206
+ (_t = result[_13 = `padding-right-${remainder}`]) !== null && _t !== void 0 ? _t : (result[_13] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[1]);
207
+ (_u = result[_14 = `padding-bottom-${remainder}`]) !== null && _u !== void 0 ? _u : (result[_14] = vertical !== null && vertical !== void 0 ? vertical : segments[2]);
208
+ (_v = result[_15 = `padding-left-${remainder}`]) !== null && _v !== void 0 ? _v : (result[_15] = horizontal !== null && horizontal !== void 0 ? horizontal : segments[3]);
190
209
  break;
191
210
  default:
192
211
  return;
@@ -202,6 +221,12 @@ const thicknessBorderVerticalRegEx = /^thickness-border-(vertical)-(.+)$/;
202
221
  const styleBorderRegEx = /^style-border-(?!(?:horizontal|vertical|left|right|top|bottom)-)(.+)$/;
203
222
  const styleBorderHorizontalRegEx = /^style-border-(horizontal)-(.+)$/;
204
223
  const styleBorderVerticalRegEx = /^style-border-(vertical)-(.+)$/;
224
+ const borderLeftRegEx = /^border-(left)-(.+)$/;
225
+ const borderRightRegEx = /^border-(right)-(.+)$/;
226
+ const borderTopRegEx = /^border-(top)-(.+)$/;
227
+ const borderBottomRegEx = /^border-(bottom)-(.+)$/;
228
+ const borderHorizontalRegEx = /^border-(horizontal)-(.+)$/;
229
+ const borderVerticalRegEx = /^border-(vertical)-(.+)$/;
205
230
  const colorBorderRegEx = /^color-border-(?!(?:horizontal|vertical|left|right|top|bottom)-)(.+)$/;
206
231
  const colorBorderHorizontalRegEx = /^color-border-(horizontal)-(.+)$/;
207
232
  const colorBorderVerticalRegEx = /^color-border-(vertical)-(.+)$/;
@@ -213,24 +238,127 @@ function generateBorderSegments(theme) {
213
238
  return {};
214
239
  }
215
240
  const result = Object.assign({}, theme);
241
+ let hasCard = false;
216
242
  // --- Iterate through theme variables and split border values
217
243
  Object.entries(theme).forEach(([key, value]) => {
218
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
219
- var _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29;
244
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
245
+ var _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37;
246
+ // --- Check "border-horizontal" theme variables
247
+ let match = borderHorizontalRegEx.exec(key);
248
+ if (match) {
249
+ // --- We have a border-horizontal value to segment
250
+ const remainder = match[2];
251
+ const border = getBorderSegments(value);
252
+ if (border.thickness) {
253
+ result[`thickness-border-left-${remainder}`] = border.thickness;
254
+ result[`thickness-border-right-${remainder}`] = border.thickness;
255
+ }
256
+ if (border.style) {
257
+ result[`style-border-left-${remainder}`] = border.style;
258
+ result[`style-border-right-${remainder}`] = border.style;
259
+ }
260
+ if (border.color) {
261
+ result[`color-border-left-${remainder}`] = border.color;
262
+ result[`color-border-right-${remainder}`] = border.color;
263
+ }
264
+ }
265
+ // --- Check "border-vertical" theme variables
266
+ match = borderVerticalRegEx.exec(key);
267
+ if (match) {
268
+ // --- We have a border-vertical value to segment
269
+ const remainder = match[2];
270
+ const border = getBorderSegments(value);
271
+ if (border.thickness) {
272
+ result[`thickness-border-top-${remainder}`] = border.thickness;
273
+ result[`thickness-border-bottom-${remainder}`] = border.thickness;
274
+ }
275
+ if (border.style) {
276
+ result[`style-border-top-${remainder}`] = border.style;
277
+ result[`style-border-bottom-${remainder}`] = border.style;
278
+ }
279
+ if (border.color) {
280
+ result[`color-border-top-${remainder}`] = border.color;
281
+ result[`color-border-bottom-${remainder}`] = border.color;
282
+ }
283
+ }
284
+ // --- Check "border-left" theme variables
285
+ match = borderLeftRegEx.exec(key);
286
+ if (match) {
287
+ // --- We have a border-left value to segment
288
+ const remainder = match[2];
289
+ const border = getBorderSegments(value);
290
+ if (border.thickness) {
291
+ result[`thickness-border-left-${remainder}`] = border.thickness;
292
+ }
293
+ if (border.style) {
294
+ result[`style-border-left-${remainder}`] = border.style;
295
+ }
296
+ if (border.color) {
297
+ result[`color-border-left-${remainder}`] = border.color;
298
+ }
299
+ }
300
+ // --- Check "border-right" theme variables
301
+ match = borderRightRegEx.exec(key);
302
+ if (match) {
303
+ // --- We have a border-right value to segment
304
+ const remainder = match[2];
305
+ const border = getBorderSegments(value);
306
+ if (border.thickness) {
307
+ result[`thickness-border-right-${remainder}`] = border.thickness;
308
+ }
309
+ if (border.style) {
310
+ result[`style-border-right-${remainder}`] = border.style;
311
+ }
312
+ if (border.color) {
313
+ result[`color-border-right-${remainder}`] = border.color;
314
+ }
315
+ }
316
+ // --- Check "border-top" theme variables
317
+ match = borderTopRegEx.exec(key);
318
+ if (match) {
319
+ // --- We have a border-top value to segment
320
+ const remainder = match[2];
321
+ const border = getBorderSegments(value);
322
+ if (border.thickness) {
323
+ result[`thickness-border-top-${remainder}`] = border.thickness;
324
+ }
325
+ if (border.style) {
326
+ result[`style-border-top-${remainder}`] = border.style;
327
+ }
328
+ if (border.color) {
329
+ result[`color-border-top-${remainder}`] = border.color;
330
+ }
331
+ }
332
+ // --- Check "border-bottom" theme variables
333
+ match = borderBottomRegEx.exec(key);
334
+ if (match) {
335
+ // --- We have a border-bottom value to segment
336
+ const remainder = match[2];
337
+ const border = getBorderSegments(value);
338
+ if (border.thickness) {
339
+ result[`thickness-border-bottom-${remainder}`] = border.thickness;
340
+ }
341
+ if (border.style) {
342
+ result[`style-border-bottom-${remainder}`] = border.style;
343
+ }
344
+ if (border.color) {
345
+ result[`color-border-bottom-${remainder}`] = border.color;
346
+ }
347
+ }
220
348
  // --- Check "border-" theme variables
221
- let match = borderRegEx.exec(key);
349
+ match = borderRegEx.exec(key);
222
350
  if (match) {
223
351
  // --- We have a border value to segment
224
352
  const remainder = match[1];
225
353
  const border = getBorderSegments(value);
226
354
  if (border.thickness) {
227
- (_a = result[_3 = `thickness-border-${remainder}`]) !== null && _a !== void 0 ? _a : (result[_3] = border.thickness);
355
+ (_a = result[_7 = `thickness-border-${remainder}`]) !== null && _a !== void 0 ? _a : (result[_7] = border.thickness);
228
356
  }
229
357
  if (border.style) {
230
- (_b = result[_4 = `style-border-${remainder}`]) !== null && _b !== void 0 ? _b : (result[_4] = border.style);
358
+ (_b = result[_8 = `style-border-${remainder}`]) !== null && _b !== void 0 ? _b : (result[_8] = border.style);
231
359
  }
232
360
  if (border.color) {
233
- (_c = result[_5 = `color-border-${remainder}`]) !== null && _c !== void 0 ? _c : (result[_5] = border.color);
361
+ (_c = result[_9 = `color-border-${remainder}`]) !== null && _c !== void 0 ? _c : (result[_9] = border.color);
234
362
  }
235
363
  }
236
364
  // --- Check "thickness-border-" theme variables
@@ -238,78 +366,86 @@ function generateBorderSegments(theme) {
238
366
  if (match) {
239
367
  // --- We have a thickness-border value to flow down
240
368
  const remainder = match[1];
241
- (_d = result[_6 = `thickness-border-left-${remainder}`]) !== null && _d !== void 0 ? _d : (result[_6] = value);
242
- (_e = result[_7 = `thickness-border-right-${remainder}`]) !== null && _e !== void 0 ? _e : (result[_7] = value);
243
- (_f = result[_8 = `thickness-border-top-${remainder}`]) !== null && _f !== void 0 ? _f : (result[_8] = value);
244
- (_g = result[_9 = `thickness-border-bottom-${remainder}`]) !== null && _g !== void 0 ? _g : (result[_9] = value);
369
+ (_d = result[_10 = `thickness-border-left-${remainder}`]) !== null && _d !== void 0 ? _d : (result[_10] = value);
370
+ (_e = result[_11 = `thickness-border-right-${remainder}`]) !== null && _e !== void 0 ? _e : (result[_11] = value);
371
+ (_f = result[_12 = `thickness-border-top-${remainder}`]) !== null && _f !== void 0 ? _f : (result[_12] = value);
372
+ (_g = result[_13 = `thickness-border-bottom-${remainder}`]) !== null && _g !== void 0 ? _g : (result[_13] = value);
245
373
  }
246
374
  // --- Check "thickness-border-horizontal" theme variables
247
375
  match = thicknessBorderHorizontalRegEx.exec(key);
248
376
  if (match) {
249
377
  // --- We have a thickness-border-horizontal value to flow down
250
378
  const remainder = match[2];
251
- (_h = result[_10 = `thickness-border-left-${remainder}`]) !== null && _h !== void 0 ? _h : (result[_10] = value);
252
- (_j = result[_11 = `thickness-border-right-${remainder}`]) !== null && _j !== void 0 ? _j : (result[_11] = value);
379
+ (_h = result[_14 = `thickness-border-left-${remainder}`]) !== null && _h !== void 0 ? _h : (result[_14] = value);
380
+ (_j = result[_15 = `thickness-border-right-${remainder}`]) !== null && _j !== void 0 ? _j : (result[_15] = value);
253
381
  }
254
382
  // --- Check "thickness-border-vertical" theme variables
255
383
  match = thicknessBorderVerticalRegEx.exec(key);
256
384
  if (match) {
257
385
  // --- We have a thickness-border-vertical value to flow down
258
386
  const remainder = match[2];
259
- (_k = result[_12 = `thickness-border-top-${remainder}`]) !== null && _k !== void 0 ? _k : (result[_12] = value);
260
- (_l = result[_13 = `thickness-border-bottom-${remainder}`]) !== null && _l !== void 0 ? _l : (result[_13] = value);
387
+ (_k = result[_16 = `thickness-border-top-${remainder}`]) !== null && _k !== void 0 ? _k : (result[_16] = value);
388
+ (_l = result[_17 = `thickness-border-bottom-${remainder}`]) !== null && _l !== void 0 ? _l : (result[_17] = value);
389
+ }
390
+ if (match) {
391
+ // --- We have a thickness-border value to flow down
392
+ const remainder = match[1];
393
+ (_m = result[_18 = `thickness-border-left-${remainder}`]) !== null && _m !== void 0 ? _m : (result[_18] = value);
394
+ (_o = result[_19 = `thickness-border-right-${remainder}`]) !== null && _o !== void 0 ? _o : (result[_19] = value);
395
+ (_p = result[_20 = `thickness-border-top-${remainder}`]) !== null && _p !== void 0 ? _p : (result[_20] = value);
396
+ (_q = result[_21 = `thickness-border-bottom-${remainder}`]) !== null && _q !== void 0 ? _q : (result[_21] = value);
261
397
  }
262
398
  // --- Check "style-border-" theme variables
263
399
  match = styleBorderRegEx.exec(key);
264
400
  if (match) {
265
401
  // --- We have a style-border value to flow down
266
402
  const remainder = match[1];
267
- (_m = result[_14 = `style-border-left-${remainder}`]) !== null && _m !== void 0 ? _m : (result[_14] = value);
268
- (_o = result[_15 = `style-border-right-${remainder}`]) !== null && _o !== void 0 ? _o : (result[_15] = value);
269
- (_p = result[_16 = `style-border-top-${remainder}`]) !== null && _p !== void 0 ? _p : (result[_16] = value);
270
- (_q = result[_17 = `style-border-bottom-${remainder}`]) !== null && _q !== void 0 ? _q : (result[_17] = value);
403
+ (_r = result[_22 = `style-border-left-${remainder}`]) !== null && _r !== void 0 ? _r : (result[_22] = value);
404
+ (_s = result[_23 = `style-border-right-${remainder}`]) !== null && _s !== void 0 ? _s : (result[_23] = value);
405
+ (_t = result[_24 = `style-border-top-${remainder}`]) !== null && _t !== void 0 ? _t : (result[_24] = value);
406
+ (_u = result[_25 = `style-border-bottom-${remainder}`]) !== null && _u !== void 0 ? _u : (result[_25] = value);
271
407
  }
272
408
  // --- Check "style-border-horizontal" theme variables
273
409
  match = styleBorderHorizontalRegEx.exec(key);
274
410
  if (match) {
275
411
  // --- We have a style-border-horizontal value to flow down
276
412
  const remainder = match[1];
277
- (_r = result[_18 = `style-border-left-${remainder}`]) !== null && _r !== void 0 ? _r : (result[_18] = value);
278
- (_s = result[_19 = `style-border-right-${remainder}`]) !== null && _s !== void 0 ? _s : (result[_19] = value);
413
+ (_v = result[_26 = `style-border-left-${remainder}`]) !== null && _v !== void 0 ? _v : (result[_26] = value);
414
+ (_w = result[_27 = `style-border-right-${remainder}`]) !== null && _w !== void 0 ? _w : (result[_27] = value);
279
415
  }
280
416
  // --- Check "style-border-vertical" theme variables
281
417
  match = styleBorderVerticalRegEx.exec(key);
282
418
  if (match) {
283
419
  // --- We have a style-border-vertical value to flow down
284
420
  const remainder = match[1];
285
- (_t = result[_20 = `style-border-top-${remainder}`]) !== null && _t !== void 0 ? _t : (result[_20] = value);
286
- (_u = result[_21 = `style-border-bottom-${remainder}`]) !== null && _u !== void 0 ? _u : (result[_21] = value);
421
+ (_x = result[_28 = `style-border-top-${remainder}`]) !== null && _x !== void 0 ? _x : (result[_28] = value);
422
+ (_y = result[_29 = `style-border-bottom-${remainder}`]) !== null && _y !== void 0 ? _y : (result[_29] = value);
287
423
  }
288
424
  // --- Check "color-border-" theme variables
289
425
  match = colorBorderRegEx.exec(key);
290
426
  if (match) {
291
427
  // --- We have a color-border value to flow down
292
428
  const remainder = match[1];
293
- (_v = result[_22 = `color-border-left-${remainder}`]) !== null && _v !== void 0 ? _v : (result[_22] = value);
294
- (_w = result[_23 = `color-border-right-${remainder}`]) !== null && _w !== void 0 ? _w : (result[_23] = value);
295
- (_x = result[_24 = `color-border-top-${remainder}`]) !== null && _x !== void 0 ? _x : (result[_24] = value);
296
- (_y = result[_25 = `color-border-bottom-${remainder}`]) !== null && _y !== void 0 ? _y : (result[_25] = value);
429
+ (_z = result[_30 = `color-border-left-${remainder}`]) !== null && _z !== void 0 ? _z : (result[_30] = value);
430
+ (_0 = result[_31 = `color-border-right-${remainder}`]) !== null && _0 !== void 0 ? _0 : (result[_31] = value);
431
+ (_1 = result[_32 = `color-border-top-${remainder}`]) !== null && _1 !== void 0 ? _1 : (result[_32] = value);
432
+ (_2 = result[_33 = `color-border-bottom-${remainder}`]) !== null && _2 !== void 0 ? _2 : (result[_33] = value);
297
433
  }
298
434
  // --- Check "color-border-horizontal" theme variables
299
435
  match = colorBorderHorizontalRegEx.exec(key);
300
436
  if (match) {
301
437
  // --- We have a color-border-horizontal value to flow down
302
438
  const remainder = match[1];
303
- (_z = result[_26 = `color-border-left-${remainder}`]) !== null && _z !== void 0 ? _z : (result[_26] = value);
304
- (_0 = result[_27 = `color-border-right-${remainder}`]) !== null && _0 !== void 0 ? _0 : (result[_27] = value);
439
+ (_3 = result[_34 = `color-border-left-${remainder}`]) !== null && _3 !== void 0 ? _3 : (result[_34] = value);
440
+ (_4 = result[_35 = `color-border-right-${remainder}`]) !== null && _4 !== void 0 ? _4 : (result[_35] = value);
305
441
  }
306
442
  // --- Check "color-border-vertical" theme variables
307
443
  match = colorBorderVerticalRegEx.exec(key);
308
444
  if (match) {
309
445
  // --- We have a color-border-vertical value to flow down
310
446
  const remainder = match[1];
311
- (_1 = result[_28 = `color-border-top-${remainder}`]) !== null && _1 !== void 0 ? _1 : (result[_28] = value);
312
- (_2 = result[_29 = `color-border-bottom-${remainder}`]) !== null && _2 !== void 0 ? _2 : (result[_29] = value);
447
+ (_5 = result[_36 = `color-border-top-${remainder}`]) !== null && _5 !== void 0 ? _5 : (result[_36] = value);
448
+ (_6 = result[_37 = `color-border-bottom-${remainder}`]) !== null && _6 !== void 0 ? _6 : (result[_37] = value);
313
449
  }
314
450
  });
315
451
  // --- Done
@@ -24,7 +24,9 @@ function xmlUiMarkupToComponent(source, fileId = 0, moduleResolver) {
24
24
  return { component: null, errors: errorsWithLines, erroneousCompoundComponentName };
25
25
  }
26
26
  try {
27
- return { component: (0, transform_1.nodeToComponentDef)(node, getText, fileId, moduleResolver), errors: [] };
27
+ const component = (0, transform_1.nodeToComponentDef)(node, getText, fileId, moduleResolver);
28
+ const transformResult = { component, errors: [] };
29
+ return transformResult;
28
30
  }
29
31
  catch (e) {
30
32
  const erroneousCompoundComponentName = getCompoundCompName(node, getText);
@@ -76,7 +78,20 @@ function errReportMessage(message) {
76
78
  function errReportComponent(errors, fileName, compoundCompName) {
77
79
  function makeComponent() {
78
80
  const errList = errors
79
- .sort((a, b) => a.pos - b.pos)
81
+ .sort((a, b) => {
82
+ if (a.pos === undefined && b.pos === undefined) {
83
+ return 0;
84
+ }
85
+ else if (a.pos === undefined) {
86
+ return 1;
87
+ }
88
+ else if (b.pos === undefined) {
89
+ return -1;
90
+ }
91
+ else {
92
+ return a.pos - b.pos;
93
+ }
94
+ })
80
95
  .map((e, idx) => {
81
96
  return {
82
97
  type: "VStack",
@@ -14,7 +14,7 @@ exports.ParserError = ParserError;
14
14
  // The error messages of error codes
15
15
  exports.errorMessages = {
16
16
  U001: "Unexpected token: {0}.",
17
- U002: "A component definition can have exactly one UEML element.",
17
+ U002: "A component definition can have exactly one XMLUI element.",
18
18
  U003: "A '<' token expected.",
19
19
  U004: "A node identifier expected.",
20
20
  U005: "A '</' token expected.",
@@ -28,7 +28,7 @@ exports.errorMessages = {
28
28
  U013: "Attribute name cannot start with an uppercase letter.",
29
29
  U014: "An '{0}' ID expected in the closing tag's namespace but '{1}' received.",
30
30
  U015: "Unexpected token in text element: {0}.",
31
- T001: "A component definition must have exactly one UEML element.",
31
+ T001: "A component definition must have exactly one XMLUI element.",
32
32
  T002: "A component definition's name must start with an uppercase letter.",
33
33
  T003: "A reusable component must have a non-empty name.",
34
34
  T004: "A reusable component's name must start with an uppercase letter.",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.onPrefixRegex = exports.UCRegex = exports.COMPOUND_COMP_ID = void 0;
3
+ exports.CORE_NAMESPACE_VALUE = exports.onPrefixRegex = exports.UCRegex = exports.COMPOUND_COMP_ID = void 0;
4
4
  exports.nodeToComponentDef = nodeToComponentDef;
5
5
  const code_behind_collect_1 = require("../scripting/code-behind-collect");
6
6
  const syntax_kind_1 = require("./syntax-kind");
@@ -17,7 +17,7 @@ const COMPONENT_NAMESPACE_SCHEME = "component-ns";
17
17
  const APP_NS_KEY = "app-ns";
18
18
  const APP_NS_VALUE = "#app-ns";
19
19
  const CORE_NS_KEY = "core-ns";
20
- const CORE_NS_VALUE = "#xmlui-core-ns";
20
+ exports.CORE_NAMESPACE_VALUE = "#xmlui-core-ns";
21
21
  const HelperNode = {
22
22
  property: 'property',
23
23
  event: 'event',
@@ -1038,7 +1038,7 @@ function addToNamespaces(namespaceStack, comp, nsKey, value) {
1038
1038
  nsValue = APP_NS_VALUE;
1039
1039
  break;
1040
1040
  case CORE_NS_KEY:
1041
- nsValue = CORE_NS_VALUE;
1041
+ nsValue = exports.CORE_NAMESPACE_VALUE;
1042
1042
  break;
1043
1043
  }
1044
1044
  const compNamespaces = namespaceStack[namespaceStack.length - 1];