@wodecorp/openui-vue-dashboard-library 0.1.0 → 0.1.1
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/README.md +33 -11
- package/dist/index.cjs +354 -189
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +354 -189
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -9
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["defineComponent","defineComponent","vueComponent","defineComponent","defineComponent","defineComponent","defineComponent","TONE_COLOR","defineComponent","defineComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","TONE_COLOR","defineComponent","defineComponent","defineComponent","defineComponent","defineComponent","defineComponent","TONE_COLOR","vueComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","defineComponent","Series","vueComponent","defineComponent","defineComponent","Series","Reference","Marker","vueComponent","defineComponent","groupComponents","groupComponents","vueComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","componentGroups"],"sources":["../src/components/defaultThemes.ts","../src/components/ThemeProvider.ts","../src/shared/format.ts","../src/shared/schema.ts","../src/shared/colors.ts","../src/shared/compare.ts","../src/shared/values.ts","../src/shared/chartHelpers.ts","../src/lib/trends/Reference/schema.ts","../src/lib/trends/Reference/index.ts","../src/lib/trends/Series/schema.ts","../src/lib/trends/Series/index.ts","../src/lib/comparison/Bars/schema.ts","../src/lib/comparison/Bars/index.ts","../src/lib/comparison/Distribution/schema.ts","../src/lib/comparison/Distribution/index.ts","../src/lib/comparison/Dumbbell/schema.ts","../src/lib/comparison/Dumbbell/index.ts","../src/lib/comparison/Intervals/schema.ts","../src/lib/comparison/Intervals/index.ts","../src/lib/comparison/Leaderboard/schema.ts","../src/lib/comparison/Leaderboard/index.ts","../src/lib/comparison/index.ts","../src/shared/parts.ts","../src/lib/composition/Donut/schema.ts","../src/lib/composition/Donut/index.ts","../src/lib/composition/SegmentedBar/schema.ts","../src/lib/composition/SegmentedBar/index.ts","../src/lib/composition/Treemap/schema.ts","../src/lib/composition/Treemap/index.ts","../src/lib/composition/Waterfall/schema.ts","../src/lib/composition/Waterfall/index.ts","../src/lib/composition/index.ts","../src/shared/cardSlot.ts","../src/shared/filterRegistry.ts","../src/lib/filters/optionSchema.ts","../src/lib/filters/ChipFilter/schema.ts","../src/lib/filters/ChipFilter/index.ts","../src/lib/filters/CompareToggle/schema.ts","../src/lib/filters/CompareToggle/index.ts","../src/lib/filters/DateRangeFilter/schema.ts","../src/lib/filters/DateRangeFilter/index.ts","../src/lib/filters/MultiSelectFilter/schema.ts","../src/lib/filters/MultiSelectFilter/index.ts","../src/lib/filters/PeriodPicker/schema.ts","../src/lib/filters/PeriodPicker/index.ts","../src/lib/filters/SelectFilter/schema.ts","../src/lib/filters/SelectFilter/index.ts","../src/lib/filters/FilterBar/schema.ts","../src/lib/filters/FilterBar/index.ts","../src/lib/filters/index.ts","../src/lib/flow/Flow/schema.ts","../src/lib/flow/Flow/index.ts","../src/lib/flow/Funnel/schema.ts","../src/lib/flow/Funnel/index.ts","../src/lib/flow/index.ts","../src/shared/atlas.ts","../src/lib/maps/GeoMap/schema.ts","../src/lib/maps/GeoMap/index.ts","../src/lib/maps/PointMap/schema.ts","../src/lib/maps/PointMap/index.ts","../src/lib/maps/index.ts","../src/lib/metrics/Goal/schema.ts","../src/lib/metrics/Goal/index.ts","../src/lib/metrics/KeyValue/schema.ts","../src/lib/metrics/KeyValue/index.ts","../src/lib/metrics/KeyValues/schema.ts","../src/lib/metrics/KeyValues/index.ts","../src/lib/metrics/Progress/schema.ts","../src/lib/metrics/Progress/index.ts","../src/lib/metrics/Split/schema.ts","../src/lib/metrics/Split/index.ts","../src/lib/metrics/States/schema.ts","../src/lib/metrics/States/index.ts","../src/lib/metrics/Trend/schema.ts","../src/lib/metrics/Trend/index.ts","../src/lib/metrics/Kpi/schema.ts","../src/lib/metrics/Kpi/index.ts","../src/lib/metrics/Kpis/schema.ts","../src/lib/metrics/Kpis/index.ts","../src/lib/metrics/Stat/schema.ts","../src/lib/metrics/Stat/index.ts","../src/lib/metrics/index.ts","../src/lib/relationships/Cohorts/schema.ts","../src/lib/relationships/Cohorts/index.ts","../src/lib/relationships/Heatmap/schema.ts","../src/lib/relationships/Heatmap/index.ts","../src/lib/relationships/Scatter/schema.ts","../src/lib/relationships/Scatter/index.ts","../src/lib/relationships/index.ts","../src/lib/tables/Column/schema.ts","../src/lib/tables/Column/index.ts","../src/lib/tables/Table/schema.ts","../src/lib/tables/Table/index.ts","../src/lib/tables/index.ts","../src/lib/trends/Marker/schema.ts","../src/lib/trends/Marker/index.ts","../src/lib/trends/SmallMultiples/schema.ts","../src/lib/trends/SmallMultiples/index.ts","../src/lib/trends/StatusTimeline/schema.ts","../src/lib/trends/StatusTimeline/index.ts","../src/lib/trends/TimeSeries/schema.ts","../src/lib/trends/TimeSeries/index.ts","../src/lib/trends/index.ts","../src/lib/registeredGroups.ts","../src/lib/slots.ts","../src/lib/structure/Card/schema.ts","../src/lib/structure/Card/index.ts","../src/lib/structure/Row/schema.ts","../src/lib/structure/Row/index.ts","../src/lib/structure/Section/schema.ts","../src/lib/structure/Section/index.ts","../src/lib/structure/Dashboard/schema.ts","../src/lib/structure/Dashboard/index.ts","../src/lib/structure/index.ts","../src/lib/defineComponents.ts","../src/lib/prompt-options/examples.ts","../src/lib/prompt-options/promptOptions.ts","../src/lib/prompt-options/index.ts","../src/lib/library.ts"],"sourcesContent":["export const defaultLightTheme = {\n sheenPeak: \"2.5%\",\n skelLineTone: \"3.5%\",\n skelBlockTone: \"2.5%\",\n page: \"#ffffff\",\n surface: \"#ffffff\",\n surfaceSubtle: \"rgba(0, 0, 0, 0.04)\",\n border: \"rgba(0, 0, 0, 0.06)\",\n borderStrong: \"rgba(0, 0, 0, 0.1)\",\n ink: \"#0d0d0d\",\n inkSecondary: \"rgba(13, 13, 13, 0.64)\",\n inkMuted: \"rgba(13, 13, 13, 0.52)\",\n grid: \"#f1f1f1\",\n accent: \"#0e0e0e\",\n accentInk: \"#ffffff\",\n series1: \"#6155e8\",\n series2: \"#16b76f\",\n series3: \"#ffc700\",\n series4: \"#df507b\",\n series5: \"#3894ff\",\n series6: \"#ff8000\",\n series7: \"#a0522d\",\n series8: \"#00cbd9\",\n mutedMark: \"#b4b4b4\",\n seq1: \"#f5f6ff\",\n seq2: \"#d9ddff\",\n seq3: \"#c0c5f9\",\n seq4: \"#a7acf1\",\n seq5: \"#9094e8\",\n seq6: \"#797cdd\",\n seq7: \"#6563d2\",\n seq8: \"#5248c6\",\n seq9: \"#4229ba\",\n seqInk1: \"var(--openui-dashboard-ink)\",\n seqInk2: \"var(--openui-dashboard-ink)\",\n seqInk3: \"var(--openui-dashboard-ink)\",\n seqInk4: \"var(--openui-dashboard-ink)\",\n seqInk5: \"var(--openui-dashboard-ink)\",\n seqInk6: \"var(--openui-dashboard-ink)\",\n seqInk7: \"#ffffff\",\n seqInk8: \"#ffffff\",\n seqInk9: \"#ffffff\",\n areaWash: \"0.09\",\n areaDot: \"0.4\",\n areaStackTop: \"0.55\",\n areaStackBottom: \"0.35\",\n areaStackTex: \"0.5\",\n texTint: \"0.1\",\n texInk: \"0.35\",\n barInk: \"0.16\",\n div1: \"#b32f5b\",\n div2: \"#ca647e\",\n div3: \"#dd92a2\",\n div4: \"#eebfc9\",\n div5: \"#e7e7e7\",\n div6: \"#c6caf2\",\n div7: \"#9fa4e5\",\n div8: \"#7b7ed7\",\n div9: \"#5a56c7\",\n divInk1: \"#ffffff\",\n divInk2: \"var(--openui-dashboard-ink)\",\n divInk3: \"var(--openui-dashboard-ink)\",\n divInk4: \"var(--openui-dashboard-ink)\",\n divInk5: \"var(--openui-dashboard-ink)\",\n divInk6: \"var(--openui-dashboard-ink)\",\n divInk7: \"var(--openui-dashboard-ink)\",\n divInk8: \"var(--openui-dashboard-ink)\",\n divInk9: \"#ffffff\",\n good: \"#079455\",\n goodMark: \"#16b76f\",\n bad: \"#c82c37\",\n badMark: \"#d03348\",\n warning: \"#cd8200\",\n warningSoft: \"rgba(255, 199, 0, 0.12)\",\n warningMark: \"#ffc700\",\n info: \"#317ce6\",\n neutralSoft: \"rgba(0, 0, 0, 0.04)\",\n mapLand: \"#efefef\",\n radius: \"16px\",\n radiusMd: \"12px\",\n radiusSm: \"8px\",\n spaceXs: \"8px\",\n spaceSm: \"12px\",\n spaceMd: \"16px\",\n spaceLg: \"20px\",\n spaceXl: \"24px\",\n space2xl: \"36px\",\n shadow: \"0 3px 8px -3px rgba(0, 0, 0, 0.04), 0 1px 2px -2px rgba(0, 0, 0, 0.02)\",\n shadowPop: \"0 6px 12px -6px rgba(0, 0, 0, 0.1), 0 10px 40px -8px rgba(0, 0, 0, 0.08)\",\n};\n\nexport type Theme = { [K in keyof typeof defaultLightTheme]?: string };\n\nexport const defaultDarkTheme: Required<Theme> = {\n sheenPeak: \"3.5%\",\n skelLineTone: \"5%\",\n skelBlockTone: \"3.5%\",\n page: \"#141414\",\n surface: \"#151515\",\n surfaceSubtle: \"rgba(255, 255, 255, 0.04)\",\n border: \"rgba(255, 255, 255, 0.04)\",\n borderStrong: \"rgba(255, 255, 255, 0.12)\",\n ink: \"#fafafa\",\n inkSecondary: \"rgba(250, 250, 250, 0.62)\",\n inkMuted: \"rgba(250, 250, 250, 0.5)\",\n grid: \"rgba(255, 255, 255, 0.04)\",\n accent: \"#fafafa\",\n accentInk: \"#0d0d0d\",\n series1: \"#7b72f2\",\n series2: \"#16b76f\",\n series3: \"#ffc700\",\n series4: \"#df507b\",\n series5: \"#3894ff\",\n series6: \"#ff8000\",\n series7: \"#b8693a\",\n series8: \"#00cbd9\",\n mutedMark: \"rgba(250, 250, 250, 0.3)\",\n seq1: \"#1b1c34\",\n seq2: \"#2c2e4e\",\n seq3: \"#3e4069\",\n seq4: \"#515484\",\n seq5: \"#6568a1\",\n seq6: \"#7a7ebd\",\n seq7: \"#8f94d9\",\n seq8: \"#a6abf4\",\n seq9: \"#bdc3ff\",\n seqInk1: \"var(--openui-dashboard-ink)\",\n seqInk2: \"var(--openui-dashboard-ink)\",\n seqInk3: \"var(--openui-dashboard-ink)\",\n seqInk4: \"var(--openui-dashboard-ink)\",\n seqInk5: \"var(--openui-dashboard-ink)\",\n seqInk6: \"#0d0d0d\",\n seqInk7: \"#0d0d0d\",\n seqInk8: \"#0d0d0d\",\n seqInk9: \"#0d0d0d\",\n areaWash: \"0.02\",\n areaDot: \"0.08\",\n areaStackTop: \"0.2\",\n areaStackBottom: \"0.08\",\n areaStackTex: \"0.3\",\n texTint: \"0.03\",\n texInk: \"0.12\",\n barInk: \"0.22\",\n div1: \"#eb7d98\",\n div2: \"#c2687e\",\n div3: \"#995565\",\n div4: \"#73414d\",\n div5: \"#3a3a3c\",\n div6: \"#4b4e79\",\n div7: \"#6366a1\",\n div8: \"#7b7fcc\",\n div9: \"#9599f9\",\n divInk1: \"#0d0d0d\",\n divInk2: \"#0d0d0d\",\n divInk3: \"var(--openui-dashboard-ink)\",\n divInk4: \"var(--openui-dashboard-ink)\",\n divInk5: \"var(--openui-dashboard-ink)\",\n divInk6: \"var(--openui-dashboard-ink)\",\n divInk7: \"var(--openui-dashboard-ink)\",\n divInk8: \"#0d0d0d\",\n divInk9: \"#0d0d0d\",\n good: \"#7fe0b1\",\n goodMark: \"#2ce98a\",\n bad: \"#f1838c\",\n badMark: \"#ea4e58\",\n warning: \"#ffd84d\",\n warningSoft: \"rgba(255, 199, 0, 0.16)\",\n warningMark: \"#ffc700\",\n info: \"#8fbcf7\",\n neutralSoft: \"rgba(255, 255, 255, 0.06)\",\n mapLand: \"#232323\",\n radius: \"16px\",\n radiusMd: \"12px\",\n radiusSm: \"8px\",\n spaceXs: \"8px\",\n spaceSm: \"12px\",\n spaceMd: \"16px\",\n spaceLg: \"20px\",\n spaceXl: \"24px\",\n space2xl: \"36px\",\n shadow: \"0 2px 6px -2px rgba(0, 0, 0, 0.22), 0 3px 10px -3px rgba(0, 0, 0, 0.16)\",\n shadowPop: \"0 10px 28px -8px rgba(0, 0, 0, 0.45), 0 20px 56px -12px rgba(0, 0, 0, 0.3)\",\n};\n","import {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n type ComputedRef,\n type CSSProperties,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { defaultDarkTheme, defaultLightTheme, type Theme } from \"./defaultThemes\";\n\nexport { defaultDarkTheme, defaultLightTheme, type Theme };\n\nexport type ThemeMode = \"light\" | \"dark\";\n\nexport interface ThemeProviderProps {\n mode?: ThemeMode;\n lightTheme?: Theme;\n darkTheme?: Theme;\n}\n\nexport interface DashboardThemeContextValue {\n mode: ComputedRef<ThemeMode>;\n style: ComputedRef<CSSProperties>;\n}\n\nexport const ThemeContext: InjectionKey<DashboardThemeContextValue | null> = Symbol(\n \"OpenUI.DashboardTheme\",\n);\n\nexport function tokenVariable(key: string): string {\n return `--openui-dashboard-${key.replace(/[A-Z]|\\d+/g, (part) => `-${part.toLowerCase()}`)}`;\n}\n\nexport function useDashboardTheme(): DashboardThemeContextValue | null {\n return inject(ThemeContext, null);\n}\n\nexport const ThemeProvider = defineComponent({\n name: \"OpenUIDashboardThemeProvider\",\n inheritAttrs: false,\n props: {\n mode: String as PropType<ThemeMode>,\n lightTheme: Object as PropType<Theme>,\n darkTheme: Object as PropType<Theme>,\n },\n setup(props, { slots }) {\n const parent = inject(ThemeContext, null);\n const mode = computed<ThemeMode>(() => props.mode ?? parent?.mode.value ?? \"light\");\n const style = computed<CSSProperties>(() => {\n const defaults = mode.value === \"light\" ? defaultLightTheme : defaultDarkTheme;\n const overrides: Theme | undefined =\n mode.value === \"light\" ? props.lightTheme : (props.darkTheme ?? props.lightTheme);\n const vars: Record<string, string> = { colorScheme: mode.value };\n for (const [key, token] of Object.entries(defaults)) {\n vars[tokenVariable(key)] = overrides?.[key as keyof Theme] ?? token;\n }\n return vars as CSSProperties;\n });\n\n provide(ThemeContext, { mode, style });\n\n return () =>\n h(\n \"div\",\n {\n \"data-dashboard-mode\": mode.value,\n style: { display: \"contents\", ...style.value },\n },\n slots.default?.(),\n );\n },\n});\n\nexport const DashboardTheme = defineComponent({\n name: \"OpenUIDashboardRootTheme\",\n inheritAttrs: false,\n setup(_, { slots }) {\n const parent = inject(ThemeContext, null);\n return () =>\n parent ? slots.default?.() : h(ThemeProvider, null, { default: () => slots.default?.() });\n },\n});\n","import { z } from \"zod/v4\";\n\n/**\n * How a number is shown. Data stays numeric everywhere (so sorting, totals,\n * deltas and charts work); a format only decides how it reads.\n *\n * Presets:\n * - \"number\" 1,284 · 12,904\n * - \"compact\" 1,284 · 12.9K · 4.21M · 12.4M\n * - \"currency\" $1,284 · $12,904\n * - \"currency-compact\" $1,284 · $12.9K · $4.95M · $12.4M\n * - \"currency-precise\" $1,284.50 (2 decimals)\n * - \"percent\" value already in percent: 3.21 → 3.2%\n * - \"ratio\" value is a fraction: 0.0321 → 3.2%\n * - \"multiplier\" 3.2 → 3.2x (ROAS, lift factors)\n * - \"duration\" seconds: 238 → 3m 58s, 1.4 → 1.4s, 0.041 → 41ms\n * - \"ms\" milliseconds: 238 → 238 ms, 1450 → 1.45 s\n * - \"days\" 2.5 → 2.5d\n *\n * Or an object for anything else: {type: \"currency\", currency: \"EUR\", decimals: 2}.\n */\nexport const FORMAT_PRESETS = [\n \"number\",\n \"compact\",\n \"currency\",\n \"currency-compact\",\n \"currency-precise\",\n \"percent\",\n \"ratio\",\n \"multiplier\",\n \"duration\",\n \"ms\",\n \"days\",\n] as const;\n\nexport type FormatPreset = (typeof FORMAT_PRESETS)[number];\n\nexport const formatSchema = z.union([\n z.enum(FORMAT_PRESETS),\n z.object({\n type: z.enum(FORMAT_PRESETS),\n currency: z.string().optional(),\n decimals: z.number().optional(),\n prefix: z.string().optional(),\n suffix: z.string().optional(),\n }),\n]);\n\nexport type ValueFormat = z.infer<typeof formatSchema>;\n\ntype Resolved = {\n type: FormatPreset;\n currency: string;\n decimals?: number;\n prefix: string;\n suffix: string;\n};\n\nfunction resolve(format: ValueFormat | undefined | null): Resolved {\n if (!format) return { type: \"number\", currency: \"USD\", prefix: \"\", suffix: \"\" };\n if (typeof format === \"string\") return { type: format, currency: \"USD\", prefix: \"\", suffix: \"\" };\n return {\n type: format.type,\n currency: format.currency ?? \"USD\",\n decimals: format.decimals,\n prefix: format.prefix ?? \"\",\n suffix: format.suffix ?? \"\",\n };\n}\n\nconst cache = new Map<string, Intl.NumberFormat>();\nfunction nf(base: Intl.NumberFormatOptions): Intl.NumberFormat {\n // \"negative\" never prints \"-0\" for values that round to zero.\n const options: Intl.NumberFormatOptions = {\n signDisplay: \"negative\" as Intl.NumberFormatOptions[\"signDisplay\"],\n ...base,\n };\n const key = JSON.stringify(options);\n let formatter = cache.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(\"en-US\", options);\n cache.set(key, formatter);\n }\n return formatter;\n}\n\nfunction compactDigits(value: number, decimals?: number) {\n if (decimals !== undefined) return decimals;\n const abs = Math.abs(value);\n // Single-digit millions and billions get a second decimal: $4.95M, not $5M.\n if ((abs >= 1e6 && abs < 1e7) || (abs >= 1e9 && abs < 1e10)) return 2;\n return abs >= 1000 ? 1 : 0;\n}\n\n/** One unit, no spaces, so axis ticks stay on one line: 45s · 25m · 1.5h · 3d. */\nfunction axisDuration(seconds: number): string {\n const abs = Math.abs(seconds);\n const trim = (n: number) => nf({ maximumFractionDigits: 1 }).format(n);\n if (abs < 60) return `${trim(seconds)}s`;\n if (abs < 3600) return `${trim(seconds / 60)}m`;\n if (abs < 86400 * 2) return `${trim(seconds / 3600)}h`;\n return `${trim(seconds / 86400)}d`;\n}\n\n/**\n * A percentage that never lies at the edges: 99.999% stays 99.999% (not 100%),\n * and a tiny non-zero share reads \"<0.1%\" (not 0%).\n */\nfunction percentText(pct: number, decimals: number | undefined, axis: boolean): string {\n if (decimals !== undefined) return `${nf({ maximumFractionDigits: decimals }).format(pct)}%`;\n if (axis) return `${nf({ maximumFractionDigits: Math.abs(pct) >= 1000 ? 0 : 2 }).format(pct)}%`;\n const abs = Math.abs(pct);\n if (abs >= 1000) return `${nf({ maximumFractionDigits: 0 }).format(pct)}%`;\n if (pct !== 0 && abs < 0.05) return `${pct < 0 ? \"-\" : \"\"}<0.1%`;\n if (abs < 100 && abs >= 99.95) return `${nf({ maximumFractionDigits: 3 }).format(pct)}%`;\n return `${nf({ maximumFractionDigits: 1 }).format(pct)}%`;\n}\n\nfunction duration(seconds: number): string {\n const sign = seconds < 0 ? \"-\" : \"\";\n const abs = Math.abs(seconds);\n // Latencies live below a second: under 0.1s read in milliseconds (41ms),\n // under 10s keep one decimal (0.5s, 1.4s), matching the axis beside them.\n if (abs > 0 && abs < 0.1) return `${sign}${Math.round(abs * 1000)}ms`;\n if (abs < 10 && Math.round(abs * 10) / 10 < 10)\n return `${sign}${nf({ maximumFractionDigits: 1 }).format(abs)}s`;\n let s = Math.round(abs);\n if (s < 60) return `${sign}${s}s`;\n // Two days and up read better in days: 102h → 4d 6h.\n if (s >= 172800) {\n // Round to whole hours first, so 71.6h reads 3d, not 2d 24h.\n const totalHours = Math.round(s / 3600);\n const d = Math.floor(totalHours / 24);\n const hours = totalHours - d * 24;\n return hours ? `${sign}${d}d ${hours}h` : `${sign}${d}d`;\n }\n const h = Math.floor(s / 3600);\n s -= h * 3600;\n const m = Math.floor(s / 60);\n s -= m * 60;\n if (h) return m ? `${sign}${h}h ${m}m` : `${sign}${h}h`;\n return s ? `${sign}${m}m ${s}s` : `${sign}${m}m`;\n}\n\n/** Formats one value. Non-numbers (null, \"—\", text) come back as text. */\nexport function formatValue(\n value: unknown,\n format?: ValueFormat | null,\n options: { axis?: boolean } = {},\n): string {\n if (value === null || value === undefined || value === \"\") return \"—\";\n if (typeof value !== \"number\" || !Number.isFinite(value)) return String(value);\n const f = resolve(format);\n // Axis ticks favour short labels: compact numbers, no decimals unless needed.\n const axis = options.axis ?? false;\n let text: string;\n switch (f.type) {\n case \"compact\":\n text = nf({\n notation: \"compact\",\n maximumFractionDigits: compactDigits(value, f.decimals),\n }).format(value);\n break;\n case \"currency\":\n text = axis\n ? nf({\n style: \"currency\",\n currency: f.currency,\n notation: \"compact\",\n minimumFractionDigits: 0,\n maximumFractionDigits: 1,\n }).format(value)\n : nf({\n style: \"currency\",\n currency: f.currency,\n maximumFractionDigits: f.decimals ?? 0,\n }).format(value);\n break;\n case \"currency-compact\":\n text = nf({\n style: \"currency\",\n currency: f.currency,\n notation: \"compact\",\n // Pinned: engines before the 2023 Intl change pad compact currency to the\n // currency's 2 digits ($12.50K, $4.90M); newer ones, like plain compact, don't.\n minimumFractionDigits: 0,\n maximumFractionDigits: compactDigits(value, f.decimals),\n }).format(value);\n break;\n case \"currency-precise\":\n text = nf({\n style: \"currency\",\n currency: f.currency,\n minimumFractionDigits: axis ? 0 : (f.decimals ?? 2),\n maximumFractionDigits: f.decimals ?? 2,\n }).format(value);\n break;\n case \"percent\":\n text = percentText(value, f.decimals, axis);\n break;\n case \"ratio\":\n text = percentText(value * 100, f.decimals, axis);\n break;\n case \"multiplier\":\n text = `${nf({ maximumFractionDigits: f.decimals ?? 1, minimumFractionDigits: axis ? 0 : (f.decimals ?? 1) }).format(value)}x`;\n break;\n case \"duration\":\n text = axis ? axisDuration(value) : duration(value);\n break;\n case \"ms\":\n // Axis ticks drop the space so the chart never wraps \"800 ms\" onto two lines.\n text =\n Math.abs(value) >= 1000\n ? `${nf({ maximumFractionDigits: axis ? 1 : 2 }).format(value / 1000)}${axis ? \"s\" : \" s\"}`\n : `${nf({ maximumFractionDigits: 0 }).format(value)}${axis ? \"ms\" : \" ms\"}`;\n break;\n case \"days\":\n text = `${nf({ maximumFractionDigits: f.decimals ?? 1 }).format(value)}d`;\n break;\n default: {\n const digits = f.decimals ?? 2;\n const smallest = 10 ** -digits;\n // A tiny non-zero value (a p-value of 0.00002) must not read as 0.\n text =\n !axis && value !== 0 && Math.abs(value) < smallest / 2\n ? `<${nf({ maximumFractionDigits: digits }).format(smallest)}`\n : axis && Math.abs(value) >= 10_000\n ? nf({ notation: \"compact\", maximumFractionDigits: 1 }).format(value)\n : nf({ maximumFractionDigits: digits }).format(value);\n }\n }\n return `${f.prefix}${text}${f.suffix}`;\n}\n\nexport function isRatioFormat(format?: ValueFormat | null): boolean {\n return resolve(format).type === \"ratio\";\n}\n\nexport function isDurationFormat(format?: ValueFormat | null): boolean {\n return resolve(format).type === \"duration\";\n}\n\n/**\n * Whether a format measures a rate, where change reads in points rather than percent. A number\n * with a \"%\" suffix (a margin written as {type: \"number\", suffix: \"%\"}) is a percent too.\n */\nexport function isRateFormat(format?: ValueFormat | null): boolean {\n const { type, suffix } = resolve(format);\n return type === \"percent\" || type === \"ratio\" || (type === \"number\" && suffix.trim() === \"%\");\n}\n\nexport type Delta = { text: string; direction: \"up\" | \"down\" | \"flat\" };\n\n/**\n * The change from `previous` to `current`: relative (+12.4%) for amounts,\n * absolute in points (+0.4 pts) for rates.\n */\nexport function computeDelta(\n current: number,\n previous: number,\n format?: ValueFormat | null,\n): Delta | null {\n if (!Number.isFinite(current) || !Number.isFinite(previous)) return null;\n if (isRateFormat(format)) {\n const scale = resolve(format).type === \"ratio\" ? 100 : 1;\n const diff = (current - previous) * scale;\n // Near-ceiling rates (99.74% vs 99.71%) move in hundredths; don't round them to \"+0\".\n const digits = Math.abs(diff) < 0.1 ? 2 : 1;\n const direction = Math.abs(diff) < 0.005 ? \"flat\" : diff > 0 ? \"up\" : \"down\";\n return {\n text: `${diff > 0 ? \"+\" : \"\"}${nf({ maximumFractionDigits: digits }).format(diff)} pts`,\n direction,\n };\n }\n if (previous === 0) return null;\n // Across a sign flip (+$12K → −$48K) a percent change is meaningless: show the absolute change.\n if (previous < 0 || (current !== 0 && Math.sign(current) !== Math.sign(previous))) {\n const diff = current - previous;\n const direction = diff === 0 ? \"flat\" : diff > 0 ? \"up\" : \"down\";\n return { text: `${diff > 0 ? \"+\" : \"\"}${formatValue(diff, format)}`, direction };\n }\n const change = ((current - previous) / Math.abs(previous)) * 100;\n const direction = Math.abs(change) < 0.005 ? \"flat\" : change > 0 ? \"up\" : \"down\";\n const digits = Math.abs(change) >= 100 ? 0 : Math.abs(change) < 0.1 ? 2 : 1;\n return {\n text: `${change > 0 ? \"+\" : \"\"}${nf({ maximumFractionDigits: digits }).format(change)}%`,\n direction,\n };\n}\n\n/** Whether a delta is good news, given which direction is good for the metric. */\nexport function deltaTone(\n direction: Delta[\"direction\"],\n goodWhen: \"up\" | \"down\" | \"neutral\" = \"up\",\n) {\n if (direction === \"flat\" || goodWhen === \"neutral\") return \"neutral\" as const;\n return (direction === \"up\") === (goodWhen === \"up\") ? (\"good\" as const) : (\"bad\" as const);\n}\n\n/**\n * Decimals that line a column up: the most any value shows, but only when the\n * values share a unit after the number (%, x, \" pts\", \" ms\"). Mixed compact\n * suffixes ($950, $1.2K) are different scales and never padded.\n */\nexport function columnDecimals(texts: string[]): number {\n const parts = texts\n .map((t) => t.match(/^[^\\d]*[\\d,]+(?:\\.(\\d+))?(.*)$/))\n .filter((m): m is RegExpMatchArray => !!m);\n if (parts.length < 2) return 0;\n const suffixes = new Set(parts.map((m) => m[2]));\n if (suffixes.size > 1) return 0;\n return Math.max(...parts.map((m) => (m[1] ?? \"\").length));\n}\n\n/** Pads the first number in a formatted value to `decimals`: \"35%\" → \"35.0%\". */\nexport function padDecimals(text: string, decimals: number): string {\n if (!decimals) return text;\n return text.replace(\n /^([^\\d]*[\\d,]+)(?:\\.(\\d+))?/,\n (_, whole: string, frac = \"\") => `${whole}.${frac.padEnd(decimals, \"0\")}`,\n );\n}\n\n/* ---------- Dates ---------- */\n\n// A date or timestamp as APIs return it: 2026-04-01, 2026-04-01T21:01:20.458Z, 2026-04-01 21:01:20+05:30.\nconst ISO_DATE =\n /^\\d{4}-\\d{2}-\\d{2}(?:[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$/;\n\n/**\n * The day an ISO date or timestamp names, or null for any other text. A bare date reads as local\n * midnight, so it shows the day it says in every time zone. An impossible day (2026-02-30) is\n * null rather than rolled over to the next month.\n */\nexport function parseIsoDate(value: unknown): Date | null {\n if (typeof value !== \"string\") return null;\n const text = value.trim();\n if (!ISO_DATE.test(text)) return null;\n // The strict shape every browser parses: \"T\" between date and time, a colon in the offset.\n const iso =\n text.length === 10\n ? `${text}T00:00:00`\n : text.replace(\" \", \"T\").replace(/([+-]\\d{2})(\\d{2})$/, \"$1:$2\");\n const day = new Date(iso);\n if (Number.isNaN(day.getTime())) return null;\n // Date rolls an impossible day over (2026-02-30 to Mar 2); a real one reads back the same.\n const [year, month, date] = text.slice(0, 10).split(\"-\").map(Number) as [number, number, number];\n const calendar = new Date(Date.UTC(year, month - 1, date));\n if (\n calendar.getUTCFullYear() !== year ||\n calendar.getUTCMonth() !== month - 1 ||\n calendar.getUTCDate() !== date\n ) {\n return null;\n }\n return day;\n}\n\n/** \"Apr 2\" this year, \"Apr 23, 2012\" before it: how a Table date column reads. */\nexport function formatDay(day: Date): string {\n const sameYear = day.getFullYear() === new Date().getFullYear();\n return day.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: sameYear ? undefined : \"numeric\",\n });\n}\n\n// The en-US Date#toLocaleString() shape some data sources return: 10/1/2026, 12:00:00 AM. Only this\n// one: its AM/PM marks the US month-first order, so 10/01/2026 can't be the 10th of January.\nconst US_DATETIME = /^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4}),?\\s+(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*([AP]M)$/i;\n// A year and month, as monthly data is often keyed: 2025-11.\nconst YEAR_MONTH = /^(\\d{4})-(\\d{2})$/;\n\n/** A date read from text, with whether it names a whole month and whether it has a time of day. */\nexport type DateText = { date: Date; unit: \"day\" | \"month\"; time: boolean };\n\nconst atMidnight = (date: Date) =>\n date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0;\n\n/**\n * The date a text names: an ISO date or timestamp, or the en-US toLocaleString() shape\n * (10/01/2026, 12:00:00 AM). Null for any other text, and for impossible days (02/30/2026), so a\n * version or a name is never read as a date. A year and month (2025-11) counts only with\n * `months`, for a whole set of values (an axis, a column): alone, \"2026-04\" may be a version.\n */\nexport function parseDateText(\n value: unknown,\n { months = false }: { months?: boolean } = {},\n): DateText | null {\n if (typeof value !== \"string\") return null;\n const text = value.trim();\n const iso = parseIsoDate(text);\n if (iso) return { date: iso, unit: \"day\", time: text.length > 10 && !atMidnight(iso) };\n const month = months ? YEAR_MONTH.exec(text) : null;\n if (month) {\n const [year, index] = [Number(month[1]), Number(month[2]) - 1];\n return index >= 0 && index < 12\n ? { date: new Date(year, index, 1), unit: \"month\", time: false }\n : null;\n }\n const us = US_DATETIME.exec(text);\n if (!us) return null;\n const [m, d, y, h, min, sec] = [1, 2, 3, 4, 5, 6].map((i) => Number(us[i] ?? 0)) as number[];\n if (m! < 1 || m! > 12 || h! < 1 || h! > 12 || min! > 59 || sec! > 59) return null;\n const hours = (h! % 12) + (us[7]!.toUpperCase() === \"PM\" ? 12 : 0);\n const date = new Date(y!, m! - 1, d!, hours, min!, sec!);\n // A real day reads back the same; 02/30/2026 would roll over to March.\n if (date.getMonth() !== m! - 1 || date.getDate() !== d!) return null;\n return { date, unit: \"day\", time: !atMidnight(date) };\n}\n\n/** \"Nov 2025\": how a month reads. */\nfunction formatMonth(date: Date, withYear: boolean): string {\n return date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n year: withYear ? \"numeric\" : undefined,\n });\n}\n\n/**\n * A date as a short day (\"Apr 2\"), or null for any other text (a version, a name). A day this\n * year leaves its year out, as a Table date column does. With `months`, a year and month reads\n * \"Nov 2025\".\n */\nexport function formatDateText(\n value: unknown,\n { months = false }: { months?: boolean } = {},\n): string | null {\n const parsed = parseDateText(value, { months });\n if (!parsed) return null;\n return parsed.unit === \"month\" ? formatMonth(parsed.date, true) : formatDay(parsed.date);\n}\n\n/**\n * Chart category labels that are all dates, or all months, read as dates: \"May 14\" or \"Nov 2025\",\n * with the year only when some label falls outside this year, and the time only when two labels\n * share a day. Null when any label is other text, so names and quarters pass through untouched.\n */\nexport function dateLabels(labels: string[]): ((label: string) => string) | null {\n const shown = labels.filter((label) => label.trim() !== \"\");\n const parsed = shown.map((label) => parseDateText(label, { months: true }));\n if (!parsed.length || parsed.some((date) => !date)) return null;\n const dates = parsed as DateText[];\n const unit = dates[0]!.unit;\n if (dates.some((date) => date.unit !== unit)) return null;\n const year = new Date().getFullYear();\n const withYear = dates.some((date) => date.date.getFullYear() !== year);\n const day = (date: Date) =>\n date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: withYear ? \"numeric\" : undefined,\n });\n const days = dates.map((date) => day(date.date));\n const timed = unit === \"day\" && new Set(days).size < days.length;\n const text = new Map(\n shown.map((label, i) => {\n const date = dates[i]!;\n if (unit === \"month\") return [label, formatMonth(date.date, withYear)];\n if (!timed) return [label, days[i]!];\n const time = date.date.toLocaleTimeString(\"en-US\", { hour: \"numeric\", minute: \"2-digit\" });\n return [label, `${days[i]}, ${time}`];\n }),\n );\n return (label) => text.get(label) ?? label;\n}\n","import { z } from \"zod/v4\";\n\n/** How much of a Row a card takes, on a 12-column grid. Narrow screens stack. */\nexport const WIDTHS = [\"quarter\", \"third\", \"half\", \"two-thirds\", \"three-quarters\", \"full\"] as const;\nexport const widthSchema = z.enum(WIDTHS);\nexport type Width = z.infer<typeof widthSchema>;\n\nexport const widthClass = (width: Width | undefined | null, fallback: Width) =>\n `openui-dashboard-w-${width ?? fallback}`;\n\n/** Which direction of change is good news for a metric (drives delta colour). */\nexport const goodWhenSchema = z.enum([\"up\", \"down\", \"neutral\"]);\n\nexport const toneSchema = z.enum([\"good\", \"bad\", \"warning\", \"info\", \"neutral\"]);\nexport type Tone = z.infer<typeof toneSchema>;\n\n/** One period's status; null is no data. A union, so a signature brackets it: (\"good\" | \"warning\" | \"bad\" | null)[]. */\nexport const stateSchema = z.union([z.enum([\"good\", \"warning\", \"bad\"]), z.literal(null)]);\n\n/** A list of numbers, where gaps (not yet observed, not applicable) are null. */\nexport const numbersSchema = z.array(z.number().nullable());\n","/**\n * Chart colours. Charts read these CSS variables (defined in styles.css), so a\n * host can re-theme by overriding `--openui-dashboard-series-*` and friends on `.openui-dashboard-root`.\n *\n * The categorical order was validated for colour-vision deficiency: adjacent\n * slots stay distinguishable (CVD ΔE ≥ 12 light), and the first three stay\n * distinguishable in every pairing, which is why part-to-whole charts show at\n * most three slices plus \"Other\". Assign in order; never by rank. The dark\n * theme (styles.css) has its own steps, validated on the dark card surface.\n */\nexport const SERIES_COLORS = Array.from(\n { length: 8 },\n (_, i) => `var(--openui-dashboard-series-${i + 1})`,\n);\n\n/** The de-emphasis colour for the previous period, targets and \"other\". */\nexport const MUTED_COLOR = \"var(--openui-dashboard-muted-mark)\";\n\n/** Slots 1–8 in order; anything past the eighth is grey \"other\", never a generated or repeated hue. */\nexport const seriesColor = (index: number) =>\n index < SERIES_COLORS.length ? SERIES_COLORS[index] : MUTED_COLOR;\n\n/** The single-hue ramp for magnitude (heatmaps, cohort grids), light → dark. */\nexport const SEQUENTIAL = Array.from(\n { length: 9 },\n (_, i) => `var(--openui-dashboard-seq-${i + 1})`,\n);\n\n/** Picks a ramp step for a value in [min, max]. */\nexport function sequentialColor(\n value: number,\n min: number,\n max: number,\n): { background: string; color: string } {\n // When every value is equal there is no magnitude to show: use a mid step, not the darkest.\n const t = max === min ? 0.5 : Math.min(1, Math.max(0, (value - min) / (max - min)));\n const step = Math.round(t * (SEQUENTIAL.length - 1));\n // Each step carries its own text ink token; the light and dark ramps switch\n // ink at different steps, so the switch point lives in each theme's CSS.\n return { background: SEQUENTIAL[step]!, color: `var(--openui-dashboard-seq-ink-${step + 1})` };\n}\n\n/** The two-pole ramp for polarity around a midpoint (change, variance, correlation). */\nexport const DIVERGING = Array.from(\n { length: 9 },\n (_, i) => `var(--openui-dashboard-div-${i + 1})`,\n);\n\n/**\n * Picks a diverging step for a value: the neutral middle step at midpoint,\n * the poles at ±spread. Each step carries its own text ink, set per theme.\n */\nexport function divergingColor(\n value: number,\n midpoint: number,\n spread: number,\n): { background: string; color: string } {\n const t = spread ? Math.max(-1, Math.min(1, (value - midpoint) / spread)) : 0;\n const step = 4 + Math.round(t * 4);\n return { background: DIVERGING[step]!, color: `var(--openui-dashboard-div-ink-${step + 1})` };\n}\n\n/**\n * The textures series cycle through, in order. Each is drawn as dark ink (or\n * the series' own hue) over its colour, so neighbours differ by more than hue.\n * Series 1–6 get one each; 7 and 8 start the cycle again.\n */\nexport const TEXTURES = [\n \"dots\",\n \"slash\",\n \"back-slash\",\n \"horizontal\",\n \"crosshatch\",\n \"vertical\",\n] as const;\nexport const textureOf = (index: number) => index % TEXTURES.length;\n","import {\n computed,\n defineComponent,\n inject,\n provide,\n ref,\n type ComputedRef,\n type InjectionKey,\n type PropType,\n} from \"vue\";\n\nexport interface CompareState {\n enabled: ComputedRef<boolean>;\n setEnabled: (enabled: boolean) => void;\n label: ComputedRef<string>;\n setLabel: (label: string) => void;\n}\n\nconst CompareOverrideKey: InjectionKey<ComputedRef<boolean | null> | null> = Symbol(\n \"OpenUI.Dashboard.CompareOverride\",\n);\n\nconst CompareKey: InjectionKey<CompareState> = Symbol(\"OpenUI.Dashboard.Compare\");\n\nconst fallbackCompare: CompareState = {\n enabled: computed(() => false),\n setEnabled: () => {},\n label: computed(() => \"Previous period\"),\n setLabel: () => {},\n};\n\nexport const CompareOverride = defineComponent({\n name: \"OpenUIDashboardCompareOverride\",\n props: {\n value: { type: Boolean as PropType<boolean | null>, default: null },\n },\n setup(props, { slots }) {\n provide(\n CompareOverrideKey,\n computed(() => props.value),\n );\n return () => slots.default?.();\n },\n});\n\nexport const CompareProvider = defineComponent({\n name: \"OpenUIDashboardCompareProvider\",\n setup(_, { slots }) {\n const forced = inject(CompareOverrideKey, null);\n const localEnabled = ref(false);\n const localLabel = ref(\"Previous period\");\n\n provide(CompareKey, {\n enabled: computed(() => forced?.value ?? localEnabled.value),\n setEnabled: (next) => {\n localEnabled.value = next;\n },\n label: computed(() => localLabel.value),\n setLabel: (next) => {\n localLabel.value = next;\n },\n });\n\n return () => slots.default?.();\n },\n});\n\nexport function useCompare(): CompareState {\n return inject(CompareKey, fallbackCompare);\n}\n","/* ---------- Helpers ---------- */\n\nexport function toNumbers(values: unknown): (number | null)[] {\n if (!Array.isArray(values)) return [];\n return values.map((value) =>\n typeof value === \"number\" && Number.isFinite(value) ? value : null,\n );\n}\n\nexport function toStrings(values: unknown): string[] {\n if (!Array.isArray(values)) return [];\n return values.map((value) => (value === null || value === undefined ? \"\" : String(value)));\n}\n\n/** Props of a child component node (e.g. a Series inside a chart). */\nexport function nodeProps<T>(node: unknown): T | null {\n if (!node || typeof node !== \"object\") return null;\n const props = (node as { props?: unknown }).props;\n return props && typeof props === \"object\" ? (props as T) : null;\n}\n\nexport function nodeList<T>(nodes: unknown): T[] {\n if (!Array.isArray(nodes)) return [];\n return nodes.map((node) => nodeProps<T>(node)).filter((props): props is T => props !== null);\n}\n\n/**\n * Arranges one-entry-per-cell arrays (each cell's row label, column label and value, the way\n * query rows give them) into a grid. Rows and columns keep the order they first appear in; a\n * cell no entry names is null.\n */\nexport function toGrid<T>(rowLabels: unknown, columnLabels: unknown, values: unknown) {\n const rowOf = toStrings(rowLabels);\n const columnOf = toStrings(columnLabels);\n const list: unknown[] = Array.isArray(values) ? values : [];\n const rows = [...new Set(rowOf)];\n const columns = [...new Set(columnOf)];\n const cells = rows.map(() => columns.map((): T | null => null));\n for (let i = 0; i < Math.min(rowOf.length, columnOf.length); i++)\n cells[rows.indexOf(rowOf[i]!)]![columns.indexOf(columnOf[i]!)] = (list[i] as T) ?? null;\n return { rows, columns, cells };\n}\n","import { z } from \"zod/v4\";\nimport { MUTED_COLOR, seriesColor as themeSeriesColor } from \"./colors\";\nimport { formatValue, type ValueFormat } from \"./format\";\nimport { type LegendEntry } from \"./legend\";\nimport { niceStep } from \"./scales\";\nimport { type ReferenceProps, type SeriesProps } from \"./trends\";\nimport { toNumbers } from \"./values\";\n\nexport const seriesColor = (index: number): string => themeSeriesColor(index) ?? MUTED_COLOR;\n\n/* ---------- Shared chart plumbing ---------- */\n\nexport const AXIS_TICK = { fill: \"var(--openui-dashboard-ink-muted)\", fontSize: 12 };\n\n/** One bar thickness across every chart (TimeSeries, Bars, Waterfall); previous-period ghosts beside a bar run at half. */\nexport const BAR_SIZE = 12;\n\n/**\n * No bar is drawn thinner than this. Past it, horizontal bars grow the chart\n * taller, and vertical bars give the plot a minimum width and scroll sideways\n * inside the card rather than shrink to slivers.\n */\nexport const BAR_MIN = 6;\n\n/**\n * The band one category needs for `bars` side-by-side bars of BAR_MIN, 2px apart.\n * Recharts takes the category gap (a share of the band) from both sides, hence 1 - 2 × gap.\n */\nexport const bandFor = (bars: number, gap: number) =>\n (bars * BAR_MIN + Math.max(0, Math.ceil(bars) - 1) * 2) / (1 - 2 * gap);\n\n/**\n * Vertical bars: the plot width that keeps every bar at BAR_MIN, or 0 when the\n * card is already wide enough. `chrome` is the axis and margins beside the bars.\n */\nexport function minPlotWidth(\n width: number,\n labels: number,\n bars: number,\n gap: number,\n chrome = 64,\n) {\n if (!width || !bars) return 0;\n // One spare pixel per bar: Recharts rounds bar sizes down.\n const need = Math.ceil(labels * bandFor(bars, gap) * ((BAR_MIN + 1) / BAR_MIN) + chrome);\n return need > width ? need : 0;\n}\n\n/** A line drawn over bars is in the same unit (the Series docs require it), so it\n * summarises them, e.g. a 7-day average: neutral ink, not a category hue. */\nexport const SUMMARY_COLOR = \"var(--openui-dashboard-ink-secondary)\";\n\n/** Top margin a chart leaves when a vertical line's chip sits above its plot: the 18px chip, less its 3px overlap, plus 9px of air above. */\nexport const CHIP_ROOM = 24;\n\n/** The reference chip's measurements, shared by the SVG chip on chart lines and the HTML chip on row charts. */\n/** The least height a plot keeps: below it, a card grows rather than squash the chart. Rows set the real height. */\nexport const PLOT_FLOOR = 200;\n\nexport type Row = Record<string, string | number | null>;\n\nexport const DURATION_STEPS = [\n 1, 2, 5, 10, 15, 30, 60, 120, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400, 172800,\n 604800,\n];\n\n/** Zero-based ticks on whole durations (30s, 1m, 5m, 1h, …) instead of 65s, 130s. */\nexport function durationTicks(\n rows: Row[],\n keys: string[],\n extra: number[] = [],\n): number[] | undefined {\n let max = Math.max(0, ...extra);\n for (const row of rows)\n for (const key of keys)\n if (typeof row[key] === \"number\") max = Math.max(max, row[key] as number);\n if (!max) return undefined;\n const step = DURATION_STEPS.find((candidate) => max / candidate <= 5) ?? Math.ceil(max / 5);\n return Array.from({ length: Math.ceil(max / step) + 1 }, (_, i) => i * step);\n}\n\n/**\n * Value-axis ticks on 1, 2, 2.5 or 5 × 10ⁿ steps, from zero (or below it, for negative data) to\n * just past the data, so an axis never counts in 950K steps as Recharts' own ticks can. A stacked\n * row counts as its positive and negative sums; whole-number data keeps whole-number steps.\n */\nexport function niceTicks(\n rows: Row[],\n keys: string[],\n extra: number[] = [],\n { stacked = false, integers = false }: { stacked?: boolean; integers?: boolean } = {},\n): number[] | undefined {\n const values = extra.filter(Number.isFinite);\n for (const row of rows) {\n let up = 0;\n let down = 0;\n for (const key of keys) {\n const value = row[key];\n if (typeof value !== \"number\" || !Number.isFinite(value)) continue;\n if (!stacked) values.push(value);\n else if (value > 0) up += value;\n else down += value;\n }\n if (stacked) values.push(up, down);\n }\n const lo = Math.min(0, ...values);\n const hi = Math.max(0, ...values);\n if (lo === hi) return undefined;\n const raw = niceStep((hi - lo) / 4);\n // Whole numbers step by 1, 2 or 5 × 10ⁿ: a 2.5 step would print 7.5.\n const step = integers && !Number.isInteger(raw) ? Math.max(1, Math.floor(raw)) : raw;\n const start = Math.floor(lo / step) * step;\n const end = Math.ceil(hi / step) * step;\n return Array.from({ length: Math.round((end - start) / step) + 1 }, (_, i) =>\n Number((start + i * step).toPrecision(12)),\n );\n}\n\n/**\n * Which end of a horizontal reference line its chip should sit at: the start, unless the data\n * passes closer to the line there than at the end (the chip would cover it).\n */\nexport function chipAlign(rows: Row[], keys: string[], value: number): \"start\" | \"end\" {\n const edge = Math.max(1, Math.ceil(rows.length * 0.2));\n const clearance = (slice: Row[]) =>\n Math.min(\n Infinity,\n ...slice.flatMap((row) =>\n keys.flatMap((key) => {\n const point = row[key];\n return typeof point === \"number\" ? [Math.abs(point - value)] : [];\n }),\n ),\n );\n return clearance(rows.slice(-edge)) > clearance(rows.slice(0, edge)) ? \"end\" : \"start\";\n}\n\n/** Whole-number data gets whole-number ticks (no \"0.2 signups\"). */\nexport function allIntegers(rows: Row[], keys: string[]) {\n return rows.every((row) =>\n keys.every((key) => typeof row[key] !== \"number\" || Number.isInteger(row[key])),\n );\n}\n\nexport function buildRows(labels: string[], series: SeriesProps[]): Row[] {\n return labels.map((label, i) => {\n const row: Row = { label };\n series.forEach((s, index) => {\n row[`s${index}`] = toNumbers(s.values)[i] ?? null;\n row[`p${index}`] = toNumbers(s.previous)[i] ?? null;\n if (s.lows || s.highs) {\n row[`lo${index}`] = toNumbers(s.lows)[i] ?? null;\n row[`hi${index}`] = toNumbers(s.highs)[i] ?? null;\n }\n });\n return row;\n });\n}\n\nexport function yAxisWidth(rows: Row[], keys: string[], format?: ValueFormat | null) {\n let longest = 0;\n for (const row of rows) {\n for (const key of keys) {\n const value = row[key];\n if (typeof value === \"number\")\n longest = Math.max(longest, formatValue(value, format, { axis: true }).length);\n }\n }\n // Ticks are rounder (and often one step past) the data, and % or $ glyphs run\n // wide, so leave a character of slack.\n return Math.min(80, Math.max(40, (longest + 1) * 7 + 8));\n}\n\nexport function hasPrevious(series: SeriesProps[]) {\n return series.some((s) => toNumbers(s.previous).some((value) => value !== null));\n}\n\nexport function legendFor(\n series: SeriesProps[],\n showPrevious: boolean,\n previousLabel: string,\n bars = false,\n references: ReferenceProps[] = [],\n summary: (i: number) => boolean = () => false,\n): LegendEntry[] {\n // A summary line (a line over bars) is keyed as the neutral line it draws.\n const entries: LegendEntry[] = series\n .slice(0, 8)\n .map((s, i) =>\n summary(i)\n ? { name: s.name, color: SUMMARY_COLOR, line: true }\n : { name: s.name, color: seriesColor(i) },\n );\n if (series.length > 8) entries.push({ name: `${series.length - 8} more`, color: MUTED_COLOR });\n // A chart with previous data always carries the previous-period key, hidden\n // while compare is off, so switching compare on never changes card height.\n if (hasPrevious(series)) {\n // Bars draw the previous period as faded bars, lines as dashed lines: the key matches the mark.\n // With several series, previous bars are each series' own hue, faded; the key shows a faded swatch.\n const color =\n series.length === 1\n ? MUTED_COLOR\n : bars\n ? \"color-mix(in srgb, var(--openui-dashboard-series-1) 40%, transparent)\"\n : \"var(--openui-dashboard-ink-muted)\";\n entries.push({\n name: series.length > 1 && bars ? `${previousLabel} (faded)` : previousLabel,\n color,\n dashed: !bars,\n hidden: !showPrevious,\n });\n }\n // Reference lines (Plan, Target, SLO) are keyed as the dotted line they draw.\n for (const reference of references)\n entries.push({\n name: reference.label,\n color: \"var(--openui-dashboard-ink-muted)\",\n dotted: true,\n });\n return entries;\n}\n\n/** The previous-period mark colour: the muted grey for one series, a faded own hue for several. */\nexport const previousColor = (index: number, count: number) =>\n count === 1 ? MUTED_COLOR : seriesColor(index);\n\n/* ---------- TimeSeries ---------- */\n\nexport const stackedSchema = z.union([z.boolean(), z.literal(\"percent\")]);\n\n/** Width of a label once WrappedTick splits it onto two lines, in px at 11px. */\nexport function wrappedLabelWidth(label: string) {\n const words = label.split(\" \");\n const half = Math.ceil(words.length / 2);\n const lines =\n words.length > 1 ? [words.slice(0, half).join(\" \"), words.slice(half).join(\" \")] : words;\n return Math.max(...lines.map((line) => line.length)) * 6.4;\n}\n","import { z } from \"zod/v4\";\n\nexport const referencePropsSchema = z.object({\n label: z.string(),\n value: z.number(),\n axis: z.enum([\"y\", \"x\"]).optional(),\n});\nexport type ReferenceSchemaProps = z.infer<typeof referencePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { referencePropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ReferenceComponent = defineComponent({\n name: \"Reference\",\n props: referencePropsSchema,\n description:\n 'A target or SLO line: Reference(\"Target\", 99.5). axis \"x\" draws a vertical line (Scatter only), e.g. an average on the x measure.',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { numbersSchema } from \"../../../shared/schema\";\n\nexport const seriesPropsSchema = z.object({\n name: z.string(),\n values: numbersSchema,\n previous: numbersSchema.optional(),\n mark: z.enum([\"line\", \"area\", \"bar\"]).optional(),\n lows: numbersSchema.optional(),\n highs: numbersSchema.optional(),\n});\nexport type SeriesSchemaProps = z.infer<typeof seriesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { seriesPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SeriesComponent = defineComponent({\n name: \"Series\",\n props: seriesPropsSchema,\n description:\n 'One series; previous is the same points for the previous period. Use null for gaps. mark overrides the chart type to mix bars and a line in the same unit, e.g. Series(\"7-day average\", avg, null, \"line\"). lows/highs shade a band such as a 95% interval: Series(\"Lift\", lift, null, \"line\", lower, upper).',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { stackedSchema } from \"../../../shared/chartHelpers\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nimport { ReferenceComponent } from \"../../trends/Reference\";\nimport { SeriesComponent } from \"../../trends/Series\";\n\n// Series and Reference belong to the Trends group (#221): Bars takes the registered ones, so the\n// parser and prompt know them by name.\n\nexport const barsPropsSchema = z.object({\n labels: z.array(z.string()),\n series: z.array(SeriesComponent.ref),\n format: formatSchema.optional(),\n orientation: z.enum([\"horizontal\", \"vertical\"]).optional(),\n stacked: stackedSchema.optional(),\n goodWhen: goodWhenSchema.optional(),\n references: z.array(ReferenceComponent.ref).optional(),\n diverging: z.array(z.string()).optional(),\n});\nexport type BarsSchemaProps = z.infer<typeof barsPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { BarChart } from \"@wodecorp/openui-vue-ui\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { formatValue } from \"../../../shared/format\";\nimport { nodeList, toNumbers, toStrings } from \"../../../shared/values\";\nimport type { ReferenceSchemaProps } from \"../../trends/Reference/schema\";\nimport type { SeriesSchemaProps } from \"../../trends/Series/schema\";\nimport { barsPropsSchema, type BarsSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst BarsImpl = vueComponent({\n name: \"OpenUIDashboardBars\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<BarsSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const labels = toStrings(p.props.labels);\n const seriesList = nodeList<SeriesSchemaProps>(p.props.series);\n const refs = nodeList<ReferenceSchemaProps>(p.props.references);\n if (!labels.length || !seriesList.length) return null;\n\n const rows = labels.map((label, idx) => {\n const row: Record<string, string | number> = { __cat: label };\n for (const s of seriesList) {\n const vals = toNumbers(s.values);\n row[s.name] = vals[idx] ?? 0;\n if (compare.enabled.value && s.previous?.length) {\n const prev = toNumbers(s.previous);\n row[`${s.name} (${compare.label.value})`] = prev[idx] ?? 0;\n }\n }\n return row;\n });\n\n const stacked = p.props.stacked === true || p.props.stacked === \"percent\";\n const orientation = p.props.orientation === \"vertical\" ? \"vertical\" : \"horizontal\";\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-bars\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", height: \"100%\" },\n },\n [\n h(\"div\", { style: { flex: 1, minHeight: \"200px\" } }, [\n h(BarChart as never, {\n data: rows,\n categoryKey: \"__cat\",\n orientation,\n variant: stacked ? \"stacked\" : \"grouped\",\n customPalette: seriesList.map((_, i) => seriesColor(i)),\n isAnimationActive: false,\n }),\n ]),\n refs.length\n ? h(\n \"div\",\n { style: { display: \"flex\", gap: \"8px\", flexWrap: \"wrap\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n refs.map((r, i) =>\n h(\"span\", { key: i }, `${r.label}: ${formatValue(r.value, p.props.format)}`),\n ),\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const BarsComponent = defineComponent({\n name: \"Bars\",\n props: barsPropsSchema,\n description:\n 'Values across categories. For periods such as weeks or months, use TimeSeries with type \"bar\". Horizontal (default) for long labels and rankings; vertical for short labels and ordered buckets (histograms). Several series group side by side, or stack (stacked \"percent\" for each part\\'s share). references draw lines such as a 1.0x break-even. diverging [aboveLabel, belowLabel] colours one series by sign around zero, e.g. [\"Ahead of plan\", \"Behind plan\"].',\n component: BarsImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\n\nexport const distributionPropsSchema = z.object({\n labels: z.array(z.string()),\n mins: z.array(z.number()),\n q1s: z.array(z.number()),\n medians: z.array(z.number()),\n q3s: z.array(z.number()),\n maxes: z.array(z.number()),\n format: formatSchema.optional(),\n});\nexport type DistributionSchemaProps = z.infer<typeof distributionPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { distributionPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const DistributionComponent = defineComponent({\n name: \"Distribution\",\n props: distributionPropsSchema,\n description:\n \"Spread, not just the average: one box plot per category: whiskers min to max, box the middle 50% (q1 to q3), line the median. For latency, order value, session length, deal size.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const mins = toNumbers(props.mins);\n const q1s = toNumbers(props.q1s);\n const medians = toNumbers(props.medians);\n const q3s = toNumbers(props.q3s);\n const maxes = toNumbers(props.maxes);\n const all = [...mins, ...maxes].filter((v): v is number => v !== null);\n const lo = all.length ? Math.min(...all) : 0;\n const hi = all.length ? Math.max(...all) : 1;\n const span = hi - lo || 1;\n const pct = (v: number) => ((v - lo) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-distribution\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n labels.map((label, i) => {\n const min = mins[i] ?? lo;\n const q1 = q1s[i] ?? min;\n const med = medians[i] ?? q1;\n const q3 = q3s[i] ?? med;\n const max = maxes[i] ?? q3;\n return h(\"div\", { key: label + i, style: { display: \"grid\", gridTemplateColumns: \"110px 1fr 72px\", alignItems: \"center\", gap: \"10px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, label),\n h(\"div\", { style: { position: \"relative\", height: \"20px\" } }, [\n h(\"div\", {\n style: {\n position: \"absolute\",\n top: \"9px\",\n left: `${pct(min)}%`,\n width: `${Math.max(1, pct(max) - pct(min))}%`,\n height: \"2px\",\n background: \"var(--openui-dashboard-muted-mark)\",\n },\n }),\n h(\"div\", {\n style: {\n position: \"absolute\",\n top: \"4px\",\n left: `${pct(q1)}%`,\n width: `${Math.max(2, pct(q3) - pct(q1))}%`,\n height: \"12px\",\n borderRadius: \"3px\",\n background: seriesColor(0),\n opacity: 0.25,\n border: `1.5px solid ${seriesColor(0)}`,\n },\n }),\n h(\"div\", {\n style: {\n position: \"absolute\",\n top: \"3px\",\n left: `${pct(med)}%`,\n width: \"2px\",\n height: \"14px\",\n background: seriesColor(0),\n },\n }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(med, props.format)),\n ]);\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const dumbbellPropsSchema = z.object({\n labels: z.array(z.string()),\n before: z.array(z.number()),\n after: z.array(z.number()),\n format: formatSchema.optional(),\n beforeLabel: z.string().optional(),\n afterLabel: z.string().optional(),\n goodWhen: goodWhenSchema.optional(),\n});\nexport type DumbbellSchemaProps = z.infer<typeof dumbbellPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { dumbbellPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const DumbbellComponent = defineComponent({\n name: \"Dumbbell\",\n props: dumbbellPropsSchema,\n description:\n \"Two values per category joined by a line (before and after, this year and last, two segments) so you see who moved and how far. Reads better than paired bars past a handful of categories.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const before = toNumbers(props.before);\n const after = toNumbers(props.after);\n const all = [...before, ...after].filter((v): v is number => v !== null);\n const lo = all.length ? Math.min(0, ...all) : 0;\n const hi = all.length ? Math.max(...all) : 1;\n const span = hi - lo || 1;\n const pct = (v: number) => ((v - lo) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-dumbbell\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", gap: \"14px\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } }, [\n h(\"span\", null, `○ ${props.beforeLabel ?? \"Before\"}`),\n h(\"span\", null, `● ${props.afterLabel ?? \"After\"}`),\n ]),\n ...labels.map((label, i) => {\n const b = before[i] ?? 0;\n const a = after[i] ?? 0;\n const delta = computeDelta(a, b, props.format);\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n const lineColor =\n tone === \"good\"\n ? \"var(--openui-dashboard-good-mark)\"\n : tone === \"bad\"\n ? \"var(--openui-dashboard-bad-mark)\"\n : seriesColor(0);\n const left = Math.min(pct(b), pct(a));\n const width = Math.abs(pct(a) - pct(b));\n return h(\"div\", { key: label + i, style: { display: \"grid\", gridTemplateColumns: \"110px 1fr 78px\", alignItems: \"center\", gap: \"10px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\", color: \"var(--openui-dashboard-ink)\" } }, label),\n h(\"div\", { style: { position: \"relative\", height: \"18px\" } }, [\n h(\"div\", { style: { position: \"absolute\", top: \"8px\", left: `${left}%`, width: `${width}%`, height: \"2px\", background: lineColor } }),\n h(\"div\", {\n title: `${props.beforeLabel ?? \"Before\"}: ${formatValue(b, props.format)}`,\n style: { position: \"absolute\", top: \"4px\", left: `calc(${pct(b)}% - 5px)`, width: \"10px\", height: \"10px\", borderRadius: \"999px\", border: `2px solid ${MUTED_COLOR}`, background: \"var(--openui-dashboard-surface)\", boxSizing: \"border-box\" },\n }),\n h(\"div\", {\n title: `${props.afterLabel ?? \"After\"}: ${formatValue(a, props.format)}`,\n style: { position: \"absolute\", top: \"4px\", left: `calc(${pct(a)}% - 5px)`, width: \"10px\", height: \"10px\", borderRadius: \"999px\", background: lineColor },\n }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, delta?.text ?? formatValue(a, props.format)),\n ]);\n }),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const intervalsPropsSchema = z.object({\n labels: z.array(z.string()),\n estimates: z.array(z.number()),\n lows: z.array(z.number()),\n highs: z.array(z.number()),\n format: formatSchema.optional(),\n baseline: z.number().optional(),\n baselineLabel: z.string().optional(),\n goodWhen: goodWhenSchema.optional(),\n});\nexport type IntervalsSchemaProps = z.infer<typeof intervalsPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { intervalsPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const IntervalsComponent = defineComponent({\n name: \"Intervals\",\n props: intervalsPropsSchema,\n description:\n 'Estimates with confidence intervals (forest plot), e.g. experiment lift. An interval clear of the baseline (default 0) is a clear effect: green when better, red when worse, by goodWhen (default \"up\"; \"neutral\" colours both sides alike). Intervals that cross the baseline stay grey.',\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const ests = toNumbers(props.estimates);\n const lows = toNumbers(props.lows);\n const highs = toNumbers(props.highs);\n const baseline = typeof props.baseline === \"number\" ? props.baseline : 0;\n const goodWhen = props.goodWhen ?? \"up\";\n const all = [baseline, ...lows, ...highs, ...ests].filter((v): v is number => v !== null);\n const lo = all.length ? Math.min(...all) : -1;\n const hi = all.length ? Math.max(...all) : 1;\n const span = hi - lo || 1;\n const pct = (v: number) => ((v - lo) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-intervals\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n labels.map((label, i) => {\n const est = ests[i] ?? baseline;\n const low = lows[i] ?? est;\n const high = highs[i] ?? est;\n const crosses = low <= baseline && high >= baseline;\n let color = MUTED_COLOR;\n if (!crosses) {\n if (goodWhen === \"neutral\") color = seriesColor(0);\n else {\n const above = low > baseline;\n color = (above === (goodWhen === \"up\")) ? \"var(--openui-dashboard-good-mark)\" : \"var(--openui-dashboard-bad-mark)\";\n }\n }\n return h(\"div\", { key: label + i, style: { display: \"grid\", gridTemplateColumns: \"120px 1fr 78px\", alignItems: \"center\", gap: \"10px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\", color: \"var(--openui-dashboard-ink)\" } }, label),\n h(\"div\", { style: { position: \"relative\", height: \"18px\" } }, [\n h(\"div\", { style: { position: \"absolute\", top: 0, bottom: 0, left: `${pct(baseline)}%`, width: \"1px\", borderLeft: \"1px dashed var(--openui-dashboard-border-strong)\" } }),\n h(\"div\", { style: { position: \"absolute\", top: \"8px\", left: `${pct(low)}%`, width: `${Math.max(1, pct(high) - pct(low))}%`, height: \"2px\", background: color } }),\n h(\"div\", { style: { position: \"absolute\", top: \"4px\", left: `calc(${pct(est)}% - 5px)`, width: \"10px\", height: \"10px\", borderRadius: \"999px\", background: color } }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(est, props.format)),\n ]);\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const leaderboardPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n goodWhen: goodWhenSchema.optional(),\n limit: z.number().optional(),\n});\nexport type LeaderboardSchemaProps = z.infer<typeof leaderboardPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { leaderboardPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nexport const LeaderboardComponent = defineComponent({\n name: \"Leaderboard\",\n props: leaderboardPropsSchema,\n description:\n \"Ranked list with inline bars and change vs previous: top channels, pages, campaigns. Shows every item, sorted; a long list scrolls inside the card. limit keeps only the top N.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const prevs = toNumbers(props.previous);\n const items = labels\n .map((label, i) => ({ label, value: values[i] ?? 0, previous: prevs[i] ?? null }))\n .sort((a, b) => b.value - a.value);\n const shown =\n typeof props.limit === \"number\" && props.limit > 0\n ? items.slice(0, Math.round(props.limit))\n : items;\n const maxVal = Math.max(...shown.map((x) => Math.abs(x.value)), 1);\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-leaderboard\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", overflowY: \"auto\" },\n },\n shown.map((item, idx) => {\n const delta = item.previous !== null ? computeDelta(item.value, item.previous, props.format) : null;\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n return h(\"div\", { key: item.label + idx, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"baseline\", fontSize: \"13px\", gap: \"8px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, `${idx + 1}. ${item.label}`),\n h(\"span\", { style: { display: \"inline-flex\", gap: \"8px\", flexShrink: 0, fontVariantNumeric: \"tabular-nums\" } }, [\n h(\"strong\", { style: { color: \"var(--openui-dashboard-ink)\" } }, formatValue(item.value, props.format)),\n delta ? h(\"span\", { style: { fontSize: \"12px\", color: TONE_COLOR[tone] } }, delta.text) : null,\n ]),\n ]),\n h(\n \"div\",\n { style: { height: \"5px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${Math.min(100, (Math.abs(item.value) / maxVal) * 100)}%`, height: \"100%\", background: seriesColor(0) } })],\n ),\n ]);\n }),\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { BarsComponent } from \"./Bars\";\nimport { DistributionComponent } from \"./Distribution\";\nimport { DumbbellComponent } from \"./Dumbbell\";\nimport { IntervalsComponent } from \"./Intervals\";\nimport { LeaderboardComponent } from \"./Leaderboard\";\n\nexport const comparison: Group = {\n components: [\n BarsComponent,\n DumbbellComponent,\n DistributionComponent,\n IntervalsComponent,\n LeaderboardComponent,\n ],\n styles: {},\n};\n","import { toNumbers } from \"./values\";\n\n/* ---------- Fold the smallest into Other ---------- */\n\n/**\n * Past `max` items, the names of the `keep` largest by `size` (ties go to the one given first); the\n * rest fold into Other, so a chart never carries more hues than can be told apart. null when all fit.\n */\nexport function keepLargest<T>(\n items: T[],\n name: (item: T) => string,\n size: (item: T) => number,\n max = 8,\n keep = max - 1,\n): Set<string> | null {\n if (items.length <= max) return null;\n return new Set(\n [...items]\n .sort((a, b) => size(b) - size(a))\n .slice(0, keep)\n .map(name),\n );\n}\n\n/** Parts past `max`: the kept parts in their given order, and what the rest add up to (0 when nothing folds). */\nexport function foldParts<T extends { label: string; value: number }>(\n parts: T[],\n max = 8,\n keep = max - 1,\n): { kept: T[]; other: number } {\n const keepSet = keepLargest(\n parts,\n (part) => part.label,\n (part) => part.value,\n max,\n keep,\n );\n if (!keepSet) return { kept: parts, other: 0 };\n return {\n kept: parts.filter((part) => keepSet.has(part.label)),\n other: parts\n .filter((part) => !keepSet.has(part.label))\n .reduce((sum, part) => sum + part.value, 0),\n };\n}\n/** Names of series with no usable number at all: they draw nothing, so they get a note. */\nexport function unusableSeries(series: { name?: string; values?: unknown }[]): string[] {\n return series\n .filter((s) => !toNumbers(s.values).some((v) => typeof v === \"number\" && Number.isFinite(v)))\n .map((s, i) => s.name || `Series ${i + 1}`);\n}\n\n/**\n * Part-to-whole charts with compare on: each shown part's share last period, in the unit its share is shown in now\n * (percent of the whole, or the value itself when values are already shares). Other takes the parts folded into it.\n */\nexport function previousShareOf(labels: string[], previous: unknown, sharesGiven: boolean) {\n const before = toNumbers(previous);\n const byLabel = new Map<string, number>();\n labels.forEach((label, i) => {\n const value = before[i];\n if (typeof value === \"number\" && value > 0) byLabel.set(label, value);\n });\n const total = [...byLabel.values()].reduce((sum, value) => sum + value, 0);\n return (label: string, shown: string[]): number | null => {\n if (!total) return null;\n const raw =\n label === \"Other\"\n ? labels\n .filter((l) => !shown.includes(l))\n .reduce((sum, l) => sum + (byLabel.get(l) ?? 0), 0)\n : byLabel.get(label);\n if (raw === undefined) return null;\n return sharesGiven ? raw : (raw / total) * 100;\n };\n}\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const donutPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n centerLabel: z.string().optional(),\n previous: z.array(z.number()).optional(),\n});\nexport type DonutSchemaProps = z.infer<typeof donutPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { PieChart } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { foldParts } from \"../../../shared/parts\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { donutPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const DonutComponent = defineComponent({\n name: \"Donut\",\n props: donutPropsSchema,\n description:\n \"Part of a whole with the total as the headline, up to 8 parts; past 8, the smallest fold into Other. previous (last period's values, same order) adds each part's change in share, in points, to its tooltip while compare is on. For a compact strip, use SegmentedBar.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const parts = labels\n .map((label, i) => ({ label, value: Math.max(0, values[i] ?? 0) }))\n .filter((p) => p.value > 0);\n const { kept, other } = foldParts(parts, 8);\n const rows = [\n ...kept.map((p) => ({ name: p.label, value: p.value })),\n ...(other > 0 ? [{ name: \"Other\", value: other }] : []),\n ];\n const total = rows.reduce((sum, r) => sum + r.value, 0);\n const palette = rows.map((r, i) => (r.name === \"Other\" ? MUTED_COLOR : seriesColor(i)));\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-donut\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", alignItems: \"baseline\", gap: \"8px\" } }, [\n h(\"span\", { style: { fontSize: \"20px\", fontWeight: 700, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink)\" } }, formatValue(total, props.format)),\n props.centerLabel\n ? h(\"span\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.centerLabel)\n : null,\n ]),\n rows.length\n ? h(PieChart as never, {\n data: rows,\n categoryKey: \"name\",\n dataKey: \"value\",\n variant: \"donut\",\n customPalette: palette,\n isAnimationActive: false,\n })\n : null,\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const segmentedBarPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n});\nexport type SegmentedBarSchemaProps = z.infer<typeof segmentedBarPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { foldParts } from \"../../../shared/parts\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { segmentedBarPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SegmentedBarComponent = defineComponent({\n name: \"SegmentedBar\",\n props: segmentedBarPropsSchema,\n description:\n \"Part of a whole as one bar with a legend of values and shares; up to 8 parts. previous (last period's values, same order) adds each part's change in share, in points, to its tooltip while compare is on. Inside a headline tile, use a Kpi with a Split chart instead.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const parts = labels.map((label, i) => ({ label, value: Math.max(0, values[i] ?? 0) }));\n const { kept, other } = foldParts(parts, 8);\n const all = [...kept, ...(other > 0 ? [{ label: \"Other\", value: other }] : [])];\n const total = all.reduce((s, p) => s + p.value, 0) || 1;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-segmented-bar\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"12px\", width: \"100%\" },\n },\n [\n h(\n \"div\",\n { style: { display: \"flex\", height: \"16px\", borderRadius: \"6px\", overflow: \"hidden\", gap: \"2px\" } },\n all.map((p, i) =>\n h(\"div\", {\n key: p.label + i,\n title: `${p.label}: ${formatValue(p.value, props.format)} (${((p.value / total) * 100).toFixed(1)}%)`,\n style: {\n width: `${(p.value / total) * 100}%`,\n background: p.label === \"Other\" ? MUTED_COLOR : seriesColor(i),\n },\n }),\n ),\n ),\n h(\n \"div\",\n { style: { display: \"grid\", gridTemplateColumns: \"repeat(auto-fit, minmax(140px, 1fr))\", gap: \"8px\", fontSize: \"12px\" } },\n all.map((p, i) =>\n h(\"div\", { key: p.label + i, style: { display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\", gap: \"6px\" } }, [\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", color: \"var(--openui-dashboard-ink)\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"2px\", background: p.label === \"Other\" ? MUTED_COLOR : seriesColor(i), display: \"inline-block\" } }),\n p.label,\n ]),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, `${formatValue(p.value, props.format)} · ${((p.value / total) * 100).toFixed(0)}%`),\n ]),\n ),\n ),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const treemapPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n groups: z.array(z.string()).optional(),\n});\nexport type TreemapSchemaProps = z.infer<typeof treemapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { treemapPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const TreemapComponent = defineComponent({\n name: \"Treemap\",\n props: treemapPropsSchema,\n description:\n \"Part to whole with many parts, or a hierarchy: area is size. groups (same length as labels) nests items under parents and colours by parent, e.g. category → product. Use Donut or SegmentedBar for ≤8 flat parts. previous (last period's values, same order) adds each item's change in share, in points, to its tooltip while compare is on.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const groups = toStrings(props.groups);\n const groupOrder = [...new Set(groups.filter(Boolean))];\n const items = labels\n .map((label, i) => ({\n label,\n value: Math.max(0, values[i] ?? 0),\n group: groups[i] || \"\",\n }))\n .filter((x) => x.value > 0)\n .sort((a, b) => b.value - a.value);\n const total = items.reduce((s, x) => s + x.value, 0) || 1;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-treemap\",\n style: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \"4px\",\n width: \"100%\",\n minHeight: \"200px\",\n alignContent: \"stretch\",\n },\n },\n items.map((item, idx) => {\n const share = (item.value / total) * 100;\n const colorIdx = item.group ? Math.max(0, groupOrder.indexOf(item.group)) : idx;\n return h(\n \"div\",\n {\n key: item.label + idx,\n title: `${item.label}${item.group ? ` (${item.group})` : \"\"}: ${formatValue(item.value, props.format)} (${share.toFixed(1)}%)`,\n style: {\n flex: `${Math.max(1, Math.round(share))} 1 ${Math.max(76, Math.round(share * 3))}px`,\n minHeight: \"56px\",\n padding: \"8px\",\n borderRadius: \"6px\",\n background: seriesColor(colorIdx),\n color: \"#ffffff\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n overflow: \"hidden\",\n },\n },\n [\n h(\"span\", { style: { fontSize: \"12px\", fontWeight: 600, overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, item.label),\n h(\"span\", { style: { fontSize: \"11px\", opacity: 0.9, fontVariantNumeric: \"tabular-nums\" } }, `${formatValue(item.value, props.format)} (${share.toFixed(0)}%)`),\n ],\n );\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nexport const waterfallPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n endLabel: z.string().optional(),\n goodWhen: goodWhenSchema.optional(),\n subtotals: z.array(z.string()).optional(),\n});\nexport type WaterfallSchemaProps = z.infer<typeof waterfallPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { waterfallPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const WaterfallComponent = defineComponent({\n name: \"Waterfall\",\n props: waterfallPropsSchema,\n description:\n 'How a total moved: the first value is the starting total, the rest are signed changes, the end total is computed. Increases and decreases wear the good/bad status colours; pass goodWhen \"down\" when a decrease is the good outcome (costs). E.g. Waterfall([\"Start MRR\", \"New\", \"Expansion\", \"Churn\"], [398200, 18400, 9100, -9300], \"currency-compact\", \"End MRR\"). subtotals names labels drawn as the running total at that point (their values are ignored; pass 0), for a P&L: Waterfall([\"Revenue\", \"Cost of sales\", \"Gross profit\", \"Operating costs\"], [820000, -310000, 0, -280000], \"currency-compact\", \"Operating profit\", \"up\", [\"Gross profit\"]).',\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const subtotals = new Set(toStrings(props.subtotals));\n const goodWhen = props.goodWhen ?? \"up\";\n\n type BarItem = { label: string; start: number; end: number; delta: number; kind: \"total\" | \"up\" | \"down\" };\n const bars: BarItem[] = [];\n let running = 0;\n labels.forEach((label, i) => {\n const val = values[i] ?? 0;\n if (i === 0) {\n running = val;\n bars.push({ label, start: 0, end: running, delta: val, kind: \"total\" });\n } else if (subtotals.has(label)) {\n bars.push({ label, start: 0, end: running, delta: running, kind: \"total\" });\n } else {\n const start = running;\n running += val;\n bars.push({ label, start, end: running, delta: val, kind: val >= 0 ? \"up\" : \"down\" });\n }\n });\n if (bars.length > 0) {\n bars.push({ label: props.endLabel ?? \"Total\", start: 0, end: running, delta: running, kind: \"total\" });\n }\n\n const allPoints = bars.flatMap((b) => [0, b.start, b.end]);\n const min = Math.min(...allPoints, 0);\n const max = Math.max(...allPoints, 1);\n const span = max - min || 1;\n const pct = (v: number) => ((v - min) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-waterfall\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\" },\n },\n bars.map((bar, idx) => {\n const left = Math.min(pct(bar.start), pct(bar.end));\n const width = Math.max(1.5, Math.abs(pct(bar.end) - pct(bar.start)));\n const color =\n bar.kind === \"total\"\n ? seriesColor(0)\n : (bar.kind === \"up\") === (goodWhen !== \"down\")\n ? \"var(--openui-dashboard-good-mark)\"\n : \"var(--openui-dashboard-bad-mark)\";\n return h(\"div\", { key: bar.label + idx, style: { display: \"grid\", gridTemplateColumns: \"120px 1fr 82px\", alignItems: \"center\", gap: \"8px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { fontWeight: bar.kind === \"total\" ? 600 : 400, color: \"var(--openui-dashboard-ink)\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, bar.label),\n h(\"div\", { style: { position: \"relative\", height: \"18px\", background: \"var(--openui-dashboard-surface-subtle)\", borderRadius: \"4px\" } }, [\n h(\"div\", { style: { position: \"absolute\", top: \"2px\", bottom: \"2px\", left: `${left}%`, width: `${width}%`, background: color, borderRadius: \"3px\" } }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", fontWeight: bar.kind === \"total\" ? 600 : 400, color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(bar.delta, props.format)),\n ]);\n }),\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { DonutComponent } from \"./Donut\";\nimport { SegmentedBarComponent } from \"./SegmentedBar\";\nimport { TreemapComponent } from \"./Treemap\";\nimport { WaterfallComponent } from \"./Waterfall\";\n\nexport const composition: Group = {\n components: [DonutComponent, SegmentedBarComponent, TreemapComponent, WaterfallComponent],\n styles: {},\n};\n","import { inject, type InjectionKey, type Ref } from \"vue\";\n\nexport const CardControlsContext: InjectionKey<boolean> = Symbol(\"OpenUI.Dashboard.CardControls\");\nexport const CardSlotContext: InjectionKey<Ref<HTMLElement | null> | null> = Symbol(\n \"OpenUI.Dashboard.CardSlot\",\n);\n\nexport function useInCardControls(): boolean {\n return inject(CardControlsContext, false);\n}\n","import {\n computed,\n defineComponent,\n inject,\n onScopeDispose,\n provide,\n ref,\n toValue,\n useId,\n watchEffect,\n type ComputedRef,\n type InjectionKey,\n type MaybeRefOrGetter,\n} from \"vue\";\nimport { CardControlsContext } from \"./cardSlot\";\n\ntype FilterEntry = { active: boolean };\ninterface FilterRegistry {\n set: (key: string, entry: FilterEntry | null) => void;\n entries: Map<string, FilterEntry>;\n baselines: Map<string, string>;\n version: { value: number };\n}\n\nconst FilterRegistryKey: InjectionKey<FilterRegistry | null> = Symbol(\n \"OpenUI.Dashboard.FilterRegistry\",\n);\n\nexport const FilterRegistryProvider = defineComponent({\n name: \"OpenUIDashboardFilterRegistryProvider\",\n setup(_, { slots }) {\n const version = ref(0);\n const entries = new Map<string, FilterEntry>();\n const baselines = new Map<string, string>();\n provide(FilterRegistryKey, {\n entries,\n baselines,\n version,\n set: (key, entry) => {\n const before = entries.get(key);\n if (entry) entries.set(key, entry);\n else entries.delete(key);\n if ((before?.active ?? false) !== (entry?.active ?? false)) {\n version.value += 1;\n }\n },\n });\n return () => slots.default?.();\n },\n});\n\nexport function useReportFilter(\n name: MaybeRefOrGetter<string>,\n value: MaybeRefOrGetter<unknown>,\n) {\n const registry = inject(FilterRegistryKey, null);\n const inCard = inject(CardControlsContext, false);\n const uid = useId();\n let lastKey: string | null = null;\n let initialSerialized: string | null = null;\n\n watchEffect(() => {\n if (!registry || inCard) return;\n const filterName = toValue(name);\n const key = `${filterName}#${uid}`;\n const serialized = JSON.stringify(toValue(value) ?? null);\n if (initialSerialized === null) initialSerialized = serialized;\n if (!registry.baselines.has(filterName)) {\n registry.baselines.set(filterName, initialSerialized);\n }\n const baseline = registry.baselines.get(filterName) ?? initialSerialized;\n if (lastKey && lastKey !== key) registry.set(lastKey, null);\n lastKey = key;\n registry.set(key, { active: serialized !== baseline });\n });\n\n onScopeDispose(() => {\n if (registry && lastKey) registry.set(lastKey, null);\n });\n}\n\nexport function useActiveFilters(): ComputedRef<{ active: boolean }> {\n const registry = inject(FilterRegistryKey, null);\n return computed(() => {\n if (!registry) return { active: false };\n void registry.version.value;\n return { active: [...registry.entries.values()].some((entry) => entry.active) };\n });\n}\n","import { z } from \"zod/v4\";\nexport const optionSchema = z.object({ value: z.string(), label: z.string().optional() });\nexport type FilterOption = z.infer<typeof optionSchema>;\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const chipFilterPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema),\n label: z.string().optional(),\n});\nexport type ChipFilterSchemaProps = z.infer<typeof chipFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { chipFilterPropsSchema, type ChipFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ChipFilterImpl = vueComponent({\n name: \"OpenUIDashboardChipFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<ChipFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-chip-filter\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", flexWrap: \"wrap\" },\n },\n [\n p.props.label\n ? h(\"span\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, p.props.label)\n : null,\n ...opts.map((opt) => {\n const active = current === opt.value;\n return h(\n \"button\",\n {\n key: opt.value,\n type: \"button\",\n \"aria-pressed\": active,\n onClick: () => field.setValue(opt.value),\n style: {\n padding: \"4px 10px\",\n borderRadius: \"999px\",\n fontSize: \"12px\",\n fontWeight: active ? 600 : 500,\n cursor: \"pointer\",\n background: active ? \"var(--openui-dashboard-accent)\" : \"var(--openui-dashboard-neutral-soft)\",\n color: active ? \"var(--openui-dashboard-accent-ink)\" : \"var(--openui-dashboard-ink)\",\n border: \"1px solid transparent\",\n },\n },\n opt.label ?? opt.value,\n );\n }),\n ],\n );\n };\n },\n});\n\nexport const ChipFilterComponent = defineComponent({\n name: \"ChipFilter\",\n props: chipFilterPropsSchema,\n description:\n \"Pills for 2–6 segments; one is always selected. value takes the $variable that holds the selected option's value. In a FilterBar for a dashboard-wide segment, or in a Card's controls to switch that card's breakdown (leave label out there: the card title names it).\",\n component: ChipFilterImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const compareTogglePropsSchema = z.object({\n label: z.string().optional(),\n defaultOn: z.boolean().optional(),\n value: reactive(z.string().optional()),\n options: z.array(optionSchema).optional(),\n});\nexport type CompareToggleSchemaProps = z.infer<typeof compareTogglePropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, watchEffect, type PropType } from \"vue\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { compareTogglePropsSchema, type CompareToggleSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CompareToggleImpl = vueComponent({\n name: \"OpenUIDashboardCompareToggle\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<CompareToggleSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const compare = useCompare();\n const field = useStateField(\n () => p.statementId || \"compare\",\n () => p.props.value,\n );\n let initialized = false;\n\n watchEffect(() => {\n const opts = Array.isArray(p.props.options) && p.props.options.length > 0\n ? p.props.options\n : [{ value: \"on\", label: p.props.label || \"Previous period\" }];\n\n if (!initialized) {\n initialized = true;\n if (p.props.defaultOn) {\n compare.setEnabled(true);\n compare.setLabel(opts[0]!.label ?? opts[0]!.value);\n if (field.isReactive && (!field.value || field.value === \"off\")) {\n field.setValue(opts[0]!.value);\n }\n }\n }\n });\n\n return () => {\n const opts = Array.isArray(p.props.options) && p.props.options.length > 0\n ? p.props.options\n : [{ value: \"on\", label: p.props.label || \"Previous period\" }];\n const current = field.isReactive\n ? String(field.value ?? (compare.enabled.value ? opts[0]!.value : \"off\"))\n : compare.enabled.value\n ? opts[0]!.value\n : \"off\";\n\n return h(\n \"label\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-compare-toggle\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-secondary)\" },\n },\n [\n h(\"span\", null, \"Compare\"),\n h(\n \"select\",\n {\n id,\n value: current,\n style: {\n padding: \"4px 8px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n fontSize: \"12px\",\n },\n onChange: (e: Event) => {\n const next = (e.target as HTMLSelectElement).value;\n if (field.isReactive) field.setValue(next);\n if (next === \"off\") {\n compare.setEnabled(false);\n } else {\n const chosen = opts.find((o) => o.value === next);\n compare.setLabel(chosen?.label ?? chosen?.value ?? \"Previous period\");\n compare.setEnabled(true);\n }\n },\n },\n [\n h(\"option\", { value: \"off\" }, \"None\"),\n ...opts.map((opt) => h(\"option\", { key: opt.value, value: opt.value }, opt.label ?? opt.value)),\n ],\n ),\n ],\n );\n };\n },\n});\n\nexport const CompareToggleComponent = defineComponent({\n name: \"CompareToggle\",\n props: compareTogglePropsSchema,\n description:\n 'Add one only when some component is given previous values. Compare dropdown: None, or one of options (e.g. [{value: \"prev\", label: \"Previous 30 days\"}, {value: \"yoy\", label: \"Same 30 days last year\"}]). The choice overlays the previous data on every chart that has it (dashed lines, ghost bars, funnel markers) and names it in legends and deltas. Without options it is one choice named by label (default \"Previous period\"): CompareToggle(\"Previous week\", true). Starts at None; defaultOn starts on the first choice. value, the third argument, takes the $variable, and is only needed with options: it holds the chosen option\\'s value, or \"off\" for None ($compare = \"off\"); key each chart\\'s previous data by it (prev[$compare]), so each choice shows its own data.',\n component: CompareToggleImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const dateRangeFilterPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema).optional(),\n label: z.string().optional(),\n});\nexport type DateRangeFilterSchemaProps = z.infer<typeof dateRangeFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { dateRangeFilterPropsSchema, type DateRangeFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst DEFAULT_PRESETS = [\n { value: \"7d\", label: \"Last 7 days\" },\n { value: \"30d\", label: \"Last 30 days\" },\n { value: \"90d\", label: \"Last 90 days\" },\n { value: \"12m\", label: \"Last 12 months\" },\n { value: \"ytd\", label: \"Year to date\" },\n];\n\nconst DateRangeFilterImpl = vueComponent({\n name: \"OpenUIDashboardDateRangeFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<DateRangeFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) && p.props.options.length > 0 ? p.props.options : DEFAULT_PRESETS;\n const current = field.value == null ? opts[0]!.value : String(field.value);\n return h(\n \"label\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-date-range-filter\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-secondary)\" },\n },\n [\n p.props.label ? h(\"span\", null, p.props.label) : null,\n h(\n \"select\",\n {\n value: current,\n style: {\n padding: \"4px 8px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n fontSize: \"12px\",\n },\n onChange: (e: Event) => field.setValue((e.target as HTMLSelectElement).value),\n },\n opts.map((opt) => h(\"option\", { key: opt.value, value: opt.value }, opt.label ?? opt.value)),\n ),\n ],\n );\n };\n },\n});\n\nexport const DateRangeFilterComponent = defineComponent({\n name: \"DateRangeFilter\",\n props: dateRangeFilterPropsSchema,\n description:\n 'Dropdown of preset options (default 7d, 30d, 90d, 12m, ytd) and a calendar for a custom range; value takes the $variable that holds the selection: a preset key (\"30d\") or a custom range \"2026-10-01..2026-10-31\". For live data, pass that $variable into query arguments; with data written into the program, use PeriodPicker.',\n component: DateRangeFilterImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const multiSelectFilterPropsSchema = z.object({\n value: reactive(z.array(z.string())),\n options: z.array(optionSchema),\n label: z.string(),\n});\nexport type MultiSelectFilterSchemaProps = z.infer<typeof multiSelectFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { multiSelectFilterPropsSchema, type MultiSelectFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst MultiSelectFilterImpl = vueComponent({\n name: \"OpenUIDashboardMultiSelectFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<MultiSelectFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const open = ref(false);\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const selected = Array.isArray(field.value) ? (field.value as string[]) : [];\n const summary = selected.length === 0 ? `${p.props.label}: All` : `${p.props.label} (${selected.length})`;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-multiselect-filter\",\n style: { position: \"relative\", display: \"inline-block\" },\n },\n [\n h(\n \"button\",\n {\n type: \"button\",\n \"aria-expanded\": open.value,\n onClick: () => {\n open.value = !open.value;\n },\n style: {\n padding: \"4px 10px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n fontSize: \"12px\",\n cursor: \"pointer\",\n },\n },\n summary,\n ),\n open.value\n ? h(\n \"div\",\n {\n style: {\n position: \"absolute\",\n top: \"calc(100% + 4px)\",\n left: 0,\n zIndex: 30,\n minWidth: \"180px\",\n padding: \"8px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n boxShadow: \"var(--openui-dashboard-shadow-pop)\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n },\n },\n opts.map((opt) => {\n const checked = selected.includes(opt.value);\n return h(\n \"label\",\n { key: opt.value, style: { display: \"flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", cursor: \"pointer\" } },\n [\n h(\"input\", {\n type: \"checkbox\",\n checked,\n onChange: () => {\n const next = checked\n ? selected.filter((v) => v !== opt.value)\n : [...selected, opt.value];\n field.setValue(next);\n },\n }),\n opt.label ?? opt.value,\n ],\n );\n }),\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const MultiSelectFilterComponent = defineComponent({\n name: \"MultiSelectFilter\",\n props: multiSelectFilterPropsSchema,\n description:\n \"Dropdown with checkboxes. value takes the $variable that holds an array of the selected options' values ($plans = [], and [] means all). For live data, pass that $variable into query arguments; with data written into the program, use ChipFilter or SelectFilter.\",\n component: MultiSelectFilterImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const periodPickerPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema),\n});\nexport type PeriodPickerSchemaProps = z.infer<typeof periodPickerPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { periodPickerPropsSchema, type PeriodPickerSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PeriodPickerImpl = vueComponent({\n name: \"OpenUIDashboardPeriodPicker\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<PeriodPickerSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n role: \"tablist\",\n class: \"openui-dashboard-period-picker\",\n style: {\n display: \"inline-flex\",\n padding: \"2px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n background: \"var(--openui-dashboard-neutral-soft)\",\n gap: \"2px\",\n },\n },\n opts.map((opt) => {\n const active = current === opt.value;\n return h(\n \"button\",\n {\n key: opt.value,\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": active,\n onClick: () => field.setValue(opt.value),\n style: {\n padding: \"4px 10px\",\n borderRadius: \"6px\",\n fontSize: \"12px\",\n fontWeight: active ? 600 : 500,\n border: \"none\",\n cursor: \"pointer\",\n background: active ? \"var(--openui-dashboard-surface)\" : \"transparent\",\n color: active ? \"var(--openui-dashboard-ink)\" : \"var(--openui-dashboard-ink-secondary)\",\n boxShadow: active ? \"var(--openui-dashboard-shadow)\" : undefined,\n },\n },\n opt.label ?? opt.value,\n );\n }),\n );\n };\n },\n});\n\nexport const PeriodPickerComponent = defineComponent({\n name: \"PeriodPicker\",\n props: periodPickerPropsSchema,\n description:\n 'Segmented control for a few date presets, e.g. [{value: \"7d\", label: \"7D\"}, {value: \"30d\", label: \"30D\"}]. value takes the $variable that holds the selected option\\'s value ($period = \"30d\"). Pass that $variable into query arguments (live data), or key written-in data by it.',\n component: PeriodPickerImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const selectFilterPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema),\n label: z.string(),\n});\nexport type SelectFilterSchemaProps = z.infer<typeof selectFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { selectFilterPropsSchema, type SelectFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SelectFilterImpl = vueComponent({\n name: \"OpenUIDashboardSelectFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<SelectFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"label\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-select-filter\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-secondary)\" },\n },\n [\n p.props.label ? h(\"span\", null, p.props.label) : null,\n h(\n \"select\",\n {\n value: current,\n style: {\n padding: \"4px 8px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n fontSize: \"12px\",\n },\n onChange: (e: Event) => field.setValue((e.target as HTMLSelectElement).value),\n },\n opts.map((opt) => h(\"option\", { key: opt.value, value: opt.value }, opt.label ?? opt.value)),\n ),\n ],\n );\n };\n },\n});\n\nexport const SelectFilterComponent = defineComponent({\n name: \"SelectFilter\",\n props: selectFilterPropsSchema,\n description:\n \"Dropdown for one value out of a longer list. value takes the $variable that holds the selected option's value. In a FilterBar for a dashboard-wide segment, or in a Card's controls to switch that card's breakdown.\",\n component: SelectFilterImpl,\n});\n","import { z } from \"zod/v4\";\nimport { ChipFilterComponent } from \"../ChipFilter\";\nimport { CompareToggleComponent } from \"../CompareToggle\";\nimport { DateRangeFilterComponent } from \"../DateRangeFilter\";\nimport { MultiSelectFilterComponent } from \"../MultiSelectFilter\";\nimport { PeriodPickerComponent } from \"../PeriodPicker\";\nimport { SelectFilterComponent } from \"../SelectFilter\";\n\nexport const filterBarPropsSchema = z.object({\n filters: z.array(\n z.union([\n PeriodPickerComponent.ref,\n DateRangeFilterComponent.ref,\n ChipFilterComponent.ref,\n SelectFilterComponent.ref,\n MultiSelectFilterComponent.ref,\n CompareToggleComponent.ref,\n ]),\n ),\n});\nexport type FilterBarSchemaProps = z.infer<typeof filterBarPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { filterBarPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const FilterBarComponent = defineComponent({\n name: \"FilterBar\",\n props: filterBarPropsSchema,\n description: \"Sticky row of dashboard-wide filters, right after the header.\",\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-filter-bar\",\n style: {\n position: \"sticky\",\n top: 0,\n zIndex: 20,\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \"10px\",\n padding: \"10px 14px\",\n borderRadius: \"var(--openui-dashboard-radius-md)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n },\n },\n [renderNode(props.filters)],\n ),\n});\n","import type { Group } from \"../group\";\nimport { ChipFilterComponent } from \"./ChipFilter\";\nimport { CompareToggleComponent } from \"./CompareToggle\";\nimport { DateRangeFilterComponent } from \"./DateRangeFilter\";\nimport { FilterBarComponent } from \"./FilterBar\";\nimport { MultiSelectFilterComponent } from \"./MultiSelectFilter\";\nimport { PeriodPickerComponent } from \"./PeriodPicker\";\nimport { SelectFilterComponent } from \"./SelectFilter\";\n\nexport const filters: Group = {\n components: [\n FilterBarComponent,\n PeriodPickerComponent,\n DateRangeFilterComponent,\n ChipFilterComponent,\n SelectFilterComponent,\n MultiSelectFilterComponent,\n CompareToggleComponent,\n ],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const flowPropsSchema = z.object({\n from: z.array(z.string()),\n to: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n});\nexport type FlowSchemaProps = z.infer<typeof flowPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { flowPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst LOSS_NAMES = new Set([\"dropped\", \"exited\", \"churned\"]);\n\nexport const FlowComponent = defineComponent({\n name: \"Flow\",\n props: flowPropsSchema,\n description:\n 'Sankey of a quantity between stages. from, to and values have one entry per link, as query rows give them: Flow(f.rows.source, f.rows.target, f.rows.users), or written in: Flow([\"Paid search\", \"Signed up\"], [\"Signed up\", \"Activated\"], [1210, 640]). Name loss nodes \"Dropped\", \"Exited\" or \"Churned\" (drawn grey). Links only move forward: one that loops back to an earlier node isn\\'t drawn. Keep to ~4 columns and ~15 nodes. previous (last period\\'s volume, one per link) adds each link\\'s and step\\'s change to the tooltips while compare is on.',\n component: ({ props, bindSource }) => {\n const froms = toStrings(props.from);\n const tos = toStrings(props.to);\n const vals = toNumbers(props.values);\n const links = froms\n .map((from, i) => ({ from, to: tos[i] ?? \"\", value: Math.max(0, vals[i] ?? 0) }))\n .filter((l) => l.from && l.to && l.value > 0);\n const maxVal = Math.max(...links.map((l) => l.value), 1);\n const sources = [...new Set(links.map((l) => l.from))];\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-flow\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\" },\n },\n links.map((link, idx) => {\n const isLoss = LOSS_NAMES.has(link.to.toLowerCase());\n const color = isLoss ? MUTED_COLOR : seriesColor(Math.max(0, sources.indexOf(link.from)));\n return h(\"div\", { key: idx, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\", fontSize: \"12px\" } }, [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", gap: \"8px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\" } }, `${link.from} → ${link.to}`),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", fontWeight: 600, color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(link.value, props.format)),\n ]),\n h(\n \"div\",\n { style: { height: \"8px\", borderRadius: \"4px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${(link.value / maxVal) * 100}%`, height: \"100%\", background: color } })],\n ),\n ]);\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\n// Funnel's segments are Series, which the Trends group owns and registers.\nimport { SeriesComponent } from \"../../trends/Series\";\nexport const funnelPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n shape: z.enum([\"bars\", \"funnel\"]).optional(),\n segments: z.array(SeriesComponent.ref).optional(),\n basis: z.enum([\"step\", \"start\"]).optional(),\n});\nexport type FunnelSchemaProps = z.infer<typeof funnelPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { funnelPropsSchema, type FunnelSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst FunnelImpl = vueComponent({\n name: \"OpenUIDashboardFunnel\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<FunnelSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const basis = ref<\"step\" | \"start\">(p.props.basis ?? \"step\");\n\n return () => {\n const labels = toStrings(p.props.labels);\n const values = toNumbers(p.props.values).map((v) => Math.max(0, v ?? 0));\n const first = values[0] || 1;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-funnel\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"flex-end\", gap: \"6px\", fontSize: \"11px\" } }, [\n h(\n \"button\",\n {\n type: \"button\",\n onClick: () => {\n basis.value = basis.value === \"step\" ? \"start\" : \"step\";\n },\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink-secondary)\",\n cursor: \"pointer\",\n },\n },\n basis.value === \"step\" ? \"Rate: step-to-step\" : \"Rate: from start\",\n ),\n ]),\n ...labels.map((label, i) => {\n const val = values[i] ?? 0;\n const prevStep = i === 0 ? first : values[i - 1] || 1;\n const rate = basis.value === \"step\" ? (val / prevStep) * 100 : (val / first) * 100;\n const widthPct = Math.min(100, (val / first) * 100);\n return h(\"div\", { key: label + i, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"13px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\", fontWeight: 500 } }, label),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, `${formatValue(val, p.props.format)} · ${rate.toFixed(1)}%`),\n ]),\n h(\n \"div\",\n { style: { height: \"14px\", borderRadius: \"4px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${widthPct}%`, height: \"100%\", background: seriesColor(0), opacity: 1 - i * 0.08 } })],\n ),\n ]);\n }),\n ],\n );\n };\n },\n});\n\nexport const FunnelComponent = defineComponent({\n name: \"Funnel\",\n props: funnelPropsSchema,\n description:\n 'Ordered conversion steps, scaled to the first step, with step-to-step conversion and drop-off; the weakest step is flagged. A switch reads the rates step to step or from the start; basis \"start\" opens on the second. segments splits each step by plan, channel or cohort: Series(\"Enterprise\", [...]) per segment, one value per step, summing to values (up to 8); like stacked Bars, a split funnel doesn\\'t draw previous. shape \"bars\" (default) lists the steps as rows; \"funnel\" draws a left-to-right funnel whose height follows each step (it falls back to bars when the card is too narrow, under about 100px per step).',\n component: FunnelImpl,\n});\n","import type { Group } from \"../group\";\nimport { FlowComponent } from \"./Flow\";\nimport { FunnelComponent } from \"./Funnel\";\n\nexport const flow: Group = {\n components: [FlowComponent, FunnelComponent],\n styles: {},\n};\n","import type { GeoGeometryObjects } from \"d3-geo\";\nimport { feature } from \"topojson-client\";\n\nexport interface Shape extends Record<string, unknown> {\n type: \"Feature\";\n id?: string | number;\n geometry: GeoGeometryObjects;\n properties: { name: string };\n}\n\nconst shapeCache: Partial<Record<\"world\" | \"us\", Promise<Shape[]>>> = {};\n\nexport function loadShapes(region: \"world\" | \"us\"): Promise<Shape[]> {\n shapeCache[region] ??= (\n region === \"us\"\n ? import(\"us-atlas/states-10m.json\").then((module) => {\n const topology = (module.default ?? module) as any;\n const collection = feature(topology, topology.objects.states) as any;\n return (collection.features ?? []) as Shape[];\n })\n : import(\"world-atlas/countries-110m.json\").then((module) => {\n const topology = (module.default ?? module) as any;\n const collection = feature(topology, topology.objects.countries) as any;\n return ((collection.features ?? []) as Shape[]).filter(\n (shape) => shape.properties?.name !== \"Antarctica\",\n );\n })\n ) as Promise<Shape[]>;\n return shapeCache[region]!;\n}\n\nexport function retryShapes(region: \"world\" | \"us\") {\n delete shapeCache[region];\n}\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nexport const geoMapPropsSchema = z.object({\n region: z.enum([\"world\", \"us\"]),\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n goodWhen: goodWhenSchema.optional(),\n limit: z.number().optional(),\n view: z.enum([\"count\", \"total\"]).optional(),\n});\nexport type GeoMapSchemaProps = z.infer<typeof geoMapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { geoAlbersUsa, geoNaturalEarth1, geoPath } from \"d3-geo\";\nimport { defineComponent as vueComponent, h, ref, shallowRef, watch, type PropType } from \"vue\";\nimport { loadShapes, type Shape } from \"../../../shared/atlas\";\nimport { sequentialColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { geoMapPropsSchema, type GeoMapSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst US_ABBR: Record<string, string> = {\n AL: \"Alabama\", AK: \"Alaska\", AZ: \"Arizona\", AR: \"Arkansas\", CA: \"California\", CO: \"Colorado\",\n CT: \"Connecticut\", DE: \"Delaware\", FL: \"Florida\", GA: \"Georgia\", HI: \"Hawaii\", ID: \"Idaho\",\n IL: \"Illinois\", IN: \"Indiana\", IA: \"Iowa\", KS: \"Kansas\", KY: \"Kentucky\", LA: \"Louisiana\",\n ME: \"Maine\", MD: \"Maryland\", MA: \"Massachusetts\", MI: \"Michigan\", MN: \"Minnesota\", MS: \"Mississippi\",\n MO: \"Missouri\", MT: \"Montana\", NE: \"Nebraska\", NV: \"Nevada\", NH: \"New Hampshire\", NJ: \"New Jersey\",\n NM: \"New Mexico\", NY: \"New York\", NC: \"North Carolina\", ND: \"North Dakota\", OH: \"Ohio\", OK: \"Oklahoma\",\n OR: \"Oregon\", PA: \"Pennsylvania\", RI: \"Rhode Island\", SC: \"South Carolina\", SD: \"South Dakota\",\n TN: \"Tennessee\", TX: \"Texas\", UT: \"Utah\", VT: \"Vermont\", VA: \"Virginia\", WA: \"Washington\",\n WV: \"West Virginia\", WI: \"Wisconsin\", WY: \"Wyoming\", DC: \"District of Columbia\",\n};\n\nconst WORLD_ALIAS: Record<string, string> = {\n US: \"United States of America\", USA: \"United States of America\", \"UNITED STATES\": \"United States of America\",\n UK: \"United Kingdom\", GB: \"United Kingdom\", GBR: \"United Kingdom\",\n DE: \"Germany\", DEU: \"Germany\", FR: \"France\", FRA: \"France\", CN: \"China\", CHN: \"China\",\n JP: \"Japan\", JPN: \"Japan\", IN: \"India\", IND: \"India\", BR: \"Brazil\", BRA: \"Brazil\",\n CA: \"Canada\", CAN: \"Canada\", AU: \"Australia\", AUS: \"Australia\",\n};\n\nfunction normalizeGeoName(label: string, region: \"world\" | \"us\"): string {\n const upper = label.trim().toUpperCase();\n if (region === \"us\") return (US_ABBR[upper] ?? label.trim()).toLowerCase();\n return (WORLD_ALIAS[upper] ?? label.trim()).toLowerCase();\n}\n\nconst GeoMapImpl = vueComponent({\n name: \"OpenUIDashboardGeoMap\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<GeoMapSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const shapes = shallowRef<Shape[]>([]);\n const hovered = ref<string | null>(null);\n\n watch(\n () => p.props.region,\n (region) => {\n void loadShapes(region).then((loaded) => {\n shapes.value = loaded;\n });\n },\n { immediate: true },\n );\n\n return () => {\n const labels = toStrings(p.props.labels);\n const values = toNumbers(p.props.values);\n const entries = labels\n .map((label, i) => ({\n label,\n key: normalizeGeoName(label, p.props.region),\n value: values[i] ?? 0,\n }))\n .sort((a, b) => b.value - a.value);\n const byKey = new Map(entries.map((e) => [e.key, e]));\n const nums = entries.map((e) => e.value);\n const min = nums.length ? Math.min(...nums) : 0;\n const max = nums.length ? Math.max(...nums) : 1;\n\n const projection =\n p.props.region === \"us\"\n ? geoAlbersUsa().scale(680).translate([280, 170])\n : geoNaturalEarth1().scale(105).translate([280, 175]);\n const pathGen = geoPath(projection);\n const shown =\n typeof p.props.limit === \"number\" && p.props.limit > 0\n ? entries.slice(0, Math.round(p.props.limit))\n : entries;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-geo-map\",\n style: { display: \"grid\", gridTemplateColumns: \"minmax(0, 1.8fr) minmax(160px, 1fr)\", gap: \"16px\", width: \"100%\", alignItems: \"start\" },\n },\n [\n h(\n \"svg\",\n {\n viewBox: \"0 0 560 340\",\n role: \"img\",\n \"aria-label\": `${p.props.region.toUpperCase()} choropleth map`,\n style: { width: \"100%\", height: \"auto\", display: \"block\" },\n },\n shapes.value.map((shape, idx) => {\n const name = shape.properties?.name ?? \"\";\n const match = byKey.get(name.toLowerCase());\n const d = pathGen(shape) ?? undefined;\n const fill = match\n ? sequentialColor(match.value, min, max).background\n : \"var(--openui-dashboard-map-land)\";\n const active = hovered.value && hovered.value === name.toLowerCase();\n return h(\"path\", {\n key: name || idx,\n d,\n fill,\n stroke: active ? \"var(--openui-dashboard-ink)\" : \"var(--openui-dashboard-surface)\",\n \"stroke-width\": active ? 1.5 : 0.6,\n onMouseenter: () => {\n hovered.value = name.toLowerCase();\n },\n onMouseleave: () => {\n hovered.value = null;\n },\n });\n }),\n ),\n h(\n \"div\",\n { style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", maxHeight: \"320px\", overflowY: \"auto\", fontSize: \"12px\" } },\n shown.map((item, idx) =>\n h(\n \"div\",\n {\n key: item.label + idx,\n onMouseenter: () => {\n hovered.value = item.key;\n },\n onMouseleave: () => {\n hovered.value = null;\n },\n style: {\n display: \"flex\",\n justifyContent: \"space-between\",\n padding: \"4px 6px\",\n borderRadius: \"4px\",\n background: hovered.value === item.key ? \"var(--openui-dashboard-neutral-soft)\" : \"transparent\",\n },\n },\n [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\" } }, item.label),\n h(\"span\", { style: { fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(item.value, p.props.format)),\n ],\n ),\n ),\n ),\n ],\n );\n };\n },\n});\n\nexport const GeoMapComponent = defineComponent({\n name: \"GeoMap\",\n props: geoMapPropsSchema,\n description:\n 'Choropleth with a ranked list of every region (limit keeps the top N). region \"world\" takes country names or ISO codes (\"DE\", \"GBR\"); \"us\" takes state names or codes (\"NY\"). A switch reads regions as counts or % of total (view \"total\" opens on shares); hovering the map or the list highlights the same region in both. Use width \"two-thirds\" or \"full\".',\n component: GeoMapImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nexport const pointMapPropsSchema = z.object({\n region: z.enum([\"world\", \"us\"]),\n labels: z.array(z.string()),\n lats: z.array(z.number()),\n lons: z.array(z.number()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n goodWhen: goodWhenSchema.optional(),\n groups: z.array(z.string()).optional(),\n valueLabel: z.string().optional(),\n});\nexport type PointMapSchemaProps = z.infer<typeof pointMapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { geoAlbersUsa, geoNaturalEarth1, geoPath } from \"d3-geo\";\nimport { defineComponent as vueComponent, h, shallowRef, watch, type PropType } from \"vue\";\nimport { loadShapes, type Shape } from \"../../../shared/atlas\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { pointMapPropsSchema, type PointMapSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PointMapImpl = vueComponent({\n name: \"OpenUIDashboardPointMap\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<PointMapSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const shapes = shallowRef<Shape[]>([]);\n watch(\n () => p.props.region,\n (region) => {\n void loadShapes(region).then((loaded) => {\n shapes.value = loaded;\n });\n },\n { immediate: true },\n );\n\n return () => {\n const labels = toStrings(p.props.labels);\n const lats = toNumbers(p.props.lats);\n const lons = toNumbers(p.props.lons);\n const values = toNumbers(p.props.values);\n const groups = toStrings(p.props.groups);\n const groupOrder = [...new Set(groups.filter(Boolean))];\n\n const projection =\n p.props.region === \"us\"\n ? geoAlbersUsa().scale(680).translate([280, 170])\n : geoNaturalEarth1().scale(105).translate([280, 175]);\n const pathGen = geoPath(projection);\n\n const points = labels\n .map((label, i) => {\n const lat = lats[i];\n const lon = lons[i];\n const val = Math.max(0, values[i] ?? 0);\n const projected = lat !== null && lon !== null && lat !== undefined && lon !== undefined ? projection([lon, lat]) : null;\n return { label, val, group: groups[i] || \"\", xy: projected };\n })\n .sort((a, b) => b.val - a.val);\n const maxVal = Math.max(...points.map((pt) => pt.val), 1);\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-point-map\",\n style: { display: \"grid\", gridTemplateColumns: \"minmax(0, 1.8fr) minmax(160px, 1fr)\", gap: \"16px\", width: \"100%\", alignItems: \"start\" },\n },\n [\n h(\n \"svg\",\n {\n viewBox: \"0 0 560 340\",\n role: \"img\",\n \"aria-label\": `${p.props.region.toUpperCase()} point map`,\n style: { width: \"100%\", height: \"auto\", display: \"block\" },\n },\n [\n ...shapes.value.map((shape, idx) =>\n h(\"path\", {\n key: `land-${idx}`,\n d: pathGen(shape) ?? undefined,\n fill: \"var(--openui-dashboard-map-land)\",\n stroke: \"var(--openui-dashboard-surface)\",\n \"stroke-width\": 0.6,\n }),\n ),\n ...points.map((pt, idx) => {\n if (!pt.xy) return null;\n const r = 4 + Math.sqrt(pt.val / maxVal) * 14;\n const colorIdx = pt.group ? Math.max(0, groupOrder.indexOf(pt.group)) : 0;\n return h(\"circle\", {\n key: `pt-${idx}`,\n cx: pt.xy[0],\n cy: pt.xy[1],\n r,\n fill: seriesColor(colorIdx),\n opacity: 0.78,\n stroke: \"var(--openui-dashboard-surface)\",\n \"stroke-width\": 1.2,\n });\n }),\n ],\n ),\n h(\n \"div\",\n { style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", maxHeight: \"320px\", overflowY: \"auto\", fontSize: \"12px\" } },\n points.map((pt, idx) =>\n h(\"div\", { key: pt.label + idx, style: { display: \"flex\", justifyContent: \"space-between\", gap: \"8px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\" } }, pt.label),\n h(\"span\", { style: { fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(pt.val, p.props.format)),\n ]),\n ),\n ),\n ],\n );\n };\n },\n});\n\nexport const PointMapComponent = defineComponent({\n name: \"PointMap\",\n props: pointMapPropsSchema,\n description:\n 'Values at places (stores, cities, offices, data centres) as circles sized by value (area, not radius) on a world or US map, with a ranked list beside it. lats/lons in degrees. previous adds each place\\'s change, coloured by goodWhen. groups gives each place a type, drawn as its own colour and shape. valueLabel names the measure (\"Headcount\"). The 8 biggest places label themselves. For values by country or US state, use GeoMap; give it width two-thirds or full.',\n component: PointMapImpl,\n});\n","import type { Group } from \"../group\";\nimport { GeoMapComponent } from \"./GeoMap\";\nimport { PointMapComponent } from \"./PointMap\";\n\nexport const maps: Group = {\n components: [GeoMapComponent, PointMapComponent],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const goalPropsSchema = z.object({\n label: z.string(),\n value: z.number(),\n target: z.number(),\n format: formatSchema.optional(),\n pace: z.number().optional(),\n goodWhen: goodWhenSchema.optional(),\n previous: z.number().optional(),\n});\nexport type GoalSchemaProps = z.infer<typeof goalPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { formatValue } from \"../../../shared/format\";\nimport { goalPropsSchema, type GoalSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst GoalImpl = vueComponent({\n name: \"OpenUIDashboardGoal\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<GoalSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const value = typeof p.props.value === \"number\" ? p.props.value : 0;\n const target = typeof p.props.target === \"number\" && p.props.target > 0 ? p.props.target : 1;\n const ratio = value / target;\n const isCeiling = p.props.goodWhen === \"down\";\n const pace = typeof p.props.pace === \"number\" ? Math.min(1, Math.max(0, p.props.pace)) : null;\n\n let barColor = \"var(--openui-dashboard-series-1)\";\n if (isCeiling) {\n barColor = ratio <= 1 ? \"var(--openui-dashboard-good-mark)\" : \"var(--openui-dashboard-bad-mark)\";\n } else if (ratio >= 1) {\n barColor = \"var(--openui-dashboard-good-mark)\";\n } else if (pace !== null) {\n barColor = ratio >= pace ? \"var(--openui-dashboard-good-mark)\" : \"var(--openui-dashboard-warning-mark)\";\n }\n\n const prevRatio =\n compare.enabled.value && typeof p.props.previous === \"number\"\n ? Math.min(100, Math.max(0, (p.props.previous / target) * 100))\n : null;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-goal\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"13px\" } }, [\n h(\"span\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\" } }, p.props.label),\n h(\n \"span\",\n { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } },\n `${formatValue(value, p.props.format)} / ${formatValue(target, p.props.format)}`,\n ),\n ]),\n h(\n \"div\",\n {\n style: {\n position: \"relative\",\n height: \"10px\",\n borderRadius: \"999px\",\n background: \"var(--openui-dashboard-neutral-soft)\",\n overflow: \"hidden\",\n },\n },\n [\n h(\"div\", {\n style: {\n width: `${Math.min(100, Math.max(0, ratio * 100))}%`,\n height: \"100%\",\n background: barColor,\n borderRadius: \"999px\",\n },\n }),\n pace !== null\n ? h(\"div\", {\n title: `Pace: ${Math.round(pace * 100)}%`,\n style: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: `${pace * 100}%`,\n width: \"2px\",\n background: \"var(--openui-dashboard-ink)\",\n },\n })\n : null,\n prevRatio !== null\n ? h(\"div\", {\n title: `${compare.label.value}: ${formatValue(p.props.previous, p.props.format)}`,\n style: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: `${prevRatio}%`,\n width: \"2px\",\n background: \"var(--openui-dashboard-muted-mark)\",\n },\n })\n : null,\n ],\n ),\n ],\n );\n };\n },\n});\n\nexport const GoalComponent = defineComponent({\n name: \"Goal\",\n props: goalPropsSchema,\n description:\n 'Progress toward a target. pace (0–1) is how far through the period we are; the bar marks ahead/behind pace. goodWhen \"down\" makes target a ceiling (churn ≤ 2%). The bar takes the state\\'s colour; past its target or limit, a tick marks it and the overrun shows beyond, with the amount named. Stack several in one Card. previous is where it stood at the same point last period: a grey tick on the track while compare is on. For a single headline number with a target, use a Kpi with a Progress chart instead; Goal is for several targets stacked in one card.',\n component: GoalImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const keyValuePropsSchema = z.object({\n label: z.string(),\n value: z.union([z.number(), z.string()]),\n format: formatSchema.optional(),\n previous: z.number().nullable().optional(),\n goodWhen: goodWhenSchema.optional(),\n});\nexport type KeyValueSchemaProps = z.infer<typeof keyValuePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { keyValuePropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nexport const KeyValueComponent = defineComponent({\n name: \"KeyValue\",\n props: keyValuePropsSchema,\n description:\n \"One row of KeyValues: a number (with format and change vs previous) or a short text.\",\n component: ({ props, bindSource }) => {\n const numVal = typeof props.value === \"number\" ? props.value : null;\n const prev = typeof props.previous === \"number\" ? props.previous : null;\n const delta = numVal !== null && prev !== null ? computeDelta(numVal, prev, props.format) : null;\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-key-value\",\n style: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"baseline\",\n gap: \"12px\",\n padding: \"8px 0\",\n borderBottom: \"1px solid var(--openui-dashboard-border)\",\n fontSize: \"13px\",\n },\n },\n [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink-secondary)\" } }, props.label),\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"baseline\", gap: \"8px\" } }, [\n h(\n \"span\",\n { style: { fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink)\" } },\n numVal !== null ? formatValue(numVal, props.format) : String(props.value ?? \"—\"),\n ),\n delta\n ? h(\"span\", { style: { fontSize: \"12px\", color: TONE_COLOR[tone] } }, delta.text)\n : null,\n ]),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { KeyValueComponent } from \"../KeyValue\";\n\nexport const keyValuesPropsSchema = z.object({\n rows: z.array(KeyValueComponent.ref),\n});\nexport type KeyValuesSchemaProps = z.infer<typeof keyValuesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { keyValuesPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const KeyValuesComponent = defineComponent({\n name: \"KeyValues\",\n props: keyValuesPropsSchema,\n description:\n 'Label/value fact rows: KeyValues([KeyValue(\"Trials\", 572, \"number\", 547), KeyValue(\"Owner\", \"Growth team\")]).',\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-key-values\",\n style: { display: \"flex\", flexDirection: \"column\", width: \"100%\" },\n },\n [renderNode(props.rows)],\n ),\n});\n","import { z } from \"zod/v4\";\n\nexport const progressPropsSchema = z.object({\n target: z.number(),\n});\nexport type ProgressSchemaProps = z.infer<typeof progressPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { progressPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ProgressComponent = defineComponent({\n name: \"Progress\",\n props: progressPropsSchema,\n description:\n 'A Kpi\\'s progress toward target (a limit when its goodWhen is \"down\"). For one headline number; several targets in a card are Goals.',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\n\nexport const splitPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n});\nexport type SplitSchemaProps = z.infer<typeof splitPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { splitPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SplitComponent = defineComponent({\n name: \"Split\",\n props: splitPropsSchema,\n description:\n \"What a Kpi's total is made of, up to 3 parts, one label and one value each. For totals only, never rates or averages; a card about composition is a SegmentedBar.\",\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { stateSchema } from \"../../../shared/schema\";\n\nexport const statesPropsSchema = z.object({\n states: z.array(stateSchema),\n});\nexport type StatesSchemaProps = z.infer<typeof statesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { statesPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const StatesComponent = defineComponent({\n name: \"States\",\n props: statesPropsSchema,\n description: \"A Kpi's status strip: one dot per period, null for no data.\",\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { numbersSchema } from \"../../../shared/schema\";\n\nexport const trendPropsSchema = z.object({\n values: numbersSchema,\n previous: numbersSchema.optional(),\n});\nexport type TrendSchemaProps = z.infer<typeof trendPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { trendPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const TrendComponent = defineComponent({\n name: \"Trend\",\n props: trendPropsSchema,\n description:\n \"A Kpi's sparkline, 8–13 points. previous is the same points one period earlier, dashed while compare is on.\",\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema, toneSchema } from \"../../../shared/schema\";\nimport { ProgressComponent } from \"../Progress\";\nimport { SplitComponent } from \"../Split\";\nimport { StatesComponent } from \"../States\";\nimport { TrendComponent } from \"../Trend\";\n\nexport const kpiPropsSchema = z.object({\n label: z.string(),\n // Optional so a missing number (null) still draws its tile, with a dash.\n value: z.union([z.number(), z.string()]).nullable().optional(),\n format: formatSchema.optional(),\n previous: z.number().nullable().optional(),\n goodWhen: goodWhenSchema.optional(),\n hint: z.string().optional(),\n chart: z\n .union([TrendComponent.ref, ProgressComponent.ref, SplitComponent.ref, StatesComponent.ref])\n .optional(),\n tone: toneSchema.optional(),\n});\nexport type KpiSchemaProps = z.infer<typeof kpiPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType, type VNodeChild } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { kpiPropsSchema, type KpiSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR: Record<string, string> = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n warning: \"var(--openui-dashboard-warning)\",\n info: \"var(--openui-dashboard-info)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nfunction renderInlineChart(\n chartNode: unknown,\n currentValue: number | null,\n compareEnabled: boolean,\n): VNodeChild {\n if (!chartNode || typeof chartNode !== \"object\") return null;\n const { typeName, props } = chartNode as { typeName?: string; props?: Record<string, unknown> };\n if (!props) return null;\n\n if (typeName === \"Trend\") {\n const vals = toNumbers(props.values);\n const prev = toNumbers(props.previous);\n const all = [...vals, ...(compareEnabled ? prev : [])].filter((v): v is number => v !== null);\n if (!all.length) return null;\n const min = Math.min(...all);\n const max = Math.max(...all);\n const span = max - min || 1;\n const mkPath = (arr: (number | null)[]) => {\n const step = arr.length > 1 ? 120 / (arr.length - 1) : 0;\n let d = \"\";\n let active = false;\n arr.forEach((v, i) => {\n if (v === null) {\n active = false;\n return;\n }\n const x = i * step;\n const y = 26 - ((v - min) / span) * 20;\n d += `${active ? \"L\" : \"M\"}${x.toFixed(1)},${y.toFixed(1)} `;\n active = true;\n });\n return d.trim();\n };\n const mainPath = mkPath(vals);\n const prevPath = compareEnabled && prev.length ? mkPath(prev) : \"\";\n return h(\"svg\", { viewBox: \"0 0 120 30\", style: { width: \"100%\", height: \"30px\", display: \"block\" } }, [\n prevPath\n ? h(\"path\", { d: prevPath, fill: \"none\", stroke: MUTED_COLOR, \"stroke-width\": 1.2, \"stroke-dasharray\": \"3 3\" })\n : null,\n mainPath ? h(\"path\", { d: mainPath, fill: \"none\", stroke: seriesColor(0), \"stroke-width\": 1.8 }) : null,\n ]);\n }\n\n if (typeName === \"Progress\") {\n const target = typeof props.target === \"number\" && props.target > 0 ? props.target : 0;\n const pct = target > 0 && currentValue !== null ? Math.min(100, Math.max(0, (currentValue / target) * 100)) : 0;\n return h(\n \"div\",\n { style: { width: \"100%\", height: \"6px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${pct}%`, height: \"100%\", background: seriesColor(0) } })],\n );\n }\n\n if (typeName === \"Split\") {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values).map((v) => Math.max(0, v ?? 0));\n const total = values.reduce((a, b) => a + b, 0) || 1;\n return h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\n \"div\",\n { style: { display: \"flex\", height: \"6px\", borderRadius: \"999px\", overflow: \"hidden\", gap: \"2px\" } },\n values.map((v, i) =>\n h(\"div\", { key: labels[i] ?? i, style: { width: `${(v / total) * 100}%`, background: seriesColor(i) } }),\n ),\n ),\n h(\n \"div\",\n { style: { display: \"flex\", gap: \"8px\", flexWrap: \"wrap\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n labels.map((l, i) => h(\"span\", { key: i }, `${l}: ${Math.round(((values[i] ?? 0) / total) * 100)}%`)),\n ),\n ]);\n }\n\n if (typeName === \"States\") {\n const states = Array.isArray(props.states) ? props.states : [];\n return h(\n \"div\",\n { style: { display: \"flex\", gap: \"3px\", alignItems: \"center\" } },\n states.map((st, i) =>\n h(\"span\", {\n key: i,\n style: {\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"999px\",\n background:\n st === \"good\"\n ? \"var(--openui-dashboard-good-mark)\"\n : st === \"warning\"\n ? \"var(--openui-dashboard-warning-mark)\"\n : st === \"bad\"\n ? \"var(--openui-dashboard-bad-mark)\"\n : \"var(--openui-dashboard-neutral-soft)\",\n },\n }),\n ),\n );\n }\n\n return null;\n}\n\nconst KpiImpl = vueComponent({\n name: \"OpenUIDashboardKpi\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<KpiSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const bind = p.bindSource;\n const numVal = typeof p.props.value === \"number\" ? p.props.value : null;\n const prev = typeof p.props.previous === \"number\" ? p.props.previous : null;\n const delta = numVal !== null && prev !== null ? computeDelta(numVal, prev, p.props.format) : null;\n const tone = delta ? deltaTone(delta.direction, p.props.goodWhen) : \"neutral\";\n\n return h(\n \"div\",\n {\n ...(bind?.() ?? {}),\n class: \"openui-dashboard-kpi\",\n style: {\n padding: \"16px\",\n borderRadius: \"var(--openui-dashboard-radius-md)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n minWidth: 0,\n },\n },\n [\n h(\n \"div\",\n { style: { fontSize: \"12px\", fontWeight: 500, color: \"var(--openui-dashboard-ink-secondary)\" } },\n p.props.label,\n ),\n h(\n \"div\",\n {\n ...(bind?.(\"value\") ?? {}),\n style: {\n display: \"flex\",\n alignItems: \"baseline\",\n gap: \"8px\",\n flexWrap: \"wrap\",\n },\n },\n [\n p.props.tone && typeof p.props.value === \"string\"\n ? h(\"span\", {\n style: {\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"999px\",\n background: TONE_COLOR[p.props.tone] ?? TONE_COLOR.neutral,\n display: \"inline-block\",\n },\n })\n : null,\n h(\n \"span\",\n {\n style: {\n fontSize: \"24px\",\n fontWeight: 650,\n letterSpacing: \"-0.02em\",\n fontVariantNumeric: \"tabular-nums\",\n color: \"var(--openui-dashboard-ink)\",\n },\n },\n typeof p.props.value === \"number\"\n ? formatValue(p.props.value, p.props.format)\n : p.props.value ?? \"—\",\n ),\n delta\n ? h(\n \"span\",\n {\n style: {\n fontSize: \"12px\",\n fontWeight: 500,\n fontVariantNumeric: \"tabular-nums\",\n color: TONE_COLOR[tone],\n },\n },\n delta.text,\n )\n : null,\n ],\n ),\n p.props.hint\n ? h(\"div\", { style: { fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } }, p.props.hint)\n : null,\n p.props.chart ? renderInlineChart(p.props.chart, numVal, compare.enabled.value) : null,\n ],\n );\n };\n },\n});\n\nexport const KpiComponent = defineComponent({\n name: \"Kpi\",\n props: kpiPropsSchema,\n description:\n 'Stat tile, only inside Kpis. value is a number, shown with format and its change vs previous (the same measure one period earlier), or a short text such as a plan, status or version (no format or previous; tone colours its status dot). hint is a short subtitle such as \"Paid plans only\". chart is at most one of: Trend(weekly) for a sparkline, Progress(50000) for progress toward a target, Split([\"Web\", \"App\"], [310, 190]) for what a total is made of, States([\"good\", \"good\", \"warning\"]) for a status per period.',\n component: KpiImpl,\n});\n","import { z } from \"zod/v4\";\nimport { KpiComponent } from \"../Kpi\";\n\nexport const kpisPropsSchema = z.object({\n items: z.array(KpiComponent.ref),\n});\nexport type KpisSchemaProps = z.infer<typeof kpisPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { kpisPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const KpisComponent = defineComponent({\n name: \"Kpis\",\n props: kpisPropsSchema,\n description:\n \"A strip of Kpi tiles that lays itself out: up to 6 per row, wrapping into balanced rows when narrow. More than 6 render as compact items (value, then label and change) that wrap the same way; sparklines and hints are left out there. Tiles are equal width; just list them.\",\n component: ({ props, renderNode, bindSource }) => {\n const items = Array.isArray(props.items) ? props.items : [];\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-kpis\",\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fit, minmax(180px, 1fr))\",\n gap: \"var(--openui-dashboard-space-sm)\",\n width: \"100%\",\n },\n },\n [renderNode(items)],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const statPropsSchema = z.object({\n value: z.number().nullable(),\n format: formatSchema.optional(),\n previous: z.number().nullable().optional(),\n goodWhen: goodWhenSchema.optional(),\n label: z.string().optional(),\n});\nexport type StatSchemaProps = z.infer<typeof statPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { statPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nexport const StatComponent = defineComponent({\n name: \"Stat\",\n props: statPropsSchema,\n description: \"Headline number at the top of a Card, with change vs previous.\",\n component: ({ props, bindSource }) => {\n const val = typeof props.value === \"number\" ? props.value : null;\n const prev = typeof props.previous === \"number\" ? props.previous : null;\n const delta = val !== null && prev !== null ? computeDelta(val, prev, props.format) : null;\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-stat\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\", marginBottom: \"8px\" },\n },\n [\n props.label\n ? h(\"div\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.label)\n : null,\n h(\"div\", { style: { display: \"flex\", alignItems: \"baseline\", gap: \"8px\" } }, [\n h(\n \"span\",\n {\n ...(bindSource?.(\"value\") ?? {}),\n style: { fontSize: \"28px\", fontWeight: 700, letterSpacing: \"-0.02em\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink)\" },\n },\n formatValue(val, props.format),\n ),\n delta\n ? h(\"span\", { style: { fontSize: \"13px\", fontWeight: 500, color: TONE_COLOR[tone] } }, delta.text)\n : null,\n ]),\n ],\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { GoalComponent } from \"./Goal\";\nimport { KeyValueComponent } from \"./KeyValue\";\nimport { KeyValuesComponent } from \"./KeyValues\";\nimport { KpiComponent } from \"./Kpi\";\nimport { KpisComponent } from \"./Kpis\";\nimport { ProgressComponent } from \"./Progress\";\nimport { SplitComponent } from \"./Split\";\nimport { StatComponent } from \"./Stat\";\nimport { StatesComponent } from \"./States\";\nimport { TrendComponent } from \"./Trend\";\n\nexport const metrics: Group = {\n components: [\n KpisComponent,\n KpiComponent,\n TrendComponent,\n ProgressComponent,\n SplitComponent,\n StatesComponent,\n StatComponent,\n GoalComponent,\n KeyValuesComponent,\n KeyValueComponent,\n ],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { numbersSchema } from \"../../../shared/schema\";\nexport const cohortsPropsSchema = z.object({\n cohorts: z.array(z.string()),\n periods: z.array(z.string()),\n values: numbersSchema,\n sizes: z.array(z.number()).optional(),\n format: formatSchema.optional(),\n view: z.enum([\"percent\", \"people\"]).optional(),\n showValues: z.boolean().optional(),\n});\nexport type CohortsSchemaProps = z.infer<typeof cohortsPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { sequentialColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toGrid, toNumbers } from \"../../../shared/values\";\nimport { cohortsPropsSchema, type CohortsSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CohortsImpl = vueComponent({\n name: \"OpenUIDashboardCohorts\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<CohortsSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const show = ref<\"none\" | \"percent\" | \"people\">(\n p.props.showValues ? (p.props.view ?? \"percent\") : \"none\",\n );\n\n return () => {\n const grid = toGrid<number | null>(p.props.cohorts, p.props.periods, toNumbers(p.props.values));\n const sizes = toNumbers(p.props.sizes);\n const sizeByCohort = new Map<string, number>();\n if (Array.isArray(p.props.cohorts)) {\n p.props.cohorts.forEach((c, i) => {\n const s = sizes[i];\n if (typeof s === \"number\" && !sizeByCohort.has(c)) sizeByCohort.set(c, s);\n });\n }\n const nums = grid.cells.flat().filter((v): v is number => typeof v === \"number\");\n const min = nums.length ? Math.min(0, ...nums) : 0;\n const max = nums.length ? Math.max(...nums) : 100;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-cohorts\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", overflowX: \"auto\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"flex-end\", gap: \"6px\", fontSize: \"11px\" } }, [\n ([\"none\", \"percent\", \"people\"] as const).map((mode) =>\n h(\n \"button\",\n {\n key: mode,\n type: \"button\",\n onClick: () => {\n show.value = mode;\n },\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: show.value === mode ? \"var(--openui-dashboard-accent)\" : \"var(--openui-dashboard-surface)\",\n color: show.value === mode ? \"var(--openui-dashboard-accent-ink)\" : \"var(--openui-dashboard-ink-secondary)\",\n cursor: \"pointer\",\n },\n },\n mode === \"none\" ? \"Hide\" : mode === \"percent\" ? \"Percent\" : \"Count\",\n ),\n ),\n ]),\n h(\"table\", { style: { width: \"100%\", borderCollapse: \"separate\", borderSpacing: \"3px\", fontSize: \"12px\" } }, [\n h(\"thead\", null, h(\"tr\", null, [\n h(\"th\", { style: { textAlign: \"left\", color: \"var(--openui-dashboard-ink-muted)\", fontWeight: 500 } }, \"Cohort\"),\n sizeByCohort.size ? h(\"th\", { style: { textAlign: \"right\", color: \"var(--openui-dashboard-ink-muted)\", fontWeight: 500 } }, \"Size\") : null,\n ...grid.columns.map((col) => h(\"th\", { key: col, style: { textAlign: \"center\", color: \"var(--openui-dashboard-ink-muted)\", fontWeight: 500 } }, col)),\n ])),\n h(\"tbody\", null, grid.rows.map((cohort, rIdx) => {\n const cohortSize = sizeByCohort.get(cohort) ?? null;\n return h(\"tr\", { key: cohort }, [\n h(\"td\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\", whiteSpace: \"nowrap\" } }, cohort),\n sizeByCohort.size\n ? h(\"td\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(cohortSize, \"compact\"))\n : null,\n ...grid.columns.map((period, cIdx) => {\n const val = grid.cells[rIdx]?.[cIdx] ?? null;\n if (val === null) return h(\"td\", { key: period, style: { background: \"transparent\" } });\n const colors = sequentialColor(val, min, max);\n const display =\n show.value === \"none\"\n ? \"\"\n : show.value === \"people\" && cohortSize !== null\n ? formatValue(Math.round((val / 100) * cohortSize), \"compact\")\n : formatValue(val, p.props.format ?? \"percent\");\n return h(\"td\", {\n key: period,\n title: `${cohort} · ${period}: ${formatValue(val, p.props.format ?? \"percent\")}`,\n style: {\n background: colors.background,\n color: colors.color,\n textAlign: \"center\",\n padding: \"6px 4px\",\n borderRadius: \"4px\",\n fontVariantNumeric: \"tabular-nums\",\n },\n }, display);\n }),\n ]);\n })),\n ]),\n ],\n );\n };\n },\n});\n\nexport const CohortsComponent = defineComponent({\n name: \"Cohorts\",\n props: cohortsPropsSchema,\n description:\n 'Retention grid. cohorts, periods and values have one entry per cell: its cohort, its period and the % of that cohort active in it, as query rows give them: Cohorts(c.rows.cohort, c.rows.period, c.rows.retained, c.rows.cohort_size). sizes is the cohort\\'s size, repeated on each of its cells. Leave out (or null) the periods a cohort has not reached. Periods start at \"Week 0\" or \"Month 0\". A Show switch in the header prints the cells as Percent or Count (people: size × rate), or nothing (None, the default); showValues true opens it on view (\"percent\" or \"people\").',\n component: CohortsImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { numbersSchema } from \"../../../shared/schema\";\nexport const heatmapPropsSchema = z.object({\n rows: z.array(z.string()),\n columns: z.array(z.string()),\n values: numbersSchema,\n format: formatSchema.optional(),\n showValues: z.boolean().optional(),\n midpoint: z.number().optional(),\n view: z.enum([\"count\", \"total\", \"row\"]).optional(),\n});\nexport type HeatmapSchemaProps = z.infer<typeof heatmapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { divergingColor, sequentialColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toGrid, toNumbers } from \"../../../shared/values\";\nimport { heatmapPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const HeatmapComponent = defineComponent({\n name: \"Heatmap\",\n props: heatmapPropsSchema,\n description:\n 'Magnitude across two categories (weekday × hour). rows, columns and values have one entry per cell: its row label, its column label and its value, as query rows give them: Heatmap(h.rows.day, h.rows.hour, h.rows.n). Rows and columns draw in order of first appearance; a cell left out or null is no data. A Show switch in the header prints the cells as Count, % of total or % of row (colouring by that reading), or nothing (None, the default); showValues true opens it on view (\"count\", \"total\" or \"row\"). midpoint switches to a two-pole diverging scale around it, for values with a direction (change, variance vs plan, correlation): 0 for change.',\n component: ({ props, bindSource }) => {\n const grid = toGrid<number | null>(props.rows, props.columns, toNumbers(props.values));\n const nums = grid.cells.flat().filter((v): v is number => typeof v === \"number\");\n const min = nums.length ? Math.min(...nums) : 0;\n const max = nums.length ? Math.max(...nums) : 1;\n const midpoint = typeof props.midpoint === \"number\" ? props.midpoint : null;\n const spread = midpoint !== null ? Math.max(Math.abs(max - midpoint), Math.abs(min - midpoint), 1) : 1;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-heatmap\",\n style: { width: \"100%\", overflowX: \"auto\" },\n },\n [\n h(\"table\", { style: { width: \"100%\", borderCollapse: \"separate\", borderSpacing: \"3px\", fontSize: \"12px\" } }, [\n h(\"thead\", null, h(\"tr\", null, [\n h(\"th\"),\n ...grid.columns.map((c) => h(\"th\", { key: c, style: { fontWeight: 500, color: \"var(--openui-dashboard-ink-muted)\", textAlign: \"center\" } }, c)),\n ])),\n h(\"tbody\", null, grid.rows.map((r, rIdx) =>\n h(\"tr\", { key: r }, [\n h(\"td\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\", whiteSpace: \"nowrap\", paddingRight: \"8px\" } }, r),\n ...grid.columns.map((c, cIdx) => {\n const val = grid.cells[rIdx]?.[cIdx] ?? null;\n if (val === null) {\n return h(\"td\", { key: c, style: { background: \"var(--openui-dashboard-neutral-soft)\", borderRadius: \"4px\", height: \"28px\" } });\n }\n const colors =\n midpoint !== null\n ? divergingColor(val, midpoint, spread)\n : sequentialColor(val, min, max);\n return h(\"td\", {\n key: c,\n title: `${r} · ${c}: ${formatValue(val, props.format)}`,\n style: {\n background: colors.background,\n color: colors.color,\n borderRadius: \"4px\",\n textAlign: \"center\",\n padding: \"6px 4px\",\n fontVariantNumeric: \"tabular-nums\",\n },\n }, props.showValues ? formatValue(val, props.format) : \"\");\n }),\n ]),\n )),\n ]),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { numbersSchema } from \"../../../shared/schema\";\nimport { ReferenceComponent } from \"../../trends/Reference\";\n\nexport const scatterPropsSchema = z.object({\n labels: z.array(z.string()),\n // null when a measure is missing: the point isn't drawn, and the chart names it under the plot.\n xs: numbersSchema,\n ys: numbersSchema,\n xLabel: z.string(),\n yLabel: z.string(),\n xFormat: formatSchema.optional(),\n yFormat: formatSchema.optional(),\n sizes: numbersSchema.optional(),\n groups: z.array(z.string()).optional(),\n references: z.array(ReferenceComponent.ref).optional(),\n sizeLabel: z.string().optional(),\n quadrants: z.array(z.string()).optional(),\n});\nexport type ScatterSchemaProps = z.infer<typeof scatterPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { ScatterChart } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { scatterPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ScatterComponent = defineComponent({\n name: \"Scatter\",\n props: scatterPropsSchema,\n description:\n 'Two measures per item, one entry per item in labels, xs and ys: Scatter(c.rows.campaign, c.rows.spend, c.rows.roas, \"Spend\", \"ROAS\", \"currency-compact\", \"multiplier\"). sizes scales each dot by a third measure (sizeLabel names it, e.g. \"Signups\"); groups gives each item a group. Up to 8 groups, each with its own colour and shape; past eight, the smallest fold into Other. A point with a null x or y isn\\'t drawn and is named under the chart. Up to 10 points label themselves. references draw targets or averages: Reference(\"Avg spend\", 12000, \"x\") is vertical, a y reference horizontal; together they split the plot into quadrants.',\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const xs = toNumbers(props.xs);\n const ys = toNumbers(props.ys);\n const groups = toStrings(props.groups);\n\n const byGroup = new Map<string, Array<{ x: number; y: number; name?: string }>>();\n const skipped: string[] = [];\n labels.forEach((label, i) => {\n const x = xs[i];\n const y = ys[i];\n if (x === null || x === undefined || y === null || y === undefined) {\n if (label) skipped.push(label);\n return;\n }\n const g = groups[i] || props.yLabel || \"Items\";\n const list = byGroup.get(g) ?? [];\n list.push({ x, y, name: label });\n byGroup.set(g, list);\n });\n\n const datasets = [...byGroup.entries()].map(([name, data]) => ({ name, data }));\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-scatter\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", height: \"100%\" },\n },\n [\n datasets.length\n ? h(ScatterChart as never, {\n data: datasets,\n xAxisDataKey: \"x\",\n yAxisDataKey: \"y\",\n xAxisLabel: props.xLabel,\n yAxisLabel: props.yLabel,\n customPalette: datasets.map((_, i) => seriesColor(i)),\n isAnimationActive: false,\n })\n : null,\n skipped.length\n ? h(\"div\", { style: { fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } }, `Omitted (missing coordinates): ${skipped.join(\", \")}`)\n : null,\n ],\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { CohortsComponent } from \"./Cohorts\";\nimport { HeatmapComponent } from \"./Heatmap\";\nimport { ScatterComponent } from \"./Scatter\";\n\nexport const relationships: Group = {\n components: [ScatterComponent, CohortsComponent, HeatmapComponent],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema, numbersSchema, toneSchema } from \"../../../shared/schema\";\n\nexport const columnPropsSchema = z.object({\n label: z.string(),\n // z.literal(null), not z.null(): the signature printer writes z.null() as \"any\".\n values: z.array(\n z.union([\n z.string(),\n z.number(),\n z.literal(null),\n numbersSchema,\n z.array(z.string().nullable()),\n ]),\n ),\n kind: z\n .enum([\n \"text\",\n \"primary\",\n \"number\",\n \"bar\",\n \"delta\",\n \"badge\",\n \"sparkline\",\n \"chip\",\n \"date\",\n \"progress\",\n \"states\",\n \"link\",\n \"person\",\n ])\n .optional(),\n format: formatSchema.optional(),\n tones: z.record(z.string(), toneSchema).optional(),\n goodWhen: goodWhenSchema.optional(),\n total: z.enum([\"sum\", \"average\"]).optional(),\n});\nexport type ColumnSchemaProps = z.infer<typeof columnPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { columnPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ColumnComponent = defineComponent({\n name: \"Column\",\n props: columnPropsSchema,\n description:\n 'kind: \"primary\" (bold first column), \"text\", \"number\", \"bar\" (number with inline bar), \"delta\" (signed change coloured by goodWhen), \"badge\" (tones maps statuses to good/bad/warning/info/neutral; plain categories stay neutral), \"sparkline\" (values are number arrays), \"chip\" (a category such as plan, channel or region as a neutral chip; an array gives several tags), \"date\" (\"2026-11-08\" shown as Nov 8), \"progress\" (0–100, a share of a goal with a bar to 100%), \"states\" (one status dot per period: arrays of \"good\" | \"warning\" | \"bad\" | null), \"link\" (a URL, shown without https:// and opened in a new tab), \"person\" (a name with an initials avatar, for owners and assignees). total (\"sum\" or \"average\") only for amounts that add up across rows: never unique counts, rates, shares or per-unit values like CAC. goodWhen only matters for kind \"delta\".',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { ColumnComponent } from \"../Column\";\n\nexport const tablePropsSchema = z.object({\n columns: z.array(ColumnComponent.ref),\n pageSize: z.number().optional(),\n totals: z.boolean().optional(),\n search: z.string().optional(),\n groupBy: z.string().optional(),\n});\n\nexport type TableSchemaProps = z.infer<typeof tablePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { computed, defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { deltaTone, formatDateText, formatValue } from \"../../../shared/format\";\nimport { nodeList } from \"../../../shared/values\";\nimport type { ColumnSchemaProps } from \"../Column/schema\";\nimport { tablePropsSchema, type TableSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_STYLE: Record<string, { color: string; bg: string }> = {\n good: { color: \"var(--openui-dashboard-good)\", bg: \"rgba(22, 183, 111, 0.12)\" },\n bad: { color: \"var(--openui-dashboard-bad)\", bg: \"rgba(208, 51, 72, 0.12)\" },\n warning: { color: \"var(--openui-dashboard-warning)\", bg: \"var(--openui-dashboard-warning-soft)\" },\n info: { color: \"var(--openui-dashboard-info)\", bg: \"rgba(49, 124, 230, 0.12)\" },\n neutral: { color: \"var(--openui-dashboard-ink-secondary)\", bg: \"var(--openui-dashboard-neutral-soft)\" },\n};\n\nconst TableImpl = vueComponent({\n name: \"OpenUIDashboardTable\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<TableSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const sortCol = ref<number | null>(null);\n const sortDir = ref<\"asc\" | \"desc\">(\"desc\");\n const page = ref(0);\n\n const columns = computed(() => nodeList<ColumnSchemaProps>(p.props.columns));\n\n return () => {\n const cols = columns.value;\n const rowCount = Math.max(0, ...cols.map((c) => (Array.isArray(c.values) ? c.values.length : 0)));\n const pageSize = typeof p.props.pageSize === \"number\" && p.props.pageSize > 0 ? Math.round(p.props.pageSize) : 10;\n const q = (p.props.search ?? \"\").trim().toLowerCase();\n\n let indices = Array.from({ length: rowCount }, (_, i) => i);\n if (q) {\n indices = indices.filter((rIdx) =>\n cols.some((c) => String(c.values?.[rIdx] ?? \"\").toLowerCase().includes(q)),\n );\n }\n\n if (sortCol.value !== null && cols[sortCol.value]) {\n const col = cols[sortCol.value]!;\n const dir = sortDir.value === \"asc\" ? 1 : -1;\n indices = [...indices].sort((a, b) => {\n const av = col.values?.[a];\n const bv = col.values?.[b];\n if (typeof av === \"number\" && typeof bv === \"number\") return (av - bv) * dir;\n return String(av ?? \"\").localeCompare(String(bv ?? \"\")) * dir;\n });\n }\n\n const totalPages = Math.max(1, Math.ceil(indices.length / pageSize));\n const safePage = Math.min(page.value, totalPages - 1);\n const visible = indices.slice(safePage * pageSize, (safePage + 1) * pageSize);\n\n const barMax = cols.map((col) => {\n if (col.kind !== \"bar\") return 1;\n const nums = (col.values ?? []).filter((v): v is number => typeof v === \"number\");\n return Math.max(...nums.map(Math.abs), 1);\n });\n\n const isRightAligned = (kind?: string) =>\n kind === \"number\" || kind === \"bar\" || kind === \"delta\" || kind === \"progress\";\n\n const renderCell = (col: ColumnSchemaProps, colIdx: number, raw: unknown) => {\n const kind = col.kind ?? (typeof raw === \"number\" ? \"number\" : \"text\");\n if (raw == null) return \"—\";\n if (kind === \"badge\") {\n const text = String(raw);\n const tone = col.tones?.[text] ?? \"neutral\";\n const style = TONE_STYLE[tone] ?? TONE_STYLE.neutral!;\n return h(\"span\", { style: { padding: \"2px 8px\", borderRadius: \"999px\", fontSize: \"11px\", fontWeight: 500, background: style.bg, color: style.color } }, text);\n }\n if (kind === \"chip\") {\n const tags = Array.isArray(raw) ? raw.map(String) : [String(raw)];\n return h(\"span\", { style: { display: \"inline-flex\", gap: \"4px\", flexWrap: \"wrap\" } },\n tags.map((t, i) => h(\"span\", { key: i, style: { padding: \"2px 7px\", borderRadius: \"6px\", fontSize: \"11px\", background: \"var(--openui-dashboard-neutral-soft)\", color: \"var(--openui-dashboard-ink-secondary)\" } }, t)),\n );\n }\n if (kind === \"delta\" && typeof raw === \"number\") {\n const dir = raw === 0 ? \"flat\" : raw > 0 ? \"up\" : \"down\";\n const tone = deltaTone(dir, col.goodWhen);\n const color = tone === \"good\" ? \"var(--openui-dashboard-good)\" : tone === \"bad\" ? \"var(--openui-dashboard-bad)\" : \"var(--openui-dashboard-ink-muted)\";\n return h(\"span\", { style: { color, fontWeight: 500 } }, `${raw > 0 ? \"+\" : \"\"}${formatValue(raw, col.format)}`);\n }\n if (kind === \"bar\" && typeof raw === \"number\") {\n const pct = Math.min(100, (Math.abs(raw) / (barMax[colIdx] || 1)) * 100);\n return h(\"div\", { style: { display: \"flex\", alignItems: \"center\", justifyContent: \"flex-end\", gap: \"8px\" } }, [\n h(\"div\", { style: { width: \"48px\", height: \"6px\", borderRadius: \"3px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } }, [\n h(\"div\", { style: { width: `${pct}%`, height: \"100%\", background: seriesColor(0) } }),\n ]),\n h(\"span\", null, formatValue(raw, col.format)),\n ]);\n }\n if (kind === \"progress\" && typeof raw === \"number\") {\n const pct = Math.min(100, Math.max(0, raw));\n return h(\"div\", { style: { display: \"flex\", alignItems: \"center\", justifyContent: \"flex-end\", gap: \"8px\" } }, [\n h(\"div\", { style: { width: \"52px\", height: \"6px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } }, [\n h(\"div\", { style: { width: `${pct}%`, height: \"100%\", background: seriesColor(0) } }),\n ]),\n h(\"span\", null, `${pct.toFixed(0)}%`),\n ]);\n }\n if (kind === \"date\") {\n return formatDateText(raw) ?? String(raw);\n }\n if (kind === \"link\" && typeof raw === \"string\") {\n const href = /^https?:\\/\\//i.test(raw) ? raw : undefined;\n const text = raw.replace(/^https?:\\/\\//i, \"\");\n return href\n ? h(\"a\", { href, target: \"_blank\", rel: \"noopener noreferrer\", style: { color: \"var(--openui-dashboard-info)\", textDecoration: \"underline\" } }, text)\n : text;\n }\n if (kind === \"person\") {\n const name = String(raw);\n const initials = name.split(/\\s+/).map((w) => w[0] ?? \"\").join(\"\").slice(0, 2).toUpperCase();\n return h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\" } }, [\n h(\"span\", { style: { width: \"20px\", height: \"20px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", display: \"inline-flex\", alignItems: \"center\", justifyContent: \"center\", fontSize: \"10px\", fontWeight: 600 } }, initials),\n name,\n ]);\n }\n if (kind === \"primary\") {\n return h(\"strong\", { style: { fontWeight: 600, color: \"var(--openui-dashboard-ink)\" } }, String(raw));\n }\n return typeof raw === \"number\" ? formatValue(raw, col.format) : String(raw);\n };\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-table\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", overflowX: \"auto\" },\n },\n [\n h(\"table\", { style: { width: \"100%\", borderCollapse: \"collapse\", fontSize: \"13px\" } }, [\n h(\n \"thead\",\n null,\n h(\n \"tr\",\n { style: { borderBottom: \"1px solid var(--openui-dashboard-border-strong)\" } },\n cols.map((col, idx) =>\n h(\n \"th\",\n {\n key: col.label + idx,\n onClick: () => {\n if (sortCol.value === idx) {\n sortDir.value = sortDir.value === \"asc\" ? \"desc\" : \"asc\";\n } else {\n sortCol.value = idx;\n sortDir.value = \"desc\";\n }\n },\n style: {\n padding: \"8px 10px\",\n textAlign: isRightAligned(col.kind) ? \"right\" : \"left\",\n fontSize: \"12px\",\n fontWeight: 600,\n color: \"var(--openui-dashboard-ink-muted)\",\n cursor: \"pointer\",\n whiteSpace: \"nowrap\",\n },\n },\n `${col.label}${sortCol.value === idx ? (sortDir.value === \"asc\" ? \" ↑\" : \" ↓\") : \"\"}`,\n ),\n ),\n ),\n ),\n h(\n \"tbody\",\n null,\n visible.map((rIdx) =>\n h(\n \"tr\",\n { key: rIdx, style: { borderBottom: \"1px solid var(--openui-dashboard-border)\" } },\n cols.map((col, cIdx) =>\n h(\n \"td\",\n {\n key: cIdx,\n style: {\n padding: \"8px 10px\",\n textAlign: isRightAligned(col.kind) ? \"right\" : \"left\",\n fontVariantNumeric: isRightAligned(col.kind) ? \"tabular-nums\" : undefined,\n color: \"var(--openui-dashboard-ink)\",\n },\n },\n [renderCell(col, cIdx, col.values?.[rIdx])],\n ),\n ),\n ),\n ),\n ),\n p.props.totals\n ? h(\n \"tfoot\",\n null,\n h(\n \"tr\",\n { style: { borderTop: \"1px solid var(--openui-dashboard-border-strong)\", fontWeight: 600 } },\n cols.map((col, cIdx) => {\n if (cIdx === 0 && !col.total) return h(\"td\", { key: cIdx, style: { padding: \"8px 10px\" } }, \"Total\");\n if (!col.total) return h(\"td\", { key: cIdx });\n const nums = indices\n .map((i) => col.values?.[i])\n .filter((v): v is number => typeof v === \"number\" && Number.isFinite(v));\n const val =\n nums.length === 0\n ? null\n : col.total === \"average\"\n ? nums.reduce((a, b) => a + b, 0) / nums.length\n : nums.reduce((a, b) => a + b, 0);\n return h(\n \"td\",\n { key: cIdx, style: { padding: \"8px 10px\", textAlign: \"right\", fontVariantNumeric: \"tabular-nums\" } },\n formatValue(val, col.format),\n );\n }),\n ),\n )\n : null,\n ]),\n totalPages > 1\n ? h(\n \"div\",\n { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n [\n h(\"span\", null, `Page ${safePage + 1} of ${totalPages} (${indices.length} rows)`),\n h(\"div\", { style: { display: \"flex\", gap: \"6px\" } }, [\n h(\n \"button\",\n {\n type: \"button\",\n disabled: safePage <= 0,\n onClick: () => {\n page.value = Math.max(0, safePage - 1);\n },\n style: { padding: \"4px 8px\", borderRadius: \"6px\", border: \"1px solid var(--openui-dashboard-border-strong)\", background: \"var(--openui-dashboard-surface)\", cursor: \"pointer\" },\n },\n \"Prev\",\n ),\n h(\n \"button\",\n {\n type: \"button\",\n disabled: safePage >= totalPages - 1,\n onClick: () => {\n page.value = Math.min(totalPages - 1, safePage + 1);\n },\n style: { padding: \"4px 8px\", borderRadius: \"6px\", border: \"1px solid var(--openui-dashboard-border-strong)\", background: \"var(--openui-dashboard-surface)\", cursor: \"pointer\" },\n },\n \"Next\",\n ),\n ]),\n ],\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const TableComponent = defineComponent({\n name: \"Table\",\n props: tablePropsSchema,\n description:\n \"Sortable, paged table (default pageSize 10). totals adds a totals row for Columns that set total. search is the text to keep matching rows for. groupBy names a column (usually a chip or badge column) to group rows under a heading with their count.\",\n component: TableImpl,\n});\n","import type { Group } from \"../group\";\nimport { ColumnComponent } from \"./Column\";\nimport { TableComponent } from \"./Table\";\n\nexport const tables: Group = {\n components: [TableComponent, ColumnComponent],\n styles: {},\n};\n","import { z } from \"zod/v4\";\n\nexport const markerPropsSchema = z.object({\n label: z.string(),\n at: z.string(),\n});\nexport type MarkerSchemaProps = z.infer<typeof markerPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { markerPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const MarkerComponent = defineComponent({\n name: \"Marker\",\n props: markerPropsSchema,\n description:\n 'An event on a TimeSeries\\' time axis (a deploy, incident or launch) at one of its labels: Marker(\"Deploy v2.4\", \"Oct 12\").',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { SeriesComponent as Series } from \"../Series\";\n\nexport const smallMultiplesPropsSchema = z.object({\n labels: z.array(z.string()),\n series: z.array(Series.ref),\n type: z.enum([\"area\", \"line\"]).optional(),\n format: formatSchema.optional(),\n columns: z.number().optional(),\n});\nexport type SmallMultiplesSchemaProps = z.infer<typeof smallMultiplesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { formatValue } from \"../../../shared/format\";\nimport { nodeList, toNumbers, toStrings } from \"../../../shared/values\";\nimport type { SeriesSchemaProps } from \"../Series/schema\";\nimport { smallMultiplesPropsSchema, type SmallMultiplesSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nfunction sparkPath(values: (number | null)[], min: number, max: number, w: number, hPx: number): string {\n const span = max - min || 1;\n const stepX = values.length > 1 ? w / (values.length - 1) : 0;\n let d = \"\";\n let drawing = false;\n values.forEach((v, i) => {\n if (v === null) {\n drawing = false;\n return;\n }\n const x = i * stepX;\n const y = hPx - ((v - min) / span) * (hPx - 8) - 4;\n d += `${drawing ? \"L\" : \"M\"}${x.toFixed(1)},${y.toFixed(1)} `;\n drawing = true;\n });\n return d.trim();\n}\n\nconst SmallMultiplesImpl = vueComponent({\n name: \"OpenUIDashboardSmallMultiples\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<SmallMultiplesSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const labels = toStrings(p.props.labels);\n const seriesList = nodeList<SeriesSchemaProps>(p.props.series);\n const allNums = seriesList.flatMap((s) => [\n ...toNumbers(s.values),\n ...(compare.enabled.value ? toNumbers(s.previous) : []),\n ]).filter((v): v is number => v !== null);\n const min = allNums.length ? Math.min(0, ...allNums) : 0;\n const max = allNums.length ? Math.max(...allNums) : 1;\n const cols =\n typeof p.props.columns === \"number\" && p.props.columns > 0\n ? `repeat(${Math.round(p.props.columns)}, minmax(0, 1fr))`\n : \"repeat(auto-fit, minmax(170px, 1fr))\";\n const isArea = p.props.type !== \"line\";\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-small-multiples\",\n style: { display: \"grid\", gridTemplateColumns: cols, gap: \"12px\", width: \"100%\" },\n },\n seriesList.map((s, idx) => {\n const vals = toNumbers(s.values);\n const prev = toNumbers(s.previous);\n const latest = [...vals].reverse().find((v) => v !== null) ?? null;\n const color = seriesColor(idx);\n const line = sparkPath(vals, min, max, 160, 56);\n const prevLine = compare.enabled.value && prev.length ? sparkPath(prev, min, max, 160, 56) : \"\";\n return h(\n \"div\",\n {\n key: s.name || idx,\n style: {\n padding: \"10px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n background: \"var(--openui-dashboard-surface)\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\" } }, s.name),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(latest, p.props.format)),\n ]),\n h(\"svg\", { viewBox: \"0 0 160 56\", style: { width: \"100%\", height: \"56px\", display: \"block\" } }, [\n prevLine\n ? h(\"path\", { d: prevLine, fill: \"none\", stroke: MUTED_COLOR, \"stroke-width\": 1.25, \"stroke-dasharray\": \"3 3\" })\n : null,\n isArea && line\n ? h(\"path\", { d: `${line} L160,56 L0,56 Z`, fill: color, opacity: 0.12 })\n : null,\n line ? h(\"path\", { d: line, fill: \"none\", stroke: color, \"stroke-width\": 1.75 }) : null,\n ]),\n labels.length\n ? h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"10px\", color: \"var(--openui-dashboard-ink-muted)\" } }, [\n h(\"span\", null, labels[0] ?? \"\"),\n h(\"span\", null, labels[labels.length - 1] ?? \"\"),\n ])\n : null,\n ],\n );\n }),\n );\n };\n },\n});\n\nexport const SmallMultiplesComponent = defineComponent({\n name: \"SmallMultiples\",\n props: smallMultiplesPropsSchema,\n description:\n 'A grid of small charts, one per series, on one shared scale, for more than 8 series, or when lines would tangle. Same unit across panels; never use it to mix units. type \"area\" (default) or \"line\"; columns fixes the grid (default fits ~180px panels). A Series\\' previous draws the previous period as a grey dashed line in its panel while compare is on.',\n component: SmallMultiplesImpl,\n});\n","import { z } from \"zod/v4\";\nimport { stateSchema } from \"../../../shared/schema\";\n\nexport const statusTimelinePropsSchema = z.object({\n labels: z.array(z.string()),\n periods: z.array(z.string()),\n states: z.array(stateSchema),\n});\nexport type StatusTimelineSchemaProps = z.infer<typeof statusTimelinePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { toGrid } from \"../../../shared/values\";\nimport { statusTimelinePropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst STATE_COLOR: Record<string, string> = {\n good: \"var(--openui-dashboard-good-mark)\",\n warning: \"var(--openui-dashboard-warning-mark)\",\n bad: \"var(--openui-dashboard-bad-mark)\",\n};\n\nexport const StatusTimelineComponent = defineComponent({\n name: \"StatusTimeline\",\n props: statusTimelinePropsSchema,\n description:\n 'Uptime per service over time: one strip per service, one cell per period. labels, periods and states have one entry per cell: its service, its period and its state, as query rows give them: StatusTimeline(s.rows.service, s.rows.day, s.rows.state). A state is \"good\" (up), \"warning\" (degraded) or \"bad\" (down), or null for no data; the legend names them Up, Degraded and Down.',\n component: ({ props, bindSource }) => {\n const grid = toGrid<string>(props.labels, props.periods, props.states);\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-status-timeline\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n [\n ...grid.rows.map((service, rIdx) =>\n h(\"div\", { key: service, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\"div\", { style: { fontSize: \"13px\", fontWeight: 500, color: \"var(--openui-dashboard-ink)\" } }, service),\n h(\n \"div\",\n { style: { display: \"grid\", gridTemplateColumns: `repeat(${Math.max(1, grid.columns.length)}, 1fr)`, gap: \"3px\" } },\n grid.columns.map((period, cIdx) => {\n const state = grid.cells[rIdx]?.[cIdx] ?? null;\n return h(\"div\", {\n key: period,\n title: `${service} · ${period}: ${state ?? \"No data\"}`,\n style: {\n height: \"18px\",\n borderRadius: \"3px\",\n background: state ? (STATE_COLOR[state] ?? \"var(--openui-dashboard-neutral-soft)\") : \"var(--openui-dashboard-neutral-soft)\",\n },\n });\n }),\n ),\n ]),\n ),\n h(\n \"div\",\n { style: { display: \"flex\", gap: \"12px\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n [\n [\"Up\", STATE_COLOR.good],\n [\"Degraded\", STATE_COLOR.warning],\n [\"Down\", STATE_COLOR.bad],\n ].map(([label, color]) =>\n h(\"span\", { key: label, style: { display: \"inline-flex\", alignItems: \"center\", gap: \"4px\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"2px\", background: color, display: \"inline-block\" } }),\n label,\n ]),\n ),\n ),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { stackedSchema } from \"../../../shared/chartHelpers\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nimport { MarkerComponent as Marker } from \"../Marker\";\nimport { ReferenceComponent as Reference } from \"../Reference\";\nimport { SeriesComponent as Series } from \"../Series\";\n\nexport const timeSeriesPropsSchema = z.object({\n labels: z.array(z.string()),\n series: z.array(Series.ref),\n type: z.enum([\"line\", \"area\", \"bar\"]).optional(),\n format: formatSchema.optional(),\n stacked: stackedSchema.optional(),\n references: z.array(Reference.ref).optional(),\n goodWhen: goodWhenSchema.optional(),\n markers: z.array(Marker.ref).optional(),\n curve: z.enum([\"smooth\", \"linear\", \"step\"]).optional(),\n forecastFrom: z.string().optional(),\n});\nexport type TimeSeriesSchemaProps = z.infer<typeof timeSeriesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { AreaChart, BarChart, LineChart } from \"@wodecorp/openui-vue-ui\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { dateLabels, formatValue } from \"../../../shared/format\";\nimport { nodeList, toNumbers, toStrings } from \"../../../shared/values\";\nimport type { MarkerSchemaProps } from \"../Marker/schema\";\nimport type { ReferenceSchemaProps } from \"../Reference/schema\";\nimport type { SeriesSchemaProps } from \"../Series/schema\";\nimport { timeSeriesPropsSchema, type TimeSeriesSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TimeSeriesImpl = vueComponent({\n name: \"OpenUIDashboardTimeSeries\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<TimeSeriesSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const rawLabels = toStrings(p.props.labels);\n const formatter = dateLabels(rawLabels);\n const labels = formatter ? rawLabels.map(formatter) : rawLabels;\n const seriesList = nodeList<SeriesSchemaProps>(p.props.series);\n const references = nodeList<ReferenceSchemaProps>(p.props.references);\n const markers = nodeList<MarkerSchemaProps>(p.props.markers);\n const bind = p.bindSource;\n\n if (!labels.length || !seriesList.length) {\n return h(\n \"div\",\n { ...(bind?.() ?? {}), class: \"openui-dashboard-empty\", style: { color: \"var(--openui-dashboard-ink-muted)\", fontSize: \"13px\", padding: \"24px 0\", textAlign: \"center\" } },\n \"No data for this period\",\n );\n }\n\n const rows = labels.map((label, idx) => {\n const row: Record<string, string | number> = { __x: label };\n for (const s of seriesList) {\n const vals = toNumbers(s.values);\n row[s.name] = vals[idx] ?? 0;\n if (compare.enabled.value && s.previous?.length) {\n const prevVals = toNumbers(s.previous);\n row[`${s.name} (${compare.label.value})`] = prevVals[idx] ?? 0;\n }\n }\n return row;\n });\n\n const palette = seriesList.map((_, i) => seriesColor(i));\n const stacked = p.props.stacked === true || p.props.stacked === \"percent\";\n const chartType = p.props.type ?? \"line\";\n\n const chartVNode =\n chartType === \"bar\"\n ? h(BarChart as never, {\n data: rows,\n categoryKey: \"__x\",\n variant: stacked ? \"stacked\" : \"grouped\",\n customPalette: palette,\n isAnimationActive: false,\n })\n : chartType === \"area\"\n ? h(AreaChart as never, {\n data: rows,\n categoryKey: \"__x\",\n stacked,\n customPalette: palette,\n isAnimationActive: false,\n })\n : h(LineChart as never, {\n data: rows,\n categoryKey: \"__x\",\n customPalette: palette,\n isAnimationActive: false,\n });\n\n return h(\n \"div\",\n {\n ...(bind?.() ?? {}),\n class: \"openui-dashboard-time-series\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", height: \"100%\" },\n },\n [\n h(\"div\", { style: { flex: 1, minHeight: \"200px\" } }, [chartVNode]),\n references.length || markers.length\n ? h(\n \"div\",\n {\n style: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \"8px\",\n fontSize: \"12px\",\n color: \"var(--openui-dashboard-ink-muted)\",\n },\n },\n [\n ...references.map((refItem, idx) =>\n h(\n \"span\",\n {\n key: `ref-${idx}`,\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n background: \"var(--openui-dashboard-neutral-soft)\",\n },\n },\n `${refItem.label}: ${formatValue(refItem.value, p.props.format)}`,\n ),\n ),\n ...markers.map((marker, idx) =>\n h(\n \"span\",\n {\n key: `m-${idx}`,\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n background: \"var(--openui-dashboard-warning-soft)\",\n color: \"var(--openui-dashboard-warning)\",\n },\n },\n `${marker.at} · ${marker.label}`,\n ),\n ),\n ],\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const TimeSeriesComponent = defineComponent({\n name: \"TimeSeries\",\n props: timeSeriesPropsSchema,\n description:\n 'A metric over time. type \"line\" (default) for rates, \"area\" for volumes (stacked for parts of a whole; stacked \"percent\" for each part\\'s share over time), \"bar\" for counts per period. markers flag events on the time axis. curve \"step\" for values that change in steps (prices, limits, plan tiers). forecastFrom is the first projected label: from there the line is dashed and the region shaded.',\n component: TimeSeriesImpl,\n});\n","import type { Group } from \"../group\";\nimport { MarkerComponent } from \"./Marker\";\nimport { ReferenceComponent } from \"./Reference\";\nimport { SeriesComponent } from \"./Series\";\nimport { SmallMultiplesComponent } from \"./SmallMultiples\";\nimport { StatusTimelineComponent } from \"./StatusTimeline\";\nimport { TimeSeriesComponent } from \"./TimeSeries\";\n\nexport const trends: Group = {\n components: [\n TimeSeriesComponent,\n SeriesComponent,\n ReferenceComponent,\n MarkerComponent,\n SmallMultiplesComponent,\n StatusTimelineComponent,\n ],\n styles: {},\n};\n","import { comparison } from \"./comparison\";\nimport { composition } from \"./composition\";\nimport { filters } from \"./filters\";\nimport { flow } from \"./flow\";\nimport type { Group } from \"./group\";\nimport { maps } from \"./maps\";\nimport { metrics } from \"./metrics\";\nimport { relationships } from \"./relationships\";\nimport { tables } from \"./tables\";\nimport { trends } from \"./trends\";\n\nexport const groups: Group[] = [\n metrics,\n filters,\n tables,\n trends,\n comparison,\n composition,\n flow,\n relationships,\n maps,\n];\n\nexport const groupComponents = groups.flatMap((group) => group.components);\n","import { z } from \"zod/v4\";\nimport { groupComponents } from \"./registeredGroups\";\n\nconst LAYOUT = [\"Dashboard\", \"Section\", \"Row\", \"Card\"];\nconst byName = new Map(groupComponents.map((component) => [component.name, component]));\n\nexport const isRegistered = (name: string) => LAYOUT.includes(name) || byName.has(name);\n\nexport const CARD_CONTENT = [\n \"Stat\",\n \"TimeSeries\",\n \"SmallMultiples\",\n \"Bars\",\n \"Dumbbell\",\n \"Distribution\",\n \"Donut\",\n \"Treemap\",\n \"Waterfall\",\n \"Intervals\",\n \"StatusTimeline\",\n \"Flow\",\n \"Scatter\",\n \"GeoMap\",\n \"PointMap\",\n \"Funnel\",\n \"Cohorts\",\n \"Heatmap\",\n \"Table\",\n \"Leaderboard\",\n \"Goal\",\n \"SegmentedBar\",\n \"KeyValues\",\n];\n\nexport const CARD_CONTROLS = [\"ChipFilter\", \"SelectFilter\"];\nexport const SECTION_ROWS = [\"Kpis\"];\nexport const DASHBOARD_CHILDREN = [\"FilterBar\"];\n\nexport const COMPONENT_ORDER = [\n \"Dashboard\",\n \"FilterBar\",\n \"PeriodPicker\",\n \"DateRangeFilter\",\n \"MultiSelectFilter\",\n \"ChipFilter\",\n \"SelectFilter\",\n \"CompareToggle\",\n \"Section\",\n \"Row\",\n \"Kpis\",\n \"Kpi\",\n \"Trend\",\n \"Progress\",\n \"Split\",\n \"States\",\n \"Card\",\n \"Stat\",\n \"TimeSeries\",\n \"Series\",\n \"Reference\",\n \"Marker\",\n \"SmallMultiples\",\n \"Bars\",\n \"Dumbbell\",\n \"Distribution\",\n \"Donut\",\n \"SegmentedBar\",\n \"Treemap\",\n \"Waterfall\",\n \"Intervals\",\n \"StatusTimeline\",\n \"Flow\",\n \"Scatter\",\n \"GeoMap\",\n \"PointMap\",\n \"Funnel\",\n \"Cohorts\",\n \"Heatmap\",\n \"Table\",\n \"Column\",\n \"Leaderboard\",\n \"Goal\",\n \"KeyValues\",\n \"KeyValue\",\n];\n\nexport function refs(names: readonly string[]): z.ZodType[] {\n return names.flatMap((name) => {\n const component = byName.get(name);\n return component ? [component.ref as z.ZodType] : [];\n });\n}\n\nexport function oneOf(schemas: z.ZodType[]): z.ZodType {\n if (schemas.length === 0) return z.never();\n if (schemas.length === 1) return schemas[0]!;\n return z.union(schemas as [z.ZodType, z.ZodType, ...z.ZodType[]]);\n}\n\nexport function inPromptOrder<T extends { name: string }>(components: T[]): T[] {\n const rank = (name: string) => {\n const index = COMPONENT_ORDER.indexOf(name);\n return index === -1 ? COMPONENT_ORDER.length : index;\n };\n return [...components].sort((a, b) => rank(a.name) - rank(b.name));\n}\n","import { z } from \"zod/v4\";\nimport { widthSchema } from \"../../../shared/schema\";\nimport { CARD_CONTENT, CARD_CONTROLS, oneOf, refs } from \"../../slots\";\n\nexport const cardPropsSchema = z.object({\n title: z.string(),\n content: z.array(oneOf(refs(CARD_CONTENT))),\n width: widthSchema.optional(),\n subtitle: z.string().optional(),\n controls: z.array(oneOf(refs(CARD_CONTROLS))).optional(),\n});\nexport type CardSchemaProps = z.infer<typeof cardPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, provide, type PropType } from \"vue\";\nimport { CardControlsContext } from \"../../../shared/cardSlot\";\nimport { cardPropsSchema, type CardSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SPAN_MAP: Record<string, number> = {\n quarter: 3,\n third: 4,\n half: 6,\n \"two-thirds\": 8,\n \"three-quarters\": 9,\n full: 12,\n};\n\nconst CardControlsSlot = vueComponent({\n name: \"OpenUIDashboardCardControls\",\n props: {\n controls: Array,\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n provide(CardControlsContext, true);\n return () =>\n h(\n \"div\",\n { style: { display: \"flex\", alignItems: \"center\", gap: \"8px\", flexWrap: \"wrap\" } },\n [p.renderNode(p.controls)],\n );\n },\n});\n\nexport const CardComponent = defineComponent({\n name: \"Card\",\n props: cardPropsSchema,\n description:\n 'content stacks top to bottom, usually [Stat?, one visual]. Default width \"half\". title says what is plotted; subtitle gives units, period or source (\"Weekly · USD\"). controls are this card\\'s own switches, shown in its header: a ChipFilter or SelectFilter for what the card is broken down by or which metric it plots, e.g. Card(\"Top sources\", [Leaderboard(...)], \"half\", \"Visitors\", [ChipFilter($sourceBy, [{value: \"channel\", label: \"Channel\"}, {value: \"domain\", label: \"Domain\"}])]).',\n component: ({ props, renderNode, bindSource }) => {\n const span = SPAN_MAP[props.width ?? \"half\"] ?? 6;\n return h(\n \"section\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-card\",\n style: {\n gridColumn: `span ${span} / span ${span}`,\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"12px\",\n padding: \"var(--openui-dashboard-space-lg)\",\n borderRadius: \"var(--openui-dashboard-radius)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n boxShadow: \"var(--openui-dashboard-shadow)\",\n minWidth: 0,\n },\n },\n [\n h(\"header\", { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"flex-start\", gap: \"12px\", flexWrap: \"wrap\" } }, [\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\", minWidth: 0 } }, [\n h(\"h3\", { style: { margin: 0, fontSize: \"15px\", fontWeight: 600, color: \"var(--openui-dashboard-ink)\" } }, props.title),\n props.subtitle\n ? h(\"div\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.subtitle)\n : null,\n ]),\n props.controls?.length\n ? h(CardControlsSlot, { controls: props.controls, renderNode })\n : null,\n ]),\n h(\"div\", { style: { flex: 1, display: \"flex\", flexDirection: \"column\", gap: \"10px\", minHeight: 0 } }, [\n renderNode(props.content),\n ]),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { CardComponent } from \"../Card\";\n\nexport const rowPropsSchema = z.object({\n items: z.array(CardComponent.ref),\n height: z\n .union([\n z.literal(240),\n z.literal(320),\n z.literal(400),\n z.literal(480),\n z.literal(560),\n z.literal(640),\n ])\n .optional(),\n});\nexport type RowSchemaProps = z.infer<typeof rowPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { rowPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const RowComponent = defineComponent({\n name: \"Row\",\n props: rowPropsSchema,\n description:\n \"Cards side by side on a 12-column grid; their widths add up to a full row. Every card in a row is the same height, one of 240, 320, 400, 480, 560 or 640 px, and its chart stretches to fill it. Leave height out and the row picks one from its content: 400 for charts, 560 for tables, GeoMap and Flow, 480 for PointMap and Cohorts, 320 for summaries (Stat, KeyValues, SegmentedBar).\",\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-row\",\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(12, minmax(0, 1fr))\",\n gap: \"var(--openui-dashboard-space-md)\",\n minHeight: props.height ? `${props.height}px` : undefined,\n width: \"100%\",\n },\n },\n [renderNode(props.items)],\n ),\n});\n","import { z } from \"zod/v4\";\nimport { oneOf, refs, SECTION_ROWS } from \"../../slots\";\nimport { RowComponent } from \"../Row\";\n\nexport const sectionPropsSchema = z.object({\n title: z.string(),\n rows: z.array(oneOf([...refs(SECTION_ROWS), RowComponent.ref as z.ZodType])),\n description: z.string().optional(),\n});\nexport type SectionSchemaProps = z.infer<typeof sectionPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { sectionPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SectionComponent = defineComponent({\n name: \"Section\",\n props: sectionPropsSchema,\n description:\n 'A titled group of Kpis strips and Rows of Cards. Pass \"\" as title for the lead KPI section.',\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"section\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-section\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"var(--openui-dashboard-space-md)\", width: \"100%\" },\n },\n [\n props.title || props.description\n ? h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\" } }, [\n props.title\n ? h(\"h2\", { style: { margin: 0, fontSize: \"17px\", fontWeight: 650, color: \"var(--openui-dashboard-ink)\" } }, props.title)\n : null,\n props.description\n ? h(\"p\", { style: { margin: 0, fontSize: \"13px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.description)\n : null,\n ])\n : null,\n renderNode(props.rows),\n ],\n ),\n});\n","import { z } from \"zod/v4\";\nimport { DASHBOARD_CHILDREN, oneOf, refs } from \"../../slots\";\nimport { SectionComponent } from \"../Section\";\n\nexport const dashboardPropsSchema = z.object({\n children: z.array(oneOf([...refs(DASHBOARD_CHILDREN), SectionComponent.ref as z.ZodType])),\n});\nexport type DashboardSchemaProps = z.infer<typeof dashboardPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { DashboardTheme } from \"../../../components/ThemeProvider\";\nimport { CompareProvider } from \"../../../shared/compare\";\nimport { FilterRegistryProvider } from \"../../../shared/filterRegistry\";\nimport { dashboardPropsSchema, type DashboardSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst DashboardImpl = vueComponent({\n name: \"OpenUIDashboardRoot\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<DashboardSchemaProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n return () =>\n h(DashboardTheme, null, {\n default: () =>\n h(CompareProvider, null, {\n default: () =>\n h(FilterRegistryProvider, null, {\n default: () =>\n h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-root\",\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"var(--openui-dashboard-space-xl)\",\n color: \"var(--openui-dashboard-ink)\",\n fontFamily: 'var(--openui-font-body, \"Inter\", -apple-system, BlinkMacSystemFont, sans-serif)',\n width: \"100%\",\n },\n },\n [p.renderNode(p.props.children)],\n ),\n }),\n }),\n });\n },\n});\n\nexport const DashboardComponent = defineComponent({\n name: \"Dashboard\",\n props: dashboardPropsSchema,\n description: \"The root.\",\n component: DashboardImpl,\n});\n","import type { Group } from \"../group\";\nimport { CardComponent } from \"./Card\";\nimport { DashboardComponent } from \"./Dashboard\";\nimport { RowComponent } from \"./Row\";\nimport { SectionComponent } from \"./Section\";\n\nexport const structure: Group = {\n components: [DashboardComponent, SectionComponent, RowComponent, CardComponent],\n styles: {},\n};\n","import { groups } from \"./registeredGroups\";\nimport { structure } from \"./structure\";\n\nexport * from \"./slots\";\nexport const componentGroups = [structure, ...groups];\nexport const groupComponents = componentGroups.flatMap((group) => group.components);\n","/*\n * Short example Dashboard programs for the prompt. They show the things a model most often gets\n * wrong: root first, the story order (a lead Section with one Kpis strip, then Rows of Cards),\n * raw numbers with a Format, previous values beside current ones, and a filter whose $variable\n * changes the data.\n */\n\n/** Written-in data keyed by a period filter, so the filter changes every number it should. */\nconst FILTERED_EXAMPLE = `root = Dashboard([filters, lead, trends])\n$period = \"30d\"\nfilters = FilterBar([PeriodPicker($period, [{value: \"7d\", label: \"7D\"}, {value: \"30d\", label: \"30D\"}]), CompareToggle(\"Previous period\", true)])\nlead = Section(\"\", [Kpis([Kpi(\"Revenue\", k[$period].rev, \"currency-compact\", k[$period].revPrev), Kpi(\"Orders\", k[$period].orders, \"number\", k[$period].ordersPrev), Kpi(\"Average order\", k[$period].aov, \"currency-precise\", k[$period].aovPrev)])])\ntrends = Section(\"Trends\", [Row([Card(\"Revenue\", [TimeSeries(t[$period].labels, [Series(\"Revenue\", t[$period].values, t[$period].previous)], \"area\", \"currency-compact\")], \"two-thirds\", \"USD\"), Card(\"Revenue by channel\", [Donut([\"Online\", \"Retail\", \"Wholesale\"], [228000, 131000, 53600], \"currency-compact\", \"Total\")], \"third\", \"USD\")])])\nk = {\"7d\": {rev: 96400, revPrev: 91200, orders: 1284, ordersPrev: 1190, aov: 75.08, aovPrev: 76.64}, \"30d\": {rev: 412600, revPrev: 398200, orders: 5460, ordersPrev: 5310, aov: 75.57, aovPrev: 74.99}}\nt = {\"7d\": {labels: [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"], values: [12100, 13400, 12800, 14200, 15100, 15600, 13200], previous: [11800, 12600, 12900, 13100, 14000, 14600, 12200]}, \"30d\": {labels: [\"Oct 5\", \"Oct 12\", \"Oct 19\", \"Oct 26\"], values: [99000, 101000, 102400, 110200], previous: [97200, 99800, 98600, 102600]}}`;\n\n/** No filters: a breakdown, a ranking where lower is better, and a detail table. */\nconst BREAKDOWN_EXAMPLE = `root = Dashboard([lead, breakdown, detail])\nlead = Section(\"\", [Kpis([Kpi(\"Open tickets\", 184, \"number\", 212, \"down\"), Kpi(\"Resolved this week\", 96, \"number\", 88), Kpi(\"Satisfaction\", 94.2, \"percent\", 92.8)])])\nbreakdown = Section(\"Where tickets come from\", [Row([Card(\"Tickets by product area\", [Bars([\"Billing\", \"Login\", \"Reports\", \"Integrations\", \"Mobile app\"], [Series(\"Tickets\", [58, 44, 37, 29, 16], [64, 51, 30, 33, 34])], \"number\")], \"half\", \"Open · this week vs last\"), Card(\"Slowest queues\", [Leaderboard([\"Enterprise\", \"Billing\", \"Onboarding\", \"General\"], [9.4, 6.1, 4.8, 2.2], {type: \"number\", suffix: \" h\"}, [8.2, 6.9, 5.5, 2.4], \"down\")], \"half\", \"Median hours to first reply\")])])\ndetail = Section(\"Detail\", [Row([Card(\"Agents\", [Table([Column(\"Agent\", [\"Priya\", \"Marco\", \"Aiko\", \"Sam\"], \"primary\"), Column(\"Resolved\", [31, 27, 22, 16], \"number\", \"number\"), Column(\"Satisfaction\", [97.1, 94.8, 93.2, 90.4], \"number\", \"percent\"), Column(\"Status\", [\"On track\", \"On track\", \"On track\", \"Behind\"], \"badge\", null, {\"On track\": \"good\", \"Behind\": \"warning\"})])], \"full\")])])`;\n\n/**\n * Live data from a tool that only takes a query string: the date filter's $variable becomes\n * the query's date bounds, for a preset key and for a custom \"from..to\" range alike, and the\n * period before is loaded for the Kpis' previous. A tool that takes the range itself gets the\n * $variable as an argument. The tool names and the SQL stand in for the host's own.\n */\nconst LIVE_EXAMPLE = `root = Dashboard([filters, lead, trends, detail])\n$range = \"30d\"\nstart = days[$range] ? \"(current_date - \" + days[$range] + \")\" : \"split_part('\" + $range + \"', '..', 1)::date\"\nend = days[$range] ? \"current_date\" : \"split_part('\" + $range + \"', '..', 2)::date\"\nduring = \"day >= \" + start + \" AND day <= \" + end\nbefore = \"day >= \" + start + \" - (\" + end + \" - \" + start + \") - 1 AND day < \" + start\ntotals = Query(\"run_sql\", {query: \"SELECT sum(revenue) AS revenue, sum(orders) AS orders FROM daily_sales WHERE \" + during}, {rows: []})\nearlier = Query(\"run_sql\", {query: \"SELECT sum(revenue) AS revenue, sum(orders) AS orders FROM daily_sales WHERE \" + before}, {rows: []})\nbyDay = Query(\"run_sql\", {query: \"SELECT day, revenue FROM daily_sales WHERE \" + during + \" ORDER BY day\"}, {rows: []})\nbyChannel = Query(\"sales_by_channel\", {range: $range}, {rows: []})\nnow = @First(totals.rows)\nprev = @First(earlier.rows)\nfilters = FilterBar([DateRangeFilter($range, [{value: \"7d\", label: \"Last 7 days\"}, {value: \"30d\", label: \"Last 30 days\"}, {value: \"90d\", label: \"Last 90 days\"}]), CompareToggle(\"Previous period\", true)])\nlead = Section(\"\", [Kpis([Kpi(\"Revenue\", now.revenue, \"currency-compact\", prev.revenue), Kpi(\"Orders\", now.orders, \"number\", prev.orders)])])\ntrends = Section(\"Trends\", [Row([Card(\"Revenue by day\", [TimeSeries(byDay.rows.day, [Series(\"Revenue\", byDay.rows.revenue)], \"area\", \"currency-compact\")], \"full\", \"USD\")])])\ndetail = Section(\"Detail\", [Row([Card(\"Channels\", [Table([Column(\"Channel\", byChannel.rows.channel, \"primary\"), Column(\"Revenue\", byChannel.rows.revenue, \"number\", \"currency\"), Column(\"Orders\", byChannel.rows.orders, \"number\", \"number\")], 10, false)], \"full\")])])\ndays = {\"7d\": 7, \"30d\": 30, \"90d\": 90}`;\n\n/**\n * One list, live data first. The prompt builder appends `examples` and `toolExamples` alike, and\n * OpenUI Cloud forwards only `examples`, so a second list would not reach the model there.\n */\nexport const examples: string[] = [LIVE_EXAMPLE, FILTERED_EXAMPLE, BREAKDOWN_EXAMPLE];\n","import type { PromptOptions } from \"@wodecorp/openui-vue-lang\";\nimport { examples } from \"./examples\";\n\n// Rules, examples and promptOptions sit apart from the prompt groups, which read the registered\n// components: a server route that imports only promptOptions then loads no component code, so\n// nothing calls React's client APIs (createContext) where they don't exist.\n\n/**\n * Rules for generating a dashboard, beyond the notes on each component group. The base\n * openui-lang prompt is written for any library and names components this one doesn't have\n * (Button, Select, forms); these rules say what a dashboard is made of instead, and cover the\n * mistakes that make a card come out empty.\n */\nexport const additionalRules: string[] = [\n \"Dashboard holds an optional FilterBar first, then Sections. A Section holds Kpis strips and Rows. A Row holds Cards. Every chart, map, Table, Stat, Goal and KeyValues goes inside a Card's content, never straight into a Row or a Section.\",\n \"Use only the components listed under Component Signatures. This library has no Button, Select, SelectItem, Input, Form, FormControl, Tabs or text and markdown blocks, whatever other sections of these instructions mention. A choice the reader makes is a filter. Words that explain a number go in a Card's subtitle or a Section's description.\",\n \"A dashboard only shows data. Never write a Mutation, a form or a refresh button.\",\n \"Arrays that go together have the same length and order: labels with values, a Series' values with its previous, every Column of one Table. Never write null for a value a component requires, such as a KeyValue's value: leave that row or item out.\",\n \"Previous values are the same measure for the period before, in the same unit. With live data and no tool that returns them, load them with a second Query for the previous range. When you don't have them, leave them out: never repeat the current values or invent a change.\",\n \"Without a data tool, write realistic, professional data into the program, and use only PeriodPicker, ChipFilter, SelectFilter and CompareToggle as filters. Give the data an entry for every option value, the default included. DateRangeFilter and MultiSelectFilter need a data tool, because written values can't follow a free date range or several choices at once.\",\n \"With a data tool, load every number with Query. Pass each filter's $variable in the arguments of every Query it should change. Give each Query a default with the same shape as its result, with empty lists and no made-up numbers ({rows: []} for a tool that returns {rows: [...]}), and read its columns with a pluck: sales.rows.revenue. Sum or count rows with the built-in functions for headline numbers: @Sum(sales.rows.revenue).\",\n 'A Goal needs a target above 0. For a limit of zero, such as critical bugs or failed checks, show the count as a Kpi with goodWhen \"down\".',\n 'A filter is connected only through its first argument, value, which takes a $variable: PeriodPicker($period, [...]), ChipFilter($by, [...], \"Group by\"). A literal there (\"30d\") leaves the filter disconnected, so clicking it changes nothing. Put the starting value in the declaration: $period = \"30d\".',\n \"Add a filter only when something can follow it. A date or period filter needs a data tool that takes a date, period or range argument; when no tool does (current counts such as stars, open issues or a latest version), add no date filter, and show the previous period with previous values or a comparison card instead. A filter whose $variable nothing reads does nothing: leave it out, and with no filters leave the FilterBar out.\",\n \"Only one FilterBar is drawn, the one listed first in Dashboard([...]): put every dashboard-wide filter in it.\",\n 'When a filter sets the period, never write a period (\"Last 30 days\") in a title, subtitle or hint.',\n 'A pluck on a list of rows gives one value per row. @Filter(pkgs.rows, \"name\", \"==\", \"react\").downloads is a list holding that row\\'s list, not its numbers, so @Sum of it is 0 and a chart of it is empty. To read one row, take it first, then its fields: react = @First(@Filter(pkgs.rows, \"name\", \"==\", \"react\")), then react.downloads. The same for a result of one row: totals = @First(sales.rows), then Kpi(\"Revenue\", totals.revenue, \"currency-compact\").',\n \"Write the statements in this order: root, $variables, Queries and the strings they are built from, the FilterBar and Sections, then written-in data last.\",\n];\n\n/**\n * Prompt options for the dashboard library: pass to `library.prompt(promptOptions)`, or spread\n * `examples` and `additionalRules` into your own options beside your own preamble.\n */\nexport const promptOptions: PromptOptions = {\n preamble: \"You are generating an openui-lang dashboard.\",\n examples,\n additionalRules,\n bindings: true,\n};\n","import type { ComponentGroup } from \"@wodecorp/openui-vue-lang\";\nimport { FORMAT_PRESETS } from \"../../shared/format\";\nimport { WIDTHS } from \"../../shared/schema\";\nimport { isRegistered } from \"../defineComponents\";\n\n/**\n * His prompt groups and notes (library.ts), written out in full once. A group shows only the\n * components registered so far and is left out while it has none, and a note that names\n * components not registered yet waits for them. Once every group ticket has landed the prompt\n * is his, word for word, and no group ticket needs to edit this file.\n */\ntype Note = string | { text: string; needs: string[] } | (() => string | null);\n\ntype PromptGroup = { name: string; components: string[]; notes: Note[] };\n\nconst all = (names: string[]) => names.every(isRegistered);\n\n/** \"Give previous-period values wherever they exist (…)\": lists only components that exist. */\nfunction previousValuesNote() {\n const takers = [\"Kpi\", \"Stat\", \"Series\", \"Funnel\", \"Leaderboard\", \"GeoMap\"].filter(isRegistered);\n const toggle = isRegistered(\"CompareToggle\") ? \" and add a CompareToggle\" : \"\";\n return `Give previous-period values wherever they exist (${takers.join(\", \")})${toggle}.`;\n}\n\n/** Story order: his text once trends and tables exist; until then, without them. */\nfunction storyOrderNote() {\n const tail = all([\"TimeSeries\", \"Table\"])\n ? \"then trends, then breakdowns, then detail tables\"\n : \"then Rows of Cards\";\n return `Story order: a lead Section with one Kpis strip of 3–6 headline numbers, ${tail}. Don't size Kpis: the strip lays them out. A number that needs a chart beside it is a Card with a Stat.`;\n}\n\nconst PROMPT_GROUPS: PromptGroup[] = [\n {\n name: \"Structure\",\n components: [\"Dashboard\", \"Section\", \"Row\", \"Card\"],\n notes: [\n `Shared argument types: Format = ${FORMAT_PRESETS.map((preset) => `\"${preset}\"`).join(\" | \")}, or {type, currency?, decimals?, prefix?, suffix?} to override, e.g. {type: \"number\", suffix: \" seats\"}. Width = ${WIDTHS.map((width) => `\"${width}\"`).join(\" | \")}. GoodWhen = \"up\" | \"down\" | \"neutral\": which direction of change is good news.`,\n 'Numbers are raw with a Format; never formatted strings like \"$1.2K\" or \"12%\". percent values are already percentages (18.4 = 18.4%); ratio is for fractions; duration is seconds, ms milliseconds, days days. A Kpi\\'s text value is for words (a plan, a status, a version), never a number.',\n {\n text: \"A pluck reads one column across a list of rows: where a Query result r holds its rows as objects in r.rows, r.rows.day is every row's day, so TimeSeries(r.rows.day, [Series(\\\"Events\\\", r.rows.events)]). Read each tool's result in the shape that tool describes, and ask a query for exactly the rows and columns a card shows.\",\n needs: [\"TimeSeries\", \"Series\"],\n },\n 'To skip an optional argument before one you need, pass null: Kpi(\"Signups\", 2227, \"number\", null, null, \"New accounts\").',\n storyOrderNote,\n {\n text: \"Charts are grouped below by the question they answer: Trends (over time), Comparison (across categories), Composition (part of a whole), Flow (between stages), Relationships (two measures or axes), Maps (by place). Pick the group by the question, then the chart. One unit per chart (no dual axes); split different units into separate charts.\",\n needs: [\"TimeSeries\", \"Bars\", \"Donut\", \"Funnel\", \"Scatter\", \"GeoMap\"],\n },\n ],\n },\n {\n name: \"Filters\",\n components: [\n \"FilterBar\",\n \"PeriodPicker\",\n \"DateRangeFilter\",\n \"ChipFilter\",\n \"SelectFilter\",\n \"MultiSelectFilter\",\n \"SearchFilter\",\n \"CompareToggle\",\n ],\n notes: [\n \"One FilterBar first, for dashboard-wide filters only: date filter first, then segments several cards read (plan, region), then CompareToggle.\",\n \"A switch that changes only one card, such as what it's broken down by (channel or referring domain; device, browser or OS) or which metric it plots, belongs in that Card's controls, not the FilterBar. Its $variable feeds only that card's Query or data.\",\n \"A filter must change what is shown, but only cards whose numbers depend on it read it; point-in-time or cross-segment cards can ignore it. With data written into the program, key values by option: data[$period].mrr (nest keys for two filters: data[$period][$channel].signups).\",\n ],\n },\n {\n name: \"Metrics\",\n components: [\n \"Kpis\",\n \"Kpi\",\n \"Trend\",\n \"Progress\",\n \"Split\",\n \"States\",\n \"Stat\",\n \"KeyValues\",\n \"KeyValue\",\n \"Goal\",\n ],\n notes: [\n previousValuesNote,\n 'Set goodWhen \"down\" for metrics where lower is better: costs, CAC, churn, latency, errors.',\n ],\n },\n {\n name: \"Tables\",\n components: [\"Table\", \"Column\"],\n notes: [\"Table for several measures per row; Columns pick how each cell draws.\"],\n },\n // Charts are grouped by the question they answer, the same groups as the library's pages.\n {\n name: \"Trends\",\n components: [\"TimeSeries\", \"Series\", \"Reference\", \"Marker\", \"SmallMultiples\", \"StatusTimeline\"],\n notes: [\n 'How a measure moves over time → TimeSeries (events → markers; share over time → stacked \"percent\"; projections → forecastFrom). Many series of one measure → SmallMultiples. Up, degraded or down per service over time → StatusTimeline.',\n ],\n },\n {\n name: \"Comparison\",\n components: [\"Bars\", \"Leaderboard\", \"Dumbbell\", \"Distribution\", \"Intervals\"],\n notes: [\n \"Values across categories → Bars (variance around zero → diverging). A ranked top-N list to read → Leaderboard. Before → after per category → Dumbbell. Spread of values → Distribution. Estimates with uncertainty → Intervals.\",\n ],\n },\n {\n name: \"Composition\",\n components: [\"Donut\", \"SegmentedBar\", \"Treemap\", \"Waterfall\"],\n notes: [\n \"Part of a whole → Donut when the total is the headline, SegmentedBar for a compact strip; both take up to 8 parts. Treemap for many or nested parts. How a total moved → Waterfall.\",\n ],\n },\n {\n name: \"Flow\",\n components: [\"Funnel\", \"Flow\"],\n notes: [\n \"Ordered conversion steps → Funnel; start it at the first meaningful step (signup started), not raw traffic, and show traffic as a Kpi. Paths between stages → Flow.\",\n ],\n },\n {\n name: \"Relationships\",\n components: [\"Scatter\", \"Heatmap\", \"Cohorts\"],\n notes: [\n \"Two measures per item → Scatter. Magnitude across two categorical axes → Heatmap. Retention by cohort → Cohorts.\",\n ],\n },\n {\n name: \"Maps\",\n components: [\"GeoMap\", \"PointMap\"],\n notes: [\"By country or US state → GeoMap. At places such as stores or cities → PointMap.\"],\n },\n];\n\nfunction noteText(note: Note): string | null {\n if (typeof note === \"string\") return note;\n if (typeof note === \"function\") return note();\n return all(note.needs) ? note.text : null;\n}\n\nexport { examples } from \"./examples\";\nexport { additionalRules, promptOptions } from \"./promptOptions\";\n\n/** The prompt groups for the components registered so far. */\nexport function promptGroups(): ComponentGroup[] {\n return PROMPT_GROUPS.flatMap((group) => {\n const components = group.components.filter(isRegistered);\n if (!components.length) return [];\n const notes = group.notes.map(noteText).filter((note): note is string => note !== null);\n return [{ name: group.name, components, notes }];\n });\n}\n","import { createLibrary, tagSchemaId, type ComponentGroup, type DefinedComponent, type Library } from \"@wodecorp/openui-vue-lang\";\nimport { formatSchema } from \"../shared/format\";\nimport { goodWhenSchema, widthSchema } from \"../shared/schema\";\nimport { groupComponents, inPromptOrder } from \"./defineComponents\";\nimport { promptGroups } from \"./prompt-options\";\n\ntagSchemaId(formatSchema, \"Format\");\ntagSchemaId(widthSchema, \"Width\");\ntagSchemaId(goodWhenSchema, \"GoodWhen\");\n\nexport { additionalRules, examples, promptOptions } from \"./prompt-options\";\n\nexport const dashboardComponents: DefinedComponent<any>[] = inPromptOrder(groupComponents);\n\nexport const componentGroups: ComponentGroup[] = promptGroups();\n\nexport const library: Required<Library> = createLibrary({\n root: \"Dashboard\",\n components: dashboardComponents,\n componentGroups,\n});\n"],"mappings":";;;;;;;AAAA,MAAa,oBAAoB;CAC/B,WAAW;CACX,cAAc;CACd,eAAe;CACf,MAAM;CACN,SAAS;CACT,eAAe;CACf,QAAQ;CACR,cAAc;CACd,KAAK;CACL,cAAc;CACd,UAAU;CACV,MAAM;CACN,QAAQ;CACR,WAAW;CACX,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,WAAW;CACX,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,UAAU;CACV,SAAS;CACT,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,SAAS;CACT,QAAQ;CACR,QAAQ;CACR,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,MAAM;CACN,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,SAAS;CACT,MAAM;CACN,UAAU;CACV,KAAK;CACL,SAAS;CACT,SAAS;CACT,aAAa;CACb,aAAa;CACb,MAAM;CACN,aAAa;CACb,SAAS;CACT,QAAQ;CACR,UAAU;CACV,UAAU;CACV,SAAS;CACT,SAAS;C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AAM,WAAW,OAAO,YAAY;EACvD,IAAI,CAAC,WAAW,QAAQ,OAAO,CAAC;EAChC,MAAM,QAAQ,MAAM,MAAM,IAAI,QAAQ,CAAC,CAAC,QAAQ,SAAyB,SAAS,IAAI;EACtF,OAAO,CAAC;GAAE,MAAM,MAAM;GAAM;GAAY;EAAM,CAAC;CACjD,CAAC;AACH;;ACnJA,YAAY,cAAc,QAAQ;AAClC,YAAY,aAAa,OAAO;AAChC,YAAY,gBAAgB,UAAU;AAItC,MAAa,sBAA+C,cAAc,eAAe;AAEzF,MAAa,kBAAoC,aAAa;AAE9D,MAAa,UAA6B,cAAc;CACtD,MAAM;CACN,YAAY;CACZ;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["ComponentsThemeProvider","defineComponent","defineComponent","vueComponent","defineComponent","defineComponent","defineComponent","defineComponent","TONE_COLOR","defineComponent","defineComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","vueComponent","defineComponent","TONE_COLOR","defineComponent","defineComponent","defineComponent","defineComponent","defineComponent","defineComponent","TONE_COLOR","vueComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","defineComponent","Series","vueComponent","defineComponent","defineComponent","Series","Reference","Marker","vueComponent","defineComponent","groupComponents","groupComponents","vueComponent","defineComponent","defineComponent","defineComponent","vueComponent","defineComponent","componentGroups"],"sources":["../src/components/defaultThemes.ts","../src/components/ThemeProvider.ts","../src/shared/format.ts","../src/shared/schema.ts","../src/shared/colors.ts","../src/shared/compare.ts","../src/shared/values.ts","../src/shared/chartHelpers.ts","../src/lib/trends/Reference/schema.ts","../src/lib/trends/Reference/index.ts","../src/lib/trends/Series/schema.ts","../src/lib/trends/Series/index.ts","../src/lib/comparison/Bars/schema.ts","../src/lib/comparison/Bars/index.ts","../src/lib/comparison/Distribution/schema.ts","../src/lib/comparison/Distribution/index.ts","../src/lib/comparison/Dumbbell/schema.ts","../src/lib/comparison/Dumbbell/index.ts","../src/lib/comparison/Intervals/schema.ts","../src/lib/comparison/Intervals/index.ts","../src/lib/comparison/Leaderboard/schema.ts","../src/lib/comparison/Leaderboard/index.ts","../src/lib/comparison/index.ts","../src/shared/parts.ts","../src/lib/composition/Donut/schema.ts","../src/lib/composition/Donut/index.ts","../src/lib/composition/SegmentedBar/schema.ts","../src/lib/composition/SegmentedBar/index.ts","../src/lib/composition/Treemap/schema.ts","../src/lib/composition/Treemap/index.ts","../src/lib/composition/Waterfall/schema.ts","../src/lib/composition/Waterfall/index.ts","../src/lib/composition/index.ts","../src/shared/cardSlot.ts","../src/shared/filterRegistry.ts","../src/lib/filters/optionSchema.ts","../src/lib/filters/ChipFilter/schema.ts","../src/lib/filters/ChipFilter/index.ts","../src/lib/filters/styledSelect.ts","../src/lib/filters/CompareToggle/schema.ts","../src/lib/filters/CompareToggle/index.ts","../src/lib/filters/DateRangeFilter/schema.ts","../src/lib/filters/DateRangeFilter/index.ts","../src/lib/filters/MultiSelectFilter/schema.ts","../src/lib/filters/MultiSelectFilter/index.ts","../src/lib/filters/PeriodPicker/schema.ts","../src/lib/filters/PeriodPicker/index.ts","../src/lib/filters/SelectFilter/schema.ts","../src/lib/filters/SelectFilter/index.ts","../src/lib/filters/FilterBar/schema.ts","../src/lib/filters/FilterBar/index.ts","../src/lib/filters/index.ts","../src/lib/flow/Flow/schema.ts","../src/lib/flow/Flow/index.ts","../src/lib/flow/Funnel/schema.ts","../src/lib/flow/Funnel/index.ts","../src/lib/flow/index.ts","../src/shared/atlas.ts","../src/lib/maps/GeoMap/schema.ts","../src/lib/maps/GeoMap/index.ts","../src/lib/maps/PointMap/schema.ts","../src/lib/maps/PointMap/index.ts","../src/lib/maps/index.ts","../src/lib/metrics/Goal/schema.ts","../src/lib/metrics/Goal/index.ts","../src/lib/metrics/KeyValue/schema.ts","../src/lib/metrics/KeyValue/index.ts","../src/lib/metrics/KeyValues/schema.ts","../src/lib/metrics/KeyValues/index.ts","../src/lib/metrics/Progress/schema.ts","../src/lib/metrics/Progress/index.ts","../src/lib/metrics/Split/schema.ts","../src/lib/metrics/Split/index.ts","../src/lib/metrics/States/schema.ts","../src/lib/metrics/States/index.ts","../src/lib/metrics/Trend/schema.ts","../src/lib/metrics/Trend/index.ts","../src/lib/metrics/Kpi/schema.ts","../src/lib/metrics/Kpi/index.ts","../src/lib/metrics/Kpis/schema.ts","../src/lib/metrics/Kpis/index.ts","../src/lib/metrics/Stat/schema.ts","../src/lib/metrics/Stat/index.ts","../src/lib/metrics/index.ts","../src/lib/relationships/Cohorts/schema.ts","../src/lib/relationships/Cohorts/index.ts","../src/lib/relationships/Heatmap/schema.ts","../src/lib/relationships/Heatmap/index.ts","../src/lib/relationships/Scatter/schema.ts","../src/lib/relationships/Scatter/index.ts","../src/lib/relationships/index.ts","../src/lib/tables/Column/schema.ts","../src/lib/tables/Column/index.ts","../src/lib/tables/Table/schema.ts","../src/lib/tables/Table/index.ts","../src/lib/tables/index.ts","../src/lib/trends/Marker/schema.ts","../src/lib/trends/Marker/index.ts","../src/lib/trends/SmallMultiples/schema.ts","../src/lib/trends/SmallMultiples/index.ts","../src/lib/trends/StatusTimeline/schema.ts","../src/lib/trends/StatusTimeline/index.ts","../src/lib/trends/TimeSeries/schema.ts","../src/lib/trends/TimeSeries/index.ts","../src/lib/trends/index.ts","../src/lib/registeredGroups.ts","../src/lib/slots.ts","../src/lib/structure/Card/schema.ts","../src/lib/structure/Card/index.ts","../src/lib/structure/Row/schema.ts","../src/lib/structure/Row/index.ts","../src/lib/structure/Section/schema.ts","../src/lib/structure/Section/index.ts","../src/lib/structure/Dashboard/schema.ts","../src/lib/structure/Dashboard/index.ts","../src/lib/structure/index.ts","../src/lib/defineComponents.ts","../src/lib/prompt-options/examples.ts","../src/lib/prompt-options/promptOptions.ts","../src/lib/prompt-options/index.ts","../src/lib/library.ts"],"sourcesContent":["export const defaultLightTheme = {\n sheenPeak: \"2.5%\",\n skelLineTone: \"3.5%\",\n skelBlockTone: \"2.5%\",\n page: \"#ffffff\",\n surface: \"#ffffff\",\n surfaceSubtle: \"rgba(0, 0, 0, 0.04)\",\n border: \"rgba(0, 0, 0, 0.06)\",\n borderStrong: \"rgba(0, 0, 0, 0.1)\",\n ink: \"#0d0d0d\",\n inkSecondary: \"rgba(13, 13, 13, 0.64)\",\n inkMuted: \"rgba(13, 13, 13, 0.52)\",\n grid: \"#f1f1f1\",\n accent: \"#0e0e0e\",\n accentInk: \"#ffffff\",\n series1: \"#6155e8\",\n series2: \"#16b76f\",\n series3: \"#ffc700\",\n series4: \"#df507b\",\n series5: \"#3894ff\",\n series6: \"#ff8000\",\n series7: \"#a0522d\",\n series8: \"#00cbd9\",\n mutedMark: \"#b4b4b4\",\n seq1: \"#f5f6ff\",\n seq2: \"#d9ddff\",\n seq3: \"#c0c5f9\",\n seq4: \"#a7acf1\",\n seq5: \"#9094e8\",\n seq6: \"#797cdd\",\n seq7: \"#6563d2\",\n seq8: \"#5248c6\",\n seq9: \"#4229ba\",\n seqInk1: \"var(--openui-dashboard-ink)\",\n seqInk2: \"var(--openui-dashboard-ink)\",\n seqInk3: \"var(--openui-dashboard-ink)\",\n seqInk4: \"var(--openui-dashboard-ink)\",\n seqInk5: \"var(--openui-dashboard-ink)\",\n seqInk6: \"var(--openui-dashboard-ink)\",\n seqInk7: \"#ffffff\",\n seqInk8: \"#ffffff\",\n seqInk9: \"#ffffff\",\n areaWash: \"0.09\",\n areaDot: \"0.4\",\n areaStackTop: \"0.55\",\n areaStackBottom: \"0.35\",\n areaStackTex: \"0.5\",\n texTint: \"0.1\",\n texInk: \"0.35\",\n barInk: \"0.16\",\n div1: \"#b32f5b\",\n div2: \"#ca647e\",\n div3: \"#dd92a2\",\n div4: \"#eebfc9\",\n div5: \"#e7e7e7\",\n div6: \"#c6caf2\",\n div7: \"#9fa4e5\",\n div8: \"#7b7ed7\",\n div9: \"#5a56c7\",\n divInk1: \"#ffffff\",\n divInk2: \"var(--openui-dashboard-ink)\",\n divInk3: \"var(--openui-dashboard-ink)\",\n divInk4: \"var(--openui-dashboard-ink)\",\n divInk5: \"var(--openui-dashboard-ink)\",\n divInk6: \"var(--openui-dashboard-ink)\",\n divInk7: \"var(--openui-dashboard-ink)\",\n divInk8: \"var(--openui-dashboard-ink)\",\n divInk9: \"#ffffff\",\n good: \"#079455\",\n goodMark: \"#16b76f\",\n bad: \"#c82c37\",\n badMark: \"#d03348\",\n warning: \"#cd8200\",\n warningSoft: \"rgba(255, 199, 0, 0.12)\",\n warningMark: \"#ffc700\",\n info: \"#317ce6\",\n neutralSoft: \"rgba(0, 0, 0, 0.04)\",\n mapLand: \"#efefef\",\n radius: \"16px\",\n radiusMd: \"12px\",\n radiusSm: \"8px\",\n spaceXs: \"8px\",\n spaceSm: \"12px\",\n spaceMd: \"16px\",\n spaceLg: \"20px\",\n spaceXl: \"24px\",\n space2xl: \"36px\",\n shadow: \"0 3px 8px -3px rgba(0, 0, 0, 0.04), 0 1px 2px -2px rgba(0, 0, 0, 0.02)\",\n shadowPop: \"0 6px 12px -6px rgba(0, 0, 0, 0.1), 0 10px 40px -8px rgba(0, 0, 0, 0.08)\",\n};\n\nexport type Theme = { [K in keyof typeof defaultLightTheme]?: string };\n\nexport const defaultDarkTheme: Required<Theme> = {\n sheenPeak: \"3.5%\",\n skelLineTone: \"5%\",\n skelBlockTone: \"3.5%\",\n page: \"#141414\",\n surface: \"#151515\",\n surfaceSubtle: \"rgba(255, 255, 255, 0.04)\",\n border: \"rgba(255, 255, 255, 0.04)\",\n borderStrong: \"rgba(255, 255, 255, 0.12)\",\n ink: \"#fafafa\",\n inkSecondary: \"rgba(250, 250, 250, 0.62)\",\n inkMuted: \"rgba(250, 250, 250, 0.5)\",\n grid: \"rgba(255, 255, 255, 0.04)\",\n accent: \"#fafafa\",\n accentInk: \"#0d0d0d\",\n series1: \"#7b72f2\",\n series2: \"#16b76f\",\n series3: \"#ffc700\",\n series4: \"#df507b\",\n series5: \"#3894ff\",\n series6: \"#ff8000\",\n series7: \"#b8693a\",\n series8: \"#00cbd9\",\n mutedMark: \"rgba(250, 250, 250, 0.3)\",\n seq1: \"#1b1c34\",\n seq2: \"#2c2e4e\",\n seq3: \"#3e4069\",\n seq4: \"#515484\",\n seq5: \"#6568a1\",\n seq6: \"#7a7ebd\",\n seq7: \"#8f94d9\",\n seq8: \"#a6abf4\",\n seq9: \"#bdc3ff\",\n seqInk1: \"var(--openui-dashboard-ink)\",\n seqInk2: \"var(--openui-dashboard-ink)\",\n seqInk3: \"var(--openui-dashboard-ink)\",\n seqInk4: \"var(--openui-dashboard-ink)\",\n seqInk5: \"var(--openui-dashboard-ink)\",\n seqInk6: \"#0d0d0d\",\n seqInk7: \"#0d0d0d\",\n seqInk8: \"#0d0d0d\",\n seqInk9: \"#0d0d0d\",\n areaWash: \"0.02\",\n areaDot: \"0.08\",\n areaStackTop: \"0.2\",\n areaStackBottom: \"0.08\",\n areaStackTex: \"0.3\",\n texTint: \"0.03\",\n texInk: \"0.12\",\n barInk: \"0.22\",\n div1: \"#eb7d98\",\n div2: \"#c2687e\",\n div3: \"#995565\",\n div4: \"#73414d\",\n div5: \"#3a3a3c\",\n div6: \"#4b4e79\",\n div7: \"#6366a1\",\n div8: \"#7b7fcc\",\n div9: \"#9599f9\",\n divInk1: \"#0d0d0d\",\n divInk2: \"#0d0d0d\",\n divInk3: \"var(--openui-dashboard-ink)\",\n divInk4: \"var(--openui-dashboard-ink)\",\n divInk5: \"var(--openui-dashboard-ink)\",\n divInk6: \"var(--openui-dashboard-ink)\",\n divInk7: \"var(--openui-dashboard-ink)\",\n divInk8: \"#0d0d0d\",\n divInk9: \"#0d0d0d\",\n good: \"#7fe0b1\",\n goodMark: \"#2ce98a\",\n bad: \"#f1838c\",\n badMark: \"#ea4e58\",\n warning: \"#ffd84d\",\n warningSoft: \"rgba(255, 199, 0, 0.16)\",\n warningMark: \"#ffc700\",\n info: \"#8fbcf7\",\n neutralSoft: \"rgba(255, 255, 255, 0.06)\",\n mapLand: \"#232323\",\n radius: \"16px\",\n radiusMd: \"12px\",\n radiusSm: \"8px\",\n spaceXs: \"8px\",\n spaceSm: \"12px\",\n spaceMd: \"16px\",\n spaceLg: \"20px\",\n spaceXl: \"24px\",\n space2xl: \"36px\",\n shadow: \"0 2px 6px -2px rgba(0, 0, 0, 0.22), 0 3px 10px -3px rgba(0, 0, 0, 0.16)\",\n shadowPop: \"0 10px 28px -8px rgba(0, 0, 0, 0.45), 0 20px 56px -12px rgba(0, 0, 0, 0.3)\",\n};\n","import { ThemeProvider as ComponentsThemeProvider } from \"@wodecorp/openui-vue-ui\";\nimport {\n computed,\n defineComponent,\n h,\n inject,\n provide,\n useId,\n type ComputedRef,\n type CSSProperties,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { defaultDarkTheme, defaultLightTheme, type Theme } from \"./defaultThemes\";\n\nexport { defaultDarkTheme, defaultLightTheme, type Theme };\n\nexport type ThemeMode = \"light\" | \"dark\";\n\nexport interface ThemeProviderProps {\n mode?: ThemeMode;\n lightTheme?: Theme;\n darkTheme?: Theme;\n}\n\nexport interface DashboardThemeContextValue {\n mode: ComputedRef<ThemeMode>;\n style: ComputedRef<CSSProperties>;\n}\n\nexport const ThemeContext: InjectionKey<DashboardThemeContextValue | null> = Symbol(\n \"OpenUI.DashboardTheme\",\n);\n\nexport function tokenVariable(key: string): string {\n return `--openui-dashboard-${key.replace(/[A-Z]|\\d+/g, (part) => `-${part.toLowerCase()}`)}`;\n}\n\nexport function useDashboardTheme(): DashboardThemeContextValue | null {\n return inject(ThemeContext, null);\n}\n\nexport const ThemeProvider = defineComponent({\n name: \"OpenUIDashboardThemeProvider\",\n inheritAttrs: false,\n props: {\n mode: String as PropType<ThemeMode>,\n lightTheme: Object as PropType<Theme>,\n darkTheme: Object as PropType<Theme>,\n },\n setup(props, { slots }) {\n const scope = `openui-dashboard-theme-${useId().replace(/[^a-zA-Z0-9-_]/g, \"\")}`;\n const parent = inject(ThemeContext, null);\n const mode = computed<ThemeMode>(() => props.mode ?? parent?.mode.value ?? \"light\");\n const style = computed<CSSProperties>(() => {\n const defaults = mode.value === \"light\" ? defaultLightTheme : defaultDarkTheme;\n const overrides: Theme | undefined =\n mode.value === \"light\" ? props.lightTheme : (props.darkTheme ?? props.lightTheme);\n const vars: Record<string, string> = { colorScheme: mode.value };\n for (const [key, token] of Object.entries(defaults)) {\n vars[tokenVariable(key)] = overrides?.[key as keyof Theme] ?? token;\n }\n return vars as CSSProperties;\n });\n\n provide(ThemeContext, { mode, style });\n\n return () =>\n h(\n \"div\",\n {\n class: scope,\n \"data-dashboard-mode\": mode.value,\n style: { display: \"contents\", ...style.value },\n },\n [\n h(\n ComponentsThemeProvider,\n { mode: mode.value, cssSelector: `.${scope}` },\n { default: () => slots.default?.() },\n ),\n ],\n );\n },\n});\n\nexport const DashboardTheme = defineComponent({\n name: \"OpenUIDashboardRootTheme\",\n inheritAttrs: false,\n setup(_, { slots }) {\n const parent = inject(ThemeContext, null);\n return () =>\n parent ? slots.default?.() : h(ThemeProvider, null, { default: () => slots.default?.() });\n },\n});\n","import { z } from \"zod/v4\";\n\n/**\n * How a number is shown. Data stays numeric everywhere (so sorting, totals,\n * deltas and charts work); a format only decides how it reads.\n *\n * Presets:\n * - \"number\" 1,284 · 12,904\n * - \"compact\" 1,284 · 12.9K · 4.21M · 12.4M\n * - \"currency\" $1,284 · $12,904\n * - \"currency-compact\" $1,284 · $12.9K · $4.95M · $12.4M\n * - \"currency-precise\" $1,284.50 (2 decimals)\n * - \"percent\" value already in percent: 3.21 → 3.2%\n * - \"ratio\" value is a fraction: 0.0321 → 3.2%\n * - \"multiplier\" 3.2 → 3.2x (ROAS, lift factors)\n * - \"duration\" seconds: 238 → 3m 58s, 1.4 → 1.4s, 0.041 → 41ms\n * - \"ms\" milliseconds: 238 → 238 ms, 1450 → 1.45 s\n * - \"days\" 2.5 → 2.5d\n *\n * Or an object for anything else: {type: \"currency\", currency: \"EUR\", decimals: 2}.\n */\nexport const FORMAT_PRESETS = [\n \"number\",\n \"compact\",\n \"currency\",\n \"currency-compact\",\n \"currency-precise\",\n \"percent\",\n \"ratio\",\n \"multiplier\",\n \"duration\",\n \"ms\",\n \"days\",\n] as const;\n\nexport type FormatPreset = (typeof FORMAT_PRESETS)[number];\n\nexport const formatSchema = z.union([\n z.enum(FORMAT_PRESETS),\n z.object({\n type: z.enum(FORMAT_PRESETS),\n currency: z.string().optional(),\n decimals: z.number().optional(),\n prefix: z.string().optional(),\n suffix: z.string().optional(),\n }),\n]);\n\nexport type ValueFormat = z.infer<typeof formatSchema>;\n\ntype Resolved = {\n type: FormatPreset;\n currency: string;\n decimals?: number;\n prefix: string;\n suffix: string;\n};\n\nfunction resolve(format: ValueFormat | undefined | null): Resolved {\n if (!format) return { type: \"number\", currency: \"USD\", prefix: \"\", suffix: \"\" };\n if (typeof format === \"string\") return { type: format, currency: \"USD\", prefix: \"\", suffix: \"\" };\n return {\n type: format.type,\n currency: format.currency ?? \"USD\",\n decimals: format.decimals,\n prefix: format.prefix ?? \"\",\n suffix: format.suffix ?? \"\",\n };\n}\n\nconst cache = new Map<string, Intl.NumberFormat>();\nfunction nf(base: Intl.NumberFormatOptions): Intl.NumberFormat {\n // \"negative\" never prints \"-0\" for values that round to zero.\n const options: Intl.NumberFormatOptions = {\n signDisplay: \"negative\" as Intl.NumberFormatOptions[\"signDisplay\"],\n ...base,\n };\n const key = JSON.stringify(options);\n let formatter = cache.get(key);\n if (!formatter) {\n formatter = new Intl.NumberFormat(\"en-US\", options);\n cache.set(key, formatter);\n }\n return formatter;\n}\n\nfunction compactDigits(value: number, decimals?: number) {\n if (decimals !== undefined) return decimals;\n const abs = Math.abs(value);\n // Single-digit millions and billions get a second decimal: $4.95M, not $5M.\n if ((abs >= 1e6 && abs < 1e7) || (abs >= 1e9 && abs < 1e10)) return 2;\n return abs >= 1000 ? 1 : 0;\n}\n\n/** One unit, no spaces, so axis ticks stay on one line: 45s · 25m · 1.5h · 3d. */\nfunction axisDuration(seconds: number): string {\n const abs = Math.abs(seconds);\n const trim = (n: number) => nf({ maximumFractionDigits: 1 }).format(n);\n if (abs < 60) return `${trim(seconds)}s`;\n if (abs < 3600) return `${trim(seconds / 60)}m`;\n if (abs < 86400 * 2) return `${trim(seconds / 3600)}h`;\n return `${trim(seconds / 86400)}d`;\n}\n\n/**\n * A percentage that never lies at the edges: 99.999% stays 99.999% (not 100%),\n * and a tiny non-zero share reads \"<0.1%\" (not 0%).\n */\nfunction percentText(pct: number, decimals: number | undefined, axis: boolean): string {\n if (decimals !== undefined) return `${nf({ maximumFractionDigits: decimals }).format(pct)}%`;\n if (axis) return `${nf({ maximumFractionDigits: Math.abs(pct) >= 1000 ? 0 : 2 }).format(pct)}%`;\n const abs = Math.abs(pct);\n if (abs >= 1000) return `${nf({ maximumFractionDigits: 0 }).format(pct)}%`;\n if (pct !== 0 && abs < 0.05) return `${pct < 0 ? \"-\" : \"\"}<0.1%`;\n if (abs < 100 && abs >= 99.95) return `${nf({ maximumFractionDigits: 3 }).format(pct)}%`;\n return `${nf({ maximumFractionDigits: 1 }).format(pct)}%`;\n}\n\nfunction duration(seconds: number): string {\n const sign = seconds < 0 ? \"-\" : \"\";\n const abs = Math.abs(seconds);\n // Latencies live below a second: under 0.1s read in milliseconds (41ms),\n // under 10s keep one decimal (0.5s, 1.4s), matching the axis beside them.\n if (abs > 0 && abs < 0.1) return `${sign}${Math.round(abs * 1000)}ms`;\n if (abs < 10 && Math.round(abs * 10) / 10 < 10)\n return `${sign}${nf({ maximumFractionDigits: 1 }).format(abs)}s`;\n let s = Math.round(abs);\n if (s < 60) return `${sign}${s}s`;\n // Two days and up read better in days: 102h → 4d 6h.\n if (s >= 172800) {\n // Round to whole hours first, so 71.6h reads 3d, not 2d 24h.\n const totalHours = Math.round(s / 3600);\n const d = Math.floor(totalHours / 24);\n const hours = totalHours - d * 24;\n return hours ? `${sign}${d}d ${hours}h` : `${sign}${d}d`;\n }\n const h = Math.floor(s / 3600);\n s -= h * 3600;\n const m = Math.floor(s / 60);\n s -= m * 60;\n if (h) return m ? `${sign}${h}h ${m}m` : `${sign}${h}h`;\n return s ? `${sign}${m}m ${s}s` : `${sign}${m}m`;\n}\n\n/** Formats one value. Non-numbers (null, \"—\", text) come back as text. */\nexport function formatValue(\n value: unknown,\n format?: ValueFormat | null,\n options: { axis?: boolean } = {},\n): string {\n if (value === null || value === undefined || value === \"\") return \"—\";\n if (typeof value !== \"number\" || !Number.isFinite(value)) return String(value);\n const f = resolve(format);\n // Axis ticks favour short labels: compact numbers, no decimals unless needed.\n const axis = options.axis ?? false;\n let text: string;\n switch (f.type) {\n case \"compact\":\n text = nf({\n notation: \"compact\",\n maximumFractionDigits: compactDigits(value, f.decimals),\n }).format(value);\n break;\n case \"currency\":\n text = axis\n ? nf({\n style: \"currency\",\n currency: f.currency,\n notation: \"compact\",\n minimumFractionDigits: 0,\n maximumFractionDigits: 1,\n }).format(value)\n : nf({\n style: \"currency\",\n currency: f.currency,\n maximumFractionDigits: f.decimals ?? 0,\n }).format(value);\n break;\n case \"currency-compact\":\n text = nf({\n style: \"currency\",\n currency: f.currency,\n notation: \"compact\",\n // Pinned: engines before the 2023 Intl change pad compact currency to the\n // currency's 2 digits ($12.50K, $4.90M); newer ones, like plain compact, don't.\n minimumFractionDigits: 0,\n maximumFractionDigits: compactDigits(value, f.decimals),\n }).format(value);\n break;\n case \"currency-precise\":\n text = nf({\n style: \"currency\",\n currency: f.currency,\n minimumFractionDigits: axis ? 0 : (f.decimals ?? 2),\n maximumFractionDigits: f.decimals ?? 2,\n }).format(value);\n break;\n case \"percent\":\n text = percentText(value, f.decimals, axis);\n break;\n case \"ratio\":\n text = percentText(value * 100, f.decimals, axis);\n break;\n case \"multiplier\":\n text = `${nf({ maximumFractionDigits: f.decimals ?? 1, minimumFractionDigits: axis ? 0 : (f.decimals ?? 1) }).format(value)}x`;\n break;\n case \"duration\":\n text = axis ? axisDuration(value) : duration(value);\n break;\n case \"ms\":\n // Axis ticks drop the space so the chart never wraps \"800 ms\" onto two lines.\n text =\n Math.abs(value) >= 1000\n ? `${nf({ maximumFractionDigits: axis ? 1 : 2 }).format(value / 1000)}${axis ? \"s\" : \" s\"}`\n : `${nf({ maximumFractionDigits: 0 }).format(value)}${axis ? \"ms\" : \" ms\"}`;\n break;\n case \"days\":\n text = `${nf({ maximumFractionDigits: f.decimals ?? 1 }).format(value)}d`;\n break;\n default: {\n const digits = f.decimals ?? 2;\n const smallest = 10 ** -digits;\n // A tiny non-zero value (a p-value of 0.00002) must not read as 0.\n text =\n !axis && value !== 0 && Math.abs(value) < smallest / 2\n ? `<${nf({ maximumFractionDigits: digits }).format(smallest)}`\n : axis && Math.abs(value) >= 10_000\n ? nf({ notation: \"compact\", maximumFractionDigits: 1 }).format(value)\n : nf({ maximumFractionDigits: digits }).format(value);\n }\n }\n return `${f.prefix}${text}${f.suffix}`;\n}\n\nexport function isRatioFormat(format?: ValueFormat | null): boolean {\n return resolve(format).type === \"ratio\";\n}\n\nexport function isDurationFormat(format?: ValueFormat | null): boolean {\n return resolve(format).type === \"duration\";\n}\n\n/**\n * Whether a format measures a rate, where change reads in points rather than percent. A number\n * with a \"%\" suffix (a margin written as {type: \"number\", suffix: \"%\"}) is a percent too.\n */\nexport function isRateFormat(format?: ValueFormat | null): boolean {\n const { type, suffix } = resolve(format);\n return type === \"percent\" || type === \"ratio\" || (type === \"number\" && suffix.trim() === \"%\");\n}\n\nexport type Delta = { text: string; direction: \"up\" | \"down\" | \"flat\" };\n\n/**\n * The change from `previous` to `current`: relative (+12.4%) for amounts,\n * absolute in points (+0.4 pts) for rates.\n */\nexport function computeDelta(\n current: number,\n previous: number,\n format?: ValueFormat | null,\n): Delta | null {\n if (!Number.isFinite(current) || !Number.isFinite(previous)) return null;\n if (isRateFormat(format)) {\n const scale = resolve(format).type === \"ratio\" ? 100 : 1;\n const diff = (current - previous) * scale;\n // Near-ceiling rates (99.74% vs 99.71%) move in hundredths; don't round them to \"+0\".\n const digits = Math.abs(diff) < 0.1 ? 2 : 1;\n const direction = Math.abs(diff) < 0.005 ? \"flat\" : diff > 0 ? \"up\" : \"down\";\n return {\n text: `${diff > 0 ? \"+\" : \"\"}${nf({ maximumFractionDigits: digits }).format(diff)} pts`,\n direction,\n };\n }\n if (previous === 0) return null;\n // Across a sign flip (+$12K → −$48K) a percent change is meaningless: show the absolute change.\n if (previous < 0 || (current !== 0 && Math.sign(current) !== Math.sign(previous))) {\n const diff = current - previous;\n const direction = diff === 0 ? \"flat\" : diff > 0 ? \"up\" : \"down\";\n return { text: `${diff > 0 ? \"+\" : \"\"}${formatValue(diff, format)}`, direction };\n }\n const change = ((current - previous) / Math.abs(previous)) * 100;\n const direction = Math.abs(change) < 0.005 ? \"flat\" : change > 0 ? \"up\" : \"down\";\n const digits = Math.abs(change) >= 100 ? 0 : Math.abs(change) < 0.1 ? 2 : 1;\n return {\n text: `${change > 0 ? \"+\" : \"\"}${nf({ maximumFractionDigits: digits }).format(change)}%`,\n direction,\n };\n}\n\n/** Whether a delta is good news, given which direction is good for the metric. */\nexport function deltaTone(\n direction: Delta[\"direction\"],\n goodWhen: \"up\" | \"down\" | \"neutral\" = \"up\",\n) {\n if (direction === \"flat\" || goodWhen === \"neutral\") return \"neutral\" as const;\n return (direction === \"up\") === (goodWhen === \"up\") ? (\"good\" as const) : (\"bad\" as const);\n}\n\n/**\n * Decimals that line a column up: the most any value shows, but only when the\n * values share a unit after the number (%, x, \" pts\", \" ms\"). Mixed compact\n * suffixes ($950, $1.2K) are different scales and never padded.\n */\nexport function columnDecimals(texts: string[]): number {\n const parts = texts\n .map((t) => t.match(/^[^\\d]*[\\d,]+(?:\\.(\\d+))?(.*)$/))\n .filter((m): m is RegExpMatchArray => !!m);\n if (parts.length < 2) return 0;\n const suffixes = new Set(parts.map((m) => m[2]));\n if (suffixes.size > 1) return 0;\n return Math.max(...parts.map((m) => (m[1] ?? \"\").length));\n}\n\n/** Pads the first number in a formatted value to `decimals`: \"35%\" → \"35.0%\". */\nexport function padDecimals(text: string, decimals: number): string {\n if (!decimals) return text;\n return text.replace(\n /^([^\\d]*[\\d,]+)(?:\\.(\\d+))?/,\n (_, whole: string, frac = \"\") => `${whole}.${frac.padEnd(decimals, \"0\")}`,\n );\n}\n\n/* ---------- Dates ---------- */\n\n// A date or timestamp as APIs return it: 2026-04-01, 2026-04-01T21:01:20.458Z, 2026-04-01 21:01:20+05:30.\nconst ISO_DATE =\n /^\\d{4}-\\d{2}-\\d{2}(?:[T ]\\d{2}:\\d{2}(?::\\d{2}(?:\\.\\d+)?)?(?:Z|[+-]\\d{2}:?\\d{2})?)?$/;\n\n/**\n * The day an ISO date or timestamp names, or null for any other text. A bare date reads as local\n * midnight, so it shows the day it says in every time zone. An impossible day (2026-02-30) is\n * null rather than rolled over to the next month.\n */\nexport function parseIsoDate(value: unknown): Date | null {\n if (typeof value !== \"string\") return null;\n const text = value.trim();\n if (!ISO_DATE.test(text)) return null;\n // The strict shape every browser parses: \"T\" between date and time, a colon in the offset.\n const iso =\n text.length === 10\n ? `${text}T00:00:00`\n : text.replace(\" \", \"T\").replace(/([+-]\\d{2})(\\d{2})$/, \"$1:$2\");\n const day = new Date(iso);\n if (Number.isNaN(day.getTime())) return null;\n // Date rolls an impossible day over (2026-02-30 to Mar 2); a real one reads back the same.\n const [year, month, date] = text.slice(0, 10).split(\"-\").map(Number) as [number, number, number];\n const calendar = new Date(Date.UTC(year, month - 1, date));\n if (\n calendar.getUTCFullYear() !== year ||\n calendar.getUTCMonth() !== month - 1 ||\n calendar.getUTCDate() !== date\n ) {\n return null;\n }\n return day;\n}\n\n/** \"Apr 2\" this year, \"Apr 23, 2012\" before it: how a Table date column reads. */\nexport function formatDay(day: Date): string {\n const sameYear = day.getFullYear() === new Date().getFullYear();\n return day.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: sameYear ? undefined : \"numeric\",\n });\n}\n\n// The en-US Date#toLocaleString() shape some data sources return: 10/1/2026, 12:00:00 AM. Only this\n// one: its AM/PM marks the US month-first order, so 10/01/2026 can't be the 10th of January.\nconst US_DATETIME = /^(\\d{1,2})\\/(\\d{1,2})\\/(\\d{4}),?\\s+(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*([AP]M)$/i;\n// A year and month, as monthly data is often keyed: 2025-11.\nconst YEAR_MONTH = /^(\\d{4})-(\\d{2})$/;\n\n/** A date read from text, with whether it names a whole month and whether it has a time of day. */\nexport type DateText = { date: Date; unit: \"day\" | \"month\"; time: boolean };\n\nconst atMidnight = (date: Date) =>\n date.getHours() === 0 && date.getMinutes() === 0 && date.getSeconds() === 0;\n\n/**\n * The date a text names: an ISO date or timestamp, or the en-US toLocaleString() shape\n * (10/01/2026, 12:00:00 AM). Null for any other text, and for impossible days (02/30/2026), so a\n * version or a name is never read as a date. A year and month (2025-11) counts only with\n * `months`, for a whole set of values (an axis, a column): alone, \"2026-04\" may be a version.\n */\nexport function parseDateText(\n value: unknown,\n { months = false }: { months?: boolean } = {},\n): DateText | null {\n if (typeof value !== \"string\") return null;\n const text = value.trim();\n const iso = parseIsoDate(text);\n if (iso) return { date: iso, unit: \"day\", time: text.length > 10 && !atMidnight(iso) };\n const month = months ? YEAR_MONTH.exec(text) : null;\n if (month) {\n const [year, index] = [Number(month[1]), Number(month[2]) - 1];\n return index >= 0 && index < 12\n ? { date: new Date(year, index, 1), unit: \"month\", time: false }\n : null;\n }\n const us = US_DATETIME.exec(text);\n if (!us) return null;\n const [m, d, y, h, min, sec] = [1, 2, 3, 4, 5, 6].map((i) => Number(us[i] ?? 0)) as number[];\n if (m! < 1 || m! > 12 || h! < 1 || h! > 12 || min! > 59 || sec! > 59) return null;\n const hours = (h! % 12) + (us[7]!.toUpperCase() === \"PM\" ? 12 : 0);\n const date = new Date(y!, m! - 1, d!, hours, min!, sec!);\n // A real day reads back the same; 02/30/2026 would roll over to March.\n if (date.getMonth() !== m! - 1 || date.getDate() !== d!) return null;\n return { date, unit: \"day\", time: !atMidnight(date) };\n}\n\n/** \"Nov 2025\": how a month reads. */\nfunction formatMonth(date: Date, withYear: boolean): string {\n return date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n year: withYear ? \"numeric\" : undefined,\n });\n}\n\n/**\n * A date as a short day (\"Apr 2\"), or null for any other text (a version, a name). A day this\n * year leaves its year out, as a Table date column does. With `months`, a year and month reads\n * \"Nov 2025\".\n */\nexport function formatDateText(\n value: unknown,\n { months = false }: { months?: boolean } = {},\n): string | null {\n const parsed = parseDateText(value, { months });\n if (!parsed) return null;\n return parsed.unit === \"month\" ? formatMonth(parsed.date, true) : formatDay(parsed.date);\n}\n\n/**\n * Chart category labels that are all dates, or all months, read as dates: \"May 14\" or \"Nov 2025\",\n * with the year only when some label falls outside this year, and the time only when two labels\n * share a day. Null when any label is other text, so names and quarters pass through untouched.\n */\nexport function dateLabels(labels: string[]): ((label: string) => string) | null {\n const shown = labels.filter((label) => label.trim() !== \"\");\n const parsed = shown.map((label) => parseDateText(label, { months: true }));\n if (!parsed.length || parsed.some((date) => !date)) return null;\n const dates = parsed as DateText[];\n const unit = dates[0]!.unit;\n if (dates.some((date) => date.unit !== unit)) return null;\n const year = new Date().getFullYear();\n const withYear = dates.some((date) => date.date.getFullYear() !== year);\n const day = (date: Date) =>\n date.toLocaleDateString(\"en-US\", {\n month: \"short\",\n day: \"numeric\",\n year: withYear ? \"numeric\" : undefined,\n });\n const days = dates.map((date) => day(date.date));\n const timed = unit === \"day\" && new Set(days).size < days.length;\n const text = new Map(\n shown.map((label, i) => {\n const date = dates[i]!;\n if (unit === \"month\") return [label, formatMonth(date.date, withYear)];\n if (!timed) return [label, days[i]!];\n const time = date.date.toLocaleTimeString(\"en-US\", { hour: \"numeric\", minute: \"2-digit\" });\n return [label, `${days[i]}, ${time}`];\n }),\n );\n return (label) => text.get(label) ?? label;\n}\n","import { z } from \"zod/v4\";\n\n/** How much of a Row a card takes, on a 12-column grid. Narrow screens stack. */\nexport const WIDTHS = [\"quarter\", \"third\", \"half\", \"two-thirds\", \"three-quarters\", \"full\"] as const;\nexport const widthSchema = z.enum(WIDTHS);\nexport type Width = z.infer<typeof widthSchema>;\n\nexport const widthClass = (width: Width | undefined | null, fallback: Width) =>\n `openui-dashboard-w-${width ?? fallback}`;\n\n/** Which direction of change is good news for a metric (drives delta colour). */\nexport const goodWhenSchema = z.enum([\"up\", \"down\", \"neutral\"]);\n\nexport const toneSchema = z.enum([\"good\", \"bad\", \"warning\", \"info\", \"neutral\"]);\nexport type Tone = z.infer<typeof toneSchema>;\n\n/** One period's status; null is no data. A union, so a signature brackets it: (\"good\" | \"warning\" | \"bad\" | null)[]. */\nexport const stateSchema = z.union([z.enum([\"good\", \"warning\", \"bad\"]), z.literal(null)]);\n\n/** A list of numbers, where gaps (not yet observed, not applicable) are null. */\nexport const numbersSchema = z.array(z.number().nullable());\n","/**\n * Chart colours. Charts read these CSS variables (defined in styles.css), so a\n * host can re-theme by overriding `--openui-dashboard-series-*` and friends on `.openui-dashboard-root`.\n *\n * The categorical order was validated for colour-vision deficiency: adjacent\n * slots stay distinguishable (CVD ΔE ≥ 12 light), and the first three stay\n * distinguishable in every pairing, which is why part-to-whole charts show at\n * most three slices plus \"Other\". Assign in order; never by rank. The dark\n * theme (styles.css) has its own steps, validated on the dark card surface.\n */\nexport const SERIES_COLORS = Array.from(\n { length: 8 },\n (_, i) => `var(--openui-dashboard-series-${i + 1})`,\n);\n\n/** The de-emphasis colour for the previous period, targets and \"other\". */\nexport const MUTED_COLOR = \"var(--openui-dashboard-muted-mark)\";\n\n/** Slots 1–8 in order; anything past the eighth is grey \"other\", never a generated or repeated hue. */\nexport const seriesColor = (index: number) =>\n index < SERIES_COLORS.length ? SERIES_COLORS[index] : MUTED_COLOR;\n\n/** The single-hue ramp for magnitude (heatmaps, cohort grids), light → dark. */\nexport const SEQUENTIAL = Array.from(\n { length: 9 },\n (_, i) => `var(--openui-dashboard-seq-${i + 1})`,\n);\n\n/** Picks a ramp step for a value in [min, max]. */\nexport function sequentialColor(\n value: number,\n min: number,\n max: number,\n): { background: string; color: string } {\n // When every value is equal there is no magnitude to show: use a mid step, not the darkest.\n const t = max === min ? 0.5 : Math.min(1, Math.max(0, (value - min) / (max - min)));\n const step = Math.round(t * (SEQUENTIAL.length - 1));\n // Each step carries its own text ink token; the light and dark ramps switch\n // ink at different steps, so the switch point lives in each theme's CSS.\n return { background: SEQUENTIAL[step]!, color: `var(--openui-dashboard-seq-ink-${step + 1})` };\n}\n\n/** The two-pole ramp for polarity around a midpoint (change, variance, correlation). */\nexport const DIVERGING = Array.from(\n { length: 9 },\n (_, i) => `var(--openui-dashboard-div-${i + 1})`,\n);\n\n/**\n * Picks a diverging step for a value: the neutral middle step at midpoint,\n * the poles at ±spread. Each step carries its own text ink, set per theme.\n */\nexport function divergingColor(\n value: number,\n midpoint: number,\n spread: number,\n): { background: string; color: string } {\n const t = spread ? Math.max(-1, Math.min(1, (value - midpoint) / spread)) : 0;\n const step = 4 + Math.round(t * 4);\n return { background: DIVERGING[step]!, color: `var(--openui-dashboard-div-ink-${step + 1})` };\n}\n\n/**\n * The textures series cycle through, in order. Each is drawn as dark ink (or\n * the series' own hue) over its colour, so neighbours differ by more than hue.\n * Series 1–6 get one each; 7 and 8 start the cycle again.\n */\nexport const TEXTURES = [\n \"dots\",\n \"slash\",\n \"back-slash\",\n \"horizontal\",\n \"crosshatch\",\n \"vertical\",\n] as const;\nexport const textureOf = (index: number) => index % TEXTURES.length;\n","import {\n computed,\n defineComponent,\n inject,\n provide,\n ref,\n type ComputedRef,\n type InjectionKey,\n type PropType,\n} from \"vue\";\n\nexport interface CompareState {\n enabled: ComputedRef<boolean>;\n setEnabled: (enabled: boolean) => void;\n label: ComputedRef<string>;\n setLabel: (label: string) => void;\n}\n\nconst CompareOverrideKey: InjectionKey<ComputedRef<boolean | null> | null> = Symbol(\n \"OpenUI.Dashboard.CompareOverride\",\n);\n\nconst CompareKey: InjectionKey<CompareState> = Symbol(\"OpenUI.Dashboard.Compare\");\n\nconst fallbackCompare: CompareState = {\n enabled: computed(() => false),\n setEnabled: () => {},\n label: computed(() => \"Previous period\"),\n setLabel: () => {},\n};\n\nexport const CompareOverride = defineComponent({\n name: \"OpenUIDashboardCompareOverride\",\n props: {\n value: { type: Boolean as PropType<boolean | null>, default: null },\n },\n setup(props, { slots }) {\n provide(\n CompareOverrideKey,\n computed(() => props.value),\n );\n return () => slots.default?.();\n },\n});\n\nexport const CompareProvider = defineComponent({\n name: \"OpenUIDashboardCompareProvider\",\n setup(_, { slots }) {\n const forced = inject(CompareOverrideKey, null);\n const localEnabled = ref(false);\n const localLabel = ref(\"Previous period\");\n\n provide(CompareKey, {\n enabled: computed(() => forced?.value ?? localEnabled.value),\n setEnabled: (next) => {\n localEnabled.value = next;\n },\n label: computed(() => localLabel.value),\n setLabel: (next) => {\n localLabel.value = next;\n },\n });\n\n return () => slots.default?.();\n },\n});\n\nexport function useCompare(): CompareState {\n return inject(CompareKey, fallbackCompare);\n}\n","/* ---------- Helpers ---------- */\n\nexport function toNumbers(values: unknown): (number | null)[] {\n if (!Array.isArray(values)) return [];\n return values.map((value) =>\n typeof value === \"number\" && Number.isFinite(value) ? value : null,\n );\n}\n\nexport function toStrings(values: unknown): string[] {\n if (!Array.isArray(values)) return [];\n return values.map((value) => (value === null || value === undefined ? \"\" : String(value)));\n}\n\n/** Props of a child component node (e.g. a Series inside a chart). */\nexport function nodeProps<T>(node: unknown): T | null {\n if (!node || typeof node !== \"object\") return null;\n const props = (node as { props?: unknown }).props;\n return props && typeof props === \"object\" ? (props as T) : null;\n}\n\nexport function nodeList<T>(nodes: unknown): T[] {\n if (!Array.isArray(nodes)) return [];\n return nodes.map((node) => nodeProps<T>(node)).filter((props): props is T => props !== null);\n}\n\n/**\n * Arranges one-entry-per-cell arrays (each cell's row label, column label and value, the way\n * query rows give them) into a grid. Rows and columns keep the order they first appear in; a\n * cell no entry names is null.\n */\nexport function toGrid<T>(rowLabels: unknown, columnLabels: unknown, values: unknown) {\n const rowOf = toStrings(rowLabels);\n const columnOf = toStrings(columnLabels);\n const list: unknown[] = Array.isArray(values) ? values : [];\n const rows = [...new Set(rowOf)];\n const columns = [...new Set(columnOf)];\n const cells = rows.map(() => columns.map((): T | null => null));\n for (let i = 0; i < Math.min(rowOf.length, columnOf.length); i++)\n cells[rows.indexOf(rowOf[i]!)]![columns.indexOf(columnOf[i]!)] = (list[i] as T) ?? null;\n return { rows, columns, cells };\n}\n","import { z } from \"zod/v4\";\nimport { MUTED_COLOR, seriesColor as themeSeriesColor } from \"./colors\";\nimport { formatValue, type ValueFormat } from \"./format\";\nimport { type LegendEntry } from \"./legend\";\nimport { niceStep } from \"./scales\";\nimport { type ReferenceProps, type SeriesProps } from \"./trends\";\nimport { toNumbers } from \"./values\";\n\nexport const seriesColor = (index: number): string => themeSeriesColor(index) ?? MUTED_COLOR;\n\n/* ---------- Shared chart plumbing ---------- */\n\nexport const AXIS_TICK = { fill: \"var(--openui-dashboard-ink-muted)\", fontSize: 12 };\n\n/** One bar thickness across every chart (TimeSeries, Bars, Waterfall); previous-period ghosts beside a bar run at half. */\nexport const BAR_SIZE = 12;\n\n/**\n * No bar is drawn thinner than this. Past it, horizontal bars grow the chart\n * taller, and vertical bars give the plot a minimum width and scroll sideways\n * inside the card rather than shrink to slivers.\n */\nexport const BAR_MIN = 6;\n\n/**\n * The band one category needs for `bars` side-by-side bars of BAR_MIN, 2px apart.\n * Recharts takes the category gap (a share of the band) from both sides, hence 1 - 2 × gap.\n */\nexport const bandFor = (bars: number, gap: number) =>\n (bars * BAR_MIN + Math.max(0, Math.ceil(bars) - 1) * 2) / (1 - 2 * gap);\n\n/**\n * Vertical bars: the plot width that keeps every bar at BAR_MIN, or 0 when the\n * card is already wide enough. `chrome` is the axis and margins beside the bars.\n */\nexport function minPlotWidth(\n width: number,\n labels: number,\n bars: number,\n gap: number,\n chrome = 64,\n) {\n if (!width || !bars) return 0;\n // One spare pixel per bar: Recharts rounds bar sizes down.\n const need = Math.ceil(labels * bandFor(bars, gap) * ((BAR_MIN + 1) / BAR_MIN) + chrome);\n return need > width ? need : 0;\n}\n\n/** A line drawn over bars is in the same unit (the Series docs require it), so it\n * summarises them, e.g. a 7-day average: neutral ink, not a category hue. */\nexport const SUMMARY_COLOR = \"var(--openui-dashboard-ink-secondary)\";\n\n/** Top margin a chart leaves when a vertical line's chip sits above its plot: the 18px chip, less its 3px overlap, plus 9px of air above. */\nexport const CHIP_ROOM = 24;\n\n/** The reference chip's measurements, shared by the SVG chip on chart lines and the HTML chip on row charts. */\n/** The least height a plot keeps: below it, a card grows rather than squash the chart. Rows set the real height. */\nexport const PLOT_FLOOR = 200;\n\nexport type Row = Record<string, string | number | null>;\n\nexport const DURATION_STEPS = [\n 1, 2, 5, 10, 15, 30, 60, 120, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400, 172800,\n 604800,\n];\n\n/** Zero-based ticks on whole durations (30s, 1m, 5m, 1h, …) instead of 65s, 130s. */\nexport function durationTicks(\n rows: Row[],\n keys: string[],\n extra: number[] = [],\n): number[] | undefined {\n let max = Math.max(0, ...extra);\n for (const row of rows)\n for (const key of keys)\n if (typeof row[key] === \"number\") max = Math.max(max, row[key] as number);\n if (!max) return undefined;\n const step = DURATION_STEPS.find((candidate) => max / candidate <= 5) ?? Math.ceil(max / 5);\n return Array.from({ length: Math.ceil(max / step) + 1 }, (_, i) => i * step);\n}\n\n/**\n * Value-axis ticks on 1, 2, 2.5 or 5 × 10ⁿ steps, from zero (or below it, for negative data) to\n * just past the data, so an axis never counts in 950K steps as Recharts' own ticks can. A stacked\n * row counts as its positive and negative sums; whole-number data keeps whole-number steps.\n */\nexport function niceTicks(\n rows: Row[],\n keys: string[],\n extra: number[] = [],\n { stacked = false, integers = false }: { stacked?: boolean; integers?: boolean } = {},\n): number[] | undefined {\n const values = extra.filter(Number.isFinite);\n for (const row of rows) {\n let up = 0;\n let down = 0;\n for (const key of keys) {\n const value = row[key];\n if (typeof value !== \"number\" || !Number.isFinite(value)) continue;\n if (!stacked) values.push(value);\n else if (value > 0) up += value;\n else down += value;\n }\n if (stacked) values.push(up, down);\n }\n const lo = Math.min(0, ...values);\n const hi = Math.max(0, ...values);\n if (lo === hi) return undefined;\n const raw = niceStep((hi - lo) / 4);\n // Whole numbers step by 1, 2 or 5 × 10ⁿ: a 2.5 step would print 7.5.\n const step = integers && !Number.isInteger(raw) ? Math.max(1, Math.floor(raw)) : raw;\n const start = Math.floor(lo / step) * step;\n const end = Math.ceil(hi / step) * step;\n return Array.from({ length: Math.round((end - start) / step) + 1 }, (_, i) =>\n Number((start + i * step).toPrecision(12)),\n );\n}\n\n/**\n * Which end of a horizontal reference line its chip should sit at: the start, unless the data\n * passes closer to the line there than at the end (the chip would cover it).\n */\nexport function chipAlign(rows: Row[], keys: string[], value: number): \"start\" | \"end\" {\n const edge = Math.max(1, Math.ceil(rows.length * 0.2));\n const clearance = (slice: Row[]) =>\n Math.min(\n Infinity,\n ...slice.flatMap((row) =>\n keys.flatMap((key) => {\n const point = row[key];\n return typeof point === \"number\" ? [Math.abs(point - value)] : [];\n }),\n ),\n );\n return clearance(rows.slice(-edge)) > clearance(rows.slice(0, edge)) ? \"end\" : \"start\";\n}\n\n/** Whole-number data gets whole-number ticks (no \"0.2 signups\"). */\nexport function allIntegers(rows: Row[], keys: string[]) {\n return rows.every((row) =>\n keys.every((key) => typeof row[key] !== \"number\" || Number.isInteger(row[key])),\n );\n}\n\nexport function buildRows(labels: string[], series: SeriesProps[]): Row[] {\n return labels.map((label, i) => {\n const row: Row = { label };\n series.forEach((s, index) => {\n row[`s${index}`] = toNumbers(s.values)[i] ?? null;\n row[`p${index}`] = toNumbers(s.previous)[i] ?? null;\n if (s.lows || s.highs) {\n row[`lo${index}`] = toNumbers(s.lows)[i] ?? null;\n row[`hi${index}`] = toNumbers(s.highs)[i] ?? null;\n }\n });\n return row;\n });\n}\n\nexport function yAxisWidth(rows: Row[], keys: string[], format?: ValueFormat | null) {\n let longest = 0;\n for (const row of rows) {\n for (const key of keys) {\n const value = row[key];\n if (typeof value === \"number\")\n longest = Math.max(longest, formatValue(value, format, { axis: true }).length);\n }\n }\n // Ticks are rounder (and often one step past) the data, and % or $ glyphs run\n // wide, so leave a character of slack.\n return Math.min(80, Math.max(40, (longest + 1) * 7 + 8));\n}\n\nexport function hasPrevious(series: SeriesProps[]) {\n return series.some((s) => toNumbers(s.previous).some((value) => value !== null));\n}\n\nexport function legendFor(\n series: SeriesProps[],\n showPrevious: boolean,\n previousLabel: string,\n bars = false,\n references: ReferenceProps[] = [],\n summary: (i: number) => boolean = () => false,\n): LegendEntry[] {\n // A summary line (a line over bars) is keyed as the neutral line it draws.\n const entries: LegendEntry[] = series\n .slice(0, 8)\n .map((s, i) =>\n summary(i)\n ? { name: s.name, color: SUMMARY_COLOR, line: true }\n : { name: s.name, color: seriesColor(i) },\n );\n if (series.length > 8) entries.push({ name: `${series.length - 8} more`, color: MUTED_COLOR });\n // A chart with previous data always carries the previous-period key, hidden\n // while compare is off, so switching compare on never changes card height.\n if (hasPrevious(series)) {\n // Bars draw the previous period as faded bars, lines as dashed lines: the key matches the mark.\n // With several series, previous bars are each series' own hue, faded; the key shows a faded swatch.\n const color =\n series.length === 1\n ? MUTED_COLOR\n : bars\n ? \"color-mix(in srgb, var(--openui-dashboard-series-1) 40%, transparent)\"\n : \"var(--openui-dashboard-ink-muted)\";\n entries.push({\n name: series.length > 1 && bars ? `${previousLabel} (faded)` : previousLabel,\n color,\n dashed: !bars,\n hidden: !showPrevious,\n });\n }\n // Reference lines (Plan, Target, SLO) are keyed as the dotted line they draw.\n for (const reference of references)\n entries.push({\n name: reference.label,\n color: \"var(--openui-dashboard-ink-muted)\",\n dotted: true,\n });\n return entries;\n}\n\n/** The previous-period mark colour: the muted grey for one series, a faded own hue for several. */\nexport const previousColor = (index: number, count: number) =>\n count === 1 ? MUTED_COLOR : seriesColor(index);\n\n/* ---------- TimeSeries ---------- */\n\nexport const stackedSchema = z.union([z.boolean(), z.literal(\"percent\")]);\n\n/** Width of a label once WrappedTick splits it onto two lines, in px at 11px. */\nexport function wrappedLabelWidth(label: string) {\n const words = label.split(\" \");\n const half = Math.ceil(words.length / 2);\n const lines =\n words.length > 1 ? [words.slice(0, half).join(\" \"), words.slice(half).join(\" \")] : words;\n return Math.max(...lines.map((line) => line.length)) * 6.4;\n}\n","import { z } from \"zod/v4\";\n\nexport const referencePropsSchema = z.object({\n label: z.string(),\n value: z.number(),\n axis: z.enum([\"y\", \"x\"]).optional(),\n});\nexport type ReferenceSchemaProps = z.infer<typeof referencePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { referencePropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ReferenceComponent = defineComponent({\n name: \"Reference\",\n props: referencePropsSchema,\n description:\n 'A target or SLO line: Reference(\"Target\", 99.5). axis \"x\" draws a vertical line (Scatter only), e.g. an average on the x measure.',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { numbersSchema } from \"../../../shared/schema\";\n\nexport const seriesPropsSchema = z.object({\n name: z.string(),\n values: numbersSchema,\n previous: numbersSchema.optional(),\n mark: z.enum([\"line\", \"area\", \"bar\"]).optional(),\n lows: numbersSchema.optional(),\n highs: numbersSchema.optional(),\n});\nexport type SeriesSchemaProps = z.infer<typeof seriesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { seriesPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SeriesComponent = defineComponent({\n name: \"Series\",\n props: seriesPropsSchema,\n description:\n 'One series; previous is the same points for the previous period. Use null for gaps. mark overrides the chart type to mix bars and a line in the same unit, e.g. Series(\"7-day average\", avg, null, \"line\"). lows/highs shade a band such as a 95% interval: Series(\"Lift\", lift, null, \"line\", lower, upper).',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { stackedSchema } from \"../../../shared/chartHelpers\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nimport { ReferenceComponent } from \"../../trends/Reference\";\nimport { SeriesComponent } from \"../../trends/Series\";\n\n// Series and Reference belong to the Trends group (#221): Bars takes the registered ones, so the\n// parser and prompt know them by name.\n\nexport const barsPropsSchema = z.object({\n labels: z.array(z.string()),\n series: z.array(SeriesComponent.ref),\n format: formatSchema.optional(),\n orientation: z.enum([\"horizontal\", \"vertical\"]).optional(),\n stacked: stackedSchema.optional(),\n goodWhen: goodWhenSchema.optional(),\n references: z.array(ReferenceComponent.ref).optional(),\n diverging: z.array(z.string()).optional(),\n});\nexport type BarsSchemaProps = z.infer<typeof barsPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { BarChart } from \"@wodecorp/openui-vue-ui\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { formatValue } from \"../../../shared/format\";\nimport { nodeList, toNumbers, toStrings } from \"../../../shared/values\";\nimport type { ReferenceSchemaProps } from \"../../trends/Reference/schema\";\nimport type { SeriesSchemaProps } from \"../../trends/Series/schema\";\nimport { barsPropsSchema, type BarsSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst BarsImpl = vueComponent({\n name: \"OpenUIDashboardBars\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<BarsSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const labels = toStrings(p.props.labels);\n const seriesList = nodeList<SeriesSchemaProps>(p.props.series);\n const refs = nodeList<ReferenceSchemaProps>(p.props.references);\n if (!labels.length || !seriesList.length) return null;\n\n const rows = labels.map((label, idx) => {\n const row: Record<string, string | number> = { __cat: label };\n for (const s of seriesList) {\n const vals = toNumbers(s.values);\n row[s.name] = vals[idx] ?? 0;\n if (compare.enabled.value && s.previous?.length) {\n const prev = toNumbers(s.previous);\n row[`${s.name} (${compare.label.value})`] = prev[idx] ?? 0;\n }\n }\n return row;\n });\n\n const stacked = p.props.stacked === true || p.props.stacked === \"percent\";\n const orientation = p.props.orientation === \"vertical\" ? \"vertical\" : \"horizontal\";\n\n const palette: string[] = [];\n seriesList.forEach((s, i) => {\n palette.push(seriesColor(i));\n if (compare.enabled.value && s.previous?.length) {\n palette.push(MUTED_COLOR);\n }\n });\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-bars\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", height: \"100%\" },\n },\n [\n h(\"div\", { style: { flex: 1, minHeight: \"200px\" } }, [\n h(BarChart as never, {\n data: rows,\n categoryKey: \"__cat\",\n orientation,\n variant: stacked ? \"stacked\" : \"grouped\",\n customPalette: palette,\n isAnimationActive: false,\n }),\n ]),\n refs.length\n ? h(\n \"div\",\n { style: { display: \"flex\", gap: \"8px\", flexWrap: \"wrap\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n refs.map((r, i) =>\n h(\"span\", { key: i }, `${r.label}: ${formatValue(r.value, p.props.format)}`),\n ),\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const BarsComponent = defineComponent({\n name: \"Bars\",\n props: barsPropsSchema,\n description:\n 'Values across categories. For periods such as weeks or months, use TimeSeries with type \"bar\". Horizontal (default) for long labels and rankings; vertical for short labels and ordered buckets (histograms). Several series group side by side, or stack (stacked \"percent\" for each part\\'s share). references draw lines such as a 1.0x break-even. diverging [aboveLabel, belowLabel] colours one series by sign around zero, e.g. [\"Ahead of plan\", \"Behind plan\"].',\n component: BarsImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\n\nexport const distributionPropsSchema = z.object({\n labels: z.array(z.string()),\n mins: z.array(z.number()),\n q1s: z.array(z.number()),\n medians: z.array(z.number()),\n q3s: z.array(z.number()),\n maxes: z.array(z.number()),\n format: formatSchema.optional(),\n});\nexport type DistributionSchemaProps = z.infer<typeof distributionPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { distributionPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const DistributionComponent = defineComponent({\n name: \"Distribution\",\n props: distributionPropsSchema,\n description:\n \"Spread, not just the average: one box plot per category: whiskers min to max, box the middle 50% (q1 to q3), line the median. For latency, order value, session length, deal size.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const mins = toNumbers(props.mins);\n const q1s = toNumbers(props.q1s);\n const medians = toNumbers(props.medians);\n const q3s = toNumbers(props.q3s);\n const maxes = toNumbers(props.maxes);\n const all = [...mins, ...maxes].filter((v): v is number => v !== null);\n const lo = all.length ? Math.min(...all) : 0;\n const hi = all.length ? Math.max(...all) : 1;\n const span = hi - lo || 1;\n const pct = (v: number) => ((v - lo) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-distribution\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n labels.map((label, i) => {\n const min = mins[i] ?? lo;\n const q1 = q1s[i] ?? min;\n const med = medians[i] ?? q1;\n const q3 = q3s[i] ?? med;\n const max = maxes[i] ?? q3;\n return h(\"div\", { key: label + i, style: { display: \"grid\", gridTemplateColumns: \"110px 1fr 72px\", alignItems: \"center\", gap: \"10px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, label),\n h(\"div\", { style: { position: \"relative\", height: \"20px\" } }, [\n h(\"div\", {\n style: {\n position: \"absolute\",\n top: \"9px\",\n left: `${pct(min)}%`,\n width: `${Math.max(1, pct(max) - pct(min))}%`,\n height: \"2px\",\n background: \"var(--openui-dashboard-muted-mark)\",\n },\n }),\n h(\"div\", {\n style: {\n position: \"absolute\",\n top: \"4px\",\n left: `${pct(q1)}%`,\n width: `${Math.max(2, pct(q3) - pct(q1))}%`,\n height: \"12px\",\n borderRadius: \"3px\",\n background: seriesColor(0),\n opacity: 0.25,\n border: `1.5px solid ${seriesColor(0)}`,\n },\n }),\n h(\"div\", {\n style: {\n position: \"absolute\",\n top: \"3px\",\n left: `${pct(med)}%`,\n width: \"2px\",\n height: \"14px\",\n background: seriesColor(0),\n },\n }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(med, props.format)),\n ]);\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const dumbbellPropsSchema = z.object({\n labels: z.array(z.string()),\n before: z.array(z.number()),\n after: z.array(z.number()),\n format: formatSchema.optional(),\n beforeLabel: z.string().optional(),\n afterLabel: z.string().optional(),\n goodWhen: goodWhenSchema.optional(),\n});\nexport type DumbbellSchemaProps = z.infer<typeof dumbbellPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { dumbbellPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const DumbbellComponent = defineComponent({\n name: \"Dumbbell\",\n props: dumbbellPropsSchema,\n description:\n \"Two values per category joined by a line (before and after, this year and last, two segments) so you see who moved and how far. Reads better than paired bars past a handful of categories.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const before = toNumbers(props.before);\n const after = toNumbers(props.after);\n const all = [...before, ...after].filter((v): v is number => v !== null);\n const lo = all.length ? Math.min(0, ...all) : 0;\n const hi = all.length ? Math.max(...all) : 1;\n const span = hi - lo || 1;\n const pct = (v: number) => ((v - lo) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-dumbbell\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", gap: \"14px\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } }, [\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"5px\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"999px\", border: `2px solid ${MUTED_COLOR}`, background: \"var(--openui-dashboard-surface)\", boxSizing: \"border-box\", display: \"inline-block\" } }),\n props.beforeLabel ?? \"Before\",\n ]),\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"5px\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"999px\", background: props.goodWhen === \"neutral\" ? seriesColor(0) : \"var(--openui-dashboard-good-mark)\", display: \"inline-block\" } }),\n props.afterLabel ?? \"After\",\n ]),\n ]),\n ...labels.map((label, i) => {\n const b = before[i] ?? 0;\n const a = after[i] ?? 0;\n const delta = computeDelta(a, b, props.format);\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n const lineColor =\n tone === \"good\"\n ? \"var(--openui-dashboard-good-mark)\"\n : tone === \"bad\"\n ? \"var(--openui-dashboard-bad-mark)\"\n : seriesColor(0);\n const left = Math.min(pct(b), pct(a));\n const width = Math.abs(pct(a) - pct(b));\n return h(\"div\", { key: label + i, style: { display: \"grid\", gridTemplateColumns: \"110px 1fr 78px\", alignItems: \"center\", gap: \"10px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\", color: \"var(--openui-dashboard-ink)\" } }, label),\n h(\"div\", { style: { position: \"relative\", height: \"18px\" } }, [\n h(\"div\", { style: { position: \"absolute\", top: \"8px\", left: `${left}%`, width: `${width}%`, height: \"2px\", background: lineColor } }),\n h(\"div\", {\n title: `${props.beforeLabel ?? \"Before\"}: ${formatValue(b, props.format)}`,\n style: { position: \"absolute\", top: \"4px\", left: `calc(${pct(b)}% - 5px)`, width: \"10px\", height: \"10px\", borderRadius: \"999px\", border: `2px solid ${MUTED_COLOR}`, background: \"var(--openui-dashboard-surface)\", boxSizing: \"border-box\" },\n }),\n h(\"div\", {\n title: `${props.afterLabel ?? \"After\"}: ${formatValue(a, props.format)}`,\n style: { position: \"absolute\", top: \"4px\", left: `calc(${pct(a)}% - 5px)`, width: \"10px\", height: \"10px\", borderRadius: \"999px\", background: lineColor },\n }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, delta?.text ?? formatValue(a, props.format)),\n ]);\n }),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const intervalsPropsSchema = z.object({\n labels: z.array(z.string()),\n estimates: z.array(z.number()),\n lows: z.array(z.number()),\n highs: z.array(z.number()),\n format: formatSchema.optional(),\n baseline: z.number().optional(),\n baselineLabel: z.string().optional(),\n goodWhen: goodWhenSchema.optional(),\n});\nexport type IntervalsSchemaProps = z.infer<typeof intervalsPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { intervalsPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const IntervalsComponent = defineComponent({\n name: \"Intervals\",\n props: intervalsPropsSchema,\n description:\n 'Estimates with confidence intervals (forest plot), e.g. experiment lift. An interval clear of the baseline (default 0) is a clear effect: green when better, red when worse, by goodWhen (default \"up\"; \"neutral\" colours both sides alike). Intervals that cross the baseline stay grey.',\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const ests = toNumbers(props.estimates);\n const lows = toNumbers(props.lows);\n const highs = toNumbers(props.highs);\n const baseline = typeof props.baseline === \"number\" ? props.baseline : 0;\n const goodWhen = props.goodWhen ?? \"up\";\n const all = [baseline, ...lows, ...highs, ...ests].filter((v): v is number => v !== null);\n const lo = all.length ? Math.min(...all) : -1;\n const hi = all.length ? Math.max(...all) : 1;\n const span = hi - lo || 1;\n const pct = (v: number) => ((v - lo) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-intervals\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n labels.map((label, i) => {\n const est = ests[i] ?? baseline;\n const low = lows[i] ?? est;\n const high = highs[i] ?? est;\n const crosses = low <= baseline && high >= baseline;\n let color = MUTED_COLOR;\n if (!crosses) {\n if (goodWhen === \"neutral\") color = seriesColor(0);\n else {\n const above = low > baseline;\n color = (above === (goodWhen === \"up\")) ? \"var(--openui-dashboard-good-mark)\" : \"var(--openui-dashboard-bad-mark)\";\n }\n }\n return h(\"div\", { key: label + i, style: { display: \"grid\", gridTemplateColumns: \"120px 1fr 78px\", alignItems: \"center\", gap: \"10px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\", color: \"var(--openui-dashboard-ink)\" } }, label),\n h(\"div\", { style: { position: \"relative\", height: \"18px\" } }, [\n h(\"div\", { style: { position: \"absolute\", top: 0, bottom: 0, left: `${pct(baseline)}%`, width: \"1px\", borderLeft: \"1px dashed var(--openui-dashboard-border-strong)\" } }),\n h(\"div\", { style: { position: \"absolute\", top: \"8px\", left: `${pct(low)}%`, width: `${Math.max(1, pct(high) - pct(low))}%`, height: \"2px\", background: color } }),\n h(\"div\", { style: { position: \"absolute\", top: \"4px\", left: `calc(${pct(est)}% - 5px)`, width: \"10px\", height: \"10px\", borderRadius: \"999px\", background: color } }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(est, props.format)),\n ]);\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const leaderboardPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n goodWhen: goodWhenSchema.optional(),\n limit: z.number().optional(),\n});\nexport type LeaderboardSchemaProps = z.infer<typeof leaderboardPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { leaderboardPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nexport const LeaderboardComponent = defineComponent({\n name: \"Leaderboard\",\n props: leaderboardPropsSchema,\n description:\n \"Ranked list with inline bars and change vs previous: top channels, pages, campaigns. Shows every item, sorted; a long list scrolls inside the card. limit keeps only the top N.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const prevs = toNumbers(props.previous);\n const items = labels\n .map((label, i) => ({ label, value: values[i] ?? 0, previous: prevs[i] ?? null }))\n .sort((a, b) => b.value - a.value);\n const shown =\n typeof props.limit === \"number\" && props.limit > 0\n ? items.slice(0, Math.round(props.limit))\n : items;\n const maxVal = Math.max(...shown.map((x) => Math.abs(x.value)), 1);\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-leaderboard\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", overflowY: \"auto\" },\n },\n shown.map((item, idx) => {\n const delta = item.previous !== null ? computeDelta(item.value, item.previous, props.format) : null;\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n return h(\"div\", { key: item.label + idx, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"baseline\", fontSize: \"13px\", gap: \"8px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, `${idx + 1}. ${item.label}`),\n h(\"span\", { style: { display: \"inline-flex\", gap: \"8px\", flexShrink: 0, fontVariantNumeric: \"tabular-nums\" } }, [\n h(\"strong\", { style: { color: \"var(--openui-dashboard-ink)\" } }, formatValue(item.value, props.format)),\n delta ? h(\"span\", { style: { fontSize: \"12px\", color: TONE_COLOR[tone] } }, delta.text) : null,\n ]),\n ]),\n h(\n \"div\",\n { style: { height: \"5px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${Math.min(100, (Math.abs(item.value) / maxVal) * 100)}%`, height: \"100%\", background: seriesColor(0) } })],\n ),\n ]);\n }),\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { BarsComponent } from \"./Bars\";\nimport { DistributionComponent } from \"./Distribution\";\nimport { DumbbellComponent } from \"./Dumbbell\";\nimport { IntervalsComponent } from \"./Intervals\";\nimport { LeaderboardComponent } from \"./Leaderboard\";\n\nexport const comparison: Group = {\n components: [\n BarsComponent,\n DumbbellComponent,\n DistributionComponent,\n IntervalsComponent,\n LeaderboardComponent,\n ],\n styles: {},\n};\n","import { toNumbers } from \"./values\";\n\n/* ---------- Fold the smallest into Other ---------- */\n\n/**\n * Past `max` items, the names of the `keep` largest by `size` (ties go to the one given first); the\n * rest fold into Other, so a chart never carries more hues than can be told apart. null when all fit.\n */\nexport function keepLargest<T>(\n items: T[],\n name: (item: T) => string,\n size: (item: T) => number,\n max = 8,\n keep = max - 1,\n): Set<string> | null {\n if (items.length <= max) return null;\n return new Set(\n [...items]\n .sort((a, b) => size(b) - size(a))\n .slice(0, keep)\n .map(name),\n );\n}\n\n/** Parts past `max`: the kept parts in their given order, and what the rest add up to (0 when nothing folds). */\nexport function foldParts<T extends { label: string; value: number }>(\n parts: T[],\n max = 8,\n keep = max - 1,\n): { kept: T[]; other: number } {\n const keepSet = keepLargest(\n parts,\n (part) => part.label,\n (part) => part.value,\n max,\n keep,\n );\n if (!keepSet) return { kept: parts, other: 0 };\n return {\n kept: parts.filter((part) => keepSet.has(part.label)),\n other: parts\n .filter((part) => !keepSet.has(part.label))\n .reduce((sum, part) => sum + part.value, 0),\n };\n}\n/** Names of series with no usable number at all: they draw nothing, so they get a note. */\nexport function unusableSeries(series: { name?: string; values?: unknown }[]): string[] {\n return series\n .filter((s) => !toNumbers(s.values).some((v) => typeof v === \"number\" && Number.isFinite(v)))\n .map((s, i) => s.name || `Series ${i + 1}`);\n}\n\n/**\n * Part-to-whole charts with compare on: each shown part's share last period, in the unit its share is shown in now\n * (percent of the whole, or the value itself when values are already shares). Other takes the parts folded into it.\n */\nexport function previousShareOf(labels: string[], previous: unknown, sharesGiven: boolean) {\n const before = toNumbers(previous);\n const byLabel = new Map<string, number>();\n labels.forEach((label, i) => {\n const value = before[i];\n if (typeof value === \"number\" && value > 0) byLabel.set(label, value);\n });\n const total = [...byLabel.values()].reduce((sum, value) => sum + value, 0);\n return (label: string, shown: string[]): number | null => {\n if (!total) return null;\n const raw =\n label === \"Other\"\n ? labels\n .filter((l) => !shown.includes(l))\n .reduce((sum, l) => sum + (byLabel.get(l) ?? 0), 0)\n : byLabel.get(label);\n if (raw === undefined) return null;\n return sharesGiven ? raw : (raw / total) * 100;\n };\n}\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const donutPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n centerLabel: z.string().optional(),\n previous: z.array(z.number()).optional(),\n});\nexport type DonutSchemaProps = z.infer<typeof donutPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { PieChart } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { foldParts } from \"../../../shared/parts\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { donutPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const DonutComponent = defineComponent({\n name: \"Donut\",\n props: donutPropsSchema,\n description:\n \"Part of a whole with the total as the headline, up to 8 parts; past 8, the smallest fold into Other. previous (last period's values, same order) adds each part's change in share, in points, to its tooltip while compare is on. For a compact strip, use SegmentedBar.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const parts = labels\n .map((label, i) => ({ label, value: Math.max(0, values[i] ?? 0) }))\n .filter((p) => p.value > 0);\n const { kept, other } = foldParts(parts, 8);\n const rows = [\n ...kept.map((p) => ({ name: p.label, value: p.value })),\n ...(other > 0 ? [{ name: \"Other\", value: other }] : []),\n ];\n const total = rows.reduce((sum, r) => sum + r.value, 0);\n const palette = rows.map((r, i) => (r.name === \"Other\" ? MUTED_COLOR : seriesColor(i)));\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-donut\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", alignItems: \"baseline\", gap: \"8px\" } }, [\n h(\"span\", { style: { fontSize: \"20px\", fontWeight: 700, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink)\" } }, formatValue(total, props.format)),\n props.centerLabel\n ? h(\"span\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.centerLabel)\n : null,\n ]),\n rows.length\n ? h(PieChart as never, {\n data: rows,\n categoryKey: \"name\",\n dataKey: \"value\",\n variant: \"donut\",\n customPalette: palette,\n isAnimationActive: false,\n })\n : null,\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const segmentedBarPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n});\nexport type SegmentedBarSchemaProps = z.infer<typeof segmentedBarPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { foldParts } from \"../../../shared/parts\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { segmentedBarPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SegmentedBarComponent = defineComponent({\n name: \"SegmentedBar\",\n props: segmentedBarPropsSchema,\n description:\n \"Part of a whole as one bar with a legend of values and shares; up to 8 parts. previous (last period's values, same order) adds each part's change in share, in points, to its tooltip while compare is on. Inside a headline tile, use a Kpi with a Split chart instead.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const parts = labels.map((label, i) => ({ label, value: Math.max(0, values[i] ?? 0) }));\n const { kept, other } = foldParts(parts, 8);\n const all = [...kept, ...(other > 0 ? [{ label: \"Other\", value: other }] : [])];\n const total = all.reduce((s, p) => s + p.value, 0) || 1;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-segmented-bar\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"12px\", width: \"100%\" },\n },\n [\n h(\n \"div\",\n { style: { display: \"flex\", height: \"16px\", borderRadius: \"6px\", overflow: \"hidden\", gap: \"2px\" } },\n all.map((p, i) =>\n h(\"div\", {\n key: p.label + i,\n title: `${p.label}: ${formatValue(p.value, props.format)} (${((p.value / total) * 100).toFixed(1)}%)`,\n style: {\n width: `${(p.value / total) * 100}%`,\n background: p.label === \"Other\" ? MUTED_COLOR : seriesColor(i),\n },\n }),\n ),\n ),\n h(\n \"div\",\n { style: { display: \"flex\", flexWrap: \"wrap\", alignItems: \"center\", gap: \"8px 20px\", fontSize: \"12px\" } },\n all.map((p, i) =>\n h(\"div\", { key: p.label + i, style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", whiteSpace: \"nowrap\" } }, [\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", color: \"var(--openui-dashboard-ink)\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"2px\", background: p.label === \"Other\" ? MUTED_COLOR : seriesColor(i), display: \"inline-block\", flexShrink: 0 } }),\n p.label,\n ]),\n h(\n \"span\",\n { style: { fontVariantNumeric: \"tabular-nums\", fontWeight: 500, color: \"var(--openui-dashboard-ink-secondary)\" } },\n props.format === \"percent\"\n ? formatValue(p.value, props.format)\n : `${formatValue(p.value, props.format)} · ${((p.value / total) * 100).toFixed(0)}%`,\n ),\n ]),\n ),\n ),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const treemapPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n groups: z.array(z.string()).optional(),\n});\nexport type TreemapSchemaProps = z.infer<typeof treemapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { treemapPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const TreemapComponent = defineComponent({\n name: \"Treemap\",\n props: treemapPropsSchema,\n description:\n \"Part to whole with many parts, or a hierarchy: area is size. groups (same length as labels) nests items under parents and colours by parent, e.g. category → product. Use Donut or SegmentedBar for ≤8 flat parts. previous (last period's values, same order) adds each item's change in share, in points, to its tooltip while compare is on.\",\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const groups = toStrings(props.groups);\n const groupOrder = [...new Set(groups.filter(Boolean))];\n const items = labels\n .map((label, i) => ({\n label,\n value: Math.max(0, values[i] ?? 0),\n group: groups[i] || \"\",\n }))\n .filter((x) => x.value > 0)\n .sort((a, b) => b.value - a.value);\n const total = items.reduce((s, x) => s + x.value, 0) || 1;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-treemap\",\n style: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \"4px\",\n width: \"100%\",\n minHeight: \"200px\",\n alignContent: \"stretch\",\n },\n },\n items.map((item, idx) => {\n const share = (item.value / total) * 100;\n const colorIdx = item.group ? Math.max(0, groupOrder.indexOf(item.group)) : idx;\n const textColor = colorIdx % 8 === 2 ? \"#0f172a\" : \"#ffffff\";\n return h(\n \"div\",\n {\n key: item.label + idx,\n title: `${item.label}${item.group ? ` (${item.group})` : \"\"}: ${formatValue(item.value, props.format)} (${share.toFixed(1)}%)`,\n style: {\n flex: `${Math.max(1, Math.round(share))} 1 ${Math.max(76, Math.round(share * 3))}px`,\n minHeight: \"56px\",\n padding: \"8px\",\n borderRadius: \"6px\",\n background: seriesColor(colorIdx),\n color: textColor,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"space-between\",\n overflow: \"hidden\",\n },\n },\n [\n h(\"span\", { style: { fontSize: \"12px\", fontWeight: 600, overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, item.label),\n h(\"span\", { style: { fontSize: \"11px\", opacity: 0.9, fontVariantNumeric: \"tabular-nums\" } }, `${formatValue(item.value, props.format)} (${share.toFixed(0)}%)`),\n ],\n );\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nexport const waterfallPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n endLabel: z.string().optional(),\n goodWhen: goodWhenSchema.optional(),\n subtotals: z.array(z.string()).optional(),\n});\nexport type WaterfallSchemaProps = z.infer<typeof waterfallPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { waterfallPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const WaterfallComponent = defineComponent({\n name: \"Waterfall\",\n props: waterfallPropsSchema,\n description:\n 'How a total moved: the first value is the starting total, the rest are signed changes, the end total is computed. Increases and decreases wear the good/bad status colours; pass goodWhen \"down\" when a decrease is the good outcome (costs). E.g. Waterfall([\"Start MRR\", \"New\", \"Expansion\", \"Churn\"], [398200, 18400, 9100, -9300], \"currency-compact\", \"End MRR\"). subtotals names labels drawn as the running total at that point (their values are ignored; pass 0), for a P&L: Waterfall([\"Revenue\", \"Cost of sales\", \"Gross profit\", \"Operating costs\"], [820000, -310000, 0, -280000], \"currency-compact\", \"Operating profit\", \"up\", [\"Gross profit\"]).',\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values);\n const subtotals = new Set(toStrings(props.subtotals));\n const goodWhen = props.goodWhen ?? \"up\";\n\n type BarItem = { label: string; start: number; end: number; delta: number; kind: \"total\" | \"up\" | \"down\" };\n const bars: BarItem[] = [];\n let running = 0;\n labels.forEach((label, i) => {\n const val = values[i] ?? 0;\n if (i === 0) {\n running = val;\n bars.push({ label, start: 0, end: running, delta: val, kind: \"total\" });\n } else if (subtotals.has(label)) {\n bars.push({ label, start: 0, end: running, delta: running, kind: \"total\" });\n } else {\n const start = running;\n running += val;\n bars.push({ label, start, end: running, delta: val, kind: val >= 0 ? \"up\" : \"down\" });\n }\n });\n if (bars.length > 0) {\n bars.push({ label: props.endLabel ?? \"Total\", start: 0, end: running, delta: running, kind: \"total\" });\n }\n\n const allPoints = bars.flatMap((b) => [0, b.start, b.end]);\n const min = Math.min(...allPoints, 0);\n const max = Math.max(...allPoints, 1);\n const span = max - min || 1;\n const pct = (v: number) => ((v - min) / span) * 100;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-waterfall\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\" },\n },\n bars.map((bar, idx) => {\n const left = Math.min(pct(bar.start), pct(bar.end));\n const width = Math.max(1.5, Math.abs(pct(bar.end) - pct(bar.start)));\n const color =\n bar.kind === \"total\"\n ? seriesColor(0)\n : (bar.kind === \"up\") === (goodWhen !== \"down\")\n ? \"var(--openui-dashboard-good-mark)\"\n : \"var(--openui-dashboard-bad-mark)\";\n return h(\"div\", { key: bar.label + idx, style: { display: \"grid\", gridTemplateColumns: \"120px 1fr 82px\", alignItems: \"center\", gap: \"8px\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { fontWeight: bar.kind === \"total\" ? 600 : 400, color: \"var(--openui-dashboard-ink)\", overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" } }, bar.label),\n h(\"div\", { style: { position: \"relative\", height: \"18px\", background: \"var(--openui-dashboard-surface-subtle)\", borderRadius: \"4px\" } }, [\n h(\"div\", { style: { position: \"absolute\", top: \"2px\", bottom: \"2px\", left: `${left}%`, width: `${width}%`, background: color, borderRadius: \"3px\" } }),\n ]),\n h(\"span\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", fontWeight: bar.kind === \"total\" ? 600 : 400, color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(bar.delta, props.format)),\n ]);\n }),\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { DonutComponent } from \"./Donut\";\nimport { SegmentedBarComponent } from \"./SegmentedBar\";\nimport { TreemapComponent } from \"./Treemap\";\nimport { WaterfallComponent } from \"./Waterfall\";\n\nexport const composition: Group = {\n components: [DonutComponent, SegmentedBarComponent, TreemapComponent, WaterfallComponent],\n styles: {},\n};\n","import { inject, type InjectionKey, type Ref } from \"vue\";\n\nexport const CardControlsContext: InjectionKey<boolean> = Symbol(\"OpenUI.Dashboard.CardControls\");\nexport const CardSlotContext: InjectionKey<Ref<HTMLElement | null> | null> = Symbol(\n \"OpenUI.Dashboard.CardSlot\",\n);\n\nexport function useInCardControls(): boolean {\n return inject(CardControlsContext, false);\n}\n","import {\n computed,\n defineComponent,\n inject,\n onScopeDispose,\n provide,\n ref,\n toValue,\n useId,\n watchEffect,\n type ComputedRef,\n type InjectionKey,\n type MaybeRefOrGetter,\n} from \"vue\";\nimport { CardControlsContext } from \"./cardSlot\";\n\ntype FilterEntry = { active: boolean };\ninterface FilterRegistry {\n set: (key: string, entry: FilterEntry | null) => void;\n entries: Map<string, FilterEntry>;\n baselines: Map<string, string>;\n version: { value: number };\n}\n\nconst FilterRegistryKey: InjectionKey<FilterRegistry | null> = Symbol(\n \"OpenUI.Dashboard.FilterRegistry\",\n);\n\nexport const FilterRegistryProvider = defineComponent({\n name: \"OpenUIDashboardFilterRegistryProvider\",\n setup(_, { slots }) {\n const version = ref(0);\n const entries = new Map<string, FilterEntry>();\n const baselines = new Map<string, string>();\n provide(FilterRegistryKey, {\n entries,\n baselines,\n version,\n set: (key, entry) => {\n const before = entries.get(key);\n if (entry) entries.set(key, entry);\n else entries.delete(key);\n if ((before?.active ?? false) !== (entry?.active ?? false)) {\n version.value += 1;\n }\n },\n });\n return () => slots.default?.();\n },\n});\n\nexport function useReportFilter(\n name: MaybeRefOrGetter<string>,\n value: MaybeRefOrGetter<unknown>,\n) {\n const registry = inject(FilterRegistryKey, null);\n const inCard = inject(CardControlsContext, false);\n const uid = useId();\n let lastKey: string | null = null;\n let initialSerialized: string | null = null;\n\n watchEffect(() => {\n if (!registry || inCard) return;\n const filterName = toValue(name);\n const key = `${filterName}#${uid}`;\n const serialized = JSON.stringify(toValue(value) ?? null);\n if (initialSerialized === null) initialSerialized = serialized;\n if (!registry.baselines.has(filterName)) {\n registry.baselines.set(filterName, initialSerialized);\n }\n const baseline = registry.baselines.get(filterName) ?? initialSerialized;\n if (lastKey && lastKey !== key) registry.set(lastKey, null);\n lastKey = key;\n registry.set(key, { active: serialized !== baseline });\n });\n\n onScopeDispose(() => {\n if (registry && lastKey) registry.set(lastKey, null);\n });\n}\n\nexport function useActiveFilters(): ComputedRef<{ active: boolean }> {\n const registry = inject(FilterRegistryKey, null);\n return computed(() => {\n if (!registry) return { active: false };\n void registry.version.value;\n return { active: [...registry.entries.values()].some((entry) => entry.active) };\n });\n}\n","import { z } from \"zod/v4\";\nexport const optionSchema = z.object({ value: z.string(), label: z.string().optional() });\nexport type FilterOption = z.infer<typeof optionSchema>;\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const chipFilterPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema),\n label: z.string().optional(),\n});\nexport type ChipFilterSchemaProps = z.infer<typeof chipFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { chipFilterPropsSchema, type ChipFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ChipFilterImpl = vueComponent({\n name: \"OpenUIDashboardChipFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<ChipFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-chip-filter\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", flexWrap: \"wrap\" },\n },\n [\n p.props.label\n ? h(\"span\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, p.props.label)\n : null,\n ...opts.map((opt) => {\n const active = current === opt.value;\n return h(\n \"button\",\n {\n key: opt.value,\n type: \"button\",\n \"aria-pressed\": active,\n onClick: () => field.setValue(opt.value),\n style: {\n padding: \"4px 10px\",\n borderRadius: \"999px\",\n fontSize: \"12px\",\n fontWeight: active ? 600 : 500,\n cursor: \"pointer\",\n background: active\n ? \"color-mix(in srgb, var(--openui-dashboard-series-1) 14%, var(--openui-dashboard-surface))\"\n : \"var(--openui-dashboard-neutral-soft)\",\n color: active ? \"var(--openui-dashboard-series-1)\" : \"var(--openui-dashboard-ink)\",\n border: active\n ? \"1px solid color-mix(in srgb, var(--openui-dashboard-series-1) 36%, transparent)\"\n : \"1px solid transparent\",\n },\n },\n opt.label ?? opt.value,\n );\n }),\n ],\n );\n };\n },\n});\n\nexport const ChipFilterComponent = defineComponent({\n name: \"ChipFilter\",\n props: chipFilterPropsSchema,\n description:\n \"Pills for 2–6 segments; one is always selected. value takes the $variable that holds the selected option's value. In a FilterBar for a dashboard-wide segment, or in a Card's controls to switch that card's breakdown (leave label out there: the card title names it).\",\n component: ChipFilterImpl,\n});\n","import { h, type VNode } from \"vue\";\n\nexport interface StyledSelectOption {\n value: string;\n label?: string;\n}\n\nexport function renderStyledSelect(opts: {\n id?: string;\n value: string;\n options: StyledSelectOption[];\n onChange: (value: string) => void;\n}): VNode {\n return h(\n \"span\",\n {\n class: \"openui-dashboard-select-wrap\",\n style: {\n position: \"relative\",\n display: \"inline-flex\",\n alignItems: \"center\",\n },\n },\n [\n h(\n \"select\",\n {\n id: opts.id,\n value: opts.value,\n class: \"openui-dashboard-select\",\n style: {\n appearance: \"none\",\n WebkitAppearance: \"none\",\n padding: \"5px 28px 5px 10px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n fontSize: \"12px\",\n lineHeight: \"1.4\",\n cursor: \"pointer\",\n },\n onChange: (e: Event) => opts.onChange((e.target as HTMLSelectElement).value),\n },\n opts.options.map((opt) =>\n h(\"option\", { key: opt.value, value: opt.value }, opt.label ?? opt.value),\n ),\n ),\n h(\n \"svg\",\n {\n width: \"12\",\n height: \"12\",\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n style: {\n position: \"absolute\",\n right: \"9px\",\n pointerEvents: \"none\",\n color: \"var(--openui-dashboard-ink-muted)\",\n },\n },\n [\n h(\"path\", {\n d: \"M3 4.5L6 7.5L9 4.5\",\n stroke: \"currentColor\",\n \"stroke-width\": \"1.5\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ],\n ),\n ],\n );\n}\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const compareTogglePropsSchema = z.object({\n label: z.string().optional(),\n defaultOn: z.boolean().optional(),\n value: reactive(z.string().optional()),\n options: z.array(optionSchema).optional(),\n});\nexport type CompareToggleSchemaProps = z.infer<typeof compareTogglePropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, watchEffect, type PropType } from \"vue\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { renderStyledSelect } from \"../styledSelect\";\nimport { compareTogglePropsSchema, type CompareToggleSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CompareToggleImpl = vueComponent({\n name: \"OpenUIDashboardCompareToggle\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<CompareToggleSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const compare = useCompare();\n const field = useStateField(\n () => p.statementId || \"compare\",\n () => p.props.value,\n );\n let initialized = false;\n\n watchEffect(() => {\n const opts = Array.isArray(p.props.options) && p.props.options.length > 0\n ? p.props.options\n : [{ value: \"on\", label: p.props.label || \"Previous period\" }];\n\n if (!initialized) {\n initialized = true;\n if (p.props.defaultOn) {\n compare.setEnabled(true);\n compare.setLabel(opts[0]!.label ?? opts[0]!.value);\n if (field.isReactive && (!field.value || field.value === \"off\")) {\n field.setValue(opts[0]!.value);\n }\n }\n }\n });\n\n return () => {\n const opts = Array.isArray(p.props.options) && p.props.options.length > 0\n ? p.props.options\n : [{ value: \"on\", label: p.props.label || \"Previous period\" }];\n const current = field.isReactive\n ? String(field.value ?? (compare.enabled.value ? opts[0]!.value : \"off\"))\n : compare.enabled.value\n ? opts[0]!.value\n : \"off\";\n\n const isZh = typeof document !== \"undefined\" && document.documentElement.lang.toLowerCase().startsWith(\"zh\");\n return h(\n \"label\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-compare-toggle\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-secondary)\" },\n },\n [\n h(\"span\", null, isZh ? \"对比\" : \"Compare\"),\n renderStyledSelect({\n id,\n value: current,\n options: [{ value: \"off\", label: isZh ? \"关闭\" : \"None\" }, ...opts],\n onChange: (next) => {\n if (field.isReactive) field.setValue(next);\n if (next === \"off\") {\n compare.setEnabled(false);\n } else {\n const chosen = opts.find((o) => o.value === next);\n compare.setLabel(chosen?.label ?? chosen?.value ?? \"Previous period\");\n compare.setEnabled(true);\n }\n },\n }),\n ],\n );\n };\n },\n});\n\nexport const CompareToggleComponent = defineComponent({\n name: \"CompareToggle\",\n props: compareTogglePropsSchema,\n description:\n 'Add one only when some component is given previous values. Compare dropdown: None, or one of options (e.g. [{value: \"prev\", label: \"Previous 30 days\"}, {value: \"yoy\", label: \"Same 30 days last year\"}]). The choice overlays the previous data on every chart that has it (dashed lines, ghost bars, funnel markers) and names it in legends and deltas. Without options it is one choice named by label (default \"Previous period\"): CompareToggle(\"Previous week\", true). Starts at None; defaultOn starts on the first choice. value, the third argument, takes the $variable, and is only needed with options: it holds the chosen option\\'s value, or \"off\" for None ($compare = \"off\"); key each chart\\'s previous data by it (prev[$compare]), so each choice shows its own data.',\n component: CompareToggleImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const dateRangeFilterPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema).optional(),\n label: z.string().optional(),\n});\nexport type DateRangeFilterSchemaProps = z.infer<typeof dateRangeFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { renderStyledSelect } from \"../styledSelect\";\nimport { dateRangeFilterPropsSchema, type DateRangeFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst DEFAULT_PRESETS = [\n { value: \"7d\", label: \"Last 7 days\" },\n { value: \"30d\", label: \"Last 30 days\" },\n { value: \"90d\", label: \"Last 90 days\" },\n { value: \"12m\", label: \"Last 12 months\" },\n { value: \"ytd\", label: \"Year to date\" },\n];\n\nconst DateRangeFilterImpl = vueComponent({\n name: \"OpenUIDashboardDateRangeFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<DateRangeFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) && p.props.options.length > 0 ? p.props.options : DEFAULT_PRESETS;\n const current = field.value == null ? opts[0]!.value : String(field.value);\n return h(\n \"label\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-date-range-filter\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-secondary)\" },\n },\n [\n p.props.label ? h(\"span\", null, p.props.label) : null,\n renderStyledSelect({\n value: current,\n options: opts,\n onChange: (next) => field.setValue(next),\n }),\n ],\n );\n };\n },\n});\n\nexport const DateRangeFilterComponent = defineComponent({\n name: \"DateRangeFilter\",\n props: dateRangeFilterPropsSchema,\n description:\n 'Dropdown of preset options (default 7d, 30d, 90d, 12m, ytd) and a calendar for a custom range; value takes the $variable that holds the selection: a preset key (\"30d\") or a custom range \"2026-10-01..2026-10-31\". For live data, pass that $variable into query arguments; with data written into the program, use PeriodPicker.',\n component: DateRangeFilterImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const multiSelectFilterPropsSchema = z.object({\n value: reactive(z.array(z.string())),\n options: z.array(optionSchema),\n label: z.string(),\n});\nexport type MultiSelectFilterSchemaProps = z.infer<typeof multiSelectFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { multiSelectFilterPropsSchema, type MultiSelectFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst MultiSelectFilterImpl = vueComponent({\n name: \"OpenUIDashboardMultiSelectFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<MultiSelectFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const open = ref(false);\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const selected = Array.isArray(field.value) ? (field.value as string[]) : [];\n const isZh = typeof document !== \"undefined\" && document.documentElement.lang.toLowerCase().startsWith(\"zh\");\n const summary =\n selected.length === 0\n ? isZh\n ? `${p.props.label}:全部`\n : `${p.props.label}: All`\n : `${p.props.label} (${selected.length})`;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-multiselect-filter\",\n style: { position: \"relative\", display: \"inline-block\" },\n },\n [\n h(\n \"button\",\n {\n type: \"button\",\n class: \"openui-dashboard-select\",\n \"aria-expanded\": open.value,\n onClick: () => {\n open.value = !open.value;\n },\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"8px\",\n padding: \"5px 10px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n fontSize: \"12px\",\n lineHeight: \"1.4\",\n cursor: \"pointer\",\n },\n },\n [\n h(\"span\", null, summary),\n h(\n \"svg\",\n {\n width: \"12\",\n height: \"12\",\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n style: { color: \"var(--openui-dashboard-ink-muted)\", flexShrink: 0 },\n },\n [\n h(\"path\", {\n d: \"M3 4.5L6 7.5L9 4.5\",\n stroke: \"currentColor\",\n \"stroke-width\": \"1.5\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n }),\n ],\n ),\n ],\n ),\n open.value\n ? h(\n \"div\",\n {\n style: {\n position: \"absolute\",\n top: \"calc(100% + 4px)\",\n left: 0,\n zIndex: 30,\n minWidth: \"180px\",\n padding: \"8px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n boxShadow: \"var(--openui-dashboard-shadow-pop)\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n },\n },\n opts.map((opt) => {\n const checked = selected.includes(opt.value);\n return h(\n \"label\",\n { key: opt.value, style: { display: \"flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", cursor: \"pointer\" } },\n [\n h(\"input\", {\n type: \"checkbox\",\n checked,\n style: { accentColor: \"var(--openui-dashboard-accent)\" },\n onChange: () => {\n const next = checked\n ? selected.filter((v) => v !== opt.value)\n : [...selected, opt.value];\n field.setValue(next);\n },\n }),\n opt.label ?? opt.value,\n ],\n );\n }),\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const MultiSelectFilterComponent = defineComponent({\n name: \"MultiSelectFilter\",\n props: multiSelectFilterPropsSchema,\n description:\n \"Dropdown with checkboxes. value takes the $variable that holds an array of the selected options' values ($plans = [], and [] means all). For live data, pass that $variable into query arguments; with data written into the program, use ChipFilter or SelectFilter.\",\n component: MultiSelectFilterImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const periodPickerPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema),\n});\nexport type PeriodPickerSchemaProps = z.infer<typeof periodPickerPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { periodPickerPropsSchema, type PeriodPickerSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PeriodPickerImpl = vueComponent({\n name: \"OpenUIDashboardPeriodPicker\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<PeriodPickerSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n role: \"tablist\",\n class: \"openui-dashboard-period-picker\",\n style: {\n display: \"inline-flex\",\n padding: \"2px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n background: \"var(--openui-dashboard-neutral-soft)\",\n gap: \"2px\",\n },\n },\n opts.map((opt) => {\n const active = current === opt.value;\n return h(\n \"button\",\n {\n key: opt.value,\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": active,\n onClick: () => field.setValue(opt.value),\n style: {\n padding: \"4px 10px\",\n borderRadius: \"6px\",\n fontSize: \"12px\",\n fontWeight: active ? 600 : 500,\n border: \"none\",\n cursor: \"pointer\",\n background: active ? \"var(--openui-dashboard-surface)\" : \"transparent\",\n color: active ? \"var(--openui-dashboard-ink)\" : \"var(--openui-dashboard-ink-secondary)\",\n boxShadow: active ? \"var(--openui-dashboard-shadow)\" : undefined,\n },\n },\n opt.label ?? opt.value,\n );\n }),\n );\n };\n },\n});\n\nexport const PeriodPickerComponent = defineComponent({\n name: \"PeriodPicker\",\n props: periodPickerPropsSchema,\n description:\n 'Segmented control for a few date presets, e.g. [{value: \"7d\", label: \"7D\"}, {value: \"30d\", label: \"30D\"}]. value takes the $variable that holds the selected option\\'s value ($period = \"30d\"). Pass that $variable into query arguments (live data), or key written-in data by it.',\n component: PeriodPickerImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { optionSchema } from \"../optionSchema\";\n\nexport const selectFilterPropsSchema = z.object({\n value: reactive(z.string()),\n options: z.array(optionSchema),\n label: z.string(),\n});\nexport type SelectFilterSchemaProps = z.infer<typeof selectFilterPropsSchema>;\n","import { defineComponent, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, useId, type PropType } from \"vue\";\nimport { useReportFilter } from \"../../../shared/filterRegistry\";\nimport { renderStyledSelect } from \"../styledSelect\";\nimport { selectFilterPropsSchema, type SelectFilterSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SelectFilterImpl = vueComponent({\n name: \"OpenUIDashboardSelectFilter\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<SelectFilterSchemaProps>, required: true },\n statementId: String,\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const id = useId();\n const name = () => p.statementId || p.props.label || id;\n const field = useStateField(name, () => p.props.value);\n useReportFilter(name, () => field.value);\n\n return () => {\n const opts = Array.isArray(p.props.options) ? p.props.options : [];\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"label\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-select-filter\",\n style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-secondary)\" },\n },\n [\n p.props.label ? h(\"span\", null, p.props.label) : null,\n renderStyledSelect({\n value: current,\n options: opts,\n onChange: (next) => field.setValue(next),\n }),\n ],\n );\n };\n },\n});\n\nexport const SelectFilterComponent = defineComponent({\n name: \"SelectFilter\",\n props: selectFilterPropsSchema,\n description:\n \"Dropdown for one value out of a longer list. value takes the $variable that holds the selected option's value. In a FilterBar for a dashboard-wide segment, or in a Card's controls to switch that card's breakdown.\",\n component: SelectFilterImpl,\n});\n","import { z } from \"zod/v4\";\nimport { ChipFilterComponent } from \"../ChipFilter\";\nimport { CompareToggleComponent } from \"../CompareToggle\";\nimport { DateRangeFilterComponent } from \"../DateRangeFilter\";\nimport { MultiSelectFilterComponent } from \"../MultiSelectFilter\";\nimport { PeriodPickerComponent } from \"../PeriodPicker\";\nimport { SelectFilterComponent } from \"../SelectFilter\";\n\nexport const filterBarPropsSchema = z.object({\n filters: z.array(\n z.union([\n PeriodPickerComponent.ref,\n DateRangeFilterComponent.ref,\n ChipFilterComponent.ref,\n SelectFilterComponent.ref,\n MultiSelectFilterComponent.ref,\n CompareToggleComponent.ref,\n ]),\n ),\n});\nexport type FilterBarSchemaProps = z.infer<typeof filterBarPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { filterBarPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const FilterBarComponent = defineComponent({\n name: \"FilterBar\",\n props: filterBarPropsSchema,\n description: \"Sticky row of dashboard-wide filters, right after the header.\",\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-filter-bar\",\n style: {\n position: \"sticky\",\n top: 0,\n zIndex: 20,\n display: \"flex\",\n flexWrap: \"wrap\",\n alignItems: \"center\",\n gap: \"12px 18px\",\n padding: \"10px 16px\",\n borderRadius: \"var(--openui-dashboard-radius)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n boxShadow: \"var(--openui-dashboard-shadow)\",\n },\n },\n [renderNode(props.filters)],\n ),\n});\n","import type { Group } from \"../group\";\nimport { ChipFilterComponent } from \"./ChipFilter\";\nimport { CompareToggleComponent } from \"./CompareToggle\";\nimport { DateRangeFilterComponent } from \"./DateRangeFilter\";\nimport { FilterBarComponent } from \"./FilterBar\";\nimport { MultiSelectFilterComponent } from \"./MultiSelectFilter\";\nimport { PeriodPickerComponent } from \"./PeriodPicker\";\nimport { SelectFilterComponent } from \"./SelectFilter\";\n\nexport const filters: Group = {\n components: [\n FilterBarComponent,\n PeriodPickerComponent,\n DateRangeFilterComponent,\n ChipFilterComponent,\n SelectFilterComponent,\n MultiSelectFilterComponent,\n CompareToggleComponent,\n ],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nexport const flowPropsSchema = z.object({\n from: z.array(z.string()),\n to: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n});\nexport type FlowSchemaProps = z.infer<typeof flowPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { flowPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst LOSS_NAMES = new Set([\"dropped\", \"exited\", \"churned\"]);\n\nexport const FlowComponent = defineComponent({\n name: \"Flow\",\n props: flowPropsSchema,\n description:\n 'Sankey of a quantity between stages. from, to and values have one entry per link, as query rows give them: Flow(f.rows.source, f.rows.target, f.rows.users), or written in: Flow([\"Paid search\", \"Signed up\"], [\"Signed up\", \"Activated\"], [1210, 640]). Name loss nodes \"Dropped\", \"Exited\" or \"Churned\" (drawn grey). Links only move forward: one that loops back to an earlier node isn\\'t drawn. Keep to ~4 columns and ~15 nodes. previous (last period\\'s volume, one per link) adds each link\\'s and step\\'s change to the tooltips while compare is on.',\n component: ({ props, bindSource }) => {\n const froms = toStrings(props.from);\n const tos = toStrings(props.to);\n const vals = toNumbers(props.values);\n const links = froms\n .map((from, i) => ({ from, to: tos[i] ?? \"\", value: Math.max(0, vals[i] ?? 0) }))\n .filter((l) => l.from && l.to && l.value > 0);\n const maxVal = Math.max(...links.map((l) => l.value), 1);\n const sources = [...new Set(links.map((l) => l.from))];\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-flow\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\" },\n },\n links.map((link, idx) => {\n const isLoss = LOSS_NAMES.has(link.to.toLowerCase());\n const color = isLoss ? MUTED_COLOR : seriesColor(Math.max(0, sources.indexOf(link.from)));\n return h(\"div\", { key: idx, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\", fontSize: \"12px\" } }, [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", gap: \"8px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\" } }, `${link.from} → ${link.to}`),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", fontWeight: 600, color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(link.value, props.format)),\n ]),\n h(\n \"div\",\n { style: { height: \"8px\", borderRadius: \"4px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${(link.value / maxVal) * 100}%`, height: \"100%\", background: color } })],\n ),\n ]);\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\n// Funnel's segments are Series, which the Trends group owns and registers.\nimport { SeriesComponent } from \"../../trends/Series\";\nexport const funnelPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n shape: z.enum([\"bars\", \"funnel\"]).optional(),\n segments: z.array(SeriesComponent.ref).optional(),\n basis: z.enum([\"step\", \"start\"]).optional(),\n});\nexport type FunnelSchemaProps = z.infer<typeof funnelPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { funnelPropsSchema, type FunnelSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst FunnelImpl = vueComponent({\n name: \"OpenUIDashboardFunnel\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<FunnelSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const basis = ref<\"step\" | \"start\">(p.props.basis ?? \"step\");\n\n return () => {\n const labels = toStrings(p.props.labels);\n const values = toNumbers(p.props.values).map((v) => Math.max(0, v ?? 0));\n const first = values[0] || 1;\n\n const isZh = typeof document !== \"undefined\" && /^zh\\b/i.test(document.documentElement.lang || \"\");\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-funnel\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"flex-end\", gap: \"6px\", fontSize: \"11px\" } }, [\n h(\n \"button\",\n {\n type: \"button\",\n onClick: () => {\n basis.value = basis.value === \"step\" ? \"start\" : \"step\";\n },\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink-secondary)\",\n cursor: \"pointer\",\n },\n },\n basis.value === \"step\"\n ? isZh ? \"转化率:环比\" : \"Rate: step-to-step\"\n : isZh ? \"转化率:累计\" : \"Rate: from start\",\n ),\n ]),\n ...labels.map((label, i) => {\n const val = values[i] ?? 0;\n const prevStep = i === 0 ? first : values[i - 1] || 1;\n const rate = basis.value === \"step\" ? (val / prevStep) * 100 : (val / first) * 100;\n const widthPct = Math.min(100, (val / first) * 100);\n return h(\"div\", { key: label + i, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"13px\" } }, [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\", fontWeight: 500 } }, label),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, `${formatValue(val, p.props.format)} · ${rate.toFixed(1)}%`),\n ]),\n h(\n \"div\",\n { style: { height: \"14px\", borderRadius: \"4px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${widthPct}%`, height: \"100%\", background: seriesColor(0), opacity: 1 - i * 0.08 } })],\n ),\n ]);\n }),\n ],\n );\n };\n },\n});\n\nexport const FunnelComponent = defineComponent({\n name: \"Funnel\",\n props: funnelPropsSchema,\n description:\n 'Ordered conversion steps, scaled to the first step, with step-to-step conversion and drop-off; the weakest step is flagged. A switch reads the rates step to step or from the start; basis \"start\" opens on the second. segments splits each step by plan, channel or cohort: Series(\"Enterprise\", [...]) per segment, one value per step, summing to values (up to 8); like stacked Bars, a split funnel doesn\\'t draw previous. shape \"bars\" (default) lists the steps as rows; \"funnel\" draws a left-to-right funnel whose height follows each step (it falls back to bars when the card is too narrow, under about 100px per step).',\n component: FunnelImpl,\n});\n","import type { Group } from \"../group\";\nimport { FlowComponent } from \"./Flow\";\nimport { FunnelComponent } from \"./Funnel\";\n\nexport const flow: Group = {\n components: [FlowComponent, FunnelComponent],\n styles: {},\n};\n","import type { GeoGeometryObjects } from \"d3-geo\";\nimport { feature } from \"topojson-client\";\n\nexport interface Shape extends Record<string, unknown> {\n type: \"Feature\";\n id?: string | number;\n geometry: GeoGeometryObjects;\n properties: { name: string };\n}\n\nconst shapeCache: Partial<Record<\"world\" | \"us\", Promise<Shape[]>>> = {};\n\nexport function loadShapes(region: \"world\" | \"us\"): Promise<Shape[]> {\n shapeCache[region] ??= (\n region === \"us\"\n ? import(\"us-atlas/states-10m.json\").then((module) => {\n const topology = (module.default ?? module) as any;\n const collection = feature(topology, topology.objects.states) as any;\n return (collection.features ?? []) as Shape[];\n })\n : import(\"world-atlas/countries-110m.json\").then((module) => {\n const topology = (module.default ?? module) as any;\n const collection = feature(topology, topology.objects.countries) as any;\n return ((collection.features ?? []) as Shape[]).filter(\n (shape) => shape.properties?.name !== \"Antarctica\",\n );\n })\n ) as Promise<Shape[]>;\n return shapeCache[region]!;\n}\n\nexport function retryShapes(region: \"world\" | \"us\") {\n delete shapeCache[region];\n}\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nexport const geoMapPropsSchema = z.object({\n region: z.enum([\"world\", \"us\"]),\n labels: z.array(z.string()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n goodWhen: goodWhenSchema.optional(),\n limit: z.number().optional(),\n view: z.enum([\"count\", \"total\"]).optional(),\n});\nexport type GeoMapSchemaProps = z.infer<typeof geoMapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { geoAlbersUsa, geoNaturalEarth1, geoPath } from \"d3-geo\";\nimport { defineComponent as vueComponent, h, ref, shallowRef, watch, type PropType } from \"vue\";\nimport { loadShapes, type Shape } from \"../../../shared/atlas\";\nimport { sequentialColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { geoMapPropsSchema, type GeoMapSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst US_ABBR: Record<string, string> = {\n AL: \"Alabama\", AK: \"Alaska\", AZ: \"Arizona\", AR: \"Arkansas\", CA: \"California\", CO: \"Colorado\",\n CT: \"Connecticut\", DE: \"Delaware\", FL: \"Florida\", GA: \"Georgia\", HI: \"Hawaii\", ID: \"Idaho\",\n IL: \"Illinois\", IN: \"Indiana\", IA: \"Iowa\", KS: \"Kansas\", KY: \"Kentucky\", LA: \"Louisiana\",\n ME: \"Maine\", MD: \"Maryland\", MA: \"Massachusetts\", MI: \"Michigan\", MN: \"Minnesota\", MS: \"Mississippi\",\n MO: \"Missouri\", MT: \"Montana\", NE: \"Nebraska\", NV: \"Nevada\", NH: \"New Hampshire\", NJ: \"New Jersey\",\n NM: \"New Mexico\", NY: \"New York\", NC: \"North Carolina\", ND: \"North Dakota\", OH: \"Ohio\", OK: \"Oklahoma\",\n OR: \"Oregon\", PA: \"Pennsylvania\", RI: \"Rhode Island\", SC: \"South Carolina\", SD: \"South Dakota\",\n TN: \"Tennessee\", TX: \"Texas\", UT: \"Utah\", VT: \"Vermont\", VA: \"Virginia\", WA: \"Washington\",\n WV: \"West Virginia\", WI: \"Wisconsin\", WY: \"Wyoming\", DC: \"District of Columbia\",\n};\n\nconst WORLD_ALIAS: Record<string, string> = {\n US: \"United States of America\", USA: \"United States of America\", \"UNITED STATES\": \"United States of America\",\n UK: \"United Kingdom\", GB: \"United Kingdom\", GBR: \"United Kingdom\",\n DE: \"Germany\", DEU: \"Germany\", FR: \"France\", FRA: \"France\", CN: \"China\", CHN: \"China\",\n JP: \"Japan\", JPN: \"Japan\", IN: \"India\", IND: \"India\", BR: \"Brazil\", BRA: \"Brazil\",\n CA: \"Canada\", CAN: \"Canada\", AU: \"Australia\", AUS: \"Australia\",\n};\n\nfunction normalizeGeoName(label: string, region: \"world\" | \"us\"): string {\n const upper = label.trim().toUpperCase();\n if (region === \"us\") return (US_ABBR[upper] ?? label.trim()).toLowerCase();\n return (WORLD_ALIAS[upper] ?? label.trim()).toLowerCase();\n}\n\nconst GeoMapImpl = vueComponent({\n name: \"OpenUIDashboardGeoMap\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<GeoMapSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const shapes = shallowRef<Shape[]>([]);\n const hovered = ref<string | null>(null);\n\n watch(\n () => p.props.region,\n (region) => {\n void loadShapes(region).then((loaded) => {\n shapes.value = loaded;\n });\n },\n { immediate: true },\n );\n\n return () => {\n const labels = toStrings(p.props.labels);\n const values = toNumbers(p.props.values);\n const entries = labels\n .map((label, i) => ({\n label,\n key: normalizeGeoName(label, p.props.region),\n value: values[i] ?? 0,\n }))\n .sort((a, b) => b.value - a.value);\n const byKey = new Map(entries.map((e) => [e.key, e]));\n const nums = entries.map((e) => e.value);\n const min = nums.length ? Math.min(...nums) : 0;\n const max = nums.length ? Math.max(...nums) : 1;\n\n const projection =\n p.props.region === \"us\"\n ? geoAlbersUsa().scale(680).translate([280, 170])\n : geoNaturalEarth1().scale(105).translate([280, 175]);\n const pathGen = geoPath(projection);\n const shown =\n typeof p.props.limit === \"number\" && p.props.limit > 0\n ? entries.slice(0, Math.round(p.props.limit))\n : entries;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-geo-map\",\n style: { display: \"grid\", gridTemplateColumns: \"minmax(0, 1.8fr) minmax(160px, 1fr)\", gap: \"16px\", width: \"100%\", alignItems: \"start\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\" } }, [\n h(\n \"svg\",\n {\n viewBox: \"0 0 560 340\",\n role: \"img\",\n \"aria-label\": `${p.props.region.toUpperCase()} choropleth map`,\n style: { width: \"100%\", height: \"auto\", display: \"block\" },\n },\n shapes.value.map((shape, idx) => {\n const name = shape.properties?.name ?? \"\";\n const match = byKey.get(name.toLowerCase());\n const d = pathGen(shape) ?? undefined;\n const fill = match\n ? sequentialColor(match.value, min * 0.5, max).background\n : \"var(--openui-dashboard-map-land)\";\n const active = hovered.value && hovered.value === name.toLowerCase();\n return h(\"path\", {\n key: name || idx,\n d,\n fill,\n stroke: active ? \"var(--openui-dashboard-ink)\" : \"var(--openui-dashboard-surface)\",\n \"stroke-width\": active ? 1.5 : 0.6,\n onMouseenter: () => {\n hovered.value = name.toLowerCase();\n },\n onMouseleave: () => {\n hovered.value = null;\n },\n });\n }),\n ),\n entries.length > 1\n ? h(\"div\", { style: { display: \"flex\", alignItems: \"center\", gap: \"8px\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } }, [\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\" } }, formatValue(min, p.props.format)),\n h(\"div\", {\n style: {\n flex: \"0 1 120px\",\n height: \"6px\",\n borderRadius: \"999px\",\n background: \"linear-gradient(90deg, var(--openui-dashboard-seq-2), var(--openui-dashboard-seq-5), var(--openui-dashboard-seq-9))\",\n },\n }),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\" } }, formatValue(max, p.props.format)),\n ])\n : null,\n ]),\n h(\n \"div\",\n { style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", maxHeight: \"320px\", overflowY: \"auto\", fontSize: \"12px\" } },\n shown.map((item, idx) =>\n h(\n \"div\",\n {\n key: item.label + idx,\n onMouseenter: () => {\n hovered.value = item.key;\n },\n onMouseleave: () => {\n hovered.value = null;\n },\n style: {\n display: \"flex\",\n justifyContent: \"space-between\",\n padding: \"4px 6px\",\n borderRadius: \"4px\",\n background: hovered.value === item.key ? \"var(--openui-dashboard-neutral-soft)\" : \"transparent\",\n },\n },\n [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink)\" } }, item.label),\n h(\"span\", { style: { fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(item.value, p.props.format)),\n ],\n ),\n ),\n ),\n ],\n );\n };\n },\n});\n\nexport const GeoMapComponent = defineComponent({\n name: \"GeoMap\",\n props: geoMapPropsSchema,\n description:\n 'Choropleth with a ranked list of every region (limit keeps the top N). region \"world\" takes country names or ISO codes (\"DE\", \"GBR\"); \"us\" takes state names or codes (\"NY\"). A switch reads regions as counts or % of total (view \"total\" opens on shares); hovering the map or the list highlights the same region in both. Use width \"two-thirds\" or \"full\".',\n component: GeoMapImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nexport const pointMapPropsSchema = z.object({\n region: z.enum([\"world\", \"us\"]),\n labels: z.array(z.string()),\n lats: z.array(z.number()),\n lons: z.array(z.number()),\n values: z.array(z.number()),\n format: formatSchema.optional(),\n previous: z.array(z.number()).optional(),\n goodWhen: goodWhenSchema.optional(),\n groups: z.array(z.string()).optional(),\n valueLabel: z.string().optional(),\n});\nexport type PointMapSchemaProps = z.infer<typeof pointMapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { geoAlbersUsa, geoNaturalEarth1, geoPath } from \"d3-geo\";\nimport { defineComponent as vueComponent, h, shallowRef, watch, type PropType } from \"vue\";\nimport { loadShapes, type Shape } from \"../../../shared/atlas\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { pointMapPropsSchema, type PointMapSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PointMapImpl = vueComponent({\n name: \"OpenUIDashboardPointMap\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<PointMapSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const shapes = shallowRef<Shape[]>([]);\n watch(\n () => p.props.region,\n (region) => {\n void loadShapes(region).then((loaded) => {\n shapes.value = loaded;\n });\n },\n { immediate: true },\n );\n\n return () => {\n const labels = toStrings(p.props.labels);\n const lats = toNumbers(p.props.lats);\n const lons = toNumbers(p.props.lons);\n const values = toNumbers(p.props.values);\n const groups = toStrings(p.props.groups);\n const groupOrder = [...new Set(groups.filter(Boolean))];\n\n const projection =\n p.props.region === \"us\"\n ? geoAlbersUsa().scale(680).translate([280, 170])\n : geoNaturalEarth1().scale(105).translate([280, 175]);\n const pathGen = geoPath(projection);\n\n const points = labels\n .map((label, i) => {\n const lat = lats[i];\n const lon = lons[i];\n const val = Math.max(0, values[i] ?? 0);\n const projected = lat !== null && lon !== null && lat !== undefined && lon !== undefined ? projection([lon, lat]) : null;\n return { label, val, group: groups[i] || \"\", xy: projected };\n })\n .sort((a, b) => b.val - a.val);\n const maxVal = Math.max(...points.map((pt) => pt.val), 1);\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-point-map\",\n style: { display: \"grid\", gridTemplateColumns: \"minmax(0, 1.8fr) minmax(160px, 1fr)\", gap: \"16px\", width: \"100%\", alignItems: \"start\" },\n },\n [\n h(\n \"svg\",\n {\n viewBox: \"0 0 560 340\",\n role: \"img\",\n \"aria-label\": `${p.props.region.toUpperCase()} point map`,\n style: { width: \"100%\", height: \"auto\", display: \"block\" },\n },\n [\n ...shapes.value.map((shape, idx) =>\n h(\"path\", {\n key: `land-${idx}`,\n d: pathGen(shape) ?? undefined,\n fill: \"var(--openui-dashboard-map-land)\",\n stroke: \"var(--openui-dashboard-surface)\",\n \"stroke-width\": 0.6,\n }),\n ),\n ...points.map((pt, idx) => {\n if (!pt.xy) return null;\n const r = 4 + Math.sqrt(pt.val / maxVal) * 10;\n const colorIdx = pt.group ? Math.max(0, groupOrder.indexOf(pt.group)) : 0;\n return h(\"g\", { key: `pt-${idx}` }, [\n h(\"circle\", {\n cx: pt.xy[0],\n cy: pt.xy[1],\n r,\n fill: seriesColor(colorIdx),\n opacity: 0.82,\n stroke: \"var(--openui-dashboard-surface)\",\n \"stroke-width\": 1.5,\n }),\n idx < 8\n ? h(\n \"text\",\n {\n x: pt.xy[0] + r + 4,\n y: pt.xy[1] + 3,\n fill: \"var(--openui-dashboard-ink)\",\n \"font-size\": 10,\n \"font-weight\": 500,\n },\n pt.label,\n )\n : null,\n ]);\n }),\n ],\n ),\n h(\n \"div\",\n { style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", maxHeight: \"320px\", overflowY: \"auto\", fontSize: \"12px\" } },\n points.map((pt, idx) => {\n const colorIdx = pt.group ? Math.max(0, groupOrder.indexOf(pt.group)) : 0;\n return h(\"div\", { key: pt.label + idx, style: { display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\", gap: \"8px\", padding: \"3px 4px\" } }, [\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\", color: \"var(--openui-dashboard-ink)\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"999px\", background: seriesColor(colorIdx), display: \"inline-block\", flexShrink: 0 } }),\n pt.label,\n ]),\n h(\"span\", { style: { fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(pt.val, p.props.format)),\n ]);\n }),\n ),\n ],\n );\n };\n },\n});\n\nexport const PointMapComponent = defineComponent({\n name: \"PointMap\",\n props: pointMapPropsSchema,\n description:\n 'Values at places (stores, cities, offices, data centres) as circles sized by value (area, not radius) on a world or US map, with a ranked list beside it. lats/lons in degrees. previous adds each place\\'s change, coloured by goodWhen. groups gives each place a type, drawn as its own colour and shape. valueLabel names the measure (\"Headcount\"). The 8 biggest places label themselves. For values by country or US state, use GeoMap; give it width two-thirds or full.',\n component: PointMapImpl,\n});\n","import type { Group } from \"../group\";\nimport { GeoMapComponent } from \"./GeoMap\";\nimport { PointMapComponent } from \"./PointMap\";\n\nexport const maps: Group = {\n components: [GeoMapComponent, PointMapComponent],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const goalPropsSchema = z.object({\n label: z.string(),\n value: z.number(),\n target: z.number(),\n format: formatSchema.optional(),\n pace: z.number().optional(),\n goodWhen: goodWhenSchema.optional(),\n previous: z.number().optional(),\n});\nexport type GoalSchemaProps = z.infer<typeof goalPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { formatValue } from \"../../../shared/format\";\nimport { goalPropsSchema, type GoalSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst GoalImpl = vueComponent({\n name: \"OpenUIDashboardGoal\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<GoalSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const value = typeof p.props.value === \"number\" ? p.props.value : 0;\n const target = typeof p.props.target === \"number\" && p.props.target > 0 ? p.props.target : 1;\n const ratio = value / target;\n const isCeiling = p.props.goodWhen === \"down\";\n const pace = typeof p.props.pace === \"number\" ? Math.min(1, Math.max(0, p.props.pace)) : null;\n\n let barColor = \"var(--openui-dashboard-series-1)\";\n if (isCeiling) {\n barColor = ratio <= 1 ? \"var(--openui-dashboard-good-mark)\" : \"var(--openui-dashboard-bad-mark)\";\n } else if (ratio >= 1) {\n barColor = \"var(--openui-dashboard-good-mark)\";\n } else if (pace !== null) {\n barColor = ratio >= pace ? \"var(--openui-dashboard-good-mark)\" : \"var(--openui-dashboard-warning-mark)\";\n }\n\n const prevRatio =\n compare.enabled.value && typeof p.props.previous === \"number\"\n ? Math.min(100, Math.max(0, (p.props.previous / target) * 100))\n : null;\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-goal\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", width: \"100%\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"13px\" } }, [\n h(\"span\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\" } }, p.props.label),\n h(\n \"span\",\n { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } },\n `${formatValue(value, p.props.format)} / ${formatValue(target, p.props.format)}`,\n ),\n ]),\n h(\n \"div\",\n {\n style: {\n position: \"relative\",\n height: \"10px\",\n borderRadius: \"999px\",\n background: \"var(--openui-dashboard-neutral-soft)\",\n overflow: \"hidden\",\n },\n },\n [\n h(\"div\", {\n style: {\n width: `${Math.min(100, Math.max(0, ratio * 100))}%`,\n height: \"100%\",\n background: barColor,\n borderRadius: \"999px\",\n },\n }),\n pace !== null\n ? h(\"div\", {\n title: `Pace: ${Math.round(pace * 100)}%`,\n style: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: `${pace * 100}%`,\n width: \"2px\",\n background: \"var(--openui-dashboard-ink)\",\n },\n })\n : null,\n prevRatio !== null\n ? h(\"div\", {\n title: `${compare.label.value}: ${formatValue(p.props.previous, p.props.format)}`,\n style: {\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: `${prevRatio}%`,\n width: \"2px\",\n background: \"var(--openui-dashboard-muted-mark)\",\n },\n })\n : null,\n ],\n ),\n ],\n );\n };\n },\n});\n\nexport const GoalComponent = defineComponent({\n name: \"Goal\",\n props: goalPropsSchema,\n description:\n 'Progress toward a target. pace (0–1) is how far through the period we are; the bar marks ahead/behind pace. goodWhen \"down\" makes target a ceiling (churn ≤ 2%). The bar takes the state\\'s colour; past its target or limit, a tick marks it and the overrun shows beyond, with the amount named. Stack several in one Card. previous is where it stood at the same point last period: a grey tick on the track while compare is on. For a single headline number with a target, use a Kpi with a Progress chart instead; Goal is for several targets stacked in one card.',\n component: GoalImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const keyValuePropsSchema = z.object({\n label: z.string(),\n value: z.union([z.number(), z.string()]),\n format: formatSchema.optional(),\n previous: z.number().nullable().optional(),\n goodWhen: goodWhenSchema.optional(),\n});\nexport type KeyValueSchemaProps = z.infer<typeof keyValuePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { keyValuePropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nexport const KeyValueComponent = defineComponent({\n name: \"KeyValue\",\n props: keyValuePropsSchema,\n description:\n \"One row of KeyValues: a number (with format and change vs previous) or a short text.\",\n component: ({ props, bindSource }) => {\n const numVal = typeof props.value === \"number\" ? props.value : null;\n const prev = typeof props.previous === \"number\" ? props.previous : null;\n const delta = numVal !== null && prev !== null ? computeDelta(numVal, prev, props.format) : null;\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-key-value\",\n style: {\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"baseline\",\n gap: \"12px\",\n padding: \"8px 0\",\n borderBottom: \"1px solid var(--openui-dashboard-border)\",\n fontSize: \"13px\",\n },\n },\n [\n h(\"span\", { style: { color: \"var(--openui-dashboard-ink-secondary)\" } }, props.label),\n h(\"span\", { style: { display: \"inline-flex\", alignItems: \"baseline\", gap: \"8px\" } }, [\n h(\n \"span\",\n { style: { fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink)\" } },\n numVal !== null ? formatValue(numVal, props.format) : String(props.value ?? \"—\"),\n ),\n delta\n ? h(\"span\", { style: { fontSize: \"12px\", color: TONE_COLOR[tone] } }, delta.text)\n : null,\n ]),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { KeyValueComponent } from \"../KeyValue\";\n\nexport const keyValuesPropsSchema = z.object({\n rows: z.array(KeyValueComponent.ref),\n});\nexport type KeyValuesSchemaProps = z.infer<typeof keyValuesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { keyValuesPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const KeyValuesComponent = defineComponent({\n name: \"KeyValues\",\n props: keyValuesPropsSchema,\n description:\n 'Label/value fact rows: KeyValues([KeyValue(\"Trials\", 572, \"number\", 547), KeyValue(\"Owner\", \"Growth team\")]).',\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-key-values\",\n style: { display: \"flex\", flexDirection: \"column\", width: \"100%\" },\n },\n [renderNode(props.rows)],\n ),\n});\n","import { z } from \"zod/v4\";\n\nexport const progressPropsSchema = z.object({\n target: z.number(),\n});\nexport type ProgressSchemaProps = z.infer<typeof progressPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { progressPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ProgressComponent = defineComponent({\n name: \"Progress\",\n props: progressPropsSchema,\n description:\n 'A Kpi\\'s progress toward target (a limit when its goodWhen is \"down\"). For one headline number; several targets in a card are Goals.',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\n\nexport const splitPropsSchema = z.object({\n labels: z.array(z.string()),\n values: z.array(z.number()),\n});\nexport type SplitSchemaProps = z.infer<typeof splitPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { splitPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SplitComponent = defineComponent({\n name: \"Split\",\n props: splitPropsSchema,\n description:\n \"What a Kpi's total is made of, up to 3 parts, one label and one value each. For totals only, never rates or averages; a card about composition is a SegmentedBar.\",\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { stateSchema } from \"../../../shared/schema\";\n\nexport const statesPropsSchema = z.object({\n states: z.array(stateSchema),\n});\nexport type StatesSchemaProps = z.infer<typeof statesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { statesPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const StatesComponent = defineComponent({\n name: \"States\",\n props: statesPropsSchema,\n description: \"A Kpi's status strip: one dot per period, null for no data.\",\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { numbersSchema } from \"../../../shared/schema\";\n\nexport const trendPropsSchema = z.object({\n values: numbersSchema,\n previous: numbersSchema.optional(),\n});\nexport type TrendSchemaProps = z.infer<typeof trendPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { trendPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const TrendComponent = defineComponent({\n name: \"Trend\",\n props: trendPropsSchema,\n description:\n \"A Kpi's sparkline, 8–13 points. previous is the same points one period earlier, dashed while compare is on.\",\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema, toneSchema } from \"../../../shared/schema\";\nimport { ProgressComponent } from \"../Progress\";\nimport { SplitComponent } from \"../Split\";\nimport { StatesComponent } from \"../States\";\nimport { TrendComponent } from \"../Trend\";\n\nexport const kpiPropsSchema = z.object({\n label: z.string(),\n // Optional so a missing number (null) still draws its tile, with a dash.\n value: z.union([z.number(), z.string()]).nullable().optional(),\n format: formatSchema.optional(),\n previous: z.number().nullable().optional(),\n goodWhen: goodWhenSchema.optional(),\n hint: z.string().optional(),\n chart: z\n .union([TrendComponent.ref, ProgressComponent.ref, SplitComponent.ref, StatesComponent.ref])\n .optional(),\n tone: toneSchema.optional(),\n});\nexport type KpiSchemaProps = z.infer<typeof kpiPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType, type VNodeChild } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { kpiPropsSchema, type KpiSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR: Record<string, string> = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n warning: \"var(--openui-dashboard-warning)\",\n info: \"var(--openui-dashboard-info)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nconst TONE_BG: Record<string, string> = {\n good: \"var(--openui-dashboard-good-soft)\",\n bad: \"var(--openui-dashboard-bad-soft)\",\n warning: \"var(--openui-dashboard-warning-soft)\",\n info: \"var(--openui-dashboard-info-soft)\",\n neutral: \"var(--openui-dashboard-neutral-soft)\",\n};\n\nfunction renderInlineChart(\n chartNode: unknown,\n currentValue: number | null,\n compareEnabled: boolean,\n): VNodeChild {\n if (!chartNode || typeof chartNode !== \"object\") return null;\n const { typeName, props } = chartNode as { typeName?: string; props?: Record<string, unknown> };\n if (!props) return null;\n\n if (typeName === \"Trend\") {\n const vals = toNumbers(props.values);\n const prev = toNumbers(props.previous);\n const all = [...vals, ...(compareEnabled ? prev : [])].filter((v): v is number => v !== null);\n if (!all.length) return null;\n const min = Math.min(...all);\n const max = Math.max(...all);\n const span = max - min || 1;\n const mkPath = (arr: (number | null)[]) => {\n const step = arr.length > 1 ? 120 / (arr.length - 1) : 0;\n let d = \"\";\n let active = false;\n arr.forEach((v, i) => {\n if (v === null) {\n active = false;\n return;\n }\n const x = i * step;\n const y = 26 - ((v - min) / span) * 20;\n d += `${active ? \"L\" : \"M\"}${x.toFixed(1)},${y.toFixed(1)} `;\n active = true;\n });\n return d.trim();\n };\n const mainPath = mkPath(vals);\n const prevPath = compareEnabled && prev.length ? mkPath(prev) : \"\";\n return h(\"svg\", { viewBox: \"0 0 120 30\", preserveAspectRatio: \"none\", style: { width: \"100%\", height: \"30px\", display: \"block\" } }, [\n prevPath\n ? h(\"path\", { d: prevPath, fill: \"none\", stroke: MUTED_COLOR, \"stroke-width\": 1.2, \"stroke-dasharray\": \"3 3\", \"vector-effect\": \"non-scaling-stroke\" })\n : null,\n mainPath ? h(\"path\", { d: mainPath, fill: \"none\", stroke: seriesColor(0), \"stroke-width\": 1.8, \"vector-effect\": \"non-scaling-stroke\" }) : null,\n ]);\n }\n\n if (typeName === \"Progress\") {\n const target = typeof props.target === \"number\" && props.target > 0 ? props.target : 0;\n const pct = target > 0 && currentValue !== null ? Math.min(100, Math.max(0, (currentValue / target) * 100)) : 0;\n return h(\n \"div\",\n { style: { width: \"100%\", height: \"6px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } },\n [h(\"div\", { style: { width: `${pct}%`, height: \"100%\", background: seriesColor(0) } })],\n );\n }\n\n if (typeName === \"Split\") {\n const labels = toStrings(props.labels);\n const values = toNumbers(props.values).map((v) => Math.max(0, v ?? 0));\n const total = values.reduce((a, b) => a + b, 0) || 1;\n return h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\n \"div\",\n { style: { display: \"flex\", height: \"6px\", borderRadius: \"999px\", overflow: \"hidden\", gap: \"2px\" } },\n values.map((v, i) =>\n h(\"div\", { key: labels[i] ?? i, style: { width: `${(v / total) * 100}%`, background: seriesColor(i) } }),\n ),\n ),\n h(\n \"div\",\n { style: { display: \"flex\", gap: \"8px\", flexWrap: \"wrap\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n labels.map((l, i) => h(\"span\", { key: i }, `${l}: ${Math.round(((values[i] ?? 0) / total) * 100)}%`)),\n ),\n ]);\n }\n\n if (typeName === \"States\") {\n const states = Array.isArray(props.states) ? props.states : [];\n return h(\n \"div\",\n { style: { display: \"flex\", gap: \"3px\", alignItems: \"center\" } },\n states.map((st, i) =>\n h(\"span\", {\n key: i,\n style: {\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"999px\",\n background:\n st === \"good\"\n ? \"var(--openui-dashboard-good-mark)\"\n : st === \"warning\"\n ? \"var(--openui-dashboard-warning-mark)\"\n : st === \"bad\"\n ? \"var(--openui-dashboard-bad-mark)\"\n : \"var(--openui-dashboard-neutral-soft)\",\n },\n }),\n ),\n );\n }\n\n return null;\n}\n\nconst KpiImpl = vueComponent({\n name: \"OpenUIDashboardKpi\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<KpiSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const bind = p.bindSource;\n const numVal = typeof p.props.value === \"number\" ? p.props.value : null;\n const prev = typeof p.props.previous === \"number\" ? p.props.previous : null;\n const delta = numVal !== null && prev !== null ? computeDelta(numVal, prev, p.props.format) : null;\n const tone = delta ? deltaTone(delta.direction, p.props.goodWhen) : \"neutral\";\n\n return h(\n \"div\",\n {\n ...(bind?.() ?? {}),\n class: \"openui-dashboard-kpi\",\n style: {\n padding: \"16px 18px\",\n borderRadius: \"var(--openui-dashboard-radius)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n boxShadow: \"var(--openui-dashboard-shadow)\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"8px\",\n minWidth: 0,\n },\n },\n [\n h(\n \"div\",\n {\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: \"8px\",\n },\n },\n [\n h(\n \"span\",\n { style: { fontSize: \"12.5px\", fontWeight: 500, color: \"var(--openui-dashboard-ink-secondary)\" } },\n p.props.label,\n ),\n delta && compare.enabled.value\n ? h(\n \"span\",\n {\n style: {\n fontSize: \"11.5px\",\n fontWeight: 600,\n fontVariantNumeric: \"tabular-nums\",\n padding: \"2px 7px\",\n borderRadius: \"999px\",\n background: TONE_BG[tone] ?? TONE_BG.neutral,\n color: TONE_COLOR[tone],\n },\n },\n delta.text,\n )\n : null,\n ],\n ),\n h(\n \"div\",\n {\n ...(bind?.(\"value\") ?? {}),\n style: {\n display: \"flex\",\n alignItems: \"baseline\",\n gap: \"8px\",\n flexWrap: \"wrap\",\n },\n },\n [\n p.props.tone && typeof p.props.value === \"string\"\n ? h(\"span\", {\n style: {\n width: \"8px\",\n height: \"8px\",\n borderRadius: \"999px\",\n background: TONE_COLOR[p.props.tone] ?? TONE_COLOR.neutral,\n display: \"inline-block\",\n },\n })\n : null,\n h(\n \"span\",\n {\n style: {\n fontSize: \"26px\",\n fontWeight: 650,\n letterSpacing: \"-0.025em\",\n lineHeight: 1.15,\n fontVariantNumeric: \"tabular-nums\",\n color: \"var(--openui-dashboard-ink)\",\n },\n },\n typeof p.props.value === \"number\"\n ? formatValue(p.props.value, p.props.format)\n : p.props.value ?? \"—\",\n ),\n ],\n ),\n p.props.hint\n ? h(\"div\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\", lineHeight: 1.4 } }, p.props.hint)\n : null,\n p.props.chart ? renderInlineChart(p.props.chart, numVal, compare.enabled.value) : null,\n ],\n );\n };\n },\n});\n\nexport const KpiComponent = defineComponent({\n name: \"Kpi\",\n props: kpiPropsSchema,\n description:\n 'Stat tile, only inside Kpis. value is a number, shown with format and its change vs previous (the same measure one period earlier), or a short text such as a plan, status or version (no format or previous; tone colours its status dot). hint is a short subtitle such as \"Paid plans only\". chart is at most one of: Trend(weekly) for a sparkline, Progress(50000) for progress toward a target, Split([\"Web\", \"App\"], [310, 190]) for what a total is made of, States([\"good\", \"good\", \"warning\"]) for a status per period.',\n component: KpiImpl,\n});\n","import { z } from \"zod/v4\";\nimport { KpiComponent } from \"../Kpi\";\n\nexport const kpisPropsSchema = z.object({\n items: z.array(KpiComponent.ref),\n});\nexport type KpisSchemaProps = z.infer<typeof kpisPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { kpisPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const KpisComponent = defineComponent({\n name: \"Kpis\",\n props: kpisPropsSchema,\n description:\n \"A strip of Kpi tiles that lays itself out: up to 6 per row, wrapping into balanced rows when narrow. More than 6 render as compact items (value, then label and change) that wrap the same way; sparklines and hints are left out there. Tiles are equal width; just list them.\",\n component: ({ props, renderNode, bindSource }) => {\n const items = Array.isArray(props.items) ? props.items : [];\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-kpis\",\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fit, minmax(155px, 1fr))\",\n gap: \"var(--openui-dashboard-space-sm)\",\n width: \"100%\",\n },\n },\n [renderNode(items)],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\n\nexport const statPropsSchema = z.object({\n value: z.number().nullable(),\n format: formatSchema.optional(),\n previous: z.number().nullable().optional(),\n goodWhen: goodWhenSchema.optional(),\n label: z.string().optional(),\n});\nexport type StatSchemaProps = z.infer<typeof statPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { computeDelta, deltaTone, formatValue } from \"../../../shared/format\";\nimport { statPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_COLOR = {\n good: \"var(--openui-dashboard-good)\",\n bad: \"var(--openui-dashboard-bad)\",\n neutral: \"var(--openui-dashboard-ink-muted)\",\n};\n\nexport const StatComponent = defineComponent({\n name: \"Stat\",\n props: statPropsSchema,\n description: \"Headline number at the top of a Card, with change vs previous.\",\n component: ({ props, bindSource }) => {\n const val = typeof props.value === \"number\" ? props.value : null;\n const prev = typeof props.previous === \"number\" ? props.previous : null;\n const delta = val !== null && prev !== null ? computeDelta(val, prev, props.format) : null;\n const tone = delta ? deltaTone(delta.direction, props.goodWhen) : \"neutral\";\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-stat\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\", marginBottom: \"8px\" },\n },\n [\n props.label\n ? h(\"div\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.label)\n : null,\n h(\"div\", { style: { display: \"flex\", alignItems: \"baseline\", gap: \"8px\" } }, [\n h(\n \"span\",\n {\n ...(bindSource?.(\"value\") ?? {}),\n style: { fontSize: \"28px\", fontWeight: 700, letterSpacing: \"-0.02em\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink)\" },\n },\n formatValue(val, props.format),\n ),\n delta\n ? h(\"span\", { style: { fontSize: \"13px\", fontWeight: 500, color: TONE_COLOR[tone] } }, delta.text)\n : null,\n ]),\n ],\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { GoalComponent } from \"./Goal\";\nimport { KeyValueComponent } from \"./KeyValue\";\nimport { KeyValuesComponent } from \"./KeyValues\";\nimport { KpiComponent } from \"./Kpi\";\nimport { KpisComponent } from \"./Kpis\";\nimport { ProgressComponent } from \"./Progress\";\nimport { SplitComponent } from \"./Split\";\nimport { StatComponent } from \"./Stat\";\nimport { StatesComponent } from \"./States\";\nimport { TrendComponent } from \"./Trend\";\n\nexport const metrics: Group = {\n components: [\n KpisComponent,\n KpiComponent,\n TrendComponent,\n ProgressComponent,\n SplitComponent,\n StatesComponent,\n StatComponent,\n GoalComponent,\n KeyValuesComponent,\n KeyValueComponent,\n ],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { numbersSchema } from \"../../../shared/schema\";\nexport const cohortsPropsSchema = z.object({\n cohorts: z.array(z.string()),\n periods: z.array(z.string()),\n values: numbersSchema,\n sizes: z.array(z.number()).optional(),\n format: formatSchema.optional(),\n view: z.enum([\"percent\", \"people\"]).optional(),\n showValues: z.boolean().optional(),\n});\nexport type CohortsSchemaProps = z.infer<typeof cohortsPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { sequentialColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toGrid, toNumbers } from \"../../../shared/values\";\nimport { cohortsPropsSchema, type CohortsSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CohortsImpl = vueComponent({\n name: \"OpenUIDashboardCohorts\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<CohortsSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const show = ref<\"none\" | \"percent\" | \"people\">(\n p.props.showValues ? (p.props.view ?? \"percent\") : \"none\",\n );\n\n return () => {\n const grid = toGrid<number | null>(p.props.cohorts, p.props.periods, toNumbers(p.props.values));\n const sizes = toNumbers(p.props.sizes);\n const sizeByCohort = new Map<string, number>();\n if (Array.isArray(p.props.cohorts)) {\n p.props.cohorts.forEach((c, i) => {\n const s = sizes[i];\n if (typeof s === \"number\" && !sizeByCohort.has(c)) sizeByCohort.set(c, s);\n });\n }\n const nums = grid.cells.flat().filter((v): v is number => typeof v === \"number\");\n const min = nums.length ? Math.min(0, ...nums) : 0;\n const max = nums.length ? Math.max(...nums) : 100;\n\n const isZh = typeof document !== \"undefined\" && /^zh\\b/i.test(document.documentElement.lang || \"\");\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-cohorts\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", overflowX: \"auto\" },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"flex-end\", gap: \"6px\", fontSize: \"11px\" } }, [\n ([\"none\", \"percent\", \"people\"] as const).map((mode) =>\n h(\n \"button\",\n {\n key: mode,\n type: \"button\",\n onClick: () => {\n show.value = mode;\n },\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n border:\n show.value === mode\n ? \"1px solid color-mix(in srgb, var(--openui-dashboard-series-1) 36%, transparent)\"\n : \"1px solid var(--openui-dashboard-border-strong)\",\n background:\n show.value === mode\n ? \"color-mix(in srgb, var(--openui-dashboard-series-1) 14%, var(--openui-dashboard-surface))\"\n : \"var(--openui-dashboard-surface)\",\n color:\n show.value === mode\n ? \"var(--openui-dashboard-series-1)\"\n : \"var(--openui-dashboard-ink-secondary)\",\n fontWeight: show.value === mode ? 600 : 500,\n cursor: \"pointer\",\n },\n },\n mode === \"none\"\n ? isZh ? \"隐藏数值\" : \"Hide\"\n : mode === \"percent\"\n ? isZh ? \"百分比\" : \"Percent\"\n : isZh ? \"人数\" : \"Count\",\n ),\n ),\n ]),\n h(\"table\", { style: { width: \"100%\", borderCollapse: \"separate\", borderSpacing: \"3px\", fontSize: \"12px\" } }, [\n h(\"thead\", null, h(\"tr\", null, [\n h(\"th\", { style: { textAlign: \"left\", color: \"var(--openui-dashboard-ink-muted)\", fontWeight: 500 } }, isZh ? \"同期群\" : \"Cohort\"),\n sizeByCohort.size ? h(\"th\", { style: { textAlign: \"right\", color: \"var(--openui-dashboard-ink-muted)\", fontWeight: 500 } }, isZh ? \"规模\" : \"Size\") : null,\n ...grid.columns.map((col) => h(\"th\", { key: col, style: { textAlign: \"center\", color: \"var(--openui-dashboard-ink-muted)\", fontWeight: 500 } }, col)),\n ])),\n h(\"tbody\", null, grid.rows.map((cohort, rIdx) => {\n const cohortSize = sizeByCohort.get(cohort) ?? null;\n return h(\"tr\", { key: cohort }, [\n h(\"td\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\", whiteSpace: \"nowrap\" } }, cohort),\n sizeByCohort.size\n ? h(\"td\", { style: { textAlign: \"right\", fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(cohortSize, \"compact\"))\n : null,\n ...grid.columns.map((period, cIdx) => {\n const val = grid.cells[rIdx]?.[cIdx] ?? null;\n if (val === null) return h(\"td\", { key: period, style: { background: \"transparent\" } });\n const colors = sequentialColor(val, min, max);\n const display =\n show.value === \"none\"\n ? \"\"\n : show.value === \"people\" && cohortSize !== null\n ? formatValue(Math.round((val / 100) * cohortSize), \"compact\")\n : formatValue(val, p.props.format ?? \"percent\");\n return h(\"td\", {\n key: period,\n title: `${cohort} · ${period}: ${formatValue(val, p.props.format ?? \"percent\")}`,\n style: {\n background: colors.background,\n color: colors.color,\n textAlign: \"center\",\n padding: \"6px 4px\",\n borderRadius: \"4px\",\n fontVariantNumeric: \"tabular-nums\",\n },\n }, display);\n }),\n ]);\n })),\n ]),\n ],\n );\n };\n },\n});\n\nexport const CohortsComponent = defineComponent({\n name: \"Cohorts\",\n props: cohortsPropsSchema,\n description:\n 'Retention grid. cohorts, periods and values have one entry per cell: its cohort, its period and the % of that cohort active in it, as query rows give them: Cohorts(c.rows.cohort, c.rows.period, c.rows.retained, c.rows.cohort_size). sizes is the cohort\\'s size, repeated on each of its cells. Leave out (or null) the periods a cohort has not reached. Periods start at \"Week 0\" or \"Month 0\". A Show switch in the header prints the cells as Percent or Count (people: size × rate), or nothing (None, the default); showValues true opens it on view (\"percent\" or \"people\").',\n component: CohortsImpl,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { numbersSchema } from \"../../../shared/schema\";\nexport const heatmapPropsSchema = z.object({\n rows: z.array(z.string()),\n columns: z.array(z.string()),\n values: numbersSchema,\n format: formatSchema.optional(),\n showValues: z.boolean().optional(),\n midpoint: z.number().optional(),\n view: z.enum([\"count\", \"total\", \"row\"]).optional(),\n});\nexport type HeatmapSchemaProps = z.infer<typeof heatmapPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { divergingColor, sequentialColor } from \"../../../shared/colors\";\nimport { formatValue } from \"../../../shared/format\";\nimport { toGrid, toNumbers } from \"../../../shared/values\";\nimport { heatmapPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const HeatmapComponent = defineComponent({\n name: \"Heatmap\",\n props: heatmapPropsSchema,\n description:\n 'Magnitude across two categories (weekday × hour). rows, columns and values have one entry per cell: its row label, its column label and its value, as query rows give them: Heatmap(h.rows.day, h.rows.hour, h.rows.n). Rows and columns draw in order of first appearance; a cell left out or null is no data. A Show switch in the header prints the cells as Count, % of total or % of row (colouring by that reading), or nothing (None, the default); showValues true opens it on view (\"count\", \"total\" or \"row\"). midpoint switches to a two-pole diverging scale around it, for values with a direction (change, variance vs plan, correlation): 0 for change.',\n component: ({ props, bindSource }) => {\n const grid = toGrid<number | null>(props.rows, props.columns, toNumbers(props.values));\n const nums = grid.cells.flat().filter((v): v is number => typeof v === \"number\");\n const min = nums.length ? Math.min(...nums) : 0;\n const max = nums.length ? Math.max(...nums) : 1;\n const midpoint = typeof props.midpoint === \"number\" ? props.midpoint : null;\n const spread = midpoint !== null ? Math.max(Math.abs(max - midpoint), Math.abs(min - midpoint), 1) : 1;\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-heatmap\",\n style: { width: \"100%\", overflowX: \"auto\" },\n },\n [\n h(\"table\", { style: { width: \"100%\", borderCollapse: \"separate\", borderSpacing: \"3px\", fontSize: \"12px\" } }, [\n h(\"thead\", null, h(\"tr\", null, [\n h(\"th\"),\n ...grid.columns.map((c) => h(\"th\", { key: c, style: { fontWeight: 500, color: \"var(--openui-dashboard-ink-muted)\", textAlign: \"center\" } }, c)),\n ])),\n h(\"tbody\", null, grid.rows.map((r, rIdx) =>\n h(\"tr\", { key: r }, [\n h(\"td\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\", whiteSpace: \"nowrap\", paddingRight: \"8px\" } }, r),\n ...grid.columns.map((c, cIdx) => {\n const val = grid.cells[rIdx]?.[cIdx] ?? null;\n if (val === null) {\n return h(\"td\", { key: c, style: { background: \"var(--openui-dashboard-neutral-soft)\", borderRadius: \"4px\", height: \"28px\" } });\n }\n const colors =\n midpoint !== null\n ? divergingColor(val, midpoint, spread)\n : sequentialColor(val, min, max);\n return h(\"td\", {\n key: c,\n title: `${r} · ${c}: ${formatValue(val, props.format)}`,\n style: {\n background: colors.background,\n color: colors.color,\n borderRadius: \"4px\",\n textAlign: \"center\",\n padding: \"6px 4px\",\n fontVariantNumeric: \"tabular-nums\",\n },\n }, props.showValues ? formatValue(val, props.format) : \"\");\n }),\n ]),\n )),\n ]),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { numbersSchema } from \"../../../shared/schema\";\nimport { ReferenceComponent } from \"../../trends/Reference\";\n\nexport const scatterPropsSchema = z.object({\n labels: z.array(z.string()),\n // null when a measure is missing: the point isn't drawn, and the chart names it under the plot.\n xs: numbersSchema,\n ys: numbersSchema,\n xLabel: z.string(),\n yLabel: z.string(),\n xFormat: formatSchema.optional(),\n yFormat: formatSchema.optional(),\n sizes: numbersSchema.optional(),\n groups: z.array(z.string()).optional(),\n references: z.array(ReferenceComponent.ref).optional(),\n sizeLabel: z.string().optional(),\n quadrants: z.array(z.string()).optional(),\n});\nexport type ScatterSchemaProps = z.infer<typeof scatterPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { ScatterChart } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { toNumbers, toStrings } from \"../../../shared/values\";\nimport { scatterPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ScatterComponent = defineComponent({\n name: \"Scatter\",\n props: scatterPropsSchema,\n description:\n 'Two measures per item, one entry per item in labels, xs and ys: Scatter(c.rows.campaign, c.rows.spend, c.rows.roas, \"Spend\", \"ROAS\", \"currency-compact\", \"multiplier\"). sizes scales each dot by a third measure (sizeLabel names it, e.g. \"Signups\"); groups gives each item a group. Up to 8 groups, each with its own colour and shape; past eight, the smallest fold into Other. A point with a null x or y isn\\'t drawn and is named under the chart. Up to 10 points label themselves. references draw targets or averages: Reference(\"Avg spend\", 12000, \"x\") is vertical, a y reference horizontal; together they split the plot into quadrants.',\n component: ({ props, bindSource }) => {\n const labels = toStrings(props.labels);\n const xs = toNumbers(props.xs);\n const ys = toNumbers(props.ys);\n const groups = toStrings(props.groups);\n\n const byGroup = new Map<string, Array<{ x: number; y: number; name?: string }>>();\n const skipped: string[] = [];\n labels.forEach((label, i) => {\n const x = xs[i];\n const y = ys[i];\n if (x === null || x === undefined || y === null || y === undefined) {\n if (label) skipped.push(label);\n return;\n }\n const g = groups[i] || props.yLabel || \"Items\";\n const list = byGroup.get(g) ?? [];\n list.push({ x, y, name: label });\n byGroup.set(g, list);\n });\n\n const datasets = [...byGroup.entries()].map(([name, data]) => ({ name, data }));\n\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-scatter\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", height: \"100%\" },\n },\n [\n datasets.length\n ? h(ScatterChart as never, {\n data: datasets,\n xAxisDataKey: \"x\",\n yAxisDataKey: \"y\",\n xAxisLabel: props.xLabel,\n yAxisLabel: props.yLabel,\n customPalette: datasets.map((_, i) => seriesColor(i)),\n isAnimationActive: false,\n })\n : null,\n skipped.length\n ? h(\"div\", { style: { fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } }, `Omitted (missing coordinates): ${skipped.join(\", \")}`)\n : null,\n ],\n );\n },\n});\n","import type { Group } from \"../group\";\nimport { CohortsComponent } from \"./Cohorts\";\nimport { HeatmapComponent } from \"./Heatmap\";\nimport { ScatterComponent } from \"./Scatter\";\n\nexport const relationships: Group = {\n components: [ScatterComponent, CohortsComponent, HeatmapComponent],\n styles: {},\n};\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema, numbersSchema, toneSchema } from \"../../../shared/schema\";\n\nexport const columnPropsSchema = z.object({\n label: z.string(),\n // z.literal(null), not z.null(): the signature printer writes z.null() as \"any\".\n values: z.array(\n z.union([\n z.string(),\n z.number(),\n z.literal(null),\n numbersSchema,\n z.array(z.string().nullable()),\n ]),\n ),\n kind: z\n .enum([\n \"text\",\n \"primary\",\n \"number\",\n \"bar\",\n \"delta\",\n \"badge\",\n \"sparkline\",\n \"chip\",\n \"date\",\n \"progress\",\n \"states\",\n \"link\",\n \"person\",\n ])\n .optional(),\n format: formatSchema.optional(),\n tones: z.record(z.string(), toneSchema).optional(),\n goodWhen: goodWhenSchema.optional(),\n total: z.enum([\"sum\", \"average\"]).optional(),\n});\nexport type ColumnSchemaProps = z.infer<typeof columnPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { columnPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const ColumnComponent = defineComponent({\n name: \"Column\",\n props: columnPropsSchema,\n description:\n 'kind: \"primary\" (bold first column), \"text\", \"number\", \"bar\" (number with inline bar), \"delta\" (signed change coloured by goodWhen), \"badge\" (tones maps statuses to good/bad/warning/info/neutral; plain categories stay neutral), \"sparkline\" (values are number arrays), \"chip\" (a category such as plan, channel or region as a neutral chip; an array gives several tags), \"date\" (\"2026-11-08\" shown as Nov 8), \"progress\" (0–100, a share of a goal with a bar to 100%), \"states\" (one status dot per period: arrays of \"good\" | \"warning\" | \"bad\" | null), \"link\" (a URL, shown without https:// and opened in a new tab), \"person\" (a name with an initials avatar, for owners and assignees). total (\"sum\" or \"average\") only for amounts that add up across rows: never unique counts, rates, shares or per-unit values like CAC. goodWhen only matters for kind \"delta\".',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { ColumnComponent } from \"../Column\";\n\nexport const tablePropsSchema = z.object({\n columns: z.array(ColumnComponent.ref),\n pageSize: z.number().optional(),\n totals: z.boolean().optional(),\n search: z.string().optional(),\n groupBy: z.string().optional(),\n});\n\nexport type TableSchemaProps = z.infer<typeof tablePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { computed, defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { seriesColor } from \"../../../shared/colors\";\nimport { deltaTone, formatDateText, formatValue } from \"../../../shared/format\";\nimport { nodeList } from \"../../../shared/values\";\nimport type { ColumnSchemaProps } from \"../Column/schema\";\nimport { tablePropsSchema, type TableSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TONE_STYLE: Record<string, { color: string; bg: string }> = {\n good: { color: \"var(--openui-dashboard-good)\", bg: \"rgba(22, 183, 111, 0.12)\" },\n bad: { color: \"var(--openui-dashboard-bad)\", bg: \"rgba(208, 51, 72, 0.12)\" },\n warning: { color: \"var(--openui-dashboard-warning)\", bg: \"var(--openui-dashboard-warning-soft)\" },\n info: { color: \"var(--openui-dashboard-info)\", bg: \"rgba(49, 124, 230, 0.12)\" },\n neutral: { color: \"var(--openui-dashboard-ink-secondary)\", bg: \"var(--openui-dashboard-neutral-soft)\" },\n};\n\nconst TableImpl = vueComponent({\n name: \"OpenUIDashboardTable\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<TableSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const sortCol = ref<number | null>(null);\n const sortDir = ref<\"asc\" | \"desc\">(\"desc\");\n const page = ref(0);\n\n const columns = computed(() => nodeList<ColumnSchemaProps>(p.props.columns));\n\n return () => {\n const cols = columns.value;\n const rowCount = Math.max(0, ...cols.map((c) => (Array.isArray(c.values) ? c.values.length : 0)));\n const pageSize = typeof p.props.pageSize === \"number\" && p.props.pageSize > 0 ? Math.round(p.props.pageSize) : 10;\n const q = (p.props.search ?? \"\").trim().toLowerCase();\n\n let indices = Array.from({ length: rowCount }, (_, i) => i);\n if (q) {\n indices = indices.filter((rIdx) =>\n cols.some((c) => String(c.values?.[rIdx] ?? \"\").toLowerCase().includes(q)),\n );\n }\n\n if (sortCol.value !== null && cols[sortCol.value]) {\n const col = cols[sortCol.value]!;\n const dir = sortDir.value === \"asc\" ? 1 : -1;\n indices = [...indices].sort((a, b) => {\n const av = col.values?.[a];\n const bv = col.values?.[b];\n if (typeof av === \"number\" && typeof bv === \"number\") return (av - bv) * dir;\n return String(av ?? \"\").localeCompare(String(bv ?? \"\")) * dir;\n });\n }\n\n const totalPages = Math.max(1, Math.ceil(indices.length / pageSize));\n const safePage = Math.min(page.value, totalPages - 1);\n const visible = indices.slice(safePage * pageSize, (safePage + 1) * pageSize);\n\n const barMax = cols.map((col) => {\n if (col.kind !== \"bar\") return 1;\n const nums = (col.values ?? []).filter((v): v is number => typeof v === \"number\");\n return Math.max(...nums.map(Math.abs), 1);\n });\n\n const isRightAligned = (kind?: string) =>\n kind === \"number\" || kind === \"bar\" || kind === \"delta\" || kind === \"progress\";\n\n const renderCell = (col: ColumnSchemaProps, colIdx: number, raw: unknown) => {\n const kind = col.kind ?? (typeof raw === \"number\" ? \"number\" : \"text\");\n if (raw == null) return \"—\";\n if (kind === \"badge\") {\n const text = String(raw);\n const tone = col.tones?.[text] ?? \"neutral\";\n const style = TONE_STYLE[tone] ?? TONE_STYLE.neutral!;\n return h(\"span\", { style: { padding: \"2px 8px\", borderRadius: \"999px\", fontSize: \"11px\", fontWeight: 500, background: style.bg, color: style.color } }, text);\n }\n if (kind === \"chip\") {\n const tags = Array.isArray(raw) ? raw.map(String) : [String(raw)];\n return h(\"span\", { style: { display: \"inline-flex\", gap: \"4px\", flexWrap: \"wrap\" } },\n tags.map((t, i) => h(\"span\", { key: i, style: { padding: \"2px 7px\", borderRadius: \"6px\", fontSize: \"11px\", background: \"var(--openui-dashboard-neutral-soft)\", color: \"var(--openui-dashboard-ink-secondary)\" } }, t)),\n );\n }\n if (kind === \"delta\" && typeof raw === \"number\") {\n const dir = raw === 0 ? \"flat\" : raw > 0 ? \"up\" : \"down\";\n const tone = deltaTone(dir, col.goodWhen);\n const color = tone === \"good\" ? \"var(--openui-dashboard-good)\" : tone === \"bad\" ? \"var(--openui-dashboard-bad)\" : \"var(--openui-dashboard-ink-muted)\";\n return h(\"span\", { style: { color, fontWeight: 500 } }, `${raw > 0 ? \"+\" : \"\"}${formatValue(raw, col.format)}`);\n }\n if (kind === \"bar\" && typeof raw === \"number\") {\n const pct = Math.min(100, (Math.abs(raw) / (barMax[colIdx] || 1)) * 100);\n return h(\"div\", { style: { display: \"flex\", alignItems: \"center\", justifyContent: \"flex-end\", gap: \"8px\" } }, [\n h(\"div\", { style: { width: \"48px\", height: \"6px\", borderRadius: \"3px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } }, [\n h(\"div\", { style: { width: `${pct}%`, height: \"100%\", background: seriesColor(0) } }),\n ]),\n h(\"span\", null, formatValue(raw, col.format)),\n ]);\n }\n if (kind === \"progress\" && typeof raw === \"number\") {\n const pct = Math.min(100, Math.max(0, raw));\n return h(\"div\", { style: { display: \"flex\", alignItems: \"center\", justifyContent: \"flex-end\", gap: \"8px\" } }, [\n h(\"div\", { style: { width: \"52px\", height: \"6px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", overflow: \"hidden\" } }, [\n h(\"div\", { style: { width: `${pct}%`, height: \"100%\", background: seriesColor(0) } }),\n ]),\n h(\"span\", null, `${pct.toFixed(0)}%`),\n ]);\n }\n if (kind === \"date\") {\n return formatDateText(raw) ?? String(raw);\n }\n if (kind === \"link\" && typeof raw === \"string\") {\n const href = /^https?:\\/\\//i.test(raw) ? raw : undefined;\n const text = raw.replace(/^https?:\\/\\//i, \"\");\n return href\n ? h(\"a\", { href, target: \"_blank\", rel: \"noopener noreferrer\", style: { color: \"var(--openui-dashboard-info)\", textDecoration: \"underline\" } }, text)\n : text;\n }\n if (kind === \"person\") {\n const name = String(raw);\n const initials = name.split(/\\s+/).map((w) => w[0] ?? \"\").join(\"\").slice(0, 2).toUpperCase();\n return h(\"span\", { style: { display: \"inline-flex\", alignItems: \"center\", gap: \"6px\" } }, [\n h(\"span\", { style: { width: \"20px\", height: \"20px\", borderRadius: \"999px\", background: \"var(--openui-dashboard-neutral-soft)\", display: \"inline-flex\", alignItems: \"center\", justifyContent: \"center\", fontSize: \"10px\", fontWeight: 600 } }, initials),\n name,\n ]);\n }\n if (kind === \"primary\") {\n return h(\"strong\", { style: { fontWeight: 600, color: \"var(--openui-dashboard-ink)\" } }, String(raw));\n }\n return typeof raw === \"number\" ? formatValue(raw, col.format) : String(raw);\n };\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-table\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", overflowX: \"auto\" },\n },\n [\n h(\"table\", { style: { width: \"100%\", borderCollapse: \"collapse\", fontSize: \"13px\" } }, [\n h(\n \"thead\",\n null,\n h(\n \"tr\",\n { style: { borderBottom: \"1px solid var(--openui-dashboard-border-strong)\" } },\n cols.map((col, idx) =>\n h(\n \"th\",\n {\n key: col.label + idx,\n onClick: () => {\n if (sortCol.value === idx) {\n sortDir.value = sortDir.value === \"asc\" ? \"desc\" : \"asc\";\n } else {\n sortCol.value = idx;\n sortDir.value = \"desc\";\n }\n },\n style: {\n padding: \"8px 10px\",\n textAlign: isRightAligned(col.kind) ? \"right\" : \"left\",\n fontSize: \"12px\",\n fontWeight: 600,\n color: \"var(--openui-dashboard-ink-muted)\",\n cursor: \"pointer\",\n whiteSpace: \"nowrap\",\n },\n },\n `${col.label}${sortCol.value === idx ? (sortDir.value === \"asc\" ? \" ↑\" : \" ↓\") : \"\"}`,\n ),\n ),\n ),\n ),\n h(\n \"tbody\",\n null,\n visible.map((rIdx) =>\n h(\n \"tr\",\n { key: rIdx, style: { borderBottom: \"1px solid var(--openui-dashboard-border)\" } },\n cols.map((col, cIdx) =>\n h(\n \"td\",\n {\n key: cIdx,\n style: {\n padding: \"8px 10px\",\n textAlign: isRightAligned(col.kind) ? \"right\" : \"left\",\n fontVariantNumeric: isRightAligned(col.kind) ? \"tabular-nums\" : undefined,\n color: \"var(--openui-dashboard-ink)\",\n },\n },\n [renderCell(col, cIdx, col.values?.[rIdx])],\n ),\n ),\n ),\n ),\n ),\n p.props.totals\n ? (() => {\n const isZh = typeof document !== \"undefined\" && /^zh\\b/i.test(document.documentElement.lang || \"\");\n return h(\n \"tfoot\",\n null,\n h(\n \"tr\",\n { style: { borderTop: \"1px solid var(--openui-dashboard-border-strong)\", background: \"var(--openui-dashboard-surface-subtle)\", fontWeight: 600, color: \"var(--openui-dashboard-ink)\" } },\n cols.map((col, cIdx) => {\n if (cIdx === 0 && !col.total) return h(\"td\", { key: cIdx, style: { padding: \"8px 10px\" } }, isZh ? \"合计\" : \"Total\");\n if (!col.total) return h(\"td\", { key: cIdx });\n const nums = indices\n .map((i) => col.values?.[i])\n .filter((v): v is number => typeof v === \"number\" && Number.isFinite(v));\n const val =\n nums.length === 0\n ? null\n : col.total === \"average\"\n ? nums.reduce((a, b) => a + b, 0) / nums.length\n : nums.reduce((a, b) => a + b, 0);\n return h(\n \"td\",\n { key: cIdx, style: { padding: \"8px 10px\", textAlign: \"right\", fontVariantNumeric: \"tabular-nums\" } },\n formatValue(val, col.format),\n );\n }),\n ),\n );\n })()\n : null,\n ]),\n totalPages > 1\n ? (() => {\n const isZh = typeof document !== \"undefined\" && /^zh\\b/i.test(document.documentElement.lang || \"\");\n return h(\n \"div\",\n { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"center\", fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n [\n h(\n \"span\",\n null,\n isZh\n ? `第 ${safePage + 1} / ${totalPages} 页(共 ${indices.length} 条)`\n : `Page ${safePage + 1} of ${totalPages} (${indices.length} rows)`,\n ),\n h(\"div\", { style: { display: \"flex\", gap: \"6px\" } }, [\n h(\n \"button\",\n {\n type: \"button\",\n disabled: safePage <= 0,\n onClick: () => {\n page.value = Math.max(0, safePage - 1);\n },\n style: {\n padding: \"4px 8px\",\n borderRadius: \"6px\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n opacity: safePage <= 0 ? 0.45 : 1,\n cursor: safePage <= 0 ? \"not-allowed\" : \"pointer\",\n },\n },\n isZh ? \"上一页\" : \"Prev\",\n ),\n h(\n \"button\",\n {\n type: \"button\",\n disabled: safePage >= totalPages - 1,\n onClick: () => {\n page.value = Math.min(totalPages - 1, safePage + 1);\n },\n style: {\n padding: \"4px 8px\",\n borderRadius: \"6px\",\n border: \"1px solid var(--openui-dashboard-border-strong)\",\n background: \"var(--openui-dashboard-surface)\",\n color: \"var(--openui-dashboard-ink)\",\n opacity: safePage >= totalPages - 1 ? 0.45 : 1,\n cursor: safePage >= totalPages - 1 ? \"not-allowed\" : \"pointer\",\n },\n },\n isZh ? \"下一页\" : \"Next\",\n ),\n ]),\n ],\n );\n })()\n : null,\n ],\n );\n };\n },\n});\n\nexport const TableComponent = defineComponent({\n name: \"Table\",\n props: tablePropsSchema,\n description:\n \"Sortable, paged table (default pageSize 10). totals adds a totals row for Columns that set total. search is the text to keep matching rows for. groupBy names a column (usually a chip or badge column) to group rows under a heading with their count.\",\n component: TableImpl,\n});\n","import type { Group } from \"../group\";\nimport { ColumnComponent } from \"./Column\";\nimport { TableComponent } from \"./Table\";\n\nexport const tables: Group = {\n components: [TableComponent, ColumnComponent],\n styles: {},\n};\n","import { z } from \"zod/v4\";\n\nexport const markerPropsSchema = z.object({\n label: z.string(),\n at: z.string(),\n});\nexport type MarkerSchemaProps = z.infer<typeof markerPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { markerPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const MarkerComponent = defineComponent({\n name: \"Marker\",\n props: markerPropsSchema,\n description:\n 'An event on a TimeSeries\\' time axis (a deploy, incident or launch) at one of its labels: Marker(\"Deploy v2.4\", \"Oct 12\").',\n component: () => null,\n});\n","import { z } from \"zod/v4\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { SeriesComponent as Series } from \"../Series\";\n\nexport const smallMultiplesPropsSchema = z.object({\n labels: z.array(z.string()),\n series: z.array(Series.ref),\n type: z.enum([\"area\", \"line\"]).optional(),\n format: formatSchema.optional(),\n columns: z.number().optional(),\n});\nexport type SmallMultiplesSchemaProps = z.infer<typeof smallMultiplesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { formatValue } from \"../../../shared/format\";\nimport { nodeList, toNumbers, toStrings } from \"../../../shared/values\";\nimport type { SeriesSchemaProps } from \"../Series/schema\";\nimport { smallMultiplesPropsSchema, type SmallMultiplesSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nfunction sparkPath(values: (number | null)[], min: number, max: number, w: number, hPx: number): string {\n const span = max - min || 1;\n const stepX = values.length > 1 ? w / (values.length - 1) : 0;\n let d = \"\";\n let drawing = false;\n values.forEach((v, i) => {\n if (v === null) {\n drawing = false;\n return;\n }\n const x = i * stepX;\n const y = hPx - ((v - min) / span) * (hPx - 8) - 4;\n d += `${drawing ? \"L\" : \"M\"}${x.toFixed(1)},${y.toFixed(1)} `;\n drawing = true;\n });\n return d.trim();\n}\n\nconst SmallMultiplesImpl = vueComponent({\n name: \"OpenUIDashboardSmallMultiples\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<SmallMultiplesSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const labels = toStrings(p.props.labels);\n const seriesList = nodeList<SeriesSchemaProps>(p.props.series);\n const allNums = seriesList.flatMap((s) => [\n ...toNumbers(s.values),\n ...(compare.enabled.value ? toNumbers(s.previous) : []),\n ]).filter((v): v is number => v !== null);\n const min = allNums.length ? Math.min(0, ...allNums) : 0;\n const max = allNums.length ? Math.max(...allNums) : 1;\n const cols =\n typeof p.props.columns === \"number\" && p.props.columns > 0\n ? `repeat(${Math.round(p.props.columns)}, minmax(0, 1fr))`\n : \"repeat(auto-fit, minmax(170px, 1fr))\";\n const isArea = p.props.type !== \"line\";\n\n return h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-small-multiples\",\n style: { display: \"grid\", gridTemplateColumns: cols, gap: \"12px\", width: \"100%\" },\n },\n seriesList.map((s, idx) => {\n const vals = toNumbers(s.values);\n const prev = toNumbers(s.previous);\n const latest = [...vals].reverse().find((v) => v !== null) ?? null;\n const color = seriesColor(idx);\n const line = sparkPath(vals, min, max, 160, 56);\n const prevLine = compare.enabled.value && prev.length ? sparkPath(prev, min, max, 160, 56) : \"\";\n return h(\n \"div\",\n {\n key: s.name || idx,\n style: {\n padding: \"10px\",\n borderRadius: \"var(--openui-dashboard-radius-sm)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n background: \"var(--openui-dashboard-surface)\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n },\n },\n [\n h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"12px\" } }, [\n h(\"span\", { style: { fontWeight: 500, color: \"var(--openui-dashboard-ink)\" } }, s.name),\n h(\"span\", { style: { fontVariantNumeric: \"tabular-nums\", color: \"var(--openui-dashboard-ink-secondary)\" } }, formatValue(latest, p.props.format)),\n ]),\n h(\"svg\", { viewBox: \"0 0 160 56\", style: { width: \"100%\", height: \"56px\", display: \"block\" } }, [\n prevLine\n ? h(\"path\", { d: prevLine, fill: \"none\", stroke: MUTED_COLOR, \"stroke-width\": 1.25, \"stroke-dasharray\": \"3 3\" })\n : null,\n isArea && line\n ? h(\"path\", { d: `${line} L160,56 L0,56 Z`, fill: color, opacity: 0.12 })\n : null,\n line ? h(\"path\", { d: line, fill: \"none\", stroke: color, \"stroke-width\": 1.75 }) : null,\n ]),\n labels.length\n ? h(\"div\", { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"10px\", color: \"var(--openui-dashboard-ink-muted)\" } }, [\n h(\"span\", null, labels[0] ?? \"\"),\n h(\"span\", null, labels[labels.length - 1] ?? \"\"),\n ])\n : null,\n ],\n );\n }),\n );\n };\n },\n});\n\nexport const SmallMultiplesComponent = defineComponent({\n name: \"SmallMultiples\",\n props: smallMultiplesPropsSchema,\n description:\n 'A grid of small charts, one per series, on one shared scale, for more than 8 series, or when lines would tangle. Same unit across panels; never use it to mix units. type \"area\" (default) or \"line\"; columns fixes the grid (default fits ~180px panels). A Series\\' previous draws the previous period as a grey dashed line in its panel while compare is on.',\n component: SmallMultiplesImpl,\n});\n","import { z } from \"zod/v4\";\nimport { stateSchema } from \"../../../shared/schema\";\n\nexport const statusTimelinePropsSchema = z.object({\n labels: z.array(z.string()),\n periods: z.array(z.string()),\n states: z.array(stateSchema),\n});\nexport type StatusTimelineSchemaProps = z.infer<typeof statusTimelinePropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { toGrid } from \"../../../shared/values\";\nimport { statusTimelinePropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst STATE_COLOR: Record<string, string> = {\n good: \"var(--openui-dashboard-good-mark)\",\n ok: \"var(--openui-dashboard-good-mark)\",\n up: \"var(--openui-dashboard-good-mark)\",\n warning: \"var(--openui-dashboard-warning-mark)\",\n degraded: \"var(--openui-dashboard-warning-mark)\",\n bad: \"var(--openui-dashboard-bad-mark)\",\n down: \"var(--openui-dashboard-bad-mark)\",\n};\n\nexport const StatusTimelineComponent = defineComponent({\n name: \"StatusTimeline\",\n props: statusTimelinePropsSchema,\n description:\n 'Uptime per service over time: one strip per service, one cell per period. labels, periods and states have one entry per cell: its service, its period and its state, as query rows give them: StatusTimeline(s.rows.service, s.rows.day, s.rows.state). A state is \"good\" (up), \"warning\" (degraded) or \"bad\" (down), or null for no data; the legend names them Up, Degraded and Down.',\n component: ({ props, bindSource }) => {\n const grid = toGrid<string>(props.labels, props.periods, props.states);\n const isZh = typeof document !== \"undefined\" && /^zh\\b/i.test(document.documentElement.lang || \"\");\n return h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-status-timeline\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"10px\", width: \"100%\" },\n },\n [\n ...grid.rows.map((service, rIdx) =>\n h(\"div\", { key: service, style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\"div\", { style: { fontSize: \"13px\", fontWeight: 500, color: \"var(--openui-dashboard-ink)\" } }, service),\n h(\n \"div\",\n { style: { display: \"grid\", gridTemplateColumns: `repeat(${Math.max(1, grid.columns.length)}, 1fr)`, gap: \"3px\" } },\n grid.columns.map((period, cIdx) => {\n const state = grid.cells[rIdx]?.[cIdx] ?? null;\n return h(\"div\", {\n key: period,\n title: `${service} · ${period}: ${state ?? (isZh ? \"无数据\" : \"No data\")}`,\n style: {\n height: \"18px\",\n borderRadius: \"3px\",\n background: state ? (STATE_COLOR[state] ?? \"var(--openui-dashboard-neutral-soft)\") : \"var(--openui-dashboard-neutral-soft)\",\n },\n });\n }),\n ),\n ]),\n ),\n h(\n \"div\",\n { style: { display: \"flex\", gap: \"12px\", fontSize: \"11px\", color: \"var(--openui-dashboard-ink-muted)\" } },\n [\n [isZh ? \"正常\" : \"Up\", STATE_COLOR.good],\n [isZh ? \"降级\" : \"Degraded\", STATE_COLOR.warning],\n [isZh ? \"故障\" : \"Down\", STATE_COLOR.bad],\n ].map(([label, color]) =>\n h(\"span\", { key: label, style: { display: \"inline-flex\", alignItems: \"center\", gap: \"4px\" } }, [\n h(\"span\", { style: { width: \"8px\", height: \"8px\", borderRadius: \"2px\", background: color, display: \"inline-block\" } }),\n label,\n ]),\n ),\n ),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { stackedSchema } from \"../../../shared/chartHelpers\";\nimport { formatSchema } from \"../../../shared/format\";\nimport { goodWhenSchema } from \"../../../shared/schema\";\nimport { MarkerComponent as Marker } from \"../Marker\";\nimport { ReferenceComponent as Reference } from \"../Reference\";\nimport { SeriesComponent as Series } from \"../Series\";\n\nexport const timeSeriesPropsSchema = z.object({\n labels: z.array(z.string()),\n series: z.array(Series.ref),\n type: z.enum([\"line\", \"area\", \"bar\"]).optional(),\n format: formatSchema.optional(),\n stacked: stackedSchema.optional(),\n references: z.array(Reference.ref).optional(),\n goodWhen: goodWhenSchema.optional(),\n markers: z.array(Marker.ref).optional(),\n curve: z.enum([\"smooth\", \"linear\", \"step\"]).optional(),\n forecastFrom: z.string().optional(),\n});\nexport type TimeSeriesSchemaProps = z.infer<typeof timeSeriesPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { AreaChart, BarChart, LineChart } from \"@wodecorp/openui-vue-ui\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { MUTED_COLOR, seriesColor } from \"../../../shared/colors\";\nimport { useCompare } from \"../../../shared/compare\";\nimport { dateLabels, formatValue } from \"../../../shared/format\";\nimport { nodeList, toNumbers, toStrings } from \"../../../shared/values\";\nimport type { MarkerSchemaProps } from \"../Marker/schema\";\nimport type { ReferenceSchemaProps } from \"../Reference/schema\";\nimport type { SeriesSchemaProps } from \"../Series/schema\";\nimport { timeSeriesPropsSchema, type TimeSeriesSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TimeSeriesImpl = vueComponent({\n name: \"OpenUIDashboardTimeSeries\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<TimeSeriesSchemaProps>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n const compare = useCompare();\n\n return () => {\n const rawLabels = toStrings(p.props.labels);\n const formatter = dateLabels(rawLabels);\n const labels = formatter ? rawLabels.map(formatter) : rawLabels;\n const seriesList = nodeList<SeriesSchemaProps>(p.props.series);\n const references = nodeList<ReferenceSchemaProps>(p.props.references);\n const markers = nodeList<MarkerSchemaProps>(p.props.markers);\n const bind = p.bindSource;\n\n if (!labels.length || !seriesList.length) {\n return h(\n \"div\",\n { ...(bind?.() ?? {}), class: \"openui-dashboard-empty\", style: { color: \"var(--openui-dashboard-ink-muted)\", fontSize: \"13px\", padding: \"24px 0\", textAlign: \"center\" } },\n \"No data for this period\",\n );\n }\n\n const rows = labels.map((label, idx) => {\n const row: Record<string, string | number> = { __x: label };\n for (const s of seriesList) {\n const vals = toNumbers(s.values);\n row[s.name] = vals[idx] ?? 0;\n if (compare.enabled.value && s.previous?.length) {\n const prevVals = toNumbers(s.previous);\n row[`${s.name} (${compare.label.value})`] = prevVals[idx] ?? 0;\n }\n }\n return row;\n });\n\n const palette: string[] = [];\n seriesList.forEach((s, i) => {\n palette.push(seriesColor(i));\n if (compare.enabled.value && s.previous?.length) {\n palette.push(MUTED_COLOR);\n }\n });\n const stacked = p.props.stacked === true || p.props.stacked === \"percent\";\n const chartType = p.props.type ?? \"line\";\n\n const chartVNode =\n chartType === \"bar\"\n ? h(BarChart as never, {\n data: rows,\n categoryKey: \"__x\",\n variant: stacked ? \"stacked\" : \"grouped\",\n customPalette: palette,\n isAnimationActive: false,\n })\n : chartType === \"area\"\n ? h(AreaChart as never, {\n data: rows,\n categoryKey: \"__x\",\n stacked,\n customPalette: palette,\n isAnimationActive: false,\n })\n : h(LineChart as never, {\n data: rows,\n categoryKey: \"__x\",\n customPalette: palette,\n isAnimationActive: false,\n });\n\n return h(\n \"div\",\n {\n ...(bind?.() ?? {}),\n class: \"openui-dashboard-time-series\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"8px\", width: \"100%\", height: \"100%\" },\n },\n [\n h(\"div\", { style: { flex: 1, minHeight: \"200px\" } }, [chartVNode]),\n references.length || markers.length\n ? h(\n \"div\",\n {\n style: {\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: \"8px\",\n fontSize: \"12px\",\n color: \"var(--openui-dashboard-ink-muted)\",\n },\n },\n [\n ...references.map((refItem, idx) =>\n h(\n \"span\",\n {\n key: `ref-${idx}`,\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n background: \"var(--openui-dashboard-neutral-soft)\",\n },\n },\n `${refItem.label}: ${formatValue(refItem.value, p.props.format)}`,\n ),\n ),\n ...markers.map((marker, idx) =>\n h(\n \"span\",\n {\n key: `m-${idx}`,\n style: {\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n background: \"var(--openui-dashboard-warning-soft)\",\n color: \"var(--openui-dashboard-warning)\",\n },\n },\n `${marker.at} · ${marker.label}`,\n ),\n ),\n ],\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const TimeSeriesComponent = defineComponent({\n name: \"TimeSeries\",\n props: timeSeriesPropsSchema,\n description:\n 'A metric over time. type \"line\" (default) for rates, \"area\" for volumes (stacked for parts of a whole; stacked \"percent\" for each part\\'s share over time), \"bar\" for counts per period. markers flag events on the time axis. curve \"step\" for values that change in steps (prices, limits, plan tiers). forecastFrom is the first projected label: from there the line is dashed and the region shaded.',\n component: TimeSeriesImpl,\n});\n","import type { Group } from \"../group\";\nimport { MarkerComponent } from \"./Marker\";\nimport { ReferenceComponent } from \"./Reference\";\nimport { SeriesComponent } from \"./Series\";\nimport { SmallMultiplesComponent } from \"./SmallMultiples\";\nimport { StatusTimelineComponent } from \"./StatusTimeline\";\nimport { TimeSeriesComponent } from \"./TimeSeries\";\n\nexport const trends: Group = {\n components: [\n TimeSeriesComponent,\n SeriesComponent,\n ReferenceComponent,\n MarkerComponent,\n SmallMultiplesComponent,\n StatusTimelineComponent,\n ],\n styles: {},\n};\n","import { comparison } from \"./comparison\";\nimport { composition } from \"./composition\";\nimport { filters } from \"./filters\";\nimport { flow } from \"./flow\";\nimport type { Group } from \"./group\";\nimport { maps } from \"./maps\";\nimport { metrics } from \"./metrics\";\nimport { relationships } from \"./relationships\";\nimport { tables } from \"./tables\";\nimport { trends } from \"./trends\";\n\nexport const groups: Group[] = [\n metrics,\n filters,\n tables,\n trends,\n comparison,\n composition,\n flow,\n relationships,\n maps,\n];\n\nexport const groupComponents = groups.flatMap((group) => group.components);\n","import { z } from \"zod/v4\";\nimport { groupComponents } from \"./registeredGroups\";\n\nconst LAYOUT = [\"Dashboard\", \"Section\", \"Row\", \"Card\"];\nconst byName = new Map(groupComponents.map((component) => [component.name, component]));\n\nexport const isRegistered = (name: string) => LAYOUT.includes(name) || byName.has(name);\n\nexport const CARD_CONTENT = [\n \"Stat\",\n \"TimeSeries\",\n \"SmallMultiples\",\n \"Bars\",\n \"Dumbbell\",\n \"Distribution\",\n \"Donut\",\n \"Treemap\",\n \"Waterfall\",\n \"Intervals\",\n \"StatusTimeline\",\n \"Flow\",\n \"Scatter\",\n \"GeoMap\",\n \"PointMap\",\n \"Funnel\",\n \"Cohorts\",\n \"Heatmap\",\n \"Table\",\n \"Leaderboard\",\n \"Goal\",\n \"SegmentedBar\",\n \"KeyValues\",\n];\n\nexport const CARD_CONTROLS = [\"ChipFilter\", \"SelectFilter\"];\nexport const SECTION_ROWS = [\"Kpis\"];\nexport const DASHBOARD_CHILDREN = [\"FilterBar\"];\n\nexport const COMPONENT_ORDER = [\n \"Dashboard\",\n \"FilterBar\",\n \"PeriodPicker\",\n \"DateRangeFilter\",\n \"MultiSelectFilter\",\n \"ChipFilter\",\n \"SelectFilter\",\n \"CompareToggle\",\n \"Section\",\n \"Row\",\n \"Kpis\",\n \"Kpi\",\n \"Trend\",\n \"Progress\",\n \"Split\",\n \"States\",\n \"Card\",\n \"Stat\",\n \"TimeSeries\",\n \"Series\",\n \"Reference\",\n \"Marker\",\n \"SmallMultiples\",\n \"Bars\",\n \"Dumbbell\",\n \"Distribution\",\n \"Donut\",\n \"SegmentedBar\",\n \"Treemap\",\n \"Waterfall\",\n \"Intervals\",\n \"StatusTimeline\",\n \"Flow\",\n \"Scatter\",\n \"GeoMap\",\n \"PointMap\",\n \"Funnel\",\n \"Cohorts\",\n \"Heatmap\",\n \"Table\",\n \"Column\",\n \"Leaderboard\",\n \"Goal\",\n \"KeyValues\",\n \"KeyValue\",\n];\n\nexport function refs(names: readonly string[]): z.ZodType[] {\n return names.flatMap((name) => {\n const component = byName.get(name);\n return component ? [component.ref as z.ZodType] : [];\n });\n}\n\nexport function oneOf(schemas: z.ZodType[]): z.ZodType {\n if (schemas.length === 0) return z.never();\n if (schemas.length === 1) return schemas[0]!;\n return z.union(schemas as [z.ZodType, z.ZodType, ...z.ZodType[]]);\n}\n\nexport function inPromptOrder<T extends { name: string }>(components: T[]): T[] {\n const rank = (name: string) => {\n const index = COMPONENT_ORDER.indexOf(name);\n return index === -1 ? COMPONENT_ORDER.length : index;\n };\n return [...components].sort((a, b) => rank(a.name) - rank(b.name));\n}\n","import { z } from \"zod/v4\";\nimport { widthSchema } from \"../../../shared/schema\";\nimport { CARD_CONTENT, CARD_CONTROLS, oneOf, refs } from \"../../slots\";\n\nexport const cardPropsSchema = z.object({\n title: z.string(),\n content: z.array(oneOf(refs(CARD_CONTENT))),\n width: widthSchema.optional(),\n subtitle: z.string().optional(),\n controls: z.array(oneOf(refs(CARD_CONTROLS))).optional(),\n});\nexport type CardSchemaProps = z.infer<typeof cardPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, provide, type PropType } from \"vue\";\nimport { CardControlsContext } from \"../../../shared/cardSlot\";\nimport { cardPropsSchema, type CardSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SPAN_MAP: Record<string, number> = {\n quarter: 3,\n third: 4,\n half: 6,\n \"two-thirds\": 8,\n \"three-quarters\": 9,\n full: 12,\n};\n\nconst CardControlsSlot = vueComponent({\n name: \"OpenUIDashboardCardControls\",\n props: {\n controls: Array,\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n provide(CardControlsContext, true);\n return () =>\n h(\n \"div\",\n { style: { display: \"flex\", alignItems: \"center\", gap: \"8px\", flexWrap: \"wrap\" } },\n [p.renderNode(p.controls)],\n );\n },\n});\n\nexport const CardComponent = defineComponent({\n name: \"Card\",\n props: cardPropsSchema,\n description:\n 'content stacks top to bottom, usually [Stat?, one visual]. Default width \"half\". title says what is plotted; subtitle gives units, period or source (\"Weekly · USD\"). controls are this card\\'s own switches, shown in its header: a ChipFilter or SelectFilter for what the card is broken down by or which metric it plots, e.g. Card(\"Top sources\", [Leaderboard(...)], \"half\", \"Visitors\", [ChipFilter($sourceBy, [{value: \"channel\", label: \"Channel\"}, {value: \"domain\", label: \"Domain\"}])]).',\n component: ({ props, renderNode, bindSource }) => {\n const span = SPAN_MAP[props.width ?? \"half\"] ?? 6;\n return h(\n \"section\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-card\",\n style: {\n gridColumn: `span ${span} / span ${span}`,\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"12px\",\n padding: \"var(--openui-dashboard-space-lg)\",\n borderRadius: \"var(--openui-dashboard-radius)\",\n background: \"var(--openui-dashboard-surface)\",\n border: \"1px solid var(--openui-dashboard-border)\",\n boxShadow: \"var(--openui-dashboard-shadow)\",\n minWidth: 0,\n },\n },\n [\n h(\"header\", { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"flex-start\", gap: \"12px\", flexWrap: \"wrap\" } }, [\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\", minWidth: 0 } }, [\n h(\"h3\", { style: { margin: 0, fontSize: \"15px\", fontWeight: 600, color: \"var(--openui-dashboard-ink)\" } }, props.title),\n props.subtitle\n ? h(\"div\", { style: { fontSize: \"12px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.subtitle)\n : null,\n ]),\n props.controls?.length\n ? h(CardControlsSlot, { controls: props.controls, renderNode })\n : null,\n ]),\n h(\"div\", { style: { flex: 1, display: \"flex\", flexDirection: \"column\", gap: \"10px\", minHeight: 0 } }, [\n renderNode(props.content),\n ]),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { CardComponent } from \"../Card\";\n\nexport const rowPropsSchema = z.object({\n items: z.array(CardComponent.ref),\n height: z\n .union([\n z.literal(240),\n z.literal(320),\n z.literal(400),\n z.literal(480),\n z.literal(560),\n z.literal(640),\n ])\n .optional(),\n});\nexport type RowSchemaProps = z.infer<typeof rowPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { rowPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const RowComponent = defineComponent({\n name: \"Row\",\n props: rowPropsSchema,\n description:\n \"Cards side by side on a 12-column grid; their widths add up to a full row. Every card in a row is the same height, one of 240, 320, 400, 480, 560 or 640 px, and its chart stretches to fill it. Leave height out and the row picks one from its content: 400 for charts, 560 for tables, GeoMap and Flow, 480 for PointMap and Cohorts, 320 for summaries (Stat, KeyValues, SegmentedBar).\",\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"div\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-row\",\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(12, minmax(0, 1fr))\",\n gap: \"var(--openui-dashboard-space-md)\",\n minHeight: props.height ? `${props.height}px` : undefined,\n width: \"100%\",\n },\n },\n [renderNode(props.items)],\n ),\n});\n","import { z } from \"zod/v4\";\nimport { oneOf, refs, SECTION_ROWS } from \"../../slots\";\nimport { RowComponent } from \"../Row\";\n\nexport const sectionPropsSchema = z.object({\n title: z.string(),\n rows: z.array(oneOf([...refs(SECTION_ROWS), RowComponent.ref as z.ZodType])),\n description: z.string().optional(),\n});\nexport type SectionSchemaProps = z.infer<typeof sectionPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { sectionPropsSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const SectionComponent = defineComponent({\n name: \"Section\",\n props: sectionPropsSchema,\n description:\n 'A titled group of Kpis strips and Rows of Cards. Pass \"\" as title for the lead KPI section.',\n component: ({ props, renderNode, bindSource }) =>\n h(\n \"section\",\n {\n ...(bindSource?.() ?? {}),\n class: \"openui-dashboard-section\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"var(--openui-dashboard-space-md)\", width: \"100%\" },\n },\n [\n props.title || props.description\n ? h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\" } }, [\n props.title\n ? h(\"h2\", { style: { margin: 0, fontSize: \"19px\", fontWeight: 650, letterSpacing: \"-0.02em\", color: \"var(--openui-dashboard-ink)\" } }, props.title)\n : null,\n props.description\n ? h(\"p\", { style: { margin: 0, fontSize: \"13px\", color: \"var(--openui-dashboard-ink-muted)\" } }, props.description)\n : null,\n ])\n : null,\n renderNode(props.rows),\n ],\n ),\n});\n","import { z } from \"zod/v4\";\nimport { DASHBOARD_CHILDREN, oneOf, refs } from \"../../slots\";\nimport { SectionComponent } from \"../Section\";\n\nexport const dashboardPropsSchema = z.object({\n children: z.array(oneOf([...refs(DASHBOARD_CHILDREN), SectionComponent.ref as z.ZodType])),\n});\nexport type DashboardSchemaProps = z.infer<typeof dashboardPropsSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { DashboardTheme } from \"../../../components/ThemeProvider\";\nimport { CompareProvider } from \"../../../shared/compare\";\nimport { FilterRegistryProvider } from \"../../../shared/filterRegistry\";\nimport { dashboardPropsSchema, type DashboardSchemaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst DashboardImpl = vueComponent({\n name: \"OpenUIDashboardRoot\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<DashboardSchemaProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n bindSource: Function as PropType<(prop?: string) => Record<string, string>>,\n },\n setup(p) {\n return () =>\n h(DashboardTheme, null, {\n default: () =>\n h(CompareProvider, null, {\n default: () =>\n h(FilterRegistryProvider, null, {\n default: () =>\n h(\n \"div\",\n {\n ...(p.bindSource?.() ?? {}),\n class: \"openui-dashboard-root\",\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"var(--openui-dashboard-space-xl)\",\n color: \"var(--openui-dashboard-ink)\",\n fontFamily: 'var(--openui-font-body, \"Inter\", -apple-system, BlinkMacSystemFont, sans-serif)',\n width: \"100%\",\n },\n },\n [p.renderNode(p.props.children)],\n ),\n }),\n }),\n });\n },\n});\n\nexport const DashboardComponent = defineComponent({\n name: \"Dashboard\",\n props: dashboardPropsSchema,\n description: \"The root.\",\n component: DashboardImpl,\n});\n","import type { Group } from \"../group\";\nimport { CardComponent } from \"./Card\";\nimport { DashboardComponent } from \"./Dashboard\";\nimport { RowComponent } from \"./Row\";\nimport { SectionComponent } from \"./Section\";\n\nexport const structure: Group = {\n components: [DashboardComponent, SectionComponent, RowComponent, CardComponent],\n styles: {},\n};\n","import { groups } from \"./registeredGroups\";\nimport { structure } from \"./structure\";\n\nexport * from \"./slots\";\nexport const componentGroups = [structure, ...groups];\nexport const groupComponents = componentGroups.flatMap((group) => group.components);\n","/*\n * Short example Dashboard programs for the prompt. They show the things a model most often gets\n * wrong: root first, the story order (a lead Section with one Kpis strip, then Rows of Cards),\n * raw numbers with a Format, previous values beside current ones, and a filter whose $variable\n * changes the data.\n */\n\n/** Written-in data keyed by a period filter, so the filter changes every number it should. */\nconst FILTERED_EXAMPLE = `root = Dashboard([filters, lead, trends])\n$period = \"30d\"\nfilters = FilterBar([PeriodPicker($period, [{value: \"7d\", label: \"7D\"}, {value: \"30d\", label: \"30D\"}]), CompareToggle(\"Previous period\", true)])\nlead = Section(\"\", [Kpis([Kpi(\"Revenue\", k[$period].rev, \"currency-compact\", k[$period].revPrev), Kpi(\"Orders\", k[$period].orders, \"number\", k[$period].ordersPrev), Kpi(\"Average order\", k[$period].aov, \"currency-precise\", k[$period].aovPrev)])])\ntrends = Section(\"Trends\", [Row([Card(\"Revenue\", [TimeSeries(t[$period].labels, [Series(\"Revenue\", t[$period].values, t[$period].previous)], \"area\", \"currency-compact\")], \"two-thirds\", \"USD\"), Card(\"Revenue by channel\", [Donut([\"Online\", \"Retail\", \"Wholesale\"], [228000, 131000, 53600], \"currency-compact\", \"Total\")], \"third\", \"USD\")])])\nk = {\"7d\": {rev: 96400, revPrev: 91200, orders: 1284, ordersPrev: 1190, aov: 75.08, aovPrev: 76.64}, \"30d\": {rev: 412600, revPrev: 398200, orders: 5460, ordersPrev: 5310, aov: 75.57, aovPrev: 74.99}}\nt = {\"7d\": {labels: [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"], values: [12100, 13400, 12800, 14200, 15100, 15600, 13200], previous: [11800, 12600, 12900, 13100, 14000, 14600, 12200]}, \"30d\": {labels: [\"Oct 5\", \"Oct 12\", \"Oct 19\", \"Oct 26\"], values: [99000, 101000, 102400, 110200], previous: [97200, 99800, 98600, 102600]}}`;\n\n/** No filters: a breakdown, a ranking where lower is better, and a detail table. */\nconst BREAKDOWN_EXAMPLE = `root = Dashboard([lead, breakdown, detail])\nlead = Section(\"\", [Kpis([Kpi(\"Open tickets\", 184, \"number\", 212, \"down\"), Kpi(\"Resolved this week\", 96, \"number\", 88), Kpi(\"Satisfaction\", 94.2, \"percent\", 92.8)])])\nbreakdown = Section(\"Where tickets come from\", [Row([Card(\"Tickets by product area\", [Bars([\"Billing\", \"Login\", \"Reports\", \"Integrations\", \"Mobile app\"], [Series(\"Tickets\", [58, 44, 37, 29, 16], [64, 51, 30, 33, 34])], \"number\")], \"half\", \"Open · this week vs last\"), Card(\"Slowest queues\", [Leaderboard([\"Enterprise\", \"Billing\", \"Onboarding\", \"General\"], [9.4, 6.1, 4.8, 2.2], {type: \"number\", suffix: \" h\"}, [8.2, 6.9, 5.5, 2.4], \"down\")], \"half\", \"Median hours to first reply\")])])\ndetail = Section(\"Detail\", [Row([Card(\"Agents\", [Table([Column(\"Agent\", [\"Priya\", \"Marco\", \"Aiko\", \"Sam\"], \"primary\"), Column(\"Resolved\", [31, 27, 22, 16], \"number\", \"number\"), Column(\"Satisfaction\", [97.1, 94.8, 93.2, 90.4], \"number\", \"percent\"), Column(\"Status\", [\"On track\", \"On track\", \"On track\", \"Behind\"], \"badge\", null, {\"On track\": \"good\", \"Behind\": \"warning\"})])], \"full\")])])`;\n\n/**\n * Live data from a tool that only takes a query string: the date filter's $variable becomes\n * the query's date bounds, for a preset key and for a custom \"from..to\" range alike, and the\n * period before is loaded for the Kpis' previous. A tool that takes the range itself gets the\n * $variable as an argument. The tool names and the SQL stand in for the host's own.\n */\nconst LIVE_EXAMPLE = `root = Dashboard([filters, lead, trends, detail])\n$range = \"30d\"\nstart = days[$range] ? \"(current_date - \" + days[$range] + \")\" : \"split_part('\" + $range + \"', '..', 1)::date\"\nend = days[$range] ? \"current_date\" : \"split_part('\" + $range + \"', '..', 2)::date\"\nduring = \"day >= \" + start + \" AND day <= \" + end\nbefore = \"day >= \" + start + \" - (\" + end + \" - \" + start + \") - 1 AND day < \" + start\ntotals = Query(\"run_sql\", {query: \"SELECT sum(revenue) AS revenue, sum(orders) AS orders FROM daily_sales WHERE \" + during}, {rows: []})\nearlier = Query(\"run_sql\", {query: \"SELECT sum(revenue) AS revenue, sum(orders) AS orders FROM daily_sales WHERE \" + before}, {rows: []})\nbyDay = Query(\"run_sql\", {query: \"SELECT day, revenue FROM daily_sales WHERE \" + during + \" ORDER BY day\"}, {rows: []})\nbyChannel = Query(\"sales_by_channel\", {range: $range}, {rows: []})\nnow = @First(totals.rows)\nprev = @First(earlier.rows)\nfilters = FilterBar([DateRangeFilter($range, [{value: \"7d\", label: \"Last 7 days\"}, {value: \"30d\", label: \"Last 30 days\"}, {value: \"90d\", label: \"Last 90 days\"}]), CompareToggle(\"Previous period\", true)])\nlead = Section(\"\", [Kpis([Kpi(\"Revenue\", now.revenue, \"currency-compact\", prev.revenue), Kpi(\"Orders\", now.orders, \"number\", prev.orders)])])\ntrends = Section(\"Trends\", [Row([Card(\"Revenue by day\", [TimeSeries(byDay.rows.day, [Series(\"Revenue\", byDay.rows.revenue)], \"area\", \"currency-compact\")], \"full\", \"USD\")])])\ndetail = Section(\"Detail\", [Row([Card(\"Channels\", [Table([Column(\"Channel\", byChannel.rows.channel, \"primary\"), Column(\"Revenue\", byChannel.rows.revenue, \"number\", \"currency\"), Column(\"Orders\", byChannel.rows.orders, \"number\", \"number\")], 10, false)], \"full\")])])\ndays = {\"7d\": 7, \"30d\": 30, \"90d\": 90}`;\n\n/**\n * One list, live data first. The prompt builder appends `examples` and `toolExamples` alike, and\n * OpenUI Cloud forwards only `examples`, so a second list would not reach the model there.\n */\nexport const examples: string[] = [LIVE_EXAMPLE, FILTERED_EXAMPLE, BREAKDOWN_EXAMPLE];\n","import type { PromptOptions } from \"@wodecorp/openui-vue-lang\";\nimport { examples } from \"./examples\";\n\n// Rules, examples and promptOptions sit apart from the prompt groups, which read the registered\n// components: a server route that imports only promptOptions then loads no component code, so\n// nothing calls React's client APIs (createContext) where they don't exist.\n\n/**\n * Rules for generating a dashboard, beyond the notes on each component group. The base\n * openui-lang prompt is written for any library and names components this one doesn't have\n * (Button, Select, forms); these rules say what a dashboard is made of instead, and cover the\n * mistakes that make a card come out empty.\n */\nexport const additionalRules: string[] = [\n \"Dashboard holds an optional FilterBar first, then Sections. A Section holds Kpis strips and Rows. A Row holds Cards. Every chart, map, Table, Stat, Goal and KeyValues goes inside a Card's content, never straight into a Row or a Section.\",\n \"Use only the components listed under Component Signatures. This library has no Button, Select, SelectItem, Input, Form, FormControl, Tabs or text and markdown blocks, whatever other sections of these instructions mention. A choice the reader makes is a filter. Words that explain a number go in a Card's subtitle or a Section's description.\",\n \"A dashboard only shows data. Never write a Mutation, a form or a refresh button.\",\n \"Arrays that go together have the same length and order: labels with values, a Series' values with its previous, every Column of one Table. Never write null for a value a component requires, such as a KeyValue's value: leave that row or item out.\",\n \"Previous values are the same measure for the period before, in the same unit. With live data and no tool that returns them, load them with a second Query for the previous range. When you don't have them, leave them out: never repeat the current values or invent a change.\",\n \"Without a data tool, write realistic, professional data into the program, and use only PeriodPicker, ChipFilter, SelectFilter and CompareToggle as filters. Give the data an entry for every option value, the default included. DateRangeFilter and MultiSelectFilter need a data tool, because written values can't follow a free date range or several choices at once.\",\n \"With a data tool, load every number with Query. Pass each filter's $variable in the arguments of every Query it should change. Give each Query a default with the same shape as its result, with empty lists and no made-up numbers ({rows: []} for a tool that returns {rows: [...]}), and read its columns with a pluck: sales.rows.revenue. Sum or count rows with the built-in functions for headline numbers: @Sum(sales.rows.revenue).\",\n 'A Goal needs a target above 0. For a limit of zero, such as critical bugs or failed checks, show the count as a Kpi with goodWhen \"down\".',\n 'A filter is connected only through its first argument, value, which takes a $variable: PeriodPicker($period, [...]), ChipFilter($by, [...], \"Group by\"). A literal there (\"30d\") leaves the filter disconnected, so clicking it changes nothing. Put the starting value in the declaration: $period = \"30d\".',\n \"Add a filter only when something can follow it. A date or period filter needs a data tool that takes a date, period or range argument; when no tool does (current counts such as stars, open issues or a latest version), add no date filter, and show the previous period with previous values or a comparison card instead. A filter whose $variable nothing reads does nothing: leave it out, and with no filters leave the FilterBar out.\",\n \"Only one FilterBar is drawn, the one listed first in Dashboard([...]): put every dashboard-wide filter in it.\",\n 'When a filter sets the period, never write a period (\"Last 30 days\") in a title, subtitle or hint.',\n 'A pluck on a list of rows gives one value per row. @Filter(pkgs.rows, \"name\", \"==\", \"react\").downloads is a list holding that row\\'s list, not its numbers, so @Sum of it is 0 and a chart of it is empty. To read one row, take it first, then its fields: react = @First(@Filter(pkgs.rows, \"name\", \"==\", \"react\")), then react.downloads. The same for a result of one row: totals = @First(sales.rows), then Kpi(\"Revenue\", totals.revenue, \"currency-compact\").',\n \"Write the statements in this order: root, $variables, Queries and the strings they are built from, the FilterBar and Sections, then written-in data last.\",\n];\n\n/**\n * Prompt options for the dashboard library: pass to `library.prompt(promptOptions)`, or spread\n * `examples` and `additionalRules` into your own options beside your own preamble.\n */\nexport const promptOptions: PromptOptions = {\n preamble: \"You are generating an openui-lang dashboard.\",\n examples,\n additionalRules,\n bindings: true,\n};\n","import type { ComponentGroup } from \"@wodecorp/openui-vue-lang\";\nimport { FORMAT_PRESETS } from \"../../shared/format\";\nimport { WIDTHS } from \"../../shared/schema\";\nimport { isRegistered } from \"../defineComponents\";\n\n/**\n * His prompt groups and notes (library.ts), written out in full once. A group shows only the\n * components registered so far and is left out while it has none, and a note that names\n * components not registered yet waits for them. Once every group ticket has landed the prompt\n * is his, word for word, and no group ticket needs to edit this file.\n */\ntype Note = string | { text: string; needs: string[] } | (() => string | null);\n\ntype PromptGroup = { name: string; components: string[]; notes: Note[] };\n\nconst all = (names: string[]) => names.every(isRegistered);\n\n/** \"Give previous-period values wherever they exist (…)\": lists only components that exist. */\nfunction previousValuesNote() {\n const takers = [\"Kpi\", \"Stat\", \"Series\", \"Funnel\", \"Leaderboard\", \"GeoMap\"].filter(isRegistered);\n const toggle = isRegistered(\"CompareToggle\") ? \" and add a CompareToggle\" : \"\";\n return `Give previous-period values wherever they exist (${takers.join(\", \")})${toggle}.`;\n}\n\n/** Story order: his text once trends and tables exist; until then, without them. */\nfunction storyOrderNote() {\n const tail = all([\"TimeSeries\", \"Table\"])\n ? \"then trends, then breakdowns, then detail tables\"\n : \"then Rows of Cards\";\n return `Story order: a lead Section with one Kpis strip of 3–6 headline numbers, ${tail}. Don't size Kpis: the strip lays them out. A number that needs a chart beside it is a Card with a Stat.`;\n}\n\nconst PROMPT_GROUPS: PromptGroup[] = [\n {\n name: \"Structure\",\n components: [\"Dashboard\", \"Section\", \"Row\", \"Card\"],\n notes: [\n `Shared argument types: Format = ${FORMAT_PRESETS.map((preset) => `\"${preset}\"`).join(\" | \")}, or {type, currency?, decimals?, prefix?, suffix?} to override, e.g. {type: \"number\", suffix: \" seats\"}. Width = ${WIDTHS.map((width) => `\"${width}\"`).join(\" | \")}. GoodWhen = \"up\" | \"down\" | \"neutral\": which direction of change is good news.`,\n 'Numbers are raw with a Format; never formatted strings like \"$1.2K\" or \"12%\". percent values are already percentages (18.4 = 18.4%); ratio is for fractions; duration is seconds, ms milliseconds, days days. A Kpi\\'s text value is for words (a plan, a status, a version), never a number.',\n {\n text: \"A pluck reads one column across a list of rows: where a Query result r holds its rows as objects in r.rows, r.rows.day is every row's day, so TimeSeries(r.rows.day, [Series(\\\"Events\\\", r.rows.events)]). Read each tool's result in the shape that tool describes, and ask a query for exactly the rows and columns a card shows.\",\n needs: [\"TimeSeries\", \"Series\"],\n },\n 'To skip an optional argument before one you need, pass null: Kpi(\"Signups\", 2227, \"number\", null, null, \"New accounts\").',\n storyOrderNote,\n {\n text: \"Charts are grouped below by the question they answer: Trends (over time), Comparison (across categories), Composition (part of a whole), Flow (between stages), Relationships (two measures or axes), Maps (by place). Pick the group by the question, then the chart. One unit per chart (no dual axes); split different units into separate charts.\",\n needs: [\"TimeSeries\", \"Bars\", \"Donut\", \"Funnel\", \"Scatter\", \"GeoMap\"],\n },\n ],\n },\n {\n name: \"Filters\",\n components: [\n \"FilterBar\",\n \"PeriodPicker\",\n \"DateRangeFilter\",\n \"ChipFilter\",\n \"SelectFilter\",\n \"MultiSelectFilter\",\n \"SearchFilter\",\n \"CompareToggle\",\n ],\n notes: [\n \"One FilterBar first, for dashboard-wide filters only: date filter first, then segments several cards read (plan, region), then CompareToggle.\",\n \"A switch that changes only one card, such as what it's broken down by (channel or referring domain; device, browser or OS) or which metric it plots, belongs in that Card's controls, not the FilterBar. Its $variable feeds only that card's Query or data.\",\n \"A filter must change what is shown, but only cards whose numbers depend on it read it; point-in-time or cross-segment cards can ignore it. With data written into the program, key values by option: data[$period].mrr (nest keys for two filters: data[$period][$channel].signups).\",\n ],\n },\n {\n name: \"Metrics\",\n components: [\n \"Kpis\",\n \"Kpi\",\n \"Trend\",\n \"Progress\",\n \"Split\",\n \"States\",\n \"Stat\",\n \"KeyValues\",\n \"KeyValue\",\n \"Goal\",\n ],\n notes: [\n previousValuesNote,\n 'Set goodWhen \"down\" for metrics where lower is better: costs, CAC, churn, latency, errors.',\n ],\n },\n {\n name: \"Tables\",\n components: [\"Table\", \"Column\"],\n notes: [\"Table for several measures per row; Columns pick how each cell draws.\"],\n },\n // Charts are grouped by the question they answer, the same groups as the library's pages.\n {\n name: \"Trends\",\n components: [\"TimeSeries\", \"Series\", \"Reference\", \"Marker\", \"SmallMultiples\", \"StatusTimeline\"],\n notes: [\n 'How a measure moves over time → TimeSeries (events → markers; share over time → stacked \"percent\"; projections → forecastFrom). Many series of one measure → SmallMultiples. Up, degraded or down per service over time → StatusTimeline.',\n ],\n },\n {\n name: \"Comparison\",\n components: [\"Bars\", \"Leaderboard\", \"Dumbbell\", \"Distribution\", \"Intervals\"],\n notes: [\n \"Values across categories → Bars (variance around zero → diverging). A ranked top-N list to read → Leaderboard. Before → after per category → Dumbbell. Spread of values → Distribution. Estimates with uncertainty → Intervals.\",\n ],\n },\n {\n name: \"Composition\",\n components: [\"Donut\", \"SegmentedBar\", \"Treemap\", \"Waterfall\"],\n notes: [\n \"Part of a whole → Donut when the total is the headline, SegmentedBar for a compact strip; both take up to 8 parts. Treemap for many or nested parts. How a total moved → Waterfall.\",\n ],\n },\n {\n name: \"Flow\",\n components: [\"Funnel\", \"Flow\"],\n notes: [\n \"Ordered conversion steps → Funnel; start it at the first meaningful step (signup started), not raw traffic, and show traffic as a Kpi. Paths between stages → Flow.\",\n ],\n },\n {\n name: \"Relationships\",\n components: [\"Scatter\", \"Heatmap\", \"Cohorts\"],\n notes: [\n \"Two measures per item → Scatter. Magnitude across two categorical axes → Heatmap. Retention by cohort → Cohorts.\",\n ],\n },\n {\n name: \"Maps\",\n components: [\"GeoMap\", \"PointMap\"],\n notes: [\"By country or US state → GeoMap. At places such as stores or cities → PointMap.\"],\n },\n];\n\nfunction noteText(note: Note): string | null {\n if (typeof note === \"string\") return note;\n if (typeof note === \"function\") return note();\n return all(note.needs) ? note.text : null;\n}\n\nexport { examples } from \"./examples\";\nexport { additionalRules, promptOptions } from \"./promptOptions\";\n\n/** The prompt groups for the components registered so far. */\nexport function promptGroups(): ComponentGroup[] {\n return PROMPT_GROUPS.flatMap((group) => {\n const components = group.components.filter(isRegistered);\n if (!components.length) return [];\n const notes = group.notes.map(noteText).filter((note): note is string => note !== null);\n return [{ name: group.name, components, notes }];\n });\n}\n","import { createLibrary, tagSchemaId, type ComponentGroup, type DefinedComponent, type Library } from \"@wodecorp/openui-vue-lang\";\nimport { formatSchema } from \"../shared/format\";\nimport { goodWhenSchema, widthSchema } from \"../shared/schema\";\nimport { groupComponents, inPromptOrder } from \"./defineComponents\";\nimport { promptGroups } from \"./prompt-options\";\n\ntagSchemaId(formatSchema, \"Format\");\ntagSchemaId(widthSchema, \"Width\");\ntagSchemaId(goodWhenSchema, \"GoodWhen\");\n\nexport { additionalRules, examples, promptOptions } from \"./prompt-options\";\n\nexport const dashboardComponents: DefinedComponent<any>[] = inPromptOrder(groupComponents);\n\nexport const componentGroups: ComponentGroup[] = promptGroups();\n\nexport const library: Required<Library> = createLibrary({\n root: \"Dashboard\",\n components: dashboardComponents,\n componentGroups,\n});\n"],"mappings":";;;;;;;AAAA,MAAa,oBAAoB;C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