@nxgt/material 3.75.0 → 3.76.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 (239) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +37 -1
  3. package/dist/{alert-dialog-BfO_ri-N.js → alert-dialog-653apk3f.js} +8 -7
  4. package/dist/{async-slice-roMAJVzG.js → async-slice-CXLbQuOc.js} +1 -1
  5. package/dist/{bubble-input-B7BVd9fX.js → bubble-input-CQwVSoU3.js} +30 -29
  6. package/dist/{button-DgenqmpS.js → button-3op3rtZh.js} +5 -4
  7. package/dist/calculator-BaSMe0SK.js +1189 -0
  8. package/dist/calculator-announce-DRd2c6Dq.js +89 -0
  9. package/dist/calculator-context-BugcKuVG.js +10 -0
  10. package/dist/calculator-field.js +172 -0
  11. package/dist/calculator-panel-announce-AZSnZUSr.js +29 -0
  12. package/dist/calculator-segment-BlJE1LaS.js +22 -0
  13. package/dist/calculator.js +2 -0
  14. package/dist/charts.js +3 -3
  15. package/dist/{chip-CiDczNxO.js → chip-MuKDwtkG.js} +2 -2
  16. package/dist/{code-editor-CohlhFsA.js → code-editor-Bp2RrdNx.js} +13 -13
  17. package/dist/code-editor.js +37 -37
  18. package/dist/{code-language-items-Cs8GLYDp.js → code-language-items-B7WR5ua_.js} +19 -24
  19. package/dist/components/base-content.css +9 -4
  20. package/dist/components/ui/collections/server-table/server-table-phone-row.css +10 -3
  21. package/dist/{components-zJdfH4im.js → components-Ci3Zo8kC.js} +15837 -17245
  22. package/dist/components.js +37 -28
  23. package/dist/conversion-variant-BDFAxqe9.js +529 -0
  24. package/dist/copy-to-clipboard-Be5Ffvs_.js +7 -0
  25. package/dist/currency-B-r3ig11.js +16 -0
  26. package/dist/currency-field-BJ9rSrif.js +285 -0
  27. package/dist/{number.utils-BG_eEt5g.js → date.utils-DUvqcjan.js} +1 -7
  28. package/dist/dialog-Bm5LvVlB.js +166 -0
  29. package/dist/dist-BZe2evxL.js +139 -0
  30. package/dist/dist-CxhKjOYm.js +28 -0
  31. package/dist/dist-DHdUUM1w.js +241 -0
  32. package/dist/{dist-C4wtXCjf.js → dist-DOK3zo5C.js} +33 -32
  33. package/dist/dist-DWZXlCZR.js +182 -0
  34. package/dist/dist-DkQbkF9T.js +33 -0
  35. package/dist/dnd.js +1 -1
  36. package/dist/{dropdown-menu-CzR6JP31.js → dropdown-menu-xlZ6NYUA.js} +160 -159
  37. package/dist/editor.js +299 -298
  38. package/dist/{empty-state-DjHGMp5F.js → empty-state-C0kviQdW.js} +2 -2
  39. package/dist/{field-blur-CdASxjL7.js → field-blur-DkiZOVNV.js} +178 -180
  40. package/dist/{field-blur-context-kZ4SD7xu.js → field-blur-context-BLGgf_3z.js} +2 -2
  41. package/dist/financial-variant-BsZEa5sF.js +459 -0
  42. package/dist/{hooks-Dqq8O3Az.js → hooks-Dg94jPRq.js} +12 -12
  43. package/dist/hooks.js +2 -2
  44. package/dist/{hover-card-BPKqte4a.js → hover-card-B1g55Hi6.js} +44 -43
  45. package/dist/i18n.js +3 -3
  46. package/dist/icon-badge-BcW66bRk.js +17 -0
  47. package/dist/{icon-button-Cr-DyDGg.js → icon-button-Cogxy1cy.js} +5 -4
  48. package/dist/{in-dialog-Vwkyp-M5.js → in-dialog-D61Yeaol.js} +2 -1
  49. package/dist/input-CC2joTjB.js +56 -0
  50. package/dist/key-layout-cR79xfGE.js +38 -0
  51. package/dist/lib/calculator/index.d.ts +16 -0
  52. package/dist/lib/calculator-field/index.d.ts +12 -0
  53. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -2
  54. package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +17 -2
  55. package/dist/lib/components/ui/feedback/moment/moment-passive.d.ts +13 -0
  56. package/dist/lib/components/ui/feedback/moment/moment.d.ts +16 -2
  57. package/dist/lib/components/ui/fields/calculator-field/apply-calculated.d.ts +17 -0
  58. package/dist/lib/components/ui/fields/calculator-field/calculator-field-content.d.ts +16 -0
  59. package/dist/lib/components/ui/fields/calculator-field/calculator-field-trigger.d.ts +4 -0
  60. package/dist/lib/components/ui/fields/calculator-field/calculator-field.d.ts +12 -0
  61. package/dist/lib/components/ui/fields/calculator-field/calculator-field.types.d.ts +31 -0
  62. package/dist/lib/components/ui/fields/calculator-field/calculator-form-field.d.ts +4 -0
  63. package/dist/lib/components/ui/fields/calculator-field/index.d.ts +3 -0
  64. package/dist/lib/components/ui/fields/calculator-field/use-calculator-field.d.ts +15 -0
  65. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  66. package/dist/lib/components/ui/fields/currency-field/currency-field.d.ts +7 -1
  67. package/dist/lib/components/ui/layout/app-shell/app-sidebar-context.d.ts +4 -0
  68. package/dist/lib/components/ui/widgets/calculator/calculator-announce.d.ts +27 -0
  69. package/dist/lib/components/ui/widgets/calculator/calculator-clipboard.d.ts +19 -0
  70. package/dist/lib/components/ui/widgets/calculator/calculator-context.d.ts +49 -0
  71. package/dist/lib/components/ui/widgets/calculator/calculator-feedback.d.ts +18 -0
  72. package/dist/lib/components/ui/widgets/calculator/calculator-keyboard.d.ts +30 -0
  73. package/dist/lib/components/ui/widgets/calculator/calculator-storage.d.ts +17 -0
  74. package/dist/lib/components/ui/widgets/calculator/calculator-variant-steps.d.ts +16 -0
  75. package/dist/lib/components/ui/widgets/calculator/calculator.d.ts +11 -0
  76. package/dist/lib/components/ui/widgets/calculator/calculator.selectors.d.ts +23 -0
  77. package/dist/lib/components/ui/widgets/calculator/calculator.slice.d.ts +1881 -0
  78. package/dist/lib/components/ui/widgets/calculator/currency.d.ts +9 -0
  79. package/dist/lib/components/ui/widgets/calculator/engine.d.ts +22 -0
  80. package/dist/lib/components/ui/widgets/calculator/index.d.ts +3 -0
  81. package/dist/lib/components/ui/widgets/calculator/partials/calculator-announcer.d.ts +2 -0
  82. package/dist/lib/components/ui/widgets/calculator/partials/calculator-display.d.ts +3 -0
  83. package/dist/lib/components/ui/widgets/calculator/partials/calculator-key.d.ts +17 -0
  84. package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +8 -0
  85. package/dist/lib/components/ui/widgets/calculator/partials/calculator-loading.d.ts +6 -0
  86. package/dist/lib/components/ui/widgets/calculator/partials/calculator-memory.d.ts +2 -0
  87. package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-announce.d.ts +10 -0
  88. package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-body.d.ts +9 -0
  89. package/dist/lib/components/ui/widgets/calculator/partials/calculator-screen.d.ts +4 -0
  90. package/dist/lib/components/ui/widgets/calculator/partials/calculator-segment.d.ts +21 -0
  91. package/dist/lib/components/ui/widgets/calculator/partials/calculator-shell.d.ts +9 -0
  92. package/dist/lib/components/ui/widgets/calculator/partials/calculator-switcher.d.ts +5 -0
  93. package/dist/lib/components/ui/widgets/calculator/partials/calculator-tape.d.ts +4 -0
  94. package/dist/lib/components/ui/widgets/calculator/partials/calculator-tools.d.ts +4 -0
  95. package/dist/lib/components/ui/widgets/calculator/partials/keypad-navigation.d.ts +24 -0
  96. package/dist/lib/components/ui/widgets/calculator/types.d.ts +102 -0
  97. package/dist/lib/components/ui/widgets/calculator/use-calculator-clipboard.d.ts +19 -0
  98. package/dist/lib/components/ui/widgets/calculator/use-calculator-conversion.d.ts +4 -0
  99. package/dist/lib/components/ui/widgets/calculator/use-calculator-feedback.d.ts +3 -0
  100. package/dist/lib/components/ui/widgets/calculator/use-calculator-keyboard.d.ts +22 -0
  101. package/dist/lib/components/ui/widgets/calculator/use-calculator-persistence.d.ts +14 -0
  102. package/dist/lib/components/ui/widgets/calculator/use-calculator-pos.d.ts +25 -0
  103. package/dist/lib/components/ui/widgets/calculator/use-calculator-press.d.ts +26 -0
  104. package/dist/lib/components/ui/widgets/calculator/use-calculator-tape.d.ts +29 -0
  105. package/dist/lib/components/ui/widgets/calculator/use-calculator-value.d.ts +9 -0
  106. package/dist/lib/components/ui/widgets/calculator/use-calculator-variant.d.ts +23 -0
  107. package/dist/lib/components/ui/widgets/calculator/use-calculator.d.ts +10 -0
  108. package/dist/lib/components/ui/widgets/calculator/use-engine-settings.d.ts +10 -0
  109. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-fields.d.ts +19 -0
  110. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-labels.d.ts +17 -0
  111. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-math.d.ts +31 -0
  112. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-names.d.ts +4 -0
  113. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-panel.d.ts +7 -0
  114. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-rates.d.ts +29 -0
  115. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-result.d.ts +15 -0
  116. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-state.d.ts +36 -0
  117. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-variant.d.ts +3 -0
  118. package/dist/lib/components/ui/widgets/calculator/variants/conversion/use-conversion.d.ts +24 -0
  119. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-change.d.ts +4 -0
  120. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-figures.d.ts +43 -0
  121. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-format.d.ts +12 -0
  122. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan-math.d.ts +14 -0
  123. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan.d.ts +4 -0
  124. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-margin.d.ts +4 -0
  125. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-math.d.ts +10 -0
  126. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-panel.d.ts +7 -0
  127. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-parts.d.ts +35 -0
  128. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-table.d.ts +7 -0
  129. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-variant.d.ts +3 -0
  130. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-vat.d.ts +4 -0
  131. package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +51 -0
  132. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-announce.d.ts +16 -0
  133. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-aside.d.ts +2 -0
  134. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-display.d.ts +2 -0
  135. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-fields.d.ts +2 -0
  136. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-layout.d.ts +9 -0
  137. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-line.d.ts +6 -0
  138. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-names.d.ts +2 -0
  139. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-state.d.ts +3 -0
  140. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-tender.d.ts +2 -0
  141. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket-data.d.ts +41 -0
  142. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket.d.ts +5 -0
  143. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-totals.d.ts +2 -0
  144. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-types.d.ts +76 -0
  145. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-variant.d.ts +3 -0
  146. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-vat.d.ts +2 -0
  147. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-view.d.ts +28 -0
  148. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-announce.d.ts +19 -0
  149. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-base.d.ts +11 -0
  150. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-bitpad.d.ts +14 -0
  151. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-display.d.ts +9 -0
  152. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-layout.d.ts +6 -0
  153. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-names.d.ts +2 -0
  154. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-readouts.d.ts +14 -0
  155. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-reduce.d.ts +29 -0
  156. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-state.d.ts +22 -0
  157. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-toolbar.d.ts +5 -0
  158. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-variant.d.ts +3 -0
  159. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-word.d.ts +15 -0
  160. package/dist/lib/components/ui/widgets/calculator/variants/registry.d.ts +21 -0
  161. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-layout.d.ts +3 -0
  162. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-names.d.ts +2 -0
  163. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-toolbar.d.ts +2 -0
  164. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-variant.d.ts +3 -0
  165. package/dist/lib/components/ui/widgets/calculator/variants/standard/standard-layout.d.ts +3 -0
  166. package/dist/lib/components/ui/widgets/calculator/variants/variant-loader.d.ts +34 -0
  167. package/dist/lib/components/ui/widgets/calculator/variants/variant-logic.d.ts +40 -0
  168. package/dist/lib/components/ui/widgets/calculator/variants/variant-types.d.ts +62 -0
  169. package/dist/lib/i18n/resources/en/en.d.ts +412 -0
  170. package/dist/lib/i18n/resources/en/material.json.d.ts +412 -0
  171. package/dist/lib/i18n/resources/fr/fr.d.ts +412 -0
  172. package/dist/lib/i18n/resources/fr/material.json.d.ts +412 -0
  173. package/dist/lib/i18n/resources/resources.d.ts +824 -0
  174. package/dist/lib/i18n/translator.d.ts +1 -1
  175. package/dist/lib.js +4 -3
  176. package/dist/main.js +50 -40
  177. package/dist/map.js +66 -65
  178. package/dist/material.css +1 -1
  179. package/dist/native-select-w_FlBLHV.js +40 -0
  180. package/dist/number.utils-CSueQZcv.js +7 -0
  181. package/dist/pdf-reader.js +1 -1
  182. package/dist/percent-field-lahyDJDG.js +14 -0
  183. package/dist/picker-surface-CV09H7Nb.js +1220 -0
  184. package/dist/popover-Cd7DkND4.js +233 -0
  185. package/dist/pos-types-DKCkOTYy.js +49 -0
  186. package/dist/pos-variant-GrUfbTTP.js +603 -0
  187. package/dist/print.js +1 -1
  188. package/dist/programmer-variant-eKJNKENL.js +501 -0
  189. package/dist/programmer-word-CNCF7DJF.js +15 -0
  190. package/dist/{public-DC9VQw4Z.js → public-y6g4ddxd.js} +895 -892
  191. package/dist/{rich-code-block-DBSL9zEN.js → rich-code-block-CRQ0iyLb.js} +5 -5
  192. package/dist/scientific-variant-2y3UxAAU.js +149 -0
  193. package/dist/{sortable-provider-C4tk5esY.js → sortable-provider-DdiI3Fwk.js} +2 -2
  194. package/dist/{spinner-B2MubVWb.js → spinner-C1QIewWv.js} +133 -159
  195. package/dist/standard-layout-BuSRr3TY.js +40 -0
  196. package/dist/tabs-DzEqMb1W.js +383 -0
  197. package/dist/{icon-badge-B9uvDoyY.js → text-field-BAdY-kpO.js} +20 -34
  198. package/dist/theme-picker.js +3 -3
  199. package/dist/{theme-toggle-BInlu21G.js → theme-toggle-C_VeiiCm.js} +2 -2
  200. package/dist/toggle-FeCCJqbg.js +40 -0
  201. package/dist/{toggle-group-DXXlqid2.js → toggle-group-CVMxEpWi.js} +1 -1
  202. package/dist/{toolbar-items-CRJSx1MU.js → toolbar-items-D310xDuM.js} +333 -554
  203. package/dist/{translate-material-pVlPJ1v4.js → translate-material-BypJJ1l5.js} +1 -1
  204. package/dist/{translator-BoYCward.js → translator-DJkf4J7t.js} +824 -0
  205. package/dist/{typography-B6YMbCge.js → typography-CYEquVeb.js} +1 -1
  206. package/dist/{use-chat-composer-BvWQogJe.js → use-chat-composer-DMXu9E1O.js} +4198 -4600
  207. package/dist/{use-heading-spy-B_Z4ArDh.js → use-heading-spy-DJR8YYm6.js} +19 -19
  208. package/dist/{use-material-translation-CIS2n3RB.js → use-material-translation-CD6QoVal.js} +1 -1
  209. package/dist/{use-return-focus-DNQtADAR.js → use-return-focus-Cevw_6yq.js} +106 -105
  210. package/dist/useLatest-C2PnQEeD.js +8 -0
  211. package/docs/README.md +1 -0
  212. package/docs/components/feedback-and-status.md +10 -1
  213. package/docs/components/form-fields.md +1 -0
  214. package/docs/components/rich-widgets.md +108 -0
  215. package/docs/getting-started.md +1 -0
  216. package/docs/guides/calculator.md +468 -0
  217. package/docs/guides/forms.md +4 -2
  218. package/docs/guides/i18n.md +5 -0
  219. package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
  220. package/docs/previews/rich-widgets-calculator-point-of-sale.webp +0 -0
  221. package/docs/previews/rich-widgets-calculator.webp +0 -0
  222. package/docs/roadmap.md +9 -3
  223. package/docs/troubleshooting.md +134 -0
  224. package/lib/components/base-content.css +9 -4
  225. package/lib/components/ui/collections/server-table/server-table-phone-row.css +10 -3
  226. package/lib/components/ui/widgets/calculator/calculator-bands.css +146 -0
  227. package/lib/components/ui/widgets/calculator/calculator-display.css +83 -0
  228. package/lib/components/ui/widgets/calculator/calculator-keys.css +118 -0
  229. package/lib/components/ui/widgets/calculator/calculator-pos-ticket.css +185 -0
  230. package/lib/components/ui/widgets/calculator/calculator-pos.css +38 -0
  231. package/lib/components/ui/widgets/calculator/calculator-tape.css +71 -0
  232. package/lib/components/ui/widgets/calculator/calculator.css +97 -0
  233. package/lib/components/ui/widgets/calculator/variants/conversion/conversion.css +98 -0
  234. package/lib/components/ui/widgets/calculator/variants/financial/financial.css +162 -0
  235. package/lib/components/ui/widgets/calculator/variants/programmer/programmer.css +162 -0
  236. package/package.json +17 -3
  237. package/dist/dialog-AGsB3bv4.js +0 -219
  238. package/dist/dist-B7RjY7SL.js +0 -158
  239. package/dist/dist-lmHmz_bu.js +0 -419
@@ -0,0 +1,89 @@
1
+ import { announcement as e, formatDecimal as t, parseDecimal as n } from "@nxgt/material-core/calculator";
2
+ //#region lib/components/ui/widgets/calculator/variants/variant-logic.ts
3
+ var r = /* @__PURE__ */ new Map(), i = (e, t) => {
4
+ r.set(e, t);
5
+ }, a = (e) => r.get(e), o = {
6
+ empty: "material.calculator.error.empty",
7
+ syntax: "material.calculator.error.syntax",
8
+ unbalanced: "material.calculator.error.unbalanced",
9
+ "division-by-zero": "material.calculator.error.division-by-zero",
10
+ domain: "material.calculator.error.domain",
11
+ overflow: "material.calculator.error.overflow",
12
+ "too-large": "material.calculator.error.too-large",
13
+ "unknown-function": "material.calculator.error.unknown-function",
14
+ arity: "material.calculator.error.arity",
15
+ "invalid-digit": "material.calculator.error.invalid-digit",
16
+ "unknown-unit": "material.calculator.error.unknown-unit",
17
+ "unit-mismatch": "material.calculator.error.unit-mismatch",
18
+ "unknown-currency": "material.calculator.error.unknown-currency",
19
+ "invalid-rates": "material.calculator.error.invalid-rates",
20
+ "invalid-amount": "material.calculator.error.invalid-amount",
21
+ "duplicate-line": "material.calculator.error.duplicate-line",
22
+ "unknown-line": "material.calculator.error.unknown-line"
23
+ }, s = /* @__PURE__ */ new Set([
24
+ "mc",
25
+ "mr",
26
+ "m+",
27
+ "m-"
28
+ ]);
29
+ function c(e, r) {
30
+ let i = n(e);
31
+ return i ? t(i, { locale: r }) : e;
32
+ }
33
+ function l(t, n) {
34
+ let r = e(t, n);
35
+ return r ? {
36
+ key: t.error ? o[t.error] : "material.calculator.announce.result",
37
+ fallback: r.fallback,
38
+ values: r.values
39
+ } : null;
40
+ }
41
+ function u(e, t, n, r, i) {
42
+ if (e === "=" || n.error && n.error !== t.error) {
43
+ let e = l(n, r), t = a("programmer")?.said;
44
+ return i && t ? t(e, n, i) : e;
45
+ }
46
+ if (!s.has(e)) return null;
47
+ let o = c(n.memory, r);
48
+ return e === "mc" ? {
49
+ key: "material.calculator.announce.memory-cleared",
50
+ fallback: "Memory cleared"
51
+ } : e === "mr" ? {
52
+ key: "material.calculator.announce.memory-recalled",
53
+ fallback: "Memory {value} recalled",
54
+ values: { value: o }
55
+ } : {
56
+ key: "material.calculator.announce.memory-changed",
57
+ fallback: "Memory is {value}",
58
+ values: { value: o }
59
+ };
60
+ }
61
+ var d = (e) => e === "copied" ? {
62
+ key: "material.calculator.announce.copied",
63
+ fallback: "Result copied"
64
+ } : {
65
+ key: "material.calculator.announce.pasted",
66
+ fallback: "Expression pasted"
67
+ }, f = {
68
+ deg: "Angles in degrees",
69
+ rad: "Angles in radians",
70
+ grad: "Angles in gradians"
71
+ }, p = (e) => ({
72
+ key: `material.calculator.angle.set-${e}`,
73
+ fallback: f[e]
74
+ }), m = {
75
+ auto: "Automatic notation",
76
+ sci: "Scientific notation",
77
+ eng: "Engineering notation"
78
+ }, h = (e) => ({
79
+ key: `material.calculator.notation.set-${e}`,
80
+ fallback: m[e]
81
+ }), g = (e) => e ? {
82
+ key: "material.calculator.second-on",
83
+ fallback: "Second functions on"
84
+ } : {
85
+ key: "material.calculator.second-off",
86
+ fallback: "Second functions off"
87
+ };
88
+ //#endregion
89
+ export { d as a, a as c, c as i, i as l, p as n, h as o, u as r, g as s, o as t };
@@ -0,0 +1,10 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ //#region lib/components/ui/widgets/calculator/calculator-context.tsx
3
+ var n = e(null), r = n.Provider;
4
+ function i() {
5
+ let e = t(n);
6
+ if (!e) throw Error("Calculator components must be used inside <Calculator>");
7
+ return e;
8
+ }
9
+ //#endregion
10
+ export { i as n, r as t };
@@ -0,0 +1,172 @@
1
+ import { t as e } from "./utils-BLfntITJ.js";
2
+ import { t } from "./button-3op3rtZh.js";
3
+ import { t as n } from "./use-material-translation-CD6QoVal.js";
4
+ import { t as r } from "./icon-button-Cogxy1cy.js";
5
+ import { a as i, i as a, n as o, r as s, t as c } from "./picker-surface-CV09H7Nb.js";
6
+ import { r as l, t as u } from "./currency-field-BJ9rSrif.js";
7
+ import { r as d, t as f } from "./field-blur-DkiZOVNV.js";
8
+ import { t as p } from "./calculator-BaSMe0SK.js";
9
+ import { useId as m, useState as h } from "react";
10
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { Calculator as y } from "lucide-react";
12
+ import { currencyFractionDigits as b } from "@nxgt/material-core/currency-digits";
13
+ import { parseDecimal as x, roundTo as S, toCanonical as C } from "@nxgt/material-core/calculator";
14
+ //#region lib/components/ui/fields/calculator-field/apply-calculated.ts
15
+ function w(e, { currency: t, fractionDigits: n, min: r, max: i }) {
16
+ let a = x(e);
17
+ if (!a) return;
18
+ let o = t ? S(a, b(t, n), "half-up") : a, s = Number(C(o));
19
+ if (Number.isFinite(s)) return r != null && (s = Math.max(s, r)), i != null && (s = Math.min(s, i)), s;
20
+ }
21
+ var T = (e) => e == null || !Number.isFinite(e) ? void 0 : String(e), E = ["standard"], D = "pointer-coarse:[--btn-h:44px] pointer-coarse:h-(--btn-h)";
22
+ function O({ titleId: e, seed: r, variant: i, variants: a, onApply: o, onCancel: c }) {
23
+ let { t: l } = n(), u = l("material.calculator.field.title", "Calculator"), [d, f] = h("");
24
+ return /* @__PURE__ */ v(s, {
25
+ labelledBy: e,
26
+ sheetTitle: u,
27
+ "data-slot": "calculator-field-content",
28
+ className: "flex max-h-(--radix-popover-content-available-height) w-[min(24rem,calc(100vw-1rem))] flex-col p-3",
29
+ placement: { align: "end" },
30
+ children: [
31
+ /* @__PURE__ */ _("span", {
32
+ id: e,
33
+ className: "sr-only",
34
+ children: u
35
+ }),
36
+ /* @__PURE__ */ _("div", {
37
+ className: "min-h-0 w-full flex-1 overflow-y-auto",
38
+ children: /* @__PURE__ */ _(p, {
39
+ defaultVariant: i ?? "standard",
40
+ variants: a ?? E,
41
+ persist: !1,
42
+ defaultValue: T(r),
43
+ onValueChange: f,
44
+ className: "w-full"
45
+ })
46
+ }),
47
+ /* @__PURE__ */ v("div", {
48
+ className: "flex shrink-0 gap-2 self-end pt-3",
49
+ children: [/* @__PURE__ */ _(t, {
50
+ variant: "tonal",
51
+ className: `${D} pointer-coarse:px-6`,
52
+ onClick: c,
53
+ children: l("material.calculator.field.cancel", "Cancel")
54
+ }), /* @__PURE__ */ _(t, {
55
+ className: `${D} pointer-coarse:px-6`,
56
+ disabled: d === "",
57
+ onClick: () => o(d),
58
+ children: l("material.calculator.field.apply", "Apply")
59
+ })]
60
+ })
61
+ ]
62
+ });
63
+ }
64
+ //#endregion
65
+ //#region lib/components/ui/fields/calculator-field/calculator-field-trigger.tsx
66
+ function k({ disabled: e }) {
67
+ let { t } = n();
68
+ return /* @__PURE__ */ _(a, {
69
+ asChild: !0,
70
+ children: /* @__PURE__ */ _(r, {
71
+ variant: "ghost",
72
+ size: "sm",
73
+ "data-slot": "calculator-field-trigger",
74
+ "aria-label": t("material.calculator.field.open", "Open calculator"),
75
+ disabled: e,
76
+ className: "pointer-coarse:size-11",
77
+ children: /* @__PURE__ */ _(y, {})
78
+ })
79
+ });
80
+ }
81
+ //#endregion
82
+ //#region lib/components/ui/fields/calculator-field/use-calculator-field.ts
83
+ function A({ value: e, defaultValue: t = null, onChange: n, currency: r, fractionDigits: i, min: a, max: o, onExactValueChange: s }) {
84
+ let [c, l] = h(!1), [u, d] = h(t), f = (e) => {
85
+ d(e), n?.(e);
86
+ };
87
+ return {
88
+ open: c,
89
+ setOpen: l,
90
+ current: e === void 0 ? u : e,
91
+ change: f,
92
+ apply: (e) => {
93
+ let t = w(e, {
94
+ currency: r,
95
+ fractionDigits: i,
96
+ min: a,
97
+ max: o
98
+ });
99
+ t !== void 0 && (s?.(e), f(t), l(!1));
100
+ }
101
+ };
102
+ }
103
+ //#endregion
104
+ //#region lib/components/ui/fields/calculator-field/calculator-field.tsx
105
+ function j({ currency: t, fractionDigits: n, calculatorVariant: r, calculatorVariants: a, surface: s, onExactValueChange: d, value: f, defaultValue: p, onChange: h, className: y, min: b, max: x, step: S, hideSteppers: C, suffix: w, ...T }) {
106
+ let E = i(s), D = m(), j = A({
107
+ value: f,
108
+ defaultValue: p,
109
+ onChange: h,
110
+ currency: t,
111
+ fractionDigits: n,
112
+ min: b,
113
+ max: x,
114
+ onExactValueChange: d
115
+ }), M = /* @__PURE__ */ _(k, { disabled: T.disabled }), N = {
116
+ ...T,
117
+ value: j.current,
118
+ onChange: j.change
119
+ };
120
+ return /* @__PURE__ */ v(c, {
121
+ kind: E,
122
+ open: j.open,
123
+ onOpenChange: j.setOpen,
124
+ children: [/* @__PURE__ */ _(o, { children: /* @__PURE__ */ _("div", {
125
+ "data-slot": "calculator-field",
126
+ className: e("w-full", y),
127
+ children: t ? /* @__PURE__ */ _(u, {
128
+ ...N,
129
+ currency: t,
130
+ fractionDigits: n,
131
+ trailingAction: M
132
+ }) : /* @__PURE__ */ _(l, {
133
+ ...N,
134
+ min: b,
135
+ max: x,
136
+ step: S,
137
+ hideSteppers: C,
138
+ suffix: /* @__PURE__ */ v(g, { children: [w, M] })
139
+ })
140
+ }) }), /* @__PURE__ */ _(O, {
141
+ titleId: D,
142
+ seed: j.current,
143
+ variant: r,
144
+ variants: a,
145
+ onApply: j.apply,
146
+ onCancel: () => j.setOpen(!1)
147
+ })]
148
+ });
149
+ }
150
+ //#endregion
151
+ //#region lib/components/ui/fields/calculator-field/calculator-form-field.tsx
152
+ function M({ control: e, name: t, ...n }) {
153
+ return /* @__PURE__ */ _(d, {
154
+ control: e,
155
+ name: t,
156
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ _(f, {
157
+ onBlur: e.onBlur,
158
+ children: /* @__PURE__ */ _(j, {
159
+ ...n,
160
+ ref: e.ref,
161
+ name: e.name,
162
+ value: e.value ?? null,
163
+ disabled: n.disabled || e.disabled,
164
+ onChange: e.onChange,
165
+ error: t.invalid,
166
+ helperText: t.error?.message ?? n.helperText
167
+ })
168
+ })
169
+ });
170
+ }
171
+ //#endregion
172
+ export { j as CalculatorField, M as CalculatorFormField };
@@ -0,0 +1,29 @@
1
+ import { t as e } from "./live-status-BGPaN8r8.js";
2
+ import { createContext as t, useContext as n, useEffect as r, useState as i } from "react";
3
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ //#region lib/components/ui/widgets/calculator/partials/calculator-panel-announce.tsx
5
+ var s = t(() => {}), c = 700;
6
+ function l({ children: t }) {
7
+ let [n, r] = i(null);
8
+ return /* @__PURE__ */ o(s.Provider, {
9
+ value: r,
10
+ children: [t, /* @__PURE__ */ a(e, {
11
+ slot: "calculator-status",
12
+ children: n
13
+ })]
14
+ });
15
+ }
16
+ function u(e, t) {
17
+ let i = n(s);
18
+ r(() => {
19
+ if (!t || !e) return;
20
+ let n = setTimeout(() => i(e), c);
21
+ return () => clearTimeout(n);
22
+ }, [
23
+ e,
24
+ t,
25
+ i
26
+ ]);
27
+ }
28
+ //#endregion
29
+ export { u as n, l as t };
@@ -0,0 +1,22 @@
1
+ import { t as e } from "./use-material-translation-CD6QoVal.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ //#region lib/components/ui/widgets/calculator/partials/calculator-segment.tsx
4
+ function n({ label: n, choices: r, value: i, nameKey: a, onChange: o }) {
5
+ let { t: s } = e();
6
+ return /* @__PURE__ */ t("div", {
7
+ role: "group",
8
+ "aria-label": n,
9
+ className: "nxgt-calc-segment",
10
+ children: r.map(({ id: e, glyph: n, name: r, spoken: c }) => /* @__PURE__ */ t("button", {
11
+ type: "button",
12
+ "aria-pressed": i === e,
13
+ "aria-label": c ?? (a ? s(a(e), r) : r),
14
+ "data-pw": `calculator-${e}`,
15
+ className: "nxgt-calc-segment-item",
16
+ onClick: () => o(e),
17
+ children: n
18
+ }, e))
19
+ });
20
+ }
21
+ //#endregion
22
+ export { n as t };
@@ -0,0 +1,2 @@
1
+ import { n as e, t } from "./calculator-BaSMe0SK.js";
2
+ export { e as CALCULATOR_VARIANTS, t as Calculator };
package/dist/charts.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { t as e } from "./ui.utils-CAnKTCw5.js";
2
2
  import { t } from "./utils-BLfntITJ.js";
3
3
  import { t as n } from "./warn-once-C_e47JM8.js";
4
- import { t as r } from "./button-DgenqmpS.js";
5
- import { t as i } from "./use-material-translation-CIS2n3RB.js";
4
+ import { t as r } from "./button-3op3rtZh.js";
5
+ import { t as i } from "./use-material-translation-CD6QoVal.js";
6
6
  import { t as a } from "./use-ssr-media-query-C6M5m8sf.js";
7
7
  import { i as o, n as s, r as c, t as l } from "./util-4heV2LPI.js";
8
8
  import { t as u } from "./useIsomorphicLayoutEffect-DfgAhWcH.js";
9
- import { t as d } from "./chip-CiDczNxO.js";
9
+ import { t as d } from "./chip-MuKDwtkG.js";
10
10
  import { c as f, d as p, f as m, i as h, o as g, p as _, s as v, t as y } from "./line-path-C5pZGC49.js";
11
11
  import { t as b } from "./live-status-BGPaN8r8.js";
12
12
  import { t as x } from "./linear-G97mfnKF.js";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { r as t } from "./spinner-B2MubVWb.js";
2
+ import { n as t } from "./spinner-C1QIewWv.js";
3
3
  import { s as n } from "./use-click-lock-BZYtTmVt.js";
4
- import { t as r } from "./use-material-translation-CIS2n3RB.js";
4
+ import { t as r } from "./use-material-translation-CD6QoVal.js";
5
5
  import { t as i } from "./react-node-text-Crkpfpco.js";
6
6
  import { cloneElement as a, isValidElement as o } from "react";
7
7
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
@@ -1,12 +1,12 @@
1
1
  import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
2
2
  import { t } from "./utils-BLfntITJ.js";
3
- import { a as n } from "./dist-lmHmz_bu.js";
4
- import { c as r, d as i, f as a, n as o, t as s } from "./dropdown-menu-CzR6JP31.js";
5
- import { a as c, i as l, n as u } from "./field-blur-context-kZ4SD7xu.js";
6
- import { a as d, d as f, r as p, t as m, u as h } from "./toolbar-items-CRJSx1MU.js";
3
+ import { t as n } from "./dist-DWZXlCZR.js";
4
+ import { c as r, d as i, f as a, n as o, t as s } from "./dropdown-menu-xlZ6NYUA.js";
5
+ import { a as c, i as l, n as u } from "./field-blur-context-BLGgf_3z.js";
6
+ import { a as d, o as f, r as p, s as m, t as h } from "./toolbar-items-D310xDuM.js";
7
7
  import { t as g } from "./is-production-GLw59WU8.js";
8
- import { t as _ } from "./use-material-translation-CIS2n3RB.js";
9
- import { i as v, n as y, o as b, t as x } from "./code-language-items-Cs8GLYDp.js";
8
+ import { t as _ } from "./use-material-translation-CD6QoVal.js";
9
+ import { i as v, n as y, o as b, t as x } from "./code-language-items-B7WR5ua_.js";
10
10
  import { t as S } from "./useIsomorphicLayoutEffect-DfgAhWcH.js";
11
11
  import { n as C, t as w } from "./escape-owner-DpaP0lm1.js";
12
12
  import { t as T } from "./skeleton-DSdtr2qc.js";
@@ -1415,7 +1415,7 @@ function Bn({ reader: e, status: t, disabled: n, onCopy: r }) {
1415
1415
  onClick: r,
1416
1416
  children: [o, /* @__PURE__ */ I("span", { children: t === "copied" ? i("material.code.copied", "Copied") : a })]
1417
1417
  })
1418
- }) : /* @__PURE__ */ I(m, {
1418
+ }) : /* @__PURE__ */ I(h, {
1419
1419
  icon: o,
1420
1420
  label: a,
1421
1421
  priority: 2,
@@ -1466,11 +1466,11 @@ function Vn({ language: e, onLanguageChange: t, disabled: n }) {
1466
1466
  //#region lib/components/ui/widgets/code-editor/toolbar/code-view-tools.tsx
1467
1467
  function Hn({ disabled: e, wordWrap: t, onWordWrapChange: n, fullscreen: r, onFullscreenChange: i, onFind: a }) {
1468
1468
  let { t: o } = _();
1469
- return /* @__PURE__ */ L(h, {
1469
+ return /* @__PURE__ */ L(f, {
1470
1470
  label: o("material.code.view", "View"),
1471
1471
  priority: 3,
1472
1472
  children: [
1473
- /* @__PURE__ */ I(m, {
1473
+ /* @__PURE__ */ I(h, {
1474
1474
  icon: /* @__PURE__ */ I(ce, {}),
1475
1475
  label: o("material.code.find", "Find"),
1476
1476
  disabled: e,
@@ -1518,10 +1518,10 @@ function Wn(e) {
1518
1518
  //#endregion
1519
1519
  //#region lib/components/ui/widgets/code-editor/toolbar/code-editor-toolbar.tsx
1520
1520
  function Gn({ editor: e, language: t, onLanguageChange: n, wordWrap: r, onWordWrapChange: i, fallbackCode: a = "", readOnly: o, disabled: s, fullscreen: c, onFullscreenChange: l }) {
1521
- let { t: u } = _(), { status: d, copy: p } = b(), h = Wn(e), g = (t) => {
1521
+ let { t: u } = _(), { status: d, copy: f } = b(), p = Wn(e), g = (t) => {
1522
1522
  e?.focus(), e?.getAction(t)?.run();
1523
1523
  };
1524
- return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ L(f, {
1524
+ return /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ L(m, {
1525
1525
  label: u("material.code.tools", "Code tools"),
1526
1526
  variant: "floating",
1527
1527
  selectedLook: "morph",
@@ -1544,7 +1544,7 @@ function Gn({ editor: e, language: t, onLanguageChange: n, wordWrap: r, onWordWr
1544
1544
  onFullscreenChange: l,
1545
1545
  onFind: () => g("actions.find")
1546
1546
  }),
1547
- h && !o && /* @__PURE__ */ I(m, {
1547
+ p && !o && /* @__PURE__ */ I(h, {
1548
1548
  icon: /* @__PURE__ */ I(ue, {}),
1549
1549
  label: u("material.code.format", "Format document"),
1550
1550
  priority: 1,
@@ -1555,7 +1555,7 @@ function Gn({ editor: e, language: t, onLanguageChange: n, wordWrap: r, onWordWr
1555
1555
  reader: o,
1556
1556
  status: d,
1557
1557
  disabled: s,
1558
- onCopy: () => void p(e?.getValue() ?? a)
1558
+ onCopy: () => void f(e?.getValue() ?? a)
1559
1559
  })
1560
1560
  ]
1561
1561
  }), /* @__PURE__ */ I(y, {
@@ -1,27 +1,27 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
- import { a as t } from "./dist-lmHmz_bu.js";
3
- import { d as n, r, t as i, u as a } from "./toolbar-items-CRJSx1MU.js";
4
- import { t as o } from "./use-material-translation-CIS2n3RB.js";
5
- import { i as s, n as c, o as l } from "./code-language-items-Cs8GLYDp.js";
6
- import { r as u, t as d } from "./field-blur-CdASxjL7.js";
7
- import { t as f } from "./skeleton-DSdtr2qc.js";
8
- import { t as p } from "./live-status-BGPaN8r8.js";
9
- import { t as m } from "./use-mobile-BDro060N.js";
10
- import { t as h } from "./react-node-text-Crkpfpco.js";
11
- import { a as g, c as _, d as v, f as y, i as b, l as x, m as S, o as C, p as w, r as T, s as E, t as D, u as O } from "./code-editor-CohlhFsA.js";
2
+ import { t } from "./dist-DWZXlCZR.js";
3
+ import { o as n, r, s as i, t as a } from "./toolbar-items-D310xDuM.js";
4
+ import { t as o } from "./use-material-translation-CD6QoVal.js";
5
+ import { i as s, n as c, o as l } from "./code-language-items-B7WR5ua_.js";
6
+ import { t as u } from "./skeleton-DSdtr2qc.js";
7
+ import { t as d } from "./live-status-BGPaN8r8.js";
8
+ import { t as f } from "./use-mobile-BDro060N.js";
9
+ import { t as p } from "./react-node-text-Crkpfpco.js";
10
+ import { a as m, c as h, d as g, f as _, i as v, l as y, m as b, o as x, p as S, r as C, s as w, t as T, u as E } from "./code-editor-Bp2RrdNx.js";
11
+ import { r as D, t as O } from "./field-blur-DkiZOVNV.js";
12
12
  import { useEffect as k, useRef as A, useState as j } from "react";
13
13
  import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
14
14
  import { getCspNonce as F } from "@nxgt/material-core/csp-nonce";
15
15
  import { ChevronDown as I, ChevronUp as L, Columns2 as R } from "lucide-react";
16
16
  //#region lib/components/ui/widgets/code-editor/code-editor-form-field.tsx
17
17
  function z({ control: e, name: t, ...n }) {
18
- return /* @__PURE__ */ N(u, {
18
+ return /* @__PURE__ */ N(D, {
19
19
  control: e,
20
20
  name: t,
21
- render: ({ field: e, fieldState: t }) => /* @__PURE__ */ N(d, {
21
+ render: ({ field: e, fieldState: t }) => /* @__PURE__ */ N(O, {
22
22
  onBlur: e.onBlur,
23
23
  focusRef: e.ref,
24
- children: /* @__PURE__ */ N(D, {
24
+ children: /* @__PURE__ */ N(T, {
25
25
  ...n,
26
26
  name: e.name,
27
27
  value: e.value ?? "",
@@ -52,7 +52,7 @@ function V() {
52
52
  });
53
53
  }
54
54
  function H(e) {
55
- V(), S.config(e);
55
+ V(), b.config(e);
56
56
  }
57
57
  //#endregion
58
58
  //#region lib/components/ui/widgets/code-editor/diff/code-diff-parts.tsx
@@ -95,7 +95,7 @@ function W({ index: e, count: t, language: n, children: r }) {
95
95
  }),
96
96
  /* @__PURE__ */ N("span", { className: "nxgt-code-status-gap" }),
97
97
  /* @__PURE__ */ N("span", { children: s(n) }),
98
- /* @__PURE__ */ N(p, {
98
+ /* @__PURE__ */ N(d, {
99
99
  slot: "code-diff-change-status",
100
100
  children: e < 0 ? null : a
101
101
  })
@@ -106,7 +106,7 @@ function W({ index: e, count: t, language: n, children: r }) {
106
106
  //#region lib/components/ui/widgets/code-editor/diff/code-diff-toolbar.tsx
107
107
  function G({ sideBySide: e, onSideBySideChange: t, changeCount: s, onStep: u, getCode: d }) {
108
108
  let { t: f } = o(), { status: p, copy: m } = l();
109
- return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P(n, {
109
+ return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P(i, {
110
110
  label: f("material.code.diff-tools", "Diff tools"),
111
111
  variant: "floating",
112
112
  selectedLook: "morph",
@@ -123,22 +123,22 @@ function G({ sideBySide: e, onSideBySideChange: t, changeCount: s, onStep: u, ge
123
123
  pressed: !!e,
124
124
  onPressedChange: t
125
125
  }),
126
- /* @__PURE__ */ P(a, {
126
+ /* @__PURE__ */ P(n, {
127
127
  label: f("material.code.changes", "Changes"),
128
128
  priority: 3,
129
- children: [/* @__PURE__ */ N(i, {
129
+ children: [/* @__PURE__ */ N(a, {
130
130
  icon: /* @__PURE__ */ N(L, {}),
131
131
  label: f("material.code.previous-change", "Previous change"),
132
132
  disabled: !s,
133
133
  onClick: () => u(-1)
134
- }), /* @__PURE__ */ N(i, {
134
+ }), /* @__PURE__ */ N(a, {
135
135
  icon: /* @__PURE__ */ N(I, {}),
136
136
  label: f("material.code.next-change", "Next change"),
137
137
  disabled: !s,
138
138
  onClick: () => u(1)
139
139
  })]
140
140
  }),
141
- /* @__PURE__ */ N(T, {
141
+ /* @__PURE__ */ N(C, {
142
142
  status: p,
143
143
  onCopy: () => void m(d())
144
144
  })
@@ -206,12 +206,12 @@ function Z(e, t) {
206
206
  //#region lib/components/ui/widgets/code-editor/diff/code-diff.tsx
207
207
  var Q = 480;
208
208
  function $(n) {
209
- let { original: r, modified: i, language: a = "typescript", height: o = 280 } = n, s = n.showChrome ?? !0, c = v(), l = b(n.theme, n.scheme), u = m(), d = Z(l.surfaceRef, Q), p = u || d, [g, S] = t({
209
+ let { original: r, modified: i, language: a = "typescript", height: o = 280 } = n, s = n.showChrome ?? !0, c = g(), l = v(n.theme, n.scheme), d = f(), m = Z(l.surfaceRef, Q), b = d || m, [x, C] = t({
210
210
  prop: n.sideBySide,
211
211
  defaultProp: n.defaultSideBySide ?? !0,
212
212
  onChange: n.onSideBySideChange
213
- }), [C, T] = j(), { changes: E, index: D, go: k } = X(C), A = ne(), M = ee(h(n.label) || h(n.filename)), F = (e, t) => {
214
- A.keep(e), x(t), T(e);
213
+ }), [w, T] = j(), { changes: D, index: O, go: k } = X(w), A = ne(), M = ee(p(n.label) || p(n.filename)), F = (e, t) => {
214
+ A.keep(e), y(t), T(e);
215
215
  };
216
216
  return /* @__PURE__ */ P("div", {
217
217
  ref: l.surfaceRef,
@@ -226,38 +226,38 @@ function $(n) {
226
226
  className: "nxgt-code-filename",
227
227
  children: n.filename
228
228
  }),
229
- C && /* @__PURE__ */ N(U, { ...q(E) }),
229
+ w && /* @__PURE__ */ N(U, { ...q(D) }),
230
230
  /* @__PURE__ */ N(G, {
231
- sideBySide: g,
232
- onSideBySideChange: p ? void 0 : S,
233
- changeCount: E.length,
231
+ sideBySide: x,
232
+ onSideBySideChange: b ? void 0 : C,
233
+ changeCount: D.length,
234
234
  onStep: k,
235
- getCode: () => C?.getModifiedEditor().getValue() ?? i
235
+ getCode: () => w?.getModifiedEditor().getValue() ?? i
236
236
  })
237
237
  ]
238
238
  }),
239
- c ? /* @__PURE__ */ N(y, { height: o }) : /* @__PURE__ */ N(w, {
239
+ c ? /* @__PURE__ */ N(_, { height: o }) : /* @__PURE__ */ N(S, {
240
240
  original: r,
241
241
  modified: i,
242
242
  language: a,
243
- theme: _,
244
- beforeMount: O,
243
+ theme: h,
244
+ beforeMount: E,
245
245
  height: o,
246
246
  keepCurrentOriginalModel: !0,
247
247
  keepCurrentModifiedModel: !0,
248
248
  onMount: F,
249
249
  options: {
250
- ...te(l.overflow, g && !p),
250
+ ...te(l.overflow, x && !b),
251
251
  ...M
252
252
  },
253
- loading: /* @__PURE__ */ N(f, {
253
+ loading: /* @__PURE__ */ N(u, {
254
254
  style: { height: o },
255
255
  className: "w-full"
256
256
  })
257
257
  }),
258
258
  s && /* @__PURE__ */ N(W, {
259
- index: D,
260
- count: E.length,
259
+ index: O,
260
+ count: D.length,
261
261
  language: a
262
262
  })
263
263
  ]
@@ -272,7 +272,7 @@ function ee(e) {
272
272
  }
273
273
  function te(e, t) {
274
274
  return {
275
- ...E,
275
+ ...w,
276
276
  overflowWidgetsDomNode: e,
277
277
  readOnly: !0,
278
278
  renderSideBySide: t,
@@ -294,4 +294,4 @@ function ne() {
294
294
  } };
295
295
  }
296
296
  //#endregion
297
- export { g as CODE_THEMES, $ as CodeDiff, D as CodeEditor, z as CodeEditorFormField, H as configureMonaco, C as defineCodeTheme };
297
+ export { m as CODE_THEMES, $ as CodeDiff, T as CodeEditor, z as CodeEditorFormField, H as configureMonaco, x as defineCodeTheme };