@squadbase/vantage 0.6.1 → 0.6.2-dev1.0017a4d

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 (319) hide show
  1. package/dist/add-4GHF2TX2.js +6 -0
  2. package/dist/add-4GHF2TX2.js.map +1 -0
  3. package/dist/{build-O5TVNH4E.js → build-X5NVCQKT.js} +9 -9
  4. package/dist/{build-O5TVNH4E.js.map → build-X5NVCQKT.js.map} +1 -1
  5. package/dist/{check-WFBEDHDR.js → check-ZBIH422T.js} +7 -7
  6. package/dist/{check-WFBEDHDR.js.map → check-ZBIH422T.js.map} +1 -1
  7. package/dist/chunk-2IAPIOPS.js +152 -0
  8. package/dist/chunk-2IAPIOPS.js.map +1 -0
  9. package/dist/chunk-2ICNHUG6.js +1820 -0
  10. package/dist/chunk-2ICNHUG6.js.map +1 -0
  11. package/dist/{chunk-5ZOP4SQR.js → chunk-2N72FKLB.js} +12 -7
  12. package/dist/chunk-2N72FKLB.js.map +1 -0
  13. package/dist/chunk-57GHR5LN.js +163 -0
  14. package/dist/chunk-57GHR5LN.js.map +1 -0
  15. package/dist/{chunk-BCE22JSM.js → chunk-7DZGJQ3P.js} +33 -14
  16. package/dist/chunk-7DZGJQ3P.js.map +1 -0
  17. package/dist/{chunk-MXI3PZFT.js → chunk-7S52M2SL.js} +257 -210
  18. package/dist/chunk-7S52M2SL.js.map +1 -0
  19. package/dist/{chunk-QDZA5JSL.js → chunk-AABMKHEU.js} +4 -4
  20. package/dist/{chunk-QDZA5JSL.js.map → chunk-AABMKHEU.js.map} +1 -1
  21. package/dist/{chunk-KLEIVDUV.js → chunk-CEXAQQ5W.js} +150 -11
  22. package/dist/chunk-CEXAQQ5W.js.map +1 -0
  23. package/dist/{chunk-3G43C6OL.js → chunk-GNXCX4WE.js} +46 -3
  24. package/dist/chunk-GNXCX4WE.js.map +1 -0
  25. package/dist/{chunk-JGRMRXXZ.js → chunk-JKLLFVEU.js} +3 -3
  26. package/dist/{chunk-JGRMRXXZ.js.map → chunk-JKLLFVEU.js.map} +1 -1
  27. package/dist/chunk-JXFCSF3K.js +673 -0
  28. package/dist/chunk-JXFCSF3K.js.map +1 -0
  29. package/dist/chunk-PDOBHMUQ.js +54 -0
  30. package/dist/chunk-PDOBHMUQ.js.map +1 -0
  31. package/dist/{chunk-ZVANIULZ.js → chunk-RNTDBX6S.js} +4 -4
  32. package/dist/{chunk-ZVANIULZ.js.map → chunk-RNTDBX6S.js.map} +1 -1
  33. package/dist/chunk-RU6WKEOG.js +7048 -0
  34. package/dist/chunk-RU6WKEOG.js.map +1 -0
  35. package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
  36. package/dist/chunk-U736PVHY.js.map +1 -0
  37. package/dist/{chunk-PVTHHV7X.js → chunk-V3LF7BE7.js} +27 -5
  38. package/dist/chunk-V3LF7BE7.js.map +1 -0
  39. package/dist/{chunk-EP6JHXSR.js → chunk-WAMZWZJB.js} +54 -9
  40. package/dist/chunk-WAMZWZJB.js.map +1 -0
  41. package/dist/{chunk-DTDVSFRY.js → chunk-XQUSGIDG.js} +17 -3
  42. package/dist/chunk-XQUSGIDG.js.map +1 -0
  43. package/dist/cli.js +15 -11
  44. package/dist/cli.js.map +1 -1
  45. package/dist/client/index.d.ts +32 -3
  46. package/dist/client/index.js +205 -12
  47. package/dist/client/index.js.map +1 -1
  48. package/dist/components/index.d.ts +1743 -29
  49. package/dist/components/index.js +7 -3
  50. package/dist/{dev-NZRLOQCL.js → dev-4XEDTELV.js} +24 -13
  51. package/dist/dev-4XEDTELV.js.map +1 -0
  52. package/dist/doc/index.d.ts +198 -2
  53. package/dist/doc/index.js +438 -11
  54. package/dist/doc/index.js.map +1 -1
  55. package/dist/{docs-ZGDJUHJI.js → docs-JVP4RPKT.js} +3 -3
  56. package/dist/{docs-ZGDJUHJI.js.map → docs-JVP4RPKT.js.map} +1 -1
  57. package/dist/{doctor-VFKEMR54.js → doctor-5E2VEZPK.js} +8 -8
  58. package/dist/doctor-5E2VEZPK.js.map +1 -0
  59. package/dist/format-U0cQl069.d.ts +243 -0
  60. package/dist/markdown/index.js +1 -1
  61. package/dist/markdown/index.js.map +1 -1
  62. package/dist/{preview-QDCIVVSR.js → preview-T6CLSQVX.js} +12 -4
  63. package/dist/preview-T6CLSQVX.js.map +1 -0
  64. package/dist/query/index.d.ts +0 -11
  65. package/dist/query/index.js +2 -2
  66. package/dist/{routes-RHP5FVGD.js → routes-3SGAFDMC.js} +6 -6
  67. package/dist/{routes-RHP5FVGD.js.map → routes-3SGAFDMC.js.map} +1 -1
  68. package/dist/{search-RFBELGY7.js → search-5LC4XPB5.js} +3 -3
  69. package/dist/{search-RFBELGY7.js.map → search-5LC4XPB5.js.map} +1 -1
  70. package/dist/slide/index.d.ts +177 -1
  71. package/dist/slide/index.js +917 -18
  72. package/dist/slide/index.js.map +1 -1
  73. package/dist/table/index.js +14 -9
  74. package/dist/table/index.js.map +1 -1
  75. package/dist/ui/index.d.ts +148 -12
  76. package/dist/ui/index.js +1340 -87
  77. package/dist/ui/index.js.map +1 -1
  78. package/dist/{upgrade-GF2P67M6.js → upgrade-JHXZBGQS.js} +7 -7
  79. package/dist/{upgrade-GF2P67M6.js.map → upgrade-JHXZBGQS.js.map} +1 -1
  80. package/dist/vite/index.d.ts +10 -0
  81. package/dist/vite/index.js +4 -4
  82. package/docs/en/changelog.md +24 -0
  83. package/docs/en/cli-reference.md +30 -0
  84. package/docs/en/components.md +40 -17
  85. package/docs/en/doc/doc-action-items.md +49 -0
  86. package/docs/en/doc/doc-callout.md +38 -0
  87. package/docs/en/doc/doc-data-table.md +60 -0
  88. package/docs/en/doc/doc-executive-summary.md +64 -0
  89. package/docs/en/doc/doc-figure.md +56 -0
  90. package/docs/en/doc/doc-key-findings.md +61 -0
  91. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  92. package/docs/en/doc/doc-report-header.md +46 -0
  93. package/docs/en/parts/area-chart.md +99 -0
  94. package/docs/en/parts/bar-chart.md +91 -0
  95. package/docs/en/parts/bar-list.md +50 -0
  96. package/docs/en/parts/category-bar.md +37 -0
  97. package/docs/en/parts/chart-frame.md +39 -0
  98. package/docs/en/parts/data-table.md +22 -0
  99. package/docs/en/parts/delta.md +50 -0
  100. package/docs/en/parts/donut-chart.md +72 -0
  101. package/docs/en/parts/format.md +43 -0
  102. package/docs/en/parts/funnel-steps.md +2 -1
  103. package/docs/en/parts/heatmap.md +53 -0
  104. package/docs/en/parts/kpi-card.md +57 -0
  105. package/docs/en/parts/legend.md +35 -0
  106. package/docs/en/parts/line-chart.md +94 -0
  107. package/docs/en/parts/metric-value.md +3 -2
  108. package/docs/en/parts/page-shell.md +1 -1
  109. package/docs/en/parts/progress-circle.md +33 -0
  110. package/docs/en/parts/sample-data.md +39 -0
  111. package/docs/en/parts/scatter-chart.md +56 -0
  112. package/docs/en/parts/sparkline.md +1 -1
  113. package/docs/en/parts/tracker.md +36 -0
  114. package/docs/en/parts/trend-indicator.md +17 -1
  115. package/docs/en/parts/updated-at.md +30 -0
  116. package/docs/en/parts/waterfall-chart.md +56 -0
  117. package/docs/en/routing.md +4 -2
  118. package/docs/en/slide/slide-chart-insight.md +52 -0
  119. package/docs/en/slide/slide-cover.md +39 -0
  120. package/docs/en/slide/slide-exec-summary.md +47 -0
  121. package/docs/en/slide/slide-kpi-grid.md +55 -0
  122. package/docs/en/slide/slide-kpi-hero.md +58 -0
  123. package/docs/en/slide/slide-next-actions.md +49 -0
  124. package/docs/en/slide/slide-scorecard-table.md +54 -0
  125. package/docs/en/ui/alert-dialog.md +42 -0
  126. package/docs/en/ui/avatar.md +31 -0
  127. package/docs/en/ui/combobox.md +74 -0
  128. package/docs/en/ui/drawer.md +41 -0
  129. package/docs/en/ui/empty.md +1 -1
  130. package/docs/en/ui/error-state.md +4 -3
  131. package/docs/en/ui/field.md +42 -0
  132. package/docs/en/ui/hover-card.md +21 -0
  133. package/docs/en/ui/kbd.md +17 -0
  134. package/docs/en/ui/loading.md +1 -1
  135. package/docs/en/ui/pagination.md +36 -0
  136. package/docs/en/ui/radio-group.md +21 -0
  137. package/docs/en/ui/toast.md +44 -0
  138. package/docs/en/ui/toggle-group.md +4 -3
  139. package/docs/en/ui-and-theming.md +1 -1
  140. package/docs/index.json +1024 -114
  141. package/docs/ja/changelog.md +55 -0
  142. package/docs/ja/cli-reference.md +29 -0
  143. package/docs/ja/components.md +66 -101
  144. package/docs/ja/doc/doc-action-items.md +49 -0
  145. package/docs/ja/doc/doc-callout.md +38 -0
  146. package/docs/ja/doc/doc-data-table.md +60 -0
  147. package/docs/ja/doc/doc-executive-summary.md +64 -0
  148. package/docs/ja/doc/doc-figure.md +56 -0
  149. package/docs/ja/doc/doc-key-findings.md +61 -0
  150. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  151. package/docs/ja/doc/doc-report-header.md +46 -0
  152. package/docs/ja/page-types/csv.md +83 -0
  153. package/docs/ja/page-types/doc.md +83 -0
  154. package/docs/ja/page-types/excel.md +82 -0
  155. package/docs/ja/page-types/slide.md +132 -0
  156. package/docs/ja/page-types.md +47 -0
  157. package/docs/ja/parts/area-chart.md +85 -0
  158. package/docs/ja/parts/bar-chart.md +95 -0
  159. package/docs/ja/parts/bar-list.md +58 -0
  160. package/docs/ja/parts/category-bar.md +36 -0
  161. package/docs/ja/parts/chart-frame.md +36 -0
  162. package/docs/ja/parts/data-table.md +22 -0
  163. package/docs/ja/parts/delta.md +50 -0
  164. package/docs/ja/parts/donut-chart.md +66 -0
  165. package/docs/ja/parts/echart.md +3 -0
  166. package/docs/ja/parts/format.md +44 -0
  167. package/docs/ja/parts/funnel-steps.md +27 -8
  168. package/docs/ja/parts/heatmap.md +45 -0
  169. package/docs/ja/parts/kpi-card.md +55 -0
  170. package/docs/ja/parts/legend.md +36 -0
  171. package/docs/ja/parts/line-chart.md +84 -0
  172. package/docs/ja/parts/metric-value.md +3 -2
  173. package/docs/ja/parts/page-shell.md +1 -1
  174. package/docs/ja/parts/progress-circle.md +34 -0
  175. package/docs/ja/parts/sample-data.md +61 -0
  176. package/docs/ja/parts/scatter-chart.md +69 -0
  177. package/docs/ja/parts/sparkline.md +2 -2
  178. package/docs/ja/parts/tracker.md +32 -0
  179. package/docs/ja/parts/trend-indicator.md +17 -1
  180. package/docs/ja/parts/updated-at.md +27 -0
  181. package/docs/ja/parts/waterfall-chart.md +61 -0
  182. package/docs/ja/routing.md +8 -84
  183. package/docs/ja/slide/slide-chart-insight.md +52 -0
  184. package/docs/ja/slide/slide-cover.md +39 -0
  185. package/docs/ja/slide/slide-exec-summary.md +47 -0
  186. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  187. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  188. package/docs/ja/slide/slide-next-actions.md +49 -0
  189. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  190. package/docs/ja/ui/alert-dialog.md +41 -0
  191. package/docs/ja/ui/avatar.md +31 -0
  192. package/docs/ja/ui/combobox.md +74 -0
  193. package/docs/ja/ui/drawer.md +41 -0
  194. package/docs/ja/ui/empty.md +1 -1
  195. package/docs/ja/ui/error-state.md +4 -3
  196. package/docs/ja/ui/field.md +42 -0
  197. package/docs/ja/ui/hover-card.md +21 -0
  198. package/docs/ja/ui/kbd.md +16 -0
  199. package/docs/ja/ui/loading.md +1 -1
  200. package/docs/ja/ui/pagination.md +36 -0
  201. package/docs/ja/ui/radio-group.md +21 -0
  202. package/docs/ja/ui/toast.md +46 -0
  203. package/docs/ja/ui/toggle-group.md +4 -3
  204. package/docs/ja/ui-and-theming.md +14 -7
  205. package/package.json +43 -29
  206. package/registry/ui/accordion.tsx +76 -0
  207. package/registry/ui/alert-dialog.tsx +189 -0
  208. package/registry/ui/alert.tsx +80 -0
  209. package/registry/ui/app-shell.tsx +287 -0
  210. package/registry/ui/area-chart.tsx +3701 -0
  211. package/registry/ui/attention-list.tsx +303 -0
  212. package/registry/ui/avatar.tsx +110 -0
  213. package/registry/ui/badge.tsx +56 -0
  214. package/registry/ui/bar-chart.tsx +3698 -0
  215. package/registry/ui/bar-list.tsx +3743 -0
  216. package/registry/ui/box-plot-chart.tsx +3906 -0
  217. package/registry/ui/breadcrumb.tsx +128 -0
  218. package/registry/ui/button.tsx +62 -0
  219. package/registry/ui/calendar.tsx +223 -0
  220. package/registry/ui/card.tsx +107 -0
  221. package/registry/ui/category-bar.tsx +1290 -0
  222. package/registry/ui/chart-frame.tsx +1393 -0
  223. package/registry/ui/checkbox.tsx +30 -0
  224. package/registry/ui/collapsible.tsx +23 -0
  225. package/registry/ui/combobox.tsx +310 -0
  226. package/registry/ui/command.tsx +198 -0
  227. package/registry/ui/dashboard-card.tsx +217 -0
  228. package/registry/ui/data-table.tsx +693 -146
  229. package/registry/ui/date-range-picker.tsx +390 -0
  230. package/registry/ui/delta.tsx +188 -0
  231. package/registry/ui/dialog.tsx +161 -0
  232. package/registry/ui/donut-chart.tsx +3751 -0
  233. package/registry/ui/drawer.tsx +229 -0
  234. package/registry/ui/dropdown-menu.tsx +274 -0
  235. package/registry/ui/echart.tsx +1040 -0
  236. package/registry/ui/field.tsx +240 -0
  237. package/registry/ui/filter-bar.tsx +392 -0
  238. package/registry/ui/funnel-steps.tsx +3569 -0
  239. package/registry/ui/heatmap.tsx +1786 -0
  240. package/registry/ui/histogram-chart.tsx +3986 -0
  241. package/registry/ui/hover-card.tsx +52 -0
  242. package/registry/ui/input-group.tsx +160 -0
  243. package/registry/ui/input.tsx +24 -0
  244. package/registry/ui/kbd.tsx +30 -0
  245. package/registry/ui/kpi-card.tsx +699 -0
  246. package/registry/ui/label.tsx +22 -0
  247. package/registry/ui/legend.tsx +3563 -0
  248. package/registry/ui/line-chart.tsx +3699 -0
  249. package/registry/ui/metric-value.tsx +62 -0
  250. package/registry/ui/multi-select.tsx +232 -0
  251. package/registry/ui/page-shell.tsx +282 -0
  252. package/registry/ui/pagination.tsx +140 -0
  253. package/registry/ui/paired-chart.tsx +3827 -0
  254. package/registry/ui/placeholder.tsx +36 -0
  255. package/registry/ui/popover.tsx +92 -0
  256. package/registry/ui/progress-circle.tsx +867 -0
  257. package/registry/ui/progress.tsx +85 -0
  258. package/registry/ui/radio-group.tsx +39 -0
  259. package/registry/ui/sample-data.tsx +86 -0
  260. package/registry/ui/scatter-chart.tsx +4212 -0
  261. package/registry/ui/scroll-area.tsx +56 -0
  262. package/registry/ui/searchable-select.tsx +214 -0
  263. package/registry/ui/section-header.tsx +43 -0
  264. package/registry/ui/segmented-control.tsx +76 -0
  265. package/registry/ui/select.tsx +255 -0
  266. package/registry/ui/separator.tsx +27 -0
  267. package/registry/ui/sheet.tsx +139 -0
  268. package/registry/ui/sidebar.tsx +725 -0
  269. package/registry/ui/skeleton.tsx +17 -0
  270. package/registry/ui/slider.tsx +56 -0
  271. package/registry/ui/sparkline.tsx +230 -0
  272. package/registry/ui/spinner.tsx +14 -0
  273. package/registry/ui/states.tsx +90 -0
  274. package/registry/ui/status-badge.tsx +121 -0
  275. package/registry/ui/switch.tsx +34 -0
  276. package/registry/ui/table.tsx +118 -0
  277. package/registry/ui/tabs.tsx +84 -0
  278. package/registry/ui/textarea.tsx +22 -0
  279. package/registry/ui/toast.tsx +250 -0
  280. package/registry/ui/toggle-group.tsx +91 -0
  281. package/registry/ui/toggle.tsx +47 -0
  282. package/registry/ui/tooltip.tsx +72 -0
  283. package/registry/ui/tracker.tsx +849 -0
  284. package/registry/ui/trend-indicator.tsx +74 -0
  285. package/registry/ui/updated-at.tsx +122 -0
  286. package/registry/ui/waterfall-chart.tsx +4248 -0
  287. package/skills/vantage-add-feature/SKILL.md +9 -7
  288. package/skills/vantage-design/SKILL.md +36 -24
  289. package/skills/vantage-design/references/extract.md +16 -14
  290. package/skills/vantage-design/references/format.md +6 -5
  291. package/skills/vantage-design/references/presets.md +60 -110
  292. package/skills/vantage-pitfalls/SKILL.md +5 -1
  293. package/skills/vantage-slide/SKILL.md +71 -36
  294. package/templates/AGENTS.md +24 -3
  295. package/templates/agents/api.md +29 -0
  296. package/templates/agents/csv.md +2 -1
  297. package/templates/agents/doc.md +51 -3
  298. package/templates/agents/page.md +54 -9
  299. package/templates/agents/slide.md +68 -3
  300. package/templates/agents/xlsx.md +2 -1
  301. package/theme.css +284 -128
  302. package/dist/add-EISGSZAH.js +0 -6
  303. package/dist/add-EISGSZAH.js.map +0 -1
  304. package/dist/chunk-3G43C6OL.js.map +0 -1
  305. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  306. package/dist/chunk-A2UUGASH.js.map +0 -1
  307. package/dist/chunk-BCE22JSM.js.map +0 -1
  308. package/dist/chunk-DTDVSFRY.js.map +0 -1
  309. package/dist/chunk-EP6JHXSR.js.map +0 -1
  310. package/dist/chunk-KLEIVDUV.js.map +0 -1
  311. package/dist/chunk-MXI3PZFT.js.map +0 -1
  312. package/dist/chunk-PLST5Q7T.js +0 -2221
  313. package/dist/chunk-PLST5Q7T.js.map +0 -1
  314. package/dist/chunk-PVTHHV7X.js.map +0 -1
  315. package/dist/chunk-T3FLAGI6.js +0 -316
  316. package/dist/chunk-T3FLAGI6.js.map +0 -1
  317. package/dist/dev-NZRLOQCL.js.map +0 -1
  318. package/dist/doctor-VFKEMR54.js.map +0 -1
  319. package/dist/preview-QDCIVVSR.js.map +0 -1
@@ -1,5 +1,9 @@
1
1
  import { useSearchState } from '../chunk-ZO62C6T4.js';
2
2
  import '../chunk-6S4BAIGV.js';
3
+ import { EChart } from '../chunk-JXFCSF3K.js';
4
+ import { formatValue, EMPTY_VALUE } from '../chunk-57GHR5LN.js';
5
+ import '../chunk-PDOBHMUQ.js';
6
+ import '../chunk-U736PVHY.js';
3
7
  import { createContext, useRef, useState, useLayoutEffect, useContext, createElement, Children, isValidElement, useCallback, cloneElement, useMemo, useEffect } from 'react';
4
8
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
5
9
  import { createRoot } from 'react-dom/client';
@@ -58,6 +62,11 @@ function SlideCanvas({ children, scale, themeVars }) {
58
62
  transformOrigin: "top left",
59
63
  fontFamily: "var(--slide-font-body)",
60
64
  fontSize: "var(--slide-size-body)",
65
+ // Phrase-aware Japanese line breaks for every block. Browsers without
66
+ // `auto-phrase` drop the declaration and keep the strict line-break rules.
67
+ wordBreak: "auto-phrase",
68
+ lineBreak: "strict",
69
+ overflowWrap: "break-word",
61
70
  ...themeVars
62
71
  },
63
72
  children
@@ -380,6 +389,41 @@ function isForwardKey(e) {
380
389
  function isBackwardKey(e) {
381
390
  return e.key === "ArrowLeft" || e.key === "ArrowUp" || e.key === "PageUp";
382
391
  }
392
+
393
+ // src/slide/messages.ts
394
+ var MESSAGES_JA = {
395
+ previousSlide: "\u524D\u306E\u30B9\u30E9\u30A4\u30C9",
396
+ nextSlide: "\u6B21\u306E\u30B9\u30E9\u30A4\u30C9",
397
+ slideList: "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7",
398
+ closeSlideList: "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7\u3092\u9589\u3058\u308B (L)",
399
+ openSlideList: "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7\u3092\u958B\u304F (L)",
400
+ fullscreen: "\u5168\u753B\u9762\u8868\u793A (F)",
401
+ exitFullscreen: "\u5168\u753B\u9762\u8868\u793A\u3092\u7D42\u4E86 (F)",
402
+ exportToPowerPoint: "PowerPoint \u3068\u3057\u3066\u66F8\u304D\u51FA\u3059",
403
+ slideNumber: (n) => `\u30B9\u30E9\u30A4\u30C9 ${n}`
404
+ };
405
+ var MESSAGES_EN = {
406
+ previousSlide: "Previous slide",
407
+ nextSlide: "Next slide",
408
+ slideList: "Slide list",
409
+ closeSlideList: "Close slide list (L)",
410
+ openSlideList: "Open slide list (L)",
411
+ fullscreen: "Fullscreen (F)",
412
+ exitFullscreen: "Exit fullscreen (F)",
413
+ exportToPowerPoint: "Export to PowerPoint",
414
+ slideNumber: (n) => `Slide ${n}`
415
+ };
416
+ function detectLanguage() {
417
+ if (typeof document === "undefined") return "ja";
418
+ const lang = document.documentElement.lang;
419
+ if (!lang) return "ja";
420
+ if (lang.toLowerCase().startsWith("en")) return "en";
421
+ return "ja";
422
+ }
423
+ function getSlideMessages() {
424
+ const lang = detectLanguage();
425
+ return lang === "en" ? MESSAGES_EN : MESSAGES_JA;
426
+ }
383
427
  var THUMB_WIDTH = 176;
384
428
  var THUMB_HEIGHT = Math.round(THUMB_WIDTH * CANVAS_HEIGHT / CANVAS_WIDTH);
385
429
  var NUMBER_COLUMN = 20;
@@ -400,6 +444,7 @@ var ITEM_BUTTON = {
400
444
  };
401
445
  function SlideRail({ slides, index, onSelect, themeVars }) {
402
446
  const listRef = useRef(null);
447
+ const messages = useMemo(() => getSlideMessages(), []);
403
448
  useEffect(() => {
404
449
  const item = listRef.current?.children[index];
405
450
  item?.scrollIntoView({ block: "nearest" });
@@ -408,7 +453,7 @@ function SlideRail({ slides, index, onSelect, themeVars }) {
408
453
  "div",
409
454
  {
410
455
  "data-slide-chrome": "",
411
- "aria-label": "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7",
456
+ "aria-label": messages.slideList,
412
457
  style: {
413
458
  flex: "0 0 auto",
414
459
  width: RAIL_WIDTH,
@@ -418,7 +463,7 @@ function SlideRail({ slides, index, onSelect, themeVars }) {
418
463
  background: "color-mix(in oklab, var(--slide-fg) 6%, var(--slide-bg))",
419
464
  color: "var(--slide-fg)",
420
465
  borderRight: "1px solid color-mix(in oklab, var(--slide-fg) 14%, transparent)",
421
- fontFamily: 'system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif',
466
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif',
422
467
  userSelect: "none",
423
468
  // An embedded deck does not put the theme on its root, so the rail
424
469
  // carries it too rather than reading whatever cascaded in.
@@ -452,7 +497,7 @@ function SlideRail({ slides, index, onSelect, themeVars }) {
452
497
  style: ITEM_BUTTON,
453
498
  onClick: () => onSelect(i),
454
499
  "aria-current": active ? "true" : void 0,
455
- "aria-label": `\u30B9\u30E9\u30A4\u30C9 ${i + 1}`,
500
+ "aria-label": messages.slideNumber(i + 1),
456
501
  children: [
457
502
  /* @__PURE__ */ jsx(
458
503
  "span",
@@ -523,6 +568,7 @@ function SlideToolbar({
523
568
  onPrev,
524
569
  onNext,
525
570
  onFullscreen,
571
+ canFullscreen,
526
572
  onExport,
527
573
  exportProgress,
528
574
  railOpen,
@@ -531,6 +577,7 @@ function SlideToolbar({
531
577
  }) {
532
578
  const [hovered, setHovered] = useState(false);
533
579
  const busy = exportProgress !== null && exportProgress.phase !== "done";
580
+ const messages = useMemo(() => getSlideMessages(), []);
534
581
  return /* @__PURE__ */ jsxs(
535
582
  "div",
536
583
  {
@@ -552,40 +599,40 @@ function SlideToolbar({
552
599
  backdropFilter: "blur(8px)",
553
600
  opacity: hovered || busy ? 1 : 0.25,
554
601
  transition: "opacity 150ms ease",
555
- fontFamily: 'system-ui, -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif',
602
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif',
556
603
  userSelect: "none"
557
604
  },
558
605
  children: [
559
- /* @__PURE__ */ jsx("button", { type: "button", style: BUTTON, onClick: onPrev, "aria-label": "\u524D\u306E\u30B9\u30E9\u30A4\u30C9", children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16, "aria-hidden": "true" }) }),
606
+ /* @__PURE__ */ jsx("button", { type: "button", style: BUTTON, onClick: onPrev, "aria-label": messages.previousSlide, children: /* @__PURE__ */ jsx(ChevronLeftIcon, { size: 16, "aria-hidden": "true" }) }),
560
607
  /* @__PURE__ */ jsxs("span", { style: { padding: "0 8px", fontSize: 13, fontVariantNumeric: "tabular-nums" }, children: [
561
608
  current,
562
609
  " / ",
563
610
  total
564
611
  ] }),
565
- /* @__PURE__ */ jsx("button", { type: "button", style: BUTTON, onClick: onNext, "aria-label": "\u6B21\u306E\u30B9\u30E9\u30A4\u30C9", children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16, "aria-hidden": "true" }) }),
612
+ /* @__PURE__ */ jsx("button", { type: "button", style: BUTTON, onClick: onNext, "aria-label": messages.nextSlide, children: /* @__PURE__ */ jsx(ChevronRightIcon, { size: 16, "aria-hidden": "true" }) }),
566
613
  isFullscreen ? null : /* @__PURE__ */ jsx(
567
614
  "button",
568
615
  {
569
616
  type: "button",
570
617
  style: BUTTON,
571
618
  onClick: onToggleRail,
572
- "aria-label": railOpen ? "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7\u3092\u9589\u3058\u308B (L)" : "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7\u3092\u958B\u304F (L)",
573
- title: railOpen ? "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7\u3092\u9589\u3058\u308B (L)" : "\u30B9\u30E9\u30A4\u30C9\u4E00\u89A7\u3092\u958B\u304F (L)",
619
+ "aria-label": railOpen ? messages.closeSlideList : messages.openSlideList,
620
+ title: railOpen ? messages.closeSlideList : messages.openSlideList,
574
621
  "aria-pressed": railOpen,
575
622
  children: railOpen ? /* @__PURE__ */ jsx(PanelLeftCloseIcon, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(PanelLeftOpenIcon, { size: 16, "aria-hidden": "true" })
576
623
  }
577
624
  ),
578
- /* @__PURE__ */ jsx(
625
+ canFullscreen ? /* @__PURE__ */ jsx(
579
626
  "button",
580
627
  {
581
628
  type: "button",
582
629
  style: BUTTON,
583
630
  onClick: onFullscreen,
584
- "aria-label": isFullscreen ? "\u5168\u753B\u9762\u8868\u793A\u3092\u7D42\u4E86 (F)" : "\u5168\u753B\u9762\u8868\u793A (F)",
585
- title: isFullscreen ? "\u5168\u753B\u9762\u8868\u793A\u3092\u7D42\u4E86 (F)" : "\u5168\u753B\u9762\u8868\u793A (F)",
631
+ "aria-label": isFullscreen ? messages.exitFullscreen : messages.fullscreen,
632
+ title: isFullscreen ? messages.exitFullscreen : messages.fullscreen,
586
633
  children: isFullscreen ? /* @__PURE__ */ jsx(MinimizeIcon, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(MaximizeIcon, { size: 16, "aria-hidden": "true" })
587
634
  }
588
- ),
635
+ ) : null,
589
636
  /* @__PURE__ */ jsxs(
590
637
  "button",
591
638
  {
@@ -593,8 +640,8 @@ function SlideToolbar({
593
640
  style: { ...BUTTON, opacity: busy ? 0.6 : 1, cursor: busy ? "progress" : "pointer" },
594
641
  onClick: onExport,
595
642
  disabled: busy,
596
- "aria-label": "PowerPoint \u3068\u3057\u3066\u66F8\u304D\u51FA\u3059",
597
- title: "PowerPoint \u3068\u3057\u3066\u66F8\u304D\u51FA\u3059",
643
+ "aria-label": messages.exportToPowerPoint,
644
+ title: messages.exportToPowerPoint,
598
645
  children: [
599
646
  /* @__PURE__ */ jsx(DownloadIcon, { size: 16, "aria-hidden": "true" }),
600
647
  busy ? /* @__PURE__ */ jsxs("span", { children: [
@@ -1376,6 +1423,10 @@ function collectSlides(children) {
1376
1423
  }
1377
1424
  return { slides, transitions };
1378
1425
  }
1426
+ function fullscreenEnabled() {
1427
+ if (typeof document === "undefined") return false;
1428
+ return document.fullscreenEnabled === true;
1429
+ }
1379
1430
  function defaultExportName() {
1380
1431
  if (typeof window === "undefined") return "slides";
1381
1432
  const parts = window.location.pathname.split("/").filter(Boolean);
@@ -1396,6 +1447,7 @@ function SlideDeck({
1396
1447
  const index = Math.min(Math.max(Math.floor(page) - 1, 0), Math.max(total - 1, 0));
1397
1448
  const [railOpen, setRailOpen] = useSearchState("rail", rail);
1398
1449
  const [isFullscreen, setIsFullscreen] = useState(false);
1450
+ const [canFullscreen] = useState(fullscreenEnabled);
1399
1451
  const [entryDirection, setEntryDirection] = useState("jump");
1400
1452
  const [exporting, setExporting] = useState(null);
1401
1453
  const stepControllerRef = useRef(null);
@@ -1421,9 +1473,11 @@ function SlideDeck({
1421
1473
  const toggleRail = useCallback(() => setRailOpen((open) => !open), [setRailOpen]);
1422
1474
  const toggleFullscreen = useCallback(() => {
1423
1475
  const el = viewportRef.current;
1424
- if (!el) return;
1425
- if (document.fullscreenElement) void document.exitFullscreen();
1426
- else void el.requestFullscreen?.();
1476
+ if (!el || !fullscreenEnabled()) return;
1477
+ if (document.fullscreenElement) document.exitFullscreen().catch(() => {
1478
+ });
1479
+ else el.requestFullscreen?.().catch(() => {
1480
+ });
1427
1481
  }, []);
1428
1482
  useEffect(() => {
1429
1483
  const onChange = () => setIsFullscreen(document.fullscreenElement === viewportRef.current);
@@ -1541,6 +1595,7 @@ function SlideDeck({
1541
1595
  onPrev: goPrev,
1542
1596
  onNext: goNext,
1543
1597
  onFullscreen: toggleFullscreen,
1598
+ canFullscreen,
1544
1599
  onExport,
1545
1600
  exportProgress: exporting,
1546
1601
  railOpen,
@@ -1565,7 +1620,851 @@ function MorphElement({ id, children, className, style }) {
1565
1620
  }
1566
1621
  return /* @__PURE__ */ jsx("div", { className, style, "data-slide-morph": id, children });
1567
1622
  }
1623
+ var SAFE_X = 160;
1624
+ var SAFE_Y = 120;
1625
+ var COLUMNS = 12;
1626
+ var GUTTER2 = 32;
1627
+ var COLUMN_WIDTH = 104;
1628
+ var SLIDE_SPEC = {
1629
+ /** Keep content inside this margin; backgrounds may bleed past it. */
1630
+ safeArea: { x: SAFE_X, y: SAFE_Y },
1631
+ /** Spans the content width: 12 columns + 11 gutters = 1600. */
1632
+ grid: { columns: COLUMNS, gutter: GUTTER2, columnWidth: COLUMN_WIDTH },
1633
+ /** Font sizes in canvas px, strictly increasing. */
1634
+ fontSize: { caption: 24, page: 64, section: 88},
1635
+ lineHeight: { heading: 1.2, body: 1.6 },
1636
+ /** Gaps between elements, in canvas px. */
1637
+ space: { sm: 32, md: 48, lg: 64 }
1638
+ };
1639
+ var MAX_INSIGHTS = 3;
1640
+ var MAX_INSIGHT_CHARS = 40;
1641
+ var LINE_TYPES = ["solid", "dashed", "dotted"];
1642
+ var SYMBOLS = ["circle", "rect", "triangle", "diamond"];
1643
+ function SlideHeading({ title }) {
1644
+ return /* @__PURE__ */ jsx(
1645
+ "h2",
1646
+ {
1647
+ style: {
1648
+ gridColumn: "1 / -1",
1649
+ margin: 0,
1650
+ fontFamily: "var(--slide-font-display)",
1651
+ fontSize: SLIDE_SPEC.fontSize.page,
1652
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
1653
+ fontWeight: 700,
1654
+ display: "-webkit-box",
1655
+ WebkitBoxOrient: "vertical",
1656
+ WebkitLineClamp: 2,
1657
+ overflow: "hidden"
1658
+ },
1659
+ children: title
1660
+ }
1661
+ );
1662
+ }
1663
+ function SlideSourceLine({ asOf, source }) {
1664
+ return /* @__PURE__ */ jsx(
1665
+ "p",
1666
+ {
1667
+ style: {
1668
+ gridColumn: "1 / -1",
1669
+ margin: 0,
1670
+ fontSize: SLIDE_SPEC.fontSize.caption,
1671
+ lineHeight: SLIDE_SPEC.lineHeight.body,
1672
+ color: "var(--slide-muted)"
1673
+ },
1674
+ children: [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ")
1675
+ }
1676
+ );
1677
+ }
1678
+ function SlideChartInsight({ title, chart, insights, chartSide = "left", asOf, source }) {
1679
+ const hasSource = Boolean(asOf || source);
1680
+ if (insights.some((t) => t.length > MAX_INSIGHT_CHARS)) console.warn(`SlideChartInsight: an insight is over ${MAX_INSIGHT_CHARS} characters; the column is narrow. Shorten it.`);
1681
+ if (insights.length > MAX_INSIGHTS) console.warn(`SlideChartInsight: ${insights.length} insights; ${MAX_INSIGHTS} fit beside the chart. Split the slide.`);
1682
+ const option = useMemo(
1683
+ () => ({
1684
+ animation: false,
1685
+ textStyle: { fontSize: SLIDE_SPEC.fontSize.caption },
1686
+ grid: { left: 0, right: SLIDE_SPEC.space.sm, top: chart.series.length > 1 ? SLIDE_SPEC.space.lg : SLIDE_SPEC.space.sm, bottom: 0, containLabel: true },
1687
+ legend: chart.series.length > 1 ? { top: 0, left: 0, textStyle: { fontSize: SLIDE_SPEC.fontSize.caption } } : { show: false },
1688
+ // The first x label and the lowest y label meet at the corner: the margin keeps the x labels clear of the axis, and
1689
+ // `hideOverlap` drops whichever still collides.
1690
+ xAxis: {
1691
+ type: "category",
1692
+ data: chart.categories,
1693
+ // Half a category of room on both sides keeps the first point off the y-axis labels (a line from the axis touches them).
1694
+ boundaryGap: true,
1695
+ axisLabel: { fontSize: SLIDE_SPEC.fontSize.caption, margin: SLIDE_SPEC.space.sm, hideOverlap: true }
1696
+ },
1697
+ yAxis: {
1698
+ type: "value",
1699
+ // A line from 0 hugs the top when the values sit in a narrow band; bars must keep their zero baseline.
1700
+ scale: chart.type !== "bar",
1701
+ axisLabel: { fontSize: SLIDE_SPEC.fontSize.caption, hideOverlap: true, formatter: (v) => formatValue(v, "compact") }
1702
+ },
1703
+ ...chart.type === "bar" && chart.series.length > 1 ? { aria: { enabled: true, decal: { show: true } } } : {},
1704
+ series: chart.series.map((s, i) => ({
1705
+ name: s.name,
1706
+ type: chart.type === "bar" ? "bar" : "line",
1707
+ data: s.data,
1708
+ ...chart.type === "bar" ? {} : { symbol: SYMBOLS[i % SYMBOLS.length], symbolSize: SLIDE_SPEC.space.sm / 2, lineStyle: { width: 6, type: LINE_TYPES[i % LINE_TYPES.length] } },
1709
+ ...chart.type === "area" ? { areaStyle: { opacity: 0.16 } } : {}
1710
+ }))
1711
+ }),
1712
+ [chart]
1713
+ );
1714
+ const chartFirst = chartSide === "left";
1715
+ return /* @__PURE__ */ jsxs(
1716
+ "section",
1717
+ {
1718
+ "data-slot": "slide-chart-insight",
1719
+ style: {
1720
+ width: "100%",
1721
+ height: "100%",
1722
+ boxSizing: "border-box",
1723
+ display: "grid",
1724
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
1725
+ gridTemplateRows: hasSource ? "auto 1fr auto" : "auto 1fr",
1726
+ columnGap: SLIDE_SPEC.grid.gutter,
1727
+ rowGap: SLIDE_SPEC.space.lg,
1728
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
1729
+ color: "var(--slide-fg)",
1730
+ fontFamily: "var(--slide-font-body)"
1731
+ },
1732
+ children: [
1733
+ /* @__PURE__ */ jsx(SlideHeading, { title }),
1734
+ /* @__PURE__ */ jsx("div", { "data-waitfor": "canvas", style: { gridColumn: chartFirst ? "1 / span 7" : "6 / span 7", gridRow: 2, minHeight: 0, height: "100%" }, children: /* @__PURE__ */ jsx(EChart, { option, height: "100%", ariaLabel: title }) }),
1735
+ /* @__PURE__ */ jsx(
1736
+ "ul",
1737
+ {
1738
+ style: {
1739
+ gridColumn: chartFirst ? "8 / span 5" : "1 / span 5",
1740
+ gridRow: 2,
1741
+ margin: 0,
1742
+ padding: 0,
1743
+ listStyle: "none",
1744
+ minHeight: 0,
1745
+ display: "flex",
1746
+ flexDirection: "column",
1747
+ justifyContent: "center",
1748
+ gap: SLIDE_SPEC.space.md
1749
+ },
1750
+ children: insights.map((text, i) => /* @__PURE__ */ jsx(
1751
+ "li",
1752
+ {
1753
+ style: {
1754
+ paddingLeft: SLIDE_SPEC.space.sm,
1755
+ borderLeft: "4px solid var(--slide-accent)",
1756
+ fontSize: "var(--slide-size-body)",
1757
+ lineHeight: SLIDE_SPEC.lineHeight.body
1758
+ },
1759
+ children: text
1760
+ },
1761
+ i
1762
+ ))
1763
+ }
1764
+ ),
1765
+ hasSource && /* @__PURE__ */ jsx(SlideSourceLine, { asOf, source })
1766
+ ]
1767
+ }
1768
+ );
1769
+ }
1770
+ function SlideCover({ title, subtitle, period, author, asOf, source }) {
1771
+ const meta = [
1772
+ period,
1773
+ author,
1774
+ [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ") || void 0
1775
+ ].filter(Boolean);
1776
+ return /* @__PURE__ */ jsxs(
1777
+ "section",
1778
+ {
1779
+ "data-slot": "slide-cover",
1780
+ style: {
1781
+ width: "100%",
1782
+ height: "100%",
1783
+ boxSizing: "border-box",
1784
+ display: "grid",
1785
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
1786
+ gridTemplateRows: "1fr auto",
1787
+ columnGap: SLIDE_SPEC.grid.gutter,
1788
+ rowGap: SLIDE_SPEC.space.lg,
1789
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
1790
+ color: "var(--slide-fg)",
1791
+ fontFamily: "var(--slide-font-body)"
1792
+ },
1793
+ children: [
1794
+ /* @__PURE__ */ jsxs(
1795
+ "div",
1796
+ {
1797
+ style: {
1798
+ gridColumn: "1 / span 8",
1799
+ display: "flex",
1800
+ flexDirection: "column",
1801
+ justifyContent: "center",
1802
+ gap: SLIDE_SPEC.space.md,
1803
+ minHeight: 0
1804
+ },
1805
+ children: [
1806
+ /* @__PURE__ */ jsx("div", { style: { width: SLIDE_SPEC.grid.columnWidth, height: 8, background: "var(--slide-accent)" } }),
1807
+ /* @__PURE__ */ jsx(
1808
+ "h1",
1809
+ {
1810
+ style: {
1811
+ margin: 0,
1812
+ fontFamily: "var(--slide-font-display)",
1813
+ fontSize: SLIDE_SPEC.fontSize.section,
1814
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
1815
+ fontWeight: 700,
1816
+ textWrap: "balance"
1817
+ },
1818
+ children: title
1819
+ }
1820
+ ),
1821
+ subtitle && /* @__PURE__ */ jsx("p", { style: { margin: 0, fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.body, color: "var(--slide-muted)" }, children: subtitle })
1822
+ ]
1823
+ }
1824
+ ),
1825
+ meta.length > 0 && /* @__PURE__ */ jsx(
1826
+ "p",
1827
+ {
1828
+ style: {
1829
+ gridColumn: "1 / -1",
1830
+ margin: 0,
1831
+ fontSize: SLIDE_SPEC.fontSize.caption,
1832
+ lineHeight: SLIDE_SPEC.lineHeight.body,
1833
+ color: "var(--slide-muted)"
1834
+ },
1835
+ children: meta.join("\u3000|\u3000")
1836
+ }
1837
+ )
1838
+ ]
1839
+ }
1840
+ );
1841
+ }
1842
+ var MAX_POINTS = 5;
1843
+ function SlideHeading2({ title }) {
1844
+ return /* @__PURE__ */ jsx(
1845
+ "h2",
1846
+ {
1847
+ style: {
1848
+ gridColumn: "1 / -1",
1849
+ margin: 0,
1850
+ fontFamily: "var(--slide-font-display)",
1851
+ fontSize: SLIDE_SPEC.fontSize.page,
1852
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
1853
+ fontWeight: 700,
1854
+ display: "-webkit-box",
1855
+ WebkitBoxOrient: "vertical",
1856
+ WebkitLineClamp: 2,
1857
+ overflow: "hidden"
1858
+ },
1859
+ children: title
1860
+ }
1861
+ );
1862
+ }
1863
+ function SlideSourceLine2({ asOf, source }) {
1864
+ return /* @__PURE__ */ jsx(
1865
+ "p",
1866
+ {
1867
+ style: {
1868
+ gridColumn: "1 / -1",
1869
+ margin: 0,
1870
+ fontSize: SLIDE_SPEC.fontSize.caption,
1871
+ lineHeight: SLIDE_SPEC.lineHeight.body,
1872
+ color: "var(--slide-muted)"
1873
+ },
1874
+ children: [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ")
1875
+ }
1876
+ );
1877
+ }
1878
+ function SlideExecSummary({ title, points, layout = "rows", asOf, source }) {
1879
+ const hasSource = Boolean(asOf || source);
1880
+ if (points.length > MAX_POINTS) console.warn(`SlideExecSummary: ${points.length} points; ${MAX_POINTS} fit the canvas. Split the slide.`);
1881
+ const number = (i) => String(i + 1).padStart(2, "0");
1882
+ return /* @__PURE__ */ jsxs(
1883
+ "section",
1884
+ {
1885
+ "data-slot": "slide-exec-summary",
1886
+ style: {
1887
+ width: "100%",
1888
+ height: "100%",
1889
+ boxSizing: "border-box",
1890
+ display: "grid",
1891
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
1892
+ gridTemplateRows: hasSource ? "auto 1fr auto" : "auto 1fr",
1893
+ columnGap: SLIDE_SPEC.grid.gutter,
1894
+ rowGap: SLIDE_SPEC.space.lg,
1895
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
1896
+ color: "var(--slide-fg)",
1897
+ fontFamily: "var(--slide-font-body)"
1898
+ },
1899
+ children: [
1900
+ /* @__PURE__ */ jsx(SlideHeading2, { title }),
1901
+ layout === "columns" ? /* @__PURE__ */ jsx(
1902
+ "ol",
1903
+ {
1904
+ style: {
1905
+ gridColumn: "1 / -1",
1906
+ margin: 0,
1907
+ padding: 0,
1908
+ listStyle: "none",
1909
+ minHeight: 0,
1910
+ display: "grid",
1911
+ gridTemplateColumns: `repeat(${Math.max(points.length, 1)}, 1fr)`,
1912
+ columnGap: SLIDE_SPEC.grid.gutter
1913
+ },
1914
+ children: points.map((p, i) => /* @__PURE__ */ jsxs(
1915
+ "li",
1916
+ {
1917
+ style: {
1918
+ display: "flex",
1919
+ flexDirection: "column",
1920
+ gap: SLIDE_SPEC.space.sm,
1921
+ paddingTop: SLIDE_SPEC.space.md,
1922
+ borderTop: "4px solid var(--slide-accent)"
1923
+ },
1924
+ children: [
1925
+ /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.page, lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700, color: "var(--slide-accent)" }, children: number(i) }),
1926
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700 }, children: p.headline }),
1927
+ p.detail && /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.caption, lineHeight: SLIDE_SPEC.lineHeight.body, color: "var(--slide-muted)" }, children: p.detail })
1928
+ ]
1929
+ },
1930
+ i
1931
+ ))
1932
+ }
1933
+ ) : /* @__PURE__ */ jsx(
1934
+ "ol",
1935
+ {
1936
+ style: {
1937
+ gridColumn: "1 / -1",
1938
+ margin: 0,
1939
+ padding: 0,
1940
+ listStyle: "none",
1941
+ minHeight: 0,
1942
+ display: "flex",
1943
+ flexDirection: "column",
1944
+ justifyContent: "center",
1945
+ gap: SLIDE_SPEC.space.sm
1946
+ },
1947
+ children: points.map((p, i) => /* @__PURE__ */ jsxs(
1948
+ "li",
1949
+ {
1950
+ style: {
1951
+ display: "grid",
1952
+ gridTemplateColumns: `${SLIDE_SPEC.grid.columnWidth}px 1fr`,
1953
+ columnGap: SLIDE_SPEC.space.md,
1954
+ alignItems: "baseline"
1955
+ },
1956
+ children: [
1957
+ /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.page, lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700, color: "var(--slide-accent)" }, children: number(i) }),
1958
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
1959
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700 }, children: p.headline }),
1960
+ p.detail && /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.caption, lineHeight: SLIDE_SPEC.lineHeight.body, color: "var(--slide-muted)" }, children: p.detail })
1961
+ ] })
1962
+ ]
1963
+ },
1964
+ i
1965
+ ))
1966
+ }
1967
+ ),
1968
+ hasSource && /* @__PURE__ */ jsx(SlideSourceLine2, { asOf, source })
1969
+ ]
1970
+ }
1971
+ );
1972
+ }
1973
+ var MAX_ITEMS = 4;
1974
+ function SlideHeading3({ title }) {
1975
+ return /* @__PURE__ */ jsx(
1976
+ "h2",
1977
+ {
1978
+ style: {
1979
+ gridColumn: "1 / -1",
1980
+ margin: 0,
1981
+ fontFamily: "var(--slide-font-display)",
1982
+ fontSize: SLIDE_SPEC.fontSize.page,
1983
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
1984
+ fontWeight: 700,
1985
+ display: "-webkit-box",
1986
+ WebkitBoxOrient: "vertical",
1987
+ WebkitLineClamp: 2,
1988
+ overflow: "hidden"
1989
+ },
1990
+ children: title
1991
+ }
1992
+ );
1993
+ }
1994
+ function SlideSourceLine3({ asOf, source }) {
1995
+ return /* @__PURE__ */ jsx(
1996
+ "p",
1997
+ {
1998
+ style: {
1999
+ gridColumn: "1 / -1",
2000
+ margin: 0,
2001
+ fontSize: SLIDE_SPEC.fontSize.caption,
2002
+ lineHeight: SLIDE_SPEC.lineHeight.body,
2003
+ color: "var(--slide-muted)"
2004
+ },
2005
+ children: [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ")
2006
+ }
2007
+ );
2008
+ }
2009
+ var ARROW = { up: "\u25B2", down: "\u25BC", flat: "\u25AC" };
2010
+ var WORD = { up: "\u5897", down: "\u6E1B", flat: "\u6A2A\u3070\u3044" };
2011
+ function deltaView(delta, betterWhen) {
2012
+ const direction = delta.value > 0 ? "up" : delta.value < 0 ? "down" : "flat";
2013
+ const color = direction === "flat" ? "var(--slide-muted)" : direction === betterWhen ? "var(--positive)" : "var(--negative)";
2014
+ const amount = formatValue(delta.value, delta.format, void 0, { signDisplay: "exceptZero" });
2015
+ return { color, text: `${ARROW[direction]} ${WORD[direction]} ${amount}` };
2016
+ }
2017
+ function targetText(item) {
2018
+ if (item.target === void 0) return void 0;
2019
+ const { value, target, betterWhen = "up" } = item;
2020
+ const rate = value === null ? void 0 : betterWhen === "down" ? target / value : value / target;
2021
+ const shown = `\u76EE\u6A19 ${formatValue(target, item.format)}`;
2022
+ return rate === void 0 || !Number.isFinite(rate) ? shown : `${shown}(\u9054\u6210\u7387 ${formatValue(rate, { type: "percent", digits: 0 })})`;
2023
+ }
2024
+ function SlideKpiGrid({ title, items, asOf, source }) {
2025
+ const hasSource = Boolean(asOf || source);
2026
+ if (items.length > MAX_ITEMS) console.warn(`SlideKpiGrid: ${items.length} items; ${MAX_ITEMS} fit the canvas. Split the slide.`);
2027
+ return /* @__PURE__ */ jsxs(
2028
+ "section",
2029
+ {
2030
+ "data-slot": "slide-kpi-grid",
2031
+ style: {
2032
+ width: "100%",
2033
+ height: "100%",
2034
+ boxSizing: "border-box",
2035
+ display: "grid",
2036
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
2037
+ gridTemplateRows: hasSource ? "auto 1fr auto" : "auto 1fr",
2038
+ columnGap: SLIDE_SPEC.grid.gutter,
2039
+ rowGap: SLIDE_SPEC.space.lg,
2040
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
2041
+ color: "var(--slide-fg)",
2042
+ fontFamily: "var(--slide-font-body)"
2043
+ },
2044
+ children: [
2045
+ /* @__PURE__ */ jsx(SlideHeading3, { title }),
2046
+ /* @__PURE__ */ jsx(
2047
+ "div",
2048
+ {
2049
+ style: {
2050
+ gridColumn: "1 / -1",
2051
+ minHeight: 0,
2052
+ display: "grid",
2053
+ gridTemplateColumns: `repeat(${Math.max(items.length, 1)}, 1fr)`,
2054
+ columnGap: SLIDE_SPEC.grid.gutter,
2055
+ alignItems: "center"
2056
+ },
2057
+ children: items.map((item, i) => {
2058
+ const delta = item.delta ? deltaView({ value: item.delta.value, format: item.delta.format ?? item.format }, item.betterWhen ?? "up") : void 0;
2059
+ const target = targetText(item);
2060
+ return /* @__PURE__ */ jsxs(
2061
+ "div",
2062
+ {
2063
+ style: {
2064
+ display: "flex",
2065
+ flexDirection: "column",
2066
+ gap: SLIDE_SPEC.space.sm,
2067
+ padding: SLIDE_SPEC.space.md,
2068
+ border: "2px solid var(--border)",
2069
+ borderRadius: "var(--slide-radius)",
2070
+ minWidth: 0
2071
+ },
2072
+ children: [
2073
+ /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.caption, lineHeight: SLIDE_SPEC.lineHeight.body, fontWeight: 700, color: "var(--slide-muted)" }, children: item.label }),
2074
+ /* @__PURE__ */ jsx(
2075
+ "span",
2076
+ {
2077
+ "data-raw": item.value ?? void 0,
2078
+ style: {
2079
+ fontFamily: "var(--slide-font-display)",
2080
+ fontSize: SLIDE_SPEC.fontSize.page,
2081
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
2082
+ fontWeight: 700,
2083
+ fontVariantNumeric: "tabular-nums"
2084
+ },
2085
+ children: item.display ?? formatValue(item.value, item.format)
2086
+ }
2087
+ ),
2088
+ delta && /* @__PURE__ */ jsxs("span", { style: { fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700, color: delta.color }, children: [
2089
+ delta.text,
2090
+ item.comparisonLabel && /* @__PURE__ */ jsxs("span", { style: { fontSize: SLIDE_SPEC.fontSize.caption, fontWeight: 400, color: "var(--slide-muted)" }, children: [
2091
+ " ",
2092
+ item.comparisonLabel
2093
+ ] })
2094
+ ] }),
2095
+ target && /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.caption, lineHeight: SLIDE_SPEC.lineHeight.body, color: "var(--slide-muted)" }, children: target })
2096
+ ]
2097
+ },
2098
+ i
2099
+ );
2100
+ })
2101
+ }
2102
+ ),
2103
+ hasSource && /* @__PURE__ */ jsx(SlideSourceLine3, { asOf, source })
2104
+ ]
2105
+ }
2106
+ );
2107
+ }
2108
+ function SlideHeading4({ title }) {
2109
+ return /* @__PURE__ */ jsx(
2110
+ "h2",
2111
+ {
2112
+ style: {
2113
+ gridColumn: "1 / -1",
2114
+ margin: 0,
2115
+ fontFamily: "var(--slide-font-display)",
2116
+ fontSize: SLIDE_SPEC.fontSize.page,
2117
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
2118
+ fontWeight: 700,
2119
+ display: "-webkit-box",
2120
+ WebkitBoxOrient: "vertical",
2121
+ WebkitLineClamp: 2,
2122
+ overflow: "hidden"
2123
+ },
2124
+ children: title
2125
+ }
2126
+ );
2127
+ }
2128
+ function SlideSourceLine4({ asOf, source }) {
2129
+ return /* @__PURE__ */ jsx(
2130
+ "p",
2131
+ {
2132
+ style: {
2133
+ gridColumn: "1 / -1",
2134
+ margin: 0,
2135
+ fontSize: SLIDE_SPEC.fontSize.caption,
2136
+ lineHeight: SLIDE_SPEC.lineHeight.body,
2137
+ color: "var(--slide-muted)"
2138
+ },
2139
+ children: [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ")
2140
+ }
2141
+ );
2142
+ }
2143
+ var ARROW2 = { up: "\u25B2", down: "\u25BC", flat: "\u25AC" };
2144
+ var WORD2 = { up: "\u5897", down: "\u6E1B", flat: "\u6A2A\u3070\u3044" };
2145
+ function deltaView2(delta, betterWhen) {
2146
+ const direction = delta.value > 0 ? "up" : delta.value < 0 ? "down" : "flat";
2147
+ const color = direction === "flat" ? "var(--slide-muted)" : direction === betterWhen ? "var(--positive)" : "var(--negative)";
2148
+ const amount = formatValue(delta.value, delta.format, void 0, { signDisplay: "exceptZero" });
2149
+ return { color, text: `${ARROW2[direction]} ${WORD2[direction]} ${amount}` };
2150
+ }
2151
+ function SlideKpiHero({ title, label, value, format, display, delta, betterWhen = "up", comparisonLabel, trend, asOf, source }) {
2152
+ const hasSource = Boolean(asOf || source);
2153
+ const deltaShown = delta ? deltaView2({ value: delta.value, format: delta.format ?? format }, betterWhen) : void 0;
2154
+ const option = useMemo(() => {
2155
+ if (!trend || trend.length === 0) return void 0;
2156
+ return {
2157
+ animation: false,
2158
+ textStyle: { fontSize: SLIDE_SPEC.fontSize.caption },
2159
+ grid: { left: 0, right: SLIDE_SPEC.space.sm, top: SLIDE_SPEC.space.sm, bottom: 0, containLabel: true },
2160
+ // The first x label and the lowest y label meet at the corner: the margin keeps the x labels clear of the axis, and
2161
+ // `hideOverlap` drops whichever still collides.
2162
+ xAxis: {
2163
+ type: "category",
2164
+ data: trend.map((p) => p.x),
2165
+ boundaryGap: false,
2166
+ axisLabel: { fontSize: SLIDE_SPEC.fontSize.caption, margin: SLIDE_SPEC.space.sm, hideOverlap: true }
2167
+ },
2168
+ yAxis: {
2169
+ type: "value",
2170
+ scale: true,
2171
+ axisLabel: { fontSize: SLIDE_SPEC.fontSize.caption, hideOverlap: true, formatter: (v) => formatValue(v, "compact") }
2172
+ },
2173
+ series: [
2174
+ {
2175
+ type: "line",
2176
+ data: trend.map((p) => p.y),
2177
+ symbol: "circle",
2178
+ symbolSize: SLIDE_SPEC.space.sm / 2,
2179
+ lineStyle: { width: 6 },
2180
+ areaStyle: { opacity: 0.12 }
2181
+ }
2182
+ ]
2183
+ };
2184
+ }, [trend]);
2185
+ return /* @__PURE__ */ jsxs(
2186
+ "section",
2187
+ {
2188
+ "data-slot": "slide-kpi-hero",
2189
+ style: {
2190
+ width: "100%",
2191
+ height: "100%",
2192
+ boxSizing: "border-box",
2193
+ display: "grid",
2194
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
2195
+ gridTemplateRows: hasSource ? "auto 1fr auto" : "auto 1fr",
2196
+ columnGap: SLIDE_SPEC.grid.gutter,
2197
+ rowGap: SLIDE_SPEC.space.lg,
2198
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
2199
+ color: "var(--slide-fg)",
2200
+ fontFamily: "var(--slide-font-body)"
2201
+ },
2202
+ children: [
2203
+ /* @__PURE__ */ jsx(SlideHeading4, { title }),
2204
+ /* @__PURE__ */ jsxs(
2205
+ "div",
2206
+ {
2207
+ style: {
2208
+ gridColumn: option ? "1 / span 6" : "1 / -1",
2209
+ minHeight: 0,
2210
+ display: "flex",
2211
+ flexDirection: "column",
2212
+ justifyContent: "center",
2213
+ gap: SLIDE_SPEC.space.sm
2214
+ },
2215
+ children: [
2216
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.heading, color: "var(--slide-muted)" }, children: label }),
2217
+ /* @__PURE__ */ jsx(
2218
+ "span",
2219
+ {
2220
+ "data-raw": value ?? void 0,
2221
+ style: {
2222
+ fontFamily: "var(--slide-font-display)",
2223
+ fontSize: "var(--slide-size-hero)",
2224
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
2225
+ fontWeight: 700,
2226
+ fontVariantNumeric: "tabular-nums"
2227
+ },
2228
+ children: display ?? formatValue(value, format)
2229
+ }
2230
+ ),
2231
+ (deltaShown || comparisonLabel) && /* @__PURE__ */ jsxs("span", { style: { display: "flex", flexWrap: "wrap", alignItems: "baseline", gap: SLIDE_SPEC.space.sm, fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.heading }, children: [
2232
+ deltaShown && /* @__PURE__ */ jsx("span", { style: { color: deltaShown.color, fontWeight: 700 }, children: deltaShown.text }),
2233
+ comparisonLabel && /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.caption, color: "var(--slide-muted)" }, children: comparisonLabel })
2234
+ ] })
2235
+ ]
2236
+ }
2237
+ ),
2238
+ option && /* @__PURE__ */ jsx("div", { "data-waitfor": "canvas", style: { gridColumn: "7 / span 6", minHeight: 0, height: "100%" }, children: /* @__PURE__ */ jsx(EChart, { option, height: "100%", ariaLabel: `${label}\u306E\u63A8\u79FB` }) }),
2239
+ hasSource && /* @__PURE__ */ jsx(SlideSourceLine4, { asOf, source })
2240
+ ]
2241
+ }
2242
+ );
2243
+ }
2244
+ var MAX_ITEMS2 = 5;
2245
+ var MAX_DUE_CHARS = 10;
2246
+ function SlideHeading5({ title }) {
2247
+ return /* @__PURE__ */ jsx(
2248
+ "h2",
2249
+ {
2250
+ style: {
2251
+ gridColumn: "1 / -1",
2252
+ margin: 0,
2253
+ fontFamily: "var(--slide-font-display)",
2254
+ fontSize: SLIDE_SPEC.fontSize.page,
2255
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
2256
+ fontWeight: 700,
2257
+ display: "-webkit-box",
2258
+ WebkitBoxOrient: "vertical",
2259
+ WebkitLineClamp: 2,
2260
+ overflow: "hidden"
2261
+ },
2262
+ children: title
2263
+ }
2264
+ );
2265
+ }
2266
+ function SlideSourceLine5({ asOf, source }) {
2267
+ return /* @__PURE__ */ jsx(
2268
+ "p",
2269
+ {
2270
+ style: {
2271
+ gridColumn: "1 / -1",
2272
+ margin: 0,
2273
+ fontSize: SLIDE_SPEC.fontSize.caption,
2274
+ lineHeight: SLIDE_SPEC.lineHeight.body,
2275
+ color: "var(--slide-muted)"
2276
+ },
2277
+ children: [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ")
2278
+ }
2279
+ );
2280
+ }
2281
+ function SlideNextActions({ title, items, asOf, source }) {
2282
+ const hasSource = Boolean(asOf || source);
2283
+ if (items.length > MAX_ITEMS2) console.warn(`SlideNextActions: ${items.length} items; ${MAX_ITEMS2} fit the canvas. Split the slide.`);
2284
+ if (items.some((it) => (it.due?.length ?? 0) > MAX_DUE_CHARS)) console.warn(`SlideNextActions: a due date is over ${MAX_DUE_CHARS} characters; the column is one line wide. Shorten it.`);
2285
+ const cols = [
2286
+ { key: "owner", head: "\u62C5\u5F53", fr: 2 },
2287
+ { key: "due", head: "\u671F\u9650", fr: 2 },
2288
+ { key: "metric", head: "\u78BA\u8A8D\u3059\u308B\u6307\u6A19", fr: 3 }
2289
+ ];
2290
+ const shown = cols.filter((c) => items.some((it) => it[c.key]));
2291
+ const template = [`${SLIDE_SPEC.grid.columnWidth}px`, "minmax(0, 6fr)", ...shown.map((c) => `minmax(0, ${c.fr}fr)`)].join(" ");
2292
+ const row = { display: "grid", gridTemplateColumns: template, columnGap: SLIDE_SPEC.space.md, alignItems: "baseline" };
2293
+ return /* @__PURE__ */ jsxs(
2294
+ "section",
2295
+ {
2296
+ "data-slot": "slide-next-actions",
2297
+ style: {
2298
+ width: "100%",
2299
+ height: "100%",
2300
+ boxSizing: "border-box",
2301
+ display: "grid",
2302
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
2303
+ gridTemplateRows: hasSource ? "auto 1fr auto" : "auto 1fr",
2304
+ columnGap: SLIDE_SPEC.grid.gutter,
2305
+ rowGap: SLIDE_SPEC.space.lg,
2306
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
2307
+ color: "var(--slide-fg)",
2308
+ fontFamily: "var(--slide-font-body)"
2309
+ },
2310
+ children: [
2311
+ /* @__PURE__ */ jsx(SlideHeading5, { title }),
2312
+ /* @__PURE__ */ jsxs("div", { style: { gridColumn: "1 / -1", minHeight: 0, display: "flex", flexDirection: "column", justifyContent: "center" }, children: [
2313
+ shown.length > 0 && /* @__PURE__ */ jsxs(
2314
+ "div",
2315
+ {
2316
+ "aria-hidden": true,
2317
+ style: {
2318
+ ...row,
2319
+ paddingBottom: SLIDE_SPEC.space.sm,
2320
+ fontSize: SLIDE_SPEC.fontSize.caption,
2321
+ lineHeight: SLIDE_SPEC.lineHeight.body,
2322
+ fontWeight: 700,
2323
+ color: "var(--slide-muted)"
2324
+ },
2325
+ children: [
2326
+ /* @__PURE__ */ jsx("span", {}),
2327
+ /* @__PURE__ */ jsx("span", {}),
2328
+ shown.map((c) => /* @__PURE__ */ jsx("span", { children: c.head }, c.key))
2329
+ ]
2330
+ }
2331
+ ),
2332
+ /* @__PURE__ */ jsx("ol", { style: { margin: 0, padding: 0, listStyle: "none" }, children: items.map((it, i) => /* @__PURE__ */ jsxs(
2333
+ "li",
2334
+ {
2335
+ style: {
2336
+ ...row,
2337
+ paddingTop: SLIDE_SPEC.space.sm,
2338
+ paddingBottom: SLIDE_SPEC.space.sm,
2339
+ borderTop: "2px solid var(--border)"
2340
+ },
2341
+ children: [
2342
+ /* @__PURE__ */ jsx("span", { style: { fontSize: SLIDE_SPEC.fontSize.page, lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700, color: "var(--slide-accent)" }, children: String(i + 1).padStart(2, "0") }),
2343
+ /* @__PURE__ */ jsx("span", { style: { fontSize: "var(--slide-size-body)", lineHeight: SLIDE_SPEC.lineHeight.heading, fontWeight: 700 }, children: it.action }),
2344
+ shown.map((c) => /* @__PURE__ */ jsx(
2345
+ "span",
2346
+ {
2347
+ style: { fontSize: SLIDE_SPEC.fontSize.caption, lineHeight: SLIDE_SPEC.lineHeight.body, ...c.key === "due" ? { whiteSpace: "nowrap" } : {} },
2348
+ children: it[c.key]
2349
+ },
2350
+ c.key
2351
+ ))
2352
+ ]
2353
+ },
2354
+ i
2355
+ )) })
2356
+ ] }),
2357
+ hasSource && /* @__PURE__ */ jsx(SlideSourceLine5, { asOf, source })
2358
+ ]
2359
+ }
2360
+ );
2361
+ }
2362
+ var MAX_ROWS = 8;
2363
+ var DENSE_ROWS = 6;
2364
+ function SlideHeading6({ title }) {
2365
+ return /* @__PURE__ */ jsx(
2366
+ "h2",
2367
+ {
2368
+ style: {
2369
+ gridColumn: "1 / -1",
2370
+ margin: 0,
2371
+ fontFamily: "var(--slide-font-display)",
2372
+ fontSize: SLIDE_SPEC.fontSize.page,
2373
+ lineHeight: SLIDE_SPEC.lineHeight.heading,
2374
+ fontWeight: 700,
2375
+ display: "-webkit-box",
2376
+ WebkitBoxOrient: "vertical",
2377
+ WebkitLineClamp: 2,
2378
+ overflow: "hidden"
2379
+ },
2380
+ children: title
2381
+ }
2382
+ );
2383
+ }
2384
+ function SlideSourceLine6({ asOf, source }) {
2385
+ return /* @__PURE__ */ jsx(
2386
+ "p",
2387
+ {
2388
+ style: {
2389
+ gridColumn: "1 / -1",
2390
+ margin: 0,
2391
+ fontSize: SLIDE_SPEC.fontSize.caption,
2392
+ lineHeight: SLIDE_SPEC.lineHeight.body,
2393
+ color: "var(--slide-muted)"
2394
+ },
2395
+ children: [asOf ? `${asOf} \u6642\u70B9` : null, source ? `\u51FA\u5178: ${source}` : null].filter(Boolean).join(" / ")
2396
+ }
2397
+ );
2398
+ }
2399
+ var STATUS = {
2400
+ on: { label: "\u9806\u8ABF", color: "var(--positive)" },
2401
+ risk: { label: "\u8981\u6CE8\u610F", color: "var(--warning)" },
2402
+ off: { label: "\u9045\u5EF6", color: "var(--negative)" }
2403
+ };
2404
+ function attainment(row) {
2405
+ if (row.value === null || row.target === void 0) return void 0;
2406
+ const rate = row.betterWhen === "down" ? row.target / row.value : row.value / row.target;
2407
+ return Number.isFinite(rate) ? rate : void 0;
2408
+ }
2409
+ function SlideScorecardTable({ title, rows, columns, asOf, source }) {
2410
+ const hasSource = Boolean(asOf || source);
2411
+ if (rows.length > MAX_ROWS) console.warn(`SlideScorecardTable: ${rows.length} rows; ${MAX_ROWS} fit the canvas. Split the slide.`);
2412
+ const head = { metric: "\u6307\u6A19", target: "\u76EE\u6A19", actual: "\u5B9F\u7E3E", attainment: "\u9054\u6210\u7387", status: "\u72B6\u614B", ...columns };
2413
+ const showAttainment = rows.some((r) => attainment(r) !== void 0);
2414
+ const cellSize = rows.length > DENSE_ROWS ? SLIDE_SPEC.fontSize.caption : "var(--slide-size-body)";
2415
+ const cell = {
2416
+ paddingLeft: SLIDE_SPEC.space.sm,
2417
+ paddingRight: SLIDE_SPEC.space.sm,
2418
+ borderBottom: "2px solid var(--border)",
2419
+ textAlign: "left",
2420
+ verticalAlign: "middle"
2421
+ };
2422
+ const num = { ...cell, textAlign: "right", fontVariantNumeric: "tabular-nums" };
2423
+ return /* @__PURE__ */ jsxs(
2424
+ "section",
2425
+ {
2426
+ "data-slot": "slide-scorecard-table",
2427
+ style: {
2428
+ width: "100%",
2429
+ height: "100%",
2430
+ boxSizing: "border-box",
2431
+ display: "grid",
2432
+ gridTemplateColumns: `repeat(${SLIDE_SPEC.grid.columns}, 1fr)`,
2433
+ gridTemplateRows: hasSource ? "auto 1fr auto" : "auto 1fr",
2434
+ columnGap: SLIDE_SPEC.grid.gutter,
2435
+ rowGap: SLIDE_SPEC.space.lg,
2436
+ padding: `${SLIDE_SPEC.safeArea.y}px ${SLIDE_SPEC.safeArea.x}px`,
2437
+ color: "var(--slide-fg)",
2438
+ fontFamily: "var(--slide-font-body)"
2439
+ },
2440
+ children: [
2441
+ /* @__PURE__ */ jsx(SlideHeading6, { title }),
2442
+ /* @__PURE__ */ jsx("div", { style: { gridColumn: "1 / -1", minHeight: 0 }, children: /* @__PURE__ */ jsxs("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: cellSize, lineHeight: SLIDE_SPEC.lineHeight.body }, children: [
2443
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { style: { color: "var(--slide-muted)", fontSize: SLIDE_SPEC.fontSize.caption }, children: [
2444
+ /* @__PURE__ */ jsx("th", { style: { ...cell, fontWeight: 700 }, children: head.metric }),
2445
+ /* @__PURE__ */ jsx("th", { style: { ...num, fontWeight: 700 }, children: head.target }),
2446
+ /* @__PURE__ */ jsx("th", { style: { ...num, fontWeight: 700 }, children: head.actual }),
2447
+ showAttainment && /* @__PURE__ */ jsx("th", { style: { ...num, fontWeight: 700 }, children: head.attainment }),
2448
+ /* @__PURE__ */ jsx("th", { style: { ...cell, fontWeight: 700 }, children: head.status })
2449
+ ] }) }),
2450
+ /* @__PURE__ */ jsx("tbody", { children: rows.map((r, i) => /* @__PURE__ */ jsxs("tr", { children: [
2451
+ /* @__PURE__ */ jsx("th", { scope: "row", style: { ...cell, fontWeight: 700 }, children: r.metric }),
2452
+ /* @__PURE__ */ jsx("td", { style: num, children: r.target === void 0 ? EMPTY_VALUE : formatValue(r.target, r.format) }),
2453
+ /* @__PURE__ */ jsx("td", { style: { ...num, fontWeight: 700 }, children: r.display ?? formatValue(r.value, r.format) }),
2454
+ showAttainment && /* @__PURE__ */ jsx("td", { style: num, children: attainment(r) === void 0 ? EMPTY_VALUE : formatValue(attainment(r), { type: "percent", digits: 0 }) }),
2455
+ /* @__PURE__ */ jsxs("td", { style: cell, children: [
2456
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, style: { color: STATUS[r.status].color }, children: "\u25CF" }),
2457
+ " ",
2458
+ STATUS[r.status].label
2459
+ ] })
2460
+ ] }, i)) })
2461
+ ] }) }),
2462
+ hasSource && /* @__PURE__ */ jsx(SlideSourceLine6, { asOf, source })
2463
+ ]
2464
+ }
2465
+ );
2466
+ }
1568
2467
 
1569
- export { CANVAS_HEIGHT, CANVAS_WIDTH, MorphElement, Slide, SlideCanvas, SlideDeck, Step, Steps, exportDeckAsPptx, useIsActiveSlide, useSlideNumber };
2468
+ export { CANVAS_HEIGHT, CANVAS_WIDTH, MorphElement, Slide, SlideCanvas, SlideChartInsight, SlideCover, SlideDeck, SlideExecSummary, SlideKpiGrid, SlideKpiHero, SlideNextActions, SlideScorecardTable, Step, Steps, exportDeckAsPptx, useIsActiveSlide, useSlideNumber };
1570
2469
  //# sourceMappingURL=index.js.map
1571
2470
  //# sourceMappingURL=index.js.map