@squadbase/vantage 0.6.2-dev1.0017a4d → 0.6.2-dev1.02aab78
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.
- package/dist/{build-X5NVCQKT.js → build-YOPOGPQB.js} +7 -7
- package/dist/{build-X5NVCQKT.js.map → build-YOPOGPQB.js.map} +1 -1
- package/dist/{check-ZBIH422T.js → check-FBHT6W6J.js} +5 -5
- package/dist/{check-ZBIH422T.js.map → check-FBHT6W6J.js.map} +1 -1
- package/dist/{chunk-7DZGJQ3P.js → chunk-5C2SEDPH.js} +21 -4
- package/dist/chunk-5C2SEDPH.js.map +1 -0
- package/dist/chunk-6OTTGAPO.js +44 -0
- package/dist/chunk-6OTTGAPO.js.map +1 -0
- package/dist/{chunk-2ICNHUG6.js → chunk-7652CGJJ.js} +10 -3
- package/dist/{chunk-2ICNHUG6.js.map → chunk-7652CGJJ.js.map} +1 -1
- package/dist/{chunk-RU6WKEOG.js → chunk-QOXXOFGL.js} +7 -4
- package/dist/chunk-QOXXOFGL.js.map +1 -0
- package/dist/{chunk-WAMZWZJB.js → chunk-R6MTJAHX.js} +6 -6
- package/dist/chunk-R6MTJAHX.js.map +1 -0
- package/dist/{chunk-CEXAQQ5W.js → chunk-S5MDTHH7.js} +180 -18
- package/dist/chunk-S5MDTHH7.js.map +1 -0
- package/dist/{chunk-JKLLFVEU.js → chunk-UWSQUHX6.js} +4 -99
- package/dist/chunk-UWSQUHX6.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/components/index.d.ts +8 -4
- package/dist/components/index.js +1 -1
- package/dist/delta-text-CvwBGJ95.d.ts +15 -0
- package/dist/{dev-4XEDTELV.js → dev-GUKQT6U6.js} +7 -7
- package/dist/{dev-4XEDTELV.js.map → dev-GUKQT6U6.js.map} +1 -1
- package/dist/doc/index.d.ts +22 -1
- package/dist/doc/index.js +45 -72
- package/dist/doc/index.js.map +1 -1
- package/dist/{doctor-5E2VEZPK.js → doctor-B2O3GJDU.js} +5 -5
- package/dist/{doctor-5E2VEZPK.js.map → doctor-B2O3GJDU.js.map} +1 -1
- package/dist/{routes-3SGAFDMC.js → routes-PVKNT777.js} +4 -4
- package/dist/{routes-3SGAFDMC.js.map → routes-PVKNT777.js.map} +1 -1
- package/dist/slide/index.d.ts +96 -1
- package/dist/slide/index.js +414 -297
- package/dist/slide/index.js.map +1 -1
- package/dist/table/index.js +1 -1
- package/dist/{upgrade-JHXZBGQS.js → upgrade-7ZXMCTTR.js} +4 -4
- package/dist/{upgrade-JHXZBGQS.js.map → upgrade-7ZXMCTTR.js.map} +1 -1
- package/dist/vite/index.js +3 -3
- package/docs/en/changelog.md +2 -0
- package/docs/en/components.md +4 -2
- package/docs/en/doc/delta-text.md +40 -0
- package/docs/en/doc/doc-notes-and-sources.md +43 -0
- package/docs/en/pages-and-metadata.md +15 -0
- package/docs/en/parts/delta.md +4 -3
- package/docs/en/parts/kpi-card.md +2 -1
- package/docs/en/slide/slide-chart-full.md +48 -0
- package/docs/en/slide/slide-columns.md +46 -0
- package/docs/en/slide/slide-comparison.md +68 -0
- package/docs/en/slide/slide-heading.md +38 -0
- package/docs/en/slide/slide-section.md +44 -0
- package/docs/en/slide/slide-source-line.md +34 -0
- package/docs/index.json +208 -48
- package/docs/ja/changelog.md +2 -0
- package/docs/ja/components.md +4 -2
- package/docs/ja/doc/delta-text.md +40 -0
- package/docs/ja/doc/doc-notes-and-sources.md +43 -0
- package/docs/ja/page-types/slide.md +1 -0
- package/docs/ja/pages-and-metadata.md +15 -0
- package/docs/ja/parts/delta.md +5 -4
- package/docs/ja/parts/kpi-card.md +2 -1
- package/docs/ja/slide/slide-chart-full.md +48 -0
- package/docs/ja/slide/slide-columns.md +46 -0
- package/docs/ja/slide/slide-comparison.md +68 -0
- package/docs/ja/slide/slide-heading.md +38 -0
- package/docs/ja/slide/slide-section.md +44 -0
- package/docs/ja/slide/slide-source-line.md +34 -0
- package/package.json +2 -2
- package/registry/ui/delta.tsx +7 -4
- package/registry/ui/kpi-card.tsx +9 -4
- package/skills/vantage-pitfalls/SKILL.md +5 -0
- package/skills/vantage-slide/SKILL.md +2 -2
- package/templates/AGENTS.md +4 -2
- package/templates/agents/doc.md +3 -0
- package/templates/agents/slide.md +16 -1
- package/theme.css +7 -4
- package/dist/chunk-7DZGJQ3P.js.map +0 -1
- package/dist/chunk-CEXAQQ5W.js.map +0 -1
- package/dist/chunk-JKLLFVEU.js.map +0 -1
- package/dist/chunk-RU6WKEOG.js.map +0 -1
- package/dist/chunk-WAMZWZJB.js.map +0 -1
|
@@ -2121,7 +2121,9 @@ interface KpiCardProps extends Omit<ComponentProps<"div">, "children"> {
|
|
|
2121
2121
|
provisional?: boolean | {
|
|
2122
2122
|
label?: string;
|
|
2123
2123
|
};
|
|
2124
|
-
/**
|
|
2124
|
+
/** Which direction is good: `"up"` (default) or `"down"` (churn, error rate). Wins over `polarity`. */
|
|
2125
|
+
betterWhen?: "up" | "down";
|
|
2126
|
+
/** @deprecated Older name of `betterWhen` (`"higher-is-better"` / `"lower-is-better"`). `"neutral"` (never colours the change, skips the target and record logic) is only reachable here. `betterWhen` wins if both are given. */
|
|
2125
2127
|
polarity?: Polarity;
|
|
2126
2128
|
/** `"relative"` ("+12.4%"), `"points"` ("-0.5pt") or `"difference"` ("+¥530万", in `format`). Default: points for a `percent` format, else relative. */
|
|
2127
2129
|
change?: ChangeDisplay;
|
|
@@ -2134,7 +2136,7 @@ interface KpiCardProps extends Omit<ComponentProps<"div">, "children"> {
|
|
|
2134
2136
|
/**
|
|
2135
2137
|
* Target for the current period. Under the value it adds a 6px bar (actual, the pace
|
|
2136
2138
|
* projection, a tick at the target) and one line "目標の 49%・このペースなら 98%"
|
|
2137
|
-
* (the projection only while `period` is in progress). With `
|
|
2139
|
+
* (the projection only while `period` is in progress). With `betterWhen="down"`
|
|
2138
2140
|
* or a rate target (points) there is no bar: "目標 … まであと …" in the footer.
|
|
2139
2141
|
*/
|
|
2140
2142
|
target?: number;
|
|
@@ -2197,7 +2199,7 @@ interface KpiCardProps extends Omit<ComponentProps<"div">, "children"> {
|
|
|
2197
2199
|
*/
|
|
2198
2200
|
declare function fillKpiTemplate(template: string, values: Readonly<Record<string, string | null | undefined>>): string;
|
|
2199
2201
|
declare function fillKpiTemplate(template: string, values: Readonly<Record<string, string | null | undefined>>, fallback: string | null): string | null;
|
|
2200
|
-
declare function KpiCard({ label, value, format, locale, comparison: comparisonProp, comparisons, provisional, polarity, change, neutralBand, showPrevious, summary, target, targetLabel, targetDisplay, period, history, historyGrain, showHistory, source, updatedAt, updatedAtDisplay, timeZone, now, isLoading, size, className, ...props }: KpiCardProps): React.JSX.Element;
|
|
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;
|
|
2201
2203
|
|
|
2202
2204
|
declare const deltaVariants: (props?: ({
|
|
2203
2205
|
variant?: "inline" | "badge" | null | undefined;
|
|
@@ -2208,7 +2210,9 @@ interface DeltaProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children">,
|
|
|
2208
2210
|
value: number | null | undefined;
|
|
2209
2211
|
/** What the value is compared against. Required so the delta always carries its label. */
|
|
2210
2212
|
comparison: Comparison;
|
|
2211
|
-
/**
|
|
2213
|
+
/** Which direction is good: `"up"` (default) or `"down"` (churn, error rate). Wins over `polarity`. */
|
|
2214
|
+
betterWhen?: "up" | "down";
|
|
2215
|
+
/** @deprecated Older name of `betterWhen` (`"higher-is-better"` / `"lower-is-better"`); `"neutral"` is only reachable here. `betterWhen` wins if both are given. */
|
|
2212
2216
|
polarity?: Polarity;
|
|
2213
2217
|
/** Absolute ratio below which the change reads as flat (0.01 = 1%). Default 0.01. */
|
|
2214
2218
|
neutralBand?: number;
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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
2
|
export { EChart, useResolvedChartColors } from '../chunk-JXFCSF3K.js';
|
|
3
3
|
export { Sparkline } from '../chunk-2IAPIOPS.js';
|
|
4
4
|
export { DEFAULT_LOCALE, EMPTY_VALUE, MINUS_SIGN, formatDate, formatDateRange, formatDatesInText, formatDelta, formatKind, formatPoints, formatValue, toValueFormatter } from '../chunk-57GHR5LN.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { V as ValueFormat } from './format-U0cQl069.js';
|
|
3
|
+
|
|
4
|
+
interface DeltaTextProps {
|
|
5
|
+
/** The change itself; its direction comes from the sign. `null` shows "—". */
|
|
6
|
+
value: number | null;
|
|
7
|
+
format?: ValueFormat;
|
|
8
|
+
/** Which way is good. Default `"up"`. */
|
|
9
|
+
betterWhen?: "up" | "down";
|
|
10
|
+
/** Name of the comparison, e.g. "前月比". Printed before the change; omit to print only the change. */
|
|
11
|
+
comparisonLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function DeltaText({ value, format, betterWhen, comparisonLabel }: DeltaTextProps): React.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { DeltaText as D, type DeltaTextProps as a };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { runDiagnostics } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import { vantagePlugin } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
1
|
+
import { runDiagnostics } from './chunk-5C2SEDPH.js';
|
|
2
|
+
import './chunk-UWSQUHX6.js';
|
|
3
|
+
import { vantagePlugin } from './chunk-7652CGJJ.js';
|
|
4
|
+
import './chunk-R6MTJAHX.js';
|
|
5
|
+
import './chunk-S5MDTHH7.js';
|
|
6
6
|
import { scanProject, timedAsync } from './chunk-RNTDBX6S.js';
|
|
7
7
|
import './chunk-46QI6GFC.js';
|
|
8
8
|
import './chunk-B7LLBNLV.js';
|
|
@@ -77,5 +77,5 @@ async function dev(root, args) {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
export { dev };
|
|
80
|
-
//# sourceMappingURL=dev-
|
|
81
|
-
//# sourceMappingURL=dev-
|
|
80
|
+
//# sourceMappingURL=dev-GUKQT6U6.js.map
|
|
81
|
+
//# sourceMappingURL=dev-GUKQT6U6.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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AA;AAAA;AAAA;AAAA;AAAA,MAI5F,MAAA,EAAQ;AAAA,QACN,IAAA;AAAA,QACA,UAAA;AAAA,QACA,GAAG,KAAA,CAAM,OAAA;AAAA,QACT,GAAI,UAAU,EAAC,GAAI,EAAE,GAAA,EAAK,EAAE,OAAA,EAAS,KAAA,EAAM;AAAE,OAC/C;AAAA,MACA,WAAA,EAAa;AAAA,KACd;AAAA,GACH;AAEA,EAAA,IAAI;AACF,IAAA,MAAM,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-GUKQT6U6.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"]}
|
package/dist/doc/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import { V as ValueFormat } from '../format-U0cQl069.js';
|
|
4
|
+
export { D as DeltaText, a as DeltaTextProps } from '../delta-text-CvwBGJ95.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Per-document token overrides. Anything left out falls through to `--doc-*`
|
|
@@ -232,4 +233,24 @@ interface DocReportHeaderProps {
|
|
|
232
233
|
}
|
|
233
234
|
declare function DocReportHeader({ title, subtitle, period, asOf, author, source }: DocReportHeaderProps): React.JSX.Element;
|
|
234
235
|
|
|
235
|
-
|
|
236
|
+
interface DocDefinition {
|
|
237
|
+
term: string;
|
|
238
|
+
description: ReactNode;
|
|
239
|
+
}
|
|
240
|
+
interface DocSource {
|
|
241
|
+
name: string;
|
|
242
|
+
/** Data as-of date, e.g. "2026-10-03". */
|
|
243
|
+
asOf?: string;
|
|
244
|
+
}
|
|
245
|
+
interface DocNotesAndSourcesProps {
|
|
246
|
+
/** Heading text. Default "注記・出典". */
|
|
247
|
+
title?: string;
|
|
248
|
+
/** `2` directly under the document, `3` inside another section. Default 2. */
|
|
249
|
+
headingLevel?: 2 | 3;
|
|
250
|
+
notes?: ReactNode[];
|
|
251
|
+
definitions?: DocDefinition[];
|
|
252
|
+
sources?: DocSource[];
|
|
253
|
+
}
|
|
254
|
+
declare function DocNotesAndSources({ title, headingLevel, notes, definitions, sources }: DocNotesAndSourcesProps): React.JSX.Element | null;
|
|
255
|
+
|
|
256
|
+
export { type DocActionItem, DocActionItems, type DocActionItemsProps, type DocActionPriority, DocCallout, type DocCalloutKind, type DocCalloutProps, DocDataTable, type DocDataTableProps, type DocDefinition, DocExecutiveSummary, type DocExecutiveSummaryProps, DocFigure, type DocFigureProps, type DocFinding, type DocFindingMetric, DocKeyFindings, type DocKeyFindingsProps, DocKpiScorecard, type DocKpiScorecardProps, DocNotesAndSources, type DocNotesAndSourcesProps, DocReportHeader, type DocReportHeaderProps, type DocScorecardMetric, type DocSource, type DocSummaryMetric, type DocTableCell, type DocTableColumn, type DocTableRow, Document, type DocumentProps, type DocumentTheme };
|
package/dist/doc/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { DeltaText } from '../chunk-6OTTGAPO.js';
|
|
2
|
+
export { DeltaText } from '../chunk-6OTTGAPO.js';
|
|
1
3
|
import { Sparkline } from '../chunk-2IAPIOPS.js';
|
|
2
|
-
import { formatValue
|
|
4
|
+
import { formatValue } from '../chunk-57GHR5LN.js';
|
|
3
5
|
import { Button } from '../chunk-PDOBHMUQ.js';
|
|
4
6
|
import '../chunk-U736PVHY.js';
|
|
5
7
|
import { forwardRef, useEffect, useId } from 'react';
|
|
@@ -107,7 +109,14 @@ var Document = forwardRef(function Document2({ theme, style, ...props }, ref) {
|
|
|
107
109
|
{
|
|
108
110
|
ref,
|
|
109
111
|
"data-slot": "document",
|
|
110
|
-
style: {
|
|
112
|
+
style: {
|
|
113
|
+
width: "100%",
|
|
114
|
+
// Phrase-aware Japanese line breaks (no-op unless <html lang> is CJK / unsupported browsers drop it).
|
|
115
|
+
wordBreak: "auto-phrase",
|
|
116
|
+
lineBreak: "strict",
|
|
117
|
+
...themeVars,
|
|
118
|
+
...style
|
|
119
|
+
},
|
|
111
120
|
...props
|
|
112
121
|
}
|
|
113
122
|
),
|
|
@@ -220,28 +229,6 @@ function DocDataTable({ title, unit, columns, rows, total, highlightRows, footno
|
|
|
220
229
|
] }) : null
|
|
221
230
|
] });
|
|
222
231
|
}
|
|
223
|
-
function ChangeText({ delta, format, betterWhen = "up" }) {
|
|
224
|
-
const { value } = delta;
|
|
225
|
-
const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
|
|
226
|
-
const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
|
|
227
|
-
const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
|
|
228
|
-
const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
|
|
229
|
-
const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
|
|
230
|
-
const text = formatDelta(value, delta.format ?? format);
|
|
231
|
-
return /* @__PURE__ */ jsxs(
|
|
232
|
-
"span",
|
|
233
|
-
{
|
|
234
|
-
className: tone,
|
|
235
|
-
style: tone ? void 0 : { color: "var(--doc-muted)" },
|
|
236
|
-
"aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
|
|
237
|
-
children: [
|
|
238
|
-
mark,
|
|
239
|
-
" ",
|
|
240
|
-
text
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
232
|
function DocExecutiveSummary({
|
|
246
233
|
title = "\u8981\u65E8",
|
|
247
234
|
headingLevel = 2,
|
|
@@ -268,7 +255,7 @@ function DocExecutiveSummary({
|
|
|
268
255
|
m.comparisonLabel ?? "\u524D\u671F\u6BD4",
|
|
269
256
|
" "
|
|
270
257
|
] }),
|
|
271
|
-
/* @__PURE__ */ jsx(
|
|
258
|
+
/* @__PURE__ */ jsx(DeltaText, { value: m.delta.value, format: m.delta.format ?? m.format, betterWhen: m.betterWhen })
|
|
272
259
|
] }) : null
|
|
273
260
|
]
|
|
274
261
|
},
|
|
@@ -294,28 +281,6 @@ function DocFigure({ title, unit, number, source, asOf, notes, children }) {
|
|
|
294
281
|
] }) : null
|
|
295
282
|
] });
|
|
296
283
|
}
|
|
297
|
-
function ChangeText2({ delta, format, betterWhen = "up" }) {
|
|
298
|
-
const { value } = delta;
|
|
299
|
-
const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
|
|
300
|
-
const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
|
|
301
|
-
const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
|
|
302
|
-
const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
|
|
303
|
-
const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
|
|
304
|
-
const text = formatDelta(value, delta.format ?? format);
|
|
305
|
-
return /* @__PURE__ */ jsxs(
|
|
306
|
-
"span",
|
|
307
|
-
{
|
|
308
|
-
className: tone,
|
|
309
|
-
style: tone ? void 0 : { color: "var(--doc-muted)" },
|
|
310
|
-
"aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
|
|
311
|
-
children: [
|
|
312
|
-
mark,
|
|
313
|
-
" ",
|
|
314
|
-
text
|
|
315
|
-
]
|
|
316
|
-
}
|
|
317
|
-
);
|
|
318
|
-
}
|
|
319
284
|
function DocKeyFindings({ title = "\u4E3B\u8981\u306A\u767A\u898B", headingLevel = 2, findings }) {
|
|
320
285
|
const Heading = headingLevel === 3 ? "h3" : "h2";
|
|
321
286
|
const Item = headingLevel === 3 ? "h4" : "h3";
|
|
@@ -337,7 +302,7 @@ function DocKeyFindings({ title = "\u4E3B\u8981\u306A\u767A\u898B", headingLevel
|
|
|
337
302
|
f.metric.comparisonLabel ?? "\u524D\u671F\u6BD4",
|
|
338
303
|
" "
|
|
339
304
|
] }),
|
|
340
|
-
/* @__PURE__ */ jsx(
|
|
305
|
+
/* @__PURE__ */ jsx(DeltaText, { value: f.metric.delta.value, format: f.metric.delta.format ?? f.metric.format, betterWhen: f.metric.betterWhen })
|
|
341
306
|
] }) : null
|
|
342
307
|
] }) : null
|
|
343
308
|
] })
|
|
@@ -346,31 +311,9 @@ function DocKeyFindings({ title = "\u4E3B\u8981\u306A\u767A\u898B", headingLevel
|
|
|
346
311
|
}
|
|
347
312
|
var MUTED2 = { color: "var(--doc-muted)" };
|
|
348
313
|
var ACHIEVEMENT = { type: "percent", digits: 1 };
|
|
349
|
-
function ChangeText3({ delta, format, betterWhen = "up" }) {
|
|
350
|
-
const { value } = delta;
|
|
351
|
-
const dir = value > 0 ? "up" : value < 0 ? "down" : "flat";
|
|
352
|
-
const mark = dir === "up" ? "\u25B2" : dir === "down" ? "\u25BC" : "\u2192";
|
|
353
|
-
const word = dir === "up" ? "\u5897" : dir === "down" ? "\u6E1B" : "\u6A2A\u3070\u3044";
|
|
354
|
-
const good = dir === "flat" ? void 0 : dir === "up" === (betterWhen === "up");
|
|
355
|
-
const tone = good === void 0 ? void 0 : good ? "text-positive" : "text-negative";
|
|
356
|
-
const text = formatDelta(value, delta.format ?? format);
|
|
357
|
-
return /* @__PURE__ */ jsxs(
|
|
358
|
-
"span",
|
|
359
|
-
{
|
|
360
|
-
className: tone,
|
|
361
|
-
style: tone ? void 0 : { color: "var(--doc-muted)" },
|
|
362
|
-
"aria-label": `${word}\u3001${text}${good === void 0 ? "" : good ? "\u3001\u6539\u5584" : "\u3001\u60AA\u5316"}`,
|
|
363
|
-
children: [
|
|
364
|
-
mark,
|
|
365
|
-
" ",
|
|
366
|
-
text
|
|
367
|
-
]
|
|
368
|
-
}
|
|
369
|
-
);
|
|
370
|
-
}
|
|
371
314
|
var shown = (m) => m.display ?? formatValue(m.value, m.format);
|
|
372
315
|
var achievement = (m) => m.target === void 0 || m.target === 0 || m.value === null ? "\u2014" : formatValue(m.value / m.target, ACHIEVEMENT);
|
|
373
|
-
var change = (m) => m.delta ? /* @__PURE__ */ jsx(
|
|
316
|
+
var change = (m) => m.delta ? /* @__PURE__ */ jsx(DeltaText, { value: m.delta.value, format: m.delta.format ?? m.format, betterWhen: m.betterWhen }) : "\u2014";
|
|
374
317
|
var trendOf = (m) => (m.trend ?? []).map(({ y }) => ({ value: y }));
|
|
375
318
|
function DocKpiScorecard({
|
|
376
319
|
title = "\u4E3B\u8981\u6307\u6A19",
|
|
@@ -459,7 +402,37 @@ function DocReportHeader({ title, subtitle, period, asOf, author, source }) {
|
|
|
459
402
|
) : null
|
|
460
403
|
] });
|
|
461
404
|
}
|
|
405
|
+
function DocNotesAndSources({ title = "\u6CE8\u8A18\u30FB\u51FA\u5178", headingLevel = 2, notes = [], definitions = [], sources = [] }) {
|
|
406
|
+
if (notes.length === 0 && definitions.length === 0 && sources.length === 0) return null;
|
|
407
|
+
const Heading = headingLevel === 3 ? "h3" : "h2";
|
|
408
|
+
const Sub = headingLevel === 3 ? "h4" : "h3";
|
|
409
|
+
return /* @__PURE__ */ jsxs("section", { "data-slot": "doc-notes-and-sources", children: [
|
|
410
|
+
/* @__PURE__ */ jsx(Heading, { children: title }),
|
|
411
|
+
notes.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "break-inside-avoid", children: [
|
|
412
|
+
/* @__PURE__ */ jsx(Sub, { children: "\u6CE8\u8A18" }),
|
|
413
|
+
/* @__PURE__ */ jsx("ol", { children: notes.map((n, i) => /* @__PURE__ */ jsx("li", { children: n }, i)) })
|
|
414
|
+
] }) : null,
|
|
415
|
+
definitions.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "break-inside-avoid", children: [
|
|
416
|
+
/* @__PURE__ */ jsx(Sub, { children: "\u7528\u8A9E\u306E\u5B9A\u7FA9" }),
|
|
417
|
+
/* @__PURE__ */ jsx("dl", { className: "m-0", children: definitions.map((d, i) => /* @__PURE__ */ jsxs("div", { className: "break-inside-avoid", children: [
|
|
418
|
+
/* @__PURE__ */ jsx("dt", { className: "font-semibold", children: d.term }),
|
|
419
|
+
/* @__PURE__ */ jsx("dd", { className: "m-0", children: d.description })
|
|
420
|
+
] }, i)) })
|
|
421
|
+
] }) : null,
|
|
422
|
+
sources.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "break-inside-avoid", children: [
|
|
423
|
+
/* @__PURE__ */ jsx(Sub, { children: "\u51FA\u5178" }),
|
|
424
|
+
/* @__PURE__ */ jsx("ul", { children: sources.map((s, i) => /* @__PURE__ */ jsxs("li", { children: [
|
|
425
|
+
s.name,
|
|
426
|
+
s.asOf ? /* @__PURE__ */ jsxs("span", { style: { color: "var(--doc-muted)" }, children: [
|
|
427
|
+
"\uFF08\u30C7\u30FC\u30BF\u6642\u70B9 ",
|
|
428
|
+
s.asOf,
|
|
429
|
+
"\uFF09"
|
|
430
|
+
] }) : null
|
|
431
|
+
] }, i)) })
|
|
432
|
+
] }) : null
|
|
433
|
+
] });
|
|
434
|
+
}
|
|
462
435
|
|
|
463
|
-
export { DocActionItems, DocCallout, DocDataTable, DocExecutiveSummary, DocFigure, DocKeyFindings, DocKpiScorecard, DocReportHeader, Document };
|
|
436
|
+
export { DocActionItems, DocCallout, DocDataTable, DocExecutiveSummary, DocFigure, DocKeyFindings, DocKpiScorecard, DocNotesAndSources, DocReportHeader, Document };
|
|
464
437
|
//# sourceMappingURL=index.js.map
|
|
465
438
|
//# sourceMappingURL=index.js.map
|