efficient-shell 4.134.0 → 4.137.1

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 (171) hide show
  1. package/LICENSE +6 -17
  2. package/README.md +84 -8
  3. package/dist/Browser-ZX5OTOKK.js +43 -0
  4. package/dist/Calculator-4SQGOQFQ.js +29 -0
  5. package/dist/ConfirmDialog-NPKW2XHM.js +1 -0
  6. package/dist/CurrencyConverter-2KOM7L6V.js +21 -0
  7. package/dist/Documents-IZTIQYPG.js +52 -0
  8. package/dist/Files-B63KKXGZ.js +89 -0
  9. package/dist/Notepad-WA77V45J.js +25 -0
  10. package/dist/PdfViewer-RBRGEKWF.js +1 -0
  11. package/dist/PomodoroTimer-SDUBKXUS.js +99 -0
  12. package/dist/Preview-D4KOA4OI.js +187 -0
  13. package/dist/Sidebar-Y57LYXXI.js +23 -0
  14. package/dist/Spreadsheet-JX5E6WH6.js +37 -0
  15. package/dist/Stock-XAQ5WMUZ.js +16 -0
  16. package/dist/Weather-HLAGJ5LV.js +60 -0
  17. package/dist/WorldClock-IRI4VCTA.js +32 -0
  18. package/dist/apps/index.js +1 -151
  19. package/dist/brand.css +1 -1
  20. package/dist/chunk-3A46NCXK.js +29 -0
  21. package/dist/chunk-44UO7FYU.js +11 -0
  22. package/dist/chunk-466CM2TJ.js +1 -0
  23. package/dist/chunk-57MIENLJ.js +1 -0
  24. package/dist/chunk-5CRAF2AD.js +2 -0
  25. package/dist/chunk-A2OQLLYK.js +6 -0
  26. package/dist/chunk-B43AGQET.js +4 -0
  27. package/dist/chunk-BR22X7E5.js +1 -0
  28. package/dist/chunk-BUTSU7FO.js +1 -0
  29. package/dist/chunk-D65T4H6J.js +1 -0
  30. package/dist/chunk-ESL5TDNA.js +1 -0
  31. package/dist/chunk-FBDZGO3V.js +1 -0
  32. package/dist/chunk-FHTLC7HH.js +1 -0
  33. package/dist/chunk-FQLMX3IE.js +948 -0
  34. package/dist/chunk-H562R4GX.js +34 -0
  35. package/dist/chunk-JN4WXTWJ.js +106 -0
  36. package/dist/chunk-LVDRBRYU.js +1 -0
  37. package/dist/chunk-LWLCNQY7.js +1 -0
  38. package/dist/chunk-MAIHBBWT.js +1 -0
  39. package/dist/chunk-NPJH5MD7.js +13 -0
  40. package/dist/chunk-OCSOMMY2.js +1 -0
  41. package/dist/chunk-OQDWLHZI.js +1 -0
  42. package/dist/chunk-OWSAMA3I.js +23 -0
  43. package/dist/chunk-PH3PRIFP.js +5 -0
  44. package/dist/chunk-TAWKWSPN.js +9 -0
  45. package/dist/chunk-U4GTZPXP.js +1 -0
  46. package/dist/chunk-UB4JIOLD.js +2 -0
  47. package/dist/chunk-UZAJ5BF6.js +9 -0
  48. package/dist/chunk-VEGMDXT4.js +1 -0
  49. package/dist/chunk-VTVSMRFX.js +1 -0
  50. package/dist/chunk-VVAGSKW7.js +1 -0
  51. package/dist/chunk-XO43FJRM.js +19 -0
  52. package/dist/chunk-Y7BOLDRM.js +69 -0
  53. package/dist/file-intake/index.js +1 -4
  54. package/dist/{index-DZ7E7bCl.d.ts → index-DVI9DMSu.d.ts} +189 -18
  55. package/dist/index.d.ts +2 -2
  56. package/dist/index.js +639 -7473
  57. package/dist/map/index.js +20 -540
  58. package/dist/markdown/index.js +6 -184
  59. package/dist/markup/index.js +1 -135
  60. package/dist/page-tabs/index.js +21 -709
  61. package/dist/sounds-OMHXVVQ4.js +1 -0
  62. package/dist/ui/index.d.ts +1 -1
  63. package/dist/ui/index.js +1 -19
  64. package/dist/ui.css +78 -10
  65. package/package.json +4 -3
  66. package/dist/Browser-O3QZGUF2.js +0 -482
  67. package/dist/Browser-O3QZGUF2.js.map +0 -1
  68. package/dist/Calculator-L6N5X3KU.js +0 -192
  69. package/dist/Calculator-L6N5X3KU.js.map +0 -1
  70. package/dist/ConfirmDialog-LYSSZSUD.js +0 -4
  71. package/dist/ConfirmDialog-LYSSZSUD.js.map +0 -1
  72. package/dist/CurrencyConverter-64MKXB3D.js +0 -236
  73. package/dist/CurrencyConverter-64MKXB3D.js.map +0 -1
  74. package/dist/Documents-5WXXYCLI.js +0 -441
  75. package/dist/Documents-5WXXYCLI.js.map +0 -1
  76. package/dist/Files-AUURUUDN.js +0 -805
  77. package/dist/Files-AUURUUDN.js.map +0 -1
  78. package/dist/Notepad-GPXJVPB7.js +0 -410
  79. package/dist/Notepad-GPXJVPB7.js.map +0 -1
  80. package/dist/PdfViewer-HKO6P4SR.js +0 -5
  81. package/dist/PdfViewer-HKO6P4SR.js.map +0 -1
  82. package/dist/PomodoroTimer-4TQBWLP2.js +0 -633
  83. package/dist/PomodoroTimer-4TQBWLP2.js.map +0 -1
  84. package/dist/Preview-FOZYPKM2.js +0 -2959
  85. package/dist/Preview-FOZYPKM2.js.map +0 -1
  86. package/dist/Sidebar-BPU7RCZP.js +0 -291
  87. package/dist/Sidebar-BPU7RCZP.js.map +0 -1
  88. package/dist/Spreadsheet-3C66BBBF.js +0 -519
  89. package/dist/Spreadsheet-3C66BBBF.js.map +0 -1
  90. package/dist/Stock-IF4IHYLU.js +0 -158
  91. package/dist/Stock-IF4IHYLU.js.map +0 -1
  92. package/dist/Weather-725PFR7T.js +0 -431
  93. package/dist/Weather-725PFR7T.js.map +0 -1
  94. package/dist/WorldClock-UU4NZIQ7.js +0 -202
  95. package/dist/WorldClock-UU4NZIQ7.js.map +0 -1
  96. package/dist/apps/index.js.map +0 -1
  97. package/dist/chunk-2TPTHAKI.js +0 -316
  98. package/dist/chunk-2TPTHAKI.js.map +0 -1
  99. package/dist/chunk-4P44JXDS.js +0 -195
  100. package/dist/chunk-4P44JXDS.js.map +0 -1
  101. package/dist/chunk-5O42JXQE.js +0 -26
  102. package/dist/chunk-5O42JXQE.js.map +0 -1
  103. package/dist/chunk-72CQWN7O.js +0 -547
  104. package/dist/chunk-72CQWN7O.js.map +0 -1
  105. package/dist/chunk-7CCHEEYC.js +0 -94
  106. package/dist/chunk-7CCHEEYC.js.map +0 -1
  107. package/dist/chunk-BE7FZOFU.js +0 -17
  108. package/dist/chunk-BE7FZOFU.js.map +0 -1
  109. package/dist/chunk-D276EMXS.js +0 -57
  110. package/dist/chunk-D276EMXS.js.map +0 -1
  111. package/dist/chunk-D7PYW2QS.js +0 -265
  112. package/dist/chunk-D7PYW2QS.js.map +0 -1
  113. package/dist/chunk-DVZWYWSD.js +0 -26
  114. package/dist/chunk-DVZWYWSD.js.map +0 -1
  115. package/dist/chunk-ET6ID4LP.js +0 -102
  116. package/dist/chunk-ET6ID4LP.js.map +0 -1
  117. package/dist/chunk-GA35NEND.js +0 -56
  118. package/dist/chunk-GA35NEND.js.map +0 -1
  119. package/dist/chunk-GIGV2ZRW.js +0 -70
  120. package/dist/chunk-GIGV2ZRW.js.map +0 -1
  121. package/dist/chunk-IPXN646P.js +0 -14
  122. package/dist/chunk-IPXN646P.js.map +0 -1
  123. package/dist/chunk-IRWSRJ4K.js +0 -48
  124. package/dist/chunk-IRWSRJ4K.js.map +0 -1
  125. package/dist/chunk-IULP5BCD.js +0 -79
  126. package/dist/chunk-IULP5BCD.js.map +0 -1
  127. package/dist/chunk-MGGY74RY.js +0 -14
  128. package/dist/chunk-MGGY74RY.js.map +0 -1
  129. package/dist/chunk-OLJDJYSU.js +0 -13678
  130. package/dist/chunk-OLJDJYSU.js.map +0 -1
  131. package/dist/chunk-PIGDNN5F.js +0 -46
  132. package/dist/chunk-PIGDNN5F.js.map +0 -1
  133. package/dist/chunk-Q2MJVSJT.js +0 -7
  134. package/dist/chunk-Q2MJVSJT.js.map +0 -1
  135. package/dist/chunk-Q3LT745N.js +0 -3710
  136. package/dist/chunk-Q3LT745N.js.map +0 -1
  137. package/dist/chunk-QAGQRNKI.js +0 -145
  138. package/dist/chunk-QAGQRNKI.js.map +0 -1
  139. package/dist/chunk-QRL64J5F.js +0 -503
  140. package/dist/chunk-QRL64J5F.js.map +0 -1
  141. package/dist/chunk-QSKCQUZE.js +0 -1103
  142. package/dist/chunk-QSKCQUZE.js.map +0 -1
  143. package/dist/chunk-R4OQIQYX.js +0 -153
  144. package/dist/chunk-R4OQIQYX.js.map +0 -1
  145. package/dist/chunk-RT6DSB5Y.js +0 -143
  146. package/dist/chunk-RT6DSB5Y.js.map +0 -1
  147. package/dist/chunk-SHQM5CK3.js +0 -549
  148. package/dist/chunk-SHQM5CK3.js.map +0 -1
  149. package/dist/chunk-T4VQHMG4.js +0 -822
  150. package/dist/chunk-T4VQHMG4.js.map +0 -1
  151. package/dist/chunk-TRCWINHF.js +0 -105
  152. package/dist/chunk-TRCWINHF.js.map +0 -1
  153. package/dist/chunk-TW7LPMVR.js +0 -16
  154. package/dist/chunk-TW7LPMVR.js.map +0 -1
  155. package/dist/chunk-W622KQTD.js +0 -465
  156. package/dist/chunk-W622KQTD.js.map +0 -1
  157. package/dist/chunk-X4Q6G253.js +0 -416
  158. package/dist/chunk-X4Q6G253.js.map +0 -1
  159. package/dist/chunk-YNKK7NE3.js +0 -171
  160. package/dist/chunk-YNKK7NE3.js.map +0 -1
  161. package/dist/chunk-YPO6RDMX.js +0 -20
  162. package/dist/chunk-YPO6RDMX.js.map +0 -1
  163. package/dist/file-intake/index.js.map +0 -1
  164. package/dist/index.js.map +0 -1
  165. package/dist/map/index.js.map +0 -1
  166. package/dist/markdown/index.js.map +0 -1
  167. package/dist/markup/index.js.map +0 -1
  168. package/dist/page-tabs/index.js.map +0 -1
  169. package/dist/sounds-NT4DEZGD.js +0 -3
  170. package/dist/sounds-NT4DEZGD.js.map +0 -1
  171. package/dist/ui/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/shell/toast.ts"],"names":[],"mappings":";;;AAwCA,IAAM,kBAAA,GAAqB,iBAAA;AAC3B,IAAM,yBAAA,GAA4B,wBAAA;AAClC,IAAM,kBAAA,GAAqB,iBAAA;AAC3B,IAAM,OAAA,GAAU,GAAA;AAChB,IAAM,MAAA,GAAS,4BAAA;AAkCf,IAAI,WAAyB,EAAC;AAG9B,IAAM,IAAA,uBAAW,GAAA,EAA2E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CAAK,OAAA,KAAY,UAAA,GAAa,IAAA,CAAK,OAAA,CAAQ,KAAK,CAAA,GAAI,IAAA,CAAK,OAAA,EAAS,IAAI,CAAA;AAAA,MACpG,CAAA;AAAA,MACA,CAAA,KAAA,KAAS;AACP,QAAA,OAAA,CAAQ,OAAA,EAAQ;AAChB,QAAA,SAAA,CAAU,OAAA,EAAS,OAAO,IAAA,CAAK,KAAA,KAAU,UAAA,GAAa,IAAA,CAAK,KAAA,CAAM,KAAK,CAAA,GAAI,IAAA,CAAK,KAAA,EAAO,IAAI,CAAA;AAAA,MAC5F;AAAA,KACF;AACA,IAAA,OAAO,CAAA;AAAA,EACT,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,SAAA,EAAW,CAAC,IAAA,KAAuB;AAAE,IAAA,QAAA,GAAW,EAAE,GAAG,IAAA,EAAK;AAAA,EAAG;AAC/D,CAAA;AAEA,IAAO,aAAA,GAAQ","file":"chunk-4P44JXDS.js","sourcesContent":["/**\n * Two presentations:\n *\n * 1. toast.success / error / info — brief operation feedback, top-center,\n * auto-dismiss (success/error ~3s, info ~4.5s). The everyday \"what just\n * happened\" feedback — most messages want this.\n * 2. toast.notify — system notification, top-right card, stays 10s, dismissible.\n * For an alert worth lingering on; reach for it deliberately, not by default.\n *\n * (Historically `toast.info` rendered the top-right notification card; it now\n * renders a brief toast — that persistent card moved to `toast.notify`.)\n *\n * ── Built for a strict Content-Security-Policy ──\n *\n * Every node here is made with `createElement`/`createElementNS` and dressed\n * with CLASSES from ui.css (`.rosh-toast`, `.rosh-notif`…). There is no HTML\n * string, no `style=\"…\"` attribute and no `on…=` handler anywhere in the\n * markup, and that is load-bearing rather than tidy:\n *\n * - An inline handler attribute is inline SCRIPT. Under any `script-src`\n * without `'unsafe-inline'` (a nonce-based policy, which is what Next.js\n * apps run) the browser refuses it and files a violation report. The\n * notification card's close button used to carry one for its hover colour,\n * so every `toast.notify` on such a site was a CSP report.\n * - A `style` attribute that arrives through markup is governed by\n * `style-src`; a policy with a nonce or a hash there ignores\n * `'unsafe-inline'` and drops it. Styles set through the CSSOM\n * (`el.style.opacity = …`) are not, which is why the enter/leave motion\n * below still writes `el.style` directly — that is the one dynamic part.\n * - No `innerHTML` also means nothing here needs a Trusted Types policy.\n *\n * The cost is that the toast's look now lives in ui.css, which every consumer\n * already imports (alone, or inside styles.css). Its colours are custom\n * properties there (`--rosh-toast-*`) with the values it always had, so a host\n * can restyle a toast without forking it.\n * `tests/strictCsp.test.ts` holds the DOM to all of this.\n */\n\nimport { currentShellStrings } from './strings';\n\nconst TOAST_CONTAINER_ID = 'toast-container';\nconst TOAST_BOTTOM_CONTAINER_ID = 'toast-container-bottom';\nconst NOTIF_CONTAINER_ID = 'notif-container';\nconst FADE_MS = 300;\nconst SVG_NS = 'http://www.w3.org/2000/svg';\n\nexport type ToastPlacement = 'top' | 'bottom';\n\nexport interface ToastOptions {\n /** Milliseconds before auto-dismiss. Ignored when `sticky`. */\n duration?: number;\n /**\n * Stay until dismissed. For a message the user must actually act on — the\n * kind that must not scroll past while they are looking at a customer.\n * Implies tap-to-dismiss is the only way out, which it already is.\n */\n sticky?: boolean;\n /**\n * `bottom` centres toasts along the bottom edge. On a till the top of the\n * screen is the cart total and the bottom is nearest the hand.\n */\n placement?: ToastPlacement;\n /**\n * Drop a message identical to one already showing, and RESTART its timer\n * rather than stacking a second copy. A failing poll otherwise writes the\n * same sentence a dozen times. The restart matters: the user asked twice, so\n * the message should persist, not expire on the first one's schedule.\n */\n dedupe?: boolean;\n}\n\n/**\n * Defaults for every subsequent toast, set once at app startup — the same\n * \"consumer wires this once\" shape as `setShellApiClient`/`setShellNavIcons`.\n * A till calls `toast.configure({ placement: 'bottom', duration: 6000,\n * dedupe: true })` instead of repeating those options at 40 call sites.\n * Per-call options still win.\n */\nlet defaults: ToastOptions = {};\n\n/** Live toasts by dedupe key, so a repeat can find and refresh its own. */\nconst live = new Map<string, { el: HTMLElement; restart: () => void; dismiss: () => void }>();\n\nfunction getOrCreate(id: string, className: string): HTMLElement {\n let el = document.getElementById(id);\n if (!el) {\n el = document.createElement('div');\n el.id = id;\n el.className = className;\n document.body.appendChild(el);\n }\n return el;\n}\n\ntype Tone = 'success' | 'error' | 'warning' | 'info' | 'loading';\n\n/**\n * Outline glyphs (Heroicons' paths), stroked in `currentColor` so the colour\n * comes from the tone class in ui.css rather than from an attribute here.\n * `loading` is an open arc that spins — the same vocabulary as LoadingSpinner.\n */\nconst GLYPHS: Record<Tone | 'bell', string> = {\n success: 'M5 13l4 4L19 7',\n error: 'M6 18L18 6M6 6l12 12',\n warning: 'M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z',\n info: 'M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z',\n loading: 'M12 3a9 9 0 019 9',\n bell: 'M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0',\n};\n\nfunction glyph(name: Tone | 'bell', className: string): SVGSVGElement {\n const svg = document.createElementNS(SVG_NS, 'svg');\n svg.setAttribute('class', className);\n svg.setAttribute('fill', 'none');\n svg.setAttribute('viewBox', '0 0 24 24');\n svg.setAttribute('stroke', 'currentColor');\n svg.setAttribute('stroke-width', '2');\n const path = document.createElementNS(SVG_NS, 'path');\n path.setAttribute('stroke-linecap', 'round');\n if (name !== 'loading') path.setAttribute('stroke-linejoin', 'round');\n path.setAttribute('d', GLYPHS[name]);\n svg.appendChild(path);\n return svg;\n}\n\nfunction div(className: string, text?: string): HTMLDivElement {\n const el = document.createElement('div');\n el.className = className;\n if (text !== undefined) el.textContent = text;\n return el;\n}\n\n// ── Toast (operation feedback) — top-center, brief ──\n\nfunction showToast(variant: Tone, message: string,\n opts?: ToastOptions): { dismiss: () => void } {\n const opts_ = { ...defaults, ...opts };\n const placement: ToastPlacement = opts_.placement ?? 'top';\n const sticky = opts_.sticky ?? false;\n\n // A repeat of a message already on screen refreshes it instead of stacking.\n const key = `${placement}|${variant}|${message}`;\n if (opts_.dedupe) {\n const existing = live.get(key);\n if (existing) { existing.restart(); return { dismiss: existing.dismiss }; }\n }\n\n // A loading toast is the START of an operation — the sound belongs to the\n // outcome, which follows in a moment.\n if (variant !== 'loading') {\n import('../utils/sounds').then(s => {\n if (variant === 'success') s.playSuccess();\n else if (variant === 'error') s.playError();\n else s.playNotification();\n }).catch(() => {});\n }\n\n const container = placement === 'bottom'\n ? getOrCreate(TOAST_BOTTOM_CONTAINER_ID, 'fixed bottom-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col-reverse gap-2 items-center pointer-events-none')\n : getOrCreate(TOAST_CONTAINER_ID, 'fixed top-4 left-1/2 -translate-x-1/2 z-[9999] flex flex-col gap-2 items-center pointer-events-none');\n\n // Enter from the edge the toast is anchored to, so it reads as arriving from\n // off-screen rather than drifting in from the wrong direction.\n const offscreen = placement === 'bottom' ? 'translateY(10px)' : 'translateY(-10px)';\n\n // The tone is a CLASS: `.rosh-tone-warning` and friends in ui.css colour the\n // glyph through `--rosh-toast-*`. Warning is amber and deliberately not the\n // error red: a warning is something to read before continuing, not something\n // that failed, and painting both red teaches people to ignore the colour.\n const el = div('pointer-events-auto cursor-pointer rosh-toast');\n el.style.opacity = '0';\n el.style.transform = `${offscreen} scale(0.95)`;\n // A toast IS a status message, and it appears without the user moving focus\n // — so without a live region it is announced to nobody. `alert` is\n // assertive and interrupts whatever is being read, which is right for a\n // failure and wrong for a confirmation the user already expected.\n el.setAttribute('role', variant === 'error' ? 'alert' : 'status');\n // Read the whole toast, not the word that changed. Without it a repeat that\n // only alters a number announces the number alone.\n el.setAttribute('aria-atomic', 'true');\n\n el.appendChild(glyph(variant, `h-4 w-4 rosh-tone-${variant}${variant === 'loading' ? ' animate-spin' : ''}`));\n const span = document.createElement('span');\n span.textContent = message;\n el.appendChild(span);\n\n container.appendChild(el);\n requestAnimationFrame(() => { el.style.opacity = '1'; el.style.transform = 'translateY(0) scale(1)'; });\n\n let timer: ReturnType<typeof setTimeout> | undefined;\n let gone = false;\n const dismiss = () => {\n if (gone) return;\n gone = true;\n if (timer) clearTimeout(timer);\n live.delete(key);\n el.style.opacity = '0';\n el.style.transform = `${offscreen} scale(0.95)`;\n setTimeout(() => el.remove(), FADE_MS);\n };\n\n // Info messages are usually a sentence (\"no matches — check X\"); give them a\n // beat longer to read than the terse success/error confirmations.\n const duration = opts_.duration ?? (variant === 'info' ? 4500 : 3000);\n const restart = () => {\n if (timer) clearTimeout(timer);\n if (!sticky) timer = setTimeout(dismiss, duration);\n };\n restart();\n\n // Hold the timer while the pointer rests on it. Three seconds is enough to\n // read a confirmation and not enough to read an address someone leaned in\n // for — and a toast that vanishes as you reach for it cannot be re-read at\n // all, since there is no history to open.\n el.addEventListener('mouseenter', () => { if (timer) clearTimeout(timer); });\n el.addEventListener('mouseleave', () => { if (!gone) restart(); });\n\n // Tap anywhere on the toast to dismiss it. A toast has no other click\n // affordance, and a sticky one has no other exit at all — `notify` has\n // behaved this way since it existed.\n el.addEventListener('click', dismiss);\n\n live.set(key, { el, restart, dismiss });\n // Internal handle — `toast.promise` swaps its loading toast for the outcome.\n return { dismiss };\n}\n\n// ── Notification (system alert) — top-right, stays longer ──\n\nfunction showNotification(message: string, opts?: { duration?: number }) {\n import('../utils/sounds').then(s => s.playNotification()).catch(() => {});\n\n const container = getOrCreate(NOTIF_CONTAINER_ID, 'fixed top-4 right-4 z-[9999] flex flex-col gap-3 items-end pointer-events-none');\n\n const el = div('pointer-events-auto cursor-pointer rosh-notif');\n el.style.opacity = '0';\n el.style.transform = 'translateX(30px) scale(0.95)';\n\n const badge = div('rosh-notif-badge');\n badge.appendChild(glyph('bell', 'h-5 w-5'));\n const body = div('rosh-notif-body');\n // The heading is the app's catalog word — read here, outside React.\n body.append(div('rosh-notif-title', currentShellStrings().toast.notification), div('notif-msg rosh-notif-msg', message));\n // The close button's hover colour is a `:hover` rule in ui.css. It was an\n // `onmouseenter` attribute — inline script, refused by a strict CSP.\n const close = document.createElement('button');\n close.className = 'rosh-notif-close';\n close.textContent = '×';\n el.append(badge, body, close);\n\n const dismiss = () => {\n el.style.opacity = '0';\n el.style.transform = 'translateX(30px) scale(0.95)';\n setTimeout(() => el.remove(), FADE_MS);\n };\n\n close.addEventListener('click', (e) => { e.stopPropagation(); dismiss(); });\n el.addEventListener('click', dismiss);\n\n container.appendChild(el);\n requestAnimationFrame(() => { el.style.opacity = '1'; el.style.transform = 'translateX(0) scale(1)'; });\n\n setTimeout(dismiss, opts?.duration ?? 10000);\n}\n\nconst toast = {\n success: (message: string, opts?: ToastOptions) => showToast('success', message, opts),\n error: (message: string, opts?: ToastOptions) => showToast('error', message, opts),\n /**\n * Something the user should read before continuing — a partial success, a\n * setting that will not apply until they do something else. Distinct from\n * `error`, which is \"this did not happen\".\n */\n warning: (message: string, opts?: ToastOptions) => showToast('warning', message, opts),\n info: (message: string, opts?: ToastOptions) => showToast('info', message, opts),\n // Persistent top-right notification card (the old toast.info presentation).\n notify: (message: string, opts?: { duration?: number }) => showNotification(message, opts),\n /**\n * One toast for one async operation: a spinning \"loading\" toast while `p`\n * is pending, swapped for a success or error toast when it settles. The\n * promise is returned untouched, so `await toast.promise(save(), …)` still\n * throws to the caller — this narrates the operation, it does not handle it.\n *\n * `error` is REQUIRED, and there is deliberately no fallback that prints\n * the exception: a raw `e.message` in a toast is how internals leak to the\n * screen (the same reasoning that keeps ErrorBoundary's stack behind\n * `showDetails`). The success/error messages may be functions of the\n * resolved value / the rejection, for the \"Saved 3 rows\" case.\n */\n promise: <T,>(\n p: Promise<T>,\n msgs: {\n loading: string;\n success: string | ((value: T) => string);\n error: string | ((error: unknown) => string);\n },\n opts?: ToastOptions,\n ): Promise<T> => {\n const pending = showToast('loading', msgs.loading, { ...opts, sticky: true });\n p.then(\n value => {\n pending.dismiss();\n showToast('success', typeof msgs.success === 'function' ? msgs.success(value) : msgs.success, opts);\n },\n error => {\n pending.dismiss();\n showToast('error', typeof msgs.error === 'function' ? msgs.error(error) : msgs.error, opts);\n },\n );\n return p;\n },\n /**\n * Set defaults for every subsequent toast. Call once at app startup; later\n * calls replace the whole object rather than merging, so a consumer sets its\n * policy in one place. Per-call options still take precedence.\n */\n configure: (next: ToastOptions) => { defaults = { ...next }; },\n};\n\nexport default toast;\n"]}
@@ -1,26 +0,0 @@
1
- // src/apps/_spreadsheetStage.ts
2
- var SPREADSHEET_PREVIEW_UPDATE_EVENT = "react-os-shell:spreadsheet-preview-update";
3
- var pendingSpreadsheet = null;
4
- var nextSpreadsheetToken = 0;
5
- function setSpreadsheetPreview(data) {
6
- const token = ++nextSpreadsheetToken;
7
- const stage = { token, data };
8
- pendingSpreadsheet = stage;
9
- return {
10
- update(next) {
11
- if (pendingSpreadsheet === stage) stage.data = next;
12
- if (typeof window === "undefined") return;
13
- window.dispatchEvent(new CustomEvent(SPREADSHEET_PREVIEW_UPDATE_EVENT, { detail: { token, data: next } }));
14
- }
15
- };
16
- }
17
- function peekSpreadsheetPreviewStage() {
18
- return pendingSpreadsheet;
19
- }
20
- function claimSpreadsheetPreviewStage(stage) {
21
- if (pendingSpreadsheet === stage) pendingSpreadsheet = null;
22
- }
23
-
24
- export { SPREADSHEET_PREVIEW_UPDATE_EVENT, claimSpreadsheetPreviewStage, peekSpreadsheetPreviewStage, setSpreadsheetPreview };
25
- //# sourceMappingURL=chunk-5O42JXQE.js.map
26
- //# sourceMappingURL=chunk-5O42JXQE.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/apps/_spreadsheetStage.ts"],"names":[],"mappings":";AAiCO,IAAM,gCAAA,GAAmC;AAahD,IAAI,kBAAA,GAAqD,IAAA;AACzD,IAAI,oBAAA,GAAuB,CAAA;AAIpB,SAAS,sBAAsB,IAAA,EAAwD;AAC5F,EAAA,MAAM,QAAQ,EAAE,oBAAA;AAChB,EAAA,MAAM,KAAA,GAAiC,EAAE,KAAA,EAAO,IAAA,EAAK;AACrD,EAAA,kBAAA,GAAqB,KAAA;AACrB,EAAA,OAAO;AAAA,IACL,OAAO,IAAA,EAA8B;AAMnC,MAAA,IAAI,kBAAA,KAAuB,KAAA,EAAO,KAAA,CAAM,IAAA,GAAO,IAAA;AAC/C,MAAA,IAAI,OAAO,WAAW,WAAA,EAAa;AACnC,MAAA,MAAA,CAAO,aAAA,CAAc,IAAI,WAAA,CAAY,gCAAA,EAAkC,EAAE,MAAA,EAAQ,EAAE,KAAA,EAAO,IAAA,EAAM,IAAA,EAAK,EAAG,CAAC,CAAA;AAAA,IAC3G;AAAA,GACF;AACF;AAGO,SAAS,2BAAA,GAA8D;AAC5E,EAAA,OAAO,kBAAA;AACT;AAKO,SAAS,6BAA6B,KAAA,EAAsC;AACjF,EAAA,IAAI,kBAAA,KAAuB,OAAO,kBAAA,GAAqB,IAAA;AACzD","file":"chunk-5O42JXQE.js","sourcesContent":["/**\n * Spreadsheet staging — the tiny consumer-facing surface of the Spreadsheets\n * app. Lives apart from Spreadsheet.tsx so importing `setSpreadsheetPreview`\n * (from `efficient-shell/apps` or shell internals like openPreviewFile) never\n * drags the grid implementation into a host's startup bundle. The Spreadsheet\n * window component stays behind its React.lazy dynamic import and drains the\n * stage on mount via the @internal peek/claim helpers below.\n */\n\nexport interface SpreadsheetPreviewData {\n /** CSV text (comma- or tab-separated). */\n csv: string;\n /** Display name; the title strips a trailing `.csv`/`.tsv`/`.txt`. */\n filename: string;\n /** When provided, the toolbar shows an Email button that calls back with the\n * sheet serialized as CSV at click time (edits included) and a filename\n * derived from the current title. */\n onEmail?: (csv: string, filename: string) => void;\n}\n\n/** Handle returned by `setSpreadsheetPreview`. Holds the identity of the\n * staged payload so a later `.update()` only targets the window that picked\n * it up — opening a second Spreadsheet never clobbers the first. */\nexport interface SpreadsheetPreviewHandle {\n /** Replace the data shown in the window that consumed this staging. Safe to\n * call before that window exists — an update that lands while the payload\n * is still staged replaces the staged payload, so the window opens on the\n * resolved sheet instead of whatever it was staged with.\n * No-op only once the window that consumed the staging has been closed. */\n update(next: SpreadsheetPreviewData): void;\n}\n\n/** @internal Event carrying `.update()` payloads to the claiming window. */\nexport const SPREADSHEET_PREVIEW_UPDATE_EVENT = 'react-os-shell:spreadsheet-preview-update';\n\n/** @internal Staged payload awaiting the next Spreadsheet window mount.\n *\n * `data` is MUTABLE and deliberately so: `update()` rewrites it in place\n * while the stage is still unclaimed. Restaging a fresh object instead would\n * break the identity that `claimSpreadsheetPreviewStage` and the claimant's\n * own `consumedRef` are holding. */\nexport interface PendingSpreadsheetStage {\n token: number;\n data: SpreadsheetPreviewData;\n}\n\nlet pendingSpreadsheet: PendingSpreadsheetStage | null = null;\nlet nextSpreadsheetToken = 0;\n\n/** Stage CSV content for the next Spreadsheet window mount. The returned\n * handle's `update()` method swaps content in *that* specific window only. */\nexport function setSpreadsheetPreview(data: SpreadsheetPreviewData): SpreadsheetPreviewHandle {\n const token = ++nextSpreadsheetToken;\n const stage: PendingSpreadsheetStage = { token, data };\n pendingSpreadsheet = stage;\n return {\n update(next: SpreadsheetPreviewData) {\n // Same delivery gap the Preview stage has (see _previewStage.ts): the\n // window is a lazy chunk, so a consumer that resolves quickly can call\n // this before any window has mounted to hear the event, and the payload\n // would be dropped. Rewrite the stage as well while it is still ours —\n // `pendingSpreadsheet === stage` is exactly \"nobody has claimed it yet\".\n if (pendingSpreadsheet === stage) stage.data = next;\n if (typeof window === 'undefined') return;\n window.dispatchEvent(new CustomEvent(SPREADSHEET_PREVIEW_UPDATE_EVENT, { detail: { token, data: next } }));\n },\n };\n}\n\n/** @internal Render-phase peek — see Spreadsheet.tsx for the drain protocol. */\nexport function peekSpreadsheetPreviewStage(): PendingSpreadsheetStage | null {\n return pendingSpreadsheet;\n}\n\n/** @internal Commit-phase claim. The identity check keeps a payload staged\n * *after* the claimant's render-phase peek available for the window it\n * belongs to. */\nexport function claimSpreadsheetPreviewStage(stage: PendingSpreadsheetStage): void {\n if (pendingSpreadsheet === stage) pendingSpreadsheet = null;\n}\n"]}
@@ -1,547 +0,0 @@
1
- import { createContext, useContext, useMemo, useEffect } from 'react';
2
- import { jsx } from 'react/jsx-runtime';
3
-
4
- // src/shell/strings.tsx
5
-
6
- // src/utils/number.ts
7
- var formats = /* @__PURE__ */ new Map();
8
- function numberFormat(locale, options) {
9
- const key = `${locale}|${JSON.stringify(options)}`;
10
- let format = formats.get(key);
11
- if (!format) {
12
- format = new Intl.NumberFormat(locale, options);
13
- formats.set(key, format);
14
- }
15
- return format;
16
- }
17
- function formatPlain(value, locale) {
18
- return locale ? numberFormat(locale, { maximumFractionDigits: 20 }).format(value) : String(value);
19
- }
20
- function formatGrouped(value, locale) {
21
- return locale ? numberFormat(locale, {}).format(value) : value.toLocaleString();
22
- }
23
- function formatFixed(value, digits, locale) {
24
- return locale ? numberFormat(locale, { minimumFractionDigits: digits, maximumFractionDigits: digits }).format(value) : value.toFixed(digits);
25
- }
26
- function formatPercent(percent, digits, locale) {
27
- return locale ? numberFormat(locale, {
28
- style: "percent",
29
- minimumFractionDigits: digits,
30
- maximumFractionDigits: digits
31
- }).format(percent / 100) : `${percent.toFixed(digits)}%`;
32
- }
33
- function englishStrings(locale) {
34
- const plain = (v) => formatPlain(v, locale);
35
- const grouped = (v) => formatGrouped(v, locale);
36
- const fixed = (v, digits) => formatFixed(v, digits, locale);
37
- const percent = (p, digits) => formatPercent(p, digits, locale);
38
- return {
39
- window: {
40
- minimize: "Minimize",
41
- restore: "Restore",
42
- maximize: "Maximize",
43
- windowed: "Windowed",
44
- pinOnTop: "Pin on top",
45
- unpin: "Unpin from top",
46
- close: "Close",
47
- windowSuffix: "window",
48
- prev: "Prev",
49
- next: "Next",
50
- snapLayouts: "Snap layouts",
51
- snapLeft: "Snap left half",
52
- snapRight: "Snap right half",
53
- snapTopLeft: "Snap top-left quarter",
54
- snapTopRight: "Snap top-right quarter",
55
- snapBottomLeft: "Snap bottom-left quarter",
56
- snapBottomRight: "Snap bottom-right quarter"
57
- },
58
- taskbar: {
59
- closeWindow: "Close window",
60
- offscreenHint: "This window is off screen \u2014 click to bring it back",
61
- offscreenDot: "Off screen \u2014 click to bring this window back",
62
- expose: "Expos\xE9 \u2014 show all open windows as thumbnails",
63
- addToDesktop: "Add to desktop",
64
- removeFromDesktop: "Remove from desktop",
65
- minimizeAllWindows: "Minimize all",
66
- restoreAllWindows: "Restore all",
67
- closeAllWindows: "Close all"
68
- },
69
- logout: {
70
- goodbye: "Goodbye",
71
- seeYou: "See you next time"
72
- },
73
- about: {
74
- aboutPrefix: "About",
75
- thisApp: "this app",
76
- openSourceLicenses: "Open Source Licenses",
77
- whatsNew: "What's New",
78
- noChangelog: "No changelog available."
79
- },
80
- table: {
81
- empty: "Nothing to show",
82
- loading: "Loading",
83
- selectAll: "Select all rows",
84
- selectRow: "Select row"
85
- },
86
- select: {
87
- none: "\u2014 None \u2014",
88
- noMatches: "No matches",
89
- allSelected: "All options selected",
90
- clear: "Clear selection",
91
- remove: "Remove"
92
- },
93
- notifications: {
94
- title: "Notifications",
95
- markAllRead: "Mark all read",
96
- dnd: "Do not disturb",
97
- dndOn: "Do not disturb is on",
98
- caughtUp: "All caught up",
99
- empty: "No notifications yet",
100
- viewAll: "View all notifications",
101
- cardLabel: "Notification",
102
- dismiss: "Dismiss notification"
103
- },
104
- form: {
105
- errorSummaryTitle: "There is a problem"
106
- },
107
- help: {
108
- title: "Help",
109
- searchPlaceholder: "Search help\u2026",
110
- empty: "No help articles yet.",
111
- noResults: "No articles match your search.",
112
- loading: "Loading\u2026",
113
- pickArticle: "Pick a help article from the left.",
114
- noBody: "This article has no body yet.",
115
- draft: "Draft",
116
- newArticle: "+ New",
117
- edit: "Edit"
118
- },
119
- update: {
120
- available: "A new version is available.",
121
- refreshNow: "Refresh now"
122
- },
123
- pageTabs: {
124
- label: "Open pages",
125
- close: "Close",
126
- closeOthers: "Close other tabs",
127
- closeRight: "Close tabs to the right",
128
- closeAll: "Close all tabs",
129
- unsaved: "Unsaved changes",
130
- discardTitle: "Discard unsaved changes?",
131
- discardOne: "This page has changes that have not been saved. Close it anyway?",
132
- discardMany: "pages have changes that have not been saved. Close them anyway?",
133
- discardConfirm: "Discard and close",
134
- keepEditing: "Keep editing"
135
- },
136
- dialog: {
137
- close: "Close",
138
- cancel: "Cancel",
139
- ok: "OK",
140
- confirmTitle: "Confirm",
141
- destructiveTitle: "Confirm Action",
142
- destructiveCancel: "Dismiss",
143
- destructiveConfirm: "Delete",
144
- typeToConfirm: (word) => `Type ${word} to confirm:`,
145
- promptTitle: "Enter a value"
146
- },
147
- calendar: {
148
- previousMonth: "Previous month",
149
- nextMonth: "Next month",
150
- previousYear: "Previous year",
151
- nextYear: "Next year",
152
- previousYears: "Previous years",
153
- nextYears: "Next years",
154
- monthPanel: "Choose a month",
155
- yearPanel: "Choose a year",
156
- chooseMonth: (month) => `Choose a month, currently ${month}`,
157
- // A year is never grouped: "2,026" is a quantity, not a year.
158
- chooseYear: (year) => `Choose a year, currently ${year}`
159
- },
160
- datePicker: {
161
- placeholder: "Select a date",
162
- dialog: "Choose a date",
163
- clear: "Clear",
164
- today: "Today"
165
- },
166
- dateRange: {
167
- placeholder: "Date Range",
168
- clearRange: "Clear date range",
169
- dialog: "Date range",
170
- from: "From",
171
- to: "To",
172
- start: "Start",
173
- end: "End",
174
- fromOnly: (date) => `From ${date}`,
175
- toOnly: (date) => `To ${date}`,
176
- last2Weeks: "Last 2 Weeks",
177
- lastMonth: "Last Month",
178
- last3Months: "Last 3 Months",
179
- last6Months: "Last 6 Months",
180
- last12Months: "Last 12 Months",
181
- custom: "Custom",
182
- clear: "Clear",
183
- cancel: "Cancel",
184
- apply: "Apply"
185
- },
186
- pagination: {
187
- label: "Pagination",
188
- first: "First page",
189
- previous: "Previous page",
190
- next: "Next page",
191
- last: "Last page"
192
- },
193
- list: {
194
- selected: (count) => `${plain(count)} selected`,
195
- allLoaded: (total, label) => `All ${grouped(total)} ${label} loaded`,
196
- count: (total, label) => `${grouped(total)} ${label}`,
197
- loadedOf: (loaded, total, label) => `${grouped(loaded)} of ${grouped(total)} ${label}`,
198
- loadingMore: "Loading more...",
199
- loadError: "Couldn't load this list",
200
- loadErrorMessage: "Something went wrong fetching these records. Check your connection and try again.",
201
- retry: "Try again"
202
- },
203
- kanban: {
204
- loading: "Loading\u2026",
205
- empty: "No items.",
206
- dropHere: "Drop here",
207
- addItem: "Add item"
208
- },
209
- files: {
210
- attach: "Attach files",
211
- drop: "Drop files to attach",
212
- remove: (name) => `Remove ${name}`,
213
- chooseMany: "Choose files",
214
- chooseOne: "Choose a file",
215
- dragMany: "or drag them here",
216
- dragOne: "or drag it here",
217
- notAccepted: (name, hint) => `${name} is not an accepted file type${hint ? ` (${hint})` : ""}`,
218
- tooLarge: (name, size, limit) => `${name} is ${size} \u2014 the limit is ${limit}`,
219
- tooMany: (name, max) => `${name} was not added \u2014 ${plain(max)} ${max === 1 ? "file" : "files"} is the limit`,
220
- bytes: (value) => `${plain(value)} B`,
221
- kilobytes: (value) => `${plain(value)} KB`,
222
- megabytes: (value) => `${fixed(value, 1)} MB`
223
- },
224
- media: {
225
- uploadImage: "Upload an image",
226
- uploadVideo: "Upload a video",
227
- uploadFile: "Upload a file",
228
- upload: "Upload media",
229
- cta: "Choose from library or upload",
230
- replace: "Replace",
231
- remove: "Remove",
232
- uploading: "Uploading\u2026",
233
- cover: "Cover",
234
- add: "Add",
235
- addMedia: "Add media",
236
- empty: "No media.",
237
- removeItem: (name) => `Remove ${name}`,
238
- reorder: (name, position, total) => `${name}, item ${plain(position)} of ${plain(total)}. Use arrow keys to reorder.`
239
- },
240
- brandAsset: {
241
- save: (noun) => `Save ${noun}`,
242
- remove: (noun) => `Remove ${noun}`,
243
- discard: "Discard change",
244
- saveFailed: (noun) => `Could not save ${noun}.`,
245
- removeFailed: (noun) => `Could not remove ${noun}.`,
246
- region: (assetName, subjectName) => `${assetName} for ${subjectName}`,
247
- usedFor: (subjectName) => `Used for ${subjectName}.`,
248
- previews: (assetName) => `${assetName} previews`,
249
- preview: "Preview",
250
- alt: (subjectName, assetName) => `${subjectName} ${assetName}`
251
- },
252
- copy: {
253
- copy: "Copy",
254
- copyLabel: (label) => `Copy ${label}`,
255
- copied: "Copied",
256
- copiedLabel: (label) => `${label} copied`,
257
- failed: "Could not copy to the clipboard"
258
- },
259
- keypad: {
260
- backspace: "Backspace",
261
- enter: "Enter"
262
- },
263
- banner: {
264
- dismiss: "Dismiss"
265
- },
266
- badge: {
267
- remove: "Remove",
268
- removeItem: (label) => `Remove ${label}`
269
- },
270
- breadcrumbs: {
271
- label: "Breadcrumb",
272
- hidden: "Hidden crumbs"
273
- },
274
- emptyState: {
275
- message: "Nothing here yet."
276
- },
277
- errors: {
278
- notFound: "Page not found",
279
- notFoundBody: "The page you're looking for doesn't exist or was moved.",
280
- forbidden: "Access denied",
281
- forbiddenBody: "You don't have permission to view this page.",
282
- noAccess: "You don't have access to this",
283
- serverError: "Something went wrong",
284
- serverErrorBody: "An unexpected error occurred. Please try again.",
285
- retry: "Try again",
286
- details: "Error details"
287
- },
288
- search: {
289
- placeholder: "Search...",
290
- escBadge: "ESC",
291
- searching: "Searching...",
292
- noResults: "No results found.",
293
- minChars: (min) => `Type at least ${plain(min)} characters to search...`,
294
- navigate: "navigate",
295
- open: "open",
296
- close: "close",
297
- enterKey: "Enter",
298
- escKey: "Esc"
299
- },
300
- grid: {
301
- selectAll: "Select all",
302
- insertRowAbove: "Insert row above",
303
- insertRowBelow: "Insert row below",
304
- // A row NUMBER, as the grid's own row header prints it — never grouped.
305
- deleteRow: (row) => `Delete row ${row}`,
306
- insertColumnLeft: "Insert column left",
307
- insertColumnRight: "Insert column right",
308
- deleteColumn: (column) => `Delete column ${column}`,
309
- resize: "Drag to resize \xB7 double-click to auto-fit",
310
- fill: "Drag to fill"
311
- },
312
- sidebar: {
313
- resize: "Drag to resize \xB7 double-click to reset"
314
- },
315
- markdown: {
316
- screenshot: "Screenshot"
317
- },
318
- severity: {
319
- success: "ok",
320
- warning: "warning",
321
- danger: "critical",
322
- unrecognised: (token) => `unrecognised severity ${token}`
323
- },
324
- meter: {
325
- noData: "no data",
326
- warningAt: (bound) => `warning \u2265 ${plain(bound)}`,
327
- criticalAt: (bound) => `critical \u2265 ${plain(bound)}`,
328
- noReading: "no reading",
329
- noBudget: "no budget",
330
- ofBudget: (value) => `${value} of budget`,
331
- budget: "budget",
332
- hoursMinutes: (hours, minutes) => `${plain(hours)}h ${plain(minutes)}m`,
333
- minutesSeconds: (minutes, seconds) => `${plain(minutes)}m ${plain(seconds)}s`,
334
- seconds: (seconds) => `${plain(seconds)}s`
335
- },
336
- charts: {
337
- showTable: "Show the data as a table",
338
- loading: "Loading chart data",
339
- noData: "No data in this window.",
340
- windowStart: "Window start",
341
- windowEnd: "Window end",
342
- window: (from, to, count) => `Time window \u2014 showing ${from} to ${to} of ${plain(count)} intervals`,
343
- overIntervals: (series, count) => `${series.join(", ")} over ${plain(count)} intervals`,
344
- acrossCategories: (series, count) => `${series.join(", ")} across ${plain(count)} categories`,
345
- acrossMeasures: (series, count) => `${series.join(", ")} across ${plain(count)} measures`,
346
- breakdown: (total, segments) => `Breakdown of ${total} across ${plain(segments)} segments`,
347
- funnel: (stages, first, last) => `Funnel of ${plain(stages)} stages, ${first} down to ${last}`,
348
- radialTrack: (count) => `${plain(count)} categories, as concentric proportions`,
349
- radialCycle: (count) => `${plain(count)} categories, around a cycle`,
350
- tableFrom: "From",
351
- tableTo: "To",
352
- tableItem: "Item",
353
- tableLevel: "Level",
354
- tableSeries: "Series",
355
- inBucket: (total) => `${total} in this bucket`,
356
- inCategory: (total) => `${total} in this category`,
357
- value: "Value",
358
- share: "Share",
359
- count: "Count",
360
- flow: "Flow",
361
- totalFlow: "Total flow",
362
- throughput: "Throughput",
363
- open: "Open",
364
- high: "High",
365
- low: "Low",
366
- close: "Close",
367
- maximum: "Maximum",
368
- q3: "Q3",
369
- median: "Median",
370
- q1: "Q1",
371
- minimum: "Minimum",
372
- distribution: "Distribution",
373
- fiveNumber: (label, count) => `${label}: five-number summary for ${plain(count)} categories`,
374
- outliers: (count) => `${plain(count)} outlier${count > 1 ? "s" : ""} beyond the whiskers`,
375
- price: "Price",
376
- ohlc: (label, count) => `${label}: open, high, low and close across ${plain(count)} periods`,
377
- closedAbove: "Closed above its open",
378
- closedBelow: "Closed below its open",
379
- noFlows: "No flows to chart.",
380
- chord: (count) => `Flows between ${plain(count)} participants`,
381
- noStages: "No stages to chart.",
382
- ofFirstStage: "Of first stage",
383
- droppedHere: "Dropped here",
384
- intensity: "Intensity",
385
- noActivity: "No activity in this window.",
386
- heatmap: (label, rows, columns) => `${label} across ${plain(rows)} rows and ${plain(columns)} columns`,
387
- countAxis: "count",
388
- histogram: (label, bins, observations) => `${label}: ${plain(bins)} bins over ${plain(observations)} observations`,
389
- observations: "Observations",
390
- notEnough: "Not enough eligible requests to judge.",
391
- objectiveMet: (objective) => `objective ${objective} met`,
392
- objectiveMissed: (objective) => `objective ${objective} missed`,
393
- nothingToPlot: "Nothing to plot.",
394
- nothingToCompare: "Nothing to compare.",
395
- other: "Other",
396
- nothingToBreakDown: "Nothing to break down.",
397
- range: "Range",
398
- rangeLabel: (label, count) => `${label}: low and high across ${plain(count)} categories`,
399
- nothingToRank: "Nothing to rank in this window.",
400
- emphasised: "(emphasised)",
401
- sankey: (nodes, links) => `Flow between ${plain(nodes)} nodes over ${plain(links)} links`,
402
- noObservations: "No observations in this window.",
403
- xAxis: "x",
404
- yAxis: "y",
405
- size: "Size",
406
- scatter: (series, yLabel, xLabel) => `${series.join(", ")}: ${yLabel} against ${xLabel}`,
407
- outsideRange: (count) => `${plain(count)} ${count === 1 ? "point" : "points"} outside the shown range`,
408
- waterfall: (steps, from, to) => `Waterfall of ${plain(steps)} steps from ${from} to ${to}`,
409
- balance: "Balance",
410
- increase: "Increase",
411
- decrease: "Decrease",
412
- runningTotal: "Running total",
413
- sunburst: (total, depth) => `Hierarchy of ${total} across ${plain(depth)} levels`,
414
- treemap: (count) => `Treemap of ${plain(count)} items`,
415
- trendUp: "up",
416
- trendDown: "down",
417
- trendFlat: "flat"
418
- },
419
- timeline: {
420
- days: (count) => `${grouped(count)} days`,
421
- daysToToday: (count) => `${grouped(count)} days to today`,
422
- notReached: "Not yet reached",
423
- next: "Next",
424
- more: (count) => `+${plain(count)} more`,
425
- today: "Today",
426
- todayTitle: (date) => `Today \u2014 ${date}`,
427
- open: (name) => `Open ${name}`,
428
- openButton: "Open",
429
- scrub: "Scrub the timeline",
430
- alsoToCome: (names) => `Also to come: ${names.join(", ")}`,
431
- start: (date) => `Start \xB7 ${date}`,
432
- events: (count, names) => `${plain(count)} events \xB7 ${names.join(", ")}`,
433
- started: (date) => `started ${date}`,
434
- duration: (days) => `${grouped(days)} day${days === 1 ? "" : "s"}`,
435
- reached: (dated, total) => `${plain(dated)} of ${plain(total)} milestones`,
436
- milestones: (title) => `${title} milestones`
437
- },
438
- production: {
439
- heading: "Production progress",
440
- start: "Start",
441
- estimated: "Estimated",
442
- estimatedCompletion: "Estimated completion",
443
- estDone: "Est. done",
444
- play: "Play",
445
- pause: "Pause",
446
- playTitle: "Play the timeline, report by report",
447
- backTo: (report) => `Back to ${report}`,
448
- showing: (report) => `Showing ${report}`,
449
- overall: (p) => `${percent(p, 0)} overall`,
450
- inStock: (pieces) => `${grouped(pieces)} pc in stock`,
451
- noReport: "No production report filed yet",
452
- leadTime: (days) => `${grouped(days)} day${days === 1 ? "" : "s"} lead time`,
453
- report: "Production report",
454
- shipment: "Shipment",
455
- inspection: "Inspection",
456
- invoice: "Invoice",
457
- scrub: "Scrub the production timeline",
458
- label: (from, to) => `Production reports and events, ${from} to ${to}`
459
- },
460
- containers: {
461
- items: (count) => `${plain(count)} items`,
462
- pieces: (count) => `${plain(count)} pcs`,
463
- split: (instructed, loaded) => `(${plain(instructed)} instr / ${plain(loaded)} loaded)`,
464
- added: (count, pieces) => `${plain(count)} new (${plain(pieces)} pcs)`,
465
- fill: (volume, capacity) => `${fixed(volume, 1)} / ${plain(capacity)} m\xB3`,
466
- total: "Total:",
467
- instructed: (volume) => `${fixed(volume, 2)} m\xB3 instruction`,
468
- loaded: (volume) => `${fixed(volume, 2)} m\xB3 loaded`,
469
- volume: (volume) => `${fixed(volume, 2)} m\xB3`,
470
- noVolume: "Volume: N/A (no volume data for these part numbers)"
471
- },
472
- toast: {
473
- notification: "Notification"
474
- }
475
- };
476
- }
477
- var DEFAULT_SHELL_STRINGS = englishStrings();
478
- var localisedDefaults = /* @__PURE__ */ new Map();
479
- function defaultsFor(locale) {
480
- if (!locale) return DEFAULT_SHELL_STRINGS;
481
- let defaults = localisedDefaults.get(locale);
482
- if (!defaults) {
483
- defaults = englishStrings(locale);
484
- localisedDefaults.set(locale, defaults);
485
- }
486
- return defaults;
487
- }
488
- var ShellStringsContext = createContext(DEFAULT_SHELL_STRINGS);
489
- var ShellLocaleContext = createContext(null);
490
- var reportedLocales = /* @__PURE__ */ new Set();
491
- function canonicalLocale(tag) {
492
- if (!tag) return void 0;
493
- try {
494
- return Intl.getCanonicalLocales(tag)[0];
495
- } catch {
496
- if (!reportedLocales.has(tag)) {
497
- reportedLocales.add(tag);
498
- console.error(
499
- `[efficient-shell] ShellStringsProvider: locale="${tag}" is not a BCP 47 language tag, so it is ignored and numbers and dates keep their default formatting. Pass a tag such as "de-DE" or "ja".`
500
- );
501
- }
502
- return void 0;
503
- }
504
- }
505
- var outermost = DEFAULT_SHELL_STRINGS;
506
- var NO_OVERRIDE = {};
507
- function currentShellStrings() {
508
- return outermost;
509
- }
510
- function ShellStringsProvider({ value = NO_OVERRIDE, locale, children }) {
511
- const parent = useContext(ShellLocaleContext);
512
- const own = useMemo(() => canonicalLocale(locale), [locale]);
513
- const active = locale === void 0 ? parent?.locale : own;
514
- const merged = useMemo(() => {
515
- const base = defaultsFor(active);
516
- const out = {};
517
- for (const key of Object.keys(base)) {
518
- out[key] = { ...base[key], ...value[key] ?? {} };
519
- }
520
- return out;
521
- }, [value, active]);
522
- const localeValue = useMemo(() => ({ locale: active }), [active]);
523
- const nested = parent !== null;
524
- useEffect(() => {
525
- if (nested) return;
526
- outermost = merged;
527
- return () => {
528
- if (outermost === merged) outermost = DEFAULT_SHELL_STRINGS;
529
- };
530
- }, [merged, nested]);
531
- return /* @__PURE__ */ jsx(ShellLocaleContext.Provider, { value: localeValue, children: /* @__PURE__ */ jsx(ShellStringsContext.Provider, { value: merged, children }) });
532
- }
533
- function useShellStrings() {
534
- return useContext(ShellStringsContext);
535
- }
536
- function useShellLocale() {
537
- return useContext(ShellLocaleContext)?.locale;
538
- }
539
- function splitAround(sentence) {
540
- const MARK = "\0";
541
- const [before = "", ...after] = sentence(MARK).split(MARK);
542
- return [before, after.join("")];
543
- }
544
-
545
- export { DEFAULT_SHELL_STRINGS, ShellStringsProvider, currentShellStrings, formatFixed, formatPercent, formatPlain, splitAround, useShellLocale, useShellStrings };
546
- //# sourceMappingURL=chunk-72CQWN7O.js.map
547
- //# sourceMappingURL=chunk-72CQWN7O.js.map