@nanahoshi/mona-ui 0.27.2 → 0.28.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 (208) hide show
  1. package/docs/api/chart.md +2 -2
  2. package/docs/api/popup.md +1 -1
  3. package/docs/api/theme.md +2 -2
  4. package/docs/chart.md +14 -0
  5. package/docs/editor.md +2 -0
  6. package/docs/installation.md +147 -15
  7. package/docs/introduction.md +37 -15
  8. package/docs/theming-built-in-themes.md +67 -0
  9. package/docs/theming-custom-colors.md +274 -0
  10. package/docs/theming-custom-themes.md +168 -0
  11. package/docs/theming.md +164 -248
  12. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
  13. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
  14. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
  15. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
  16. package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
  17. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
  18. package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
  19. package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
  20. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
  21. package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
  22. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
  23. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -390
  24. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
  25. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
  26. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
  27. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
  28. package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
  29. package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -743
  30. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
  31. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -266
  32. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
  33. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
  34. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
  35. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
  36. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
  37. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -734
  38. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
  39. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
  40. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
  41. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
  42. package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
  43. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
  44. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
  45. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
  46. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
  47. package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
  48. package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
  49. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
  50. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5077
  51. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
  52. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
  53. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
  54. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
  55. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
  56. package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
  57. package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
  60. package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
  61. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
  62. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
  63. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
  64. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
  65. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
  66. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
  67. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
  68. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
  69. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
  70. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
  71. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
  72. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
  73. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
  74. package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
  75. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
  76. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
  77. package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
  78. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
  79. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
  80. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
  81. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
  82. package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
  83. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
  84. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
  85. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
  86. package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
  87. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
  88. package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
  89. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
  90. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
  91. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
  92. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
  93. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
  94. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
  95. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
  96. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
  97. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
  98. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
  99. package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
  100. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
  101. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
  102. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
  103. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
  104. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
  105. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
  106. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
  107. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
  108. package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
  109. package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
  110. package/llms.txt +6 -2
  111. package/package.json +62 -23
  112. package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
  113. package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
  114. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
  115. package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
  116. package/types/nanahoshi-mona-ui-button.d.ts +227 -166
  117. package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
  118. package/types/nanahoshi-mona-ui-card.d.ts +125 -111
  119. package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
  120. package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
  121. package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
  122. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
  123. package/types/nanahoshi-mona-ui-collapsible.d.ts +103 -87
  124. package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
  125. package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
  126. package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
  127. package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
  128. package/types/nanahoshi-mona-ui-command.d.ts +279 -191
  129. package/types/nanahoshi-mona-ui-common.d.ts +354 -385
  130. package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
  131. package/types/nanahoshi-mona-ui-date-input.d.ts +79 -96
  132. package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
  133. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
  134. package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
  135. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
  136. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
  137. package/types/nanahoshi-mona-ui-dropdowns.d.ts +231 -217
  138. package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
  139. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
  140. package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
  141. package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
  142. package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
  143. package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
  144. package/types/nanahoshi-mona-ui-i18n.d.ts +987 -1052
  145. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
  147. package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
  148. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
  149. package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
  150. package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
  151. package/types/nanahoshi-mona-ui-label.d.ts +108 -78
  152. package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
  153. package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
  154. package/types/nanahoshi-mona-ui-list.d.ts +2 -1
  155. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
  156. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
  157. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
  158. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
  159. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
  160. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
  161. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
  162. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
  163. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
  164. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
  165. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
  166. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
  167. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
  168. package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
  169. package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
  170. package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
  171. package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
  172. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
  173. package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
  174. package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
  175. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
  176. package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
  177. package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
  178. package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
  179. package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
  180. package/types/nanahoshi-mona-ui-query.d.ts +82 -88
  181. package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
  182. package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
  183. package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
  184. package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
  185. package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
  186. package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
  187. package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
  188. package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
  189. package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
  190. package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
  191. package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
  192. package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
  193. package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
  194. package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
  195. package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
  196. package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
  197. package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
  198. package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
  199. package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
  200. package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
  201. package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
  202. package/types/nanahoshi-mona-ui-window.d.ts +494 -399
  203. package/types/nanahoshi-mona-ui.d.ts +1 -2
  204. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
  205. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
  206. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
  207. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
  208. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
@@ -1,1131 +1,1431 @@
1
- import { isDevMode } from '@angular/core';
2
- import { formatNumber, MONA_FALLBACK_LOCALE_ID, tryCanonicalizeLocaleId, canonicalizeLocaleId } from '@nanahoshi/mona-ui/i18n';
3
-
4
- // Generated by scripts/generate-message-parameters.ts from i18n/message-types. Do not edit.
5
- // Run `npm run generate:message-parameters` after changing a message type.
6
- /**
7
- * The parameters of every message, by namespace and key, in the order the message function takes them. A plain
8
- * string message has `null`.
9
- */
1
+ import { isDevMode } from "@angular/core";
2
+ import { MONA_FALLBACK_LOCALE_ID, canonicalizeLocaleId, formatNumber, tryCanonicalizeLocaleId } from "@nanahoshi/mona-ui/i18n";
10
3
  const MONA_MESSAGE_PARAMETERS = {
11
- autoComplete: {
12
- clear: null
13
- },
14
- breadcrumb: {
15
- breadcrumb: null,
16
- showFullPath: null
17
- },
18
- buttonGroup: {
19
- buttonGroup: null
20
- },
21
- calendar: {
22
- calendarLabel: [{ name: "formattedMonthAndYear", type: "string" }],
23
- decadeRange: [
24
- { name: "start", type: "number" },
25
- { name: "end", type: "number" }
26
- ],
27
- decadeViewLabel: [
28
- { name: "start", type: "number" },
29
- { name: "end", type: "number" }
30
- ],
31
- goToToday: [{ name: "formattedDate", type: "string" }],
32
- nextDecade: null,
33
- nextMonth: null,
34
- nextYear: null,
35
- previousDecade: null,
36
- previousMonth: null,
37
- previousYear: null,
38
- switchToDecadeView: [{ name: "currentYear", type: "string" }],
39
- switchToYearView: [{ name: "currentMonthAndYear", type: "string" }],
40
- today: null,
41
- yearCellLabel: [{ name: "year", type: "number" }],
42
- yearViewLabel: [{ name: "year", type: "string" }]
43
- },
44
- card: {
45
- actionsLabel: null
46
- },
47
- chart: {
48
- announcementSeparator: null,
49
- brushApplied: [{ name: "count", type: "number" }],
50
- brushCleared: null,
51
- brushRange: [
52
- { name: "from", type: "string" },
53
- { name: "to", type: "string" }
54
- ],
55
- category: null,
56
- categoryFallbackName: [{ name: "index", type: "number" }],
57
- categoryRange: [
58
- { name: "from", type: "string" },
59
- { name: "to", type: "string" }
60
- ],
61
- change: null,
62
- changeValue: [{ name: "change", type: "string" }],
63
- chart: null,
64
- chartLegend: null,
65
- chartRoleDescription: null,
66
- close: null,
67
- closeAbbreviation: null,
68
- colorScale: null,
69
- conversion: null,
70
- conversionOfPrevious: [{ name: "rate", type: "string" }],
71
- dataTableTruncated: [
72
- { name: "shown", type: "number" },
73
- { name: "total", type: "number" }
74
- ],
75
- decrease: null,
76
- decreaseAnnouncement: [
77
- { name: "delta", type: "string" },
78
- { name: "from", type: "string" },
79
- { name: "to", type: "string" }
80
- ],
81
- divergingRangeDescription: [
82
- { name: "title", type: "string" },
83
- { name: "minimum", type: "string" },
84
- { name: "midpoint", type: "string" },
85
- { name: "maximum", type: "string" }
86
- ],
87
- dropOff: null,
88
- dropOffValue: [{ name: "value", type: "string" }],
89
- falling: null,
90
- gaugeRange: [
91
- { name: "minimum", type: "string" },
92
- { name: "maximum", type: "string" }
93
- ],
94
- high: null,
95
- highAbbreviation: null,
96
- increase: null,
97
- increaseAnnouncement: [
98
- { name: "delta", type: "string" },
99
- { name: "from", type: "string" },
100
- { name: "to", type: "string" }
101
- ],
102
- itemDeselected: [{ name: "item", type: "string" }],
103
- itemFallbackName: [{ name: "index", type: "number" }],
104
- itemSelected: [{ name: "item", type: "string" }],
105
- keyboardHelp: null,
106
- labelValueSeparator: null,
107
- labeledValue: [
108
- { name: "label", type: "string" },
109
- { name: "value", type: "string" }
110
- ],
111
- low: null,
112
- lowAbbreviation: null,
113
- noChange: null,
114
- noChangeAnnouncement: [{ name: "value", type: "string" }],
115
- noData: null,
116
- ohlcValues: [
117
- { name: "open", type: "string" },
118
- { name: "high", type: "string" },
119
- { name: "low", type: "string" },
120
- { name: "close", type: "string" }
121
- ],
122
- open: null,
123
- openAbbreviation: null,
124
- overall: null,
125
- overallConversion: [{ name: "rate", type: "string" }],
126
- pannedDown: null,
127
- pannedLeft: null,
128
- pannedRight: null,
129
- pannedUp: null,
130
- pathSeparator: null,
131
- pointPosition: [
132
- { name: "position", type: "number" },
133
- { name: "total", type: "number" }
134
- ],
135
- range: null,
136
- rangeDescription: [
137
- { name: "title", type: "string" },
138
- { name: "minimum", type: "string" },
139
- { name: "maximum", type: "string" }
140
- ],
141
- rangeValue: [
142
- { name: "from", type: "string" },
143
- { name: "to", type: "string" }
144
- ],
145
- rising: null,
146
- runningTotal: null,
147
- seriesFallbackName: [{ name: "index", type: "number" }],
148
- seriesHidden: [{ name: "series", type: "string" }],
149
- seriesShown: [{ name: "series", type: "string" }],
150
- seriesSummary: [
151
- { name: "count", type: "number" },
152
- { name: "names", type: "string" }
153
- ],
154
- seriesValueRange: [
155
- { name: "series", type: "string" },
156
- { name: "minimum", type: "string" },
157
- { name: "maximum", type: "string" }
158
- ],
159
- shareOfTotal: [{ name: "share", type: "string" }],
160
- size: null,
161
- sizeValue: [{ name: "size", type: "string" }],
162
- stackShare: [{ name: "share", type: "string" }],
163
- stageFallbackName: [{ name: "index", type: "number" }],
164
- stagePosition: [
165
- { name: "position", type: "number" },
166
- { name: "total", type: "number" }
167
- ],
168
- stepFallbackName: [{ name: "index", type: "number" }],
169
- stepPosition: [
170
- { name: "position", type: "number" },
171
- { name: "total", type: "number" }
172
- ],
173
- subtotal: null,
174
- subtotalAnnouncement: [{ name: "value", type: "string" }],
175
- total: null,
176
- totalAnnouncement: [{ name: "value", type: "string" }],
177
- treemapGroup: [{ name: "count", type: "number" }],
178
- treemapLeaf: null,
179
- unchanged: null,
180
- value: null,
181
- valueRange: [
182
- { name: "from", type: "string" },
183
- { name: "to", type: "string" }
184
- ],
185
- viewportResetToDefault: null,
186
- viewportResetToFull: null,
187
- visualIndicatorClamped: null,
188
- zoomedIn: null,
189
- zoomedOut: null
190
- },
191
- chip: {
192
- removeLabel: [{ name: "label", optional: true, type: "string" }]
193
- },
194
- colorGradient: {
195
- alpha: null,
196
- alphaText: [{ name: "opacity", type: "number" }],
197
- apply: null,
198
- blue: null,
199
- cancel: null,
200
- clearColor: null,
201
- colorCopied: null,
202
- colorGradient: null,
203
- copyAsHex: null,
204
- copyAsRgb: null,
205
- copyColor: null,
206
- copyFailed: null,
207
- currentColor: null,
208
- green: null,
209
- hexColor: null,
210
- hue: null,
211
- previousColor: null,
212
- red: null,
213
- saturation: null,
214
- saturationAndValue: null,
215
- saturationAndValueText: [
216
- { name: "saturation", type: "number" },
217
- { name: "value", type: "number" }
218
- ],
219
- switchColorMode: null,
220
- value: null
221
- },
222
- colorPalette: {
223
- color: [{ name: "color", type: "string" }],
224
- colorPalette: null,
225
- namedColor: [
226
- { name: "name", type: "string" },
227
- { name: "color", type: "string" }
228
- ]
229
- },
230
- colorPicker: {
231
- clearColor: null,
232
- colorGradientPicker: null,
233
- colorPalettePicker: null,
234
- colorPicker: null,
235
- noColor: null
236
- },
237
- comboBox: {
238
- clear: null
239
- },
240
- command: {
241
- dialogLabel: null,
242
- inputLabel: null,
243
- listLabel: null,
244
- loading: null,
245
- noResults: null,
246
- placeholder: null,
247
- resultsAvailable: [{ name: "count", type: "number" }]
248
- },
249
- datePicker: {
250
- datePicker: null,
251
- openCalendar: null
252
- },
253
- dateTimePicker: {
254
- calendar: null,
255
- cancel: null,
256
- date: null,
257
- dateTimePicker: null,
258
- openDateTimePicker: null,
259
- set: null,
260
- time: null,
261
- timePicker: null
262
- },
263
- dialog: {
264
- cancel: null,
265
- closeDialog: null,
266
- ok: null
267
- },
268
- dropdownList: {
269
- clear: null
270
- },
271
- dropdowns: {
272
- itemPosition: [
273
- { name: "text", type: "string" },
274
- { name: "position", type: "number" },
275
- { name: "total", type: "number" }
276
- ],
277
- noResultsFound: null,
278
- resultsAvailable: [{ name: "count", type: "number" }]
279
- },
280
- editor: {
281
- addColumnAfter: null,
282
- addColumnBefore: null,
283
- addHorizontalLine: null,
284
- addRowAfter: null,
285
- addRowBefore: null,
286
- alignCenter: null,
287
- alignEnd: null,
288
- alignLeft: null,
289
- alignRight: null,
290
- alignStart: null,
291
- alignmentGroup: null,
292
- altText: null,
293
- apply: null,
294
- backgroundColor: null,
295
- bold: null,
296
- cancel: null,
297
- codeBlock: null,
298
- color: null,
299
- contentLabel: null,
300
- defaultFontFamily: null,
301
- deleteColumn: null,
302
- deleteRow: null,
303
- deleteTable: null,
304
- editLink: null,
305
- enterUrl: null,
306
- fontSize: null,
307
- format: null,
308
- heading: [{ name: "level", type: "number" }],
309
- heightPx: null,
310
- historyGroup: null,
311
- imageUrl: null,
312
- indent: null,
313
- indentGroup: null,
314
- insert: null,
315
- insertImage: null,
316
- insertLink: null,
317
- insertOrderedList: null,
318
- insertTable: null,
319
- insertTaskList: null,
320
- insertUnorderedList: null,
321
- invalidUrl: null,
322
- italic: null,
323
- justify: null,
324
- linkGroup: null,
325
- listGroup: null,
326
- mergeCells: null,
327
- outdent: null,
328
- paragraph: null,
329
- quotation: null,
330
- redo: null,
331
- removeLink: null,
332
- selectFontFamily: null,
333
- selectFontSize: null,
334
- splitCell: null,
335
- strikethrough: null,
336
- subscript: null,
337
- superscript: null,
338
- tableGroup: null,
339
- tableSize: [
340
- { name: "rows", type: "number" },
341
- { name: "columns", type: "number" }
342
- ],
343
- textStyleGroup: null,
344
- toggleHeaderRow: null,
345
- toolbar: null,
346
- underline: null,
347
- undo: null,
348
- widthPx: null
349
- },
350
- filter: {
351
- and: null,
352
- apply: null,
353
- clear: null,
354
- contains: null,
355
- doesNotContain: null,
356
- endsWith: null,
357
- isAfter: null,
358
- isAfterOrEqualTo: null,
359
- isBefore: null,
360
- isBeforeOrEqualTo: null,
361
- isEmpty: null,
362
- isEqualTo: null,
363
- isFalse: null,
364
- isGreaterThan: null,
365
- isGreaterThanOrEqualTo: null,
366
- isLessThan: null,
367
- isLessThanOrEqualTo: null,
368
- isNotEmpty: null,
369
- isNotEqualTo: null,
370
- isNotNull: null,
371
- isNotNullOrEmpty: null,
372
- isNull: null,
373
- isNullOrEmpty: null,
374
- isTrue: null,
375
- logic: null,
376
- operator: null,
377
- or: null,
378
- secondOperator: null,
379
- secondValue: null,
380
- startsWith: null,
381
- value: null
382
- },
383
- grid: {
384
- all: null,
385
- apply: null,
386
- cancel: null,
387
- cancelNewRow: null,
388
- cancelRowEdit: [{ name: "rowNumber", type: "number" }],
389
- clearFilter: [{ name: "column", type: "string" }],
390
- collapseDetail: [{ name: "rowNumber", type: "number" }],
391
- columnGrouped: [{ name: "column", type: "string" }],
392
- columnMoved: [
393
- { name: "column", type: "string" },
394
- { name: "position", type: "number" }
395
- ],
396
- columns: null,
397
- columnsSelected: [{ name: "count", type: "number" }],
398
- commandColumnTitle: null,
399
- delete: null,
400
- deleteRowConfirmation: [{ name: "rowNumber", type: "number" }],
401
- deleteRowTitle: null,
402
- details: null,
403
- dragColumnHeaderToGroup: null,
404
- edit: null,
405
- editRow: [{ name: "rowNumber", type: "number" }],
406
- expandDetail: [{ name: "rowNumber", type: "number" }],
407
- fieldValidationError: null,
408
- filterByColumn: [{ name: "column", type: "string" }],
409
- filterByColumnFiltered: [{ name: "column", type: "string" }],
410
- filterOperator: [
411
- { name: "column", type: "string" },
412
- { name: "operator", type: "string" }
413
- ],
414
- filterPlaceholder: null,
415
- group: null,
416
- groupOptions: [{ name: "column", type: "string" }],
417
- loading: null,
418
- modified: null,
419
- moveAsNext: null,
420
- moveAsPrevious: null,
421
- moveRow: null,
422
- noData: null,
423
- remove: null,
424
- removeRow: [{ name: "rowNumber", type: "number" }],
425
- reorderRow: [{ name: "rowNumber", type: "number" }],
426
- resizeColumn: [{ name: "column", type: "string" }],
427
- rowReorder: null,
428
- rowReorderDisabled: null,
429
- rowReorderDisabledEditing: null,
430
- rowReorderDisabledFiltered: null,
431
- rowReorderDisabledGrouped: null,
432
- rowReorderDisabledServerBinding: null,
433
- rowReorderDisabledSingleRow: null,
434
- rowReorderDisabledSorted: null,
435
- rowReorderDisabledVirtualScroll: null,
436
- rowReorderHandleAriaLabel: [
437
- { name: "rowLabel", type: "string" },
438
- { name: "keyboardHint", type: "string" },
439
- { name: "disabledReason", optional: true, type: "string" }
440
- ],
441
- rowReorderKeyboardHint: null,
442
- rowReorderMoved: [
443
- { name: "fromRowNumber", type: "number" },
444
- { name: "toPosition", type: "number" }
445
- ],
446
- rowValidationError: null,
447
- save: null,
448
- saveNewRow: null,
449
- saveRow: [{ name: "rowNumber", type: "number" }],
450
- selectAllRows: null,
451
- selectRow: [{ name: "rowNumber", type: "number" }],
452
- sortOrder: [{ name: "position", type: "number" }],
453
- toolbar: null
454
- },
455
- label: {
456
- optional: null
457
- },
458
- list: {
459
- filterList: null,
460
- loading: null,
461
- noData: null,
462
- pagerLabel: [{ name: "list", type: "string" }]
463
- },
464
- listBox: {
465
- clearSelection: null,
466
- itemsMoved: [
467
- { name: "position", type: "number" },
468
- { name: "total", type: "number" }
469
- ],
470
- itemsRemoved: [{ name: "count", type: "number" }],
471
- itemsTransferred: [
472
- { name: "count", type: "number" },
473
- { name: "list", type: "string" }
474
- ],
475
- itemsTransferredToOtherList: [{ name: "count", type: "number" }],
476
- moveDown: null,
477
- moveUp: null,
478
- remove: null,
479
- selectionCleared: null,
480
- toolbarLabel: [{ name: "list", type: "string" }],
481
- transferAllFrom: null,
482
- transferAllFromList: [{ name: "list", type: "string" }],
483
- transferAllTo: null,
484
- transferAllToList: [{ name: "list", type: "string" }],
485
- transferFrom: null,
486
- transferFromList: [{ name: "list", type: "string" }],
487
- transferTo: null,
488
- transferToList: [{ name: "list", type: "string" }]
489
- },
490
- multiSelect: {
491
- clear: null,
492
- itemsCount: [{ name: "count", type: "number" }],
493
- removeMoreItems: [{ name: "count", type: "number" }]
494
- },
495
- notification: {
496
- close: null,
497
- error: null,
498
- info: null,
499
- region: null,
500
- success: null,
501
- warning: null
502
- },
503
- numericTextBox: {
504
- decrease: null,
505
- increase: null
506
- },
507
- otpInput: {
508
- verificationCode: null
509
- },
510
- pager: {
511
- firstPageLabel: null,
512
- itemsPerPageLabel: null,
513
- jumpBackwardLabel: [{ name: "pages", type: "number" }],
514
- jumpForwardLabel: [{ name: "pages", type: "number" }],
515
- lastPageLabel: null,
516
- nextPageLabel: null,
517
- ofText: null,
518
- pageInputPrefix: [{ name: "totalPages", type: "number" }],
519
- pageInputSuffix: [{ name: "totalPages", type: "number" }],
520
- pageLabel: [{ name: "page", type: "number" }],
521
- pageSelectLabel: null,
522
- pageSizeLabel: [{ name: "pageSize", type: "number" }],
523
- pageStatus: [
524
- { name: "page", type: "number" },
525
- { name: "totalPages", type: "number" }
526
- ],
527
- pageText: null,
528
- pagerLabel: null,
529
- previousPageLabel: null,
530
- rangeStatus: [
531
- { name: "start", type: "number" },
532
- { name: "end", type: "number" },
533
- { name: "total", type: "number" }
534
- ]
535
- },
536
- progressBar: {
537
- label: null
538
- },
539
- rating: {
540
- notRated: null,
541
- valueText: [
542
- { name: "value", type: "number" },
543
- { name: "max", type: "number" }
544
- ]
545
- },
546
- scrollView: {
547
- carousel: null,
548
- nextPage: null,
549
- page: [{ name: "current", type: "number" }],
550
- pageOf: [
551
- { name: "current", type: "number" },
552
- { name: "total", type: "number" }
553
- ],
554
- pages: null,
555
- previousPage: null,
556
- scrollPagerNext: null,
557
- scrollPagerPrevious: null,
558
- slide: null
559
- },
560
- sheet: {
561
- closeSheet: null
562
- },
563
- sidebar: {
564
- drawerLabel: null,
565
- rail: null
566
- },
567
- slider: {
568
- maximumValue: null,
569
- minimumValue: null,
570
- sliderValue: null
571
- },
572
- spinner: {
573
- cancel: null,
574
- loading: null
575
- },
576
- splitButton: {
577
- menuButtonAriaLabel: null,
578
- menuButtonWithText: [{ name: "text", type: "string" }],
579
- splitButton: [{ name: "text", type: "string" }]
580
- },
581
- splitter: {
582
- collapseDown: null,
583
- collapseNext: null,
584
- collapsePrevious: null,
585
- collapseUp: null,
586
- resizer: null
587
- },
588
- stepper: {
589
- stepCompleted: null,
590
- stepInvalid: null,
591
- stepPosition: [
592
- { name: "current", type: "number" },
593
- { name: "total", type: "number" }
594
- ],
595
- stepProgress: null,
596
- stepper: null
597
- },
598
- tabs: {
599
- closeTab: null,
600
- scrollNext: null,
601
- scrollPrevious: null
602
- },
603
- textBox: {
604
- clear: null
605
- },
606
- timePicker: {
607
- openTimePicker: null,
608
- timePicker: null
609
- },
610
- timeSelector: {
611
- am: null,
612
- amPm: null,
613
- headerHours: null,
614
- headerMinutes: null,
615
- headerSeconds: null,
616
- hours: null,
617
- minutes: null,
618
- now: null,
619
- pm: null,
620
- seconds: null,
621
- set: null,
622
- timeSelector: null
623
- },
624
- treeView: {
625
- collapse: null,
626
- expand: null,
627
- filter: null,
628
- filterLabel: [{ name: "tree", type: "string" }],
629
- filterTree: null,
630
- loadError: [{ name: "node", type: "string" }],
631
- loadingNode: [{ name: "node", type: "string" }],
632
- movedAfter: [
633
- { name: "node", type: "string" },
634
- { name: "target", type: "string" }
635
- ],
636
- movedBefore: [
637
- { name: "node", type: "string" },
638
- { name: "target", type: "string" }
639
- ],
640
- movedInto: [
641
- { name: "node", type: "string" },
642
- { name: "target", type: "string" }
643
- ],
644
- noData: null,
645
- noMatches: null,
646
- results: [{ name: "count", type: "number" }],
647
- retryLoading: [{ name: "node", type: "string" }]
648
- },
649
- window: {
650
- close: null,
651
- closeWindow: null,
652
- maximize: null,
653
- minimize: null,
654
- moveOrResizeWindow: null,
655
- moveWindow: null,
656
- resizeBottom: null,
657
- resizeBottomLeft: null,
658
- resizeBottomRight: null,
659
- resizeLeft: null,
660
- resizeRight: null,
661
- resizeTop: null,
662
- resizeTopLeft: null,
663
- resizeTopRight: null,
664
- resizeWindow: null,
665
- restore: null
666
- }
4
+ autoComplete: { clear: null },
5
+ breadcrumb: {
6
+ breadcrumb: null,
7
+ showFullPath: null
8
+ },
9
+ buttonGroup: { buttonGroup: null },
10
+ calendar: {
11
+ calendarLabel: [{
12
+ name: "formattedMonthAndYear",
13
+ type: "string"
14
+ }],
15
+ decadeRange: [{
16
+ name: "start",
17
+ type: "number"
18
+ }, {
19
+ name: "end",
20
+ type: "number"
21
+ }],
22
+ decadeViewLabel: [{
23
+ name: "start",
24
+ type: "number"
25
+ }, {
26
+ name: "end",
27
+ type: "number"
28
+ }],
29
+ goToToday: [{
30
+ name: "formattedDate",
31
+ type: "string"
32
+ }],
33
+ nextDecade: null,
34
+ nextMonth: null,
35
+ nextYear: null,
36
+ previousDecade: null,
37
+ previousMonth: null,
38
+ previousYear: null,
39
+ switchToDecadeView: [{
40
+ name: "currentYear",
41
+ type: "string"
42
+ }],
43
+ switchToYearView: [{
44
+ name: "currentMonthAndYear",
45
+ type: "string"
46
+ }],
47
+ today: null,
48
+ yearCellLabel: [{
49
+ name: "year",
50
+ type: "number"
51
+ }],
52
+ yearViewLabel: [{
53
+ name: "year",
54
+ type: "string"
55
+ }]
56
+ },
57
+ card: { actionsLabel: null },
58
+ chart: {
59
+ announcementSeparator: null,
60
+ brushApplied: [{
61
+ name: "count",
62
+ type: "number"
63
+ }],
64
+ brushCleared: null,
65
+ brushRange: [{
66
+ name: "from",
67
+ type: "string"
68
+ }, {
69
+ name: "to",
70
+ type: "string"
71
+ }],
72
+ category: null,
73
+ categoryFallbackName: [{
74
+ name: "index",
75
+ type: "number"
76
+ }],
77
+ categoryRange: [{
78
+ name: "from",
79
+ type: "string"
80
+ }, {
81
+ name: "to",
82
+ type: "string"
83
+ }],
84
+ change: null,
85
+ changeValue: [{
86
+ name: "change",
87
+ type: "string"
88
+ }],
89
+ chart: null,
90
+ chartLegend: null,
91
+ chartRoleDescription: null,
92
+ close: null,
93
+ closeAbbreviation: null,
94
+ colorScale: null,
95
+ conversion: null,
96
+ conversionOfPrevious: [{
97
+ name: "rate",
98
+ type: "string"
99
+ }],
100
+ dataTableTruncated: [{
101
+ name: "shown",
102
+ type: "number"
103
+ }, {
104
+ name: "total",
105
+ type: "number"
106
+ }],
107
+ decrease: null,
108
+ decreaseAnnouncement: [
109
+ {
110
+ name: "delta",
111
+ type: "string"
112
+ },
113
+ {
114
+ name: "from",
115
+ type: "string"
116
+ },
117
+ {
118
+ name: "to",
119
+ type: "string"
120
+ }
121
+ ],
122
+ divergingRangeDescription: [
123
+ {
124
+ name: "title",
125
+ type: "string"
126
+ },
127
+ {
128
+ name: "minimum",
129
+ type: "string"
130
+ },
131
+ {
132
+ name: "midpoint",
133
+ type: "string"
134
+ },
135
+ {
136
+ name: "maximum",
137
+ type: "string"
138
+ }
139
+ ],
140
+ dropOff: null,
141
+ dropOffValue: [{
142
+ name: "value",
143
+ type: "string"
144
+ }],
145
+ falling: null,
146
+ gaugeRange: [{
147
+ name: "minimum",
148
+ type: "string"
149
+ }, {
150
+ name: "maximum",
151
+ type: "string"
152
+ }],
153
+ high: null,
154
+ highAbbreviation: null,
155
+ increase: null,
156
+ increaseAnnouncement: [
157
+ {
158
+ name: "delta",
159
+ type: "string"
160
+ },
161
+ {
162
+ name: "from",
163
+ type: "string"
164
+ },
165
+ {
166
+ name: "to",
167
+ type: "string"
168
+ }
169
+ ],
170
+ itemDeselected: [{
171
+ name: "item",
172
+ type: "string"
173
+ }],
174
+ itemFallbackName: [{
175
+ name: "index",
176
+ type: "number"
177
+ }],
178
+ itemSelected: [{
179
+ name: "item",
180
+ type: "string"
181
+ }],
182
+ keyboardHelp: null,
183
+ labelValueSeparator: null,
184
+ labeledValue: [{
185
+ name: "label",
186
+ type: "string"
187
+ }, {
188
+ name: "value",
189
+ type: "string"
190
+ }],
191
+ low: null,
192
+ lowAbbreviation: null,
193
+ noChange: null,
194
+ noChangeAnnouncement: [{
195
+ name: "value",
196
+ type: "string"
197
+ }],
198
+ noData: null,
199
+ ohlcValues: [
200
+ {
201
+ name: "open",
202
+ type: "string"
203
+ },
204
+ {
205
+ name: "high",
206
+ type: "string"
207
+ },
208
+ {
209
+ name: "low",
210
+ type: "string"
211
+ },
212
+ {
213
+ name: "close",
214
+ type: "string"
215
+ }
216
+ ],
217
+ open: null,
218
+ openAbbreviation: null,
219
+ overall: null,
220
+ overallConversion: [{
221
+ name: "rate",
222
+ type: "string"
223
+ }],
224
+ pannedDown: null,
225
+ pannedLeft: null,
226
+ pannedRight: null,
227
+ pannedUp: null,
228
+ pathSeparator: null,
229
+ pointPosition: [{
230
+ name: "position",
231
+ type: "number"
232
+ }, {
233
+ name: "total",
234
+ type: "number"
235
+ }],
236
+ range: null,
237
+ rangeDescription: [
238
+ {
239
+ name: "title",
240
+ type: "string"
241
+ },
242
+ {
243
+ name: "minimum",
244
+ type: "string"
245
+ },
246
+ {
247
+ name: "maximum",
248
+ type: "string"
249
+ }
250
+ ],
251
+ rangeValue: [{
252
+ name: "from",
253
+ type: "string"
254
+ }, {
255
+ name: "to",
256
+ type: "string"
257
+ }],
258
+ rising: null,
259
+ runningTotal: null,
260
+ seriesFallbackName: [{
261
+ name: "index",
262
+ type: "number"
263
+ }],
264
+ seriesHidden: [{
265
+ name: "series",
266
+ type: "string"
267
+ }],
268
+ seriesShown: [{
269
+ name: "series",
270
+ type: "string"
271
+ }],
272
+ seriesSummary: [{
273
+ name: "count",
274
+ type: "number"
275
+ }, {
276
+ name: "names",
277
+ type: "string"
278
+ }],
279
+ seriesValueRange: [
280
+ {
281
+ name: "series",
282
+ type: "string"
283
+ },
284
+ {
285
+ name: "minimum",
286
+ type: "string"
287
+ },
288
+ {
289
+ name: "maximum",
290
+ type: "string"
291
+ }
292
+ ],
293
+ shareOfTotal: [{
294
+ name: "share",
295
+ type: "string"
296
+ }],
297
+ size: null,
298
+ sizeValue: [{
299
+ name: "size",
300
+ type: "string"
301
+ }],
302
+ stackShare: [{
303
+ name: "share",
304
+ type: "string"
305
+ }],
306
+ stageFallbackName: [{
307
+ name: "index",
308
+ type: "number"
309
+ }],
310
+ stagePosition: [{
311
+ name: "position",
312
+ type: "number"
313
+ }, {
314
+ name: "total",
315
+ type: "number"
316
+ }],
317
+ stepFallbackName: [{
318
+ name: "index",
319
+ type: "number"
320
+ }],
321
+ stepPosition: [{
322
+ name: "position",
323
+ type: "number"
324
+ }, {
325
+ name: "total",
326
+ type: "number"
327
+ }],
328
+ subtotal: null,
329
+ subtotalAnnouncement: [{
330
+ name: "value",
331
+ type: "string"
332
+ }],
333
+ total: null,
334
+ totalAnnouncement: [{
335
+ name: "value",
336
+ type: "string"
337
+ }],
338
+ treemapGroup: [{
339
+ name: "count",
340
+ type: "number"
341
+ }],
342
+ treemapLeaf: null,
343
+ unchanged: null,
344
+ value: null,
345
+ valueRange: [{
346
+ name: "from",
347
+ type: "string"
348
+ }, {
349
+ name: "to",
350
+ type: "string"
351
+ }],
352
+ viewportResetToDefault: null,
353
+ viewportResetToFull: null,
354
+ visualIndicatorClamped: null,
355
+ zoomedIn: null,
356
+ zoomedOut: null
357
+ },
358
+ chip: { removeLabel: [{
359
+ name: "label",
360
+ optional: true,
361
+ type: "string"
362
+ }] },
363
+ colorGradient: {
364
+ alpha: null,
365
+ alphaText: [{
366
+ name: "opacity",
367
+ type: "number"
368
+ }],
369
+ apply: null,
370
+ blue: null,
371
+ cancel: null,
372
+ clearColor: null,
373
+ colorCopied: null,
374
+ colorGradient: null,
375
+ copyAsHex: null,
376
+ copyAsRgb: null,
377
+ copyColor: null,
378
+ copyFailed: null,
379
+ currentColor: null,
380
+ green: null,
381
+ hexColor: null,
382
+ hue: null,
383
+ previousColor: null,
384
+ red: null,
385
+ saturation: null,
386
+ saturationAndValue: null,
387
+ saturationAndValueText: [{
388
+ name: "saturation",
389
+ type: "number"
390
+ }, {
391
+ name: "value",
392
+ type: "number"
393
+ }],
394
+ switchColorMode: null,
395
+ value: null
396
+ },
397
+ colorPalette: {
398
+ color: [{
399
+ name: "color",
400
+ type: "string"
401
+ }],
402
+ colorPalette: null,
403
+ namedColor: [{
404
+ name: "name",
405
+ type: "string"
406
+ }, {
407
+ name: "color",
408
+ type: "string"
409
+ }]
410
+ },
411
+ colorPicker: {
412
+ clearColor: null,
413
+ colorGradientPicker: null,
414
+ colorPalettePicker: null,
415
+ colorPicker: null,
416
+ noColor: null
417
+ },
418
+ comboBox: { clear: null },
419
+ command: {
420
+ dialogLabel: null,
421
+ inputLabel: null,
422
+ listLabel: null,
423
+ loading: null,
424
+ noResults: null,
425
+ placeholder: null,
426
+ resultsAvailable: [{
427
+ name: "count",
428
+ type: "number"
429
+ }]
430
+ },
431
+ datePicker: {
432
+ datePicker: null,
433
+ openCalendar: null
434
+ },
435
+ dateTimePicker: {
436
+ calendar: null,
437
+ cancel: null,
438
+ date: null,
439
+ dateTimePicker: null,
440
+ openDateTimePicker: null,
441
+ set: null,
442
+ time: null,
443
+ timePicker: null
444
+ },
445
+ dialog: {
446
+ cancel: null,
447
+ closeDialog: null,
448
+ ok: null
449
+ },
450
+ dropdownList: { clear: null },
451
+ dropdowns: {
452
+ itemPosition: [
453
+ {
454
+ name: "text",
455
+ type: "string"
456
+ },
457
+ {
458
+ name: "position",
459
+ type: "number"
460
+ },
461
+ {
462
+ name: "total",
463
+ type: "number"
464
+ }
465
+ ],
466
+ noResultsFound: null,
467
+ resultsAvailable: [{
468
+ name: "count",
469
+ type: "number"
470
+ }]
471
+ },
472
+ editor: {
473
+ addColumnAfter: null,
474
+ addColumnBefore: null,
475
+ addHorizontalLine: null,
476
+ addRowAfter: null,
477
+ addRowBefore: null,
478
+ alignCenter: null,
479
+ alignEnd: null,
480
+ alignLeft: null,
481
+ alignRight: null,
482
+ alignStart: null,
483
+ alignmentGroup: null,
484
+ altText: null,
485
+ apply: null,
486
+ backgroundColor: null,
487
+ bold: null,
488
+ cancel: null,
489
+ codeBlock: null,
490
+ color: null,
491
+ contentLabel: null,
492
+ defaultFontFamily: null,
493
+ deleteColumn: null,
494
+ deleteRow: null,
495
+ deleteTable: null,
496
+ editLink: null,
497
+ enterUrl: null,
498
+ fontSize: null,
499
+ format: null,
500
+ heading: [{
501
+ name: "level",
502
+ type: "number"
503
+ }],
504
+ heightPx: null,
505
+ historyGroup: null,
506
+ imageUrl: null,
507
+ indent: null,
508
+ indentGroup: null,
509
+ insert: null,
510
+ insertImage: null,
511
+ insertLink: null,
512
+ insertOrderedList: null,
513
+ insertTable: null,
514
+ insertTaskList: null,
515
+ insertUnorderedList: null,
516
+ invalidUrl: null,
517
+ italic: null,
518
+ justify: null,
519
+ linkGroup: null,
520
+ listGroup: null,
521
+ mergeCells: null,
522
+ outdent: null,
523
+ paragraph: null,
524
+ quotation: null,
525
+ redo: null,
526
+ removeLink: null,
527
+ selectFontFamily: null,
528
+ selectFontSize: null,
529
+ splitCell: null,
530
+ strikethrough: null,
531
+ subscript: null,
532
+ superscript: null,
533
+ tableGroup: null,
534
+ tableSize: [{
535
+ name: "rows",
536
+ type: "number"
537
+ }, {
538
+ name: "columns",
539
+ type: "number"
540
+ }],
541
+ textStyleGroup: null,
542
+ toggleHeaderRow: null,
543
+ toolbar: null,
544
+ underline: null,
545
+ undo: null,
546
+ widthPx: null
547
+ },
548
+ filter: {
549
+ and: null,
550
+ apply: null,
551
+ clear: null,
552
+ contains: null,
553
+ doesNotContain: null,
554
+ endsWith: null,
555
+ isAfter: null,
556
+ isAfterOrEqualTo: null,
557
+ isBefore: null,
558
+ isBeforeOrEqualTo: null,
559
+ isEmpty: null,
560
+ isEqualTo: null,
561
+ isFalse: null,
562
+ isGreaterThan: null,
563
+ isGreaterThanOrEqualTo: null,
564
+ isLessThan: null,
565
+ isLessThanOrEqualTo: null,
566
+ isNotEmpty: null,
567
+ isNotEqualTo: null,
568
+ isNotNull: null,
569
+ isNotNullOrEmpty: null,
570
+ isNull: null,
571
+ isNullOrEmpty: null,
572
+ isTrue: null,
573
+ logic: null,
574
+ operator: null,
575
+ or: null,
576
+ secondOperator: null,
577
+ secondValue: null,
578
+ startsWith: null,
579
+ value: null
580
+ },
581
+ grid: {
582
+ all: null,
583
+ apply: null,
584
+ cancel: null,
585
+ cancelNewRow: null,
586
+ cancelRowEdit: [{
587
+ name: "rowNumber",
588
+ type: "number"
589
+ }],
590
+ clearFilter: [{
591
+ name: "column",
592
+ type: "string"
593
+ }],
594
+ collapseDetail: [{
595
+ name: "rowNumber",
596
+ type: "number"
597
+ }],
598
+ columnGrouped: [{
599
+ name: "column",
600
+ type: "string"
601
+ }],
602
+ columnMoved: [{
603
+ name: "column",
604
+ type: "string"
605
+ }, {
606
+ name: "position",
607
+ type: "number"
608
+ }],
609
+ columns: null,
610
+ columnsSelected: [{
611
+ name: "count",
612
+ type: "number"
613
+ }],
614
+ commandColumnTitle: null,
615
+ delete: null,
616
+ deleteRowConfirmation: [{
617
+ name: "rowNumber",
618
+ type: "number"
619
+ }],
620
+ deleteRowTitle: null,
621
+ details: null,
622
+ dragColumnHeaderToGroup: null,
623
+ edit: null,
624
+ editRow: [{
625
+ name: "rowNumber",
626
+ type: "number"
627
+ }],
628
+ expandDetail: [{
629
+ name: "rowNumber",
630
+ type: "number"
631
+ }],
632
+ fieldValidationError: null,
633
+ filterByColumn: [{
634
+ name: "column",
635
+ type: "string"
636
+ }],
637
+ filterByColumnFiltered: [{
638
+ name: "column",
639
+ type: "string"
640
+ }],
641
+ filterOperator: [{
642
+ name: "column",
643
+ type: "string"
644
+ }, {
645
+ name: "operator",
646
+ type: "string"
647
+ }],
648
+ filterPlaceholder: null,
649
+ group: null,
650
+ groupOptions: [{
651
+ name: "column",
652
+ type: "string"
653
+ }],
654
+ loading: null,
655
+ modified: null,
656
+ moveAsNext: null,
657
+ moveAsPrevious: null,
658
+ moveRow: null,
659
+ noData: null,
660
+ remove: null,
661
+ removeRow: [{
662
+ name: "rowNumber",
663
+ type: "number"
664
+ }],
665
+ reorderRow: [{
666
+ name: "rowNumber",
667
+ type: "number"
668
+ }],
669
+ resizeColumn: [{
670
+ name: "column",
671
+ type: "string"
672
+ }],
673
+ rowReorder: null,
674
+ rowReorderDisabled: null,
675
+ rowReorderDisabledEditing: null,
676
+ rowReorderDisabledFiltered: null,
677
+ rowReorderDisabledGrouped: null,
678
+ rowReorderDisabledServerBinding: null,
679
+ rowReorderDisabledSingleRow: null,
680
+ rowReorderDisabledSorted: null,
681
+ rowReorderDisabledVirtualScroll: null,
682
+ rowReorderHandleAriaLabel: [
683
+ {
684
+ name: "rowLabel",
685
+ type: "string"
686
+ },
687
+ {
688
+ name: "keyboardHint",
689
+ type: "string"
690
+ },
691
+ {
692
+ name: "disabledReason",
693
+ optional: true,
694
+ type: "string"
695
+ }
696
+ ],
697
+ rowReorderKeyboardHint: null,
698
+ rowReorderMoved: [{
699
+ name: "fromRowNumber",
700
+ type: "number"
701
+ }, {
702
+ name: "toPosition",
703
+ type: "number"
704
+ }],
705
+ rowValidationError: null,
706
+ save: null,
707
+ saveNewRow: null,
708
+ saveRow: [{
709
+ name: "rowNumber",
710
+ type: "number"
711
+ }],
712
+ selectAllRows: null,
713
+ selectRow: [{
714
+ name: "rowNumber",
715
+ type: "number"
716
+ }],
717
+ sortOrder: [{
718
+ name: "position",
719
+ type: "number"
720
+ }],
721
+ toolbar: null
722
+ },
723
+ label: { optional: null },
724
+ list: {
725
+ filterList: null,
726
+ loading: null,
727
+ noData: null,
728
+ pagerLabel: [{
729
+ name: "list",
730
+ type: "string"
731
+ }]
732
+ },
733
+ listBox: {
734
+ clearSelection: null,
735
+ itemsMoved: [{
736
+ name: "position",
737
+ type: "number"
738
+ }, {
739
+ name: "total",
740
+ type: "number"
741
+ }],
742
+ itemsRemoved: [{
743
+ name: "count",
744
+ type: "number"
745
+ }],
746
+ itemsTransferred: [{
747
+ name: "count",
748
+ type: "number"
749
+ }, {
750
+ name: "list",
751
+ type: "string"
752
+ }],
753
+ itemsTransferredToOtherList: [{
754
+ name: "count",
755
+ type: "number"
756
+ }],
757
+ moveDown: null,
758
+ moveUp: null,
759
+ remove: null,
760
+ selectionCleared: null,
761
+ toolbarLabel: [{
762
+ name: "list",
763
+ type: "string"
764
+ }],
765
+ transferAllFrom: null,
766
+ transferAllFromList: [{
767
+ name: "list",
768
+ type: "string"
769
+ }],
770
+ transferAllTo: null,
771
+ transferAllToList: [{
772
+ name: "list",
773
+ type: "string"
774
+ }],
775
+ transferFrom: null,
776
+ transferFromList: [{
777
+ name: "list",
778
+ type: "string"
779
+ }],
780
+ transferTo: null,
781
+ transferToList: [{
782
+ name: "list",
783
+ type: "string"
784
+ }]
785
+ },
786
+ multiSelect: {
787
+ clear: null,
788
+ itemsCount: [{
789
+ name: "count",
790
+ type: "number"
791
+ }],
792
+ removeMoreItems: [{
793
+ name: "count",
794
+ type: "number"
795
+ }]
796
+ },
797
+ notification: {
798
+ close: null,
799
+ error: null,
800
+ info: null,
801
+ region: null,
802
+ success: null,
803
+ warning: null
804
+ },
805
+ numericTextBox: {
806
+ decrease: null,
807
+ increase: null
808
+ },
809
+ otpInput: { verificationCode: null },
810
+ pager: {
811
+ firstPageLabel: null,
812
+ itemsPerPageLabel: null,
813
+ jumpBackwardLabel: [{
814
+ name: "pages",
815
+ type: "number"
816
+ }],
817
+ jumpForwardLabel: [{
818
+ name: "pages",
819
+ type: "number"
820
+ }],
821
+ lastPageLabel: null,
822
+ nextPageLabel: null,
823
+ ofText: null,
824
+ pageInputPrefix: [{
825
+ name: "totalPages",
826
+ type: "number"
827
+ }],
828
+ pageInputSuffix: [{
829
+ name: "totalPages",
830
+ type: "number"
831
+ }],
832
+ pageLabel: [{
833
+ name: "page",
834
+ type: "number"
835
+ }],
836
+ pageSelectLabel: null,
837
+ pageSizeLabel: [{
838
+ name: "pageSize",
839
+ type: "number"
840
+ }],
841
+ pageStatus: [{
842
+ name: "page",
843
+ type: "number"
844
+ }, {
845
+ name: "totalPages",
846
+ type: "number"
847
+ }],
848
+ pageText: null,
849
+ pagerLabel: null,
850
+ previousPageLabel: null,
851
+ rangeStatus: [
852
+ {
853
+ name: "start",
854
+ type: "number"
855
+ },
856
+ {
857
+ name: "end",
858
+ type: "number"
859
+ },
860
+ {
861
+ name: "total",
862
+ type: "number"
863
+ }
864
+ ]
865
+ },
866
+ progressBar: { label: null },
867
+ rating: {
868
+ notRated: null,
869
+ valueText: [{
870
+ name: "value",
871
+ type: "number"
872
+ }, {
873
+ name: "max",
874
+ type: "number"
875
+ }]
876
+ },
877
+ scrollView: {
878
+ carousel: null,
879
+ nextPage: null,
880
+ page: [{
881
+ name: "current",
882
+ type: "number"
883
+ }],
884
+ pageOf: [{
885
+ name: "current",
886
+ type: "number"
887
+ }, {
888
+ name: "total",
889
+ type: "number"
890
+ }],
891
+ pages: null,
892
+ previousPage: null,
893
+ scrollPagerNext: null,
894
+ scrollPagerPrevious: null,
895
+ slide: null
896
+ },
897
+ sheet: { closeSheet: null },
898
+ sidebar: {
899
+ drawerLabel: null,
900
+ rail: null
901
+ },
902
+ slider: {
903
+ maximumValue: null,
904
+ minimumValue: null,
905
+ sliderValue: null
906
+ },
907
+ spinner: {
908
+ cancel: null,
909
+ loading: null
910
+ },
911
+ splitButton: {
912
+ menuButtonAriaLabel: null,
913
+ menuButtonWithText: [{
914
+ name: "text",
915
+ type: "string"
916
+ }],
917
+ splitButton: [{
918
+ name: "text",
919
+ type: "string"
920
+ }]
921
+ },
922
+ splitter: {
923
+ collapseDown: null,
924
+ collapseNext: null,
925
+ collapsePrevious: null,
926
+ collapseUp: null,
927
+ resizer: null
928
+ },
929
+ stepper: {
930
+ stepCompleted: null,
931
+ stepInvalid: null,
932
+ stepPosition: [{
933
+ name: "current",
934
+ type: "number"
935
+ }, {
936
+ name: "total",
937
+ type: "number"
938
+ }],
939
+ stepProgress: null,
940
+ stepper: null
941
+ },
942
+ tabs: {
943
+ closeTab: null,
944
+ scrollNext: null,
945
+ scrollPrevious: null
946
+ },
947
+ textBox: { clear: null },
948
+ timePicker: {
949
+ openTimePicker: null,
950
+ timePicker: null
951
+ },
952
+ timeSelector: {
953
+ am: null,
954
+ amPm: null,
955
+ headerHours: null,
956
+ headerMinutes: null,
957
+ headerSeconds: null,
958
+ hours: null,
959
+ minutes: null,
960
+ now: null,
961
+ pm: null,
962
+ seconds: null,
963
+ set: null,
964
+ timeSelector: null
965
+ },
966
+ treeView: {
967
+ collapse: null,
968
+ expand: null,
969
+ filter: null,
970
+ filterLabel: [{
971
+ name: "tree",
972
+ type: "string"
973
+ }],
974
+ filterTree: null,
975
+ loadError: [{
976
+ name: "node",
977
+ type: "string"
978
+ }],
979
+ loadingNode: [{
980
+ name: "node",
981
+ type: "string"
982
+ }],
983
+ movedAfter: [{
984
+ name: "node",
985
+ type: "string"
986
+ }, {
987
+ name: "target",
988
+ type: "string"
989
+ }],
990
+ movedBefore: [{
991
+ name: "node",
992
+ type: "string"
993
+ }, {
994
+ name: "target",
995
+ type: "string"
996
+ }],
997
+ movedInto: [{
998
+ name: "node",
999
+ type: "string"
1000
+ }, {
1001
+ name: "target",
1002
+ type: "string"
1003
+ }],
1004
+ noData: null,
1005
+ noMatches: null,
1006
+ results: [{
1007
+ name: "count",
1008
+ type: "number"
1009
+ }],
1010
+ retryLoading: [{
1011
+ name: "node",
1012
+ type: "string"
1013
+ }]
1014
+ },
1015
+ window: {
1016
+ close: null,
1017
+ closeWindow: null,
1018
+ maximize: null,
1019
+ minimize: null,
1020
+ moveOrResizeWindow: null,
1021
+ moveWindow: null,
1022
+ resizeBottom: null,
1023
+ resizeBottomLeft: null,
1024
+ resizeBottomRight: null,
1025
+ resizeLeft: null,
1026
+ resizeRight: null,
1027
+ resizeTop: null,
1028
+ resizeTopLeft: null,
1029
+ resizeTopRight: null,
1030
+ resizeWindow: null,
1031
+ restore: null
1032
+ }
667
1033
  };
668
-
669
- /** The `select` key that an absent or empty argument selects, before falling back to `other`. */
670
1034
  const ICU_ABSENT_SELECT_KEY = "undefined";
671
- const pluralRulesCache = new Map();
672
- /**
673
- * Formats a parsed message. Numbers go through `formatNumber`, so they use the locale's digits and grouping, the
674
- * same as Mona's TypeScript catalogs.
675
- *
676
- * - An absent argument (`undefined`) formats as an empty string.
677
- * - In `select`, an absent or empty argument picks the `undefined` option, then `other`; a present value never
678
- * picks `undefined`.
679
- * - In `plural`, an exact `=N` option wins over the value's plural category, which is taken after the offset.
680
- */
1035
+ const pluralRulesCache = /* @__PURE__ */ new Map();
681
1036
  function formatIcuMessage(elements, values, localeId) {
682
- return formatElements(elements, values, localeId, null);
1037
+ return formatElements(elements, values, localeId, null);
683
1038
  }
684
1039
  function formatElements(elements, values, localeId, pound) {
685
- let result = "";
686
- for (const element of elements) {
687
- switch (element.kind) {
688
- case "literal":
689
- result += element.value;
690
- break;
691
- case "argument":
692
- case "number": {
693
- const value = values.get(element.name);
694
- result +=
695
- typeof value === "number"
696
- ? formatNumber(value, localeId, element.kind === "number" ? element.options : undefined)
697
- : (value ?? "");
698
- break;
699
- }
700
- case "pound":
701
- result += pound == null ? "#" : formatNumber(pound, localeId);
702
- break;
703
- case "plural": {
704
- const value = Number(values.get(element.name));
705
- const exact = [...element.options].find(([key]) => key.startsWith("=") && Number(key.slice(1)) === value);
706
- const adjusted = value - element.offset;
707
- const option = exact?.[1] ??
708
- element.options.get(getPluralRules(localeId, element.ordinal).select(adjusted)) ??
709
- element.options.get("other");
710
- result += formatElements(option, values, localeId, adjusted);
711
- break;
712
- }
713
- case "select": {
714
- const option = selectOption(element.options, values.get(element.name)) ?? element.options.get("other");
715
- result += formatElements(option, values, localeId, pound);
716
- break;
717
- }
718
- }
719
- }
720
- return result;
1040
+ let result = "";
1041
+ for (const element of elements) switch (element.kind) {
1042
+ case "literal":
1043
+ result += element.value;
1044
+ break;
1045
+ case "argument":
1046
+ case "number": {
1047
+ const value = values.get(element.name);
1048
+ result += typeof value === "number" ? formatNumber(value, localeId, element.kind === "number" ? element.options : void 0) : value ?? "";
1049
+ break;
1050
+ }
1051
+ case "pound":
1052
+ result += pound == null ? "#" : formatNumber(pound, localeId);
1053
+ break;
1054
+ case "plural": {
1055
+ const value = Number(values.get(element.name));
1056
+ const exact = [...element.options].find(([key]) => key.startsWith("=") && Number(key.slice(1)) === value);
1057
+ const adjusted = value - element.offset;
1058
+ const option = exact?.[1] ?? element.options.get(getPluralRules(localeId, element.ordinal).select(adjusted)) ?? element.options.get("other");
1059
+ result += formatElements(option, values, localeId, adjusted);
1060
+ break;
1061
+ }
1062
+ case "select": {
1063
+ const option = selectOption(element.options, values.get(element.name)) ?? element.options.get("other");
1064
+ result += formatElements(option, values, localeId, pound);
1065
+ break;
1066
+ }
1067
+ }
1068
+ return result;
721
1069
  }
722
1070
  function getPluralRules(localeId, ordinal) {
723
- const cacheKey = `${ordinal ? "ordinal" : "cardinal"}:${localeId}`;
724
- let rules = pluralRulesCache.get(cacheKey);
725
- if (rules == null) {
726
- rules = new Intl.PluralRules(localeId, { type: ordinal ? "ordinal" : "cardinal" });
727
- pluralRulesCache.set(cacheKey, rules);
728
- }
729
- return rules;
1071
+ const cacheKey = `${ordinal ? "ordinal" : "cardinal"}:${localeId}`;
1072
+ let rules = pluralRulesCache.get(cacheKey);
1073
+ if (rules == null) {
1074
+ rules = new Intl.PluralRules(localeId, { type: ordinal ? "ordinal" : "cardinal" });
1075
+ pluralRulesCache.set(cacheKey, rules);
1076
+ }
1077
+ return rules;
730
1078
  }
731
1079
  function selectOption(options, value) {
732
- if (value == null || value === "") {
733
- return options.get(ICU_ABSENT_SELECT_KEY);
734
- }
735
- const key = String(value);
736
- return key === ICU_ABSENT_SELECT_KEY ? undefined : options.get(key);
737
- }
738
-
739
- /**
740
- * Parser for the subset of ICU MessageFormat that Mona supports:
741
- *
742
- * - `{name}` and `{name, number}`, with the `integer` and `percent` styles and the `::group-off`,
743
- * `::percent` and `::precision-integer` skeletons
744
- * - `{name, plural, ...}` and `{name, selectordinal, ...}`, with `=N` and CLDR category selectors, `offset:N`, and `#`
745
- * - `{name, select, ...}`
746
- * - apostrophe quoting: `''` is an apostrophe, and `'{'`, `'}'` and, inside a plural, `'#'` are literal
747
- *
748
- * Dates, times and other argument types are rejected, because no Mona message takes one.
749
- */
750
- class IcuSyntaxError extends Error {
751
- constructor(message, offset, kind = "syntax") {
752
- super(`${message} at position ${offset}`);
753
- this.name = "IcuSyntaxError";
754
- this.kind = kind;
755
- this.offset = offset;
756
- }
1080
+ if (value == null || value === "") return options.get(ICU_ABSENT_SELECT_KEY);
1081
+ const key = String(value);
1082
+ return key === "undefined" ? void 0 : options.get(key);
757
1083
  }
758
- /** Arguments can nest this deep; deeper input is rejected rather than risking a stack overflow. */
1084
+ var IcuSyntaxError = class extends Error {
1085
+ constructor(message, offset, kind = "syntax") {
1086
+ super(`${message} at position ${offset}`);
1087
+ this.name = "IcuSyntaxError";
1088
+ this.kind = kind;
1089
+ this.offset = offset;
1090
+ }
1091
+ };
759
1092
  const MAX_DEPTH = 16;
760
- const PLURAL_CATEGORIES = new Set(["few", "many", "one", "other", "two", "zero"]);
1093
+ const PLURAL_CATEGORIES = /* @__PURE__ */ new Set([
1094
+ "few",
1095
+ "many",
1096
+ "one",
1097
+ "other",
1098
+ "two",
1099
+ "zero"
1100
+ ]);
761
1101
  const IDENTIFIER_REGEX = /[A-Za-z_][A-Za-z0-9_]*/y;
762
1102
  const KEYWORD_REGEX = /[\p{L}\p{N}_-]+/uy;
763
1103
  const EXACT_SELECTOR_REGEX = /=-?\d+(?:\.\d+)?/y;
764
1104
  const OFFSET_REGEX = /offset:\s*(\d+)/y;
765
1105
  const WHITESPACE_REGEX = /\s*/y;
766
1106
  const NUMBER_SKELETON_OPTIONS = {
767
- "group-off": { useGrouping: false },
768
- percent: { style: "percent" },
769
- "precision-integer": { maximumFractionDigits: 0 }
1107
+ "group-off": { useGrouping: false },
1108
+ percent: { style: "percent" },
1109
+ "precision-integer": { maximumFractionDigits: 0 }
770
1110
  };
771
- /** Parses an ICU message. Throws an {@link IcuSyntaxError} for input outside the supported subset. */
772
1111
  function parseIcuMessage(source) {
773
- const state = { pos: 0, source };
774
- return parseMessage(state, 0, false, false);
1112
+ return parseMessage({
1113
+ pos: 0,
1114
+ source
1115
+ }, 0, false, false);
775
1116
  }
776
1117
  function expect(state, char) {
777
- if (state.source[state.pos] !== char) {
778
- throw new IcuSyntaxError(state.pos >= state.source.length ? `Expected "${char}" but the message ended` : `Expected "${char}"`, state.pos);
779
- }
780
- state.pos++;
1118
+ if (state.source[state.pos] !== char) throw new IcuSyntaxError(state.pos >= state.source.length ? `Expected "${char}" but the message ended` : `Expected "${char}"`, state.pos);
1119
+ state.pos++;
781
1120
  }
782
1121
  function match(state, regex) {
783
- regex.lastIndex = state.pos;
784
- const result = regex.exec(state.source);
785
- if (result != null) {
786
- state.pos = regex.lastIndex;
787
- }
788
- return result;
1122
+ regex.lastIndex = state.pos;
1123
+ const result = regex.exec(state.source);
1124
+ if (result != null) state.pos = regex.lastIndex;
1125
+ return result;
789
1126
  }
790
1127
  function parseArgument(state, depth, inPlural) {
791
- const start = state.pos;
792
- if (depth > MAX_DEPTH) {
793
- throw new IcuSyntaxError(`Arguments are nested more than ${MAX_DEPTH} levels deep`, start);
794
- }
795
- expect(state, "{");
796
- skipWhitespace(state);
797
- const name = match(state, IDENTIFIER_REGEX)?.[0];
798
- if (name == null) {
799
- throw new IcuSyntaxError("Expected an argument name", state.pos);
800
- }
801
- skipWhitespace(state);
802
- if (state.source[state.pos] === "}") {
803
- state.pos++;
804
- return { kind: "argument", name };
805
- }
806
- expect(state, ",");
807
- skipWhitespace(state);
808
- const typeStart = state.pos;
809
- const type = match(state, IDENTIFIER_REGEX)?.[0];
810
- skipWhitespace(state);
811
- switch (type) {
812
- case "number":
813
- return parseNumberArgument(state, name);
814
- case "plural":
815
- case "selectordinal":
816
- return parsePluralArgument(state, name, type === "selectordinal", depth, start);
817
- case "select":
818
- expect(state, ",");
819
- return { kind: "select", name, options: parseOptions(state, depth, inPlural, false, start) };
820
- default:
821
- throw new IcuSyntaxError(type == null ? "Expected an argument type" : `Unsupported argument type "${type}"`, typeStart);
822
- }
1128
+ const start = state.pos;
1129
+ if (depth > MAX_DEPTH) throw new IcuSyntaxError(`Arguments are nested more than ${MAX_DEPTH} levels deep`, start);
1130
+ expect(state, "{");
1131
+ skipWhitespace(state);
1132
+ const name = match(state, IDENTIFIER_REGEX)?.[0];
1133
+ if (name == null) throw new IcuSyntaxError("Expected an argument name", state.pos);
1134
+ skipWhitespace(state);
1135
+ if (state.source[state.pos] === "}") {
1136
+ state.pos++;
1137
+ return {
1138
+ kind: "argument",
1139
+ name
1140
+ };
1141
+ }
1142
+ expect(state, ",");
1143
+ skipWhitespace(state);
1144
+ const typeStart = state.pos;
1145
+ const type = match(state, IDENTIFIER_REGEX)?.[0];
1146
+ skipWhitespace(state);
1147
+ switch (type) {
1148
+ case "number": return parseNumberArgument(state, name);
1149
+ case "plural":
1150
+ case "selectordinal": return parsePluralArgument(state, name, type === "selectordinal", depth, start);
1151
+ case "select":
1152
+ expect(state, ",");
1153
+ return {
1154
+ kind: "select",
1155
+ name,
1156
+ options: parseOptions(state, depth, inPlural, false, start)
1157
+ };
1158
+ default: throw new IcuSyntaxError(type == null ? "Expected an argument type" : `Unsupported argument type "${type}"`, typeStart);
1159
+ }
823
1160
  }
824
1161
  function parseMessage(state, depth, inPlural, nested) {
825
- const { source } = state;
826
- const elements = [];
827
- let text = "";
828
- const flush = () => {
829
- if (text !== "") {
830
- elements.push({ kind: "literal", value: text });
831
- text = "";
832
- }
833
- };
834
- while (state.pos < source.length) {
835
- const char = source[state.pos];
836
- if (char === "'") {
837
- text += readApostrophe(state, inPlural);
838
- }
839
- else if (char === "{") {
840
- flush();
841
- elements.push(parseArgument(state, depth + 1, inPlural));
842
- }
843
- else if (char === "}") {
844
- if (nested) {
845
- break;
846
- }
847
- throw new IcuSyntaxError('Unexpected "}"', state.pos);
848
- }
849
- else if (char === "#" && inPlural) {
850
- flush();
851
- elements.push({ kind: "pound" });
852
- state.pos++;
853
- }
854
- else {
855
- text += char;
856
- state.pos++;
857
- }
858
- }
859
- flush();
860
- return elements;
1162
+ const { source } = state;
1163
+ const elements = [];
1164
+ let text = "";
1165
+ const flush = () => {
1166
+ if (text !== "") {
1167
+ elements.push({
1168
+ kind: "literal",
1169
+ value: text
1170
+ });
1171
+ text = "";
1172
+ }
1173
+ };
1174
+ while (state.pos < source.length) {
1175
+ const char = source[state.pos];
1176
+ if (char === "'") text += readApostrophe(state, inPlural);
1177
+ else if (char === "{") {
1178
+ flush();
1179
+ elements.push(parseArgument(state, depth + 1, inPlural));
1180
+ } else if (char === "}") {
1181
+ if (nested) break;
1182
+ throw new IcuSyntaxError("Unexpected \"}\"", state.pos);
1183
+ } else if (char === "#" && inPlural) {
1184
+ flush();
1185
+ elements.push({ kind: "pound" });
1186
+ state.pos++;
1187
+ } else {
1188
+ text += char;
1189
+ state.pos++;
1190
+ }
1191
+ }
1192
+ flush();
1193
+ return elements;
861
1194
  }
862
1195
  function parseNumberArgument(state, name) {
863
- if (state.source[state.pos] === "}") {
864
- state.pos++;
865
- return { kind: "number", name };
866
- }
867
- expect(state, ",");
868
- const styleStart = state.pos;
869
- const end = state.source.indexOf("}", state.pos);
870
- if (end < 0) {
871
- throw new IcuSyntaxError('Expected "}" but the message ended', state.source.length);
872
- }
873
- const style = state.source.slice(state.pos, end).trim();
874
- state.pos = end + 1;
875
- if (style === "integer") {
876
- return { kind: "number", name, options: NUMBER_SKELETON_OPTIONS["precision-integer"] };
877
- }
878
- if (style === "percent") {
879
- return { kind: "number", name, options: NUMBER_SKELETON_OPTIONS["percent"] };
880
- }
881
- if (style.startsWith("::")) {
882
- let options = {};
883
- for (const token of style.slice(2).trim().split(/\s+/)) {
884
- if (!Object.hasOwn(NUMBER_SKELETON_OPTIONS, token)) {
885
- throw new IcuSyntaxError(`Unsupported number skeleton "${token}"`, styleStart);
886
- }
887
- options = { ...options, ...NUMBER_SKELETON_OPTIONS[token] };
888
- }
889
- return { kind: "number", name, options };
890
- }
891
- throw new IcuSyntaxError(`Unsupported number style "${style}"`, styleStart);
1196
+ if (state.source[state.pos] === "}") {
1197
+ state.pos++;
1198
+ return {
1199
+ kind: "number",
1200
+ name
1201
+ };
1202
+ }
1203
+ expect(state, ",");
1204
+ const styleStart = state.pos;
1205
+ const end = state.source.indexOf("}", state.pos);
1206
+ if (end < 0) throw new IcuSyntaxError("Expected \"}\" but the message ended", state.source.length);
1207
+ const style = state.source.slice(state.pos, end).trim();
1208
+ state.pos = end + 1;
1209
+ if (style === "integer") return {
1210
+ kind: "number",
1211
+ name,
1212
+ options: NUMBER_SKELETON_OPTIONS["precision-integer"]
1213
+ };
1214
+ if (style === "percent") return {
1215
+ kind: "number",
1216
+ name,
1217
+ options: NUMBER_SKELETON_OPTIONS["percent"]
1218
+ };
1219
+ if (style.startsWith("::")) {
1220
+ let options = {};
1221
+ for (const token of style.slice(2).trim().split(/\s+/)) {
1222
+ if (!Object.hasOwn(NUMBER_SKELETON_OPTIONS, token)) throw new IcuSyntaxError(`Unsupported number skeleton "${token}"`, styleStart);
1223
+ options = {
1224
+ ...options,
1225
+ ...NUMBER_SKELETON_OPTIONS[token]
1226
+ };
1227
+ }
1228
+ return {
1229
+ kind: "number",
1230
+ name,
1231
+ options
1232
+ };
1233
+ }
1234
+ throw new IcuSyntaxError(`Unsupported number style "${style}"`, styleStart);
892
1235
  }
893
- /**
894
- * Parses the `selector {message}` pairs that follow the comma after the argument type (and offset), up to and including the argument's closing brace. Every plural and select must
895
- * have an `other` option, which is used when no other selector matches.
896
- */
897
1236
  function parseOptions(state, depth, inPlural, plural, argumentStart) {
898
- skipWhitespace(state);
899
- const options = new Map();
900
- while (state.source[state.pos] !== "}") {
901
- if (state.pos >= state.source.length) {
902
- throw new IcuSyntaxError('Expected "}" but the message ended', state.pos);
903
- }
904
- const selectorStart = state.pos;
905
- const selector = (plural ? match(state, EXACT_SELECTOR_REGEX)?.[0] : undefined) ?? match(state, KEYWORD_REGEX)?.[0];
906
- if (selector == null) {
907
- throw new IcuSyntaxError("Expected a selector", selectorStart);
908
- }
909
- if (plural && !selector.startsWith("=") && !PLURAL_CATEGORIES.has(selector)) {
910
- throw new IcuSyntaxError(`Unknown plural category "${selector}"`, selectorStart);
911
- }
912
- if (options.has(selector)) {
913
- throw new IcuSyntaxError(`Duplicate selector "${selector}"`, selectorStart);
914
- }
915
- skipWhitespace(state);
916
- expect(state, "{");
917
- options.set(selector, parseMessage(state, depth, inPlural || plural, true));
918
- expect(state, "}");
919
- skipWhitespace(state);
920
- }
921
- state.pos++;
922
- if (!options.has("other")) {
923
- throw new IcuSyntaxError('Missing the "other" option', argumentStart, "missing-other");
924
- }
925
- return options;
1237
+ skipWhitespace(state);
1238
+ const options = /* @__PURE__ */ new Map();
1239
+ while (state.source[state.pos] !== "}") {
1240
+ if (state.pos >= state.source.length) throw new IcuSyntaxError("Expected \"}\" but the message ended", state.pos);
1241
+ const selectorStart = state.pos;
1242
+ const selector = (plural ? match(state, EXACT_SELECTOR_REGEX)?.[0] : void 0) ?? match(state, KEYWORD_REGEX)?.[0];
1243
+ if (selector == null) throw new IcuSyntaxError("Expected a selector", selectorStart);
1244
+ if (plural && !selector.startsWith("=") && !PLURAL_CATEGORIES.has(selector)) throw new IcuSyntaxError(`Unknown plural category "${selector}"`, selectorStart);
1245
+ if (options.has(selector)) throw new IcuSyntaxError(`Duplicate selector "${selector}"`, selectorStart);
1246
+ skipWhitespace(state);
1247
+ expect(state, "{");
1248
+ options.set(selector, parseMessage(state, depth, inPlural || plural, true));
1249
+ expect(state, "}");
1250
+ skipWhitespace(state);
1251
+ }
1252
+ state.pos++;
1253
+ if (!options.has("other")) throw new IcuSyntaxError("Missing the \"other\" option", argumentStart, "missing-other");
1254
+ return options;
926
1255
  }
927
1256
  function parsePluralArgument(state, name, ordinal, depth, argumentStart) {
928
- expect(state, ",");
929
- skipWhitespace(state);
930
- const offset = Number(match(state, OFFSET_REGEX)?.[1] ?? 0);
931
- return { kind: "plural", name, offset, options: parseOptions(state, depth, true, true, argumentStart), ordinal };
1257
+ expect(state, ",");
1258
+ skipWhitespace(state);
1259
+ return {
1260
+ kind: "plural",
1261
+ name,
1262
+ offset: Number(match(state, OFFSET_REGEX)?.[1] ?? 0),
1263
+ options: parseOptions(state, depth, true, true, argumentStart),
1264
+ ordinal
1265
+ };
932
1266
  }
933
- /**
934
- * Reads apostrophe quoting at the current position. `''` is one apostrophe. An apostrophe before `{`, `}`, or `#`
935
- * inside a plural starts quoted text, which ends at the next single apostrophe. Any other apostrophe is literal.
936
- */
937
1267
  function readApostrophe(state, inPlural) {
938
- const { source } = state;
939
- const next = source[state.pos + 1];
940
- if (next === "'") {
941
- state.pos += 2;
942
- return "'";
943
- }
944
- if (next !== "{" && next !== "}" && !(next === "#" && inPlural)) {
945
- state.pos++;
946
- return "'";
947
- }
948
- state.pos++;
949
- let text = "";
950
- while (state.pos < source.length) {
951
- if (source[state.pos] === "'") {
952
- if (source[state.pos + 1] === "'") {
953
- text += "'";
954
- state.pos += 2;
955
- continue;
956
- }
957
- state.pos++;
958
- break;
959
- }
960
- text += source[state.pos];
961
- state.pos++;
962
- }
963
- return text;
1268
+ const { source } = state;
1269
+ const next = source[state.pos + 1];
1270
+ if (next === "'") {
1271
+ state.pos += 2;
1272
+ return "'";
1273
+ }
1274
+ if (next !== "{" && next !== "}" && !(next === "#" && inPlural)) {
1275
+ state.pos++;
1276
+ return "'";
1277
+ }
1278
+ state.pos++;
1279
+ let text = "";
1280
+ while (state.pos < source.length) {
1281
+ if (source[state.pos] === "'") {
1282
+ if (source[state.pos + 1] === "'") {
1283
+ text += "'";
1284
+ state.pos += 2;
1285
+ continue;
1286
+ }
1287
+ state.pos++;
1288
+ break;
1289
+ }
1290
+ text += source[state.pos];
1291
+ state.pos++;
1292
+ }
1293
+ return text;
964
1294
  }
965
1295
  function skipWhitespace(state) {
966
- match(state, WHITESPACE_REGEX);
967
- }
968
-
969
- /** Thrown by `compileMonaLocale` in strict mode when the data has issues. */
970
- class MonaLocaleDataError extends Error {
971
- constructor(issues) {
972
- super(`[mona-ui] The locale data has ${issues.length} issue(s):\n` +
973
- issues.map(issue => `- ${issue.path || "(root)"}: ${issue.message}`).join("\n"));
974
- this.name = "MonaLocaleDataError";
975
- this.issues = issues;
976
- }
1296
+ match(state, WHITESPACE_REGEX);
977
1297
  }
978
- /**
979
- * Compiles locale data, such as a JSON catalog from a translation-management system, into a `MonaLocale`. Messages
980
- * with parameters become functions; plain messages become strings.
981
- *
982
- * By default, a message with an issue (an unknown key or parameter, or a syntax error) is skipped, so components
983
- * show their English default for it, and a dev-mode warning lists the issues. With `{ strict: true }`, any issue
984
- * throws a {@link MonaLocaleDataError} instead.
985
- *
986
- * ```ts
987
- * provideMonaI18n({
988
- * loadLocale: id => fetch(`/i18n/${id}.json`).then(r => r.json()).then(data => compileMonaLocale(data))
989
- * });
990
- * ```
991
- */
1298
+ var MonaLocaleDataError = class extends Error {
1299
+ constructor(issues) {
1300
+ super(`[mona-ui] The locale data has ${issues.length} issue(s):\n` + issues.map((issue) => `- ${issue.path || "(root)"}: ${issue.message}`).join("\n"));
1301
+ this.name = "MonaLocaleDataError";
1302
+ this.issues = issues;
1303
+ }
1304
+ };
992
1305
  function compileMonaLocale(data, options) {
993
- const { issues, locale } = analyzeLocaleData(data);
994
- if (issues.length > 0) {
995
- if (options?.strict === true) {
996
- throw new MonaLocaleDataError(issues);
997
- }
998
- if (isDevMode()) {
999
- console.warn(`[mona-ui] compileMonaLocale skipped what it could not compile; those messages fall back to English.`, issues);
1000
- }
1001
- }
1002
- return locale;
1306
+ const { issues, locale } = analyzeLocaleData(data);
1307
+ if (issues.length > 0) {
1308
+ if (options?.strict === true) throw new MonaLocaleDataError(issues);
1309
+ if (isDevMode()) console.warn(`[mona-ui] compileMonaLocale skipped what it could not compile; those messages fall back to English.`, issues);
1310
+ }
1311
+ return locale;
1003
1312
  }
1004
- /**
1005
- * Checks locale data without compiling it, for example in CI before a catalog exported from a
1006
- * translation-management system ships. Returns every issue; an empty array means the data compiles cleanly.
1007
- */
1008
1313
  function validateMonaLocaleData(data) {
1009
- return analyzeLocaleData(data).issues;
1314
+ return analyzeLocaleData(data).issues;
1010
1315
  }
1011
1316
  function analyzeLocaleData(data) {
1012
- const issues = [];
1013
- const report = (code, path, message) => {
1014
- issues.push({ code, message, path });
1015
- };
1016
- if (!isRecord(data)) {
1017
- report("invalid-structure", "", "Locale data must be an object with id, direction and messages.");
1018
- return { issues, locale: { direction: "ltr", id: MONA_FALLBACK_LOCALE_ID, messages: {} } };
1019
- }
1020
- let id = MONA_FALLBACK_LOCALE_ID;
1021
- if (typeof data["id"] === "string" && tryCanonicalizeLocaleId(data["id"]) != null) {
1022
- id = data["id"];
1023
- }
1024
- else {
1025
- report("invalid-id", "id", "id must be a valid BCP 47 locale id, such as de-DE.");
1026
- }
1027
- let direction = "ltr";
1028
- if (data["direction"] === "ltr" || data["direction"] === "rtl") {
1029
- direction = data["direction"];
1030
- }
1031
- else {
1032
- report("invalid-direction", "direction", 'direction must be "ltr" or "rtl".');
1033
- }
1034
- const messages = {};
1035
- const localeId = canonicalizeLocaleId(id);
1036
- const dataMessages = data["messages"];
1037
- if (!isRecord(dataMessages)) {
1038
- report("invalid-structure", "messages", "messages must be an object of namespaces.");
1039
- return { issues, locale: { direction, id, messages: {} } };
1040
- }
1041
- for (const [namespace, namespaceMessages] of Object.entries(dataMessages)) {
1042
- const namespacePath = `messages.${namespace}`;
1043
- if (!Object.hasOwn(MONA_MESSAGE_PARAMETERS, namespace)) {
1044
- report("unknown-namespace", namespacePath, `"${namespace}" is not a message namespace.`);
1045
- continue;
1046
- }
1047
- if (!isRecord(namespaceMessages)) {
1048
- report("invalid-structure", namespacePath, "A namespace must be an object of messages.");
1049
- continue;
1050
- }
1051
- const namespaceParameters = MONA_MESSAGE_PARAMETERS[namespace];
1052
- const compiled = {};
1053
- for (const [key, source] of Object.entries(namespaceMessages)) {
1054
- const path = `${namespacePath}.${key}`;
1055
- if (!Object.hasOwn(namespaceParameters, key)) {
1056
- report("unknown-key", path, `"${key}" is not a message of the "${namespace}" namespace.`);
1057
- continue;
1058
- }
1059
- if (typeof source !== "string") {
1060
- report("not-a-string", path, "A message must be a string.");
1061
- continue;
1062
- }
1063
- const message = compileMessage(source, namespaceParameters[key], localeId, path, report);
1064
- if (message !== undefined) {
1065
- compiled[key] = message;
1066
- }
1067
- }
1068
- messages[namespace] = compiled;
1069
- }
1070
- return { issues, locale: { direction, id, messages: messages } };
1317
+ const issues = [];
1318
+ const report = (code, path, message) => {
1319
+ issues.push({
1320
+ code,
1321
+ message,
1322
+ path
1323
+ });
1324
+ };
1325
+ if (!isRecord(data)) {
1326
+ report("invalid-structure", "", "Locale data must be an object with id, direction and messages.");
1327
+ return {
1328
+ issues,
1329
+ locale: {
1330
+ direction: "ltr",
1331
+ id: MONA_FALLBACK_LOCALE_ID,
1332
+ messages: {}
1333
+ }
1334
+ };
1335
+ }
1336
+ let id = MONA_FALLBACK_LOCALE_ID;
1337
+ if (typeof data["id"] === "string" && tryCanonicalizeLocaleId(data["id"]) != null) id = data["id"];
1338
+ else report("invalid-id", "id", "id must be a valid BCP 47 locale id, such as de-DE.");
1339
+ let direction = "ltr";
1340
+ if (data["direction"] === "ltr" || data["direction"] === "rtl") direction = data["direction"];
1341
+ else report("invalid-direction", "direction", "direction must be \"ltr\" or \"rtl\".");
1342
+ const messages = {};
1343
+ const localeId = canonicalizeLocaleId(id);
1344
+ const dataMessages = data["messages"];
1345
+ if (!isRecord(dataMessages)) {
1346
+ report("invalid-structure", "messages", "messages must be an object of namespaces.");
1347
+ return {
1348
+ issues,
1349
+ locale: {
1350
+ direction,
1351
+ id,
1352
+ messages: {}
1353
+ }
1354
+ };
1355
+ }
1356
+ for (const [namespace, namespaceMessages] of Object.entries(dataMessages)) {
1357
+ const namespacePath = `messages.${namespace}`;
1358
+ if (!Object.hasOwn(MONA_MESSAGE_PARAMETERS, namespace)) {
1359
+ report("unknown-namespace", namespacePath, `"${namespace}" is not a message namespace.`);
1360
+ continue;
1361
+ }
1362
+ if (!isRecord(namespaceMessages)) {
1363
+ report("invalid-structure", namespacePath, "A namespace must be an object of messages.");
1364
+ continue;
1365
+ }
1366
+ const namespaceParameters = MONA_MESSAGE_PARAMETERS[namespace];
1367
+ const compiled = {};
1368
+ for (const [key, source] of Object.entries(namespaceMessages)) {
1369
+ const path = `${namespacePath}.${key}`;
1370
+ if (!Object.hasOwn(namespaceParameters, key)) {
1371
+ report("unknown-key", path, `"${key}" is not a message of the "${namespace}" namespace.`);
1372
+ continue;
1373
+ }
1374
+ if (typeof source !== "string") {
1375
+ report("not-a-string", path, "A message must be a string.");
1376
+ continue;
1377
+ }
1378
+ const message = compileMessage(source, namespaceParameters[key], localeId, path, report);
1379
+ if (message !== void 0) compiled[key] = message;
1380
+ }
1381
+ messages[namespace] = compiled;
1382
+ }
1383
+ return {
1384
+ issues,
1385
+ locale: {
1386
+ direction,
1387
+ id,
1388
+ messages
1389
+ }
1390
+ };
1071
1391
  }
1072
1392
  function checkArguments(elements, parameters, path, report) {
1073
- let valid = true;
1074
- for (const element of elements) {
1075
- if (element.kind === "literal" || element.kind === "pound") {
1076
- continue;
1077
- }
1078
- const parameter = parameters.find(p => p.name === element.name);
1079
- if (parameter == null) {
1080
- const known = parameters.length === 0 ? "it takes none" : `it takes ${parameters.map(p => p.name).join(", ")}`;
1081
- report("unknown-parameter", path, `"${element.name}" is not a parameter of this message; ${known}.`);
1082
- valid = false;
1083
- continue;
1084
- }
1085
- if ((element.kind === "number" || element.kind === "plural") && parameter.type !== "number") {
1086
- report("parameter-type", path, `"${element.name}" is a ${parameter.type}, so it cannot be a ${element.kind}.`);
1087
- valid = false;
1088
- }
1089
- if (element.kind === "plural" || element.kind === "select") {
1090
- for (const option of element.options.values()) {
1091
- valid = checkArguments(option, parameters, path, report) && valid;
1092
- }
1093
- }
1094
- }
1095
- return valid;
1393
+ let valid = true;
1394
+ for (const element of elements) {
1395
+ if (element.kind === "literal" || element.kind === "pound") continue;
1396
+ const parameter = parameters.find((p) => p.name === element.name);
1397
+ if (parameter == null) {
1398
+ const known = parameters.length === 0 ? "it takes none" : `it takes ${parameters.map((p) => p.name).join(", ")}`;
1399
+ report("unknown-parameter", path, `"${element.name}" is not a parameter of this message; ${known}.`);
1400
+ valid = false;
1401
+ continue;
1402
+ }
1403
+ if ((element.kind === "number" || element.kind === "plural") && parameter.type !== "number") {
1404
+ report("parameter-type", path, `"${element.name}" is a ${parameter.type}, so it cannot be a ${element.kind}.`);
1405
+ valid = false;
1406
+ }
1407
+ if (element.kind === "plural" || element.kind === "select") for (const option of element.options.values()) valid = checkArguments(option, parameters, path, report) && valid;
1408
+ }
1409
+ return valid;
1096
1410
  }
1097
- /** Compiles one message to a string or a function, or reports its issues and returns `undefined`. */
1098
1411
  function compileMessage(source, parameters, localeId, path, report) {
1099
- let elements;
1100
- try {
1101
- elements = parseIcuMessage(source);
1102
- }
1103
- catch (error) {
1104
- if (error instanceof IcuSyntaxError) {
1105
- report(error.kind, path, error.message);
1106
- return undefined;
1107
- }
1108
- throw error;
1109
- }
1110
- if (!checkArguments(elements, parameters ?? [], path, report)) {
1111
- return undefined;
1112
- }
1113
- if (parameters == null) {
1114
- return formatIcuMessage(elements, new Map(), localeId);
1115
- }
1116
- return (...args) => formatIcuMessage(elements, new Map(parameters.map((p, index) => [p.name, args[index]])), localeId);
1412
+ let elements;
1413
+ try {
1414
+ elements = parseIcuMessage(source);
1415
+ } catch (error) {
1416
+ if (error instanceof IcuSyntaxError) {
1417
+ report(error.kind, path, error.message);
1418
+ return;
1419
+ }
1420
+ throw error;
1421
+ }
1422
+ if (!checkArguments(elements, parameters ?? [], path, report)) return;
1423
+ if (parameters == null) return formatIcuMessage(elements, /* @__PURE__ */ new Map(), localeId);
1424
+ return (...args) => formatIcuMessage(elements, new Map(parameters.map((p, index) => [p.name, args[index]])), localeId);
1117
1425
  }
1118
1426
  function isRecord(value) {
1119
- return typeof value === "object" && value != null && !Array.isArray(value);
1427
+ return typeof value === "object" && value != null && !Array.isArray(value);
1120
1428
  }
1121
-
1122
- /*
1123
- * Public API Surface of @nanahoshi/mona-ui/i18n/icu
1124
- */
1125
-
1126
- /**
1127
- * Generated bundle index. Do not edit.
1128
- */
1129
-
1130
1429
  export { MONA_MESSAGE_PARAMETERS, MonaLocaleDataError, compileMonaLocale, validateMonaLocaleData };
1131
- //# sourceMappingURL=nanahoshi-mona-ui-i18n-icu.mjs.map
1430
+
1431
+ //# sourceMappingURL=nanahoshi-mona-ui-i18n-icu.mjs.map