@squadbase/vantage 0.6.2-dev1.42c4e48 → 0.6.2-dev1.81c1bbe

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 (240) hide show
  1. package/dist/{build-MFWRPYKW.js → build-X5NVCQKT.js} +4 -4
  2. package/dist/{build-MFWRPYKW.js.map → build-X5NVCQKT.js.map} +1 -1
  3. package/dist/chunk-2IAPIOPS.js +152 -0
  4. package/dist/chunk-2IAPIOPS.js.map +1 -0
  5. package/dist/{chunk-IBGOCWJB.js → chunk-2ICNHUG6.js} +186 -82
  6. package/dist/chunk-2ICNHUG6.js.map +1 -0
  7. package/dist/{chunk-5ZOP4SQR.js → chunk-2N72FKLB.js} +12 -7
  8. package/dist/chunk-2N72FKLB.js.map +1 -0
  9. package/dist/chunk-57GHR5LN.js +163 -0
  10. package/dist/chunk-57GHR5LN.js.map +1 -0
  11. package/dist/{chunk-OB6UBJXF.js → chunk-7S52M2SL.js} +127 -36
  12. package/dist/chunk-7S52M2SL.js.map +1 -0
  13. package/dist/chunk-JXFCSF3K.js +673 -0
  14. package/dist/chunk-JXFCSF3K.js.map +1 -0
  15. package/dist/{chunk-PXRX5PEC.js → chunk-PDOBHMUQ.js} +3 -3
  16. package/dist/chunk-PDOBHMUQ.js.map +1 -0
  17. package/dist/chunk-RU6WKEOG.js +7048 -0
  18. package/dist/chunk-RU6WKEOG.js.map +1 -0
  19. package/dist/{chunk-A2UUGASH.js → chunk-U736PVHY.js} +2 -2
  20. package/dist/chunk-U736PVHY.js.map +1 -0
  21. package/dist/{chunk-QEWCYW3I.js → chunk-WAMZWZJB.js} +13 -3
  22. package/dist/chunk-WAMZWZJB.js.map +1 -0
  23. package/dist/cli.js +3 -3
  24. package/dist/components/index.d.ts +1592 -100
  25. package/dist/components/index.js +7 -4
  26. package/dist/{dev-DCTOHQ6W.js → dev-4XEDTELV.js} +4 -4
  27. package/dist/{dev-DCTOHQ6W.js.map → dev-4XEDTELV.js.map} +1 -1
  28. package/dist/doc/index.d.ts +194 -2
  29. package/dist/doc/index.js +336 -5
  30. package/dist/doc/index.js.map +1 -1
  31. package/dist/format-U0cQl069.d.ts +243 -0
  32. package/dist/markdown/index.js +1 -1
  33. package/dist/markdown/index.js.map +1 -1
  34. package/dist/slide/index.d.ts +177 -1
  35. package/dist/slide/index.js +866 -3
  36. package/dist/slide/index.js.map +1 -1
  37. package/dist/table/index.js +9 -6
  38. package/dist/table/index.js.map +1 -1
  39. package/dist/ui/index.d.ts +8 -2
  40. package/dist/ui/index.js +22 -112
  41. package/dist/ui/index.js.map +1 -1
  42. package/dist/{upgrade-DBBE6GIR.js → upgrade-JHXZBGQS.js} +3 -3
  43. package/dist/{upgrade-DBBE6GIR.js.map → upgrade-JHXZBGQS.js.map} +1 -1
  44. package/dist/vite/index.js +2 -2
  45. package/docs/en/components.md +40 -17
  46. package/docs/en/doc/doc-action-items.md +49 -0
  47. package/docs/en/doc/doc-callout.md +38 -0
  48. package/docs/en/doc/doc-data-table.md +60 -0
  49. package/docs/en/doc/doc-executive-summary.md +64 -0
  50. package/docs/en/doc/doc-figure.md +56 -0
  51. package/docs/en/doc/doc-key-findings.md +61 -0
  52. package/docs/en/doc/doc-kpi-scorecard.md +80 -0
  53. package/docs/en/doc/doc-report-header.md +46 -0
  54. package/docs/en/parts/area-chart.md +99 -0
  55. package/docs/en/parts/bar-chart.md +91 -0
  56. package/docs/en/parts/bar-list.md +50 -0
  57. package/docs/en/parts/category-bar.md +37 -0
  58. package/docs/en/parts/chart-frame.md +39 -0
  59. package/docs/en/parts/data-table.md +22 -0
  60. package/docs/en/parts/delta.md +50 -0
  61. package/docs/en/parts/donut-chart.md +72 -0
  62. package/docs/en/parts/format.md +43 -0
  63. package/docs/en/parts/funnel-steps.md +2 -1
  64. package/docs/en/parts/heatmap.md +53 -0
  65. package/docs/en/parts/kpi-card.md +57 -0
  66. package/docs/en/parts/legend.md +35 -0
  67. package/docs/en/parts/line-chart.md +94 -0
  68. package/docs/en/parts/metric-value.md +3 -2
  69. package/docs/en/parts/progress-circle.md +33 -0
  70. package/docs/en/parts/sample-data.md +39 -0
  71. package/docs/en/parts/scatter-chart.md +56 -0
  72. package/docs/en/parts/sparkline.md +1 -1
  73. package/docs/en/parts/tracker.md +36 -0
  74. package/docs/en/parts/trend-indicator.md +17 -1
  75. package/docs/en/parts/updated-at.md +30 -0
  76. package/docs/en/parts/waterfall-chart.md +56 -0
  77. package/docs/en/slide/slide-chart-insight.md +52 -0
  78. package/docs/en/slide/slide-cover.md +39 -0
  79. package/docs/en/slide/slide-exec-summary.md +47 -0
  80. package/docs/en/slide/slide-kpi-grid.md +55 -0
  81. package/docs/en/slide/slide-kpi-hero.md +58 -0
  82. package/docs/en/slide/slide-next-actions.md +49 -0
  83. package/docs/en/slide/slide-scorecard-table.md +54 -0
  84. package/docs/en/ui/alert-dialog.md +42 -0
  85. package/docs/en/ui/avatar.md +31 -0
  86. package/docs/en/ui/combobox.md +74 -0
  87. package/docs/en/ui/drawer.md +41 -0
  88. package/docs/en/ui/empty.md +1 -1
  89. package/docs/en/ui/error-state.md +4 -3
  90. package/docs/en/ui/field.md +42 -0
  91. package/docs/en/ui/hover-card.md +21 -0
  92. package/docs/en/ui/kbd.md +17 -0
  93. package/docs/en/ui/loading.md +1 -1
  94. package/docs/en/ui/pagination.md +36 -0
  95. package/docs/en/ui/radio-group.md +21 -0
  96. package/docs/en/ui/toast.md +44 -0
  97. package/docs/en/ui/toggle-group.md +4 -3
  98. package/docs/en/ui-and-theming.md +1 -1
  99. package/docs/index.json +753 -73
  100. package/docs/ja/components.md +37 -16
  101. package/docs/ja/doc/doc-action-items.md +49 -0
  102. package/docs/ja/doc/doc-callout.md +38 -0
  103. package/docs/ja/doc/doc-data-table.md +60 -0
  104. package/docs/ja/doc/doc-executive-summary.md +64 -0
  105. package/docs/ja/doc/doc-figure.md +56 -0
  106. package/docs/ja/doc/doc-key-findings.md +61 -0
  107. package/docs/ja/doc/doc-kpi-scorecard.md +80 -0
  108. package/docs/ja/doc/doc-report-header.md +46 -0
  109. package/docs/ja/parts/area-chart.md +49 -25
  110. package/docs/ja/parts/bar-chart.md +50 -24
  111. package/docs/ja/parts/bar-list.md +31 -8
  112. package/docs/ja/parts/chart-frame.md +36 -0
  113. package/docs/ja/parts/data-table.md +22 -0
  114. package/docs/ja/parts/delta.md +50 -0
  115. package/docs/ja/parts/donut-chart.md +45 -26
  116. package/docs/ja/parts/format.md +44 -0
  117. package/docs/ja/parts/funnel-steps.md +27 -8
  118. package/docs/ja/parts/heatmap.md +45 -0
  119. package/docs/ja/parts/kpi-card.md +55 -0
  120. package/docs/ja/parts/legend.md +36 -0
  121. package/docs/ja/parts/line-chart.md +48 -22
  122. package/docs/ja/parts/metric-value.md +3 -2
  123. package/docs/ja/parts/sample-data.md +61 -0
  124. package/docs/ja/parts/scatter-chart.md +69 -0
  125. package/docs/ja/parts/sparkline.md +1 -1
  126. package/docs/ja/parts/trend-indicator.md +17 -1
  127. package/docs/ja/parts/updated-at.md +27 -0
  128. package/docs/ja/parts/waterfall-chart.md +61 -0
  129. package/docs/ja/slide/slide-chart-insight.md +52 -0
  130. package/docs/ja/slide/slide-cover.md +39 -0
  131. package/docs/ja/slide/slide-exec-summary.md +47 -0
  132. package/docs/ja/slide/slide-kpi-grid.md +55 -0
  133. package/docs/ja/slide/slide-kpi-hero.md +58 -0
  134. package/docs/ja/slide/slide-next-actions.md +49 -0
  135. package/docs/ja/slide/slide-scorecard-table.md +54 -0
  136. package/docs/ja/ui/empty.md +1 -1
  137. package/docs/ja/ui/error-state.md +4 -3
  138. package/docs/ja/ui/loading.md +1 -1
  139. package/docs/ja/ui/toggle-group.md +4 -3
  140. package/docs/ja/ui-and-theming.md +2 -2
  141. package/package.json +26 -24
  142. package/registry/ui/accordion.tsx +4 -2
  143. package/registry/ui/alert-dialog.tsx +3 -3
  144. package/registry/ui/alert.tsx +3 -1
  145. package/registry/ui/app-shell.tsx +7 -1
  146. package/registry/ui/area-chart.tsx +2852 -166
  147. package/registry/ui/attention-list.tsx +303 -0
  148. package/registry/ui/avatar.tsx +1 -1
  149. package/registry/ui/badge.tsx +3 -1
  150. package/registry/ui/bar-chart.tsx +2851 -166
  151. package/registry/ui/bar-list.tsx +3531 -90
  152. package/registry/ui/box-plot-chart.tsx +3906 -0
  153. package/registry/ui/breadcrumb.tsx +3 -1
  154. package/registry/ui/button.tsx +3 -1
  155. package/registry/ui/calendar.tsx +3 -1
  156. package/registry/ui/card.tsx +4 -2
  157. package/registry/ui/category-bar.tsx +1025 -16
  158. package/registry/ui/chart-frame.tsx +1393 -0
  159. package/registry/ui/checkbox.tsx +3 -1
  160. package/registry/ui/collapsible.tsx +3 -1
  161. package/registry/ui/combobox.tsx +2 -2
  162. package/registry/ui/command.tsx +3 -1
  163. package/registry/ui/dashboard-card.tsx +71 -28
  164. package/registry/ui/data-table.tsx +678 -56
  165. package/registry/ui/date-range-picker.tsx +245 -64
  166. package/registry/ui/delta.tsx +188 -0
  167. package/registry/ui/dialog.tsx +5 -3
  168. package/registry/ui/donut-chart.tsx +2929 -182
  169. package/registry/ui/drawer.tsx +1 -1
  170. package/registry/ui/dropdown-menu.tsx +5 -3
  171. package/registry/ui/echart.tsx +621 -67
  172. package/registry/ui/field.tsx +1 -1
  173. package/registry/ui/filter-bar.tsx +33 -6
  174. package/registry/ui/funnel-steps.tsx +3344 -49
  175. package/registry/ui/heatmap.tsx +1786 -0
  176. package/registry/ui/histogram-chart.tsx +3986 -0
  177. package/registry/ui/hover-card.tsx +2 -2
  178. package/registry/ui/input-group.tsx +3 -1
  179. package/registry/ui/input.tsx +3 -1
  180. package/registry/ui/kbd.tsx +3 -1
  181. package/registry/ui/kpi-card.tsx +699 -0
  182. package/registry/ui/label.tsx +3 -1
  183. package/registry/ui/legend.tsx +3563 -0
  184. package/registry/ui/line-chart.tsx +2852 -160
  185. package/registry/ui/metric-value.tsx +9 -1
  186. package/registry/ui/multi-select.tsx +11 -5
  187. package/registry/ui/page-shell.tsx +106 -51
  188. package/registry/ui/pagination.tsx +3 -1
  189. package/registry/ui/paired-chart.tsx +3827 -0
  190. package/registry/ui/placeholder.tsx +8 -2
  191. package/registry/ui/popover.tsx +4 -2
  192. package/registry/ui/progress-circle.tsx +607 -12
  193. package/registry/ui/progress.tsx +3 -1
  194. package/registry/ui/radio-group.tsx +1 -1
  195. package/registry/ui/sample-data.tsx +86 -0
  196. package/registry/ui/scatter-chart.tsx +4212 -0
  197. package/registry/ui/scroll-area.tsx +3 -2
  198. package/registry/ui/searchable-select.tsx +8 -3
  199. package/registry/ui/section-header.tsx +5 -3
  200. package/registry/ui/segmented-control.tsx +7 -2
  201. package/registry/ui/select.tsx +4 -2
  202. package/registry/ui/separator.tsx +3 -1
  203. package/registry/ui/sheet.tsx +4 -2
  204. package/registry/ui/sidebar.tsx +4 -2
  205. package/registry/ui/skeleton.tsx +4 -2
  206. package/registry/ui/slider.tsx +4 -2
  207. package/registry/ui/sparkline.tsx +84 -9
  208. package/registry/ui/spinner.tsx +3 -1
  209. package/registry/ui/states.tsx +34 -5
  210. package/registry/ui/status-badge.tsx +83 -41
  211. package/registry/ui/switch.tsx +3 -1
  212. package/registry/ui/table.tsx +4 -2
  213. package/registry/ui/tabs.tsx +5 -3
  214. package/registry/ui/textarea.tsx +3 -1
  215. package/registry/ui/toast.tsx +2 -2
  216. package/registry/ui/toggle-group.tsx +3 -1
  217. package/registry/ui/toggle.tsx +3 -1
  218. package/registry/ui/tooltip.tsx +10 -4
  219. package/registry/ui/tracker.tsx +632 -19
  220. package/registry/ui/trend-indicator.tsx +15 -3
  221. package/registry/ui/updated-at.tsx +122 -0
  222. package/registry/ui/waterfall-chart.tsx +4248 -0
  223. package/skills/vantage-design/SKILL.md +34 -24
  224. package/skills/vantage-design/references/extract.md +16 -14
  225. package/skills/vantage-design/references/format.md +6 -5
  226. package/skills/vantage-design/references/presets.md +60 -110
  227. package/skills/vantage-slide/SKILL.md +54 -36
  228. package/templates/AGENTS.md +15 -3
  229. package/templates/agents/doc.md +45 -0
  230. package/templates/agents/page.md +32 -1
  231. package/templates/agents/slide.md +55 -2
  232. package/theme.css +244 -149
  233. package/dist/chunk-5ZOP4SQR.js.map +0 -1
  234. package/dist/chunk-A2UUGASH.js.map +0 -1
  235. package/dist/chunk-AG6RZ2RR.js +0 -3208
  236. package/dist/chunk-AG6RZ2RR.js.map +0 -1
  237. package/dist/chunk-IBGOCWJB.js.map +0 -1
  238. package/dist/chunk-OB6UBJXF.js.map +0 -1
  239. package/dist/chunk-PXRX5PEC.js.map +0 -1
  240. package/dist/chunk-QEWCYW3I.js.map +0 -1
@@ -1,6 +1,9 @@
1
- export { AppShell, AreaChart, BarChart, BarList, CategoryBar, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, DonutChart, EChart, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, FunnelSteps, LineChart, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, Placeholder, ProgressCircle, SearchableSelect, SectionHeader, SegmentedControl, Sparkline, StatusBadge, Tracker, TrendIndicator, defaultPresets, flattenOptions, funnelStepsVariants, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, useDataTable } from '../chunk-AG6RZ2RR.js';
2
- import '../chunk-OB6UBJXF.js';
3
- import '../chunk-PXRX5PEC.js';
4
- import '../chunk-A2UUGASH.js';
1
+ export { AppShell, AreaChart, BarChart, BarList, COMPARISON_LABELS, CategoryBar, ChartFrame, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, DashboardCardContent, DashboardCardDescription, DashboardCardFooter, DashboardCardHeader, DashboardCardPreset, DashboardCardSkeleton, DashboardCardTitle, DataTable, DataTableColumnVisibility, DataTableContent, DataTableExport, DataTablePagination, DataTablePreset, DataTableToolbar, DateRangePicker, Delta, DonutChart, FilterBar, FilterBarActiveChips, FilterBarClearButton, FilterBarMultiSelect, FilterBarPreset, FilterBarSelect, FunnelSteps, Heatmap, KpiCard, Legend, LineChart, MetricUnit, MetricValue, MultiSelect, PageShell, PageShellActions, PageShellContent, PageShellDescription, PageShellHeader, PageShellHeaderEnd, PageShellHeading, PageShellMeta, PageShellSummary, PageShellSummaryCard, PageShellTitle, Placeholder, ProgressCircle, RECORD_MIN_POINTS, SampleBadge, SampleClaim, SampleData, ScatterChart, SearchableSelect, SectionHeader, SegmentedControl, StatusBadge, Tracker, TrendIndicator, UpdatedAt, WaterfallChart, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useSampleMark } from '../chunk-RU6WKEOG.js';
2
+ export { EChart, useResolvedChartColors } from '../chunk-JXFCSF3K.js';
3
+ export { Sparkline } from '../chunk-2IAPIOPS.js';
4
+ export { DEFAULT_LOCALE, EMPTY_VALUE, MINUS_SIGN, formatDate, formatDateRange, formatDatesInText, formatDelta, formatKind, formatPoints, formatValue, toValueFormatter } from '../chunk-57GHR5LN.js';
5
+ import '../chunk-7S52M2SL.js';
6
+ import '../chunk-PDOBHMUQ.js';
7
+ import '../chunk-U736PVHY.js';
5
8
  //# sourceMappingURL=index.js.map
6
9
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import { runDiagnostics } from './chunk-7DZGJQ3P.js';
2
2
  import './chunk-JKLLFVEU.js';
3
- import { vantagePlugin } from './chunk-IBGOCWJB.js';
4
- import './chunk-QEWCYW3I.js';
3
+ import { vantagePlugin } from './chunk-2ICNHUG6.js';
4
+ import './chunk-WAMZWZJB.js';
5
5
  import './chunk-CEXAQQ5W.js';
6
6
  import { scanProject, timedAsync } from './chunk-RNTDBX6S.js';
7
7
  import './chunk-46QI6GFC.js';
@@ -77,5 +77,5 @@ async function dev(root, args) {
77
77
  }
78
78
 
79
79
  export { dev };
80
- //# sourceMappingURL=dev-DCTOHQ6W.js.map
81
- //# sourceMappingURL=dev-DCTOHQ6W.js.map
80
+ //# sourceMappingURL=dev-4XEDTELV.js.map
81
+ //# sourceMappingURL=dev-4XEDTELV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli/dev.ts"],"names":[],"mappings":"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","file":"dev-DCTOHQ6W.js","sourcesContent":["import { createServer, loadEnv } from \"vite\"\nimport { runDiagnostics } from \"../core/diagnostics\"\nimport { timedAsync } from \"../core/profile\"\nimport { scanProject } from \"../core/scan\"\nimport { vantagePlugin } from \"../vite/index\"\nimport {\n applyApiBaseUrlFlag,\n log,\n printDiagnostics,\n reportPortInUse,\n resolveDraftPreview,\n resolveHmrOverlay,\n resolveHostOptions,\n resolvePortOptions,\n type ParsedArgs,\n} from \"./util\"\n\n/** `vantage dev` — start the dev server with HMR and the optional API server. */\nexport async function dev(root: string, args: ParsedArgs): Promise<number> {\n const model = scanProject(root)\n const errors = runDiagnostics(root, model).filter((d) => d.severity === \"error\")\n if (errors.length) {\n printDiagnostics(errors)\n log.error(\"Fix the errors above before starting the dev server.\")\n return 1\n }\n\n const mode = \"development\"\n applyApiBaseUrlFlag(args)\n const env = { ...process.env, ...loadEnv(mode, root, \"\") }\n const ports = resolvePortOptions(args.flags, 5173)\n if (!ports.ok) {\n log.error(ports.error)\n return 1\n }\n const { port, strictPort } = ports\n const hosts = resolveHostOptions(args.flags)\n if (!hosts.ok) {\n log.error(hosts.error)\n return 1\n }\n const overlay = resolveHmrOverlay(args.flags)\n\n const server = await timedAsync(\"vite:createServer\", () =>\n createServer({\n configFile: false,\n root,\n mode,\n // The model was just scanned for diagnostics; hand it over so the plugin\n // does not walk the project again.\n plugins: [vantagePlugin({ root, env, model, draftPreview: resolveDraftPreview(args.flags) })],\n // `host` / `allowedHosts` are only present when asked for, and `hmr` is\n // left alone unless the overlay is being turned off, so Vite's own\n // defaults (host, port, protocol) keep applying.\n server: {\n port,\n strictPort,\n ...hosts.options,\n ...(overlay ? {} : { hmr: { overlay: false } }),\n },\n clearScreen: false,\n }),\n )\n\n try {\n await timedAsync(\"vite:listen\", () => server.listen())\n } catch (err) {\n await server.close().catch(() => {})\n if (reportPortInUse(err, port, strictPort)) return 1\n throw err\n }\n log.brand(\"dev server ready\")\n server.printUrls()\n if (model.hasServer) log.info(\" \" + \"server/api enabled\")\n\n const shutdown = async () => {\n await server.close()\n process.exit(0)\n }\n process.on(\"SIGINT\", shutdown)\n process.on(\"SIGTERM\", shutdown)\n\n // Keep the process alive; the listening server owns the lifecycle.\n return new Promise<number>(() => {})\n}\n"]}
1
+ {"version":3,"sources":["../src/cli/dev.ts"],"names":[],"mappings":"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","file":"dev-4XEDTELV.js","sourcesContent":["import { createServer, loadEnv } from \"vite\"\nimport { runDiagnostics } from \"../core/diagnostics\"\nimport { timedAsync } from \"../core/profile\"\nimport { scanProject } from \"../core/scan\"\nimport { vantagePlugin } from \"../vite/index\"\nimport {\n applyApiBaseUrlFlag,\n log,\n printDiagnostics,\n reportPortInUse,\n resolveDraftPreview,\n resolveHmrOverlay,\n resolveHostOptions,\n resolvePortOptions,\n type ParsedArgs,\n} from \"./util\"\n\n/** `vantage dev` — start the dev server with HMR and the optional API server. */\nexport async function dev(root: string, args: ParsedArgs): Promise<number> {\n const model = scanProject(root)\n const errors = runDiagnostics(root, model).filter((d) => d.severity === \"error\")\n if (errors.length) {\n printDiagnostics(errors)\n log.error(\"Fix the errors above before starting the dev server.\")\n return 1\n }\n\n const mode = \"development\"\n applyApiBaseUrlFlag(args)\n const env = { ...process.env, ...loadEnv(mode, root, \"\") }\n const ports = resolvePortOptions(args.flags, 5173)\n if (!ports.ok) {\n log.error(ports.error)\n return 1\n }\n const { port, strictPort } = ports\n const hosts = resolveHostOptions(args.flags)\n if (!hosts.ok) {\n log.error(hosts.error)\n return 1\n }\n const overlay = resolveHmrOverlay(args.flags)\n\n const server = await timedAsync(\"vite:createServer\", () =>\n createServer({\n configFile: false,\n root,\n mode,\n // The model was just scanned for diagnostics; hand it over so the plugin\n // does not walk the project again.\n plugins: [vantagePlugin({ root, env, model, draftPreview: resolveDraftPreview(args.flags) })],\n // `host` / `allowedHosts` are only present when asked for, and `hmr` is\n // left alone unless the overlay is being turned off, so Vite's own\n // defaults (host, port, protocol) keep applying.\n server: {\n port,\n strictPort,\n ...hosts.options,\n ...(overlay ? {} : { hmr: { overlay: false } }),\n },\n clearScreen: false,\n }),\n )\n\n try {\n await timedAsync(\"vite:listen\", () => server.listen())\n } catch (err) {\n await server.close().catch(() => {})\n if (reportPortInUse(err, port, strictPort)) return 1\n throw err\n }\n log.brand(\"dev server ready\")\n server.printUrls()\n if (model.hasServer) log.info(\" \" + \"server/api enabled\")\n\n const shutdown = async () => {\n await server.close()\n process.exit(0)\n }\n process.on(\"SIGINT\", shutdown)\n process.on(\"SIGTERM\", shutdown)\n\n // Keep the process alive; the listening server owns the lifecycle.\n return new Promise<number>(() => {})\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { HTMLAttributes } from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { V as ValueFormat } from '../format-U0cQl069.js';
3
4
 
4
5
  /**
5
6
  * Per-document token overrides. Anything left out falls through to `--doc-*`
@@ -40,4 +41,195 @@ interface DocumentProps extends HTMLAttributes<HTMLElement> {
40
41
  */
41
42
  declare const Document: React.ForwardRefExoticComponent<DocumentProps & React.RefAttributes<HTMLElement>>;
42
43
 
43
- export { Document, type DocumentProps, type DocumentTheme };
44
+ type DocActionPriority = "high" | "medium" | "low";
45
+ interface DocActionItem {
46
+ action: ReactNode;
47
+ owner?: string;
48
+ /** Due date as written, e.g. "2026-11-15" or "11 月末". */
49
+ due?: string;
50
+ /** What we expect to change, e.g. "解約率 −0.5pt". */
51
+ impact?: string;
52
+ priority?: DocActionPriority;
53
+ }
54
+ interface DocActionItemsProps {
55
+ /** Heading text. Default "推奨する対応". */
56
+ title?: string;
57
+ /** `2` directly under the document, `3` inside another section. Default 2. */
58
+ headingLevel?: 2 | 3;
59
+ items: DocActionItem[];
60
+ variant?: "table" | "asks";
61
+ }
62
+ declare function DocActionItems({ title, headingLevel, items, variant }: DocActionItemsProps): React.JSX.Element;
63
+
64
+ type DocCalloutKind = "note" | "insight" | "warning" | "decision";
65
+ interface DocCalloutProps {
66
+ kind?: DocCalloutKind;
67
+ /** Heading of the box, one short line. Default: the kind's word. */
68
+ title?: string;
69
+ children: ReactNode;
70
+ }
71
+ declare function DocCallout({ kind, title, children }: DocCalloutProps): React.JSX.Element;
72
+
73
+ type DocTableCell = string | number | null | undefined;
74
+ type DocTableRow = Record<string, DocTableCell>;
75
+ interface DocTableColumn {
76
+ key: string;
77
+ label: string;
78
+ /** Format of a numeric column. Without it, numbers use a plain thousands format. */
79
+ format?: ValueFormat;
80
+ /** Default: right for a column of numbers, left otherwise. */
81
+ align?: "left" | "right" | "center";
82
+ }
83
+ interface DocDataTableProps {
84
+ /** Table title, as a caption above the table. */
85
+ title?: string;
86
+ /** Unit or scale, e.g. "単位: 百万円". */
87
+ unit?: string;
88
+ columns: DocTableColumn[];
89
+ rows: DocTableRow[];
90
+ /** The total row, keyed like `rows`. */
91
+ total?: DocTableRow;
92
+ /** Row indexes to set in semibold. */
93
+ highlightRows?: number[];
94
+ footnotes?: {
95
+ mark: string;
96
+ text: string;
97
+ }[];
98
+ source?: string;
99
+ /** When the data was taken: a date only, e.g. "2026-10-03". "データ時点" is added here. */
100
+ asOf?: string;
101
+ }
102
+ declare function DocDataTable({ title, unit, columns, rows, total, highlightRows, footnotes, source, asOf }: DocDataTableProps): React.JSX.Element;
103
+
104
+ interface DocSummaryMetric {
105
+ label: string;
106
+ value: number | null;
107
+ format?: ValueFormat;
108
+ /** Overrides the shown value (e.g. "約 5,400 万円"). */
109
+ display?: string;
110
+ /** The change from the comparison; direction comes from its sign. Omit for no comparison. */
111
+ delta?: {
112
+ value: number;
113
+ format?: ValueFormat;
114
+ };
115
+ /** Name of the comparison, e.g. "前月比". Default "前期比". */
116
+ comparisonLabel?: string;
117
+ /** Which way is good. Default `"up"`. */
118
+ betterWhen?: "up" | "down";
119
+ }
120
+ interface DocExecutiveSummaryProps {
121
+ /** Heading text. Default "要旨". */
122
+ title?: string;
123
+ /** `2` directly under the document, `3` inside another section. Default 2. */
124
+ headingLevel?: 2 | 3;
125
+ /** The verdict in one sentence. */
126
+ conclusion: ReactNode;
127
+ /** 3–5 supporting points, most important first. */
128
+ points: ReactNode[];
129
+ /** Up to 3 headline numbers; any beyond are ignored. */
130
+ metrics?: DocSummaryMetric[];
131
+ }
132
+ declare function DocExecutiveSummary({ title, headingLevel, conclusion, points, metrics, }: DocExecutiveSummaryProps): React.JSX.Element;
133
+
134
+ interface DocFigureProps {
135
+ /** The finding, as a sentence. */
136
+ title: string;
137
+ /** Unit or scale, e.g. "単位: 百万円". */
138
+ unit?: string;
139
+ /** Figure number; shown as "図 N" in the caption. */
140
+ number?: number;
141
+ /** Where the data comes from. */
142
+ source?: string;
143
+ /** When the data was taken: a date only, e.g. "2026-10-03". */
144
+ asOf?: string;
145
+ /** Footnotes, one per line. */
146
+ notes?: string[];
147
+ /** The chart. */
148
+ children: ReactNode;
149
+ }
150
+ declare function DocFigure({ title, unit, number, source, asOf, notes, children }: DocFigureProps): React.JSX.Element;
151
+
152
+ interface DocFindingMetric {
153
+ label: string;
154
+ value: number | null;
155
+ format?: ValueFormat;
156
+ /** Overrides the shown value. */
157
+ display?: string;
158
+ /** The change from the comparison; direction comes from its sign. */
159
+ delta?: {
160
+ value: number;
161
+ format?: ValueFormat;
162
+ };
163
+ /** Name of the comparison, e.g. "前月比". Default "前期比". */
164
+ comparisonLabel?: string;
165
+ /** Which way is good. Default `"up"`. */
166
+ betterWhen?: "up" | "down";
167
+ }
168
+ interface DocFinding {
169
+ /** The conclusion, as a sentence. */
170
+ headline: string;
171
+ evidence: ReactNode;
172
+ metric?: DocFindingMetric;
173
+ }
174
+ interface DocKeyFindingsProps {
175
+ /** Heading text. Default "主要な発見". */
176
+ title?: string;
177
+ /** `2` directly under the document, `3` inside another section. Default 2. */
178
+ headingLevel?: 2 | 3;
179
+ /** 3–5 findings, most important first. */
180
+ findings: DocFinding[];
181
+ }
182
+ declare function DocKeyFindings({ title, headingLevel, findings }: DocKeyFindingsProps): React.JSX.Element;
183
+
184
+ interface DocScorecardMetric {
185
+ label: string;
186
+ value: number | null;
187
+ format?: ValueFormat;
188
+ /** Overrides the shown value. */
189
+ display?: string;
190
+ /** The change from the comparison; direction comes from its sign. */
191
+ delta?: {
192
+ value: number;
193
+ format?: ValueFormat;
194
+ };
195
+ /** Name of the comparison, e.g. "前年同期比". Default "前期比". */
196
+ comparisonLabel?: string;
197
+ /** Which way is good. Default `"up"`. */
198
+ betterWhen?: "up" | "down";
199
+ /** The target for the period, in the same `format` as `value`. */
200
+ target?: number;
201
+ /** One series over time, oldest first; the last one is the current value. */
202
+ trend?: {
203
+ x: string;
204
+ y: number;
205
+ }[];
206
+ }
207
+ interface DocKpiScorecardProps {
208
+ /** Heading text. Default "主要指標". */
209
+ title?: string;
210
+ /** `2` directly under the document, `3` inside another section. Default 2. */
211
+ headingLevel?: 2 | 3;
212
+ metrics: DocScorecardMetric[];
213
+ variant?: "table" | "grid";
214
+ /** When the numbers were taken: a date only, e.g. "2026-10-03". "データ時点" is added here. */
215
+ asOf?: string;
216
+ source?: string;
217
+ }
218
+ declare function DocKpiScorecard({ title, headingLevel, metrics, variant, asOf, source, }: DocKpiScorecardProps): React.JSX.Element;
219
+
220
+ interface DocReportHeaderProps {
221
+ /** The document title (h1). State the subject and the period, not a slogan. */
222
+ title: string;
223
+ /** One line under the title, e.g. who the report is for. */
224
+ subtitle?: ReactNode;
225
+ /** The period the numbers cover, e.g. "2026 年 9 月" or "2026-07-01 〜 2026-09-30". */
226
+ period?: string;
227
+ /** When the data was taken: a date only, e.g. "2026-10-03". Shown under "データ時点". */
228
+ asOf?: string;
229
+ author?: string;
230
+ /** Where the numbers come from, e.g. "受注管理システム、会計システム". */
231
+ source?: string;
232
+ }
233
+ declare function DocReportHeader({ title, subtitle, period, asOf, author, source }: DocReportHeaderProps): React.JSX.Element;
234
+
235
+ export { type DocActionItem, DocActionItems, type DocActionItemsProps, type DocActionPriority, DocCallout, type DocCalloutKind, type DocCalloutProps, DocDataTable, type DocDataTableProps, DocExecutiveSummary, type DocExecutiveSummaryProps, DocFigure, type DocFigureProps, type DocFinding, type DocFindingMetric, DocKeyFindings, type DocKeyFindingsProps, DocKpiScorecard, type DocKpiScorecardProps, DocReportHeader, type DocReportHeaderProps, type DocScorecardMetric, type DocSummaryMetric, type DocTableCell, type DocTableColumn, type DocTableRow, Document, type DocumentProps, type DocumentTheme };
package/dist/doc/index.js CHANGED
@@ -1,6 +1,8 @@
1
- import { Button } from '../chunk-PXRX5PEC.js';
2
- import '../chunk-A2UUGASH.js';
3
- import { forwardRef, useEffect } from 'react';
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';
4
6
  import { PrinterIcon } from 'lucide-react';
5
7
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
8
 
@@ -105,7 +107,7 @@ var Document = forwardRef(function Document2({ theme, style, ...props }, ref) {
105
107
  {
106
108
  ref,
107
109
  "data-slot": "document",
108
- style: themeVars || style ? { ...themeVars, ...style } : void 0,
110
+ style: { width: "100%", ...themeVars, ...style },
109
111
  ...props
110
112
  }
111
113
  ),
@@ -128,7 +130,336 @@ var Document = forwardRef(function Document2({ theme, style, ...props }, ref) {
128
130
  ] });
129
131
  });
130
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",
180
+ {
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
+ ]
190
+ }
191
+ );
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
+ }
131
462
 
132
- export { Document };
463
+ export { DocActionItems, DocCallout, DocDataTable, DocExecutiveSummary, DocFigure, DocKeyFindings, DocKpiScorecard, DocReportHeader, Document };
133
464
  //# sourceMappingURL=index.js.map
134
465
  //# sourceMappingURL=index.js.map