@squadbase/vantage 0.6.2-dev1.54bde93 → 0.6.2-dev1.5c79ef5

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 (87) hide show
  1. package/dist/{build-A23M4GCH.js → build-U7GO26HR.js} +3 -3
  2. package/dist/{build-A23M4GCH.js.map → build-U7GO26HR.js.map} +1 -1
  3. package/dist/{check-FBHT6W6J.js → check-MRVAIHG5.js} +3 -3
  4. package/dist/{check-FBHT6W6J.js.map → check-MRVAIHG5.js.map} +1 -1
  5. package/dist/{chunk-57GHR5LN.js → chunk-3RJEOP3J.js} +29 -18
  6. package/dist/chunk-3RJEOP3J.js.map +1 -0
  7. package/dist/{chunk-QOXXOFGL.js → chunk-77CISBMG.js} +994 -464
  8. package/dist/chunk-77CISBMG.js.map +1 -0
  9. package/dist/{chunk-JXFCSF3K.js → chunk-EG4PX726.js} +12 -7
  10. package/dist/chunk-EG4PX726.js.map +1 -0
  11. package/dist/{chunk-2N72FKLB.js → chunk-NZ5QIIG4.js} +33 -11
  12. package/dist/chunk-NZ5QIIG4.js.map +1 -0
  13. package/dist/{chunk-5C2SEDPH.js → chunk-PJ4SPXHS.js} +4 -4
  14. package/dist/{chunk-5C2SEDPH.js.map → chunk-PJ4SPXHS.js.map} +1 -1
  15. package/dist/{chunk-7S52M2SL.js → chunk-QNOX7WLZ.js} +3 -3
  16. package/dist/{chunk-7S52M2SL.js.map → chunk-QNOX7WLZ.js.map} +1 -1
  17. package/dist/{chunk-PDOBHMUQ.js → chunk-ROHNXP7J.js} +72 -3
  18. package/dist/chunk-ROHNXP7J.js.map +1 -0
  19. package/dist/{chunk-6OTTGAPO.js → chunk-TRMHNMMZ.js} +24 -7
  20. package/dist/chunk-TRMHNMMZ.js.map +1 -0
  21. package/dist/cli.js +4 -4
  22. package/dist/components/index.d.ts +49 -29
  23. package/dist/components/index.js +5 -5
  24. package/dist/{delta-text-CvwBGJ95.d.ts → delta-text-CbrOaW83.d.ts} +4 -2
  25. package/dist/{dev-H4I2JL63.js → dev-O42JFQ64.js} +3 -3
  26. package/dist/{dev-H4I2JL63.js.map → dev-O42JFQ64.js.map} +1 -1
  27. package/dist/doc/index.d.ts +14 -14
  28. package/dist/doc/index.js +198 -84
  29. package/dist/doc/index.js.map +1 -1
  30. package/dist/{doctor-B2O3GJDU.js → doctor-YD3XAAOT.js} +3 -3
  31. package/dist/{doctor-B2O3GJDU.js.map → doctor-YD3XAAOT.js.map} +1 -1
  32. package/dist/{format-U0cQl069.d.ts → format-DihQkL1N.d.ts} +17 -11
  33. package/dist/slide/index.d.ts +2 -2
  34. package/dist/slide/index.js +95 -44
  35. package/dist/slide/index.js.map +1 -1
  36. package/dist/table/index.js +6 -6
  37. package/dist/ui/index.d.ts +1 -1
  38. package/dist/ui/index.js +5 -5
  39. package/docs/en/agent-skills.md +1 -1
  40. package/docs/ja/agent-skills.md +1 -1
  41. package/package.json +2 -2
  42. package/registry/ui/app-shell.tsx +138 -1
  43. package/registry/ui/area-chart.tsx +344 -85
  44. package/registry/ui/attention-list.tsx +177 -15
  45. package/registry/ui/bar-chart.tsx +341 -85
  46. package/registry/ui/bar-list.tsx +332 -77
  47. package/registry/ui/box-plot-chart.tsx +405 -97
  48. package/registry/ui/category-bar.tsx +248 -40
  49. package/registry/ui/chart-frame.tsx +257 -46
  50. package/registry/ui/data-table.tsx +229 -37
  51. package/registry/ui/date-range-picker.tsx +190 -36
  52. package/registry/ui/delta.tsx +171 -12
  53. package/registry/ui/donut-chart.tsx +339 -84
  54. package/registry/ui/echart.tsx +142 -4
  55. package/registry/ui/filter-bar.tsx +179 -20
  56. package/registry/ui/funnel-steps.tsx +354 -80
  57. package/registry/ui/heatmap.tsx +293 -52
  58. package/registry/ui/histogram-chart.tsx +395 -97
  59. package/registry/ui/kpi-card.tsx +245 -44
  60. package/registry/ui/legend.tsx +330 -76
  61. package/registry/ui/line-chart.tsx +344 -85
  62. package/registry/ui/multi-select.tsx +159 -9
  63. package/registry/ui/page-shell.tsx +141 -3
  64. package/registry/ui/paired-chart.tsx +349 -90
  65. package/registry/ui/progress-circle.tsx +205 -39
  66. package/registry/ui/sample-data.tsx +153 -9
  67. package/registry/ui/scatter-chart.tsx +391 -100
  68. package/registry/ui/searchable-select.tsx +145 -7
  69. package/registry/ui/states.tsx +170 -13
  70. package/registry/ui/status-badge.tsx +193 -28
  71. package/registry/ui/tracker.tsx +205 -39
  72. package/registry/ui/trend-indicator.tsx +149 -6
  73. package/registry/ui/updated-at.tsx +170 -16
  74. package/registry/ui/waterfall-chart.tsx +415 -102
  75. package/skills/vantage-design/SKILL.md +25 -27
  76. package/skills/vantage-design/references/extract.md +10 -13
  77. package/skills/vantage-design/references/format.md +12 -173
  78. package/skills/vantage-design/references/presets.md +0 -10
  79. package/templates/AGENTS.md +29 -15
  80. package/templates/agents/page.md +1 -1
  81. package/templates/agents/slide.md +7 -1
  82. package/dist/chunk-2N72FKLB.js.map +0 -1
  83. package/dist/chunk-57GHR5LN.js.map +0 -1
  84. package/dist/chunk-6OTTGAPO.js.map +0 -1
  85. package/dist/chunk-JXFCSF3K.js.map +0 -1
  86. package/dist/chunk-PDOBHMUQ.js.map +0 -1
  87. package/dist/chunk-QOXXOFGL.js.map +0 -1
@@ -2,6 +2,7 @@ import { cn } from './chunk-U736PVHY.js';
2
2
  import { Button as Button$1 } from '@base-ui/react/button';
3
3
  import { cva } from 'class-variance-authority';
4
4
  import { jsx } from 'react/jsx-runtime';
5
+ import { useSyncExternalStore } from 'react';
5
6
 
6
7
  // @squadbase/vantage — generated build. Do not edit.
7
8
  var buttonVariants = cva(
@@ -49,6 +50,74 @@ function Button({
49
50
  );
50
51
  }
51
52
 
52
- export { Button, buttonVariants };
53
- //# sourceMappingURL=chunk-PDOBHMUQ.js.map
54
- //# sourceMappingURL=chunk-PDOBHMUQ.js.map
53
+ // ../squadkit/registry/lib/locale.ts
54
+ var FALLBACK_LOCALE = "en-US";
55
+ function uiLanguage(locale) {
56
+ return typeof locale === "string" && locale.trim().toLowerCase().startsWith("ja") ? "ja" : "en";
57
+ }
58
+ function normalizeLocale(tag) {
59
+ const value = tag?.trim();
60
+ if (!value) return FALLBACK_LOCALE;
61
+ try {
62
+ return Intl.getCanonicalLocales(value)[0] ?? FALLBACK_LOCALE;
63
+ } catch {
64
+ return FALLBACK_LOCALE;
65
+ }
66
+ }
67
+ function documentLocale() {
68
+ if (typeof document === "undefined") return FALLBACK_LOCALE;
69
+ return normalizeLocale(document.documentElement?.getAttribute("lang"));
70
+ }
71
+ function resolveLocale(locale) {
72
+ return locale || documentLocale();
73
+ }
74
+ function defaultCurrency(locale) {
75
+ return uiLanguage(resolveLocale(locale)) === "ja" ? "JPY" : "USD";
76
+ }
77
+ function defaultFiscalYearStartMonth(locale) {
78
+ return uiLanguage(resolveLocale(locale)) === "ja" ? 4 : 1;
79
+ }
80
+ var SUNDAY_FIRST = /* @__PURE__ */ new Set(["en", "en-US", "en-CA"]);
81
+ function weekStartsOn(locale) {
82
+ const tag = normalizeLocale(resolveLocale(locale));
83
+ if (uiLanguage(tag) === "ja") return 1;
84
+ try {
85
+ const info = new Intl.Locale(tag);
86
+ const firstDay = info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay;
87
+ if (typeof firstDay === "number" && firstDay >= 1 && firstDay <= 7) return firstDay % 7;
88
+ } catch {
89
+ }
90
+ return SUNDAY_FIRST.has(tag) ? 0 : 1;
91
+ }
92
+ var listeners = /* @__PURE__ */ new Set();
93
+ var observer = null;
94
+ function subscribe(onChange) {
95
+ if (typeof document === "undefined" || typeof MutationObserver === "undefined") return () => {
96
+ };
97
+ listeners.add(onChange);
98
+ if (!observer) {
99
+ observer = new MutationObserver(() => {
100
+ for (const listener of [...listeners]) listener();
101
+ });
102
+ observer.observe(document.documentElement, { attributes: true, attributeFilter: ["lang"] });
103
+ }
104
+ return () => {
105
+ listeners.delete(onChange);
106
+ if (listeners.size === 0 && observer) {
107
+ observer.disconnect();
108
+ observer = null;
109
+ }
110
+ };
111
+ }
112
+ var serverLocale = () => FALLBACK_LOCALE;
113
+ function useDocumentLocale() {
114
+ return useSyncExternalStore(subscribe, documentLocale, serverLocale);
115
+ }
116
+ function useLocale(locale) {
117
+ const page = useDocumentLocale();
118
+ return locale || page;
119
+ }
120
+
121
+ export { Button, FALLBACK_LOCALE, buttonVariants, defaultCurrency, defaultFiscalYearStartMonth, resolveLocale, uiLanguage, useLocale, weekStartsOn };
122
+ //# sourceMappingURL=chunk-ROHNXP7J.js.map
123
+ //# sourceMappingURL=chunk-ROHNXP7J.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../squadkit/registry/ui/button.tsx","../../squadkit/registry/lib/locale.ts","../../squadkit/registry/hooks/use-locale.ts"],"names":["ButtonPrimitive"],"mappings":";;;;;;;AAOA,IAAM,cAAA,GAAiB,GAAA;AAAA,EACrB,4lBAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,wDAAA;AAAA,QACT,OAAA,EACE,iLAAA;AAAA,QACF,SAAA,EACE,gLAAA;AAAA,QACF,KAAA,EACE,kHAAA;AAAA,QACF,WAAA,EACE,6NAAA;AAAA,QACF,IAAA,EAAM;AAAA,OACR;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,OAAA,EACE,sFAAA;AAAA,QACF,EAAA,EAAI,+MAAA;AAAA,QACJ,EAAA,EAAI,yNAAA;AAAA,QACJ,EAAA,EAAI,sFAAA;AAAA,QACJ,IAAA,EAAM,QAAA;AAAA,QACN,SAAA,EACE,yHAAA;AAAA,QACF,SAAA,EACE,oFAAA;AAAA,QACF,SAAA,EAAW;AAAA;AACb,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,OAAA,EAAS,SAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR;AAEJ;AAEA,SAAS,MAAA,CAAO;AAAA,EACd,SAAA;AAAA,EACA,OAAA,GAAU,SAAA;AAAA,EACV,IAA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AY,MAAM,eAAA,EAAiB,CAAC,MAAM,CAAA,EAAG,CAAA;AAAA,EAC5F;AACA,EAAA,OAAO,MAAM;AACX,IAAA,SAAA,CAAU,OAAO,QAAQ,CAAA;AACzB,IAAA,IAAI,SAAA,CAAU,IAAA,KAAS,CAAA,IAAK,QAAA,EAAU;AACpC,MAAA,QAAA,CAAS,UAAA,EAAW;AACpB,MAAA,QAAA,GAAW,IAAA;AAAA,IACb;AAAA,EACF,CAAA;AACF;AAEA,IAAM,eAAe,MAAM,eAAA;AAMpB,SAAS,iBAAA,GAA4B;AAC1C,EAAA,OAAO,oBAAA,CAAqB,SAAA,EAAW,cAAA,EAAgB,YAAY,CAAA;AACrE;AAGO,SAAS,UAAU,MAAA,EAAgC;AACxD,EAAA,MAAM,OAAO,iBAAA,EAAkB;AAC/B,EAAA,OAAO,MAAA,IAAU,IAAA;AACnB","file":"chunk-ROHNXP7J.js","sourcesContent":["\"use client\"\n\nimport { Button as ButtonPrimitive } from \"@base-ui/react/button\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"../lib/utils\"\n\nconst buttonVariants = cva(\n \"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80\",\n outline:\n \"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground\",\n ghost:\n \"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50\",\n destructive:\n \"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default:\n \"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n xs: \"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3\",\n sm: \"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n lg: \"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2\",\n icon: \"size-8\",\n \"icon-xs\":\n \"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3\",\n \"icon-sm\":\n \"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg\",\n \"icon-lg\": \"size-9\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Button({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>) {\n return (\n <ButtonPrimitive\n data-slot=\"button\"\n className={cn(buttonVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nexport { Button, buttonVariants }\n","/**\n * The display language of the parts and the defaults that follow it.\n *\n * The language comes from `<html lang>`: a tag starting with `ja` reads Japanese, anything else English.\n * Without a usable `lang` (missing, invalid, or no `document` — SSR, Node) the locale is `FALLBACK_LOCALE`\n * (`en-US`). A `locale` passed explicitly (a prop, an argument) always wins.\n *\n * Parts read the locale through `useLocale` (`hooks/use-locale`) and pass it down; the pure helpers here\n * and in `format` / `comparison` / `chart-*` take it as an argument and fall back to `documentLocale()`.\n */\n\n/** The language of the built-in wording: Japanese or English. */\nexport type UiLanguage = \"ja\" | \"en\"\n\n/** The locale used when `<html lang>` gives none (and on the server). */\nexport const FALLBACK_LOCALE = \"en-US\"\n\n/** `\"ja\"` when `locale` starts with `ja` (`ja`, `ja-JP`), else `\"en\"`. A missing locale is `\"en\"`. */\nexport function uiLanguage(locale: string | null | undefined): UiLanguage {\n return typeof locale === \"string\" && locale.trim().toLowerCase().startsWith(\"ja\") ? \"ja\" : \"en\"\n}\n\n/** A BCP 47 tag in its canonical form (`en-gb` → `en-GB`), or `FALLBACK_LOCALE` when it is empty or invalid. */\nexport function normalizeLocale(tag: string | null | undefined): string {\n const value = tag?.trim()\n if (!value) return FALLBACK_LOCALE\n try {\n return Intl.getCanonicalLocales(value)[0] ?? FALLBACK_LOCALE\n } catch {\n return FALLBACK_LOCALE\n }\n}\n\n/**\n * The locale of the page: `document.documentElement.lang`, canonicalized. `FALLBACK_LOCALE` when it is empty or\n * invalid, or there is no `document`. Parts read it through `useLocale`, never while rendering.\n */\nexport function documentLocale(): string {\n if (typeof document === \"undefined\") return FALLBACK_LOCALE\n return normalizeLocale(document.documentElement?.getAttribute(\"lang\"))\n}\n\n/** `locale` when given, else the page's locale (`documentLocale()`). */\nexport function resolveLocale(locale?: string | null): string {\n return locale || documentLocale()\n}\n\n/** Picks the wording table of the locale's language. */\nexport function pickLocale<T>(table: { ja: T; en: T }, locale?: string | null): T {\n return table[uiLanguage(resolveLocale(locale))]\n}\n\n/** The currency `format=\"currency\"` uses without a `currency`: JPY for Japanese, USD otherwise. */\nexport function defaultCurrency(locale?: string | null): string {\n return uiLanguage(resolveLocale(locale)) === \"ja\" ? \"JPY\" : \"USD\"\n}\n\n/** The month a fiscal year starts in (1–12) when none is given: April for Japanese, January otherwise. */\nexport function defaultFiscalYearStartMonth(locale?: string | null): number {\n return uiLanguage(resolveLocale(locale)) === \"ja\" ? 4 : 1\n}\n\n/** A day of the week, 0 = Sunday … 6 = Saturday (the `Date#getDay` / date-fns numbering). */\nexport type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6\n\n/** Locales whose week starts on Sunday when the runtime has no week data. */\nconst SUNDAY_FIRST = new Set([\"en\", \"en-US\", \"en-CA\"])\n\n/**\n * The first day of the week: Monday for Japanese; otherwise the locale's convention from `Intl.Locale`\n * (`en-US` Sunday, `en-GB` Monday). Without week data in the runtime: Sunday for `en` / `en-US` / `en-CA`,\n * Monday for the rest.\n */\nexport function weekStartsOn(locale?: string | null): WeekDay {\n const tag = normalizeLocale(resolveLocale(locale))\n if (uiLanguage(tag) === \"ja\") return 1\n try {\n const info = new Intl.Locale(tag) as Intl.Locale & {\n getWeekInfo?: () => { firstDay: number }\n weekInfo?: { firstDay: number }\n }\n const firstDay = info.getWeekInfo?.().firstDay ?? info.weekInfo?.firstDay\n if (typeof firstDay === \"number\" && firstDay >= 1 && firstDay <= 7) return (firstDay % 7) as WeekDay\n } catch {\n // Fall through to the table below.\n }\n return SUNDAY_FIRST.has(tag) ? 0 : 1\n}\n","import { useSyncExternalStore } from \"react\"\n\nimport { documentLocale, FALLBACK_LOCALE } from \"../lib/locale\"\n\nconst listeners = new Set<() => void>()\nlet observer: MutationObserver | null = null\n\n/** One observer on `<html lang>` for every subscribed part. */\nfunction subscribe(onChange: () => void): () => void {\n if (typeof document === \"undefined\" || typeof MutationObserver === \"undefined\") return () => {}\n listeners.add(onChange)\n if (!observer) {\n observer = new MutationObserver(() => {\n for (const listener of [...listeners]) listener()\n })\n observer.observe(document.documentElement, { attributes: true, attributeFilter: [\"lang\"] })\n }\n return () => {\n listeners.delete(onChange)\n if (listeners.size === 0 && observer) {\n observer.disconnect()\n observer = null\n }\n }\n}\n\nconst serverLocale = () => FALLBACK_LOCALE\n\n/**\n * The page's locale (`<html lang>`), following changes made while the page runs. On the server and during\n * hydration it is `FALLBACK_LOCALE` (`en-US`), so the markup matches; it switches right after.\n */\nexport function useDocumentLocale(): string {\n return useSyncExternalStore(subscribe, documentLocale, serverLocale)\n}\n\n/** The locale a part renders in: its `locale` prop when given, else the page's (`useDocumentLocale`). */\nexport function useLocale(locale?: string | null): string {\n const page = useDocumentLocale()\n return locale || page\n}\n"]}
@@ -1,9 +1,26 @@
1
- import { formatDelta } from './chunk-57GHR5LN.js';
1
+ import { formatDelta } from './chunk-3RJEOP3J.js';
2
+ import { useLocale, uiLanguage } from './chunk-ROHNXP7J.js';
2
3
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
3
4
 
4
5
  // @squadbase/vantage — generated build. Do not edit.
5
6
  var MUTED = { color: "var(--doc-muted)" };
6
- function DeltaText({ value, format, betterWhen = "up", comparisonLabel }) {
7
+ var TEXT = {
8
+ ja: {
9
+ up: "\u5897",
10
+ down: "\u6E1B",
11
+ flat: "\u6A2A\u3070\u3044",
12
+ label: (word, text, good) => `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`
13
+ },
14
+ en: {
15
+ up: "Up",
16
+ down: "Down",
17
+ flat: "Flat",
18
+ label: (word, text, good) => `${word}, ${text}${good === void 0 ? "" : good ? ", improved" : ", worsened"}`
19
+ }
20
+ };
21
+ function DeltaText({ value, format, betterWhen = "up", comparisonLabel, locale: localeProp }) {
22
+ const locale = useLocale(localeProp);
23
+ const t = TEXT[uiLanguage(locale)];
7
24
  const label = comparisonLabel ? /* @__PURE__ */ jsxs("span", { style: MUTED, children: [
8
25
  comparisonLabel,
9
26
  " "
@@ -16,10 +33,10 @@ function DeltaText({ value, format, betterWhen = "up", comparisonLabel }) {
16
33
  }
17
34
  const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
18
35
  const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
19
- const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
36
+ const word = t[dir];
20
37
  const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
21
38
  const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
22
- const text = formatDelta(value, format);
39
+ const text = formatDelta(value, format, locale);
23
40
  return /* @__PURE__ */ jsxs(Fragment, { children: [
24
41
  label,
25
42
  /* @__PURE__ */ jsxs(
@@ -28,7 +45,7 @@ function DeltaText({ value, format, betterWhen = "up", comparisonLabel }) {
28
45
  "data-slot": "delta-text",
29
46
  className: tone,
30
47
  style: tone ? void 0 : MUTED,
31
- "aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
48
+ "aria-label": t.label(word, text, good),
32
49
  children: [
33
50
  mark,
34
51
  " ",
@@ -40,5 +57,5 @@ function DeltaText({ value, format, betterWhen = "up", comparisonLabel }) {
40
57
  }
41
58
 
42
59
  export { DeltaText };
43
- //# sourceMappingURL=chunk-6OTTGAPO.js.map
44
- //# sourceMappingURL=chunk-6OTTGAPO.js.map
60
+ //# sourceMappingURL=chunk-TRMHNMMZ.js.map
61
+ //# sourceMappingURL=chunk-TRMHNMMZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../squadkit/registry/blocks/delta-text/delta-text.tsx"],"names":[],"mappings":";;;;;AAgCA,IAAM,KAAA,GAAQ,EAAE,KAAA,EAAO,kBAAA,EAAmB;AAE1C,IAAM,IAAA,GAAO;AAAA,EACX,EAAA,EAAI;AAAA,IACF,EAAA,EAAI,QAAA;AAAA,IACJ,IAAA,EAAM,QAAA;AAAA,IACN,IAAA,EAAM,oBAAA;AAAA,IACN,KAAA,EAAO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,EAAA,MAAM,OAAO,GAAA,KAAQ,IAAA,GAAO,QAAA,GAAM,GAAA,KAAQ,SAAS,QAAA,GAAM,QAAA;AACzD,EAAA,MAAM,IAAA,GAAO,EAAE,GAAG,CAAA;AAClB,EAAA,MAAM,OAAO,GAAA,KAAQ,MAAA,GAAS,MAAA,GAAa,GAAA,KAAQ,UAAW,UAAA,KAAe,IAAA,CAAA;AAC7E,EAAA,MAAM,IAAA,GAAO,IAAA,KAAS,MAAA,GAAY,MAAA,GAAY,OAAO,eAAA,GAAkB,eAAA;AACvE,EAAA,MAAM,IAAA,GAAO,WAAA,CAAY,KAAA,EAAO,MAAA,EAAQ,MAAM,CAAA;AAC9C,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,IAAA,KAAA;AAAA,oBACD,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACC,WAAA,EAAU,YAAA;AAAA,QACV,SAAA,EAAW,IAAA;AAAA,QACX,KAAA,EAAO,OAAO,MAAA,GAAY,KAAA;AAAA,QAC1B,YAAA,EAAY,CAAA,CAAE,KAAA,CAAM,IAAA,EAAM,MAAM,IAAI,CAAA;AAAA,QAEnC,QAAA,EAAA;AAAA,UAAA,IAAA;AAAA,UAAK,GAAA;AAAA,UAAE;AAAA;AAAA;AAAA;AACV,GAAA,EACF,CAAA;AAEJ","file":"chunk-TRMHNMMZ.js","sourcesContent":["\"use client\"\n\n/**\n * delta-text — a change as a bare inline `span`: mark + signed value (\"▲ +3.2%\"), so print and\n * colour-blind readers get the direction; colour only adds good / bad. It sets no text size, so it\n * takes the size of the line it sits in (doc blocks, slide text).\n *\n * - The direction comes from the sign of `value`; `betterWhen` (\"up\" by default; `\"down\"` for churn,\n * cost) decides good / bad. Zero is \"→\" in the muted colour; `null` is \"—\".\n * - `value` is the change itself, formatted by `format` with an explicit sign.\n * - `comparisonLabel` (\"前月比\") is printed in front, muted.\n *\n * @example\n * import { DeltaText } from \"@/blocks/delta-text/delta-text\"\n * <DeltaText value={0.032} format=\"percent\" comparisonLabel=\"前月比\" />\n */\nimport { useLocale } from \"../../hooks/use-locale\"\nimport { formatDelta, type ValueFormat } from \"../../lib/format\"\nimport { uiLanguage } from \"../../lib/locale\"\n\nexport interface DeltaTextProps {\n /** The change itself; its direction comes from the sign. `null` shows \"—\". */\n value: number | null\n format?: ValueFormat\n /** Which way is good. Default `\"up\"`. */\n betterWhen?: \"up\" | \"down\"\n /** Name of the comparison, e.g. \"前月比\". Printed before the change; omit to print only the change. */\n comparisonLabel?: string\n /** Locale of the value and the screen-reader text. Default the page's (`<html lang>`). */\n locale?: string\n}\n\nconst MUTED = { color: \"var(--doc-muted)\" } as const\n\nconst TEXT = {\n ja: {\n up: \"増\",\n down: \"減\",\n flat: \"横ばい\",\n label: (word: string, text: string, good: boolean | undefined) =>\n `${word}、${text}${good === undefined ? \"\" : good ? \"、改善\" : \"、悪化\"}`,\n },\n en: {\n up: \"Up\",\n down: \"Down\",\n flat: \"Flat\",\n label: (word: string, text: string, good: boolean | undefined) =>\n `${word}, ${text}${good === undefined ? \"\" : good ? \", improved\" : \", worsened\"}`,\n },\n}\n\nexport function DeltaText({ value, format, betterWhen = \"up\", comparisonLabel, locale: localeProp }: DeltaTextProps) {\n const locale = useLocale(localeProp)\n const t = TEXT[uiLanguage(locale)]\n const label = comparisonLabel ? <span style={MUTED}>{comparisonLabel} </span> : null\n if (value === null) {\n return (\n <>\n {label}\n <span data-slot=\"delta-text\" style={MUTED}>\n —\n </span>\n </>\n )\n }\n const dir = value > 0 ? \"up\" : value < 0 ? \"down\" : \"flat\"\n const mark = dir === \"up\" ? \"▲\" : dir === \"down\" ? \"▼\" : \"→\"\n const word = t[dir]\n const good = dir === \"flat\" ? undefined : (dir === \"up\") === (betterWhen === \"up\")\n const tone = good === undefined ? undefined : good ? \"text-positive\" : \"text-negative\"\n const text = formatDelta(value, format, locale)\n return (\n <>\n {label}\n <span\n data-slot=\"delta-text\"\n className={tone}\n style={tone ? undefined : MUTED}\n aria-label={t.label(word, text, good)}\n >\n {mark} {text}\n </span>\n </>\n )\n}\n\nexport default DeltaText\n"]}
package/dist/cli.js CHANGED
@@ -50,15 +50,15 @@ ${pc.bold("Options")}
50
50
  -h, --help Print this help
51
51
  `;
52
52
  var COMMANDS = {
53
- dev: () => import('./dev-H4I2JL63.js').then((m) => m.dev),
54
- build: () => import('./build-A23M4GCH.js').then((m) => m.build),
53
+ dev: () => import('./dev-O42JFQ64.js').then((m) => m.dev),
54
+ build: () => import('./build-U7GO26HR.js').then((m) => m.build),
55
55
  preview: () => import('./preview-T6CLSQVX.js').then((m) => m.preview),
56
- check: () => import('./check-FBHT6W6J.js').then((m) => m.check),
56
+ check: () => import('./check-MRVAIHG5.js').then((m) => m.check),
57
57
  routes: () => import('./routes-PVKNT777.js').then((m) => m.routes),
58
58
  add: () => import('./add-4GHF2TX2.js').then((m) => m.add),
59
59
  docs: () => import('./docs-JVP4RPKT.js').then((m) => m.docs),
60
60
  search: () => import('./search-5LC4XPB5.js').then((m) => m.search),
61
- doctor: () => import('./doctor-B2O3GJDU.js').then((m) => m.doctor),
61
+ doctor: () => import('./doctor-YD3XAAOT.js').then((m) => m.doctor),
62
62
  upgrade: () => import('./upgrade-6DT7ADRP.js').then((m) => m.upgrade)
63
63
  };
64
64
  var NO_ROOT_POSITIONAL = /* @__PURE__ */ new Set(["add", "docs", "search"]);
@@ -4,8 +4,8 @@ import { HTMLAttributes, ReactNode, ComponentType, ElementType, Ref, ReactElemen
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import { EChartsOption } from 'echarts';
6
6
  export { EChartsOption } from 'echarts';
7
- import { V as ValueFormat, a as DateStyle } from '../format-U0cQl069.js';
8
- export { D as DEFAULT_LOCALE, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatKind, c as FormatValueOptions, M as MINUS_SIGN, f as formatDate, d as formatDateRange, e as formatDatesInText, g as formatDelta, h as formatKind, i as formatPoints, j as formatValue, t as toValueFormatter } from '../format-U0cQl069.js';
7
+ import { V as ValueFormat, a as DateStyle } from '../format-DihQkL1N.js';
8
+ export { D as DEFAULT_LOCALE, E as EMPTY_VALUE, F as FormatDateOptions, b as FormatKind, c as FormatValueOptions, M as MINUS_SIGN, f as formatDate, d as formatDateRange, e as formatDatesInText, g as formatDelta, h as formatKind, i as formatPoints, j as formatValue, t as toValueFormatter } from '../format-DihQkL1N.js';
9
9
  import { RowData, ColumnDef, SortingState, OnChangeFn, ColumnFiltersState, PaginationState, RowSelectionState, VisibilityState, TableMeta, Table } from '@tanstack/react-table';
10
10
  export { ColumnDef, ColumnFiltersState, PaginationState, RowSelectionState, SortingState, VisibilityState } from '@tanstack/react-table';
11
11
  export { DateRange as RdpDateRange } from 'react-day-picker';
@@ -35,7 +35,7 @@ interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {
35
35
  updatedAtVariant?: UpdatedAtProps["variant"];
36
36
  /** IANA time zone for the absolute time of `updatedAt`. Defaults to the runtime's zone. */
37
37
  timeZone?: string;
38
- /** Where the data comes from. Shown as a chip "出典:○○" on the second row. */
38
+ /** Where the data comes from. Shown as a chip "Source: ○○" (ja: "出典:○○") on the second row. */
39
39
  source?: string;
40
40
  /** The period the data covers. Shown as a chip "2026/9/23〜10/20" on the second row. */
41
41
  period?: {
@@ -532,9 +532,10 @@ declare const EChart: React.ForwardRefExoticComponent<EChartProps & React.RefAtt
532
532
  * the baseline is a non-zero number; small moves inside the neutral band read
533
533
  * as flat, and polarity decides whether up is good or bad.
534
534
  *
535
- * Labels follow Japanese business usage and come from the grain of the period:
536
- * a monthly KPI compares "前月比" / "前年同月比", a quarterly one "前四半期比" /
537
- * "前年同期比". Without a grain the label is the generic "前期比".
535
+ * Labels come from the grain of the period, in the locale's language (`<html lang>` unless a
536
+ * `locale` is passed): a monthly KPI compares "vs. prior month" / "vs. same month last year"
537
+ * (ja: "前月比" / "前年同月比"), a quarterly one "前四半期比" / "前年同期比" in ja. Without a
538
+ * grain the label is the generic "vs. prior period" (ja: "前期比").
538
539
  *
539
540
  * A running total of a period still in progress (年初来・月初来 = YTD / MTD) sets
540
541
  * `toDate: true`: a `prior-year` baseline is then the same stretch of the prior year,
@@ -575,18 +576,24 @@ type Comparison = (ComparisonBase & {
575
576
  /** The badge's full name: `"昨日比"` / `"先週の同じ曜日比"`. The previous-actual line drops one trailing "比" ("昨日 617"). */
576
577
  label: string;
577
578
  });
578
- /** Labels used when the grain is unknown. A `custom` comparison always brings its own `label`. */
579
+ /**
580
+ * Labels used when the grain is unknown, in English (the fallback language). A `custom` comparison always brings
581
+ * its own `label`. The parts pick the language from `<html lang>` (`comparisonLabel`): ja reads "前期比" / "前年同期比" / "目標比".
582
+ */
579
583
  declare const COMPARISON_LABELS: Record<Exclude<ComparisonKind, "custom">, string>;
580
584
  /**
581
- * What the previous value is called: "前月" / "前年同月" / "目標"; with a `label`, that label minus one trailing "比" ("昨日比" → "昨日").
582
- * `toDate` (a running total such as YTD) turns a `prior-year` baseline into "前年同期" whatever the grain.
585
+ * What the previous value is called: "prior month" / "same month last year" / "target" (ja: "前月" / "前年同月" / "目標");
586
+ * with a `label`, that label minus its comparison word ("昨日比" → "昨日", "vs. yesterday" → "yesterday").
587
+ * `toDate` (a running total such as YTD) turns a `prior-year` baseline into "same period last year" (ja: "前年同期") whatever the grain.
588
+ * `locale` picks the language; default the page's (`<html lang>`).
583
589
  */
584
- declare function comparisonBaseline(vs: ComparisonKind, grain?: PeriodGrain, label?: string, toDate?: boolean): string;
590
+ declare function comparisonBaseline(vs: ComparisonKind, grain?: PeriodGrain, label?: string, toDate?: boolean, locale?: string): string;
585
591
  /**
586
- * The comparison label: "前月比" for `("prior-period", "month")`, "前期比" without a grain; a given `label` as is.
587
- * A running total (`toDate`) against the prior year is "前年同期比", not "前年比".
592
+ * The comparison label: "vs. prior month" (ja: "前月比") for `("prior-period", "month")`, "vs. prior period" (ja: "前期比")
593
+ * without a grain; a given `label` as is. A running total (`toDate`) against the prior year is "vs. same period last year"
594
+ * (ja: "前年同期比"), not "vs. prior year" (ja: "前年比"). `locale` picks the language; default the page's (`<html lang>`).
588
595
  */
589
- declare function comparisonLabel(vs: ComparisonKind, grain?: PeriodGrain, label?: string, toDate?: boolean): string;
596
+ declare function comparisonLabel(vs: ComparisonKind, grain?: PeriodGrain, label?: string, toDate?: boolean, locale?: string): string;
590
597
  type DeltaDirection = "up" | "down" | "flat" | "none";
591
598
  type DeltaSentiment = "positive" | "negative" | "neutral";
592
599
  interface ComparisonResult {
@@ -605,6 +612,8 @@ interface ComparisonOptions {
605
612
  polarity?: Polarity;
606
613
  /** Absolute ratio below which the change reads as flat (0.01 = 1%). Default 0.01. */
607
614
  neutralBand?: number;
615
+ /** Locale of the derived `label`. Default the page's (`<html lang>`). */
616
+ locale?: string;
608
617
  }
609
618
  declare function computeComparison(current: number | null | undefined, comparison: Comparison, options?: ComparisonOptions): ComparisonResult;
610
619
  /**
@@ -1761,7 +1770,7 @@ interface DataTableExportProps {
1761
1770
  * <DataTableExport scope="page" />
1762
1771
  */
1763
1772
  scope?: CsvScope;
1764
- /** ボタンの文言。既定 `"CSV を書き出す"`。 */
1773
+ /** ボタンの文言。既定はページの言語で `"CSV を書き出す"`(英語は `"Export CSV"`)。 */
1765
1774
  children?: ReactNode;
1766
1775
  className?: string;
1767
1776
  }
@@ -1822,13 +1831,15 @@ declare function toCsv(header: string[], rows: CsvCell[][], options?: {
1822
1831
  }): string;
1823
1832
  /**
1824
1833
  * 表の現在の状態から CSV を作る。行は画面と同じ並べ替え・絞り込み後の順、列は表示中の列のみ。
1834
+ * `"display"` の書式のロケールは `locale`(既定はページのロケール、`<html lang>`)。
1825
1835
  *
1826
1836
  * @example
1827
1837
  * const csv = tableToCsv(table, { values: "raw", scope: "page" })
1828
1838
  */
1829
- declare function tableToCsv<TData>(table: Table<TData>, { values, scope }?: {
1839
+ declare function tableToCsv<TData>(table: Table<TData>, { values, scope, locale: localeArg }?: {
1830
1840
  values?: CsvValues;
1831
1841
  scope?: CsvScope;
1842
+ locale?: string;
1832
1843
  }): string;
1833
1844
  /** toolbar に置く CSV 書き出しボタン。`useDataTable()` の table から画面と同じ順・同じ集合を書き出す。 */
1834
1845
  declare function DataTableExport({ fileName, values, scope, children, className, }: DataTableExportProps): React.JSX.Element;
@@ -1887,7 +1898,7 @@ declare namespace FilterBarActiveChips {
1887
1898
  var displayName: string;
1888
1899
  }
1889
1900
  interface FilterBarClearButtonProps {
1890
- /** Override the button label. Defaults to "クリア". */
1901
+ /** Override the button label. Defaults to "Clear" (ja: "クリア"). */
1891
1902
  label?: string;
1892
1903
  className?: string;
1893
1904
  }
@@ -1908,7 +1919,11 @@ declare namespace FilterBarPreset {
1908
1919
  var displayName: string;
1909
1920
  }
1910
1921
 
1911
- /** 既定のプリセット(英語・4 月始まり)。`locale` / `fiscalYearStartMonth` を変えるなら `createDatePresets` か DateRangePicker の同名 props。 */
1922
+ /**
1923
+ * フォールバック(`en-US`:英語・1 月始まり・日曜始まり)のプリセット。DateRangePicker は `presets` を渡さなければ
1924
+ * ページのロケールからプリセットを作るので、これを渡す必要はない。`locale` / `fiscalYearStartMonth` を変えるなら
1925
+ * `createDatePresets` か DateRangePicker の同名 props。
1926
+ */
1912
1927
  declare const defaultPresets: PresetItem[];
1913
1928
  interface DateRangePickerProps {
1914
1929
  /**
@@ -1934,16 +1949,16 @@ interface DateRangePickerProps {
1934
1949
  presets?: PresetItem[];
1935
1950
  showPresets?: boolean;
1936
1951
  /**
1937
- * プリセットのラベルとカレンダーの月名・曜日の言語。`ja*` なら日本語、それ以外は英語。既定 `"en-US"`(英語)。
1938
- * 他部品の既定は ja-JP だが、この部品は従来のプリセットが英語だったので既存の見た目を保つため英語を既定にしている。
1952
+ * プリセットのラベル・日付の書式・カレンダーの月名と曜日・週の始まりのロケール。`ja*` なら日本語、それ以外は英語。
1953
+ * 既定はページのロケール(`<html lang>`、無ければ `"en-US"`)。
1939
1954
  *
1940
1955
  * @example
1941
1956
  * <DateRangePicker locale="ja-JP" />
1942
1957
  */
1943
1958
  locale?: string;
1944
1959
  /**
1945
- * 年度の開始月(1-12)。「今年度」「前年度」と、年度基準の「今四半期」「前四半期」の区切りになる。既定 `4`(4 月始まり)。
1946
- * 範囲外・整数でない値は 4 として扱う。
1960
+ * 年度の開始月(1-12)。「今年度」「前年度」と、年度基準の「今四半期」「前四半期」の区切りになる。
1961
+ * 既定はロケールで決まる(ja は `4`、それ以外は `1`)。範囲外・整数でない値はその既定として扱う。
1947
1962
  *
1948
1963
  * @example
1949
1964
  * <DateRangePicker fiscalYearStartMonth={1} />
@@ -2071,8 +2086,9 @@ declare const RECORD_MIN_POINTS = 6;
2071
2086
  /**
2072
2087
  * The latest point is a record when it beats every earlier finite point:
2073
2088
  * strictly highest for higher-is-better, strictly lowest for lower-is-better.
2089
+ * `locale` picks the language of `label` ("Highest in 12 months" / "過去 12 か月で最高"); default the page's (`<html lang>`).
2074
2090
  */
2075
- declare function detectRecord(history: ReadonlyArray<number | null | undefined> | null | undefined, grain?: PeriodGrain, polarity?: Polarity): RecordInsight | null;
2091
+ declare function detectRecord(history: ReadonlyArray<number | null | undefined> | null | undefined, grain?: PeriodGrain, polarity?: Polarity, locale?: string): RecordInsight | null;
2076
2092
 
2077
2093
  interface KpiCardSource {
2078
2094
  /** Period the data covers (e.g. "2023-04 以降"). ISO year-months / dates in it are written by the card ("2023年4月 以降"). */
@@ -2097,11 +2113,11 @@ interface KpiCardProps extends Omit<ComponentProps<"div">, "children"> {
2097
2113
  value: number | null | undefined;
2098
2114
  /**
2099
2115
  * Value format, also used for previous / target / remaining. Default `"compact"`.
2100
- * `"currency"` is JPY in 万・億; `"percent"` takes a ratio (0.021 → 2.1%) and
2116
+ * `"currency"` is JPY in 万・億 on a ja page (USD in K・M・B otherwise); `"percent"` takes a ratio (0.021 → 2.1%) and
2101
2117
  * switches the delta to points. See `formatValue` for the full table.
2102
2118
  */
2103
2119
  format?: ValueFormat;
2104
- /** Default `"ja-JP"`. */
2120
+ /** Locale of the numbers and the built-in wording. Default: the page's (`<html lang>`, else `"en-US"`). */
2105
2121
  locale?: string;
2106
2122
  /**
2107
2123
  * What the value is compared against; drives the delta (tier 3) and previous line (tier 4).
@@ -2199,7 +2215,7 @@ interface KpiCardProps extends Omit<ComponentProps<"div">, "children"> {
2199
2215
  */
2200
2216
  declare function fillKpiTemplate(template: string, values: Readonly<Record<string, string | null | undefined>>): string;
2201
2217
  declare function fillKpiTemplate(template: string, values: Readonly<Record<string, string | null | undefined>>, fallback: string | null): string | null;
2202
- declare function KpiCard({ label, value, format, locale, comparison: comparisonProp, comparisons, provisional, betterWhen, polarity: polarityProp, change, neutralBand, showPrevious, summary, target, targetLabel, targetDisplay, period, history, historyGrain, showHistory, source, updatedAt, updatedAtDisplay, timeZone, now, isLoading, size, className, ...props }: KpiCardProps): React.JSX.Element;
2218
+ declare function KpiCard({ label, value, format, locale: localeProp, comparison: comparisonProp, comparisons, provisional, betterWhen, polarity: polarityProp, change, neutralBand, showPrevious, summary, target, targetLabel, targetDisplay, period, history, historyGrain, showHistory, source, updatedAt, updatedAtDisplay, timeZone, now, isLoading, size, className, ...props }: KpiCardProps): React.JSX.Element;
2203
2219
 
2204
2220
  declare const deltaVariants: (props?: ({
2205
2221
  variant?: "inline" | "badge" | null | undefined;
@@ -2228,7 +2244,7 @@ interface DeltaProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">,
2228
2244
  * 同じカード群で桁がばらつかないよう、全部に同じ値を渡す。未指定は 1 桁("+14.0%")。`"points"` は未指定のとき `format.digits` に従う。
2229
2245
  */
2230
2246
  digits?: number;
2231
- /** Locale for the change. Default `"ja-JP"`. */
2247
+ /** Locale for the change and its label. Default: the page's (`<html lang>`, else `"en-US"`). */
2232
2248
  locale?: string;
2233
2249
  /** Show the comparison label ("前月比") after the change. Default true. */
2234
2250
  showLabel?: boolean;
@@ -2271,7 +2287,11 @@ interface PlaceholderProps extends HTMLAttributes<HTMLSpanElement> {
2271
2287
  }
2272
2288
  declare const Placeholder: React.ForwardRefExoticComponent<PlaceholderProps & React.RefAttributes<HTMLSpanElement>>;
2273
2289
 
2274
- declare const DEFAULT_SAMPLE_LABEL = "\u898B\u672C\u306E\u5024";
2290
+ /**
2291
+ * The mark's wording in English (the fallback language). Without a `label`, the mark follows the page's
2292
+ * language (`<html lang>`): ja reads「見本の値」.
2293
+ */
2294
+ declare const DEFAULT_SAMPLE_LABEL: string;
2275
2295
  interface SampleState {
2276
2296
  label: string;
2277
2297
  }
@@ -2285,12 +2305,12 @@ declare function SampleClaim({ children }: {
2285
2305
  children?: ReactNode;
2286
2306
  }): React.JSX.Element;
2287
2307
  interface SampleBadgeProps extends HTMLAttributes<HTMLSpanElement> {
2288
- /** 印の文言。既定「見本の値」。 */
2308
+ /** 印の文言。既定はページの言語で「見本の値」(英語は "Sample data")。 */
2289
2309
  label?: string;
2290
2310
  }
2291
2311
  declare function SampleBadge({ label, className, ...props }: SampleBadgeProps): React.JSX.Element;
2292
2312
  interface SampleDataProps {
2293
- /** 印の文言。既定「見本の値」。 */
2313
+ /** 印の文言。既定はページの言語で「見本の値」(英語は "Sample data")。 */
2294
2314
  label?: string;
2295
2315
  children?: ReactNode;
2296
2316
  }
@@ -1,9 +1,9 @@
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-QOXXOFGL.js';
2
- export { EChart, useResolvedChartColors } from '../chunk-JXFCSF3K.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-77CISBMG.js';
2
+ export { EChart, useResolvedChartColors } from '../chunk-EG4PX726.js';
3
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';
4
+ export { DEFAULT_LOCALE, EMPTY_VALUE, MINUS_SIGN, formatDate, formatDateRange, formatDatesInText, formatDelta, formatKind, formatPoints, formatValue, toValueFormatter } from '../chunk-3RJEOP3J.js';
5
+ import '../chunk-QNOX7WLZ.js';
6
+ import '../chunk-ROHNXP7J.js';
7
7
  import '../chunk-U736PVHY.js';
8
8
  //# sourceMappingURL=index.js.map
9
9
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { V as ValueFormat } from './format-U0cQl069.js';
2
+ import { V as ValueFormat } from './format-DihQkL1N.js';
3
3
 
4
4
  interface DeltaTextProps {
5
5
  /** The change itself; its direction comes from the sign. `null` shows "—". */
@@ -9,7 +9,9 @@ interface DeltaTextProps {
9
9
  betterWhen?: "up" | "down";
10
10
  /** Name of the comparison, e.g. "前月比". Printed before the change; omit to print only the change. */
11
11
  comparisonLabel?: string;
12
+ /** Locale of the value and the screen-reader text. Default the page's (`<html lang>`). */
13
+ locale?: string;
12
14
  }
13
- declare function DeltaText({ value, format, betterWhen, comparisonLabel }: DeltaTextProps): React.JSX.Element;
15
+ declare function DeltaText({ value, format, betterWhen, comparisonLabel, locale: localeProp }: DeltaTextProps): React.JSX.Element;
14
16
 
15
17
  export { DeltaText as D, type DeltaTextProps as a };
@@ -1,4 +1,4 @@
1
- import { runDiagnostics } from './chunk-5C2SEDPH.js';
1
+ import { runDiagnostics } from './chunk-PJ4SPXHS.js';
2
2
  import './chunk-UWSQUHX6.js';
3
3
  import { vantagePlugin } from './chunk-SDJTTMLK.js';
4
4
  import './chunk-SHZM3EXB.js';
@@ -77,5 +77,5 @@ async function dev(root, args) {
77
77
  }
78
78
 
79
79
  export { dev };
80
- //# sourceMappingURL=dev-H4I2JL63.js.map
81
- //# sourceMappingURL=dev-H4I2JL63.js.map
80
+ //# sourceMappingURL=dev-O42JFQ64.js.map
81
+ //# sourceMappingURL=dev-O42JFQ64.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/cli/dev.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAkBA,eAAsB,GAAA,CAAI,MAAc,IAAA,EAAmC;AACzE,EAAA,MAAM,KAAA,GAAQ,YAAY,IAAI,CAAA;AAC9B,EAAA,MAAM,MAAA,GAAS,cAAA,CAAe,IAAA,EAAM,KAAK,CAAA,CAAE,OAAO,CAAC,CAAA,KAAM,CAAA,CAAE,QAAA,KAAa,OAAO,CAAA;AAC/E,EAAA,IAAI,OAAO,MAAA,EAAQ;AACjB,IAAA,gBAAA,CAAiB,MAAM,CAAA;AACvB,IAAA,GAAA,CAAI,MAAM,sDAAsD,CAAA;AAChE,IAAA,OAAO,CAAA;AAAA,EACT;AAEA,EAAA,MAAM,IAAA,GAAO,aAAA;AACb,EAAA,mBAAA,CAAoB,IAAI,CAAA;AACxB,EAAA,MAAM,GAAA,GAAM,EAAE,GAAG,OAAA,CAAQ,GAAA,EAAK,GAAG,OAAA,CAAQ,IAAA,EAAM,IAAA,EAAM,EAAE,CAAA,EAAE;AACzD,EAAA,MAAM,KAAA,GAAQ,kBAAA,CAAmB,IAAA,CAAK,KAAA,EAAO,IAAI,CAAA;AACjD,EAAA,IAAI,CAAC,MAAM,EAAA,EAAI;AACb,IAAA,GAAA,CAAI,KAAA,CAAM,MAAM,KAAK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ACnD,IAAA,MAAM,GAAA;AAAA,EACR;AACA,EAAA,GAAA,CAAI,MAAM,kBAAkB,CAAA;AAC5B,EAAA,MAAA,CAAO,SAAA,EAAU;AACjB,EAAA,IAAI,KAAA,CAAM,SAAA,EAAW,GAAA,CAAI,IAAA,CAAK,sBAA2B,CAAA;AAEzD,EAAA,MAAM,WAAW,YAAY;AAC3B,IAAA,MAAM,OAAO,KAAA,EAAM;AACnB,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAChB,CAAA;AACA,EAAA,OAAA,CAAQ,EAAA,CAAG,UAAU,QAAQ,CAAA;AAC7B,EAAA,OAAA,CAAQ,EAAA,CAAG,WAAW,QAAQ,CAAA;AAG9B,EAAA,OAAO,IAAI,QAAgB,MAAM;AAAA,EAAC,CAAC,CAAA;AACrC","file":"dev-H4I2JL63.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":";;;;;;;;;;;;;AAkBA,eAAsB,GAAA,CAAI,MAAc,IAAA,EAAmC;AACzE,EAAA,MAAM,KAAA,GAAQ,YAAY,IAAI,CAAA;AAC9B,EAAA,MAAM,MAAA,GAAS,cAAA,CAAe,IAAA,EAAM,KAAK,CAAA,CAAE,OAAO,CAAC,CAAA,KAAM,CAAA,CAAE,QAAA,KAAa,OAAO,CAAA;AAC/E,EAAA,IAAI,OAAO,MAAA,EAAQ;AACjB,IAAA,gBAAA,CAAiB,MAAM,CAAA;AACvB,IAAA,GAAA,CAAI,MAAM,sDAAsD,CAAA;AAChE,IAAA,OAAO,CAAA;AAAA,EACT;AAEA,EAAA,MAAM,IAAA,GAAO,aAAA;AACb,EAAA,mBAAA,CAAoB,IAAI,CAAA;AACxB,EAAA,MAAM,GAAA,GAAM,EAAE,GAAG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,UAAA,CAAW,aAAA,EAAe,MAAM,MAAA,CAAO,QAAQ,CAAA;AAAA,EACvD,SAAS,GAAA,EAAK;AACZ,IAAA,MAAM,MAAA,CAAO,KAAA,EAAM,CAAE,KAAA,CAAM,MAAM;AAAA,IAAC,CAAC,CAAA;AACnC,IAAA,IAAI,eAAA,CAAgB,GAAA,EAAK,IAAA,EAAM,UAAU,GAAG,OAAO,CAAA;AACnD,IAAA,MAAM,GAAA;AAAA,EACR;AACA,EAAA,GAAA,CAAI,MAAM,kBAAkB,CAAA;AAC5B,EAAA,MAAA,CAAO,SAAA,EAAU;AACjB,EAAA,IAAI,KAAA,CAAM,SAAA,EAAW,GAAA,CAAI,IAAA,CAAK,sBAA2B,CAAA;AAEzD,EAAA,MAAM,WAAW,YAAY;AAC3B,IAAA,MAAM,OAAO,KAAA,EAAM;AACnB,IAAA,OAAA,CAAQ,KAAK,CAAC,CAAA;AAAA,EAChB,CAAA;AACA,EAAA,OAAA,CAAQ,EAAA,CAAG,UAAU,QAAQ,CAAA;AAC7B,EAAA,OAAA,CAAQ,EAAA,CAAG,WAAW,QAAQ,CAAA;AAG9B,EAAA,OAAO,IAAI,QAAgB,MAAM;AAAA,EAAC,CAAC,CAAA;AACrC","file":"dev-O42JFQ64.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,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { HTMLAttributes, ReactNode } from 'react';
3
- import { V as ValueFormat } from '../format-U0cQl069.js';
4
- export { D as DeltaText, a as DeltaTextProps } from '../delta-text-CvwBGJ95.js';
3
+ import { V as ValueFormat } from '../format-DihQkL1N.js';
4
+ export { D as DeltaText, a as DeltaTextProps } from '../delta-text-CbrOaW83.js';
5
5
 
6
6
  /**
7
7
  * Per-document token overrides. Anything left out falls through to `--doc-*`
@@ -53,7 +53,7 @@ interface DocActionItem {
53
53
  priority?: DocActionPriority;
54
54
  }
55
55
  interface DocActionItemsProps {
56
- /** Heading text. Default "推奨する対応". */
56
+ /** Heading text. Default "Recommended actions" (ja: "推奨する対応"). */
57
57
  title?: string;
58
58
  /** `2` directly under the document, `3` inside another section. Default 2. */
59
59
  headingLevel?: 2 | 3;
@@ -97,7 +97,7 @@ interface DocDataTableProps {
97
97
  text: string;
98
98
  }[];
99
99
  source?: string;
100
- /** When the data was taken: a date only, e.g. "2026-10-03". "データ時点" is added here. */
100
+ /** When the data was taken: a date only, e.g. "2026-10-03". "Data as of" (ja: "データ時点") is added here. */
101
101
  asOf?: string;
102
102
  }
103
103
  declare function DocDataTable({ title, unit, columns, rows, total, highlightRows, footnotes, source, asOf }: DocDataTableProps): React.JSX.Element;
@@ -113,13 +113,13 @@ interface DocSummaryMetric {
113
113
  value: number;
114
114
  format?: ValueFormat;
115
115
  };
116
- /** Name of the comparison, e.g. "前月比". Default "前期比". */
116
+ /** Name of the comparison, e.g. "前月比". Default "vs. prior period" (ja: "前期比"). */
117
117
  comparisonLabel?: string;
118
118
  /** Which way is good. Default `"up"`. */
119
119
  betterWhen?: "up" | "down";
120
120
  }
121
121
  interface DocExecutiveSummaryProps {
122
- /** Heading text. Default "要旨". */
122
+ /** Heading text. Default "Executive summary" (ja: "要旨"). */
123
123
  title?: string;
124
124
  /** `2` directly under the document, `3` inside another section. Default 2. */
125
125
  headingLevel?: 2 | 3;
@@ -137,7 +137,7 @@ interface DocFigureProps {
137
137
  title: string;
138
138
  /** Unit or scale, e.g. "単位: 百万円". */
139
139
  unit?: string;
140
- /** Figure number; shown as "図 N" in the caption. */
140
+ /** Figure number; shown as "Figure N" (ja: "図 N") in the caption. */
141
141
  number?: number;
142
142
  /** Where the data comes from. */
143
143
  source?: string;
@@ -161,7 +161,7 @@ interface DocFindingMetric {
161
161
  value: number;
162
162
  format?: ValueFormat;
163
163
  };
164
- /** Name of the comparison, e.g. "前月比". Default "前期比". */
164
+ /** Name of the comparison, e.g. "前月比". Default "vs. prior period" (ja: "前期比"). */
165
165
  comparisonLabel?: string;
166
166
  /** Which way is good. Default `"up"`. */
167
167
  betterWhen?: "up" | "down";
@@ -173,7 +173,7 @@ interface DocFinding {
173
173
  metric?: DocFindingMetric;
174
174
  }
175
175
  interface DocKeyFindingsProps {
176
- /** Heading text. Default "主要な発見". */
176
+ /** Heading text. Default "Key findings" (ja: "主要な発見"). */
177
177
  title?: string;
178
178
  /** `2` directly under the document, `3` inside another section. Default 2. */
179
179
  headingLevel?: 2 | 3;
@@ -193,7 +193,7 @@ interface DocScorecardMetric {
193
193
  value: number;
194
194
  format?: ValueFormat;
195
195
  };
196
- /** Name of the comparison, e.g. "前年同期比". Default "前期比". */
196
+ /** Name of the comparison, e.g. "前年同期比". Default "vs. prior period" (ja: "前期比"). */
197
197
  comparisonLabel?: string;
198
198
  /** Which way is good. Default `"up"`. */
199
199
  betterWhen?: "up" | "down";
@@ -206,13 +206,13 @@ interface DocScorecardMetric {
206
206
  }[];
207
207
  }
208
208
  interface DocKpiScorecardProps {
209
- /** Heading text. Default "主要指標". */
209
+ /** Heading text. Default "Key metrics" (ja: "主要指標"). */
210
210
  title?: string;
211
211
  /** `2` directly under the document, `3` inside another section. Default 2. */
212
212
  headingLevel?: 2 | 3;
213
213
  metrics: DocScorecardMetric[];
214
214
  variant?: "table" | "grid";
215
- /** When the numbers were taken: a date only, e.g. "2026-10-03". "データ時点" is added here. */
215
+ /** When the numbers were taken: a date only, e.g. "2026-10-03". "Data as of" (ja: "データ時点") is added here. */
216
216
  asOf?: string;
217
217
  source?: string;
218
218
  }
@@ -225,7 +225,7 @@ interface DocReportHeaderProps {
225
225
  subtitle?: ReactNode;
226
226
  /** The period the numbers cover, e.g. "2026 年 9 月" or "2026-07-01 〜 2026-09-30". */
227
227
  period?: string;
228
- /** When the data was taken: a date only, e.g. "2026-10-03". Shown under "データ時点". */
228
+ /** When the data was taken: a date only, e.g. "2026-10-03". Shown under "Data as of" (ja: "データ時点"). */
229
229
  asOf?: string;
230
230
  author?: string;
231
231
  /** Where the numbers come from, e.g. "受注管理システム、会計システム". */
@@ -243,7 +243,7 @@ interface DocSource {
243
243
  asOf?: string;
244
244
  }
245
245
  interface DocNotesAndSourcesProps {
246
- /** Heading text. Default "注記・出典". */
246
+ /** Heading text. Default "Notes and sources" (ja: "注記・出典"). */
247
247
  title?: string;
248
248
  /** `2` directly under the document, `3` inside another section. Default 2. */
249
249
  headingLevel?: 2 | 3;