@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
package/dist/doc/index.js CHANGED
@@ -1,8 +1,82 @@
1
- import { forwardRef } from 'react';
2
- import { jsx } from 'react/jsx-runtime';
1
+ import { Sparkline } from '../chunk-2IAPIOPS.js';
2
+ import { formatValue, formatDelta } from '../chunk-57GHR5LN.js';
3
+ import { Button } from '../chunk-PDOBHMUQ.js';
4
+ import '../chunk-U736PVHY.js';
5
+ import { forwardRef, useEffect, useId } from 'react';
6
+ import { PrinterIcon } from 'lucide-react';
7
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
8
 
4
9
  // @squadbase/vantage — generated build. Do not edit.
5
10
 
11
+ // src/doc/print.ts
12
+ var DARK_CLASS = "dark";
13
+ var THEME_ATTR = "data-theme";
14
+ var restore = null;
15
+ function forceLight() {
16
+ if (restore) return;
17
+ const undo = [];
18
+ for (const el of [document.documentElement, document.body]) {
19
+ if (!el) continue;
20
+ if (el.classList.contains(DARK_CLASS)) {
21
+ el.classList.remove(DARK_CLASS);
22
+ undo.push(() => el.classList.add(DARK_CLASS));
23
+ }
24
+ if (el.getAttribute(THEME_ATTR) === "dark") {
25
+ el.setAttribute(THEME_ATTR, "light");
26
+ undo.push(() => el.setAttribute(THEME_ATTR, "dark"));
27
+ }
28
+ }
29
+ restore = () => {
30
+ for (const fn of undo) fn();
31
+ };
32
+ }
33
+ function restoreTheme() {
34
+ restore?.();
35
+ restore = null;
36
+ }
37
+ function nextFrame() {
38
+ return new Promise((resolve) => {
39
+ let settled = false;
40
+ const settle = () => {
41
+ if (settled) return;
42
+ settled = true;
43
+ resolve();
44
+ };
45
+ requestAnimationFrame(settle);
46
+ setTimeout(settle, 50);
47
+ });
48
+ }
49
+ var REPAINT_FRAMES = 4;
50
+ var CHART_TIMEOUT_MS = 3e3;
51
+ async function waitForCharts() {
52
+ const deadline = performance.now() + CHART_TIMEOUT_MS;
53
+ while (performance.now() < deadline) {
54
+ if (!document.querySelector('[data-slot="echart-canvas"][data-rendering]')) return;
55
+ await nextFrame();
56
+ }
57
+ }
58
+ async function printDocument() {
59
+ const wasForced = restore !== null;
60
+ forceLight();
61
+ try {
62
+ if (!wasForced && restore) {
63
+ for (let i = 0; i < REPAINT_FRAMES; i++) await nextFrame();
64
+ }
65
+ await waitForCharts();
66
+ window.print();
67
+ } catch (error) {
68
+ restoreTheme();
69
+ throw error;
70
+ }
71
+ }
72
+ function watchPrintEvents() {
73
+ window.addEventListener("beforeprint", forceLight);
74
+ window.addEventListener("afterprint", restoreTheme);
75
+ return () => {
76
+ window.removeEventListener("beforeprint", forceLight);
77
+ window.removeEventListener("afterprint", restoreTheme);
78
+ };
79
+ }
6
80
  function themeToCssVars(theme) {
7
81
  if (!theme) return void 0;
8
82
  const vars = {};
@@ -19,20 +93,373 @@ function themeToCssVars(theme) {
19
93
  if (theme.maxWidth) vars["--doc-max-width"] = theme.maxWidth;
20
94
  return Object.keys(vars).length > 0 ? vars : void 0;
21
95
  }
96
+ var PRINT_PAGE_CSS = "@media print { @page { margin: 0 } }";
97
+ function printLabel() {
98
+ return navigator.language.toLowerCase().startsWith("ja") ? "PDF \u3068\u3057\u3066\u4FDD\u5B58" : "Save as PDF";
99
+ }
22
100
  var Document = forwardRef(function Document2({ theme, style, ...props }, ref) {
23
101
  const themeVars = themeToCssVars(theme);
24
- return /* @__PURE__ */ jsx(
25
- "article",
102
+ const label = printLabel();
103
+ useEffect(() => watchPrintEvents(), []);
104
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
105
+ /* @__PURE__ */ jsx(
106
+ "article",
107
+ {
108
+ ref,
109
+ "data-slot": "document",
110
+ style: { width: "100%", ...themeVars, ...style },
111
+ ...props
112
+ }
113
+ ),
114
+ /* @__PURE__ */ jsx("style", { children: PRINT_PAGE_CSS }),
115
+ /* @__PURE__ */ jsxs(
116
+ Button,
117
+ {
118
+ "data-slot": "document-print",
119
+ variant: "outline",
120
+ size: "sm",
121
+ className: "fixed right-4 bottom-4 z-10 shadow-sm",
122
+ onClick: () => void printDocument(),
123
+ title: label,
124
+ children: [
125
+ /* @__PURE__ */ jsx(PrinterIcon, { "aria-hidden": "true" }),
126
+ label
127
+ ]
128
+ }
129
+ )
130
+ ] });
131
+ });
132
+ Document.displayName = "Document";
133
+ var PRIORITY = { high: "\u9AD8", medium: "\u4E2D", low: "\u4F4E" };
134
+ var MUTED = { color: "var(--doc-muted)" };
135
+ function Priority({ value }) {
136
+ if (!value) return /* @__PURE__ */ jsx(Fragment, { children: "\u2014" });
137
+ return /* @__PURE__ */ jsx("span", { className: value === "high" ? "font-semibold" : void 0, children: PRIORITY[value] });
138
+ }
139
+ function DocActionItems({ title = "\u63A8\u5968\u3059\u308B\u5BFE\u5FDC", headingLevel = 2, items, variant = "table" }) {
140
+ const Heading = headingLevel === 3 ? "h3" : "h2";
141
+ return /* @__PURE__ */ jsxs("section", { "data-slot": "doc-action-items", children: [
142
+ /* @__PURE__ */ jsx(Heading, { children: title }),
143
+ variant === "asks" ? /* @__PURE__ */ jsx("ul", { children: items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "break-inside-avoid", children: [
144
+ item.action,
145
+ item.owner || item.due ? /* @__PURE__ */ jsxs("span", { style: MUTED, children: [
146
+ "\uFF08",
147
+ [item.owner, item.due ? `${item.due} \u307E\u3067` : void 0].filter(Boolean).join("\u30FB"),
148
+ "\uFF09"
149
+ ] }) : null
150
+ ] }, i)) }) : /* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "table w-full", children: [
151
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
152
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u5BFE\u5FDC" }),
153
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u62C5\u5F53" }),
154
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u671F\u9650" }),
155
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u671F\u5F85\u3059\u308B\u52B9\u679C" }),
156
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u512A\u5148\u5EA6" })
157
+ ] }) }),
158
+ /* @__PURE__ */ jsx("tbody", { children: items.map((item, i) => /* @__PURE__ */ jsxs("tr", { children: [
159
+ /* @__PURE__ */ jsx("td", { children: item.action }),
160
+ /* @__PURE__ */ jsx("td", { children: item.owner ?? "\u2014" }),
161
+ /* @__PURE__ */ jsx("td", { className: "whitespace-nowrap tabular-nums", children: item.due ?? "\u2014" }),
162
+ /* @__PURE__ */ jsx("td", { children: item.impact ?? "\u2014" }),
163
+ /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Priority, { value: item.priority }) })
164
+ ] }, i)) })
165
+ ] }) })
166
+ ] });
167
+ }
168
+ var KINDS = {
169
+ note: { word: "\u88DC\u8DB3", rule: "border-info", tint: "bg-info-subtle", text: "text-info" },
170
+ insight: { word: "\u793A\u5506", rule: "border-positive", tint: "bg-positive-subtle", text: "text-positive" },
171
+ warning: { word: "\u6CE8\u610F", rule: "border-warning", tint: "bg-warning-subtle", text: "text-warning" },
172
+ decision: { word: "\u6C7A\u5B9A\u4E8B\u9805", rule: "border-foreground", tint: "bg-muted", text: "text-foreground" }
173
+ };
174
+ function DocCallout({ kind = "note", title, children }) {
175
+ const k = KINDS[kind];
176
+ const titleId = useId();
177
+ const heading = title && title !== k.word ? `${k.word}: ${title}` : k.word;
178
+ return /* @__PURE__ */ jsxs(
179
+ "div",
26
180
  {
27
- ref,
28
- "data-slot": "document",
29
- style: themeVars || style ? { ...themeVars, ...style } : void 0,
30
- ...props
181
+ role: "note",
182
+ "aria-labelledby": titleId,
183
+ "data-slot": "doc-callout",
184
+ "data-kind": kind,
185
+ className: `break-inside-avoid border-l-4 px-4 py-2 ${k.rule} ${k.tint}`,
186
+ children: [
187
+ /* @__PURE__ */ jsx("p", { id: titleId, className: `m-0 font-semibold ${k.text}`, children: heading }),
188
+ /* @__PURE__ */ jsx("div", { children: typeof children === "string" ? /* @__PURE__ */ jsx("p", { className: "m-0", children }) : children })
189
+ ]
31
190
  }
32
191
  );
33
- });
34
- Document.displayName = "Document";
192
+ }
193
+ var ALIGN = { left: "text-left", right: "text-right", center: "text-center" };
194
+ function DocDataTable({ title, unit, columns, rows, total, highlightRows, footnotes, source, asOf }) {
195
+ const isNumeric = (col) => rows.some((r) => typeof r[col.key] === "number");
196
+ const cls = (col) => {
197
+ const numeric = isNumeric(col);
198
+ return `${ALIGN[col.align ?? (numeric ? "right" : "left")]}${numeric ? " tabular-nums" : ""}`;
199
+ };
200
+ const text = (col, v) => typeof v === "number" ? formatValue(v, col.format ?? "number") : v === null || v === void 0 || v === "" ? "\u2014" : v;
201
+ const origin = [source ? `\u51FA\u5178: ${source}` : void 0, asOf ? `\u30C7\u30FC\u30BF\u6642\u70B9 ${asOf}` : void 0].filter(Boolean).join(" \uFF0F ");
202
+ const highlighted = new Set(highlightRows);
203
+ return /* @__PURE__ */ jsxs("figure", { "data-slot": "doc-data-table", className: "m-0 w-full break-inside-auto", children: [
204
+ /* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "table w-full", children: [
205
+ title || unit ? /* @__PURE__ */ jsxs("caption", { className: "text-left", children: [
206
+ title ? /* @__PURE__ */ jsx("span", { className: "font-semibold", children: title }) : null,
207
+ unit ? /* @__PURE__ */ jsx("span", { style: { color: "var(--doc-muted)" }, children: title ? `\uFF08${unit}\uFF09` : unit }) : null
208
+ ] }) : null,
209
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((col) => /* @__PURE__ */ jsx("th", { scope: "col", className: cls(col), children: col.label }, col.key)) }) }),
210
+ /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsx("tr", { className: highlighted.has(i) ? "font-semibold" : void 0, children: columns.map((col) => /* @__PURE__ */ jsx("td", { className: cls(col), children: text(col, row[col.key]) }, col.key)) }, i)) }),
211
+ total ? /* @__PURE__ */ jsx("tfoot", { children: /* @__PURE__ */ jsx("tr", { className: "font-semibold", children: columns.map((col) => /* @__PURE__ */ jsx("td", { className: cls(col), children: text(col, total[col.key]) }, col.key)) }) }) : null
212
+ ] }) }),
213
+ footnotes?.length || origin ? /* @__PURE__ */ jsxs("figcaption", { className: "flex flex-col gap-0.5 break-inside-avoid text-left", children: [
214
+ footnotes?.map((f) => /* @__PURE__ */ jsxs("span", { children: [
215
+ f.mark,
216
+ " ",
217
+ f.text
218
+ ] }, f.mark)),
219
+ origin ? /* @__PURE__ */ jsx("span", { children: origin }) : null
220
+ ] }) : null
221
+ ] });
222
+ }
223
+ function ChangeText({ delta, format, betterWhen = "up" }) {
224
+ const { value } = delta;
225
+ const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
226
+ const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
227
+ const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
228
+ const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
229
+ const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
230
+ const text = formatDelta(value, delta.format ?? format);
231
+ return /* @__PURE__ */ jsxs(
232
+ "span",
233
+ {
234
+ className: tone,
235
+ style: tone ? void 0 : { color: "var(--doc-muted)" },
236
+ "aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
237
+ children: [
238
+ mark,
239
+ " ",
240
+ text
241
+ ]
242
+ }
243
+ );
244
+ }
245
+ function DocExecutiveSummary({
246
+ title = "\u8981\u65E8",
247
+ headingLevel = 2,
248
+ conclusion,
249
+ points,
250
+ metrics
251
+ }) {
252
+ const Heading = headingLevel === 3 ? "h3" : "h2";
253
+ const shown2 = (metrics ?? []).slice(0, 3);
254
+ return /* @__PURE__ */ jsxs("section", { "data-slot": "doc-executive-summary", children: [
255
+ /* @__PURE__ */ jsx(Heading, { children: title }),
256
+ /* @__PURE__ */ jsx("p", { className: "font-semibold", children: conclusion }),
257
+ /* @__PURE__ */ jsx("ol", { children: points.map((point, i) => /* @__PURE__ */ jsx("li", { className: "break-inside-avoid", children: point }, i)) }),
258
+ shown2.length > 0 ? /* @__PURE__ */ jsx("dl", { className: "grid grid-cols-1 gap-4 sm:grid-cols-3 print:grid-cols-3", children: shown2.map((m) => /* @__PURE__ */ jsxs(
259
+ "div",
260
+ {
261
+ className: "break-inside-avoid border-l-2 pl-3",
262
+ style: { borderColor: "var(--doc-border)" },
263
+ children: [
264
+ /* @__PURE__ */ jsx("dt", { style: { color: "var(--doc-muted)" }, children: m.label }),
265
+ /* @__PURE__ */ jsx("dd", { className: "m-0 font-semibold tabular-nums", children: m.display ?? formatValue(m.value, m.format) }),
266
+ m.delta ? /* @__PURE__ */ jsxs("dd", { className: "m-0", children: [
267
+ /* @__PURE__ */ jsxs("span", { style: { color: "var(--doc-muted)" }, children: [
268
+ m.comparisonLabel ?? "\u524D\u671F\u6BD4",
269
+ " "
270
+ ] }),
271
+ /* @__PURE__ */ jsx(ChangeText, { delta: m.delta, format: m.format, betterWhen: m.betterWhen })
272
+ ] }) : null
273
+ ]
274
+ },
275
+ m.label
276
+ )) }) : null
277
+ ] });
278
+ }
279
+ function DocFigure({ title, unit, number, source, asOf, notes, children }) {
280
+ const titleId = useId();
281
+ const origin = [source ? `\u51FA\u5178: ${source}` : void 0, asOf ? `\u30C7\u30FC\u30BF\u6642\u70B9 ${asOf}` : void 0].filter(Boolean).join(" \uFF0F ");
282
+ const hasCaption = number !== void 0 || origin || notes && notes.length > 0;
283
+ return /* @__PURE__ */ jsxs("figure", { "data-slot": "doc-figure", "aria-labelledby": titleId, className: "w-full break-inside-avoid", children: [
284
+ /* @__PURE__ */ jsx("p", { id: titleId, className: "m-0 font-semibold", children: title }),
285
+ unit ? /* @__PURE__ */ jsx("p", { className: "m-0", style: { color: "var(--doc-muted)" }, children: unit }) : null,
286
+ /* @__PURE__ */ jsx("div", { className: "w-full", children }),
287
+ hasCaption ? /* @__PURE__ */ jsxs("figcaption", { className: "flex flex-col gap-0.5 text-left", children: [
288
+ number !== void 0 ? /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
289
+ "\u56F3 ",
290
+ number
291
+ ] }) : null,
292
+ origin ? /* @__PURE__ */ jsx("span", { children: origin }) : null,
293
+ notes?.map((note, i) => /* @__PURE__ */ jsx("span", { children: note }, i))
294
+ ] }) : null
295
+ ] });
296
+ }
297
+ function ChangeText2({ delta, format, betterWhen = "up" }) {
298
+ const { value } = delta;
299
+ const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
300
+ const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
301
+ const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
302
+ const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
303
+ const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
304
+ const text = formatDelta(value, delta.format ?? format);
305
+ return /* @__PURE__ */ jsxs(
306
+ "span",
307
+ {
308
+ className: tone,
309
+ style: tone ? void 0 : { color: "var(--doc-muted)" },
310
+ "aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
311
+ children: [
312
+ mark,
313
+ " ",
314
+ text
315
+ ]
316
+ }
317
+ );
318
+ }
319
+ function DocKeyFindings({ title = "\u4E3B\u8981\u306A\u767A\u898B", headingLevel = 2, findings }) {
320
+ const Heading = headingLevel === 3 ? "h3" : "h2";
321
+ const Item = headingLevel === 3 ? "h4" : "h3";
322
+ return /* @__PURE__ */ jsxs("section", { "data-slot": "doc-key-findings", children: [
323
+ /* @__PURE__ */ jsx(Heading, { children: title }),
324
+ findings.map((f, i) => /* @__PURE__ */ jsxs("article", { className: "break-inside-avoid", children: [
325
+ /* @__PURE__ */ jsxs(Item, { children: [
326
+ i + 1,
327
+ ". ",
328
+ f.headline
329
+ ] }),
330
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between print:flex-row print:justify-between", children: [
331
+ /* @__PURE__ */ jsx("div", { children: typeof f.evidence === "string" ? /* @__PURE__ */ jsx("p", { className: "m-0", children: f.evidence }) : f.evidence }),
332
+ f.metric ? /* @__PURE__ */ jsxs("dl", { className: "m-0 shrink-0 sm:text-right print:text-right", children: [
333
+ /* @__PURE__ */ jsx("dt", { style: { color: "var(--doc-muted)" }, children: f.metric.label }),
334
+ /* @__PURE__ */ jsx("dd", { className: "m-0 font-semibold tabular-nums", children: f.metric.display ?? formatValue(f.metric.value, f.metric.format) }),
335
+ f.metric.delta ? /* @__PURE__ */ jsxs("dd", { className: "m-0", children: [
336
+ /* @__PURE__ */ jsxs("span", { style: { color: "var(--doc-muted)" }, children: [
337
+ f.metric.comparisonLabel ?? "\u524D\u671F\u6BD4",
338
+ " "
339
+ ] }),
340
+ /* @__PURE__ */ jsx(ChangeText2, { delta: f.metric.delta, format: f.metric.format, betterWhen: f.metric.betterWhen })
341
+ ] }) : null
342
+ ] }) : null
343
+ ] })
344
+ ] }, i))
345
+ ] });
346
+ }
347
+ var MUTED2 = { color: "var(--doc-muted)" };
348
+ var ACHIEVEMENT = { type: "percent", digits: 1 };
349
+ function ChangeText3({ delta, format, betterWhen = "up" }) {
350
+ const { value } = delta;
351
+ const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
352
+ const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
353
+ const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
354
+ const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
355
+ const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
356
+ const text = formatDelta(value, delta.format ?? format);
357
+ return /* @__PURE__ */ jsxs(
358
+ "span",
359
+ {
360
+ className: tone,
361
+ style: tone ? void 0 : { color: "var(--doc-muted)" },
362
+ "aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
363
+ children: [
364
+ mark,
365
+ " ",
366
+ text
367
+ ]
368
+ }
369
+ );
370
+ }
371
+ var shown = (m) => m.display ?? formatValue(m.value, m.format);
372
+ var achievement = (m) => m.target === void 0 || m.target === 0 || m.value === null ? "\u2014" : formatValue(m.value / m.target, ACHIEVEMENT);
373
+ var change = (m) => m.delta ? /* @__PURE__ */ jsx(ChangeText3, { delta: m.delta, format: m.format, betterWhen: m.betterWhen }) : "\u2014";
374
+ var trendOf = (m) => (m.trend ?? []).map(({ y }) => ({ value: y }));
375
+ function DocKpiScorecard({
376
+ title = "\u4E3B\u8981\u6307\u6A19",
377
+ headingLevel = 2,
378
+ metrics,
379
+ variant = "table",
380
+ asOf,
381
+ source
382
+ }) {
383
+ const Heading = headingLevel === 3 ? "h3" : "h2";
384
+ const caption = [source ? `\u51FA\u5178: ${source}` : void 0, asOf ? `\u30C7\u30FC\u30BF\u6642\u70B9 ${asOf}` : void 0].filter(Boolean).join(" \uFF0F ");
385
+ const columnLabel = metrics.find((m) => m.comparisonLabel)?.comparisonLabel ?? "\u524D\u671F\u6BD4";
386
+ return /* @__PURE__ */ jsxs("section", { "data-slot": "doc-kpi-scorecard", children: [
387
+ /* @__PURE__ */ jsx(Heading, { children: title }),
388
+ variant === "grid" ? /* @__PURE__ */ jsx("dl", { className: "m-0 grid grid-cols-1 gap-4 sm:grid-cols-3 print:grid-cols-3", children: metrics.map((m) => /* @__PURE__ */ jsxs(
389
+ "div",
390
+ {
391
+ className: "break-inside-avoid rounded-md border p-3",
392
+ style: { borderColor: "var(--doc-border)", background: "var(--doc-subtle)" },
393
+ children: [
394
+ /* @__PURE__ */ jsx("dt", { style: MUTED2, children: m.label }),
395
+ /* @__PURE__ */ jsx("dd", { className: "m-0 font-semibold tabular-nums", children: shown(m) }),
396
+ /* @__PURE__ */ jsxs("dd", { className: "m-0 flex flex-col gap-0.5", children: [
397
+ m.delta ? /* @__PURE__ */ jsxs("span", { children: [
398
+ /* @__PURE__ */ jsxs("span", { style: MUTED2, children: [
399
+ m.comparisonLabel ?? "\u524D\u671F\u6BD4",
400
+ " "
401
+ ] }),
402
+ change(m)
403
+ ] }) : null,
404
+ m.target !== void 0 ? /* @__PURE__ */ jsxs("span", { children: [
405
+ /* @__PURE__ */ jsx("span", { style: MUTED2, children: "\u9054\u6210\u7387 " }),
406
+ achievement(m),
407
+ /* @__PURE__ */ jsxs("span", { style: MUTED2, children: [
408
+ "\uFF08\u76EE\u6A19 ",
409
+ formatValue(m.target, m.format),
410
+ "\uFF09"
411
+ ] })
412
+ ] }) : null
413
+ ] }),
414
+ m.trend && m.trend.length > 1 ? /* @__PURE__ */ jsx("dd", { className: "m-0", children: /* @__PURE__ */ jsx(Sparkline, { data: trendOf(m), height: 28, "aria-label": `${m.label}\u306E\u63A8\u79FB` }) }) : null
415
+ ]
416
+ },
417
+ m.label
418
+ )) }) : /* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: "table w-full", children: [
419
+ /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
420
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u6307\u6A19" }),
421
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "text-right", children: "\u5B9F\u7E3E" }),
422
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "text-right", children: columnLabel }),
423
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "text-right", children: "\u76EE\u6A19" }),
424
+ /* @__PURE__ */ jsx("th", { scope: "col", className: "text-right", children: "\u9054\u6210\u7387" }),
425
+ /* @__PURE__ */ jsx("th", { scope: "col", children: "\u63A8\u79FB" })
426
+ ] }) }),
427
+ /* @__PURE__ */ jsx("tbody", { children: metrics.map((m) => /* @__PURE__ */ jsxs("tr", { children: [
428
+ /* @__PURE__ */ jsx("th", { scope: "row", className: "font-medium", children: m.label }),
429
+ /* @__PURE__ */ jsx("td", { className: "text-right font-semibold tabular-nums", children: shown(m) }),
430
+ /* @__PURE__ */ jsx("td", { className: "text-right whitespace-nowrap", children: change(m) }),
431
+ /* @__PURE__ */ jsx("td", { className: "text-right tabular-nums", children: m.target === void 0 ? "\u2014" : formatValue(m.target, m.format) }),
432
+ /* @__PURE__ */ jsx("td", { className: "text-right tabular-nums", children: achievement(m) }),
433
+ /* @__PURE__ */ jsx("td", { children: m.trend && m.trend.length > 1 ? /* @__PURE__ */ jsx(Sparkline, { data: trendOf(m), height: 24, "aria-label": `${m.label}\u306E\u63A8\u79FB` }) : "\u2014" })
434
+ ] }, m.label)) })
435
+ ] }) }),
436
+ caption ? /* @__PURE__ */ jsx("p", { style: MUTED2, children: caption }) : null
437
+ ] });
438
+ }
439
+ function DocReportHeader({ title, subtitle, period, asOf, author, source }) {
440
+ const facts = [
441
+ ...period ? [{ label: "\u5BFE\u8C61\u671F\u9593", value: period }] : [],
442
+ ...asOf ? [{ label: "\u30C7\u30FC\u30BF\u6642\u70B9", value: asOf }] : [],
443
+ ...author ? [{ label: "\u4F5C\u6210\u8005", value: author }] : [],
444
+ ...source ? [{ label: "\u51FA\u5178", value: source }] : []
445
+ ];
446
+ return /* @__PURE__ */ jsxs("header", { "data-slot": "doc-report-header", className: "break-inside-avoid", children: [
447
+ /* @__PURE__ */ jsx("h1", { children: title }),
448
+ subtitle ? typeof subtitle === "string" ? /* @__PURE__ */ jsx("p", { style: { color: "var(--doc-muted)" }, children: subtitle }) : /* @__PURE__ */ jsx("div", { style: { color: "var(--doc-muted)" }, children: subtitle }) : null,
449
+ facts.length > 0 ? /* @__PURE__ */ jsx(
450
+ "dl",
451
+ {
452
+ className: "grid grid-cols-1 gap-x-8 gap-y-2 border-y py-3 sm:grid-cols-2 print:grid-cols-2",
453
+ style: { borderColor: "var(--doc-border)" },
454
+ children: facts.map((fact) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3", children: [
455
+ /* @__PURE__ */ jsx("dt", { className: "shrink-0", style: { color: "var(--doc-muted)" }, children: fact.label }),
456
+ /* @__PURE__ */ jsx("dd", { className: "m-0 font-medium", children: fact.value })
457
+ ] }, fact.label))
458
+ }
459
+ ) : null
460
+ ] });
461
+ }
35
462
 
36
- export { Document };
463
+ export { DocActionItems, DocCallout, DocDataTable, DocExecutiveSummary, DocFigure, DocKeyFindings, DocKpiScorecard, DocReportHeader, Document };
37
464
  //# sourceMappingURL=index.js.map
38
465
  //# sourceMappingURL=index.js.map