@squadbase/vantage 0.7.0 → 0.7.1-dev1.5e06644

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 (73) hide show
  1. package/README.md +1 -1
  2. package/dist/add-AU3EDPNW.js +6 -0
  3. package/dist/add-AU3EDPNW.js.map +1 -0
  4. package/dist/{chunk-AABMKHEU.js → chunk-35B3YIBF.js} +16 -7
  5. package/dist/chunk-35B3YIBF.js.map +1 -0
  6. package/dist/{chunk-TRMHNMMZ.js → chunk-LYUGDHSF.js} +3 -3
  7. package/dist/{chunk-TRMHNMMZ.js.map → chunk-LYUGDHSF.js.map} +1 -1
  8. package/dist/{chunk-QNOX7WLZ.js → chunk-MQUIAP66.js} +69 -4
  9. package/dist/chunk-MQUIAP66.js.map +1 -0
  10. package/dist/{chunk-2IAPIOPS.js → chunk-P2KIHF65.js} +2 -2
  11. package/dist/chunk-P2KIHF65.js.map +1 -0
  12. package/dist/{chunk-3RJEOP3J.js → chunk-XRKSIC5Z.js} +5 -3
  13. package/dist/chunk-XRKSIC5Z.js.map +1 -0
  14. package/dist/{chunk-77CISBMG.js → chunk-YJQCB3UP.js} +3387 -204
  15. package/dist/chunk-YJQCB3UP.js.map +1 -0
  16. package/dist/cli.js +2 -2
  17. package/dist/components/index.d.ts +627 -7
  18. package/dist/components/index.js +4 -4
  19. package/dist/{delta-text-CbrOaW83.d.ts → delta-text-tav2Lh5d.d.ts} +1 -1
  20. package/dist/doc/index.d.ts +2 -2
  21. package/dist/doc/index.js +4 -4
  22. package/dist/{format-DihQkL1N.d.ts → format-D34piCei.d.ts} +2 -1
  23. package/dist/geo-japan-7BMSOJRX.js +8 -0
  24. package/dist/geo-japan-7BMSOJRX.js.map +1 -0
  25. package/dist/geo-us-GVOG7VXH.js +8 -0
  26. package/dist/geo-us-GVOG7VXH.js.map +1 -0
  27. package/dist/geo-world-35HL56UU.js +8 -0
  28. package/dist/geo-world-35HL56UU.js.map +1 -0
  29. package/dist/slide/index.d.ts +2 -2
  30. package/dist/slide/index.js +3 -3
  31. package/dist/table/index.js +4 -5
  32. package/dist/table/index.js.map +1 -1
  33. package/dist/ui/index.js +2 -3
  34. package/dist/ui/index.js.map +1 -1
  35. package/dist/{upgrade-6DT7ADRP.js → upgrade-MCHMELWC.js} +3 -3
  36. package/dist/{upgrade-6DT7ADRP.js.map → upgrade-MCHMELWC.js.map} +1 -1
  37. package/docs/en/agent-skills.md +13 -14
  38. package/docs/en/changelog.md +8 -0
  39. package/docs/en/parts/draft-chart.md +42 -0
  40. package/docs/en/parts/page-shell.md +1 -1
  41. package/docs/index.json +70 -50
  42. package/docs/ja/agent-skills.md +14 -14
  43. package/docs/ja/changelog.md +8 -0
  44. package/docs/ja/parts/draft-chart.md +40 -0
  45. package/docs/ja/parts/page-shell.md +1 -1
  46. package/package.json +2 -2
  47. package/registry/parts.json +5221 -0
  48. package/registry/ui/chart-frame.tsx +8 -0
  49. package/registry/ui/combo-chart.tsx +1852 -0
  50. package/registry/ui/dashboard-card.tsx +3 -1
  51. package/registry/ui/data-table.tsx +3 -1
  52. package/registry/ui/delta.tsx +3 -1
  53. package/registry/ui/filter-bar.tsx +3 -1
  54. package/registry/ui/forecast-chart.tsx +4734 -0
  55. package/registry/ui/funnel-steps.tsx +1 -1
  56. package/registry/ui/kpi-card.tsx +3 -1
  57. package/registry/ui/metric-value.tsx +2 -2
  58. package/registry/ui/page-shell.tsx +25 -4
  59. package/registry/ui/paired-chart.tsx +1 -1
  60. package/registry/ui/pivot-table.tsx +1260 -0
  61. package/registry/ui/progress-circle.tsx +2 -2
  62. package/registry/ui/sparkline.tsx +1 -1
  63. package/registry/ui/treemap.tsx +1917 -0
  64. package/templates/AGENTS.md +1 -1
  65. package/dist/add-4GHF2TX2.js +0 -6
  66. package/dist/add-4GHF2TX2.js.map +0 -1
  67. package/dist/chunk-2IAPIOPS.js.map +0 -1
  68. package/dist/chunk-3RJEOP3J.js.map +0 -1
  69. package/dist/chunk-77CISBMG.js.map +0 -1
  70. package/dist/chunk-AABMKHEU.js.map +0 -1
  71. package/dist/chunk-NZ5QIIG4.js +0 -74
  72. package/dist/chunk-NZ5QIIG4.js.map +0 -1
  73. package/dist/chunk-QNOX7WLZ.js.map +0 -1
@@ -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-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';
7
+ import { V as ValueFormat, a as DateStyle } from '../format-D34piCei.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-D34piCei.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';
@@ -25,7 +25,11 @@ interface UpdatedAtProps {
25
25
  }
26
26
  declare const UpdatedAt: React.ForwardRefExoticComponent<UpdatedAtProps & React.RefAttributes<HTMLTimeElement>>;
27
27
 
28
- interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
28
+ interface PageShellProps extends Omit<HTMLAttributes<HTMLDivElement>, "title"> {
29
+ /** The page heading. When given, the header (title and `description`) and the content area are drawn for you; `children` go in the content area. */
30
+ title?: string;
31
+ /** One line under the title. Used only with `title`. */
32
+ description?: string;
29
33
  }
30
34
  declare const PageShell: React.ForwardRefExoticComponent<PageShellProps & React.RefAttributes<HTMLDivElement>>;
31
35
  interface PageShellHeaderProps extends HTMLAttributes<HTMLDivElement> {
@@ -1373,6 +1377,8 @@ interface ChartFrameProps extends Omit<HTMLAttributes<HTMLElement>, "title" | "c
1373
1377
  plotRole?: "img" | "group";
1374
1378
  /** 値の表。画面には出さず(`sr-only`)、スクリーンリーダー向けに図の中に置く。`chartDataTable` で作る。 */
1375
1379
  dataTable?: ChartDataTable;
1380
+ /** プロットの下に常に出す小さな注記(近似値である旨など)。読み込み中・空のときも出す。 */
1381
+ footnote?: string;
1376
1382
  /** プロット(チャート本体)。読み込み中・空のときは描かない。 */
1377
1383
  children?: ReactNode;
1378
1384
  }
@@ -1446,7 +1452,7 @@ declare const FunnelSteps: (<T extends object = FunnelStep>(props: FunnelStepsPr
1446
1452
  */
1447
1453
 
1448
1454
  /** Columns of `T` that hold numbers (null / undefined allowed for gaps); untyped rows keep every key. */
1449
- type NumericColumn<T> = {
1455
+ type NumericColumn$2<T> = {
1450
1456
  [K in keyof T]-?: unknown extends T[K] ? K : T[K] extends number | bigint | null | undefined ? K : never;
1451
1457
  }[keyof T] & string;
1452
1458
  interface HeatmapProps<T extends Record<string, unknown> = Record<string, unknown>> extends ChartRootAttributes {
@@ -1457,7 +1463,7 @@ interface HeatmapProps<T extends Record<string, unknown> = Record<string, unknow
1457
1463
  /** 縦軸(行)に使う列名。例 `"weekday"`・`"cohort"`。先頭の行が一番上。 */
1458
1464
  y: keyof T & string;
1459
1465
  /** マスの濃さを決める数値の列名。null・欠損・数値でない値のマスは塗らない(0 とは別。ツールチップとデータ表は「—」)。 */
1460
- value: NumericColumn<T>;
1466
+ value: NumericColumn$2<T>;
1461
1467
  /** 横軸の並び順(と表示するマス)。省略時は `data` の出現順。ここに無い x の行は描かない。 */
1462
1468
  xLabels?: string[];
1463
1469
  /** 縦軸の並び順(と表示するマス)。省略時は `data` の出現順。ここに無い y の行は描かない。 */
@@ -1499,7 +1505,7 @@ interface HeatmapProps<T extends Record<string, unknown> = Record<string, unknow
1499
1505
  * ツールチップとデータ表に添える列(同じ行の別の数値)。例 `["breached"]` →「月曜 9時台 電話 12件・SLA 未達 2件」の「SLA 未達 2件」。
1500
1506
  * 列名の表示は `labels`、値は `format`(単位つきの書式なら同じ単位)で出る。
1501
1507
  */
1502
- details?: NumericColumn<T>[];
1508
+ details?: NumericColumn$2<T>[];
1503
1509
  /**
1504
1510
  * この列が真(`true` / 0 でない数)の行のマスに、注意色(`--negative`)の枠を付ける。
1505
1511
  * 例 SLA 未達が集中したマス。色だけでなく枠の太さでも区別でき、ツールチップに「要注意」と出る。
@@ -1532,6 +1538,569 @@ declare const Heatmap: (<T extends Record<string, unknown>>(props: HeatmapProps<
1532
1538
  displayName?: string;
1533
1539
  };
1534
1540
 
1541
+ /**
1542
+ * PairedChart — 量(棒)と率・単価(線)を、同じ期間軸の上下 2 段で見せる型付きグラフ(`DashboardCardPreset` の中に置く)。
1543
+ * 二重 Y 軸は持たない: 上段が棒の値軸、下段が線の値軸で、横軸(期間)とツールチップの位置は
1544
+ * 1 つの ECharts の中で揃っている(ホバーすると同じ期間の棒と線の値が 1 枚のツールチップに出る)。
1545
+ * 段ごとに `format`(件数・金額・%)を持ち、率を分子・分母から計算することはしない(呼び元が値を渡す)。
1546
+ * 棒は 0 起点。色は `--chart-1..5` を固定順(棒 → 線の順に続く)で使い、ライト/ダークに追従する。
1547
+ * `ChartFrame` の中に描く(見出し・要約・読み込み中・空表示)。
1548
+ */
1549
+
1550
+ /** 1 段ぶんの設定。 */
1551
+ interface PairedPanel<T extends Record<string, unknown> = Record<string, unknown>> {
1552
+ /** この段に描く系列の列。 */
1553
+ categories: NumericKeys<T>[];
1554
+ /** 系列の色。省略時は `--chart-1..5` を固定順(上段の続きから下段)。 */
1555
+ colors?: ChartColors<T>;
1556
+ /** 値の書式(件数 `number`・金額 `currency`・率 `percent` など)。`percent` は比率(0.124 → 12.4%)を渡す。 */
1557
+ format?: ValueFormat;
1558
+ /** `format` で足りないときの自前の書式。 */
1559
+ valueFormatter?: ValueFormatter;
1560
+ /** 値軸の見出し(「売上」「客単価」など)。 */
1561
+ yAxisLabel?: string;
1562
+ /** 値軸の上限。データが超えるときは軸を広げる。 */
1563
+ maxValue?: number;
1564
+ }
1565
+ interface PairedChartProps<T extends Record<string, unknown> = Record<string, unknown>> extends Pick<ChartCommonProps<T>, "data" | "index" | "labels" | "title" | "summary" | "isLoading" | "emptyState" | "chartOptions" | "actions" | "fileName" | "className" | "ariaLabel"> {
1566
+ /** 上段。量を棒で。`type` は BarChart と同じ(`stacked` で積み上げ)。 */
1567
+ bars: PairedPanel<T> & {
1568
+ type?: CartesianStackType;
1569
+ };
1570
+ /** 下段。率・単価を線で。`fitToData` で値軸をデータに合わせる(率が狭い幅で動くとき)。 */
1571
+ line: PairedPanel<T> & {
1572
+ fitToData?: boolean;
1573
+ minValue?: number;
1574
+ };
1575
+ /** 全体の高さ(px)。既定 400。 */
1576
+ height?: number;
1577
+ /** 上段:下段の高さの比。既定 `[3, 2]`。 */
1578
+ heightRatio?: [number, number];
1579
+ /** 値軸ラベルの幅(px)。2 段の左端を揃える。既定 64。 */
1580
+ yAxisWidth?: number;
1581
+ showLegend?: boolean;
1582
+ showTooltip?: boolean;
1583
+ }
1584
+ /** Generic over the row type, so `index` / `categories` / `colors` keys are checked against `data`. */
1585
+ declare const PairedChart: (<T extends Record<string, unknown>>(props: PairedChartProps<T> & {
1586
+ ref?: Ref<HTMLDivElement>;
1587
+ }) => ReactElement) & {
1588
+ displayName?: string;
1589
+ };
1590
+
1591
+ interface HistogramThreshold {
1592
+ /** 線を引く値(例 SLA の 3 日)。 */
1593
+ value: number;
1594
+ /** 線の名前(例「SLA」)。ツールチップ・要約・データ表の注記に出る。 */
1595
+ label?: string;
1596
+ }
1597
+ interface HistogramChartProps extends Omit<ChartCommonProps, "data" | "index" | "categories" | "colors" | "labels" | "summary"> {
1598
+ /** 生の値の配列。number か数値文字列。null・数にならない値は数えない。 */
1599
+ values: unknown[];
1600
+ /** 階級の幅。省略すると値の範囲から区切りのよい幅(1・2・2.5・5 × 10^n)を選ぶ。 */
1601
+ binWidth?: number;
1602
+ /** 階級の始まり。省略は幅の倍数に切り下げた最小値。 */
1603
+ start?: number;
1604
+ /** 上限。この値以上は 1 つの「<上限>以上」階級にまとめる。省略するとまとめない。 */
1605
+ max?: number;
1606
+ /** しきい値の線(任意)。階級の途中にも引ける。 */
1607
+ threshold?: HistogramThreshold;
1608
+ /** 件数の単位。既定は日本語のページで「件」、それ以外は単位なし。 */
1609
+ countUnit?: string;
1610
+ /** 横軸の値の名前(データ表の先頭列)。既定「値」。例「解決日数」 */
1611
+ valueLabel?: string;
1612
+ /** 1 文要約(自由文)。`"auto"` なら件数・最頻の階級・しきい値超えの割合を組む。省略時は要約なし。 */
1613
+ summary?: string | "auto";
1614
+ /** ホバー時のツールチップを出す。既定 `true`。 */
1615
+ showTooltip?: boolean;
1616
+ }
1617
+ declare const HistogramChart: React.ForwardRefExoticComponent<HistogramChartProps & React.RefAttributes<HTMLDivElement>>;
1618
+
1619
+ interface BoxPlotGroup {
1620
+ /** 箱の名前(横軸)。 */
1621
+ name: string;
1622
+ /** 生の値の配列。number か数値文字列。null・数にならない値は数えない。 */
1623
+ values: unknown[];
1624
+ }
1625
+ interface BoxPlotChartProps extends Omit<ChartCommonProps, "data" | "index" | "categories" | "colors" | "labels" | "summary"> {
1626
+ /** 群ごとの値。並びがそのまま左から右の順。 */
1627
+ groups: BoxPlotGroup[];
1628
+ /** ひげの長さ(四分位範囲の何倍までを外れ値にしないか)。既定 1.5。 */
1629
+ whisker?: number;
1630
+ /** 値(縦軸)の名前。ツールチップとデータ表に出る。既定「値」。例「残業時間」 */
1631
+ valueLabel?: string;
1632
+ /** 1 文要約(自由文)。`"auto"` なら中央値が最大・最小の群と外れ値の数を組む。省略時は要約なし。 */
1633
+ summary?: string | "auto";
1634
+ /** ホバー時のツールチップを出す。既定 `true`。 */
1635
+ showTooltip?: boolean;
1636
+ }
1637
+ declare const BoxPlotChart: React.ForwardRefExoticComponent<BoxPlotChartProps & React.RefAttributes<HTMLDivElement>>;
1638
+
1639
+ type AttentionKind = "overdue" | "risk" | "dueSoon" | "stale";
1640
+ type DateInput = Date | string | null | undefined;
1641
+ interface AttentionJudgement {
1642
+ kind: AttentionKind;
1643
+ /**
1644
+ * overdue: 期日を過ぎた日数(1 以上)/ dueSoon: 期日までの日数(0 = 当日)/
1645
+ * stale: 最終の動きからの日数/ risk: 0。
1646
+ */
1647
+ days: number;
1648
+ }
1649
+ interface AttentionListProps<T> {
1650
+ rows: T[];
1651
+ /** 基準日(`"2026-10-23"` か Date)。 */
1652
+ asOf: Date | string;
1653
+ /** 期日の何日前から「期限間近」にするか。既定 7。 */
1654
+ dueSoonDays?: number;
1655
+ /** この日数動きがなければ「滞留」。未指定なら滞留は判定しない。 */
1656
+ staleDays?: number;
1657
+ /** 区分名の差し替え(例: `{ overdue: "入金遅れ" }`)。 */
1658
+ labels?: Partial<Record<AttentionKind, string>>;
1659
+ /** 行の ID。省略時は `idKey` の列、それも無ければ行の順番。 */
1660
+ getRowId?: (row: T) => string;
1661
+ /** 行の見出し(顧客名・案件名など)。省略時は `titleKey` の列、それも無ければ空。 */
1662
+ getTitle?: (row: T) => ReactNode;
1663
+ getDueDate?: (row: T) => DateInput;
1664
+ getLastActivityAt?: (row: T) => DateInput;
1665
+ /** リスクと判定する行。期日・滞留より先に出す。 */
1666
+ isRisk?: (row: T) => boolean;
1667
+ /** 行の ID の列名(JSON で書ける `getRowId`)。 */
1668
+ idKey?: string;
1669
+ /** 見出しの列名(JSON で書ける `getTitle`)。 */
1670
+ titleKey?: string;
1671
+ /** 期日の列名(JSON で書ける `getDueDate`)。値は `"2026-10-23"` 形式の日付か Date。 */
1672
+ dueDateKey?: string;
1673
+ /** 最後に動きがあった日の列名(JSON で書ける `getLastActivityAt`)。 */
1674
+ lastActivityAtKey?: string;
1675
+ /** リスクの列名(JSON で書ける `isRisk`)。値が真の行をリストにする。 */
1676
+ riskKey?: string;
1677
+ /** 次の一手の列名(JSON で書ける `getNextAction`)。値が空の行には添えない。 */
1678
+ nextActionKey?: string;
1679
+ /** 理由の文。省略すると区分と日数から作る。 */
1680
+ getReason?: (row: T, judgement: AttentionJudgement) => ReactNode;
1681
+ /** 次の一手。判定に当たる行に添える。 */
1682
+ getNextAction?: (row: T, judgement: AttentionJudgement) => ReactNode;
1683
+ /** 見出しの右に出す補足(金額・担当者など)。 */
1684
+ getMeta?: (row: T) => ReactNode;
1685
+ /** 行を押したとき。渡すと行が button になる。 */
1686
+ onRowClick?: (row: T) => void;
1687
+ /** 判定に当たらない行も末尾に出す。既定 false。 */
1688
+ includeUnflagged?: boolean;
1689
+ /** 該当なしのときの見出し・説明。 */
1690
+ emptyTitle?: string;
1691
+ emptyDescription?: string;
1692
+ className?: string;
1693
+ }
1694
+ declare function AttentionList<T>({ rows, asOf, dueSoonDays, staleDays, labels, getRowId, getTitle, getDueDate, getLastActivityAt, isRisk, idKey, titleKey, dueDateKey, lastActivityAtKey, riskKey, nextActionKey, getReason, getNextAction, getMeta, onRowClick, includeUnflagged, emptyTitle, emptyDescription, className, ...rest }: AttentionListProps<T> & Omit<HTMLAttributes<HTMLUListElement>, keyof AttentionListProps<T>>): React.JSX.Element;
1695
+ declare namespace AttentionList {
1696
+ var displayName: string;
1697
+ }
1698
+
1699
+ /**
1700
+ * ComboChart — bars, lines and areas on one category / time axis, with up to two value axes (left and right); use it only to migrate a Tableau dual-axis sheet, and use `PairedChart` for a new dashboard.
1701
+ *
1702
+ * It exists to reproduce a Tableau dual-axis sheet faithfully (a Pareto: sales as bars, the cumulative share as a
1703
+ * line on the right). For a new dashboard prefer PairedChart, which stacks the two measures in panels over a
1704
+ * shared axis instead of reading two scales off one plot.
1705
+ *
1706
+ * Each value axis starts at 0 (bars always do; a negative value extends the axis below it), carries its own format
1707
+ * (`format` left, `rightFormat` right), and never repeats a tick label: the tick step widens until every label on
1708
+ * the axis reads differently. Only the left axis draws grid lines. `referenceLines` draw dashed lines on either axis.
1709
+ * Clicking a bar or a point calls `onSelect` with its row.
1710
+ */
1711
+
1712
+ type ComboSeriesType = "bar" | "line" | "area";
1713
+ type ComboAxis = "left" | "right";
1714
+ /** One measure of a ComboChart. */
1715
+ interface ComboSeries<K extends string = string> {
1716
+ /** 値の列名。 */
1717
+ key: K;
1718
+ /** 描き方。`"bar"`(棒)・`"line"`(線)・`"area"`(面)。 */
1719
+ type: ComboSeriesType;
1720
+ /** どちらの値の軸で読むか。既定 `"left"`。`"right"` の系列が 1 つでもあると右軸を出す。 */
1721
+ axis?: ComboAxis;
1722
+ /** 凡例・ツールチップの表示名。省略時は `labels[key]`、無ければ列名。 */
1723
+ label?: string;
1724
+ /** 色。`"chart-1"`〜`"chart-5"` か意味色。省略時は系列の順にトークン色。 */
1725
+ color?: ChartSeriesColor;
1726
+ }
1727
+ /** A dashed horizontal (vertical with `layout="vertical"`) line at a value of one axis. */
1728
+ interface ComboReferenceLine {
1729
+ /** 線を引く値。 */
1730
+ value: number;
1731
+ /** どちらの軸の値か。既定 `"left"`。 */
1732
+ axis?: ComboAxis;
1733
+ /** 線のラベル。省略時は軸の書式で値を書く。 */
1734
+ label?: string;
1735
+ }
1736
+ interface ComboChartProps<T extends Record<string, unknown> = Record<string, unknown>> extends ChartRootAttributes {
1737
+ /** 行の配列。1 行 = カテゴリ軸の 1 つの値(集計済み)。 */
1738
+ data: T[];
1739
+ /** カテゴリ軸(横軸)の列名。例 `"month"`・`"product"`。行の順に並ぶ。 */
1740
+ index: keyof T & string;
1741
+ /** 描く系列。`{ key, type: "bar" | "line" | "area", axis?: "left" | "right", label? }` の配列。描く順(後ろほど手前)。 */
1742
+ series: ComboSeries<keyof T & string>[];
1743
+ /** 左軸(と左軸の系列のツールチップ・データ表)の書式。既定 `"compact"` 相当の短い表記。 */
1744
+ format?: ValueFormat;
1745
+ /** 右軸の書式。例 パレート図の累積比なら `"percent"`。省略時は `format`。 */
1746
+ rightFormat?: ValueFormat;
1747
+ /** 列名・カテゴリの値 → 表示名。 */
1748
+ labels?: Record<string, string>;
1749
+ /** 参照線(目標・平均など)。`{ value, axis?, label? }` の配列。 */
1750
+ referenceLines?: ComboReferenceLine[];
1751
+ /** 同じ軸の棒どうし・面どうしを積み上げる。既定 `false`(棒は横に並べる)。 */
1752
+ stacked?: boolean;
1753
+ /** `"vertical"` でカテゴリを縦軸に並べる(横棒)。左軸は下、右軸は上になる。既定 `"horizontal"`。 */
1754
+ layout?: "horizontal" | "vertical";
1755
+ /** 凡例を出す。既定 `true`(系列が 2 つ以上のとき)。 */
1756
+ showLegend?: boolean;
1757
+ /** ホバーでツールチップを出す。既定 `true`。 */
1758
+ showTooltip?: boolean;
1759
+ /** 棒・点のクリック。その行を受け取る(フィルターの操作に使う)。 */
1760
+ onSelect?: (row: T) => void;
1761
+ /** グラフの見出し。 */
1762
+ title?: string;
1763
+ /** グラフが言っていることの 1 文要約。 */
1764
+ summary?: string;
1765
+ /** 読み込み中。最終形と同じ高さのスケルトンを出す。 */
1766
+ isLoading?: boolean;
1767
+ /** `data` が空のときの表示。 */
1768
+ emptyState?: ChartEmptyState;
1769
+ /** プロット領域の高さ(px)。既定 288。 */
1770
+ height?: number;
1771
+ /** 生成した EChartsOption に最後に深くマージする逃げ道。 */
1772
+ chartOptions?: EChartsOption;
1773
+ /** グラフ右上に PNG 保存/コピーのボタンを出す。 */
1774
+ actions?: boolean | ChartActionsOptions;
1775
+ /** PNG 保存時のファイル名(拡張子つき)。 */
1776
+ fileName?: string;
1777
+ className?: string;
1778
+ /** スクリーンリーダー向けのラベル。 */
1779
+ ariaLabel?: string;
1780
+ }
1781
+ /** Generic over the row type, so `index` and the series keys are checked against `data`. */
1782
+ declare const ComboChart: (<T extends Record<string, unknown>>(props: ComboChartProps<T> & {
1783
+ ref?: Ref<HTMLDivElement>;
1784
+ }) => ReactElement) & {
1785
+ displayName?: string;
1786
+ };
1787
+
1788
+ /**
1789
+ * 等間隔の 1 系列に対する指数平滑法(ETS、誤差は加法)の予測。依存なしの純関数で、同じ入力には同じ出力を返す(乱数を使わない)。
1790
+ *
1791
+ * - モデルは トレンド(なし / 加法)× 季節(なし / 加法 / 乗法)。乗法トレンドは扱わず、加法トレンドとして当てはめる
1792
+ * (`model.trend` には実際に当てはめた `"additive"` が入る)。乗法トレンドの予測区間は閉じた式が無く、決定的に出せないため。
1793
+ * - 平滑化係数(α・β・γ)と初期の水準・傾きは、1 期先予測の残差平方和の最小化(誤差が加法なので最尤と同じ)を
1794
+ * Nelder–Mead で解く。範囲は 0 < α < 1、0 < β < α、0 < γ < 1 − α。初期の季節成分は古典的分解(最初の数季節の移動平均)で決める。
1795
+ * - `"auto"` は当てはめられる組み合わせをすべて当て、AICc が最小のものを選ぶ(Tableau も最大 8 モデルから AIC で選ぶ)。
1796
+ * - 予測区間は ETS(A,·,·) の分散の式(Hyndman ほか 2008 / fpp の表)で、点予測 ± z·σ·√(分散の倍率)。σ は残差から。
1797
+ * 乗法の季節は閉じた式が無いので、2 期先以降の項に季節指数の 2 乗を掛ける近似にしている。
1798
+ * - Tableau はパラメータの推定方法を公開していないため、同じモデルを選んでも値は一致しない(近似値として扱う)。
1799
+ */
1800
+ /** トレンド・季節の指定。`"auto"` は当てはめられる候補から AICc で選ぶ。 */
1801
+ type ForecastComponent = "none" | "additive" | "multiplicative" | "auto";
1802
+ interface ForecastOptions {
1803
+ /** トレンド。既定 `"auto"`。`"multiplicative"` は加法トレンドとして当てはめる。 */
1804
+ trend?: ForecastComponent;
1805
+ /** 季節。既定 `"auto"`。`seasonLength` が 1 以下か、点が 2 季節分に満たないときは季節なしに落とす。 */
1806
+ season?: ForecastComponent;
1807
+ /** 1 季節の期数(月次 12・四半期 4・曜日 7)。省略か 1 で季節なし。 */
1808
+ seasonLength?: number;
1809
+ /**
1810
+ * 予測する期数。既定は季節ありなら 1 季節分(`seasonLength`)、なければ当てはめた点の 4 分の 1(1〜12 期)。
1811
+ * 末尾の除外期(`ignoreLast` と末尾の欠損)はこれとは別に予測する。
1812
+ */
1813
+ horizon?: number;
1814
+ /** 予測区間の信頼水準(0〜1)。既定 0.95。 */
1815
+ confidence?: number;
1816
+ /** 末尾から除外する期数(締まっていない期)。当てはめに使わず、予測する側に回す。既定 0。 */
1817
+ ignoreLast?: number;
1818
+ }
1819
+
1820
+ /**
1821
+ * ForecastChart — a time-series line chart that continues each series with an exponential-smoothing forecast (dashed line and shaded prediction interval) computed from `data` at render time; place it inside `DashboardCardPreset`, and use it to migrate a Tableau forecast sheet.
1822
+ *
1823
+ * Pass the rows, the date column (`x`), the value column (`y`) and optionally a column that splits the rows into
1824
+ * series (`series`, e.g. a segment). Rows that fall in the same period and series are summed. The forecast is
1825
+ * recomputed on every change of the inputs (never stored or fetched) with the model family in `forecast`
1826
+ * (trend / season, `"auto"` picks the lowest AICc), so it is an approximation: a fixed note under the plot always
1827
+ * says so (name the source tool with `forecastSource`; `forecastNote` only adds to it). A series with too few points draws its actuals only.
1828
+ */
1829
+
1830
+ /** 予測の 1 期の長さ。未来の日付を進める単位。 */
1831
+ type ForecastPeriod = "day" | "week" | "month" | "quarter" | "year";
1832
+ interface ForecastChartProps<T extends Record<string, unknown> = Record<string, unknown>> extends Omit<ChartCommonProps<T>, "index" | "categories" | "colors"> {
1833
+ /** 日付の列名。ISO の日付・年月(`"2026-01"`)・年・`Date` を受ける。 */
1834
+ x: keyof T & string;
1835
+ /** 値の列名。number か数値文字列。 */
1836
+ y: keyof T & string;
1837
+ /** 系列に分ける列名(セグメントなど)。省略時は 1 系列。6 つ以上は合計の大きい 5 つ +「その他」にまとめる。 */
1838
+ series?: keyof T & string;
1839
+ /** 1 期の長さ。省略時は日付の間隔から推定する。同じ期に入る行は合計する。 */
1840
+ period?: ForecastPeriod;
1841
+ /**
1842
+ * 予測の設定(トレンド・季節・季節の長さ・期数・信頼水準・末尾の除外期)。`seasonLength` を省略すると `period` から
1843
+ * 決める(月 12・四半期 4・週 52・日 7・年は季節なし)。例: `forecast={{ trend: "additive", season: "additive", horizon: 12 }}`
1844
+ */
1845
+ forecast?: ForecastOptions;
1846
+ /** 凡例・ツールチップ・境目の縦線に出す予測の呼び名。既定は表示言語の「予測」/ "Forecast"。 */
1847
+ forecastLabel?: string;
1848
+ /**
1849
+ * 予測の元になったツール(`"Tableau"` など)。プロットの下の注記に「〈ツール〉の予測値とは一致しない」と名前で出す。
1850
+ * 注記そのもの(近似であること)は部品が必ず出し、置き換えられない。
1851
+ */
1852
+ forecastSource?: string;
1853
+ /** 注記のあとに足す補足(集計の範囲など)。近似の注記を置き換えるものではない。 */
1854
+ forecastNote?: string;
1855
+ /** 系列色。配列は系列の順、record は系列名ごと。省略時はトークン順。 */
1856
+ colors?: ChartColors;
1857
+ /** 凡例・ツールチップを出す。既定 `true`。 */
1858
+ showLegend?: boolean;
1859
+ showTooltip?: boolean;
1860
+ /** 値軸の目盛り線を出す。既定 `true`。 */
1861
+ showGridLines?: boolean;
1862
+ showXAxis?: boolean;
1863
+ showYAxis?: boolean;
1864
+ /** y 軸ラベルの幅(px)。 */
1865
+ yAxisWidth?: number;
1866
+ /** 値軸の下限・上限(データ・予測区間がはみ出すときは軸を広げる)。 */
1867
+ minValue?: number;
1868
+ maxValue?: number;
1869
+ /** 値軸を 0 からではなくデータに合わせる。既定 `false`。 */
1870
+ fitToData?: boolean;
1871
+ xAxisLabel?: string;
1872
+ yAxisLabel?: string;
1873
+ }
1874
+ /** Generic over the row type, so `x` / `y` / `series` are checked against `data`. */
1875
+ declare const ForecastChart: (<T extends Record<string, unknown>>(props: ForecastChartProps<T> & {
1876
+ ref?: Ref<HTMLDivElement>;
1877
+ }) => ReactElement) & {
1878
+ displayName?: string;
1879
+ };
1880
+
1881
+ /** The maps the parts draw. */
1882
+ type GeoMapName = "japan" | "us" | "world";
1883
+
1884
+ /**
1885
+ * FilledMap — a choropleth: each region (Japanese prefecture, US state or country) shaded by a number. Pass rows,
1886
+ * the column naming the region and the number to shade by instead of an ECharts option.
1887
+ *
1888
+ * Regions are matched by name or code, in Japanese or English: 「東京都」「東京」「Tokyo」「JP-13」「13」,
1889
+ * 「California」「CA」「US-CA」, 「Japan」「JPN」「JP」 (case, width and accents don't matter: "Ōita" = "Oita").
1890
+ * `map="auto"` (default) picks the map whose regions the most rows name. A row that names no region is not drawn;
1891
+ * it is listed in the screen-reader table instead.
1892
+ *
1893
+ * Shading is a single-colour ramp of one theme colour (`tone`, `--chart-1` by default) like Heatmap: the lowest
1894
+ * value is the tone mixed 20% into the surface, the highest the tone itself, never a rainbow. A region with no row
1895
+ * (or a null value) is grey. `selected` dims the other regions; clicking a region calls `onSelect` (a filter action).
1896
+ * The boundaries (Natural Earth, public domain) load on demand, so the part shows its skeleton for a moment the first time.
1897
+ */
1898
+
1899
+ /** Columns of `T` that hold numbers (null / undefined allowed for gaps); untyped rows keep every key. */
1900
+ type NumericColumn$1<T> = {
1901
+ [K in keyof T]-?: unknown extends T[K] ? K : T[K] extends number | bigint | null | undefined ? K : never;
1902
+ }[keyof T] & string;
1903
+ type FilledMapName = GeoMapName | "auto";
1904
+ interface FilledMapProps<T extends Record<string, unknown> = Record<string, unknown>> extends ChartRootAttributes {
1905
+ /** 行の配列。1 行 = 1 地域。同じ地域が複数あれば後の行が勝つ。値は number か数値文字列。 */
1906
+ data: T[];
1907
+ /** 地域を表す列名。都道府県名(「東京都」「東京」「Tokyo」)・州名・国名か、コード(`JP-13`・`13`・`CA`・`US-CA`・`JPN`・`JP`)。 */
1908
+ region: keyof T & string;
1909
+ /** 塗りの濃さを決める数値の列名。null・欠損の地域は灰色(0 とは別)。 */
1910
+ value: NumericColumn$1<T>;
1911
+ /** 描く地図。`"japan"`(都道府県)・`"us"`(州)・`"world"`(国)。既定 `"auto"`(地域の列の値が最も多く当たる地図)。 */
1912
+ map?: FilledMapName;
1913
+ /** 列名・地域の値 → 表示名(ツールチップ・データ表)。例 `{ sales: "売上" }`。 */
1914
+ labels?: Record<string, string>;
1915
+ /** 数値の書式(`"number"` / `"currency"` / `"percent"` / `{ type: "number", unit: "件" }` など)。既定 `"number"`。 */
1916
+ format?: ValueFormat;
1917
+ /** 書式を関数で直接渡す逃げ道。`format` より優先する。 */
1918
+ valueFormatter?: ValueFormatter;
1919
+ /** 濃淡の色。`"chart-1"`〜`"chart-5"` か意味色。薄い → 濃いの単色(レインボーにしない)。既定 `"chart-1"`。 */
1920
+ tone?: ChartSeriesColor;
1921
+ /** 濃さの固定スケール。省略時はデータの最小〜最大。範囲外の値は端に丸める。 */
1922
+ scale?: {
1923
+ min?: number;
1924
+ max?: number;
1925
+ };
1926
+ /** 凡例(薄い → 濃いの帯と両端の値)を出す。既定 `true`。 */
1927
+ showLegend?: boolean;
1928
+ /** ホバーでツールチップを出す。既定 `true`。 */
1929
+ showTooltip?: boolean;
1930
+ /** ツールチップとデータ表に添える列(同じ行の別の値)。数値は `format`、それ以外は文字のまま。 */
1931
+ details?: (keyof T & string)[];
1932
+ /** 選択中の地域(`region` 列の値。名前・コードのどの書き方でもよい)。渡すと、それ以外の地域を薄くする。 */
1933
+ selected?: string[];
1934
+ /** 地域のクリック。`region` 列の値と、その行を受け取る(フィルターの操作に使う)。データの無い地域では呼ばない。 */
1935
+ onSelect?: (region: string, row: T) => void;
1936
+ /** グラフの見出し。 */
1937
+ title?: string;
1938
+ /** グラフが言っていることの 1 文要約。`"auto"` で最大の地域から自動生成。 */
1939
+ summary?: string | "auto";
1940
+ /** 読み込み中。最終形と同じ高さのスケルトンを出す。 */
1941
+ isLoading?: boolean;
1942
+ /** `data` が空のときの表示。 */
1943
+ emptyState?: ChartEmptyState;
1944
+ /** プロット領域の高さ(px)。既定 288。 */
1945
+ height?: number;
1946
+ /** 生成した EChartsOption に最後に深くマージする逃げ道。 */
1947
+ chartOptions?: EChartsOption;
1948
+ /** グラフ右上に PNG 保存/コピーのボタンを出す。 */
1949
+ actions?: boolean | ChartActionsOptions;
1950
+ /** PNG 保存時のファイル名(拡張子つき)。 */
1951
+ fileName?: string;
1952
+ className?: string;
1953
+ /** スクリーンリーダー向けのラベル。省略時は `<valueの列>の地図`。 */
1954
+ ariaLabel?: string;
1955
+ }
1956
+ /** Generic over the row type, so `region` / `value` keys are checked against `data`. */
1957
+ declare const FilledMap: (<T extends Record<string, unknown>>(props: FilledMapProps<T> & {
1958
+ ref?: Ref<HTMLDivElement>;
1959
+ }) => ReactElement) & {
1960
+ displayName?: string;
1961
+ };
1962
+
1963
+ /**
1964
+ * SymbolMap — points at latitude / longitude over a faint boundary basemap (Japan's prefectures, US states or the
1965
+ * countries of the world). Pass rows and the two coordinate columns instead of an ECharts option.
1966
+ *
1967
+ * `size` scales each symbol's area by a number; `color` colours it by a number (a single-hue ramp of `tone`, like
1968
+ * Heatmap) or by a category (`--chart-1..5` in order of appearance, the 6th category on as「その他」/ "Other").
1969
+ * `basemap="auto"` (default) picks the smallest map holding every point. A row without usable coordinates is not
1970
+ * drawn; it is listed in the screen-reader table instead. `selected` dims the other points; clicking a point calls
1971
+ * `onSelect` (a filter action). The boundaries (Natural Earth, public domain) load on demand.
1972
+ */
1973
+
1974
+ type SymbolMapBasemap = GeoMapName | "auto";
1975
+ interface SymbolMapProps<T extends Record<string, unknown> = Record<string, unknown>> extends ChartRootAttributes {
1976
+ /** 行の配列。1 行 = 1 点。 */
1977
+ data: T[];
1978
+ /** 緯度の列名(-90〜90。数値か数値文字列)。 */
1979
+ latitude: keyof T & string;
1980
+ /** 経度の列名(-180〜180。数値か数値文字列)。 */
1981
+ longitude: keyof T & string;
1982
+ /** 点の名前の列名(ツールチップ・データ表・`selected` の照合に使う)。 */
1983
+ name?: keyof T & string;
1984
+ /** 点の大きさ(面積)を決める数値の列名。省略時は同じ大きさ。 */
1985
+ size?: keyof T & string;
1986
+ /** 点の色を決める列名。数値なら `tone` の単色の濃淡、文字ならカテゴリ色(`--chart-1..5` の出現順、6 つ目以降は「その他」)。 */
1987
+ color?: keyof T & string;
1988
+ /** 背景の地図。`"japan"`・`"us"`・`"world"`。既定 `"auto"`(全部の点が入る最も狭い地図)。 */
1989
+ basemap?: SymbolMapBasemap;
1990
+ /** 列名 → 表示名(ツールチップ・凡例・データ表)。 */
1991
+ labels?: Record<string, string>;
1992
+ /** 数値の書式(`color` の数値と、`sizeFormat` が無いときの `size`)。既定 `"number"`。 */
1993
+ format?: ValueFormat;
1994
+ /** `size` の値の書式。省略時は `format`。 */
1995
+ sizeFormat?: ValueFormat;
1996
+ /** 数値の `color` の濃淡の色。`"chart-1"`〜`"chart-5"` か意味色。既定 `"chart-1"`。 */
1997
+ tone?: ChartSeriesColor;
1998
+ /** 凡例(数値の色なら濃淡の帯、カテゴリなら色の一覧)を出す。既定 `true`。 */
1999
+ showLegend?: boolean;
2000
+ /** ホバーでツールチップを出す。既定 `true`。 */
2001
+ showTooltip?: boolean;
2002
+ /** ツールチップとデータ表に添える列。 */
2003
+ details?: (keyof T & string)[];
2004
+ /** 選択中の点(`name` 列の値)。渡すと、それ以外の点を薄くする。 */
2005
+ selected?: string[];
2006
+ /** 点のクリック。その行を受け取る(フィルターの操作に使う)。 */
2007
+ onSelect?: (row: T) => void;
2008
+ /** グラフの見出し。 */
2009
+ title?: string;
2010
+ /** グラフが言っていることの 1 文要約。 */
2011
+ summary?: string;
2012
+ /** 読み込み中。最終形と同じ高さのスケルトンを出す。 */
2013
+ isLoading?: boolean;
2014
+ /** `data` が空のときの表示。 */
2015
+ emptyState?: ChartEmptyState;
2016
+ /** プロット領域の高さ(px)。既定 288。 */
2017
+ height?: number;
2018
+ /** 生成した EChartsOption に最後に深くマージする逃げ道。 */
2019
+ chartOptions?: EChartsOption;
2020
+ /** グラフ右上に PNG 保存/コピーのボタンを出す。 */
2021
+ actions?: boolean | ChartActionsOptions;
2022
+ /** PNG 保存時のファイル名(拡張子つき)。 */
2023
+ fileName?: string;
2024
+ className?: string;
2025
+ /** スクリーンリーダー向けのラベル。 */
2026
+ ariaLabel?: string;
2027
+ }
2028
+ /** Generic over the row type, so the column keys are checked against `data`. */
2029
+ declare const SymbolMap: (<T extends Record<string, unknown>>(props: SymbolMapProps<T> & {
2030
+ ref?: Ref<HTMLDivElement>;
2031
+ }) => ReactElement) & {
2032
+ displayName?: string;
2033
+ };
2034
+
2035
+ /**
2036
+ * Treemap — parts of a whole as nested rectangles whose areas are the values.
2037
+ * Pass rows, the leaf column (`index`),
2038
+ * optionally a parent column (`group`, for two levels) and the number (`value`) instead of an ECharts option.
2039
+ *
2040
+ * Colour is categorical by `group` (or by `index` without one): `--chart-1..5` for the largest five, the rest the
2041
+ * 「その他」grey. A numeric `color` column shades each tile on a single-hue ramp of `tone` instead (like Heatmap).
2042
+ * Each tile carries its name and value when it fits. Values that are zero, negative or missing take no area; they
2043
+ * stay in the screen-reader table. Clicking a tile calls `onSelect` with its row.
2044
+ */
2045
+
2046
+ /** Columns of `T` that hold numbers (null / undefined allowed for gaps); untyped rows keep every key. */
2047
+ type NumericColumn<T> = {
2048
+ [K in keyof T]-?: unknown extends T[K] ? K : T[K] extends number | bigint | null | undefined ? K : never;
2049
+ }[keyof T] & string;
2050
+ interface TreemapProps<T extends Record<string, unknown> = Record<string, unknown>> extends ChartRootAttributes {
2051
+ /** 行の配列。1 行 = 1 タイル(集計済みの値)。 */
2052
+ data: T[];
2053
+ /** タイル(葉)の名前の列名。例 `"product"`。 */
2054
+ index: keyof T & string;
2055
+ /** 親の列名(2 階層にする)。例 `"category"`。省略時は 1 階層。 */
2056
+ group?: keyof T & string;
2057
+ /** タイルの面積を決める数値の列名。0 以下・欠損の行は面積を持たない(データ表には残る)。 */
2058
+ value: NumericColumn<T>;
2059
+ /** タイルの色を決める数値の列名(`tone` の単色の濃淡)。省略時は `group`(無ければ `index`)ごとのカテゴリ色。 */
2060
+ color?: NumericColumn<T>;
2061
+ /** 列名・値 → 表示名(タイル・ツールチップ・凡例・データ表)。 */
2062
+ labels?: Record<string, string>;
2063
+ /** `value` の書式。既定 `"number"`。 */
2064
+ format?: ValueFormat;
2065
+ /** `color` の値の書式。省略時は `format`。 */
2066
+ colorFormat?: ValueFormat;
2067
+ /** 書式を関数で直接渡す逃げ道(`value`)。`format` より優先する。 */
2068
+ valueFormatter?: ValueFormatter;
2069
+ /** 数値の `color` の濃淡の色。既定 `"chart-1"`。 */
2070
+ tone?: ChartSeriesColor;
2071
+ /** 凡例(カテゴリ色なら色の一覧、数値の色なら濃淡の帯)を出す。既定 `true`(カテゴリ色は `group` があるときだけ)。 */
2072
+ showLegend?: boolean;
2073
+ /** ホバーでツールチップを出す。既定 `true`。 */
2074
+ showTooltip?: boolean;
2075
+ /** タイルのクリック。その行を受け取る(フィルターの操作に使う)。 */
2076
+ onSelect?: (row: T) => void;
2077
+ /** グラフの見出し。 */
2078
+ title?: string;
2079
+ /** グラフが言っていることの 1 文要約。`"auto"` で最大のタイルとその構成比。 */
2080
+ summary?: string | "auto";
2081
+ /** 読み込み中。最終形と同じ高さのスケルトンを出す。 */
2082
+ isLoading?: boolean;
2083
+ /** `data` が空のときの表示。 */
2084
+ emptyState?: ChartEmptyState;
2085
+ /** プロット領域の高さ(px)。既定 288。 */
2086
+ height?: number;
2087
+ /** 生成した EChartsOption に最後に深くマージする逃げ道。 */
2088
+ chartOptions?: EChartsOption;
2089
+ /** グラフ右上に PNG 保存/コピーのボタンを出す。 */
2090
+ actions?: boolean | ChartActionsOptions;
2091
+ /** PNG 保存時のファイル名(拡張子つき)。 */
2092
+ fileName?: string;
2093
+ className?: string;
2094
+ /** スクリーンリーダー向けのラベル。 */
2095
+ ariaLabel?: string;
2096
+ }
2097
+ /** Generic over the row type, so the column keys are checked against `data`. */
2098
+ declare const Treemap: (<T extends Record<string, unknown>>(props: TreemapProps<T> & {
2099
+ ref?: Ref<HTMLDivElement>;
2100
+ }) => ReactElement) & {
2101
+ displayName?: string;
2102
+ };
2103
+
1535
2104
  type SparklineVariant = "line" | "bar";
1536
2105
  interface SparklineDataPoint {
1537
2106
  value: number;
@@ -1852,6 +2421,41 @@ declare namespace DataTablePreset {
1852
2421
  var displayName: string;
1853
2422
  }
1854
2423
 
2424
+ interface PivotTableProps<T extends Record<string, unknown> = Record<string, unknown>> {
2425
+ /** 集計済みの行の配列。1 行 = 1 マス(行の次元 × 列の次元の組)。同じ組が複数あれば後の行が勝つ(合計はしない)。 */
2426
+ data: T[];
2427
+ /** 行の次元の列名(左から入れ子)。例 `["region", "category"]`。空なら 1 行。 */
2428
+ rows: (keyof T & string)[];
2429
+ /** 列の次元の列名(上から入れ子)。例 `["year"]`。空なら列の見出しは値の名前だけ。 */
2430
+ columns: (keyof T & string)[];
2431
+ /** マスに出す数値の列名。2 つ以上なら列の次元ごとに小列に分かれる。 */
2432
+ values: (keyof T & string)[];
2433
+ /** 値ごとの書式。例 `{ sales: "currency", margin: "percent" }`。無い値は `"number"`。 */
2434
+ formats?: Partial<Record<string, ValueFormat>>;
2435
+ /** 列名・次元の値 → 表示名(見出しに反映)。 */
2436
+ labels?: Record<string, string>;
2437
+ /** 値でマスを塗る(ハイライト表)。`true` で全部の値(値ごとに最小〜最大)、値の列名でその値だけ。既定 `false`。 */
2438
+ highlight?: boolean | string;
2439
+ /** 塗りの色。`"chart-1"`〜`"chart-5"` か意味色。薄い → 濃いの単色。既定 `"chart-1"`。 */
2440
+ tone?: ChartSeriesColor;
2441
+ /** マスのクリック。そのマスの行を受け取る(フィルターの操作に使う)。値の無いマスでは呼ばない。 */
2442
+ onSelect?: (row: T) => void;
2443
+ /** 表の見出し。 */
2444
+ title?: string;
2445
+ /** 表が言っていることの 1 文要約。 */
2446
+ summary?: string;
2447
+ /** 読み込み中。スケルトンを出す。 */
2448
+ isLoading?: boolean;
2449
+ /** `data` が空のときの表示。 */
2450
+ emptyState?: ChartEmptyState;
2451
+ /** 表の箱の最大の高さ(px)。超えると箱の中で縦にスクロールし、見出しは上に残る。既定 480。 */
2452
+ maxHeight?: number;
2453
+ className?: string;
2454
+ /** スクリーンリーダー向けのラベル。省略時は見出し。 */
2455
+ ariaLabel?: string;
2456
+ }
2457
+ declare function PivotTable<T extends Record<string, unknown>>({ data, rows: rowDims, columns: colDims, values: valueKeys, formats, labels, highlight, tone, onSelect, title, summary, isLoading, emptyState, maxHeight, className, ariaLabel, }: PivotTableProps<T>): React.JSX.Element;
2458
+
1855
2459
  interface FilterBarProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange"> {
1856
2460
  value: FilterValues;
1857
2461
  onChange: (values: FilterValues) => void;
@@ -2316,4 +2920,20 @@ interface SampleDataProps {
2316
2920
  }
2317
2921
  declare function SampleData({ label, children }: SampleDataProps): React.JSX.Element;
2318
2922
 
2319
- export { AppShell, type AppShellHeaderProps, type AppShellProps, type AppShellSidebarProps, AreaChart, type AreaChartProps, BarChart, type BarChartProps, BarList, type BarListItem, type BarListOptions, type BarListProps, type BarListSortOrder, COMPARISON_LABELS, CategoryBar, type CategoryBarMarker, type CategoryBarProps, type ChangeDisplay, type ChartActionsOptions, type ChartAnnotation, type ChartColor, type ChartColorToken, type ChartColors, type ChartCommonProps, type ChartComparison, type ChartEmptyState, type ChartEventPayload, type ChartForecast, type ChartForecastRow, ChartFrame, type ChartFrameProps, type ChartHighlight, type ChartRootAttributes, type ChartSeriesColor, type ChartSkeletonVariant, type ChartThreshold, type ChartTone, type Comparison, type ComparisonKind, type ComparisonOptions, type ComparisonResult, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, type DashboardCardActionProps, DashboardCardContent, type DashboardCardContentProps, DashboardCardDescription, type DashboardCardDescriptionProps, DashboardCardFooter, type DashboardCardFooterProps, DashboardCardHeader, type DashboardCardHeaderProps, DashboardCardPreset, type DashboardCardPresetProps, type DashboardCardProps, DashboardCardSkeleton, type DashboardCardSkeletonProps, DashboardCardTitle, type DashboardCardTitleProps, DataTable, DataTableColumnVisibility, type DataTableColumnVisibilityProps, DataTableContent, type DataTableContentProps, DataTableExport, type DataTableExportProps, DataTablePagination, type DataTablePaginationProps, DataTablePreset, type DataTablePresetProps, type DataTableProps, DataTableToolbar, type DataTableToolbarProps, type DateRange, DateRangePicker, type DateRangePickerProps, DateStyle, Delta, type DeltaDirection, type DeltaProps, type DeltaSentiment, DonutChart, type DonutChartOptions, type DonutChartProps, type DonutVariant, EChart, type EChartProps, FilterBar, FilterBarActiveChips, type FilterBarActiveChipsProps, FilterBarClearButton, type FilterBarClearButtonProps, FilterBarMultiSelect, type FilterBarMultiSelectProps, FilterBarPreset, type FilterBarPresetProps, type FilterBarProps, FilterBarSelect, type FilterBarSelectProps, type FilterConfig, type FilterOption, type FilterType, type FilterValues, type FunnelStep, FunnelSteps, type FunnelStepsProps, Heatmap, type HeatmapProps, type HistoryGrain, KpiCard, type KpiCardProps, type KpiCardSource, type KpiPeriod, Legend, type LegendProps, LineChart, type LineChartProps, type MetricItem, MetricUnit, type MetricUnitProps, MetricValue, type MetricValueProps, type MetricVariant, MultiSelect, type MultiSelectProps, type NavGroup, type NavItem, type NumericKeys, PageShell, PageShellActions, type PageShellActionsProps, PageShellContent, type PageShellContentProps, PageShellDescription, type PageShellDescriptionProps, PageShellHeader, PageShellHeaderEnd, type PageShellHeaderEndProps, type PageShellHeaderProps, PageShellHeading, type PageShellHeadingProps, PageShellMeta, type PageShellMetaProps, type PageShellProps, PageShellSummary, PageShellSummaryCard, type PageShellSummaryCardProps, type PageShellSummaryProps, PageShellTitle, type PageShellTitleProps, type PeriodGrain, Placeholder, type PlaceholderProps, type Polarity, type PresetItem, ProgressCircle, type ProgressCircleProps, RECORD_MIN_POINTS, type RecordInsight, SampleBadge, type SampleBadgeProps, SampleClaim, SampleData, type SampleDataProps, ScatterChart, type ScatterChartProps, type ScatterReferenceLine, SearchableSelect, type SearchableSelectProps, SectionHeader, type SectionHeaderProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SelectOption, type SelectOptionGroup, type SelectOptions, Sparkline, type SparklineDataPoint, type SparklineProps, type SparklineVariant, StatusBadge, type StatusBadgeProps, type TargetProgress, Tracker, type TrackerBlock, type TrackerProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, UpdatedAt, type UpdatedAtProps, ValueFormat, type ValueFormatter, WaterfallChart, type WaterfallChartProps, type WaterfallMode, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useResolvedChartColors, useSampleMark };
2923
+ interface DraftChartProps {
2924
+ /** The proposed chart: one card (e.g. `DashboardCardPreset`), as it would sit in the page. */
2925
+ children: ReactElement;
2926
+ }
2927
+ /**
2928
+ * A chart proposed to the page that nobody has accepted yet. Accepting it removes the
2929
+ * `<DraftChart>` tags and keeps the child; removing it deletes the whole element. Both are
2930
+ * source edits made outside the framework — this component only decides what each build shows.
2931
+ *
2932
+ * - `vantage build` (published dashboards): renders nothing, so viewers never see a proposal.
2933
+ * - `vantage dev` (the editor preview): renders the child faded under the page background, and
2934
+ * marks the child's root element with `data-sq-draft` so the editor can find it and draw its
2935
+ * own controls over it. The component itself draws no buttons or text.
2936
+ */
2937
+ declare function DraftChart({ children }: DraftChartProps): React.JSX.Element | null;
2938
+
2939
+ export { AppShell, type AppShellHeaderProps, type AppShellProps, type AppShellSidebarProps, AreaChart, type AreaChartProps, type AttentionKind, AttentionList, type AttentionListProps, BarChart, type BarChartProps, BarList, type BarListItem, type BarListOptions, type BarListProps, type BarListSortOrder, BoxPlotChart, type BoxPlotChartProps, type BoxPlotGroup, COMPARISON_LABELS, CategoryBar, type CategoryBarMarker, type CategoryBarProps, type ChangeDisplay, type ChartActionsOptions, type ChartAnnotation, type ChartColor, type ChartColorToken, type ChartColors, type ChartCommonProps, type ChartComparison, type ChartEmptyState, type ChartEventPayload, type ChartForecast, type ChartForecastRow, ChartFrame, type ChartFrameProps, type ChartHighlight, type ChartRootAttributes, type ChartSeriesColor, type ChartSkeletonVariant, type ChartThreshold, type ChartTone, type ComboAxis, ComboChart, type ComboChartProps, type ComboReferenceLine, type ComboSeries, type ComboSeriesType, type Comparison, type ComparisonKind, type ComparisonOptions, type ComparisonResult, DEFAULT_SAMPLE_LABEL, DELTA_NOT_COMPARABLE, DashboardCard, DashboardCardAction, type DashboardCardActionProps, DashboardCardContent, type DashboardCardContentProps, DashboardCardDescription, type DashboardCardDescriptionProps, DashboardCardFooter, type DashboardCardFooterProps, DashboardCardHeader, type DashboardCardHeaderProps, DashboardCardPreset, type DashboardCardPresetProps, type DashboardCardProps, DashboardCardSkeleton, type DashboardCardSkeletonProps, DashboardCardTitle, type DashboardCardTitleProps, DataTable, DataTableColumnVisibility, type DataTableColumnVisibilityProps, DataTableContent, type DataTableContentProps, DataTableExport, type DataTableExportProps, DataTablePagination, type DataTablePaginationProps, DataTablePreset, type DataTablePresetProps, type DataTableProps, DataTableToolbar, type DataTableToolbarProps, type DateRange, DateRangePicker, type DateRangePickerProps, DateStyle, Delta, type DeltaDirection, type DeltaProps, type DeltaSentiment, DonutChart, type DonutChartOptions, type DonutChartProps, type DonutVariant, DraftChart, type DraftChartProps, EChart, type EChartProps, FilledMap, type FilledMapName, type FilledMapProps, FilterBar, FilterBarActiveChips, type FilterBarActiveChipsProps, FilterBarClearButton, type FilterBarClearButtonProps, FilterBarMultiSelect, type FilterBarMultiSelectProps, FilterBarPreset, type FilterBarPresetProps, type FilterBarProps, FilterBarSelect, type FilterBarSelectProps, type FilterConfig, type FilterOption, type FilterType, type FilterValues, ForecastChart, type ForecastChartProps, type ForecastComponent, type ForecastOptions, type ForecastPeriod, type FunnelStep, FunnelSteps, type FunnelStepsProps, Heatmap, type HeatmapProps, HistogramChart, type HistogramChartProps, type HistogramThreshold, type HistoryGrain, KpiCard, type KpiCardProps, type KpiCardSource, type KpiPeriod, Legend, type LegendProps, LineChart, type LineChartProps, type MetricItem, MetricUnit, type MetricUnitProps, MetricValue, type MetricValueProps, type MetricVariant, MultiSelect, type MultiSelectProps, type NavGroup, type NavItem, type NumericKeys, PageShell, PageShellActions, type PageShellActionsProps, PageShellContent, type PageShellContentProps, PageShellDescription, type PageShellDescriptionProps, PageShellHeader, PageShellHeaderEnd, type PageShellHeaderEndProps, type PageShellHeaderProps, PageShellHeading, type PageShellHeadingProps, PageShellMeta, type PageShellMetaProps, type PageShellProps, PageShellSummary, PageShellSummaryCard, type PageShellSummaryCardProps, type PageShellSummaryProps, PageShellTitle, type PageShellTitleProps, PairedChart, type PairedChartProps, type PairedPanel, type PeriodGrain, PivotTable, type PivotTableProps, Placeholder, type PlaceholderProps, type Polarity, type PresetItem, ProgressCircle, type ProgressCircleProps, RECORD_MIN_POINTS, type RecordInsight, SampleBadge, type SampleBadgeProps, SampleClaim, SampleData, type SampleDataProps, ScatterChart, type ScatterChartProps, type ScatterReferenceLine, SearchableSelect, type SearchableSelectProps, SectionHeader, type SectionHeaderProps, type SegmentOption, SegmentedControl, type SegmentedControlProps, type SelectOption, type SelectOptionGroup, type SelectOptions, Sparkline, type SparklineDataPoint, type SparklineProps, type SparklineVariant, StatusBadge, type StatusBadgeProps, SymbolMap, type SymbolMapBasemap, type SymbolMapProps, type TargetProgress, Tracker, type TrackerBlock, type TrackerProps, Treemap, type TreemapProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, UpdatedAt, type UpdatedAtProps, ValueFormat, type ValueFormatter, WaterfallChart, type WaterfallChartProps, type WaterfallMode, comparisonBaseline, comparisonLabel, computeComparison, computeTargetProgress, defaultChangeDisplay, defaultPresets, deltaVariants, detectRecord, fillKpiTemplate, flattenOptions, formatChange, formatChangeAmount, formatRelativeTime, funnelStepsVariants, inferPeriodGrain, isGroupedOptions, metricValueVariants, pageShellSummaryCardVariants, tableToCsv, toCsv, toneForValue, useDataTable, useResolvedChartColors, useSampleMark };