@wodecorp/openui-vue-intelligent-ui-library 0.1.0 → 0.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["inject","defineComponent","useComponentsTheme","computed","onMounted","onUpdated","onBeforeUnmount","useId","provide","h","ComponentsThemeProvider","defineComponent","shallowRef","watch","getIconImport","h","z","defineComponent","h","z","tagSchemaId","h","z","defineComponent","h","ACTION_STEPS","useTriggerAction","useFormName","useFormValidation","computed","parseStructuredRules","toValue","watchEffect","onScopeDispose","useId","h","z","z","action","vueComponent","useIsStreaming","h","defineComponent","z","defineComponent","h","z","defineComponent","h","z","defineComponent","h","z","vueComponent","useIsStreaming","ref","watch","h","defineComponent","z","vueComponent","h","PieChart","ScatterChart","LineChart","AreaChart","BarChart","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","CodeBlock","z","vueComponent","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","vueComponent","ref","h","defineComponent","z","vueComponent","useId","useCreateFormValidation","provide","FormValidationContext","FormNameContext","h","defineComponent","z","defineComponent","h","useTheme","computed","z","vueComponent","useIsStreaming","ref","computed","onMounted","onBeforeUnmount","h","defineComponent","z","defineComponent","h","z","action","vueComponent","useIsStreaming","h","defineComponent","z","vueComponent","ref","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","defineComponent","h","z","h","defineComponent","z","defineComponent","h","MarkDownRenderer","z","defineComponent","katex","h","z","vueComponent","ref","h","defineComponent","z","action","vueComponent","useIsStreaming","ref","h","defineComponent","z","defineComponent","h","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","vueComponent","provide","h","inject","defineComponent","Fragment","z","defineComponent","h","z","defineComponent","h","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","ref","onBeforeUnmount","h","defineComponent","z","defineComponent","h","z","defineComponent","h","defineFunction","z","z","defineFunction","z","z","defineFunction","defineFunction","z","defineFunction","z","defineFunction","z","createLibrary"],"sources":["../src/shared/tokens.ts","../src/components/defaultThemes.ts","../src/components/ThemeProvider.ts","../src/shared/props.ts","../src/components/LucideIcon.ts","../src/shared/text.ts","../src/lib/Badge/schema.ts","../src/lib/Badge/index.ts","../src/shared/color.ts","../src/shared/url.ts","../src/lib/schemas.ts","../src/lib/Box/schema.ts","../src/lib/Box/index.ts","../src/lib/controls.ts","../src/lib/Button/schema.ts","../src/lib/Button/index.ts","../src/lib/Caption/schema.ts","../src/lib/Caption/index.ts","../src/lib/Card/schema.ts","../src/lib/Card/index.ts","../src/lib/Carousel/schema.ts","../src/lib/Carousel/index.ts","../src/lib/Celebration/schema.ts","../src/lib/Celebration/index.ts","../src/lib/Chart/schema.ts","../src/lib/Chart/index.ts","../src/lib/Checkbox/schema.ts","../src/lib/Checkbox/index.ts","../src/lib/Code/schema.ts","../src/lib/Code/index.ts","../src/lib/Col/schema.ts","../src/lib/Col/index.ts","../src/lib/DatePicker/schema.ts","../src/lib/DatePicker/index.ts","../src/lib/Divider/schema.ts","../src/lib/Divider/index.ts","../src/lib/Flashcard/schema.ts","../src/lib/Flashcard/index.ts","../src/lib/Form/schema.ts","../src/lib/Form/index.ts","../src/lib/Grid/schema.ts","../src/lib/Grid/index.ts","../src/shared/useThemeMode.ts","../src/lib/HtmlView/schema.ts","../src/lib/HtmlView/index.ts","../src/lib/Icon/schema.ts","../src/lib/Icon/index.ts","../src/lib/IconButton/schema.ts","../src/lib/IconButton/index.ts","../src/lib/Image/schema.ts","../src/lib/Image/index.ts","../src/lib/Input/schema.ts","../src/lib/Input/index.ts","../src/lib/Label/schema.ts","../src/lib/Label/index.ts","../src/lib/Link/schema.ts","../src/lib/Link/index.ts","../src/lib/List/schema.ts","../src/lib/List/index.ts","../src/lib/Markdown/schema.ts","../src/lib/Markdown/index.ts","../src/lib/Math/schema.ts","../src/lib/Math/index.ts","../src/lib/Popover/schema.ts","../src/lib/Popover/index.ts","../src/lib/Pressable/schema.ts","../src/lib/Pressable/index.ts","../src/lib/Quote/schema.ts","../src/lib/Quote/index.ts","../src/lib/RadioGroup/schema.ts","../src/lib/RadioGroup/index.ts","../src/lib/Row/schema.ts","../src/lib/Row/index.ts","../src/lib/SegmentedControl/schema.ts","../src/lib/SegmentedControl/index.ts","../src/lib/Select/schema.ts","../src/lib/Select/index.ts","../src/lib/Slider/schema.ts","../src/lib/Slider/index.ts","../src/lib/Spacer/schema.ts","../src/lib/Spacer/index.ts","../src/lib/Svg/index.ts","../src/lib/Table/schema.ts","../src/lib/Table/index.ts","../src/lib/Text/schema.ts","../src/lib/Text/index.ts","../src/lib/TextArea/schema.ts","../src/lib/TextArea/index.ts","../src/lib/Timer/schema.ts","../src/lib/Timer/index.ts","../src/lib/Title/schema.ts","../src/lib/Title/index.ts","../src/lib/YouTube/schema.ts","../src/lib/YouTube/index.ts","../src/lib/defineComponents.ts","../src/lib/functions/colors.ts","../src/lib/functions/helpers.ts","../src/lib/functions/dates.ts","../src/lib/functions/data.ts","../src/lib/functions/lists.ts","../src/lib/functions/numbers.ts","../src/lib/functions/text.ts","../src/lib/functions/index.ts","../src/lib/library.ts","../src/lib/prompt-options/index.ts"],"sourcesContent":["/**\n * The kit's design tokens as they are written in its styles. Each reads a\n * react-components token, so the kit follows ThemeProvider: its mode, its\n * lightTheme and darkTheme, wherever it writes them. Nothing sets the\n * --openui-intelligent-* variables by default; an app sets one to override that\n * token alone. Mixes resolve where they are used, so they follow the theme there.\n * The last fallback in each is react-components' light default, for a response\n * that renders with no theme at all.\n */\nexport const tokens = {\n font: 'var(--openui-intelligent-font, var(--openui-font-body, \"Inter\", sans-serif))',\n mono: \"var(--openui-intelligent-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)\",\n canvas: \"var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876)))\",\n hover:\n \"var(--openui-intelligent-hover, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 5%, transparent))\",\n pressed:\n \"var(--openui-intelligent-pressed, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 8%, transparent))\",\n surface:\n \"var(--openui-intelligent-surface, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 4%, transparent))\",\n surfaceStrong:\n \"var(--openui-intelligent-surface-strong, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 8%, transparent))\",\n ink: \"var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0)))\",\n inkHover:\n \"var(--openui-intelligent-ink-hover, color-mix(in oklch, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 82%, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876)))))\",\n onInk: \"var(--openui-intelligent-on-ink, var(--openui-foreground, oklch(0.994 0 89.876)))\",\n muted:\n \"var(--openui-intelligent-muted, var(--openui-text-neutral-secondary, oklch(0.097 0 0 / 0.6)))\",\n faint:\n \"var(--openui-intelligent-faint, var(--openui-text-neutral-secondary, oklch(0.097 0 0 / 0.6)))\",\n border:\n \"var(--openui-intelligent-border, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 8%, transparent))\",\n borderStrong:\n \"var(--openui-intelligent-border-strong, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 10%, transparent))\",\n rangeTrack:\n \"var(--openui-intelligent-range-track, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 6%, transparent))\",\n rangeThumb:\n \"var(--openui-intelligent-range-thumb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))))\",\n focus:\n \"var(--openui-intelligent-focus, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))))\",\n glass:\n \"var(--openui-intelligent-glass, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 70%, transparent))\",\n glassHover:\n \"var(--openui-intelligent-glass-hover, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 85%, transparent))\",\n glassRing:\n \"var(--openui-intelligent-glass-ring, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 70%, transparent))\",\n glassRingHover:\n \"var(--openui-intelligent-glass-ring-hover, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 85%, transparent))\",\n shadow:\n \"var(--openui-intelligent-shadow, var(--openui-shadow-l, 0 4px 4px -2px oklch(0 0 0 / 0.05), 0 4px 8px -2px oklch(0 0 0 / 0.04)))\",\n shadowSm:\n \"var(--openui-intelligent-shadow-sm, var(--openui-shadow-s, 0 1px 3px -2px oklch(0 0 0 / 0.02), 0 2px 5px -2px oklch(0 0 0 / 0.04)))\",\n info: \"var(--openui-intelligent-info, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))))\",\n infoSoft:\n \"var(--openui-intelligent-info-soft, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 6%, transparent))\",\n success:\n \"var(--openui-intelligent-success, var(--openui-text-success-primary, oklch(0.448 0.108 151.328)))\",\n successSoft:\n \"var(--openui-intelligent-success-soft, var(--openui-success-background, oklch(0.627 0.17 149.214 / 0.12)))\",\n warning:\n \"var(--openui-intelligent-warning, var(--openui-text-alert-primary, oklch(0.476 0.103 61.907)))\",\n warningSoft:\n \"var(--openui-intelligent-warning-soft, var(--openui-alert-background, oklch(0.795 0.162 86.047 / 0.16)))\",\n danger:\n \"var(--openui-intelligent-danger, var(--openui-text-danger-primary, oklch(0.505 0.19 27.518)))\",\n dangerSoft:\n \"var(--openui-intelligent-danger-soft, var(--openui-danger-background, oklch(0.577 0.215 27.325 / 0.12)))\",\n purple:\n \"var(--openui-intelligent-purple, var(--openui-text-purple-primary, oklch(0.438 0.198 303.724)))\",\n purpleSoft:\n \"var(--openui-intelligent-purple-soft, var(--openui-purple-background, oklch(0.627 0.233 303.9 / 0.12)))\",\n pink: \"var(--openui-intelligent-pink, var(--openui-text-pink-primary, oklch(0.459 0.17 3.815)))\",\n pinkSoft:\n \"var(--openui-intelligent-pink-soft, var(--openui-pink-background, oklch(0.592 0.218 0.584 / 0.12)))\",\n badgeNeutralSoft:\n \"var(--openui-intelligent-badge-neutral-soft, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 6%, transparent))\",\n badgeSuccess:\n \"var(--openui-intelligent-badge-success, var(--openui-text-success-primary, oklch(0.448 0.108 151.328)))\",\n badgeSuccessSoft:\n \"var(--openui-intelligent-badge-success-soft, var(--openui-success-background, oklch(0.627 0.17 149.214 / 0.12)))\",\n badgeWarning:\n \"var(--openui-intelligent-badge-warning, var(--openui-text-alert-primary, oklch(0.476 0.103 61.907)))\",\n badgeWarningSoft:\n \"var(--openui-intelligent-badge-warning-soft, var(--openui-alert-background, oklch(0.795 0.162 86.047 / 0.16)))\",\n badgeDanger:\n \"var(--openui-intelligent-badge-danger, var(--openui-text-danger-primary, oklch(0.505 0.19 27.518)))\",\n badgeDangerSoft:\n \"var(--openui-intelligent-badge-danger-soft, var(--openui-danger-background, oklch(0.577 0.215 27.325 / 0.12)))\",\n badgePurple:\n \"var(--openui-intelligent-badge-purple, var(--openui-text-purple-primary, oklch(0.438 0.198 303.724)))\",\n badgePurpleSoft:\n \"var(--openui-intelligent-badge-purple-soft, var(--openui-purple-background, oklch(0.627 0.233 303.9 / 0.12)))\",\n badgePink:\n \"var(--openui-intelligent-badge-pink, var(--openui-text-pink-primary, oklch(0.459 0.17 3.815)))\",\n badgePinkSoft:\n \"var(--openui-intelligent-badge-pink-soft, var(--openui-pink-background, oklch(0.592 0.218 0.584 / 0.12)))\",\n chart1: \"var(--openui-intelligent-chart-1, #0285ff)\",\n chart2: \"var(--openui-intelligent-chart-2, #00a67d)\",\n chart3: \"var(--openui-intelligent-chart-3, #8b5cf6)\",\n chart4: \"var(--openui-intelligent-chart-4, #f4a340)\",\n chart5: \"var(--openui-intelligent-chart-5, #e46d91)\",\n chart6: \"var(--openui-intelligent-chart-6, #4b9ca6)\",\n spaceTight: \"var(--openui-intelligent-space-tight, 4px)\",\n spaceInner: \"var(--openui-intelligent-space-inner, 8px)\",\n spaceGroup: \"var(--openui-intelligent-space-group, 12px)\",\n spaceGroupLg: \"var(--openui-intelligent-space-group-lg, 16px)\",\n spaceSection: \"var(--openui-intelligent-space-section, 24px)\",\n controlGap: \"var(--openui-intelligent-control-gap, 8px)\",\n fieldGap: \"var(--openui-intelligent-field-gap, 24px)\",\n actionGap: \"var(--openui-intelligent-action-gap, 40px)\",\n radiusSm: \"var(--openui-intelligent-radius-sm, 6px)\",\n radiusMd: \"var(--openui-intelligent-radius-md, 10px)\",\n radiusLg: \"var(--openui-intelligent-radius-lg, 12px)\",\n radiusXl: \"var(--openui-intelligent-radius-xl, 14px)\",\n photoEmpty:\n \"var(--openui-intelligent-photo-empty, var(--openui-intelligent-surface, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 4%, transparent)))\",\n photoEmptyIcon:\n \"var(--openui-intelligent-photo-empty-icon, var(--openui-intelligent-border-strong, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 10%, transparent)))\",\n} as const;\n","import type { Theme as ComponentsTheme } from \"@wodecorp/openui-vue-ui\";\n\nexport type IntelligentTheme = {\n intelligentFont?: string;\n intelligentMono?: string;\n intelligentCanvas?: string;\n intelligentHover?: string;\n intelligentPressed?: string;\n intelligentSurface?: string;\n intelligentSurfaceStrong?: string;\n intelligentInk?: string;\n intelligentInkHover?: string;\n intelligentOnInk?: string;\n intelligentMuted?: string;\n intelligentFaint?: string;\n intelligentBorder?: string;\n intelligentBorderStrong?: string;\n intelligentRangeTrack?: string;\n intelligentRangeThumb?: string;\n intelligentFocus?: string;\n intelligentGlass?: string;\n intelligentGlassHover?: string;\n intelligentGlassRing?: string;\n intelligentGlassRingHover?: string;\n intelligentShadow?: string;\n intelligentShadowSm?: string;\n intelligentInfo?: string;\n intelligentInfoSoft?: string;\n intelligentSuccess?: string;\n intelligentSuccessSoft?: string;\n intelligentWarning?: string;\n intelligentWarningSoft?: string;\n intelligentDanger?: string;\n intelligentDangerSoft?: string;\n intelligentPurple?: string;\n intelligentPurpleSoft?: string;\n intelligentPink?: string;\n intelligentPinkSoft?: string;\n intelligentBadgeNeutralSoft?: string;\n intelligentBadgeSuccess?: string;\n intelligentBadgeSuccessSoft?: string;\n intelligentBadgeWarning?: string;\n intelligentBadgeWarningSoft?: string;\n intelligentBadgeDanger?: string;\n intelligentBadgeDangerSoft?: string;\n intelligentBadgePurple?: string;\n intelligentBadgePurpleSoft?: string;\n intelligentBadgePink?: string;\n intelligentBadgePinkSoft?: string;\n intelligentChart1?: string;\n intelligentChart2?: string;\n intelligentChart3?: string;\n intelligentChart4?: string;\n intelligentChart5?: string;\n intelligentChart6?: string;\n intelligentSpaceTight?: string;\n intelligentSpaceInner?: string;\n intelligentSpaceGroup?: string;\n intelligentSpaceGroupLg?: string;\n intelligentSpaceSection?: string;\n intelligentControlGap?: string;\n intelligentFieldGap?: string;\n intelligentActionGap?: string;\n intelligentRadiusSm?: string;\n intelligentRadiusMd?: string;\n intelligentRadiusLg?: string;\n intelligentRadiusXl?: string;\n intelligentPhotoEmpty?: string;\n intelligentPhotoEmptyIcon?: string;\n};\n\nexport type Theme = ComponentsTheme & IntelligentTheme;\n\nconst shared = {\n intelligentMono: \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\",\n intelligentChart1: \"#0285ff\",\n intelligentChart2: \"#00a67d\",\n intelligentChart3: \"#8b5cf6\",\n intelligentChart4: \"#f4a340\",\n intelligentChart5: \"#e46d91\",\n intelligentChart6: \"#4b9ca6\",\n intelligentSpaceTight: \"4px\",\n intelligentSpaceInner: \"8px\",\n intelligentSpaceGroup: \"12px\",\n intelligentSpaceGroupLg: \"16px\",\n intelligentSpaceSection: \"24px\",\n intelligentControlGap: \"8px\",\n intelligentFieldGap: \"24px\",\n intelligentActionGap: \"40px\",\n intelligentRadiusSm: \"6px\",\n intelligentRadiusMd: \"10px\",\n intelligentRadiusLg: \"12px\",\n intelligentRadiusXl: \"14px\",\n} satisfies IntelligentTheme;\n\nexport const defaultLightTheme: IntelligentTheme = { ...shared };\nexport const defaultDarkTheme: IntelligentTheme = { ...shared };\n","import {\n ThemeProvider as ComponentsThemeProvider,\n useTheme as useComponentsTheme,\n type Theme as ComponentsTheme,\n type ThemeMode,\n} from \"@wodecorp/openui-vue-ui\";\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n provide,\n useId,\n type ComputedRef,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { tokens } from \"../shared/tokens\";\nimport {\n defaultDarkTheme,\n defaultLightTheme,\n type IntelligentTheme,\n type Theme,\n} from \"./defaultThemes\";\n\nexport { defaultDarkTheme, defaultLightTheme, type IntelligentTheme, type Theme };\n\nexport interface ThemeProviderProps {\n mode?: ThemeMode;\n lightTheme?: Theme;\n darkTheme?: Theme;\n}\n\nexport interface IntelligentThemeContextValue {\n mode: ComputedRef<ThemeMode>;\n theme: ComputedRef<IntelligentTheme>;\n overrides: ComputedRef<{ light: Theme; dark: Theme }>;\n}\n\nconst IntelligentThemeContext: InjectionKey<IntelligentThemeContextValue | null> = Symbol(\n \"OpenUI.IntelligentTheme\",\n);\n\nexport function useIntelligentTheme(): IntelligentThemeContextValue | null {\n return inject(IntelligentThemeContext, null);\n}\n\nconst INTELLIGENT_PREFIX = \"intelligent\";\n\nfunction camelToKebab(key: string): string {\n return key\n .replace(/([a-z])([A-Z])/g, \"$1-$2\")\n .replace(/([A-Z])([A-Z])/g, \"$1-$2\")\n .replace(/([a-z])(\\d)/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction splitTheme(theme: Theme | undefined) {\n const components: Record<string, unknown> = {};\n const intelligent: Record<string, string> = {};\n for (const [key, value] of Object.entries(theme ?? {})) {\n if (key.startsWith(INTELLIGENT_PREFIX) && key.length > INTELLIGENT_PREFIX.length) {\n if (typeof value === \"string\") intelligent[key] = value;\n } else {\n components[key] = value;\n }\n }\n return { components, intelligent: intelligent as IntelligentTheme };\n}\n\nfunction cssVars(theme: IntelligentTheme): string {\n return Object.entries(theme)\n .filter(([, value]) => typeof value === \"string\")\n .map(([key, value]) => `--openui-${camelToKebab(key)}: ${value as string};`)\n .join(\" \");\n}\n\nfunction cssSafeId(id: string): string {\n return id.replace(/[^a-zA-Z0-9-_]/g, \"\");\n}\n\nconst IntelligentVariables = defineComponent({\n name: \"OpenUIIntelligentVariables\",\n props: {\n id: { type: String, required: true },\n scope: { type: String, required: true },\n mode: { type: String as PropType<ThemeMode>, required: true },\n theme: { type: Object as PropType<IntelligentTheme>, required: true },\n },\n setup(props) {\n const { portalThemeClassName } = useComponentsTheme();\n const cssText = computed(() => {\n const rules = `color-scheme: ${props.mode}; color: var(--openui-text-neutral-primary); font-family: ${tokens.font}; ${cssVars(props.theme)}`;\n const selectors = [`.${props.scope}`];\n if (portalThemeClassName.value) selectors.push(`.${portalThemeClassName.value}`);\n return `${selectors.join(\", \")} { ${rules} }`;\n });\n\n let styleEl: HTMLStyleElement | undefined;\n const syncStyle = () => {\n if (typeof document === \"undefined\") return;\n if (styleEl?.textContent === cssText.value) return;\n styleEl?.remove();\n styleEl = document.createElement(\"style\");\n const nonce = (window as Window & { __nonce__?: string }).__nonce__;\n if (nonce) styleEl.nonce = nonce;\n styleEl.setAttribute(\"data-openui-intelligent-theme\", props.id);\n styleEl.textContent = cssText.value;\n document.head.appendChild(styleEl);\n };\n\n onMounted(syncStyle);\n onUpdated(syncStyle);\n onBeforeUnmount(() => styleEl?.remove());\n\n return () => {\n void cssText.value;\n return null;\n };\n },\n});\n\nexport const ThemeProvider = defineComponent({\n name: \"OpenUIIntelligentThemeProvider\",\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 id = cssSafeId(useId());\n const parent = inject(IntelligentThemeContext, null);\n const { mode: componentsMode } = useComponentsTheme();\n const mode = computed<ThemeMode>(\n () => props.mode ?? parent?.mode.value ?? componentsMode.value ?? \"light\",\n );\n const scope = `openui-intelligent-theme-${id}`;\n\n const overrides = computed(() => ({\n light: { ...parent?.overrides.value.light, ...props.lightTheme },\n dark: { ...parent?.overrides.value.dark, ...(props.darkTheme ?? props.lightTheme) },\n }));\n const light = computed(() => splitTheme(overrides.value.light));\n const dark = computed(() => splitTheme(overrides.value.dark));\n const theme = computed<IntelligentTheme>(() =>\n mode.value === \"light\"\n ? { ...defaultLightTheme, ...light.value.intelligent }\n : { ...defaultDarkTheme, ...dark.value.intelligent },\n );\n\n provide(IntelligentThemeContext, { mode, theme, overrides });\n\n return () =>\n h(\n \"div\",\n {\n class: scope,\n \"data-openui-intelligent-mode\": mode.value,\n style: { display: \"contents\" },\n },\n [\n h(\n ComponentsThemeProvider,\n {\n mode: mode.value,\n cssSelector: `.${scope}`,\n lightTheme: light.value.components as ComponentsTheme,\n darkTheme: dark.value.components as ComponentsTheme,\n },\n {\n default: () => [\n h(IntelligentVariables, {\n id,\n scope,\n mode: mode.value,\n theme: theme.value,\n }),\n slots.default?.(),\n ],\n },\n ),\n ],\n );\n },\n});\n\nexport const RootTheme = defineComponent({\n name: \"OpenUIIntelligentRootTheme\",\n inheritAttrs: false,\n setup(_, { slots }) {\n const existing = inject(IntelligentThemeContext, null);\n return () => (existing ? slots.default?.() : h(ThemeProvider, null, { default: () => slots.default?.() }));\n },\n});\n","/**\n * The model's prop values as CSS, shared by the components and the library. Colours are a token\n * (\"ink\", \"muted\", \"info\", \"chart1\", ...) or a CSS colour; spacing counts 4px steps; a length is px\n * or a CSS length; a radius is \"sm\" to \"xl\", \"full\" or px. Anything a model writes is checked first.\n */\nimport type { CSSProperties } from \"vue\";\nimport { tokens } from \"./tokens\";\n\n/** A token or a CSS color. */\nexport type Color = string;\n/** A px number or a CSS length such as \"50%\". */\nexport type Length = number | string;\n/** \"sm\", \"md\", \"lg\", \"xl\", \"full\", or px. */\nexport type Radius = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\" | number;\n/** Cross-axis alignment of a flex layout. */\nexport type Align = \"start\" | \"center\" | \"end\" | \"stretch\";\n/** Main-axis distribution of a flex layout. */\nexport type Justify = \"start\" | \"center\" | \"end\" | \"between\";\n\n// Safety\n// A model-written style value could otherwise load a resource: `background: url(...)`.\nconst UNSAFE_CSS =\n /(url|image|image-set|cross-fade|element|expression|paint|var|attr|env)\\s*\\(|@import|[\\\\;{}<>]/i;\nconst isSafeCss = (value: string) => !UNSAFE_CSS.test(value);\n\n// Values to CSS\nconst STATUS = [\"info\", \"success\", \"warning\", \"danger\", \"purple\", \"pink\"] as const;\nconst FOREGROUND: Record<string, string> = {\n ink: tokens.ink,\n muted: tokens.muted,\n faint: tokens.faint,\n canvas: tokens.canvas,\n surface: tokens.surface,\n ...Object.fromEntries(STATUS.map((s) => [s, tokens[s]])),\n chart1: tokens.chart1,\n chart2: tokens.chart2,\n chart3: tokens.chart3,\n chart4: tokens.chart4,\n chart5: tokens.chart5,\n chart6: tokens.chart6,\n};\nconst BACKGROUND: Record<string, string> = {\n ...FOREGROUND,\n surface: tokens.surface,\n \"surface-strong\": tokens.surfaceStrong,\n border: tokens.border,\n ...Object.fromEntries(STATUS.map((s) => [s, tokens[`${s}Soft`]])),\n};\n\nconst cssValue = (value: unknown) =>\n typeof value === \"string\" && value.trim() && isSafeCss(value) ? value.trim() : undefined;\n\n/** Text, icon and stroke colors: a token or a CSS color. */\nexport const fg = (value: unknown) =>\n typeof value === \"string\" ? (FOREGROUND[value] ?? cssValue(value)) : undefined;\n/** Backgrounds: status tokens become their soft tints. */\nexport const bg = (value: unknown) =>\n typeof value === \"string\" ? (BACKGROUND[value] ?? cssValue(value)) : undefined;\n\n/** Whether a background is one of the kit's tokens, which follow the theme, rather than a raw colour. */\nexport const isColorToken = (value: string) => value in BACKGROUND;\n\n/** Spacing in 4px steps. */\nexport const space = (value: unknown) =>\n typeof value === \"number\" && Number.isFinite(value) ? `${Math.max(0, value) * 4}px` : undefined;\n\nexport function size(value: unknown): string | undefined {\n if (typeof value === \"number\" && Number.isFinite(value)) return `${Math.max(0, value)}px`;\n if (typeof value !== \"string\") return undefined;\n if (/^\\d+(\\.\\d+)?$/.test(value.trim())) return `${value.trim()}px`;\n return /^\\d+(\\.\\d+)?(px|%|em|rem|vh|vw|fr)$|^auto$/.test(value.trim()) ? value.trim() : undefined;\n}\n\nconst RADIUS: Record<string, string> = {\n sm: tokens.radiusSm,\n md: tokens.radiusMd,\n lg: tokens.radiusLg,\n xl: tokens.radiusXl,\n full: \"999px\",\n};\nexport const radius = (value: unknown) => (typeof value === \"string\" ? RADIUS[value] : size(value));\n\n// Layout\nconst FLEX: Record<string, string> = {\n start: \"flex-start\",\n end: \"flex-end\",\n center: \"center\",\n stretch: \"stretch\",\n between: \"space-between\",\n};\n\nexport type FlexProps = { gap?: number; align?: string; justify?: string; wrap?: boolean };\n\nexport const flexStyle = (p: FlexProps, column = false): CSSProperties => ({\n gap: space(p.gap),\n alignItems: p.align ? FLEX[p.align] : undefined,\n justifyContent: p.justify ? FLEX[p.justify] : undefined,\n flexWrap: p.wrap ? \"wrap\" : undefined,\n // A centered column centers its wrapped lines too.\n textAlign: column && (p.align === \"center\" || p.align === \"end\") ? p.align : undefined,\n});\n","import { getIconImport, type LucideIcon as LucideComponent } from \"@wodecorp/openui-vue-ui/icons\";\nimport { defineComponent, h, shallowRef, watch, type PropType } from \"vue\";\nimport { fg } from \"../shared/props\";\n\nconst iconCache = new Map<string, LucideComponent>();\n\nexport const LucideIconView = defineComponent({\n name: \"OpenUIIntelligentLucideIcon\",\n props: {\n name: { type: String, required: true },\n size: { type: Number, default: 16 },\n color: String as PropType<string>,\n },\n setup(props) {\n const resolved = shallowRef<LucideComponent | null>(null);\n\n watch(\n () => props.name,\n (name) => {\n if (!name) {\n resolved.value = null;\n return;\n }\n const cached = iconCache.get(name);\n if (cached) {\n resolved.value = cached;\n return;\n }\n const loader = getIconImport(name);\n if (!loader) {\n resolved.value = null;\n return;\n }\n let cancelled = false;\n void loader()\n .then((mod) => {\n if (cancelled) return;\n const comp = (mod as { default?: LucideComponent })?.default;\n if (comp) {\n iconCache.set(name, comp);\n resolved.value = comp;\n }\n })\n .catch(() => {\n if (!cancelled) resolved.value = null;\n });\n return () => {\n cancelled = true;\n };\n },\n { immediate: true },\n );\n\n return () => {\n const IconComp = resolved.value;\n const color = fg(props.color) ?? \"currentColor\";\n if (!IconComp) {\n return h(\"span\", {\n class: \"openui-intelligent-icon-placeholder\",\n \"data-icon\": props.name,\n \"aria-hidden\": \"true\",\n style: {\n display: \"inline-block\",\n width: `${props.size}px`,\n height: `${props.size}px`,\n verticalAlign: \"middle\",\n },\n });\n }\n return h(IconComp as never, {\n size: props.size,\n color,\n style: { display: \"inline-block\", flexShrink: 0, verticalAlign: \"middle\" },\n });\n };\n },\n});\n","/** A short plain-text name for an element, from its rendered text, for action messages. */\nexport const textOf = (element: HTMLElement | null) =>\n (element?.innerText ?? \"\").replace(/\\s+/g, \" \").trim().slice(0, 120);\n\n/** Coerce a prop to a string; null and undefined become \"\". */\nexport const str = (value: unknown) => (value == null ? \"\" : String(value));\n\n/** A number for display: grouped, at most two decimals. */\nexport const numberText = (value: unknown) => {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return \"\";\n return value.toLocaleString(\"en-US\", { maximumFractionDigits: 2 });\n};\n","import { z } from \"zod/v4\";\n\nexport const BadgeSchema = z.object({\n text: z.string(),\n color: z.enum([\"neutral\", \"info\", \"success\", \"warning\", \"danger\", \"purple\", \"pink\"]).optional(),\n icon: z.string().optional(),\n});\n\nexport type BadgeProps = z.infer<typeof BadgeSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { BadgeSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst BADGE_PALETTE: Record<string, { bg: string; fg: string }> = {\n neutral: { bg: tokens.badgeNeutralSoft, fg: tokens.ink },\n info: { bg: tokens.infoSoft, fg: tokens.info },\n success: { bg: tokens.badgeSuccessSoft, fg: tokens.badgeSuccess },\n warning: { bg: tokens.badgeWarningSoft, fg: tokens.badgeWarning },\n danger: { bg: tokens.badgeDangerSoft, fg: tokens.badgeDanger },\n purple: { bg: tokens.badgePurpleSoft, fg: tokens.badgePurple },\n pink: { bg: tokens.badgePinkSoft, fg: tokens.badgePink },\n};\n\nexport const Badge = defineComponent({\n name: \"Badge\",\n props: BadgeSchema,\n description: \"Pill tag; icon is an optional leading lucide name.\",\n component: ({ props }) => {\n const palette = BADGE_PALETTE[props.color ?? \"neutral\"] ?? BADGE_PALETTE.neutral!;\n return h(\n \"span\",\n {\n class: \"openui-intelligent-badge\",\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"4px\",\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n fontSize: \"12px\",\n fontWeight: 500,\n lineHeight: 1.4,\n background: palette.bg,\n color: palette.fg,\n verticalAlign: \"middle\",\n },\n },\n [\n props.icon ? h(LucideIconView, { name: props.icon, size: 12 }) : null,\n str(props.text),\n ],\n );\n },\n});\n","/** Content on a model-chosen raw colour, which doesn't follow the theme. */\nimport type { CSSProperties } from \"vue\";\nimport { isColorToken } from \"./props\";\n\n/**\n * Text color for a model-chosen CSS color background (hex or rgb). Raw colors\n * do not follow the theme, so text on them is set dark or light to stay legible.\n */\nfunction contrastOn(background: unknown): string | undefined {\n if (typeof background !== \"string\" || isColorToken(background)) return undefined;\n let rgb: number[] | null = null;\n const hex = /^#([\\da-f]{3}|[\\da-f]{6})$/i.exec(background.trim());\n if (hex) {\n const h = hex[1].length === 3 ? hex[1].replace(/./g, \"$&$&\") : hex[1];\n rgb = [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16));\n } else {\n const m = /^rgba?\\(\\s*(\\d+)[\\s,]+(\\d+)[\\s,]+(\\d+)/i.exec(background.trim());\n if (m) rgb = [m[1], m[2], m[3]].map(Number);\n }\n if (!rgb) return undefined;\n const [r, g, b] = rgb.map((c) => {\n const v = c / 255;\n return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b > 0.36 ? \"#0d0d0d\" : \"#ffffff\";\n}\n\n/** A selected tile's tick, drawn in the color that sits on ink: white on dark ink, dark on light. */\nconst tick = (stroke: string) =>\n `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='${stroke}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E\")`;\n\n/** The selected tile's tick on the page's ink: white on light mode's dark ink, dark on dark mode's. */\nexport const checkIcon = (mode: \"light\" | \"dark\") => tick(mode === \"dark\" ? \"%23171717\" : \"white\");\n\n/**\n * Style for content on a raw-color background: text tokens switch to the readable color. What sits on\n * ink (a solid button's label, a selected tile's tick) switches with it, or it would keep the page\n * theme's color and vanish: dark on dark in dark mode.\n */\nexport function onColor(background: unknown): CSSProperties {\n const ink = contrastOn(background);\n if (!ink) return {};\n const darkInk = ink !== \"#ffffff\";\n return {\n color: ink,\n \"--openui-intelligent-ink\": ink,\n \"--openui-intelligent-muted\": `color-mix(in srgb, ${ink} 72%, transparent)`,\n \"--openui-intelligent-faint\": `color-mix(in srgb, ${ink} 55%, transparent)`,\n // react-components' parts inside (a field, a chart) read these, so they switch too.\n \"--openui-text-neutral-primary\": ink,\n \"--openui-text-neutral-secondary\": `color-mix(in srgb, ${ink} 72%, transparent)`,\n \"--openui-intelligent-on-ink\": darkInk ? \"#ffffff\" : \"#0d0d0d\",\n \"--_openui-intelligent-pressable-check-icon\": tick(darkInk ? \"white\" : \"%230d0d0d\"),\n } as CSSProperties;\n}\n","function protocolOf(value: string): string | null {\n try {\n return new URL(value.trim()).protocol;\n } catch {\n return null;\n }\n}\n\n/** An absolute http(s) URL, or null. Relative URLs would resolve against this app. */\nexport function webUrl(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const protocol = protocolOf(value);\n return protocol === \"http:\" || protocol === \"https:\" ? value.trim() : null;\n}\n","import { tagSchemaId, type ElementNode } from \"@wodecorp/openui-vue-lang\";\nimport { h, type VNodeChild } from \"vue\";\nimport { z } from \"zod/v4\";\nimport { tokens } from \"../shared/tokens\";\nimport { webUrl } from \"../shared/url\";\n\nconst node = z.any();\ntagSchemaId(node, \"Node\");\nexport const children = z.array(node);\n\nexport const color = z.string();\ntagSchemaId(color, \"Color\");\n\nexport const length = z.union([z.number(), z.string()]);\ntagSchemaId(length, \"Length\");\n\nexport const radiusSchema = z.union([z.enum([\"sm\", \"md\", \"lg\", \"xl\", \"full\"]), z.number()]);\ntagSchemaId(radiusSchema, \"Radius\");\n\nexport const fitSchema = z.enum([\"cover\", \"contain\"]);\n\nexport const rulesSchema = z.object({\n required: z.boolean().optional(),\n email: z.boolean().optional(),\n url: z.boolean().optional(),\n numeric: z.boolean().optional(),\n min: z.number().optional(),\n max: z.number().optional(),\n minLength: z.number().optional(),\n maxLength: z.number().optional(),\n pattern: z.string().optional(),\n});\ntagSchemaId(rulesSchema, \"Rules\");\n\nexport const option = z.union([z.string(), z.object({ value: z.string(), label: z.string() })]);\nexport type Option = z.infer<typeof option>;\n\nexport function toOption(\n o: unknown,\n): { value: string; label: string; description?: string } | null {\n if (o == null) return null;\n if (typeof o !== \"object\") return { value: String(o), label: String(o) };\n const { value, label, description } = o as Record<string, unknown>;\n const text = label ?? value;\n if (text == null) return null;\n return {\n value: String(value ?? label),\n label: String(text),\n ...(typeof description === \"string\" && { description }),\n };\n}\n\nexport const align = z.enum([\"start\", \"center\", \"end\", \"stretch\"]);\nexport const justify = z.enum([\"start\", \"center\", \"end\", \"between\"]);\nexport const slot = z.union([z.string(), children]);\n\nexport type Render = (value: unknown) => VNodeChild;\n\nconst INLINE_TOKEN = /(\\*\\*([^*]+)\\*\\*|\\*([^*]+)\\*|`([^`]+)`|\\[([^\\]]+)\\]\\(([^)]+)\\))/g;\n\nexport function renderInlineMarkdown(text: string): VNodeChild {\n if (!text) return \"\";\n const out: VNodeChild[] = [];\n let lastIndex = 0;\n INLINE_TOKEN.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = INLINE_TOKEN.exec(text)) !== null) {\n if (match.index > lastIndex) {\n out.push(text.slice(lastIndex, match.index));\n }\n if (match[2] !== undefined) {\n out.push(h(\"strong\", null, match[2]));\n } else if (match[3] !== undefined) {\n out.push(h(\"em\", null, match[3]));\n } else if (match[4] !== undefined) {\n out.push(\n h(\n \"code\",\n {\n style: {\n fontFamily: tokens.mono,\n fontSize: \"0.88em\",\n padding: \"0.1em 0.35em\",\n borderRadius: tokens.radiusSm,\n background: tokens.surface,\n },\n },\n match[4],\n ),\n );\n } else if (match[5] !== undefined && match[6] !== undefined) {\n const safe = webUrl(match[6]);\n if (safe) {\n out.push(\n h(\n \"a\",\n {\n href: safe,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n style: { color: tokens.info, textDecoration: \"underline\" },\n },\n match[5],\n ),\n );\n } else {\n out.push(match[5]);\n }\n }\n lastIndex = INLINE_TOKEN.lastIndex;\n }\n if (lastIndex < text.length) out.push(text.slice(lastIndex));\n return out.length === 1 ? out[0] : out;\n}\n\nexport const renderSlot = (value: unknown, renderNode: Render): VNodeChild =>\n typeof value === \"string\" || typeof value === \"number\"\n ? renderInlineMarkdown(String(value))\n : renderNode(Array.isArray(value) ? value.flat() : value);\n\nexport const isElement = (value: unknown): value is ElementNode =>\n !!value && typeof value === \"object\" && (value as { type?: unknown }).type === \"element\";\n","import { z } from \"zod/v4\";\nimport { align, children, color, justify, length, radiusSchema } from \"../schemas\";\n\nexport const BoxSchema = z.object({\n children: children.optional(),\n direction: z.enum([\"row\", \"col\"]).optional(),\n gap: z.number().optional(),\n padding: z.number().optional(),\n background: color.optional(),\n radius: radiusSchema.optional(),\n border: z.boolean().optional(),\n width: length.optional(),\n height: length.optional(),\n flex: z.number().optional(),\n align: align.optional(),\n justify: justify.optional(),\n wrap: z.boolean().optional(),\n});\n\nexport type BoxProps = z.infer<typeof BoxSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h, type CSSProperties } from \"vue\";\nimport { onColor } from \"../../shared/color\";\nimport { bg, flexStyle, radius, size, space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { BoxSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Box = defineComponent({\n name: \"Box\",\n props: BoxSchema,\n description: \"Flex container, a column by default. radius also clips the content.\",\n component: ({ props, renderNode }) => {\n const isCol = props.direction !== \"row\";\n const r = radius(props.radius);\n const style: CSSProperties = {\n display: \"flex\",\n flexDirection: isCol ? \"column\" : \"row\",\n padding: space(props.padding),\n background: bg(props.background),\n borderRadius: r,\n overflow: r ? \"hidden\" : undefined,\n border: props.border ? `1px solid ${tokens.border}` : undefined,\n width: size(props.width),\n height: size(props.height),\n flex: typeof props.flex === \"number\" && Number.isFinite(props.flex) ? props.flex : undefined,\n ...flexStyle(props, isCol),\n ...onColor(props.background),\n };\n return h(\"div\", { class: \"openui-intelligent-box\", style }, [renderNode(props.children)]);\n },\n});\n","import {\n ACTION_STEPS,\n parseStructuredRules,\n useFormName,\n useFormValidation,\n useTriggerAction,\n} from \"@wodecorp/openui-vue-lang\";\nimport {\n computed,\n h,\n onScopeDispose,\n toValue,\n useId,\n watchEffect,\n type MaybeRefOrGetter,\n type VNodeChild,\n} from \"vue\";\nimport { z } from \"zod/v4\";\nimport { tokens } from \"../shared/tokens\";\nimport { option, toOption } from \"./schemas\";\n\ntype Plan = Parameters<ReturnType<typeof useTriggerAction>>[2];\ntype Step = { type: string; refType?: string };\n\nconst sends = (plan: unknown): boolean => {\n const steps = (plan as { steps?: Step[] } | null | undefined)?.steps;\n if (!steps) return true;\n return steps.some(\n (s) =>\n s.type === ACTION_STEPS.ToAssistant ||\n s.type === \"custom_action\" ||\n (s.type === ACTION_STEPS.Run && s.refType === \"mutation\"),\n );\n};\n\nexport function useRunAction() {\n const trigger = useTriggerAction();\n const formName = useFormName();\n const form = useFormValidation();\n return (message: string, plan: unknown, sendLabel: boolean) => {\n if (!plan && !sendLabel) return;\n if (form && (!plan || sends(plan)) && !form.validateForm()) return;\n if (plan) void trigger(message, formName.value, plan as Plan);\n else void trigger(message, formName.value);\n };\n}\n\nexport function useFieldRules(\n name: MaybeRefOrGetter<string>,\n rules: MaybeRefOrGetter<unknown>,\n value: MaybeRefOrGetter<unknown>,\n) {\n const form = useFormValidation();\n const parsed = computed(() => parseStructuredRules(toValue(rules)));\n const active = computed(() => !!form && parsed.value.length > 0);\n let registeredName: string | null = null;\n\n watchEffect(() => {\n const fieldName = toValue(name);\n const currentRules = parsed.value;\n if (registeredName && registeredName !== fieldName) {\n form?.unregisterField(registeredName);\n registeredName = null;\n }\n if (form && currentRules.length > 0) {\n form.registerField(fieldName, currentRules, () => toValue(value));\n registeredName = fieldName;\n } else if (registeredName) {\n form?.unregisterField(registeredName);\n registeredName = null;\n }\n });\n\n onScopeDispose(() => {\n if (registeredName) {\n form?.unregisterField(registeredName);\n registeredName = null;\n }\n });\n\n return {\n required: computed(() => active.value && parsed.value.some((r) => r.type === \"required\")),\n error: computed(() => (active.value ? form?.errors[toValue(name)] : undefined)),\n check: () => {\n if (active.value && form) {\n form.validateField(toValue(name), toValue(value), parsed.value);\n }\n },\n clear: () => {\n if (active.value && form) {\n form.clearFieldError(toValue(name));\n }\n },\n };\n}\n\nexport function useFieldName(\n label: MaybeRefOrGetter<unknown>,\n statementId?: MaybeRefOrGetter<string | undefined>,\n) {\n const id = useId();\n return computed(() => {\n const sid = toValue(statementId);\n if (sid) return sid;\n const lbl = toValue(label);\n if (typeof lbl === \"string\" && lbl) return lbl;\n return id;\n });\n}\n\nexport function renderFieldFrame(opts: {\n label?: string;\n required?: boolean;\n error?: string;\n control: VNodeChild;\n}): VNodeChild {\n return h(\n \"div\",\n {\n class: \"openui-intelligent-field\",\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n width: \"100%\",\n fontFamily: tokens.font,\n },\n },\n [\n opts.label\n ? h(\n \"label\",\n {\n style: {\n fontSize: \"13px\",\n fontWeight: 500,\n color: tokens.ink,\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"4px\",\n },\n },\n [\n opts.label,\n opts.required\n ? h(\"span\", { style: { color: tokens.danger }, \"aria-hidden\": \"true\" }, \"*\")\n : null,\n ],\n )\n : null,\n opts.control,\n opts.error\n ? h(\n \"div\",\n {\n role: \"alert\",\n style: { fontSize: \"12px\", color: tokens.danger },\n },\n opts.error,\n )\n : null,\n ],\n );\n}\n\nexport const options = z.array(option);\nexport const optionList = (value: unknown) =>\n Array.isArray(value) ? value.flat().flatMap((o) => toOption(o) ?? []) : [];\n\nexport const choice = z.union([\n z.string(),\n z.object({ value: z.string(), label: z.string(), description: z.string().optional() }),\n]);\nexport type Choice = { value: string; label: string; description?: string };\nexport const choiceList = (value: unknown): Choice[] => optionList(value);\n","import { action } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const ButtonSchema = z.object({\n label: z.string(),\n action: action().optional(),\n variant: z.enum([\"solid\", \"outline\", \"soft\", \"ghost\"]).optional(),\n color: z.enum([\"primary\", \"danger\", \"success\"]).optional(),\n size: z.enum([\"sm\", \"md\", \"lg\"]).optional(),\n icon: z.string().optional(),\n disabled: z.boolean().optional(),\n block: z.boolean().optional(),\n});\n\nexport type ButtonProps = z.infer<typeof ButtonSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type CSSProperties, type PropType } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useRunAction } from \"../controls\";\nimport { ButtonSchema, type ButtonProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SIZE_STYLE: Record<string, CSSProperties> = {\n sm: { padding: \"5px 10px\", fontSize: \"12px\", borderRadius: tokens.radiusSm },\n md: { padding: \"8px 14px\", fontSize: \"13px\", borderRadius: tokens.radiusMd },\n lg: { padding: \"10px 18px\", fontSize: \"14px\", borderRadius: tokens.radiusMd },\n};\n\nconst ButtonImpl = vueComponent({\n name: \"OpenUIIntelligentButton\",\n props: {\n props: { type: Object as PropType<ButtonProps>, required: true },\n },\n setup(p) {\n const run = useRunAction();\n const streaming = useIsStreaming();\n\n return () => {\n const variant = p.props.variant ?? \"solid\";\n const color = p.props.color ?? \"primary\";\n const size = p.props.size ?? \"md\";\n const disabled = Boolean(p.props.disabled || streaming.value);\n const label = str(p.props.label);\n\n const accent =\n color === \"danger\" ? tokens.danger : color === \"success\" ? tokens.success : tokens.ink;\n const accentSoft =\n color === \"danger\"\n ? tokens.dangerSoft\n : color === \"success\"\n ? tokens.successSoft\n : tokens.surface;\n\n const variantStyle: CSSProperties =\n variant === \"solid\"\n ? { background: accent, color: color === \"primary\" ? tokens.onInk : \"#ffffff\", border: \"1px solid transparent\" }\n : variant === \"outline\"\n ? { background: \"transparent\", color: accent, border: `1px solid ${tokens.borderStrong}` }\n : variant === \"soft\"\n ? { background: accentSoft, color: accent, border: \"1px solid transparent\" }\n : { background: \"transparent\", color: accent, border: \"1px solid transparent\" };\n\n return h(\n \"button\",\n {\n type: \"button\",\n disabled,\n class: \"openui-intelligent-button\",\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"6px\",\n fontFamily: tokens.font,\n fontWeight: 500,\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n opacity: disabled ? 0.55 : 1,\n width: p.props.block ? \"100%\" : undefined,\n ...SIZE_STYLE[size],\n ...variantStyle,\n },\n onClick: () => {\n if (disabled) return;\n run(label, p.props.action, true);\n },\n },\n [\n p.props.icon ? h(LucideIconView, { name: p.props.icon, size: size === \"sm\" ? 13 : 15 }) : null,\n label,\n ],\n );\n };\n },\n});\n\nexport const Button = defineComponent({\n name: \"Button\",\n props: ButtonSchema,\n description: \"icon is a lucide name. Without an action it sends its label to the assistant.\",\n component: ButtonImpl,\n});\n","import { z } from \"zod/v4\";\nimport { color } from \"../schemas\";\n\nexport const CaptionSchema = z.object({ text: z.string(), color: color.optional() });\n\nexport type CaptionProps = z.infer<typeof CaptionSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { fg } from \"../../shared/props\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CaptionSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Caption = defineComponent({\n name: \"Caption\",\n props: CaptionSchema,\n description: \"Small secondary text.\",\n component: ({ props }) =>\n h(\n \"span\",\n {\n class: \"openui-intelligent-caption\",\n style: {\n fontSize: \"12px\",\n lineHeight: 1.45,\n color: fg(props.color) ?? tokens.muted,\n },\n },\n str(props.text),\n ),\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const CardSchema = z.object({\n children,\n variant: z.enum([\"outline\", \"soft\"]).optional(),\n gap: z.number().optional(),\n padding: z.number().optional(),\n});\n\nexport type CardProps = z.infer<typeof CardSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CardSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Card = defineComponent({\n name: \"Card\",\n props: CardSchema,\n description: \"Panel with a border; soft is a filled panel for summaries.\",\n component: ({ props, renderNode }) => {\n const isSoft = props.variant === \"soft\";\n return h(\n \"div\",\n {\n class: [\"openui-intelligent-card\", isSoft ? \"openui-intelligent-card--soft\" : \"openui-intelligent-card--outline\"],\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: space(props.gap) ?? tokens.spaceGroup,\n padding: space(props.padding) ?? tokens.spaceGroupLg,\n borderRadius: tokens.radiusLg,\n background: isSoft ? tokens.surface : tokens.canvas,\n border: isSoft ? \"1px solid transparent\" : `1px solid ${tokens.border}`,\n },\n },\n [renderNode(props.children)],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const CarouselSchema = z.object({\n children,\n itemWidth: z.number().optional(),\n gap: z.number().optional(),\n});\n\nexport type CarouselProps = z.infer<typeof CarouselSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CarouselSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Carousel = defineComponent({\n name: \"Carousel\",\n props: CarouselSchema,\n description:\n \"Horizontal row that scrolls and snaps, each child an item itemWidth px wide (default 240): photos, cards, options, days.\",\n component: ({ props, renderNode }) => {\n const itemWidth =\n typeof props.itemWidth === \"number\" && props.itemWidth > 0 ? props.itemWidth : 240;\n const list = Array.isArray(props.children) ? props.children.flat() : [];\n return h(\n \"div\",\n {\n class: \"openui-intelligent-carousel\",\n style: {\n display: \"flex\",\n flexDirection: \"row\",\n gap: space(props.gap) ?? tokens.spaceGroup,\n overflowX: \"auto\",\n scrollSnapType: \"x mandatory\",\n paddingBottom: \"4px\",\n },\n },\n list.map((child, idx) =>\n h(\n \"div\",\n {\n key: idx,\n style: {\n flex: `0 0 ${itemWidth}px`,\n maxWidth: \"100%\",\n scrollSnapAlign: \"start\",\n },\n },\n [renderNode(child)],\n ),\n ),\n );\n },\n});\n","import { z } from \"zod/v4\";\n\nexport const CelebrationSchema = z.object({ when: z.boolean() });\n\nexport type CelebrationProps = z.infer<typeof CelebrationSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, watch, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CelebrationSchema, type CelebrationProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CONFETTI_COLORS = [\n tokens.chart1,\n tokens.chart2,\n tokens.chart3,\n tokens.chart4,\n tokens.chart5,\n tokens.chart6,\n];\n\nconst CelebrationImpl = vueComponent({\n name: \"OpenUIIntelligentCelebration\",\n props: {\n props: { type: Object as PropType<CelebrationProps>, required: true },\n },\n setup(p) {\n const streaming = useIsStreaming();\n const active = ref(false);\n let timer: ReturnType<typeof setTimeout> | null = null;\n\n watch(\n () => [p.props.when === true, streaming.value] as const,\n ([when, isStreaming], prev) => {\n const wasWhen = prev?.[0] ?? false;\n if (when && !isStreaming && !wasWhen) {\n active.value = true;\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => {\n active.value = false;\n }, 2200);\n }\n },\n { immediate: true },\n );\n\n return () => {\n if (!active.value) return null;\n return h(\n \"div\",\n {\n \"aria-hidden\": \"true\",\n class: \"openui-intelligent-celebration\",\n style: {\n position: \"relative\",\n height: \"12px\",\n overflow: \"visible\",\n pointerEvents: \"none\",\n display: \"flex\",\n justifyContent: \"space-around\",\n },\n },\n Array.from({ length: 12 }, (_, i) =>\n h(\"span\", {\n key: i,\n style: {\n width: \"8px\",\n height: \"8px\",\n borderRadius: i % 2 === 0 ? \"999px\" : \"2px\",\n background: CONFETTI_COLORS[i % CONFETTI_COLORS.length],\n display: \"inline-block\",\n transform: `rotate(${(i * 37) % 360}deg)`,\n },\n }),\n ),\n );\n };\n },\n});\n\nexport const Celebration = defineComponent({\n name: \"Celebration\",\n props: CelebrationSchema,\n description:\n \"Bursts confetti when its condition turns true, e.g. Celebration($score == 5) at the end of a quiz.\",\n component: CelebrationImpl,\n});\n","import { z } from \"zod/v4\";\n\n/**\n * Unchanged from the kit's original Chart. The type is an ARGUMENT, not the\n * component name, because programs switch it at runtime:\n *\n * $type = \"bar\"\n * SegmentedControl($type, [\"bar\", \"line\", \"area\"])\n * chart = Chart($type, rows, \"year\", [...], null, $type != \"line\")\n *\n * Splitting this into BarChart/LineChart/AreaChart the way the chat and\n * dashboard kits do cannot express that, so the vocabulary stays as it is and\n * only the rendering moves to @openuidev/react-components.\n */\nexport const ChartSchema = z.object({\n type: z.enum([\"bar\", \"line\", \"area\", \"pie\", \"donut\", \"scatter\"]),\n data: z.array(z.record(z.string(), z.union([z.string(), z.number()]))),\n x: z.string().optional(),\n series: z.array(z.string()).optional(),\n format: z.enum([\"number\", \"percent\"]).optional(),\n stacked: z.boolean().optional(),\n height: z.number().optional(),\n});\n\nexport type ChartProps = z.infer<typeof ChartSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport {\n AreaChart,\n BarChart,\n LineChart,\n PieChart,\n ScatterChart,\n} from \"@wodecorp/openui-vue-ui\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { defaultLightTheme, useIntelligentTheme } from \"../../components/ThemeProvider\";\nimport { ChartSchema, type ChartProps } from \"./schema\";\n\nexport * from \"./schema\";\n\ntype Row = Record<string, string | number>;\n\nconst rowsOf = (data: unknown): Row[] =>\n Array.isArray(data) ? (data as Row[]).filter((r) => r && typeof r === \"object\") : [];\n\nconst categoryOf = (rows: Row[], x?: string): string => {\n if (x) return x;\n const first = rows[0] ?? {};\n return (\n Object.keys(first).find((k) => typeof first[k] === \"string\") ?? Object.keys(first)[0] ?? \"\"\n );\n};\n\nconst seriesOf = (rows: Row[], category: string, series?: string[]): string[] => {\n if (series?.length) return series;\n const first = rows[0] ?? {};\n return Object.keys(first).filter((k) => k !== category && typeof first[k] === \"number\");\n};\n\nconst narrow = (rows: Row[], category: string, series: string[]): Row[] =>\n rows.map((row) => {\n const out: Row = { [category]: row[category] ?? \"\" };\n for (const key of series) out[key] = typeof row[key] === \"number\" ? (row[key] as number) : 0;\n return out;\n });\n\nconst CHART_KEYS = [\n \"intelligentChart1\",\n \"intelligentChart2\",\n \"intelligentChart3\",\n \"intelligentChart4\",\n \"intelligentChart5\",\n \"intelligentChart6\",\n] as const;\n\nfunction seriesColours(\n themeCtx: ReturnType<typeof useIntelligentTheme>,\n count: number,\n): string[] {\n const source = themeCtx?.theme.value ?? defaultLightTheme;\n const colours = CHART_KEYS.map((key) => source[key] ?? defaultLightTheme[key] ?? \"#0285ff\");\n const ordered = Array.from(\n { length: Math.max(count, 1) },\n (_, i) => colours[i % colours.length]!,\n );\n if (ordered.length > 2 && ordered.length % 2 === 0) ordered.unshift(ordered.pop()!);\n return ordered;\n}\n\nconst ChartImpl = vueComponent({\n name: \"OpenUIIntelligentChart\",\n props: {\n props: { type: Object as PropType<ChartProps>, required: true },\n },\n setup(p) {\n const theme = useIntelligentTheme();\n\n return () => {\n const rows = rowsOf(p.props.data);\n const category = categoryOf(rows, p.props.x);\n const series = seriesOf(rows, category, p.props.series);\n const height = typeof p.props.height === \"number\" ? p.props.height : undefined;\n\n if (!rows.length || !category) return null;\n\n if (p.props.type === \"pie\" || p.props.type === \"donut\") {\n return h(PieChart as never, {\n data: rows,\n categoryKey: category,\n dataKey: series[0] ?? \"\",\n variant: p.props.type,\n format: p.props.format === \"percent\" ? \"percentage\" : \"number\",\n customPalette: seriesColours(theme, rows.length),\n isAnimationActive: false,\n });\n }\n\n if (p.props.type === \"scatter\") {\n const datasets = series.map((key) => ({\n name: key,\n data: rows.map((row) => ({ x: Number(row[category] ?? 0), y: Number(row[key] ?? 0) })),\n }));\n return h(ScatterChart as never, {\n data: datasets,\n xAxisDataKey: \"x\",\n yAxisDataKey: \"y\",\n height,\n customPalette: seriesColours(theme, datasets.length),\n isAnimationActive: false,\n });\n }\n\n const data = narrow(rows, category, series);\n const common = {\n data,\n categoryKey: category,\n height,\n customPalette: seriesColours(theme, series.length),\n isAnimationActive: false,\n };\n\n if (p.props.type === \"line\") return h(LineChart as never, common);\n if (p.props.type === \"area\") {\n return h(AreaChart as never, { ...common, stacked: p.props.stacked === true });\n }\n return h(BarChart as never, {\n ...common,\n variant: p.props.stacked ? \"stacked\" : \"grouped\",\n });\n };\n },\n});\n\nexport const Chart = defineComponent({\n name: \"Chart\",\n props: ChartSchema,\n description:\n 'Rows of data; x is the category key (a number key for scatter), series the value keys (default: every number key). format applies to pie and donut only: \"percent\" shows each slice as a share of the total, \"number\" its value. stacked stacks bar and area series. height sets the plot height in px; pie and donut ignore it and size themselves.',\n component: ChartImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const CheckboxSchema = z.object({\n checked: reactive(z.boolean()),\n label: z.string(),\n lineThrough: z.boolean().optional(),\n rules: rulesSchema.optional(),\n});\nexport type CheckboxProps = z.infer<typeof CheckboxSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useFieldName, useFieldRules } from \"../controls\";\nimport { CheckboxSchema, type CheckboxProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CheckboxImpl = vueComponent({\n name: \"OpenUIIntelligentCheckbox\",\n props: {\n props: { type: Object as PropType<CheckboxProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.checked);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const checked = field.value === true;\n return h(\"div\", { class: \"openui-intelligent-checkbox\", style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\n \"label\",\n {\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"8px\",\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n fontSize: \"14px\",\n color: checked && p.props.lineThrough ? tokens.muted : tokens.ink,\n textDecoration: checked && p.props.lineThrough ? \"line-through\" : undefined,\n },\n },\n [\n h(\"input\", {\n type: \"checkbox\",\n checked,\n disabled: streaming.value,\n style: { width: \"16px\", height: \"16px\", accentColor: tokens.ink },\n onChange: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLInputElement).checked);\n },\n }),\n h(\"span\", null, [\n str(p.props.label),\n rules.required.value\n ? h(\"span\", { style: { color: tokens.danger, marginLeft: \"4px\" } }, \"*\")\n : null,\n ]),\n ],\n ),\n rules.error.value\n ? h(\"div\", { role: \"alert\", style: { fontSize: \"12px\", color: tokens.danger } }, rules.error.value)\n : null,\n ]);\n };\n },\n});\n\nexport const Checkbox = defineComponent({\n name: \"Checkbox\",\n props: CheckboxSchema,\n description: \"lineThrough strikes the label when checked, for to-do lists. rules takes only required.\",\n component: CheckboxImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const CodeSchema = z.object({ code: z.string(), language: z.string().optional() });\n\nexport type CodeProps = z.infer<typeof CodeSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { CodeBlock } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { CodeSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Code = defineComponent({\n name: \"Code\",\n props: CodeSchema,\n description: \"Code block with a copy button.\",\n component: ({ props }) =>\n h(CodeBlock, {\n language: str(props.language) || \"text\",\n codeString: str(props.code),\n }),\n});\n","import { z } from \"zod/v4\";\nimport { align, children } from \"../schemas\";\n\nexport const ColSchema = z.object({\n children,\n gap: z.number().optional(),\n align: align.optional(),\n});\n\nexport type ColProps = z.infer<typeof ColSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { RootTheme } from \"../../components/ThemeProvider\";\nimport { flexStyle } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { ColSchema, type ColProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ColImpl = vueComponent({\n name: \"OpenUIIntelligentCol\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<ColProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n statementId: String,\n },\n setup(p) {\n return () => {\n const col = h(\n \"div\",\n {\n class: \"openui-intelligent-col\",\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: p.props.gap !== undefined ? undefined : tokens.spaceGroup,\n ...flexStyle(p.props, true),\n },\n },\n p.renderNode(p.props.children),\n );\n return p.statementId === \"root\" ? h(RootTheme, null, { default: () => col }) : col;\n };\n },\n});\n\nexport const Col = defineComponent({\n name: \"Col\",\n props: ColSchema,\n description: \"Vertical layout. Without gap it spaces blocks like an article.\",\n component: ColImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const DatePickerSchema = z.object({\n value: reactive(z.string()),\n label: z.string().optional(),\n min: z.string().optional(),\n max: z.string().optional(),\n rules: rulesSchema.optional(),\n});\nexport type DatePickerProps = z.infer<typeof DatePickerSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { DatePickerSchema, type DatePickerProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst DatePickerImpl = vueComponent({\n name: \"OpenUIIntelligentDatePicker\",\n props: {\n props: { type: Object as PropType<DatePickerProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () =>\n renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\"input\", {\n type: \"date\",\n value: field.value == null ? \"\" : String(field.value),\n min: p.props.min ? str(p.props.min) : undefined,\n max: p.props.max ? str(p.props.max) : undefined,\n disabled: streaming.value,\n class: \"openui-intelligent-date-picker\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n boxSizing: \"border-box\",\n },\n onInput: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLInputElement).value);\n },\n onBlur: () => rules.check(),\n }),\n });\n },\n});\n\nexport const DatePicker = defineComponent({\n name: \"DatePicker\",\n props: DatePickerSchema,\n description: 'Dates, min and max are \"YYYY-MM-DD\". rules takes only required.',\n component: DatePickerImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const DividerSchema = z.object({});\n\nexport type DividerProps = z.infer<typeof DividerSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { DividerSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Divider = defineComponent({\n name: \"Divider\",\n props: DividerSchema,\n description: \"A thin horizontal rule between blocks.\",\n component: () =>\n h(\"hr\", {\n class: \"openui-intelligent-divider\",\n style: {\n border: \"none\",\n borderTop: `1px solid ${tokens.border}`,\n margin: \"4px 0\",\n width: \"100%\",\n },\n }),\n});\n","import { z } from \"zod/v4\";\nimport { slot } from \"../schemas\";\n\nexport const FlashcardSchema = z.object({ front: slot, back: slot, hint: z.string().optional() });\n\nexport type FlashcardProps = z.infer<typeof FlashcardSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderSlot } from \"../schemas\";\nimport { FlashcardSchema, type FlashcardProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst FlashcardImpl = vueComponent({\n name: \"OpenUIIntelligentFlashcard\",\n props: {\n props: { type: Object as PropType<FlashcardProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n const flipped = ref(false);\n return () => {\n const face = flipped.value ? p.props.back : p.props.front;\n const content =\n typeof face === \"string\"\n ? h(\"div\", { style: { fontSize: \"20px\", fontWeight: 600, color: tokens.ink, textAlign: \"center\" } }, face)\n : renderSlot(face, p.renderNode);\n const hint = str(p.props.hint);\n return h(\n \"button\",\n {\n type: \"button\",\n \"aria-pressed\": flipped.value,\n class: [\"openui-intelligent-flashcard\", flipped.value ? \"openui-intelligent-flashcard--back\" : \"openui-intelligent-flashcard--front\"],\n style: {\n width: \"100%\",\n minHeight: \"140px\",\n padding: \"20px\",\n borderRadius: tokens.radiusLg,\n border: `1px solid ${tokens.borderStrong}`,\n background: flipped.value ? tokens.surface : tokens.canvas,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"10px\",\n cursor: \"pointer\",\n font: \"inherit\",\n color: tokens.ink,\n },\n onClick: () => {\n flipped.value = !flipped.value;\n },\n },\n [\n content,\n !flipped.value && hint\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, hint)\n : h(\"span\", { style: { fontSize: \"11px\", color: tokens.faint } }, flipped.value ? \"Back · tap to flip\" : \"Tap to flip\"),\n ],\n );\n };\n },\n});\n\nexport const Flashcard = defineComponent({\n name: \"Flashcard\",\n props: FlashcardSchema,\n description:\n \"Card that flips between front and back when tapped. Put several in a Carousel or Grid.\",\n component: FlashcardImpl,\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const FormSchema = z.object({\n children,\n});\n\nexport type FormProps = z.infer<typeof FormSchema>;\n","import {\n defineComponent,\n FormNameContext,\n FormValidationContext,\n useCreateFormValidation,\n} from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, provide, useId, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { FormSchema, type FormProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst FormImpl = vueComponent({\n name: \"OpenUIIntelligentForm\",\n props: {\n props: { type: Object as PropType<FormProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n statementId: String,\n },\n setup(p) {\n const id = useId();\n const validation = useCreateFormValidation();\n provide(FormValidationContext, validation);\n provide(FormNameContext, () => p.statementId ?? id);\n\n return () =>\n h(\n \"form\",\n {\n class: \"openui-intelligent-form\",\n novalidate: true,\n style: { display: \"flex\", flexDirection: \"column\", gap: tokens.spaceGroupLg },\n onSubmit: (e: Event) => {\n e.preventDefault();\n },\n },\n p.renderNode(p.props.children),\n );\n },\n});\n\nexport const Form = defineComponent({\n name: \"Form\",\n props: FormSchema,\n description:\n \"Groups fields; their values go with any @ToAssistant inside, once every field's rules pass.\",\n component: FormImpl,\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const GridSchema = z.object({\n children,\n columns: z.number().optional(),\n minChildWidth: z.number().optional(),\n gap: z.number().optional(),\n});\n\nexport type GridProps = z.infer<typeof GridSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { GridSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Grid = defineComponent({\n name: \"Grid\",\n props: GridSchema,\n description:\n \"Equal columns, 1 to 12 (default 2). With minChildWidth (px), columns drop on narrow screens.\",\n component: ({ props, renderNode }) => {\n const cols =\n typeof props.columns === \"number\" && Number.isFinite(props.columns)\n ? Math.min(12, Math.max(1, Math.round(props.columns)))\n : 2;\n const minW =\n typeof props.minChildWidth === \"number\" && props.minChildWidth > 0\n ? Math.round(props.minChildWidth)\n : undefined;\n const template = minW\n ? `repeat(auto-fit, minmax(min(${minW}px, 100%), 1fr))`\n : `repeat(${cols}, minmax(0, 1fr))`;\n return h(\n \"div\",\n {\n class: \"openui-intelligent-grid\",\n style: {\n display: \"grid\",\n gridTemplateColumns: template,\n gap: space(props.gap) ?? tokens.spaceGroup,\n },\n },\n [renderNode(props.children)],\n );\n },\n});\n","import { computed, type ComputedRef } from \"vue\";\nimport { useTheme } from \"@wodecorp/openui-vue-ui\";\nimport { useIntelligentTheme } from \"../components/ThemeProvider\";\n\nexport function useThemeMode(): ComputedRef<\"light\" | \"dark\"> {\n const intelligent = useIntelligentTheme();\n const components = useTheme();\n return computed(() => intelligent?.mode.value ?? components.mode.value ?? \"light\");\n}\n","import { z } from \"zod/v4\";\n\nexport const HtmlViewSchema = z.object({\n html: z.string(),\n height: z.number().optional(),\n title: z.string().optional(),\n});\n\nexport type HtmlViewProps = z.infer<typeof HtmlViewSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport {\n computed,\n defineComponent as vueComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n type PropType,\n} from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useThemeMode } from \"../../shared/useThemeMode\";\nimport { HtmlViewSchema, type HtmlViewProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CDNS =\n \"https://cdn.jsdelivr.net https://unpkg.com https://cdnjs.cloudflare.com https://esm.sh\";\n\nconst CSP = [\n \"default-src 'none'\",\n `script-src 'unsafe-inline' ${CDNS}`,\n `style-src 'unsafe-inline' ${CDNS} https://fonts.googleapis.com`,\n \"font-src https://fonts.gstatic.com data:\",\n \"img-src data: blob: https:\",\n \"media-src data: blob:\",\n `connect-src ${CDNS}`,\n \"frame-src 'none'\",\n \"form-action 'none'\",\n \"base-uri 'none'\",\n].join(\"; \");\n\nconst MIN_HEIGHT = 80;\nconst MAX_HEIGHT = 2400;\nconst AUTO_START = 360;\n\nconst REPORTER = `<script>(function(){var last=0;function send(){var h=Math.ceil(document.documentElement.getBoundingClientRect().height);if(Math.abs(h-last)>1){last=h;parent.postMessage({type:\"openui-intelligent-html-view-height\",height:h},\"*\")}}addEventListener(\"message\",function(e){if(e.source===parent&&e.data===\"openui-intelligent-html-view-measure\"){last=0;send()}});addEventListener(\"load\",send);new ResizeObserver(send).observe(document.documentElement);send()})()</script>`;\n\nfunction documentFor(html: string, scheme: \"light\" | \"dark\"): string {\n return `<!doctype html><meta charset=\"utf-8\"><meta http-equiv=\"Content-Security-Policy\" content=\"${CSP}\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><style>:root{color-scheme:${scheme}}html,body{margin:0}body{font:14px/1.5 -apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif}</style>${REPORTER}${html}`;\n}\n\nconst HtmlViewImpl = vueComponent({\n name: \"OpenUIIntelligentHtmlView\",\n props: {\n props: { type: Object as PropType<HtmlViewProps>, required: true },\n },\n setup(p) {\n const streaming = useIsStreaming();\n const scheme = useThemeMode();\n const frameRef = ref<HTMLIFrameElement | null>(null);\n const measured = ref<number | null>(null);\n\n const fixed = computed(() =>\n typeof p.props.height === \"number\" && p.props.height > 0\n ? Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, p.props.height))\n : null,\n );\n const srcDoc = computed(() =>\n documentFor(typeof p.props.html === \"string\" ? p.props.html : \"\", scheme.value),\n );\n\n const onMessage = (event: MessageEvent) => {\n if (fixed.value !== null) return;\n if (event.source !== frameRef.value?.contentWindow) return;\n const data = event.data as { type?: unknown; height?: unknown };\n if (\n data?.type === \"openui-intelligent-html-view-height\" &&\n typeof data.height === \"number\" &&\n Number.isFinite(data.height)\n ) {\n measured.value = Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, data.height));\n }\n };\n\n onMounted(() => {\n if (typeof window === \"undefined\") return;\n window.addEventListener(\"message\", onMessage);\n frameRef.value?.contentWindow?.postMessage(\"openui-intelligent-html-view-measure\", \"*\");\n });\n\n onBeforeUnmount(() => {\n if (typeof window !== \"undefined\") window.removeEventListener(\"message\", onMessage);\n });\n\n return () => {\n const boxHeight = fixed.value ?? measured.value ?? AUTO_START;\n return h(\n \"div\",\n {\n class: \"openui-intelligent-html-view\",\n style: {\n width: \"100%\",\n height: `${boxHeight}px`,\n borderRadius: tokens.radiusMd,\n border: `1px solid ${tokens.border}`,\n overflow: \"hidden\",\n background: tokens.surface,\n },\n },\n streaming.value\n ? [\n h(\n \"div\",\n {\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"100%\",\n color: tokens.muted,\n fontSize: \"13px\",\n },\n },\n \"Preparing the interactive view…\",\n ),\n ]\n : [\n h(\"iframe\", {\n ref: frameRef,\n title: p.props.title || \"Interactive view\",\n sandbox: \"allow-scripts\",\n srcdoc: srcDoc.value,\n referrerpolicy: \"no-referrer\",\n loading: \"lazy\",\n style: { width: \"100%\", height: \"100%\", border: \"none\", display: \"block\" },\n }),\n ],\n );\n };\n },\n});\n\nexport const HtmlView = defineComponent({\n name: \"HtmlView\",\n props: HtmlViewSchema,\n description:\n \"Sandboxed HTML page with inline JS, for games and canvas. No network except script CDNs. Fits its content unless height is set.\",\n component: HtmlViewImpl,\n});\n","import { z } from \"zod/v4\";\nimport { color } from \"../schemas\";\n\nexport const IconSchema = z.object({\n name: z.string(),\n size: z.enum([\"sm\", \"md\", \"lg\", \"xl\"]).optional(),\n color: color.optional(),\n});\n\nexport type IconProps = z.infer<typeof IconSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { IconSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ICON_SIZES: Record<string, number> = {\n sm: 14,\n md: 18,\n lg: 22,\n xl: 28,\n};\n\nexport const Icon = defineComponent({\n name: \"Icon\",\n props: IconSchema,\n description: 'Lucide icon by name, e.g. \"map-pin\".',\n component: ({ props }) =>\n h(LucideIconView, {\n name: str(props.name),\n size: ICON_SIZES[props.size ?? \"md\"] ?? 18,\n color: props.color,\n }),\n});\n","import { action } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const IconButtonSchema = z.object({\n icon: z.string(),\n action: action().optional(),\n label: z.string().optional(),\n variant: z.enum([\"outline\", \"ghost\", \"solid\"]).optional(),\n});\n\nexport type IconButtonProps = z.infer<typeof IconButtonSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type CSSProperties, type PropType } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useRunAction } from \"../controls\";\nimport { IconButtonSchema, type IconButtonProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst IconButtonImpl = vueComponent({\n name: \"OpenUIIntelligentIconButton\",\n props: {\n props: { type: Object as PropType<IconButtonProps>, required: true },\n },\n setup(p) {\n const run = useRunAction();\n const streaming = useIsStreaming();\n\n return () => {\n const variant = p.props.variant ?? \"outline\";\n const label = str(p.props.label) || str(p.props.icon);\n const disabled = streaming.value;\n const variantStyle: CSSProperties =\n variant === \"solid\"\n ? { background: tokens.ink, color: tokens.onInk, border: \"1px solid transparent\" }\n : variant === \"ghost\"\n ? { background: \"transparent\", color: tokens.ink, border: \"1px solid transparent\" }\n : { background: tokens.canvas, color: tokens.ink, border: `1px solid ${tokens.borderStrong}` };\n\n return h(\n \"button\",\n {\n type: \"button\",\n disabled,\n \"aria-label\": label,\n title: label,\n class: \"openui-intelligent-icon-button\",\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"34px\",\n height: \"34px\",\n borderRadius: \"999px\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n opacity: disabled ? 0.55 : 1,\n ...variantStyle,\n },\n onClick: () => {\n if (disabled) return;\n run(label, p.props.action, false);\n },\n },\n [h(LucideIconView, { name: str(p.props.icon), size: 16 })],\n );\n };\n },\n});\n\nexport const IconButton = defineComponent({\n name: \"IconButton\",\n props: IconButtonSchema,\n description: \"Round icon-only button; label is read aloud. Needs an action.\",\n component: IconButtonImpl,\n});\n","import { z } from \"zod/v4\";\nimport { fitSchema, radiusSchema } from \"../schemas\";\n\nexport const ImageSchema = z.object({\n src: z.string(),\n alt: z.string(),\n aspectRatio: z.number().optional(),\n radius: radiusSchema.optional(),\n fit: fitSchema.optional(),\n});\n\nexport type ImageProps = z.infer<typeof ImageSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { radius } from \"../../shared/props\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { webUrl } from \"../../shared/url\";\nimport { ImageSchema, type ImageProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ImageImpl = vueComponent({\n name: \"OpenUIIntelligentImage\",\n props: {\n props: { type: Object as PropType<ImageProps>, required: true },\n },\n setup(p) {\n const failed = ref(false);\n return () => {\n const safe = webUrl(p.props.src);\n const ratio =\n typeof p.props.aspectRatio === \"number\" && Number.isFinite(p.props.aspectRatio)\n ? Math.min(5, Math.max(0.2, p.props.aspectRatio))\n : 1.5;\n const borderRadius = radius(p.props.radius) ?? tokens.radiusMd;\n const boxStyle = {\n width: \"100%\",\n aspectRatio: String(ratio),\n borderRadius,\n overflow: \"hidden\",\n background: tokens.photoEmpty,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n if (!safe || failed.value) {\n return h(\n \"div\",\n {\n role: \"img\",\n \"aria-label\": str(p.props.alt) || \"Image unavailable\",\n class: \"openui-intelligent-image openui-intelligent-image--empty\",\n style: boxStyle,\n },\n [\n h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, str(p.props.alt) || \"Image\"),\n ],\n );\n }\n return h(\"div\", { class: \"openui-intelligent-image\", style: boxStyle }, [\n h(\"img\", {\n src: safe,\n alt: str(p.props.alt),\n loading: \"lazy\",\n referrerpolicy: \"no-referrer\",\n style: {\n width: \"100%\",\n height: \"100%\",\n objectFit: p.props.fit === \"contain\" ? \"contain\" : \"cover\",\n display: \"block\",\n },\n onError: () => {\n failed.value = true;\n },\n }),\n ]);\n };\n },\n});\n\nexport const Image = defineComponent({\n name: \"Image\",\n props: ImageSchema,\n description:\n \"Photo from a URL the user or a tool gave; never invent a URL. If it fails to load, an empty photo placeholder shows. aspectRatio is 0.2 to 5 (default 1.5).\",\n component: ImageImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const InputSchema = z.object({\n value: reactive(z.union([z.string(), z.number()])),\n label: z.string().optional(),\n type: z.enum([\"text\", \"number\"]).optional(),\n placeholder: z.string().optional(),\n rules: rulesSchema.optional(),\n});\nexport type InputProps = z.infer<typeof InputSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { InputSchema, type InputProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst InputImpl = vueComponent({\n name: \"OpenUIIntelligentInput\",\n props: {\n props: { type: Object as PropType<InputProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(\n () => p.props.label,\n () => p.statementId,\n );\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const isNumber = p.props.type === \"number\";\n const val = field.value == null ? \"\" : String(field.value);\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\"input\", {\n type: isNumber ? \"number\" : \"text\",\n value: val,\n placeholder: p.props.placeholder ? str(p.props.placeholder) : undefined,\n disabled: streaming.value,\n class: \"openui-intelligent-input\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n outline: \"none\",\n boxSizing: \"border-box\",\n },\n onInput: (e: Event) => {\n const raw = (e.target as HTMLInputElement).value;\n rules.clear();\n if (isNumber) {\n if (raw.trim() === \"\") {\n field.setValue(null as never);\n } else {\n const parsed = Number(raw);\n field.setValue((Number.isFinite(parsed) ? parsed : null) as never);\n }\n } else {\n field.setValue(raw);\n }\n },\n onBlur: () => rules.check(),\n }),\n });\n };\n },\n});\n\nexport const Input = defineComponent({\n name: \"Input\",\n props: InputSchema,\n description: \"Text or number field; a number field stores numbers, and null when emptied.\",\n component: InputImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const LabelSchema = z.object({ text: z.string() });\n\nexport type LabelProps = z.infer<typeof LabelSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { LabelSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Label = defineComponent({\n name: \"Label\",\n props: LabelSchema,\n description: \"Field or group label.\",\n component: ({ props }) =>\n h(\n \"span\",\n {\n class: \"openui-intelligent-label\",\n style: {\n fontSize: \"12px\",\n fontWeight: 600,\n letterSpacing: \"0.02em\",\n color: tokens.muted,\n },\n },\n str(props.text),\n ),\n});\n","import { z } from \"zod/v4\";\n\nexport const LinkSchema = z.object({ text: z.string(), url: z.string() });\n\nexport type LinkProps = z.infer<typeof LinkSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { webUrl } from \"../../shared/url\";\nimport { LinkSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Link = defineComponent({\n name: \"Link\",\n props: LinkSchema,\n description: \"Opens an http(s) URL in a new tab.\",\n component: ({ props }) => {\n const safe = webUrl(props.url);\n const label = str(props.text);\n if (!safe) {\n return h(\"span\", { class: \"openui-intelligent-link\" }, label);\n }\n return h(\n \"a\",\n {\n class: \"openui-intelligent-link\",\n href: safe,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n style: {\n color: tokens.info,\n textDecoration: \"underline\",\n textUnderlineOffset: \"2px\",\n },\n },\n label,\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\ntype RefComponent = { ref: z.core.$ZodType };\n\nexport const ListItemSchema = z.object({\n title: z.string(),\n description: z.string().optional(),\n marker: z.string().optional(),\n children: children.optional(),\n});\n\nexport type ListItemProps = z.infer<typeof ListItemSchema>;\n\nexport function createListSchema(ListItem: RefComponent) {\n return z.object({\n items: z.array(z.union([z.string(), ListItem.ref])),\n marker: z.enum([\"bullet\", \"number\", \"none\"]).optional(),\n timeline: z.boolean().optional(),\n });\n}\n\nexport type ListProps = z.infer<ReturnType<typeof createListSchema>>;\n","import { defineComponent, type ElementNode } from \"@wodecorp/openui-vue-lang\";\nimport { h, type VNodeChild } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { isElement, renderInlineMarkdown, type Render } from \"../schemas\";\nimport { createListSchema, ListItemSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\ntype ItemProps = { title?: unknown; description?: unknown; marker?: unknown; children?: unknown };\n\nfunction renderItemBody(props: ItemProps, renderNode: Render): VNodeChild {\n return h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\", minWidth: 0, flex: 1 } }, [\n h(\"div\", { style: { fontWeight: 500, color: tokens.ink, lineHeight: 1.45 } }, [renderInlineMarkdown(str(props.title))]),\n props.description\n ? h(\"div\", { style: { fontSize: \"13px\", color: tokens.muted, lineHeight: 1.45 } }, [renderInlineMarkdown(str(props.description))])\n : null,\n props.children ? h(\"div\", { style: { marginTop: \"4px\" } }, [renderNode(props.children)]) : null,\n ]);\n}\n\nexport const ListItem = defineComponent({\n name: \"ListItem\",\n props: ListItemSchema,\n description: \"marker replaces the bullet or number, e.g. a time or an emoji.\",\n component: ({ props, renderNode }) =>\n h(\n \"div\",\n { class: \"openui-intelligent-list-item\", style: { display: \"flex\", gap: \"8px\", alignItems: \"flex-start\" } },\n [\n typeof props.marker === \"string\" && props.marker\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted, flexShrink: 0 } }, props.marker)\n : null,\n renderItemBody(props, renderNode),\n ],\n ),\n});\n\nconst isItem = (value: unknown): value is ElementNode =>\n isElement(value) && value.typeName === \"ListItem\";\n\nexport const List = defineComponent({\n name: \"List\",\n props: createListSchema(ListItem),\n description: \"timeline joins the markers with a line.\",\n component: ({ props, renderNode }) => {\n const items = (Array.isArray(props.items) ? props.items.flat() : []).filter((item) => item != null);\n const markerMode = props.marker ?? \"bullet\";\n const isTimeline = props.timeline === true;\n return h(\n markerMode === \"number\" ? \"ol\" : \"ul\",\n {\n class: [\"openui-intelligent-list\", isTimeline ? \"openui-intelligent-list--timeline\" : null],\n style: {\n listStyle: \"none\",\n margin: 0,\n padding: 0,\n display: \"flex\",\n flexDirection: \"column\",\n gap: isTimeline ? \"12px\" : \"8px\",\n },\n },\n items.map((item, idx) => {\n const itemProps = isItem(item) ? (item.props as ItemProps) : null;\n const customMarker = itemProps && typeof itemProps.marker === \"string\" ? itemProps.marker : undefined;\n const markerNode =\n customMarker ??\n (markerMode === \"none\" ? null : markerMode === \"number\" ? `${idx + 1}.` : \"•\");\n return h(\n \"li\",\n {\n key: idx,\n style: {\n display: \"flex\",\n gap: \"10px\",\n alignItems: \"flex-start\",\n position: \"relative\",\n paddingLeft: isTimeline ? \"4px\" : undefined,\n borderLeft: isTimeline ? `2px solid ${tokens.borderStrong}` : undefined,\n },\n },\n [\n markerNode\n ? h(\n \"span\",\n {\n style: {\n minWidth: customMarker ? \"auto\" : \"18px\",\n fontSize: \"13px\",\n color: tokens.muted,\n fontWeight: 500,\n flexShrink: 0,\n },\n },\n markerNode,\n )\n : null,\n itemProps\n ? renderItemBody(itemProps, renderNode)\n : h(\"div\", { style: { flex: 1, lineHeight: 1.5, color: tokens.ink } }, [renderInlineMarkdown(str(item))]),\n ],\n );\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\n\nexport const MarkdownSchema = z.object({ text: z.string() });\n\nexport type MarkdownProps = z.infer<typeof MarkdownSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { MarkDownRenderer } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { MarkdownSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Markdown = defineComponent({\n name: \"Markdown\",\n props: MarkdownSchema,\n description: \"Prose with headings, lists, quotes, code and tables.\",\n component: ({ props }) =>\n h(MarkDownRenderer, {\n textMarkdown: str(props.text),\n className: \"openui-intelligent-markdown\",\n }),\n});\n","import { z } from \"zod/v4\";\n\nexport const MathSchema = z.object({ tex: z.string(), inline: z.boolean().optional() });\n\nexport type MathProps = z.infer<typeof MathSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport katex from \"katex\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { MathSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const MathBlock = defineComponent({\n name: \"Math\",\n props: MathSchema,\n description: 'LaTeX formula, e.g. Math(\"E = mc^2\"); inline true to sit in a Text list.',\n component: ({ props }) => {\n const tex = str(props.tex);\n const inline = props.inline === true;\n let html = \"\";\n try {\n html = katex.renderToString(tex, {\n displayMode: !inline,\n throwOnError: false,\n strict: false,\n });\n } catch {\n return h(inline ? \"span\" : \"div\", { class: \"openui-intelligent-math\" }, tex);\n }\n return h(inline ? \"span\" : \"div\", {\n class: [\"openui-intelligent-math\", inline ? \"openui-intelligent-math--inline\" : \"openui-intelligent-math--block\"],\n style: inline ? undefined : { overflowX: \"auto\", padding: \"4px 0\" },\n innerHTML: html,\n });\n },\n});\n","import { z } from \"zod/v4\";\nimport { slot } from \"../schemas\";\n\nexport const PopoverSchema = z.object({ trigger: slot, content: slot });\n\nexport type PopoverProps = z.infer<typeof PopoverSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderSlot } from \"../schemas\";\nimport { PopoverSchema, type PopoverProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PopoverImpl = vueComponent({\n name: \"OpenUIIntelligentPopover\",\n props: {\n props: { type: Object as PropType<PopoverProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n const open = ref(false);\n return () =>\n h(\n \"span\",\n {\n class: \"openui-intelligent-popover\",\n style: { position: \"relative\", display: \"inline-flex\", alignItems: \"center\" },\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 display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"4px\",\n background: \"transparent\",\n border: \"none\",\n padding: \"2px 4px\",\n cursor: \"pointer\",\n color: \"inherit\",\n font: \"inherit\",\n borderRadius: tokens.radiusSm,\n },\n },\n [renderSlot(p.props.trigger, p.renderNode)],\n ),\n open.value\n ? h(\n \"div\",\n {\n role: \"dialog\",\n class: \"openui-intelligent-popover-panel\",\n style: {\n position: \"absolute\",\n top: \"calc(100% + 6px)\",\n left: 0,\n zIndex: 40,\n minWidth: \"200px\",\n maxWidth: \"320px\",\n padding: tokens.spaceGroup,\n borderRadius: tokens.radiusMd,\n background: tokens.canvas,\n color: tokens.ink,\n border: `1px solid ${tokens.borderStrong}`,\n boxShadow: tokens.shadow,\n },\n },\n [renderSlot(p.props.content, p.renderNode)],\n )\n : null,\n ],\n );\n },\n});\n\nexport const Popover = defineComponent({\n name: \"Popover\",\n props: PopoverSchema,\n description:\n 'Shows content in a small panel when the trigger is clicked: a definition, a source, details behind an Icon(\"info\", \"sm\"). The trigger is text or an Icon, never a Button: it is a button already.',\n component: PopoverImpl,\n});\n","import { action } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { children, color, radiusSchema } from \"../schemas\";\n\nexport const PressableSchema = z.object({\n children,\n action: action().optional(),\n selected: z.boolean().optional(),\n padding: z.number().optional(),\n background: color.optional(),\n radius: radiusSchema.optional(),\n});\n\nexport type PressableProps = z.infer<typeof PressableSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type CSSProperties, type PropType } from \"vue\";\nimport { onColor } from \"../../shared/color\";\nimport { bg, radius, space } from \"../../shared/props\";\nimport { textOf } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useRunAction } from \"../controls\";\nimport { PressableSchema, type PressableProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PressableImpl = vueComponent({\n name: \"OpenUIIntelligentPressable\",\n props: {\n props: { type: Object as PropType<PressableProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n const run = useRunAction();\n const streaming = useIsStreaming();\n const elRef = ref<HTMLElement | null>(null);\n\n return () => {\n const selected = p.props.selected === true;\n const disabled = streaming.value;\n const style: CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n textAlign: \"left\",\n padding: space(p.props.padding) ?? tokens.spaceGroup,\n borderRadius: radius(p.props.radius) ?? tokens.radiusMd,\n background: bg(p.props.background) ?? (selected ? tokens.surfaceStrong : tokens.canvas),\n border: selected ? `2px solid ${tokens.ink}` : `1px solid ${tokens.border}`,\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n width: \"100%\",\n font: \"inherit\",\n color: \"inherit\",\n ...onColor(p.props.background),\n };\n return h(\n \"button\",\n {\n ref: elRef,\n type: \"button\",\n disabled,\n \"aria-pressed\": selected,\n class: [\"openui-intelligent-pressable\", selected ? \"openui-intelligent-pressable--selected\" : null],\n style,\n onClick: () => {\n if (disabled) return;\n run(textOf(elRef.value), p.props.action, false);\n },\n },\n p.renderNode(p.props.children),\n );\n };\n },\n});\n\nexport const Pressable = defineComponent({\n name: \"Pressable\",\n props: PressableSchema,\n description: \"Makes any content clickable, such as a tile or a swatch. Needs an action.\",\n component: PressableImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const QuoteSchema = z.object({ text: z.string(), cite: z.string().optional() });\n\nexport type QuoteProps = z.infer<typeof QuoteSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderInlineMarkdown } from \"../schemas\";\nimport { QuoteSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Quote = defineComponent({\n name: \"Quote\",\n props: QuoteSchema,\n description: \"A quotation or a callout with a side rule; cite names the source.\",\n component: ({ props }) =>\n h(\n \"blockquote\",\n {\n class: \"openui-intelligent-quote\",\n style: {\n margin: 0,\n padding: \"8px 14px\",\n borderLeft: `3px solid ${tokens.borderStrong}`,\n background: tokens.surface,\n borderRadius: `0 ${tokens.radiusSm} ${tokens.radiusSm} 0`,\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n },\n },\n [\n h(\"div\", { style: { color: tokens.ink, lineHeight: 1.55 } }, [renderInlineMarkdown(str(props.text))]),\n props.cite\n ? h(\"cite\", { style: { fontSize: \"12px\", color: tokens.muted, fontStyle: \"normal\" } }, `— ${str(props.cite)}`)\n : null,\n ],\n ),\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { choice } from \"../controls\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const RadioGroupSchema = z.object({\n value: reactive(z.string()),\n options: z.array(choice),\n label: z.string().optional(),\n variant: z.enum([\"list\", \"pills\", \"cards\"]).optional(),\n rules: rulesSchema.optional(),\n});\nexport type RadioGroupProps = z.infer<typeof RadioGroupSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { choiceList, renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { RadioGroupSchema, type RadioGroupProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst RadioGroupImpl = vueComponent({\n name: \"OpenUIIntelligentRadioGroup\",\n props: {\n props: { type: Object as PropType<RadioGroupProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const choices = choiceList(p.props.options);\n const current = field.value == null ? \"\" : String(field.value);\n const variant = p.props.variant ?? \"list\";\n\n const control = h(\n \"div\",\n {\n role: \"radiogroup\",\n class: `openui-intelligent-radio-group openui-intelligent-radio-group--${variant}`,\n style: {\n display: \"flex\",\n flexDirection: variant === \"pills\" ? \"row\" : \"column\",\n flexWrap: variant === \"pills\" ? \"wrap\" : undefined,\n gap: \"8px\",\n },\n },\n choices.map((item) => {\n const selected = current === item.value;\n if (variant === \"pills\") {\n return h(\n \"button\",\n {\n key: item.value,\n type: \"button\",\n role: \"radio\",\n \"aria-checked\": selected,\n disabled: streaming.value,\n style: {\n padding: \"6px 12px\",\n borderRadius: \"999px\",\n fontSize: \"13px\",\n fontWeight: 500,\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n background: selected ? tokens.ink : tokens.surface,\n color: selected ? tokens.onInk : tokens.ink,\n border: `1px solid ${selected ? tokens.ink : tokens.border}`,\n },\n onClick: () => {\n if (streaming.value) return;\n rules.clear();\n field.setValue(item.value);\n },\n },\n item.label,\n );\n }\n\n return h(\n \"label\",\n {\n key: item.value,\n style: {\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: \"8px\",\n padding: variant === \"cards\" ? \"10px 12px\" : \"4px 0\",\n borderRadius: variant === \"cards\" ? tokens.radiusMd : undefined,\n border: variant === \"cards\"\n ? `1px solid ${selected ? tokens.ink : tokens.border}`\n : undefined,\n background: variant === \"cards\" && selected ? tokens.surface : undefined,\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n },\n },\n [\n h(\"input\", {\n type: \"radio\",\n name: fieldName.value,\n value: item.value,\n checked: selected,\n disabled: streaming.value,\n style: { marginTop: \"3px\", accentColor: tokens.ink },\n onChange: () => {\n rules.clear();\n field.setValue(item.value);\n },\n }),\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\" } }, [\n h(\"span\", { style: { fontSize: \"14px\", fontWeight: variant === \"cards\" ? 500 : 400, color: tokens.ink } }, item.label),\n item.description\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, item.description)\n : null,\n ]),\n ],\n );\n }),\n );\n\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control,\n });\n };\n },\n});\n\nexport const RadioGroup = defineComponent({\n name: \"RadioGroup\",\n props: RadioGroupSchema,\n description: \"pills for short choices; cards for choices that need a description line.\",\n component: RadioGroupImpl,\n});\n","import { z } from \"zod/v4\";\nimport { align, children, justify } from \"../schemas\";\n\nexport const RowSchema = z.object({\n children,\n gap: z.number().optional(),\n align: align.optional(),\n justify: justify.optional(),\n wrap: z.boolean().optional(),\n});\n\nexport type RowProps = z.infer<typeof RowSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { flexStyle } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { RowSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Row = defineComponent({\n name: \"Row\",\n props: RowSchema,\n description: \"Horizontal layout; items are vertically centered.\",\n component: ({ props, renderNode }) =>\n h(\n \"div\",\n {\n class: \"openui-intelligent-row\",\n style: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: props.gap !== undefined ? undefined : tokens.spaceInner,\n ...flexStyle(props, false),\n },\n },\n [renderNode(props.children)],\n ),\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { options } from \"../controls\";\n\nexport const SegmentedControlSchema = z.object({\n value: reactive(z.string()),\n options,\n block: z.boolean().optional(),\n});\n\nexport type SegmentedControlProps = z.infer<typeof SegmentedControlSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { optionList, useFieldName } from \"../controls\";\nimport { SegmentedControlSchema, type SegmentedControlProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SegmentedControlImpl = vueComponent({\n name: \"OpenUIIntelligentSegmentedControl\",\n props: {\n props: { type: Object as PropType<SegmentedControlProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => \"segmented\", () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const streaming = useIsStreaming();\n\n return () => {\n const opts = optionList(p.props.options);\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"div\",\n {\n role: \"tablist\",\n class: \"openui-intelligent-segmented\",\n style: {\n display: p.props.block ? \"flex\" : \"inline-flex\",\n width: p.props.block ? \"100%\" : undefined,\n padding: \"3px\",\n gap: \"2px\",\n background: tokens.surface,\n borderRadius: tokens.radiusMd,\n border: `1px solid ${tokens.border}`,\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 disabled: streaming.value,\n style: {\n flex: p.props.block ? \"1 1 0%\" : undefined,\n padding: \"6px 12px\",\n fontSize: \"13px\",\n fontWeight: active ? 600 : 500,\n fontFamily: tokens.font,\n borderRadius: tokens.radiusSm,\n border: \"none\",\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n background: active ? tokens.canvas : \"transparent\",\n color: active ? tokens.ink : tokens.muted,\n boxShadow: active ? tokens.shadowSm : undefined,\n },\n onClick: () => {\n if (!streaming.value) field.setValue(opt.value);\n },\n },\n opt.label,\n );\n }),\n );\n };\n },\n});\n\nexport const SegmentedControl = defineComponent({\n name: \"SegmentedControl\",\n props: SegmentedControlSchema,\n description: \"2 to 4 short choices in a row.\",\n component: SegmentedControlImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { options } from \"../controls\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const SelectSchema = z.object({\n value: reactive(z.string()),\n options,\n label: z.string().optional(),\n placeholder: z.string().optional(),\n rules: rulesSchema.optional(),\n});\nexport type SelectProps = z.infer<typeof SelectSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { optionList, renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { SelectSchema, type SelectProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SelectImpl = vueComponent({\n name: \"OpenUIIntelligentSelect\",\n props: {\n props: { type: Object as PropType<SelectProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(\n () => p.props.label,\n () => p.statementId,\n );\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const opts = optionList(p.props.options);\n const current = field.value == null ? \"\" : String(field.value);\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\n \"select\",\n {\n value: current,\n disabled: streaming.value,\n class: \"openui-intelligent-select\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n boxSizing: \"border-box\",\n },\n onChange: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLSelectElement).value);\n },\n onBlur: () => rules.check(),\n },\n [\n p.props.placeholder && !current\n ? h(\"option\", { value: \"\", disabled: true }, str(p.props.placeholder))\n : null,\n ...opts.map((opt) => h(\"option\", { key: opt.value, value: opt.value }, opt.label)),\n ],\n ),\n });\n };\n },\n});\n\nexport const Select = defineComponent({\n name: \"Select\",\n props: SelectSchema,\n description: \"Dropdown, for long option lists.\",\n component: SelectImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const SliderSchema = z.object({\n value: reactive(z.number()),\n min: z.number(),\n max: z.number(),\n step: z.number().optional(),\n label: z.string().optional(),\n unit: z.string().optional(),\n marks: z.array(z.object({ value: z.number(), label: z.string() })).optional(),\n});\n\nexport type SliderProps = z.infer<typeof SliderSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { numberText, str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useFieldName } from \"../controls\";\nimport { SliderSchema, type SliderProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SliderImpl = vueComponent({\n name: \"OpenUIIntelligentSlider\",\n props: {\n props: { type: Object as PropType<SliderProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const streaming = useIsStreaming();\n\n return () => {\n const min = typeof p.props.min === \"number\" && Number.isFinite(p.props.min) ? p.props.min : 0;\n const max = typeof p.props.max === \"number\" && Number.isFinite(p.props.max) ? p.props.max : 100;\n const step = typeof p.props.step === \"number\" && p.props.step > 0 ? p.props.step : 1;\n const numVal = typeof field.value === \"number\" && Number.isFinite(field.value) ? field.value : min;\n const unit = p.props.unit ? str(p.props.unit) : \"\";\n const formatted = unit === \"$\" || unit === \"€\" || unit === \"£\" || unit === \"¥\"\n ? `${unit}${numberText(numVal)}`\n : `${numberText(numVal)}${unit}`;\n\n return h(\n \"div\",\n {\n class: \"openui-intelligent-slider\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", width: \"100%\", fontFamily: tokens.font },\n },\n [\n h(\n \"div\",\n { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"baseline\", gap: \"8px\" } },\n [\n p.props.label\n ? h(\"span\", { style: { fontSize: \"13px\", fontWeight: 500, color: tokens.ink } }, str(p.props.label))\n : h(\"span\"),\n h(\n \"span\",\n { style: { fontSize: \"13px\", fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: tokens.ink } },\n formatted,\n ),\n ],\n ),\n h(\"input\", {\n type: \"range\",\n min,\n max,\n step,\n value: numVal,\n disabled: streaming.value,\n style: { width: \"100%\", accentColor: tokens.rangeThumb, cursor: streaming.value ? \"not-allowed\" : \"pointer\" },\n onInput: (e: Event) => {\n const next = Number((e.target as HTMLInputElement).value);\n if (Number.isFinite(next)) field.setValue(next);\n },\n }),\n Array.isArray(p.props.marks) && p.props.marks.length > 0\n ? h(\n \"div\",\n { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"11px\", color: tokens.muted } },\n p.props.marks.map((mark, idx) => h(\"span\", { key: idx }, str(mark.label))),\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const Slider = defineComponent({\n name: \"Slider\",\n props: SliderSchema,\n description: 'Shows label and value; unit like \"%\" or \"$\" formats the value.',\n component: SliderImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const SpacerSchema = z.object({});\n\nexport type SpacerProps = z.infer<typeof SpacerSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { SpacerSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Spacer = defineComponent({\n name: \"Spacer\",\n props: SpacerSchema,\n description: \"Fills the free space in a Row.\",\n component: () => h(\"div\", { class: \"openui-intelligent-spacer\", style: { flex: \"1 1 auto\" } }),\n});\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport {\n defineComponent as vueComponent,\n Fragment,\n h,\n inject,\n provide,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { z } from \"zod/v4\";\nimport { fg, size } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { color, isElement, length } from \"../schemas\";\n\nconst InSvgKey: InjectionKey<boolean> = Symbol(\"OpenUI.Intelligent.InSvg\");\n\nconst n = (value: unknown) =>\n typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n\nconst opacity = (value: unknown) =>\n n(value) === undefined ? undefined : Math.min(1, Math.max(0, value as number));\n\nconst POINTS = /^[\\d\\s,.eE+-]*$/;\nconst PATH = /^[MmLlHhVvCcSsQqTtAaZz\\d\\s,.eE+-]*$/;\nconst VIEWBOX = /^\\s*-?\\d+(\\.\\d+)?[\\s,]+-?\\d+(\\.\\d+)?[\\s,]+\\d+(\\.\\d+)?[\\s,]+\\d+(\\.\\d+)?\\s*$/;\n\nconst ok = (value: unknown, pattern: RegExp) =>\n typeof value === \"string\" && value.length < 20000 && pattern.test(value) ? value : undefined;\n\nconst paint = {\n fill: color.optional(),\n stroke: color.optional(),\n strokeWidth: z.number().optional(),\n opacity: z.number().optional(),\n};\n\ntype Paint = { fill?: string; stroke?: string; strokeWidth?: number; opacity?: number };\n\nconst paintAttrs = (p: Paint, filled: boolean) => ({\n fill:\n p.fill !== undefined\n ? (fg(p.fill) ?? \"none\")\n : filled && p.stroke === undefined\n ? \"currentColor\"\n : \"none\",\n stroke: p.stroke !== undefined ? fg(p.stroke) : filled ? undefined : \"currentColor\",\n \"stroke-width\": n(p.strokeWidth) ?? (filled ? undefined : 2),\n opacity: opacity(p.opacity),\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n});\n\nconst SvgCanvas = vueComponent({\n name: \"OpenUIIntelligentSvgCanvas\",\n props: {\n viewBox: { type: String, required: true },\n label: String,\n width: [Number, String] as PropType<number | string>,\n height: [Number, String] as PropType<number | string>,\n },\n setup(props, { slots }) {\n provide(InSvgKey, true);\n return () => {\n const vb = ok(props.viewBox, VIEWBOX) ?? \"0 0 100 100\";\n return h(\n \"svg\",\n {\n class: \"openui-intelligent-svg\",\n viewBox: vb,\n role: props.label ? \"img\" : undefined,\n \"aria-label\": props.label || undefined,\n \"aria-hidden\": props.label ? undefined : \"true\",\n style: {\n display: \"block\",\n maxWidth: \"100%\",\n width: size(props.width) ?? \"100%\",\n height: size(props.height) ?? \"auto\",\n color: tokens.ink,\n },\n },\n slots.default?.(),\n );\n };\n },\n});\n\nconst Standalone = vueComponent({\n name: \"OpenUIIntelligentSvgStandalone\",\n setup(_, { slots }) {\n const inside = inject(InSvgKey, false);\n return () =>\n inside\n ? slots.default?.()\n : h(SvgCanvas, { viewBox: \"0 0 100 100\", width: 160 }, { default: () => slots.default?.() });\n },\n});\n\nexport const CircleSchema = z.object({ cx: z.number(), cy: z.number(), r: z.number(), ...paint });\nexport const Circle = defineComponent({\n name: \"Circle\",\n props: CircleSchema,\n description: \"fill defaults to the text color; with only a stroke it stays unfilled.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"circle\", {\n cx: n(props.cx),\n cy: n(props.cy),\n r: Math.max(0, n(props.r) ?? 0),\n ...paintAttrs(props, true),\n }),\n }),\n});\n\nexport const EllipseSchema = z.object({\n cx: z.number(),\n cy: z.number(),\n rx: z.number(),\n ry: z.number(),\n ...paint,\n});\nexport const Ellipse = defineComponent({\n name: \"Ellipse\",\n props: EllipseSchema,\n description: \"fill defaults to the text color; with only a stroke it stays unfilled.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"ellipse\", {\n cx: n(props.cx),\n cy: n(props.cy),\n rx: Math.max(0, n(props.rx) ?? 0),\n ry: Math.max(0, n(props.ry) ?? 0),\n ...paintAttrs(props, true),\n }),\n }),\n});\n\nexport const RectSchema = z.object({\n x: z.number(),\n y: z.number(),\n width: z.number(),\n height: z.number(),\n ...paint,\n rx: z.number().optional(),\n});\nexport const Rect = defineComponent({\n name: \"Rect\",\n props: RectSchema,\n description:\n \"rx rounds the corners; fill defaults to the text color, and with only a stroke it stays unfilled.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"rect\", {\n x: n(props.x),\n y: n(props.y),\n width: Math.max(0, n(props.width) ?? 0),\n height: Math.max(0, n(props.height) ?? 0),\n rx: n(props.rx),\n ...paintAttrs(props, true),\n }),\n }),\n});\n\nexport const LineSchema = z.object({\n x1: z.number(),\n y1: z.number(),\n x2: z.number(),\n y2: z.number(),\n stroke: color.optional(),\n strokeWidth: z.number().optional(),\n opacity: z.number().optional(),\n});\nexport const Line = defineComponent({\n name: \"Line\",\n props: LineSchema,\n description: \"Stroked in the text color, 2 wide, unless stroke and strokeWidth are set.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"line\", {\n x1: n(props.x1),\n y1: n(props.y1),\n x2: n(props.x2),\n y2: n(props.y2),\n ...paintAttrs(props, false),\n }),\n }),\n});\n\nconst ARITY: Record<string, number> = { m: 2, l: 2, t: 2, h: 1, v: 1, c: 6, s: 4, q: 4, a: 7, z: 0 };\nconst NUMBER = /^[+-]?(\\d+\\.?\\d*|\\.\\d+)(e[+-]?\\d+)?/i;\nconst FLAG = /^[01]/;\n\nconst completePath = (d: string): boolean => {\n const last = d.match(/[mlhvcsqtaz][^mlhvcsqtaz]*$/i)?.[0];\n if (!last) return d.trim() === \"\";\n const arity = ARITY[last[0]!.toLowerCase()]!;\n let rest = last.slice(1);\n let count = 0;\n for (;;) {\n rest = rest.replace(/^[\\s,]+/, \"\");\n if (!rest) break;\n const slot = count % 7;\n const token = (arity === 7 && (slot === 3 || slot === 4) ? FLAG : NUMBER).exec(rest);\n if (!token) return false;\n rest = rest.slice(token[0].length);\n count++;\n }\n if (/[.eE+-]$/.test(last.trimEnd())) return false;\n return arity === 0 ? count === 0 : count > 0 && count % arity === 0;\n};\n\nexport const PathSchema = z.object({ d: z.string(), ...paint });\nexport const Path = defineComponent({\n name: \"Path\",\n props: PathSchema,\n description:\n \"d is SVG path data only (M, L, C, A, Z...), else nothing draws; unfilled unless fill is set.\",\n component: ({ props }) => {\n const d = ok(props.d, PATH);\n return h(Standalone, null, {\n default: () =>\n h(\"path\", {\n d: d !== undefined && completePath(d) ? d : undefined,\n ...paintAttrs(props, props.fill !== undefined),\n }),\n });\n },\n});\n\nexport const PolylineSchema = z.object({\n points: z.string(),\n fill: color.optional(),\n stroke: color.optional(),\n strokeWidth: z.number().optional(),\n opacity: z.number().optional(),\n});\nexport const Polyline = defineComponent({\n name: \"Polyline\",\n props: PolylineSchema,\n description: 'points like \"0,0 10,5 20,0\".',\n component: ({ props }) =>\n h(Standalone, null, {\n default: () => h(\"polyline\", { points: ok(props.points, POINTS), ...paintAttrs(props, false) }),\n }),\n});\n\nexport const PolygonSchema = z.object({ points: z.string(), ...paint });\nexport const Polygon = defineComponent({\n name: \"Polygon\",\n props: PolygonSchema,\n description:\n 'Closed shape; points like \"0,0 10,5 20,0\". fill defaults to the text color; with only a stroke it stays unfilled.',\n component: ({ props }) =>\n h(Standalone, null, {\n default: () => h(\"polygon\", { points: ok(props.points, POINTS), ...paintAttrs(props, true) }),\n }),\n});\n\nexport const SvgTextSchema = z.object({\n text: z.string(),\n x: z.number(),\n y: z.number(),\n size: z.number().optional(),\n fill: color.optional(),\n anchor: z.enum([\"start\", \"middle\", \"end\"]).optional(),\n weight: z.enum([\"normal\", \"medium\", \"semibold\"]).optional(),\n});\nexport const SvgText = defineComponent({\n name: \"SvgText\",\n props: SvgTextSchema,\n description: \"A text label at x, y; anchor sets which end sits on x.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\n \"text\",\n {\n x: n(props.x),\n y: n(props.y),\n \"font-size\": n(props.size) ?? 12,\n fill: fg(props.fill) ?? \"currentColor\",\n \"text-anchor\": props.anchor ?? \"start\",\n \"font-weight\": props.weight === \"semibold\" ? 640 : props.weight === \"medium\" ? 560 : 440,\n \"font-family\": tokens.font,\n },\n String(props.text ?? \"\"),\n ),\n }),\n});\n\nexport const shapeComponents = [Circle, Ellipse, Rect, Line, Path, Polyline, Polygon, SvgText];\n\nconst shapes = z.array(\n z.union(\n shapeComponents.map((shape) => shape.ref) as [\n (typeof shapeComponents)[number][\"ref\"],\n ...(typeof shapeComponents)[number][\"ref\"][],\n ],\n ),\n);\n\nconst TRANSFORM_ARGS: Record<string, number[]> = {\n translate: [1, 2],\n rotate: [1, 3],\n scale: [1, 2],\n skewX: [1],\n skewY: [1],\n matrix: [6],\n};\n\nfunction sanitizeTransform(value: unknown): string | undefined {\n if (typeof value !== \"string\" || value.length > 500) return undefined;\n const parts = [...value.matchAll(/\\s*([a-zA-Z]+)\\(([^()]*)\\)\\s*/g)];\n if (!parts.length || parts.map((p) => p[0]).join(\"\") !== value) return undefined;\n const valid = parts.every(([, name, args]) => {\n const numbers = args\n .trim()\n .split(/\\s*,\\s*|\\s+/)\n .filter(Boolean);\n return (\n (TRANSFORM_ARGS[name]?.includes(numbers.length) ?? false) &&\n numbers.every((num) => Number.isFinite(Number(num)))\n );\n });\n return valid ? value.trim() : undefined;\n}\n\nexport const GSchema = z.object({\n children: shapes,\n transform: z.string().optional(),\n opacity: z.number().optional(),\n});\nexport const G = defineComponent({\n name: \"G\",\n props: GSchema,\n description:\n 'Group; transform like \"rotate(30 50 50)\" or \"translate(10 0)\"; one with the wrong number of arguments is dropped.',\n component: ({ props, renderNode }) =>\n h(Standalone, null, {\n default: () =>\n h(\"g\", { transform: sanitizeTransform(props.transform), opacity: opacity(props.opacity) }, [renderNode(props.children)]),\n }),\n});\n\nconst DRAWABLE = new Set([...shapeComponents.map((s) => s.name), G.name]);\n\nexport const SvgSchema = z.object({\n children: z.array(z.union([...shapes.element.options, G.ref])),\n viewBox: z.string(),\n label: z.string().optional(),\n width: length.optional(),\n height: length.optional(),\n});\nexport const Svg = defineComponent({\n name: \"Svg\",\n props: SvgSchema,\n description:\n \"A drawing for steps, parts, mechanisms, diagrams and layouts. Scales to its width; its shapes take expressions, so state can move them. label says in a few words what it shows, for screen readers: always give one.\",\n component: ({ props, renderNode }) => {\n const nodes = (Array.isArray(props.children) ? props.children : []) as unknown[];\n const drawable = (node: unknown) =>\n isElement(node) && DRAWABLE.has(String((node as { typeName?: string }).typeName));\n const rest = nodes.filter((node) => !drawable(node));\n return h(Fragment, null, [\n h(\n SvgCanvas,\n {\n viewBox: props.viewBox,\n label: props.label,\n width: props.width,\n height: props.height,\n },\n { default: () => renderNode(nodes.filter(drawable)) },\n ),\n rest.length ? renderNode(rest) : null,\n ]);\n },\n});\n\nexport const svgComponents = [Svg, ...shapeComponents, G];\n","import { z } from \"zod/v4\";\n\nexport const TableSchema = z.object({\n columns: z.array(z.string()),\n rows: z.array(z.array(z.any())),\n});\n\nexport type TableProps = z.infer<typeof TableSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { numberText, str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { isElement, renderInlineMarkdown } from \"../schemas\";\nimport { TableSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Table = defineComponent({\n name: \"Table\",\n props: TableSchema,\n description:\n \"Each row lists its cells in column order; a cell may be a component. Number columns align right.\",\n component: ({ props, renderNode }) => {\n const columns = Array.isArray(props.columns) ? props.columns.map(str) : [];\n const rows = Array.isArray(props.rows)\n ? props.rows.filter((r): r is unknown[] => Array.isArray(r))\n : [];\n\n const isNumericCol = columns.map(\n (_, colIdx) =>\n rows.length > 0 && rows.every((row) => row[colIdx] == null || typeof row[colIdx] === \"number\"),\n );\n\n return h(\n \"div\",\n {\n class: \"openui-intelligent-table-wrap\",\n style: {\n width: \"100%\",\n overflowX: \"auto\",\n border: `1px solid ${tokens.border}`,\n borderRadius: tokens.radiusMd,\n },\n },\n [\n h(\n \"table\",\n {\n class: \"openui-intelligent-table\",\n style: {\n width: \"100%\",\n borderCollapse: \"collapse\",\n fontSize: \"13px\",\n fontFamily: tokens.font,\n },\n },\n [\n h(\n \"thead\",\n null,\n h(\n \"tr\",\n { style: { background: tokens.surface, borderBottom: `1px solid ${tokens.border}` } },\n columns.map((col, idx) =>\n h(\n \"th\",\n {\n key: idx,\n style: {\n padding: \"8px 12px\",\n textAlign: isNumericCol[idx] ? \"right\" : \"left\",\n fontWeight: 600,\n color: tokens.muted,\n whiteSpace: \"nowrap\",\n },\n },\n col,\n ),\n ),\n ),\n ),\n h(\n \"tbody\",\n null,\n rows.map((row, rIdx) =>\n h(\n \"tr\",\n {\n key: rIdx,\n style: {\n borderBottom: rIdx < rows.length - 1 ? `1px solid ${tokens.border}` : undefined,\n },\n },\n columns.map((_, cIdx) => {\n const cell = row[cIdx];\n const rendered = isElement(cell) || Array.isArray(cell)\n ? renderNode(cell)\n : typeof cell === \"number\"\n ? numberText(cell)\n : renderInlineMarkdown(str(cell));\n return h(\n \"td\",\n {\n key: cIdx,\n style: {\n padding: \"8px 12px\",\n textAlign: isNumericCol[cIdx] ? \"right\" : \"left\",\n fontVariantNumeric: isNumericCol[cIdx] ? \"tabular-nums\" : undefined,\n color: tokens.ink,\n },\n },\n [rendered],\n );\n }),\n ),\n ),\n ),\n ],\n ),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { children, color } from \"../schemas\";\n\n/** Text, or a run of strings and inline components such as Icon, Badge, Link or Math. */\nexport const richText = z.union([z.string(), children]);\n\nexport const TextSchema = z.object({\n text: richText,\n size: z.enum([\"xs\", \"sm\", \"md\", \"lg\"]).optional(),\n color: color.optional(),\n weight: z.enum([\"normal\", \"medium\", \"semibold\"]).optional(),\n italic: z.boolean().optional(),\n lineThrough: z.boolean().optional(),\n tabularNums: z.boolean().optional(),\n maxLines: z.number().optional(),\n});\n\nexport type TextProps = z.infer<typeof TextSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h, type CSSProperties } from \"vue\";\nimport { fg } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderSlot } from \"../schemas\";\nimport { TextSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TEXT_SIZES: Record<string, string> = {\n xs: \"12px\",\n sm: \"13px\",\n md: \"14px\",\n lg: \"16px\",\n};\n\nconst TEXT_WEIGHTS: Record<string, number> = {\n normal: 400,\n medium: 500,\n semibold: 600,\n};\n\nexport const Text = defineComponent({\n name: \"Text\",\n props: TextSchema,\n description:\n 'Paragraph; supports **bold**, *italic*, `code` and [links](https://…). text may be a list mixing strings and inline components: [Icon(\"clock\", \"sm\"), \" 25 min · \", Badge(\"Easy\")].',\n component: ({ props, renderNode }) => {\n const style: CSSProperties = {\n margin: 0,\n fontSize: TEXT_SIZES[props.size ?? \"md\"] ?? \"14px\",\n lineHeight: 1.55,\n color: fg(props.color) ?? tokens.ink,\n fontWeight: props.weight ? TEXT_WEIGHTS[props.weight] : undefined,\n fontStyle: props.italic ? \"italic\" : undefined,\n textDecoration: props.lineThrough ? \"line-through\" : undefined,\n fontVariantNumeric: props.tabularNums ? \"tabular-nums\" : undefined,\n };\n if (typeof props.maxLines === \"number\" && props.maxLines > 0) {\n style.display = \"-webkit-box\";\n style.WebkitLineClamp = String(Math.round(props.maxLines));\n style.WebkitBoxOrient = \"vertical\";\n style.overflow = \"hidden\";\n }\n const content = Array.isArray(props.text)\n ? props.text.flat().map((part) => renderSlot(part, renderNode))\n : renderSlot(props.text, renderNode);\n return h(\"p\", { class: \"openui-intelligent-text\", style }, [content]);\n },\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const TextAreaSchema = z.object({\n value: reactive(z.string()),\n label: z.string().optional(),\n placeholder: z.string().optional(),\n rows: z.number().optional(),\n rules: rulesSchema.optional(),\n});\nexport type TextAreaProps = z.infer<typeof TextAreaSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { TextAreaSchema, type TextAreaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TextAreaImpl = vueComponent({\n name: \"OpenUIIntelligentTextArea\",\n props: {\n props: { type: Object as PropType<TextAreaProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(\n () => p.props.label,\n () => p.statementId,\n );\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const rows =\n typeof p.props.rows === \"number\" && Number.isFinite(p.props.rows)\n ? Math.min(20, Math.max(2, Math.round(p.props.rows)))\n : 3;\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\"textarea\", {\n rows,\n value: field.value == null ? \"\" : String(field.value),\n placeholder: p.props.placeholder ? str(p.props.placeholder) : undefined,\n disabled: streaming.value,\n class: \"openui-intelligent-textarea\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n outline: \"none\",\n resize: \"vertical\",\n boxSizing: \"border-box\",\n },\n onInput: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLTextAreaElement).value);\n },\n onBlur: () => rules.check(),\n }),\n });\n };\n },\n});\n\nexport const TextArea = defineComponent({\n name: \"TextArea\",\n props: TextAreaSchema,\n description: \"Multi-line text field; rows is 2 to 20 (default 3).\",\n component: TextAreaImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const TimerSchema = z.object({\n seconds: reactive(z.number()),\n label: z.string().optional(),\n});\n\nexport type TimerProps = z.infer<typeof TimerSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, onBeforeUnmount, ref, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useFieldName } from \"../controls\";\nimport { TimerSchema, type TimerProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nfunction formatClock(totalSeconds: number): string {\n const s = Math.max(0, Math.floor(Number.isFinite(totalSeconds) ? totalSeconds : 0));\n const mins = Math.floor(s / 60);\n const secs = s % 60;\n return `${String(mins).padStart(2, \"0\")}:${String(secs).padStart(2, \"0\")}`;\n}\n\nconst TimerImpl = vueComponent({\n name: \"OpenUIIntelligentTimer\",\n props: {\n props: { type: Object as PropType<TimerProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.seconds);\n const streaming = useIsStreaming();\n const initialSeconds = ref<number>(\n typeof field.value === \"number\" && Number.isFinite(field.value) ? field.value : 0,\n );\n const running = ref(false);\n let interval: ReturnType<typeof setInterval> | null = null;\n\n const stop = () => {\n running.value = false;\n if (interval !== null) {\n clearInterval(interval);\n interval = null;\n }\n };\n\n const start = () => {\n if (streaming.value || running.value) return;\n const cur = Number(field.value ?? 0);\n if (cur <= 0) return;\n running.value = true;\n interval = setInterval(() => {\n const current = Number(field.value ?? 0);\n if (current <= 1) {\n field.setValue(0);\n stop();\n } else {\n field.setValue(current - 1);\n }\n }, 1000);\n };\n\n const reset = () => {\n stop();\n field.setValue(initialSeconds.value);\n };\n\n onBeforeUnmount(stop);\n\n return () => {\n const secs = typeof field.value === \"number\" ? field.value : Number(field.value ?? 0);\n return h(\n \"div\",\n {\n class: \"openui-intelligent-timer\",\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: \"12px\",\n padding: \"12px 14px\",\n borderRadius: tokens.radiusMd,\n background: tokens.surface,\n border: `1px solid ${tokens.border}`,\n },\n },\n [\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\" } }, [\n p.props.label\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, str(p.props.label))\n : null,\n h(\n \"span\",\n { style: { fontSize: \"24px\", fontWeight: 700, fontVariantNumeric: \"tabular-nums\", color: tokens.ink } },\n formatClock(secs),\n ),\n ]),\n h(\"div\", { style: { display: \"flex\", gap: \"8px\" } }, [\n h(\n \"button\",\n {\n type: \"button\",\n disabled: streaming.value || (!running.value && secs <= 0),\n onClick: () => (running.value ? stop() : start()),\n style: {\n padding: \"6px 12px\",\n borderRadius: tokens.radiusSm,\n border: \"none\",\n background: tokens.ink,\n color: tokens.onInk,\n fontSize: \"13px\",\n cursor: \"pointer\",\n },\n },\n running.value ? \"Pause\" : \"Start\",\n ),\n h(\n \"button\",\n {\n type: \"button\",\n disabled: streaming.value,\n onClick: reset,\n style: {\n padding: \"6px 12px\",\n borderRadius: tokens.radiusSm,\n border: `1px solid ${tokens.borderStrong}`,\n background: tokens.canvas,\n color: tokens.ink,\n fontSize: \"13px\",\n cursor: \"pointer\",\n },\n },\n \"Reset\",\n ),\n ]),\n ],\n );\n };\n },\n});\n\nexport const Timer = defineComponent({\n name: \"Timer\",\n props: TimerSchema,\n description:\n \"Countdown with start, pause and reset. It counts the bound seconds down to 0, so other statements can react, e.g. $left == 0.\",\n component: TimerImpl,\n});\n","import { z } from \"zod/v4\";\nimport { color } from \"../schemas\";\n\nexport const TitleSchema = z.object({\n text: z.string(),\n size: z.enum([\"sm\", \"md\", \"lg\", \"xl\", \"2xl\", \"3xl\"]).optional(),\n color: color.optional(),\n});\n\nexport type TitleProps = z.infer<typeof TitleSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { fg } from \"../../shared/props\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { TitleSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TITLE_SIZES: Record<string, { fontSize: string; lineHeight: string; fontWeight: number }> = {\n sm: { fontSize: \"14px\", lineHeight: \"1.35\", fontWeight: 600 },\n md: { fontSize: \"16px\", lineHeight: \"1.35\", fontWeight: 600 },\n lg: { fontSize: \"20px\", lineHeight: \"1.28\", fontWeight: 650 },\n xl: { fontSize: \"24px\", lineHeight: \"1.22\", fontWeight: 650 },\n \"2xl\": { fontSize: \"32px\", lineHeight: \"1.15\", fontWeight: 700 },\n \"3xl\": { fontSize: \"40px\", lineHeight: \"1.1\", fontWeight: 700 },\n};\n\nexport const Title = defineComponent({\n name: \"Title\",\n props: TitleSchema,\n description: \"Heading; md for a card title, lg for a section, 2xl for a big number.\",\n component: ({ props }) => {\n const spec = TITLE_SIZES[props.size ?? \"md\"] ?? TITLE_SIZES.md!;\n return h(\n \"div\",\n {\n role: \"heading\",\n \"aria-level\": props.size === \"3xl\" || props.size === \"2xl\" ? 2 : props.size === \"xl\" || props.size === \"lg\" ? 3 : 4,\n class: \"openui-intelligent-title\",\n style: {\n margin: 0,\n color: fg(props.color) ?? tokens.ink,\n letterSpacing: \"-0.015em\",\n ...spec,\n },\n },\n str(props.text),\n );\n },\n});\n","import { z } from \"zod/v4\";\n\nexport const YouTubeSchema = z.object({ video: z.string(), title: z.string().optional() });\n\nexport type YouTubeProps = z.infer<typeof YouTubeSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { YouTubeSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst VIDEO_ID = /^[A-Za-z0-9_-]{11}$/;\n\nfunction extractYouTubeId(input: string): string | null {\n const trimmed = input.trim();\n if (VIDEO_ID.test(trimmed)) return trimmed;\n try {\n const url = new URL(trimmed);\n const host = url.hostname.replace(/^www\\./, \"\");\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1).split(\"/\")[0] ?? \"\";\n return VIDEO_ID.test(id) ? id : null;\n }\n if (host === \"youtube.com\" || host === \"m.youtube.com\" || host === \"youtube-nocookie.com\") {\n const v = url.searchParams.get(\"v\");\n if (v && VIDEO_ID.test(v)) return v;\n const segs = url.pathname.split(\"/\").filter(Boolean);\n const id = segs[1] ?? \"\";\n if ((segs[0] === \"embed\" || segs[0] === \"shorts\") && VIDEO_ID.test(id)) return id;\n }\n } catch {\n return null;\n }\n return null;\n}\n\nexport const YouTube = defineComponent({\n name: \"YouTube\",\n props: YouTubeSchema,\n description: \"Embedded YouTube video by id or URL. Only a video you know exists.\",\n component: ({ props }) => {\n const id = extractYouTubeId(str(props.video));\n if (!id) return null;\n return h(\n \"div\",\n {\n class: \"openui-intelligent-youtube\",\n style: {\n width: \"100%\",\n aspectRatio: \"16 / 9\",\n borderRadius: tokens.radiusMd,\n overflow: \"hidden\",\n background: tokens.surface,\n },\n },\n [\n h(\"iframe\", {\n src: `https://www.youtube-nocookie.com/embed/${id}`,\n title: str(props.title) || \"YouTube video\",\n allow: \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",\n allowfullscreen: true,\n loading: \"lazy\",\n referrerpolicy: \"strict-origin-when-cross-origin\",\n style: { width: \"100%\", height: \"100%\", border: \"none\", display: \"block\" },\n }),\n ],\n );\n },\n});\n","import type { DefinedComponent } from \"@wodecorp/openui-vue-lang\";\nimport { Badge } from \"./Badge\";\nimport { Box } from \"./Box\";\nimport { Button } from \"./Button\";\nimport { Caption } from \"./Caption\";\nimport { Card } from \"./Card\";\nimport { Carousel } from \"./Carousel\";\nimport { Celebration } from \"./Celebration\";\nimport { Chart } from \"./Chart\";\nimport { Checkbox } from \"./Checkbox\";\nimport { Code } from \"./Code\";\nimport { Col } from \"./Col\";\nimport { DatePicker } from \"./DatePicker\";\nimport { Divider } from \"./Divider\";\nimport { Flashcard } from \"./Flashcard\";\nimport { Form } from \"./Form\";\nimport { Grid } from \"./Grid\";\nimport { HtmlView } from \"./HtmlView\";\nimport { Icon } from \"./Icon\";\nimport { IconButton } from \"./IconButton\";\nimport { Image } from \"./Image\";\nimport { Input } from \"./Input\";\nimport { Label } from \"./Label\";\nimport { Link } from \"./Link\";\nimport { List, ListItem } from \"./List\";\nimport { Markdown } from \"./Markdown\";\nimport { MathBlock } from \"./Math\";\nimport { Popover } from \"./Popover\";\nimport { Pressable } from \"./Pressable\";\nimport { Quote } from \"./Quote\";\nimport { RadioGroup } from \"./RadioGroup\";\nimport { Row } from \"./Row\";\nimport { SegmentedControl } from \"./SegmentedControl\";\nimport { Select } from \"./Select\";\nimport { Slider } from \"./Slider\";\nimport { Spacer } from \"./Spacer\";\nimport { svgComponents } from \"./Svg\";\nimport { Table } from \"./Table\";\nimport { Text } from \"./Text\";\nimport { TextArea } from \"./TextArea\";\nimport { Timer } from \"./Timer\";\nimport { Title } from \"./Title\";\nimport { YouTube } from \"./YouTube\";\n\nexport const intelligentComponents: DefinedComponent<any>[] = [\n Col,\n Row,\n Box,\n Grid,\n Card,\n Carousel,\n Popover,\n Divider,\n Spacer,\n Title,\n Text,\n Caption,\n Label,\n Badge,\n Link,\n List,\n ListItem,\n Markdown,\n Quote,\n Code,\n MathBlock,\n Button,\n IconButton,\n Pressable,\n Input,\n TextArea,\n Select,\n SegmentedControl,\n Slider,\n Checkbox,\n RadioGroup,\n DatePicker,\n Timer,\n Form,\n Image,\n Icon,\n Table,\n Chart,\n YouTube,\n Flashcard,\n Celebration,\n ...svgComponents,\n HtmlView,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nconst HEX = /^#?([\\da-f]{3}|[\\da-f]{6})$/i;\n\nfunction channels(color: string): number[] {\n const m = HEX.exec(color.trim());\n if (!m) throw new Error(`not a hex color: ${color}`);\n const hex = m[1].length === 3 ? m[1].replace(/./g, \"$&$&\") : m[1];\n return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16));\n}\n\nexport const MixColor = defineFunction({\n name: \"MixColor\",\n description:\n 'The hex color a fraction t of the way from one hex color to another, e.g. @MixColor(\"#ffffff\", \"#0285ff\", 0.5) for a heatmap or a tint',\n params: z.object({ from: z.string(), to: z.string(), t: z.number() }),\n returns: z.string(),\n fn: ({ from, to, t }) => {\n const a = channels(from);\n const b = channels(to);\n const k = Math.min(1, Math.max(0, t));\n return `#${a\n .map((v, i) =>\n Math.round(v + (b[i] - v) * k)\n .toString(16)\n .padStart(2, \"0\"),\n )\n .join(\"\")}`;\n },\n});\n\nexport const colorFunctions = [MixColor];\n","import { z } from \"zod/v4\";\n\nexport const list = () => z.array(z.any());\nexport const numbers = () => z.array(z.number());\nexport const date = () => z.union([z.string(), z.number()]);\nexport const agg = () => z.enum([\"sum\", \"avg\", \"count\", \"min\", \"max\"]);\n\n/** Reads `field` from a row, with dot paths; \"\" is the item itself, like @Filter. */\nexport function read(item: unknown, field: string): unknown {\n if (!field) return item;\n let cur: unknown = item;\n for (const key of field.split(\".\")) {\n if (cur == null || typeof cur !== \"object\") return undefined;\n cur = (cur as Record<string, unknown>)[key];\n }\n return cur;\n}\n\n/**\n * Equality by value: lists and objects compare item by item, and a number\n * matches its string form (ids from inputs are often strings).\n */\nexport function same(a: unknown, b: unknown): boolean {\n if (a === b) return true;\n const mixed =\n (typeof a === \"number\" && typeof b === \"string\") ||\n (typeof a === \"string\" && typeof b === \"number\");\n if (mixed) return String(a) === String(b);\n if (a === null || b === null || typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n if (Array.isArray(a))\n return a.length === (b as unknown[]).length && a.every((x, i) => same(x, (b as unknown[])[i]));\n const ka = Object.keys(a);\n const kb = Object.keys(b);\n return (\n ka.length === kb.length &&\n ka.every(\n (k) =>\n Object.hasOwn(b, k) &&\n same((a as Record<string, unknown>)[k], (b as Record<string, unknown>)[k]),\n )\n );\n}\n\n/** A finite number or a thrown error, which the runtime turns into null. */\nexport function finite(value: number): number {\n if (!Number.isFinite(value)) throw new Error(\"result is not a finite number\");\n return value;\n}\n\nexport function toNum(value: unknown): number | null {\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n if (typeof value === \"string\" && value.trim() !== \"\") {\n const n = Number(value);\n return Number.isFinite(n) ? n : null;\n }\n return null;\n}\n\nexport type Agg = \"sum\" | \"avg\" | \"count\" | \"min\" | \"max\";\n\n/** Aggregates the numbers read from rows; count counts rows. */\nexport function aggregate(rows: unknown[], field: string | undefined, how: Agg): number {\n if (how === \"count\") return rows.length;\n const values = rows\n .map((r) => toNum(read(r, field ?? \"\")))\n .filter((v): v is number => v !== null);\n if (!values.length) return 0;\n switch (how) {\n case \"sum\":\n return values.reduce((a, b) => a + b, 0);\n case \"avg\":\n return values.reduce((a, b) => a + b, 0) / values.length;\n case \"min\":\n return Math.min(...values);\n case \"max\":\n return Math.max(...values);\n }\n}\n\n/** Groups items by a key in first-seen order. */\nexport function groups(rows: unknown[], key: string): Map<string | number, unknown[]> {\n const out = new Map<string | number, unknown[]>();\n for (const row of rows) {\n const raw = read(row, key);\n const k = typeof raw === \"number\" ? raw : raw == null || raw === \"\" ? \"Unknown\" : String(raw);\n const bucket = out.get(k);\n if (bucket) bucket.push(row);\n else out.set(k, [row]);\n }\n return out;\n}\n\nexport const MAX_ITEMS = 10000;\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { date } from \"./helpers\";\n\nconst DAY = 86_400_000;\nconst DATE_ONLY = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\n\n/**\n * A date as a calendar day (days since 1970-01-01) plus, for a timestamp, the\n * instant. \"YYYY-MM-DD\" is a calendar date with no time zone; a timestamp or an\n * ISO date-time is read in the viewer's time zone.\n */\ntype Parsed = { day: number; instant: Date | null };\n\nexport function parseDate(value: string | number): Parsed {\n if (typeof value === \"string\") {\n const m = DATE_ONLY.exec(value.trim());\n if (m) {\n const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];\n const utc = Date.UTC(y, mo - 1, d);\n const check = new Date(utc);\n if (check.getUTCMonth() !== mo - 1 || check.getUTCDate() !== d)\n throw new Error(`invalid date \"${value}\"`);\n return { day: utc / DAY, instant: null };\n }\n }\n const instant = new Date(value);\n if (Number.isNaN(instant.getTime())) throw new Error(`invalid date \"${value}\"`);\n return {\n day: Date.UTC(instant.getFullYear(), instant.getMonth(), instant.getDate()) / DAY,\n instant,\n };\n}\n\nexport function isoDay(day: number): string {\n return new Date(day * DAY).toISOString().slice(0, 10);\n}\n\nconst STYLES: Record<string, Intl.DateTimeFormatOptions> = {\n date: { month: \"short\", day: \"numeric\", year: \"numeric\" },\n short: { month: \"short\", day: \"numeric\" },\n long: { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" },\n weekday: { weekday: \"short\" },\n month: { month: \"short\", year: \"numeric\" },\n time: { hour: \"numeric\", minute: \"2-digit\" },\n datetime: { month: \"short\", day: \"numeric\", hour: \"numeric\", minute: \"2-digit\" },\n};\n\nexport const Now = defineFunction({\n name: \"Now\",\n description: \"The current date and time as an ISO string\",\n params: z.object({}),\n returns: z.string(),\n fn: () => new Date().toISOString(),\n});\n\nexport const FormatDate = defineFunction({\n name: \"FormatDate\",\n description:\n 'A date as text: \"date\" Oct 9, 2026 (default), \"short\" Oct 9, \"long\" Friday, October 9, 2026, \"weekday\" Fri, \"month\" Oct 2026, \"time\" 9:30 PM, \"datetime\", \"iso\" 2026-10-09. Dates are \"YYYY-MM-DD\", ISO or a timestamp; \"time\" and \"datetime\" need a timestamp or an ISO date-time, as a plain date has no time',\n params: z.object({\n date: date(),\n style: z\n .enum([\"date\", \"short\", \"long\", \"weekday\", \"month\", \"time\", \"datetime\", \"iso\"])\n .optional(),\n }),\n returns: z.string(),\n fn: ({ date, style = \"date\" }) => {\n const { day, instant } = parseDate(date);\n if (style === \"iso\") return isoDay(day);\n // A calendar date formats in UTC so its day never shifts with the viewer's zone\n const at = instant ?? new Date(day * DAY);\n return at.toLocaleString(\"en-US\", {\n ...STYLES[style],\n ...(instant ? {} : { timeZone: \"UTC\" }),\n });\n },\n});\n\nexport const AddDays = defineFunction({\n name: \"AddDays\",\n description: 'The date days later (negative: earlier), as \"YYYY-MM-DD\"',\n params: z.object({ date: date(), days: z.number() }),\n returns: z.string(),\n fn: ({ date, days }) => isoDay(parseDate(date).day + Math.trunc(days)),\n});\n\nexport const DaysBetween = defineFunction({\n name: \"DaysBetween\",\n description: \"Calendar days from one date to another (negative if to is earlier)\",\n params: z.object({ from: date(), to: date() }),\n returns: z.number(),\n fn: ({ from, to }) => parseDate(to).day - parseDate(from).day,\n});\n\nexport const Today = defineFunction({\n name: \"Today\",\n description: \"Today's date in the viewer's time zone, as \\\"YYYY-MM-DD\\\"\",\n params: z.object({}),\n returns: z.string(),\n fn: () => isoDay(parseDate(Date.now()).day),\n});\n\n/** Year, month (0-11) and day of a calendar day. */\nfunction ymd(day: number): [number, number, number] {\n const d = new Date(day * DAY);\n return [d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate()];\n}\n\nexport const AddMonths = defineFunction({\n name: \"AddMonths\",\n description:\n 'The date months later (negative: earlier), kept within the month (Jan 31 + 1 is Feb 28), as \"YYYY-MM-DD\"; 12 months is a year',\n params: z.object({ date: date(), months: z.number() }),\n returns: z.string(),\n fn: ({ date, months }) => {\n const [y, m, d] = ymd(parseDate(date).day);\n const target = m + Math.trunc(months);\n const last = new Date(Date.UTC(y, target + 1, 0)).getUTCDate();\n return isoDay(Date.UTC(y, target, Math.min(d, last)) / DAY);\n },\n});\n\nexport const MonthsBetween = defineFunction({\n name: \"MonthsBetween\",\n description:\n \"Whole months from one date to another (negative if to is earlier); @Floor(@MonthsBetween(birthday, @Today()) / 12) is an age\",\n params: z.object({ from: date(), to: date() }),\n returns: z.number(),\n fn: ({ from, to }) => {\n const [y1, m1, d1] = ymd(parseDate(from).day);\n const [y2, m2, d2] = ymd(parseDate(to).day);\n let months = (y2 - y1) * 12 + (m2 - m1);\n if (months > 0 && d2 < d1) months -= 1;\n if (months < 0 && d2 > d1) months += 1;\n return months;\n },\n});\n\nexport const StartOf = defineFunction({\n name: \"StartOf\",\n description: 'First day of the date\\'s \"week\" (Monday), \"month\" or \"year\", as \"YYYY-MM-DD\"',\n params: z.object({ date: date(), unit: z.enum([\"week\", \"month\", \"year\"]) }),\n returns: z.string(),\n fn: ({ date, unit }) => {\n const day = parseDate(date).day;\n const [y, m] = ymd(day);\n if (unit === \"week\") return isoDay(day - ((new Date(day * DAY).getUTCDay() + 6) % 7));\n return isoDay(Date.UTC(y, unit === \"month\" ? m : 0, 1) / DAY);\n },\n});\n\nexport const dateFunctions = [\n Now,\n Today,\n FormatDate,\n AddDays,\n AddMonths,\n DaysBetween,\n MonthsBetween,\n StartOf,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { isoDay, parseDate } from \"./dates\";\nimport {\n agg,\n aggregate,\n finite,\n groups,\n list,\n MAX_ITEMS,\n numbers,\n read,\n toNum,\n type Agg,\n} from \"./helpers\";\n\nconst keyValue = () =>\n z.array(z.object({ key: z.union([z.string(), z.number()]), value: z.number() }));\n// Untyped arrays (a pluck over rows that lack the field) can still hold nulls\nconst finiteOnly = (values: unknown[]) =>\n values.filter((v): v is number => typeof v === \"number\" && Number.isFinite(v));\nconst defaultAgg = (field: string | undefined, how: Agg | undefined): Agg =>\n how ?? (field ? \"sum\" : \"count\");\n\n/** Copy of each row with `field` replaced; field \"\" maps a list of numbers. */\nfunction mapField(rows: unknown[], field: string, values: number[]): unknown[] {\n return rows.map((row, i) => (field ? { ...(row as object), [field]: values[i] } : values[i]));\n}\n\nexport const GroupBy = defineFunction({\n name: \"GroupBy\",\n description:\n 'One row per distinct key, in first-seen order; value is agg of field (default \"sum\"), or the row count without a field',\n params: z.object({\n rows: list(),\n key: z.string(),\n field: z.string().optional(),\n agg: agg().optional(),\n }),\n returns: keyValue(),\n fn: ({ rows, key, field, agg: how }) =>\n [...groups(rows, key)].map(([k, members]) => ({\n key: k,\n value: aggregate(members, field, defaultAgg(field, how)),\n })),\n});\n\nexport const Pivot = defineFunction({\n name: \"Pivot\",\n description:\n \"One row per rowKey value, under key, with a column per colKey value holding agg of field, for stacked or grouped charts\",\n params: z.object({\n rows: list(),\n rowKey: z.string(),\n colKey: z.string(),\n field: z.string().optional(),\n agg: agg().optional(),\n }),\n returns: z.array(z.record(z.string(), z.union([z.string(), z.number()]))),\n fn: ({ rows, rowKey, colKey, field, agg: how }) => {\n const cols = [...groups(rows, colKey).keys()].map(String);\n return [...groups(rows, rowKey)].map(([k, members]) => {\n const out: Record<string, string | number> = { key: k };\n for (const col of cols) out[col] = 0;\n for (const [c, cell] of groups(members, colKey))\n out[String(c)] = aggregate(cell, field, defaultAgg(field, how));\n return out;\n });\n },\n});\n\nexport const Top = defineFunction({\n name: \"Top\",\n description: 'The n rows with the largest field (\"asc\": the smallest)',\n params: z.object({\n rows: list(),\n field: z.string(),\n n: z.number(),\n direction: z.enum([\"desc\", \"asc\"]).optional(),\n }),\n returns: list(),\n fn: ({ rows, field, n, direction = \"desc\" }) => {\n const sign = direction === \"asc\" ? 1 : -1;\n const ranked = rows\n .map((row, i) => ({ row, i, v: toNum(read(row, field)) }))\n .sort((a, b) => {\n if (a.v === null || b.v === null) return a.v === b.v ? a.i - b.i : a.v === null ? 1 : -1;\n return (a.v - b.v) * sign || a.i - b.i;\n });\n return ranked.slice(0, Math.max(0, Math.trunc(n))).map((r) => r.row);\n },\n});\n\nconst ISO_DATE = /^\\d{4}-\\d{2}-\\d{2}/;\nconst isoDate = (value: unknown) => typeof value === \"string\" && ISO_DATE.test(value.trim());\n\n/**\n * Orders two field values: numbers by value; a \"YYYY-MM-DD\" or ISO date against another date or\n * a timestamp by day; anything else as text.\n */\nfunction compare(a: unknown, b: unknown): number {\n const x = toNum(a);\n const y = toNum(b);\n if (x !== null && y !== null) return x - y;\n if ((isoDate(a) || isoDate(b)) && (isoDate(a) || x !== null) && (isoDate(b) || y !== null)) {\n try {\n return parseDate(a as string | number).day - parseDate(b as string | number).day;\n } catch {\n // Not a real date after all: compare as text below.\n }\n }\n const s = String(a);\n const t = String(b);\n return s < t ? -1 : s > t ? 1 : 0;\n}\n\nexport const Between = defineFunction({\n name: \"Between\",\n description:\n 'Rows whose field is from min to max, both included; compares numbers, dates by day (\"YYYY-MM-DD\", ISO or a timestamp), or text. Leave min or max null for an open end',\n params: z.object({\n rows: list(),\n field: z.string(),\n min: z.any().optional(),\n max: z.any().optional(),\n }),\n returns: list(),\n fn: ({ rows, field, min, max }) =>\n rows.filter((row) => {\n const v = read(row, field);\n if (v == null) return false;\n return (min == null || compare(v, min) >= 0) && (max == null || compare(v, max) <= 0);\n }),\n});\n\nfunction periodStart(day: number, unit: \"day\" | \"week\" | \"month\"): number {\n if (unit === \"day\") return day;\n if (unit === \"week\") return day - ((new Date(day * 86_400_000).getUTCDay() + 6) % 7); // Monday\n const d = new Date(day * 86_400_000);\n return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), 1) / 86_400_000;\n}\n\nfunction nextPeriod(start: number, unit: \"day\" | \"week\" | \"month\"): number {\n if (unit === \"day\") return start + 1;\n if (unit === \"week\") return start + 7;\n const d = new Date(start * 86_400_000);\n return Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1) / 86_400_000;\n}\n\nexport const Bucket = defineFunction({\n name: \"Bucket\",\n description:\n 'Rows per day, week (from Monday) or month of dateField, in date order, empty periods 0 for sum and count; key is \"YYYY-MM-DD\", or \"YYYY-MM\" for months',\n params: z.object({\n rows: list(),\n dateField: z.string(),\n unit: z.enum([\"day\", \"week\", \"month\"]),\n field: z.string().optional(),\n agg: agg().optional(),\n }),\n returns: keyValue(),\n fn: ({ rows, dateField, unit, field, agg: how }) => {\n const byPeriod = new Map<number, unknown[]>();\n for (const row of rows) {\n const raw = read(row, dateField);\n if (typeof raw !== \"string\" && typeof raw !== \"number\") continue;\n let day: number;\n try {\n day = parseDate(raw).day;\n } catch {\n continue;\n }\n const start = periodStart(day, unit);\n const bucket = byPeriod.get(start);\n if (bucket) bucket.push(row);\n else byPeriod.set(start, [row]);\n }\n if (!byPeriod.size) return [];\n const mode = defaultAgg(field, how);\n const fill = mode === \"sum\" || mode === \"count\";\n const label = (start: number) => (unit === \"month\" ? isoDay(start).slice(0, 7) : isoDay(start));\n const starts = [...byPeriod.keys()].sort((a, b) => a - b);\n const out: { key: string; value: number }[] = [];\n for (let s = starts[0]!; s <= starts[starts.length - 1]!; s = nextPeriod(s, unit)) {\n const members = byPeriod.get(s);\n if (members) out.push({ key: label(s), value: aggregate(members, field, mode) });\n else if (fill) out.push({ key: label(s), value: 0 });\n if (out.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} periods`);\n }\n return out;\n },\n});\n\nexport const Cumulative = defineFunction({\n name: \"Cumulative\",\n description:\n 'Copy of the rows with field replaced by its running total (field \"\" for a list of numbers)',\n params: z.object({ rows: list(), field: z.string() }),\n returns: list(),\n fn: ({ rows, field }) => {\n let total = 0;\n return mapField(\n rows,\n field,\n rows.map((row) => (total += toNum(read(row, field)) ?? 0)),\n );\n },\n});\n\nexport const MovingAvg = defineFunction({\n name: \"MovingAvg\",\n description:\n 'Copy of the rows with field replaced by the average of its last window values (field \"\" for a list of numbers)',\n params: z.object({ rows: list(), field: z.string(), window: z.number() }),\n returns: list(),\n fn: ({ rows, field, window }) => {\n const w = Math.trunc(window);\n if (w < 1) throw new Error(\"window must be at least 1\");\n const values = rows.map((row) => toNum(read(row, field)) ?? 0);\n const averages = values.map((_, i) => {\n const span = values.slice(Math.max(0, i - w + 1), i + 1);\n return span.reduce((a, b) => a + b, 0) / span.length;\n });\n return mapField(rows, field, averages);\n },\n});\n\nexport const Change = defineFunction({\n name: \"Change\",\n description:\n \"Percent change from previous to current, e.g. @Change(120, 100) is 20; null when previous is 0\",\n params: z.object({ current: z.number(), previous: z.number() }),\n returns: z.number().nullable(),\n // No previous value is normal while data loads, so it is null without an error\n fn: ({ current, previous }) =>\n previous === 0 ? null : finite(((current - previous) / Math.abs(previous)) * 100),\n});\n\nexport const Histogram = defineFunction({\n name: \"Histogram\",\n description:\n \"Counts numbers into equal-width bins as {key, value} rows: key is the bin's start, value the count; min and max fix the range, default the data's\",\n params: z.object({\n values: numbers(),\n bins: z.number(),\n min: z.number().optional(),\n max: z.number().optional(),\n }),\n // Only key and value, as @GroupBy and @Bucket return: Chart plots every number key by default.\n returns: z.array(z.object({ key: z.string(), value: z.number() })),\n fn: ({ values: raw, bins, min, max }) => {\n const values = finiteOnly(raw);\n const n = Math.trunc(bins);\n if (n < 1 || n > 500) throw new Error(\"bins must be from 1 to 500\");\n const lo = min ?? (values.length ? Math.min(...values) : 0);\n let hi = max ?? (values.length ? Math.max(...values) : 1);\n if (hi <= lo) hi = lo + 1;\n const width = (hi - lo) / n;\n const decimals = Math.max(0, 1 - Math.floor(Math.log10(width)));\n const counts = new Array<number>(n).fill(0);\n for (const v of values) {\n if (v < lo || v > hi) continue;\n counts[Math.min(n - 1, Math.floor((v - lo) / width))]!++;\n }\n return counts.map((value, i) => ({\n key: String(Number((lo + i * width).toFixed(decimals))),\n value,\n }));\n },\n});\n\nexport const Stats = defineFunction({\n name: \"Stats\",\n description: \"Summary of numbers, all zeros for an empty list\",\n params: z.object({ values: numbers() }),\n returns: z.object({\n count: z.number(),\n min: z.number(),\n max: z.number(),\n mean: z.number(),\n median: z.number(),\n stdev: z.number(),\n }),\n fn: ({ values: raw }) => {\n const values = finiteOnly(raw);\n const count = values.length;\n if (!count) return { count: 0, min: 0, max: 0, mean: 0, median: 0, stdev: 0 };\n const sorted = [...values].sort((a, b) => a - b);\n const mean = values.reduce((a, b) => a + b, 0) / count;\n const mid = Math.floor(count / 2);\n const median = count % 2 ? sorted[mid]! : (sorted[mid - 1]! + sorted[mid]!) / 2;\n const stdev = Math.sqrt(values.reduce((a, v) => a + (v - mean) ** 2, 0) / count);\n return { count, min: sorted[0]!, max: sorted[count - 1]!, mean, median, stdev };\n },\n});\n\nexport const dataFunctions = [\n GroupBy,\n Pivot,\n Top,\n Between,\n Bucket,\n Cumulative,\n MovingAvg,\n Change,\n Histogram,\n Stats,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { list, MAX_ITEMS, read, same } from \"./helpers\";\n\nconst index = (i: number, length: number) => (i < 0 ? length + i : i);\n\nexport const Append = defineFunction({\n name: \"Append\",\n description: \"Copy of the list with item added at the end\",\n params: z.object({ list: list(), item: z.any() }),\n returns: list(),\n fn: ({ list, item }) => {\n if (list.length + 1 > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return [...list, item];\n },\n});\n\nexport const Prepend = defineFunction({\n name: \"Prepend\",\n description: \"Copy of the list with item added at the start\",\n params: z.object({ list: list(), item: z.any() }),\n returns: list(),\n fn: ({ list, item }) => {\n if (list.length + 1 > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return [item, ...list];\n },\n});\n\nexport const Concat = defineFunction({\n name: \"Concat\",\n description: \"Joins two lists\",\n params: z.object({ list: list(), more: list() }),\n returns: list(),\n fn: ({ list, more }) => {\n if (list.length + more.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return [...list, ...more];\n },\n});\n\nexport const Remove = defineFunction({\n name: \"Remove\",\n description:\n 'Copy without the items whose field equals value; field \"\" compares the items themselves',\n params: z.object({ list: list(), field: z.string(), value: z.any() }),\n returns: list(),\n fn: ({ list, field, value }) => list.filter((item) => !same(read(item, field), value)),\n});\n\nexport const RemoveAt = defineFunction({\n name: \"RemoveAt\",\n description: \"Copy without the item at index (0-based; negative counts from the end)\",\n params: z.object({ list: list(), index: z.number() }),\n returns: list(),\n fn: ({ list, index: at }) => {\n const i = index(Math.trunc(at), list.length);\n return list.filter((_, j) => j !== i);\n },\n});\n\nexport const Update = defineFunction({\n name: \"Update\",\n description: \"Copy where items whose field equals value get setField set to setValue\",\n params: z.object({\n list: list(),\n field: z.string(),\n value: z.any(),\n setField: z.string(),\n setValue: z.any(),\n }),\n returns: list(),\n fn: ({ list, field, value, setField, setValue }) =>\n list.map((item) =>\n item && typeof item === \"object\" && !Array.isArray(item) && same(read(item, field), value)\n ? { ...item, [setField]: setValue }\n : item,\n ),\n});\n\nexport const Toggle = defineFunction({\n name: \"Toggle\",\n description: \"Adds item if missing, removes it if present (a set of strings or numbers)\",\n params: z.object({ list: list(), item: z.any() }),\n returns: list(),\n fn: ({ list, item }) =>\n list.some((x) => same(x, item)) ? list.filter((x) => !same(x, item)) : [...list, item],\n});\n\nexport const Includes = defineFunction({\n name: \"Includes\",\n description: \"True if the list has item, or the text contains it\",\n params: z.object({ list: z.union([list(), z.string()]), item: z.any() }),\n returns: z.boolean(),\n fn: ({ list, item }) =>\n typeof list === \"string\"\n ? item != null && list.includes(String(item))\n : list.some((x) => same(x, item)),\n});\n\nexport const Find = defineFunction({\n name: \"Find\",\n description: \"First item whose field equals value, or null\",\n params: z.object({ list: list(), field: z.string(), value: z.any() }),\n returns: z.any(),\n fn: ({ list, field, value }) => list.find((item) => same(read(item, field), value)) ?? null,\n});\n\nexport const IndexOf = defineFunction({\n name: \"IndexOf\",\n description: \"Index of item in the list, or -1\",\n params: z.object({ list: list(), item: z.any() }),\n returns: z.number(),\n fn: ({ list, item }) => list.findIndex((x) => same(x, item)),\n});\n\nexport const Take = defineFunction({\n name: \"Take\",\n description: \"The first n items; a negative n takes the last n\",\n params: z.object({ list: list(), n: z.number() }),\n returns: list(),\n fn: ({ list, n }) => {\n const k = Math.trunc(n);\n return k >= 0 ? list.slice(0, k) : list.slice(k);\n },\n});\n\nexport const Slice = defineFunction({\n name: \"Slice\",\n description:\n \"Items, or characters of text, from start up to end (not included); negative counts from the end\",\n params: z.object({\n list: z.union([list(), z.string()]),\n start: z.number(),\n end: z.number().optional(),\n }),\n returns: z.union([list(), z.string()]),\n fn: ({ list, start, end }) => {\n const to = end === undefined ? undefined : Math.trunc(end);\n return typeof list === \"string\"\n ? list.slice(Math.trunc(start), to)\n : list.slice(Math.trunc(start), to);\n },\n});\n\nexport const Unique = defineFunction({\n name: \"Unique\",\n description: \"Distinct items in first-seen order\",\n params: z.object({ list: list() }),\n returns: list(),\n // Equal as @Includes and @Toggle see it (same): 1 matches \"1\", and object key order is ignored.\n fn: ({ list }) => {\n const primitives = new Set<string>();\n const objects: unknown[] = [];\n return list.filter((item) => {\n if (item === null || typeof item !== \"object\") {\n const key = String(item);\n if (primitives.has(key)) return false;\n primitives.add(key);\n return true;\n }\n if (objects.some((kept) => same(kept, item))) return false;\n objects.push(item);\n return true;\n });\n },\n});\n\nexport const Reverse = defineFunction({\n name: \"Reverse\",\n description: \"Copy in reverse order\",\n params: z.object({ list: list() }),\n returns: list(),\n fn: ({ list }) => [...list].reverse(),\n});\n\nexport const Range = defineFunction({\n name: \"Range\",\n description:\n \"Numbers from start up to end (not included) by step (default 1), e.g. @Range(0, 3) is [0, 1, 2]\",\n params: z.object({ start: z.number(), end: z.number(), step: z.number().optional() }),\n returns: z.array(z.number()),\n fn: ({ start, end, step = 1 }) => {\n if (step === 0 || !Number.isFinite(step)) throw new Error(\"step must be a non-zero number\");\n const count = Math.max(0, Math.ceil((end - start) / step));\n if (count > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n const whole = Number.isInteger(start) && Number.isInteger(step);\n // Rounding keeps fractional steps clean: 0.1 * 3 is 0.30000000000000004\n return Array.from({ length: count }, (_, i) =>\n whole ? start + i * step : Number((start + i * step).toPrecision(12)),\n );\n },\n});\n\nexport const Pick = defineFunction({\n name: \"Pick\",\n description:\n \"A random item, or null for an empty list; draws anew each time, so call it inside @Set\",\n params: z.object({ list: list() }),\n returns: z.any(),\n fn: ({ list }) => (list.length ? list[Math.floor(Math.random() * list.length)] : null),\n});\n\nexport const Shuffle = defineFunction({\n name: \"Shuffle\",\n description: \"Copy in random order; call it inside @Set\",\n params: z.object({ list: list() }),\n returns: list(),\n fn: ({ list }) => {\n const out = [...list];\n for (let i = out.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [out[i], out[j]] = [out[j], out[i]];\n }\n return out;\n },\n});\n\nexport const Flatten = defineFunction({\n name: \"Flatten\",\n description: \"One list from a list of lists, e.g. [[1, 2], [3]] is [1, 2, 3]\",\n params: z.object({ list: list() }),\n returns: list(),\n fn: ({ list }) => {\n const out = list.flatMap((item) => (Array.isArray(item) ? item : [item]));\n if (out.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return out;\n },\n});\n\nexport const Chunk = defineFunction({\n name: \"Chunk\",\n description: \"The list cut into lists of size items, e.g. for weeks of 7 days or pages\",\n params: z.object({ list: list(), size: z.number() }),\n returns: z.array(list()),\n fn: ({ list, size }) => {\n const n = Math.trunc(size);\n if (n < 1) throw new Error(\"size must be 1 or more\");\n const out: unknown[][] = [];\n for (let i = 0; i < list.length; i += n) out.push(list.slice(i, i + n));\n return out;\n },\n});\n\nexport const listFunctions = [\n Append,\n Prepend,\n Concat,\n Remove,\n RemoveAt,\n Update,\n Toggle,\n Includes,\n Find,\n IndexOf,\n Take,\n Slice,\n Unique,\n Reverse,\n Range,\n Pick,\n Shuffle,\n Flatten,\n Chunk,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { finite, numbers } from \"./helpers\";\n\nexport const Pow = defineFunction({\n name: \"Pow\",\n description: \"base raised to exponent\",\n params: z.object({ base: z.number(), exponent: z.number() }),\n returns: z.number(),\n fn: ({ base, exponent }) => finite(Math.pow(base, exponent)),\n});\n\nexport const Sqrt = defineFunction({\n name: \"Sqrt\",\n description: \"Square root; null for a negative number\",\n params: z.object({ number: z.number() }),\n returns: z.number().nullable(),\n // A negative number is an expected input, not an error, so it returns null without throwing.\n fn: ({ number }) => (number < 0 ? null : finite(Math.sqrt(number))),\n});\n\nexport const Random = defineFunction({\n name: \"Random\",\n description:\n \"Random number from min to max (integer true: a whole number, max included); draws anew each time, so call it inside @Set\",\n params: z.object({ min: z.number(), max: z.number(), integer: z.boolean().optional() }),\n returns: z.number(),\n fn: ({ min, max, integer }) => {\n if (!Number.isFinite(min) || !Number.isFinite(max))\n throw new Error(\"min and max must be numbers\");\n const lo = Math.min(min, max);\n const hi = Math.max(min, max);\n if (!integer) return lo + Math.random() * (hi - lo);\n const a = Math.ceil(lo);\n const b = Math.floor(hi);\n if (a > b) throw new Error(\"no whole number between min and max\");\n return a + Math.floor(Math.random() * (b - a + 1));\n },\n});\n\nexport const Clamp = defineFunction({\n name: \"Clamp\",\n description: \"number kept between min and max\",\n params: z.object({ number: z.number(), min: z.number(), max: z.number() }),\n returns: z.number(),\n fn: ({ number, min, max }) =>\n finite(Math.min(Math.max(number, Math.min(min, max)), Math.max(min, max))),\n});\n\nexport const Percent = defineFunction({\n name: \"Percent\",\n description: \"part / total * 100, e.g. @Percent(3, 4) is 75; 0 when total is 0\",\n params: z.object({ part: z.number(), total: z.number() }),\n returns: z.number(),\n fn: ({ part, total }) => (total === 0 ? 0 : finite((part / total) * 100)),\n});\n\nexport const Lerp = defineFunction({\n name: \"Lerp\",\n description: \"The value a fraction t of the way from a to b\",\n params: z.object({ a: z.number(), b: z.number(), t: z.number() }),\n returns: z.number(),\n fn: ({ a, b, t }) => finite(a + (b - a) * t),\n});\n\nexport const Allocate = defineFunction({\n name: \"Allocate\",\n description:\n \"Splits total in proportion to weights, rounded to decimals (default 2), so the parts add up to exactly total, e.g. @Allocate(100, [1, 1, 1]) is [33.34, 33.33, 33.33]\",\n params: z.object({ total: z.number(), weights: numbers(), decimals: z.number().optional() }),\n returns: z.array(z.number()),\n fn: ({ total, weights, decimals }) => {\n const sum = weights.reduce((a, b) => a + b, 0);\n if (!weights.length || weights.some((w) => !Number.isFinite(w) || w < 0))\n throw new Error(\"weights must be zero or more\");\n // All-zero weights (a day with nothing to split across) give all zeros\n if (sum === 0) return weights.map(() => 0);\n // Whole units (cents for 2 decimals); the leftover units go to the largest remainders\n const places = decimals !== undefined && Number.isFinite(decimals) ? decimals : 2;\n const scale = 10 ** Math.min(6, Math.max(0, Math.round(places)));\n const units = Math.round(Math.abs(total) * scale);\n const exact = weights.map((w) => (units * w) / sum);\n const parts = exact.map(Math.floor);\n let left = units - parts.reduce((a, b) => a + b, 0);\n const order = exact\n .map((x, i) => ({ i, rest: x - Math.floor(x) }))\n .sort((a, b) => b.rest - a.rest || a.i - b.i);\n for (const { i } of order) {\n if (left <= 0) break;\n parts[i] += 1;\n left -= 1;\n }\n return parts.map((p) => (total < 0 ? -p : p) / scale);\n },\n});\n\nexport const Payment = defineFunction({\n name: \"Payment\",\n description:\n \"Payment per period that repays principal over periods at rate percent per period, e.g. a 30-year loan at 6% a year: @Payment(300000, 6 / 12, 360)\",\n params: z.object({ principal: z.number(), rate: z.number(), periods: z.number() }),\n returns: z.number(),\n fn: ({ principal, rate, periods }) => {\n if (!(periods > 0)) throw new Error(\"periods must be positive\");\n const r = rate / 100;\n return finite(\n r === 0 ? principal / periods : (principal * r) / (1 - Math.pow(1 + r, -periods)),\n );\n },\n});\n\n// Units per kind, as the factor to the kind's base unit (m, kg, l, m/s)\nconst UNITS: Record<string, [string, number]> = {\n mm: [\"length\", 0.001],\n cm: [\"length\", 0.01],\n m: [\"length\", 1],\n km: [\"length\", 1000],\n in: [\"length\", 0.0254],\n ft: [\"length\", 0.3048],\n yd: [\"length\", 0.9144],\n mi: [\"length\", 1609.344],\n mg: [\"mass\", 1e-6],\n g: [\"mass\", 0.001],\n kg: [\"mass\", 1],\n oz: [\"mass\", 0.028349523125],\n lb: [\"mass\", 0.45359237],\n st: [\"mass\", 6.35029318],\n ml: [\"volume\", 0.001],\n l: [\"volume\", 1],\n tsp: [\"volume\", 0.00492892159375],\n tbsp: [\"volume\", 0.0147867647812],\n floz: [\"volume\", 0.0295735295625],\n cup: [\"volume\", 0.2365882365],\n pt: [\"volume\", 0.473176473],\n qt: [\"volume\", 0.946352946],\n gal: [\"volume\", 3.785411784],\n \"m/s\": [\"speed\", 1],\n \"km/h\": [\"speed\", 1 / 3.6],\n mph: [\"speed\", 0.44704],\n kn: [\"speed\", 0.514444],\n m2: [\"area\", 1],\n km2: [\"area\", 1e6],\n ft2: [\"area\", 0.09290304],\n ha: [\"area\", 10000],\n acre: [\"area\", 4046.8564224],\n};\nconst TEMPS = [\"c\", \"f\", \"k\"];\nconst toCelsius = (v: number, u: string) =>\n u === \"f\" ? ((v - 32) * 5) / 9 : u === \"k\" ? v - 273.15 : v;\nconst fromCelsius = (v: number, u: string) =>\n u === \"f\" ? (v * 9) / 5 + 32 : u === \"k\" ? v + 273.15 : v;\n\nexport const Convert = defineFunction({\n name: \"Convert\",\n description:\n \"value from one unit to another: mm cm m km in ft yd mi; mg g kg oz lb st; ml l tsp tbsp floz cup pt qt gal (US); m/s km/h mph kn; m2 km2 ft2 ha acre; c f k\",\n params: z.object({ value: z.number(), from: z.string(), to: z.string() }),\n returns: z.number(),\n fn: ({ value, from, to }) => {\n const [a, b] = [from.trim().toLowerCase(), to.trim().toLowerCase()];\n if (TEMPS.includes(a) && TEMPS.includes(b)) return finite(fromCelsius(toCelsius(value, a), b));\n const [ua, ub] = [UNITS[a], UNITS[b]];\n if (!ua || !ub || ua[0] !== ub[0]) throw new Error(`cannot convert ${from} to ${to}`);\n return finite((value * ua[1]) / ub[1]);\n },\n});\n\nexport const numberFunctions = [\n Pow,\n Sqrt,\n Random,\n Clamp,\n Percent,\n Lerp,\n Allocate,\n Payment,\n Convert,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { list, MAX_ITEMS, read } from \"./helpers\";\n\nconst LOCALE = \"en-US\";\n\nfunction currencyCode(code: string | undefined): string {\n const upper = (code ?? \"USD\").toUpperCase();\n return /^[A-Z]{3}$/.test(upper) ? upper : \"USD\";\n}\n\n/** Formats with Intl; an unknown currency code falls back to USD instead of throwing. */\nfunction format(value: number, options: Intl.NumberFormatOptions): string {\n try {\n return value.toLocaleString(LOCALE, options);\n } catch {\n return value.toLocaleString(LOCALE, { ...options, currency: \"USD\" });\n }\n}\n\nexport const Format = defineFunction({\n name: \"Format\",\n description:\n 'Number as text: \"number\" 12,345.6, \"currency\" $12,345.68 (currency is a code like \"EUR\"), \"percent\" 45 -> 45%, \"compact\" 1.2M ($1.2M with a currency)',\n params: z.object({\n value: z.number(),\n kind: z.enum([\"number\", \"currency\", \"percent\", \"compact\"]).optional(),\n decimals: z.number().optional(),\n currency: z.string().optional(),\n }),\n returns: z.string(),\n fn: ({ value, kind = \"number\", decimals, currency }) => {\n if (!Number.isFinite(value)) throw new Error(\"value is not a finite number\");\n const d = decimals === undefined ? undefined : Math.min(Math.max(Math.trunc(decimals), 0), 10);\n // decimals caps the digits; only currency pads to it, so 600 never reads \"600.0\".\n const digits = (fallbackMax: number, fallbackMin = 0) =>\n d === undefined\n ? { minimumFractionDigits: fallbackMin, maximumFractionDigits: fallbackMax }\n : { minimumFractionDigits: fallbackMin && d, maximumFractionDigits: d };\n switch (kind) {\n case \"currency\":\n return format(value, {\n style: \"currency\",\n currency: currencyCode(currency),\n ...digits(2, 2),\n });\n case \"percent\":\n return `${format(value, digits(1))}%`;\n case \"compact\":\n return format(value, {\n notation: \"compact\",\n ...digits(1),\n ...(currency ? { style: \"currency\", currency: currencyCode(currency) } : {}),\n });\n default:\n return format(value, digits(2));\n }\n },\n});\n\nexport const Join = defineFunction({\n name: \"Join\",\n description: 'Joins the items (or their field) into text with sep (default \", \"), skipping nulls',\n params: z.object({ list: list(), sep: z.string().optional(), field: z.string().optional() }),\n returns: z.string(),\n fn: ({ list, sep = \", \", field = \"\" }) =>\n list\n .map((item) => read(item, field))\n .filter((v) => v != null)\n .map((v) => (typeof v === \"object\" ? JSON.stringify(v) : String(v)))\n .join(sep),\n});\n\nexport const Plural = defineFunction({\n name: \"Plural\",\n description:\n 'Count and word: @Plural(1, \"guest\") is \"1 guest\", 3 gives \"3 guests\"; plural defaults to word + \"s\"',\n params: z.object({ n: z.number(), word: z.string(), plural: z.string().optional() }),\n returns: z.string(),\n fn: ({ n, word, plural }) =>\n `${format(n, { maximumFractionDigits: 2 })} ${Math.abs(n) === 1 ? word : (plural ?? `${word}s`)}`,\n});\n\nexport const Pad = defineFunction({\n name: \"Pad\",\n description: 'Pads the start of value to length with char (default \"0\"), e.g. 7 -> \"07\"',\n params: z.object({\n value: z.union([z.string(), z.number()]),\n length: z.number(),\n char: z.string().optional(),\n }),\n returns: z.string(),\n fn: ({ value, length, char = \"0\" }) =>\n String(value).padStart(Math.min(Math.trunc(length), 1000), char || \"0\"),\n});\n\nexport const Upper = defineFunction({\n name: \"Upper\",\n description: \"Text in upper case\",\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) => text.toUpperCase(),\n});\n\nexport const Lower = defineFunction({\n name: \"Lower\",\n description: \"Text in lower case\",\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) => text.toLowerCase(),\n});\n\nexport const Trim = defineFunction({\n name: \"Trim\",\n description: \"Text without spaces at the start and end\",\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) => text.trim(),\n});\n\nexport const Capitalize = defineFunction({\n name: \"Capitalize\",\n description: 'Each word with a capital first letter, e.g. \"new york\" is \"New York\"',\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) =>\n text.replace(\n /(^|[\\s\\-(/\"])(\\p{L})/gu,\n (_, before: string, letter: string) => before + letter.toUpperCase(),\n ),\n});\n\nexport const Split = defineFunction({\n name: \"Split\",\n description:\n 'List of the parts of text between sep (default \",\"), each trimmed, empty parts dropped, e.g. @Split(\"a, b,,c\") is [\"a\", \"b\", \"c\"]',\n params: z.object({ text: z.string(), sep: z.string().optional() }),\n returns: z.array(z.string()),\n fn: ({ text, sep = \",\" }) => {\n const parts = text\n .split(sep === \"\" ? \"\" : sep)\n .map((p) => p.trim())\n .filter((p) => p !== \"\");\n if (parts.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return parts;\n },\n});\n\nexport const Replace = defineFunction({\n name: \"Replace\",\n description: \"Text with every find replaced by replacement\",\n params: z.object({ text: z.string(), find: z.string(), replacement: z.string() }),\n returns: z.string(),\n fn: ({ text, find, replacement }) => (find === \"\" ? text : text.split(find).join(replacement)),\n});\n\nexport const Duration = defineFunction({\n name: \"Duration\",\n description: 'Seconds as text: \"short\" 1h 20m, 4m 05s, 45s (default); \"clock\" 1:20:00, 4:05',\n params: z.object({ seconds: z.number(), style: z.enum([\"short\", \"clock\"]).optional() }),\n returns: z.string(),\n fn: ({ seconds, style = \"short\" }) => {\n if (!Number.isFinite(seconds)) throw new Error(\"seconds is not a finite number\");\n const sign = seconds < 0 ? \"-\" : \"\";\n const total = Math.round(Math.abs(seconds));\n const [h, m, s] = [Math.floor(total / 3600), Math.floor((total % 3600) / 60), total % 60];\n const two = (n: number) => String(n).padStart(2, \"0\");\n if (style === \"clock\") return sign + (h ? `${h}:${two(m)}:${two(s)}` : `${m}:${two(s)}`);\n if (h) return `${sign}${h}h${m ? ` ${m}m` : \"\"}`;\n if (m) return `${sign}${m}m${s ? ` ${two(s)}s` : \"\"}`;\n return `${sign}${s}s`;\n },\n});\n\nexport const Default = defineFunction({\n name: \"Default\",\n description:\n 'value, or fallback when value is null, \"\" or not a number, e.g. an empty number input: @Default($weight, 0)',\n params: z.object({ value: z.any().optional(), fallback: z.any() }),\n returns: z.any(),\n // Annotated explicitly: z.any() params give defineFunction nothing to infer\n // from, and older @openuidev/react-lang then reports an implicit any here.\n fn: ({ value, fallback }: { value?: unknown; fallback: unknown }) =>\n value == null || value === \"\" || (typeof value === \"number\" && Number.isNaN(value))\n ? fallback\n : value,\n});\n\nexport const textFunctions = [\n Format,\n Join,\n Plural,\n Pad,\n Upper,\n Lower,\n Trim,\n Capitalize,\n Split,\n Replace,\n Duration,\n Default,\n];\n","import { colorFunctions } from \"./colors\";\nimport { dataFunctions } from \"./data\";\nimport { dateFunctions } from \"./dates\";\nimport { listFunctions } from \"./lists\";\nimport { numberFunctions } from \"./numbers\";\nimport { textFunctions } from \"./text\";\n\n/**\n * Generic functions the model calls as @Name(args) to compute inside a page:\n * edit lists held in $variables, do the math, format text and dates, and\n * shape Query rows for charts. They are pure except @Random, @Pick, @Shuffle,\n * @Now and @Today. Bad arguments, or a throw, make a call evaluate to null.\n */\nexport const functions = [\n ...listFunctions,\n ...numberFunctions,\n ...textFunctions,\n ...colorFunctions,\n ...dateFunctions,\n ...dataFunctions,\n];\n","import { createLibrary, type ComponentGroup, type Library } from \"@wodecorp/openui-vue-lang\";\nimport { intelligentComponents } from \"./defineComponents\";\nimport { functions } from \"./functions\";\n\nexport const componentGroups: ComponentGroup[] = [\n {\n name: \"Layout\",\n components: [\"Col\", \"Row\", \"Box\", \"Grid\", \"Card\", \"Carousel\", \"Popover\", \"Divider\", \"Spacer\"],\n notes: [\n '- gap and padding count 4px steps. Length is px or a CSS length like \"50%\". Radius is \"sm\", \"md\", \"lg\", \"xl\", \"full\" or px.',\n '- Color is \"ink\", \"muted\", \"faint\", \"surface\", \"info\", \"success\", \"warning\", \"danger\", \"purple\", \"pink\", \"chart1\" to \"chart6\", or a CSS color. As a background, status colors are soft tints.',\n ],\n },\n {\n name: \"Text\",\n components: [\n \"Title\",\n \"Text\",\n \"Caption\",\n \"Label\",\n \"Badge\",\n \"Link\",\n \"List\",\n \"ListItem\",\n \"Markdown\",\n \"Quote\",\n \"Code\",\n \"Math\",\n ],\n },\n {\n name: \"Inputs\",\n components: [\n \"Button\",\n \"IconButton\",\n \"Pressable\",\n \"Input\",\n \"TextArea\",\n \"Select\",\n \"SegmentedControl\",\n \"Slider\",\n \"Checkbox\",\n \"RadioGroup\",\n \"DatePicker\",\n \"Timer\",\n \"Form\",\n ],\n notes: [\n \"- An input's first argument is its value, usually a $variable that other statements read.\",\n '- Every input either changes something shown on the page, or sits in a Form whose submit Button sends a short first-person @ToAssistant (\"Help me choose a bike\"); the form values go with it. No dead inputs.',\n '- In a Form, a field\\'s last argument rules is checked before the form sends, and an error shows under the field. Rules is {required?, min?, max?, minLength?, maxLength?, email?, url?, numeric?, pattern?}: Input($email, \"Email\", \"text\", null, {required: true, email: true}).',\n ],\n },\n {\n name: \"Media and data\",\n components: [\"Image\", \"Icon\", \"Table\", \"Chart\", \"YouTube\"],\n },\n { name: \"Play\", components: [\"Flashcard\", \"Celebration\"] },\n {\n name: \"Drawing\",\n components: [\n \"Svg\",\n \"G\",\n \"Circle\",\n \"Ellipse\",\n \"Rect\",\n \"Line\",\n \"Path\",\n \"Polyline\",\n \"Polygon\",\n \"SvgText\",\n \"HtmlView\",\n ],\n },\n];\n\nexport const library: Required<Library> = createLibrary({\n root: \"Col\",\n components: intelligentComponents,\n functions,\n componentGroups,\n});\n","import type { PromptOptions } from \"@wodecorp/openui-vue-lang\";\n\n/**\n * Prompt options that teach the model to answer with working tools: the page\n * holds its inputs and lists in $variables and computes with @functions, so\n * it works without sending anything back to the assistant.\n */\n\nexport const exampleShoppingList = `root = Col([title, card])\ncard = Card([stepper, list, clear])\n$guests = 4\n$got = []\ntitle = Title(\"Pasta night for \" + @Plural($guests, \"guest\"), \"lg\")\nstepper = Row([IconButton(\"minus\", @Set($guests, @Clamp($guests - 1, 1, 20)), \"Fewer\"), Text($guests + \"\", \"lg\", null, \"semibold\"), IconButton(\"plus\", @Set($guests, @Clamp($guests + 1, 1, 20)), \"More\")], 3)\nlines = @Each(base, \"i\", {name: i.name, qty: @Round(i.qty * $guests / 4) + i.unit})\nlist = Col(@Each(lines, \"l\", Pressable([Row([Icon(@Includes($got, l.name) ? \"check-circle\" : \"circle\", \"sm\"), Text(l.qty + \" \" + l.name, \"sm\", null, null, false, @Includes($got, l.name))], 2)], @Set($got, @Toggle($got, l.name)), @Includes($got, l.name), 2)), 1)\nclear = Button(\"Clear ticks\", @Set($got, []), \"outline\", null, \"sm\", \"rotate-ccw\", @Count($got) == 0)\nbase = [{name: \"spaghetti\", qty: 400, unit: \" g\"}, {name: \"tomatoes\", qty: 6, unit: \"\"}, {name: \"parmesan\", qty: 80, unit: \" g\"}]`;\n\nexport const exampleTrip = `root = Col([title, intro, facts, Title(\"Day by day\", \"md\"), days, prefs])\n$pace = \"Relaxed\"\ntitle = Title(\"Three days in Lisbon\", \"xl\")\nintro = Text(\"Hills, tiled facades and the Tagus: start in **Alfama**, give a day to Belém, then take the train to Sintra.\")\nfacts = Row([Badge(\"Best in April to June\"), Badge(\"Tram 28\", \"info\"), Badge(\"About €120 a day\", \"success\")], 2, null, null, true)\ndays = Col(@Each(plan, \"d\", Card([Row([Badge(\"Day \" + d.day, \"info\"), Text(d.title, \"md\", null, \"semibold\")], 2), Text([Icon(\"map-pin\", \"sm\"), \" \" + d.place], \"sm\"), Text(d.text, \"sm\", \"muted\")], \"soft\")), 3)\nprefs = Card([Title(\"Make it yours\", \"sm\"), Form([RadioGroup($pace, [\"Relaxed\", \"Packed\"], \"Pace\", \"pills\"), Button(\"Plan my trip\", @ToAssistant(\"Tailor my Lisbon trip\"))])], \"soft\")\nplan = [{day: 1, title: \"Alfama\", place: \"São Jorge Castle\", text: \"Climb to the castle, then lunch on grilled sardines.\"}, {day: 2, title: \"Belém\", place: \"Jerónimos Monastery\", text: \"The monastery, the tower and pastéis de Belém.\"}, {day: 3, title: \"Sintra\", place: \"Pena Palace\", text: \"Train from Rossio; book the palace for 9 AM.\"}]`;\n\nexport const exampleSteps = `root = Col([head, viewer, strip])\n$step = 0\nhead = Col([Title(\"Build a small bookcase\", \"xl\"), Text(\"Four steps and about 30 minutes. You need the Allen key from the box and a hammer.\", \"md\", \"muted\")], 2)\nsteps = [{title: \"Lay out the parts\", text: \"Two sides, the top, one shelf and the bottom. Tap the 12 wooden dowels into the holes on the sides.\"}, {title: \"Fix the boards to one side\", text: \"Push the top, shelf and bottom onto one side's dowels, then turn each cam lock clockwise until it pulls tight.\"}, {title: \"Add the other side\", text: \"Fit the second side onto the free dowels and tighten its cam locks the same way.\"}, {title: \"Nail on the back\", text: \"Lay it face down, check the corners are square, then nail the back panel about every 10 cm.\"}]\ns0 = Svg([Rect(16, 20, 22, 120, \"surface\", \"ink\", 2), Rect(48, 20, 22, 120, \"surface\", \"ink\", 2), Rect(100, 28, 120, 16, \"surface\", \"ink\", 2), Rect(100, 68, 120, 16, \"surface\", \"ink\", 2), Rect(100, 108, 120, 16, \"surface\", \"ink\", 2), Circle(27, 36, 3, \"chart1\"), Circle(27, 80, 3, \"chart1\"), Circle(27, 124, 3, \"chart1\"), SvgText(\"Sides\", 43, 154, 11, \"muted\", \"middle\"), SvgText(\"Top\", 160, 22, 11, \"muted\", \"middle\"), SvgText(\"Shelf\", 160, 62, 11, \"muted\", \"middle\"), SvgText(\"Bottom\", 160, 102, 11, \"muted\", \"middle\")], \"0 0 240 160\", \"The parts: two sides, a top, a shelf and a bottom\")\ns1 = Svg([Rect(40, 16, 18, 128, \"surface\", \"ink\", 2), Rect(58, 16, 130, 14, \"surface\", \"ink\", 2), Rect(58, 72, 130, 14, \"surface\", \"ink\", 2), Rect(58, 130, 130, 14, \"surface\", \"ink\", 2), Circle(68, 23, 4, \"info\"), Circle(68, 79, 4, \"info\"), Circle(68, 137, 4, \"info\"), Line(212, 79, 196, 79, \"info\", 2), Polygon(\"192,79 200,74 200,84\", \"info\"), SvgText(\"Cam lock\", 74, 104, 11, \"info\")], \"0 0 240 160\", \"Cam locks join the top, shelf and bottom to one side\")\ns2 = Svg([Rect(40, 16, 18, 128, \"surface\", \"ink\", 2), Rect(58, 16, 130, 14, \"surface\", \"ink\", 2), Rect(58, 72, 130, 14, \"surface\", \"ink\", 2), Rect(58, 130, 130, 14, \"surface\", \"ink\", 2), Rect(196, 16, 18, 128, \"surface\", \"info\", 2), Line(232, 80, 220, 80, \"info\", 2), Polygon(\"216,80 224,75 224,85\", \"info\")], \"0 0 240 160\", \"The second side slides onto the panels\")\ns3 = Svg([Rect(40, 16, 160, 128, \"#EFE9DF\", \"ink\", 2), Rect(40, 16, 160, 14, \"surface\", \"ink\", 2), Rect(40, 72, 160, 14, \"surface\", \"ink\", 2), Rect(40, 130, 160, 14, \"surface\", \"ink\", 2), Circle(48, 50, 2.5, \"ink\"), Circle(192, 50, 2.5, \"ink\"), Circle(48, 108, 2.5, \"ink\"), Circle(192, 108, 2.5, \"ink\"), SvgText(\"Back panel\", 120, 56, 11, \"muted\", \"middle\")], \"0 0 240 160\", \"The back panel nailed to the frame\")\ndrawings = [s0, s1, s2, s3]\nviewer = Card([Row([Badge(\"Step \" + ($step + 1) + \" of 4\", \"info\"), Spacer(), Caption(@Format(@Percent($step + 1, 4), \"percent\") + \" done\")], 2), Box([drawings[$step]], null, null, 3, \"surface\", \"lg\"), Title(steps[$step].title, \"md\"), Text(steps[$step].text, \"sm\"), Row([Button(\"Back\", @Set($step, @Clamp($step - 1, 0, 3)), \"outline\", null, null, \"arrow-left\", $step == 0), Spacer(), Button(\"Next step\", @Set($step, @Clamp($step + 1, 0, 3)), \"solid\", null, null, \"arrow-right\", $step == 3)], 2)], null, null, 4)\nstrip = Grid(@Each(@Range(0, 4), \"i\", Pressable([drawings[i], Caption((i + 1) + \". \" + steps[i].title)], @Set($step, i), i == $step, 2)), 4, 110, 2)`;\n\nexport const additionalRules = [\n \"Compose the answer like a page, not a form letter: a Title, a short Text, then a mix of blocks that show the content. Row, Grid and Carousel to set things side by side; Badge rows for quick facts; Card only to group a block; Popover for an aside.\",\n \"Use Image only with a URL the user or a tool gave in this conversation. Never write an image URL yourself, even for a famous place or product: it will often be wrong. Without a URL, show the subject with an Icon, Badges or an Svg drawing instead.\",\n \"Spacing is a system with three tiers that always nest: inner (gap 1-2, 4-8px) for a title with its subtitle, tags or line; group (gap 3-4, 12-16px) between blocks inside a Card or grid cell; section (24px) between the blocks of the page. Leave gap unset on the page's root Col and on a Card's own contents: the app applies these tiers. Set it on a Row, a Grid or an inner Col. Never use one gap for everything, and never a gap larger than the section gap.\",\n 'A photo beside text is a media row: Row([Box([Image(url, alt, 1.33)]), Col([Title(..., \"md\"), Row([Badge(...), Badge(...)], 1, null, null, true), Text(..., \"sm\")], 2)], 4, \"start\"). The app sizes the photo to a third of the row (at most 200px) and top-aligns the text. Facts are Badges, never Buttons or boxed pills.',\n 'Keep cards compact and scannable: Title \"md\" for a card heading (xl or 2xl only for a single big number), Text \"sm\" for the body, at most one short paragraph, then facts as Badges or label/value rows (Caption label, Spacer, Text value). Don\\'t write bold-lead paragraphs like \"**Weekend rhythm:** ...\" or long prose in a card. Cards side by side in a Grid share the same blocks in the same order and the same Image aspect ratio, so they line up. For example: c = Card([Col([Title(\"Sonoma\", \"md\"), Row([Badge(\"1 h drive\", null, \"car\"), Badge(\"Wine country\", \"purple\")], 1, null, null, true)], 2), Text(\"A slow plaza, tasting rooms and quiet back roads.\", \"sm\"), Col([Row([Caption(\"Best for\"), Spacer(), Text(\"Food and wine\", \"sm\")]), Row([Caption(\"Trade-off\"), Spacer(), Text(\"Tastings add up\", \"sm\")])], 1)])',\n \"Answer with a working tool whenever the request involves numbers, choices, lists, steps, a game or something to explore: keep inputs and lists in $variables, compute everything shown from them with expressions and @functions, and change them with @Set. The page must work on its own, without another message.\",\n \"When the request leaves out a detail the answer depends on (a model, a size, a count), don't stop to ask: assume the most common case, say so in one short line, and build the whole answer, with a SegmentedControl or Select to switch to the other cases where they differ.\",\n 'Use @ToAssistant only for what the page cannot compute: a Form\\'s submit Button, or a new request (\"Plan another day\"). Its message is short and first person, like the user typing it (\"Help me choose a bike\"); the form values travel with it, so never repeat them in the message.',\n \"$variable defaults are literals (numbers, strings, lists, objects), never expressions or @calls. Edit lists with @Append, @Remove, @RemoveAt and @Update; track selections with @Toggle and @Includes.\",\n \"cond ? a : b also picks between components; there is no @If. Use only the listed @functions; you cannot define your own.\",\n 'Derive rows once in a statement with @Each(list, \"x\", {...}), then reuse them in @Each, Table, Chart, @Sum(rows.field) and @Join. @Each(@Range(0, n), \"i\", ...) builds a series or repeats a step.',\n \"@Random, @Pick and @Shuffle give a new value on every evaluation: call them inside @Set, so a click draws once and the page stays still.\",\n \"Pick the medium that shows the idea: Chart for numbers across time or categories; Svg drawings for shapes, parts and movement; Table for comparisons; Flashcard and Celebration for learning and games; HtmlView only for a game or animation that needs a loop.\",\n \"Draw with Svg whenever the user would otherwise have to picture it: assembly and how-to steps (a simple drawing for each step, like an instruction leaflet), knots and folds, how a machine, mechanism or the body works, geometry and science diagrams, the layout of a room, garden or board, chord and clock faces. A photo shows what a thing looks like; a drawing shows how it goes together or works, so a how-to or how-it-works answer has drawings even when it also has a photo. Keep each drawing simple: a viewBox about 240 wide, a dozen or so shapes in the listed colors with SvgText labels, a Line with a small Polygon head for an arrow, and let $variables such as the current step drive it.\",\n 'Format money, percentages and big numbers with @Format, counts with @Plural and dates with @FormatDate. @Percent is unrounded, so show it as @Format(@Percent(part, total), \"percent\"), never @Percent(...) + \"%\".',\n \"Dates relative to now (today, this week, next month) start from @Today(), never a fixed date. <, >, <= and >= compare numbers only, so order two dates with @DaysBetween(a, b) > 0.\",\n 'To change a page from an earlier answer, keep its $variable names and start them from that answer\\'s \"context and form values\", so what the user typed, added or ticked carries over.',\n \"Read a number input for a count or amount through @Default and @Clamp with a sensible minimum, e.g. @Clamp(@Default($people, 1), 1, 50), so 0, empty or negative cannot divide by zero or zero out the page.\",\n \"Answer a plain knowledge or safety question with Markdown text, adding a Quote only where it helps.\",\n];\n\nexport const examples = [\n `Example 1: A guest stepper that rescales a shopping list, with a checklist and a button that clears it:\\n\\n${exampleShoppingList}`,\n `Example 2: A composed trip answer: facts, day cards and a short form:\\n\\n${exampleTrip}`,\n `Example 3: Step-by-step instructions with a drawing for each step, driven by $step:\\n\\n${exampleSteps}`,\n];\n\n/** The chat prompt: no tools, $variables and functions. */\nexport const promptOptions: PromptOptions = {\n bindings: true,\n additionalRules,\n examples,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,SAAS;CACpB,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OACE;CACF,SACE;CACF,SACE;CACF,eACE;CACF,KAAK;CACL,UACE;CACF,OAAO;CACP,OACE;CACF,OACE;CACF,QACE;CACF,cACE;CACF,YACE;CACF,YACE;CACF,OACE;CACF,OACE;CACF,YACE;CACF,WACE;CACF,gBACE;CACF,QACE;CACF,UACE;CACF,MAAM;CACN,UACE;CACF,SACE;CACF,aACE;CACF,SACE;CACF,aACE;CACF,QACE;CACF,YACE;CACF,QACE;CACF,YACE;CACF,MAAM;CACN,UACE;CACF,kBACE;CACF,c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AAO,UAAU,YAAY,OAAO,MAAM,KAAK,IAC7E,WACA;CACR,CAcE;AACF;;;;;;;;AC5LA,MAAa,YAAY;CACvB,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;;AChBA,MAAa,kBAAoC;CAC/C;EACE,MAAM;EACN,YAAY;GAAC;GAAO;GAAO;GAAO;GAAQ;GAAQ;GAAY;GAAW;GAAW;EAAQ;EAC5F,OAAO,CACL,2IACA,uNACF;CACF;CACA;EACE,MAAM;EACN,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EACE,MAAM;EACN,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO;GACL;GACA;GACA;EACF;CACF;CACA;EACE,MAAM;EACN,YAAY;GAAC;GAAS;GAAQ;GAAS;GAAS;EAAS;CAC3D;CACA;EAAE,MAAM;EAAQ,YAAY,CAAC,aAAa,aAAa;CAAE;CACzD;EACE,MAAM;EACN,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;AACF;AAEA,MAAa,WAAA,GAA6BC,0BAAAA,cAAAA,CAAc;CACtD,MAAM;CACN,YAAY;CACZ;CACA;AACF,CAAC;;;;;;;ACzED,MAAa,sBAAsB;;;;;;;;;;AAWnC,MAAa,cAAc;;;;;;;;AAS3B,MAAa,eAAe;;;;;;;;;;;AAY5B,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,MAAa,WAAW;CACtB,8GAA8G;CAC9G,4EAA4E;CAC5E,0FAA0F;AAC5F;;AAGA,MAAa,gBAA+B;CAC1C,UAAU;CACV;CACA;AACF"}
1
+ {"version":3,"file":"index.cjs","names":["inject","defineComponent","useComponentsTheme","computed","onMounted","onUpdated","onBeforeUnmount","useId","provide","h","ComponentsThemeProvider","defineComponent","shallowRef","watch","getIconImport","h","z","defineComponent","h","z","tagSchemaId","h","z","defineComponent","h","ACTION_STEPS","useTriggerAction","useFormName","useFormValidation","computed","parseStructuredRules","toValue","watchEffect","onScopeDispose","useId","h","z","z","action","vueComponent","useIsStreaming","h","defineComponent","z","defineComponent","h","z","defineComponent","h","z","defineComponent","h","z","vueComponent","useIsStreaming","ref","watch","h","defineComponent","z","vueComponent","h","PieChart","ScatterChart","LineChart","AreaChart","BarChart","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","CodeBlock","z","vueComponent","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","vueComponent","ref","h","defineComponent","z","vueComponent","useId","useCreateFormValidation","provide","FormValidationContext","FormNameContext","h","defineComponent","z","defineComponent","h","useTheme","computed","z","vueComponent","useIsStreaming","ref","computed","onMounted","onBeforeUnmount","h","defineComponent","z","defineComponent","h","z","action","vueComponent","useIsStreaming","h","defineComponent","z","vueComponent","ref","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","defineComponent","h","z","h","defineComponent","z","defineComponent","h","MarkDownRenderer","z","defineComponent","katex","h","z","vueComponent","ref","h","defineComponent","z","action","vueComponent","useIsStreaming","ref","h","defineComponent","z","defineComponent","h","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","defineComponent","h","z","vueComponent","provide","h","inject","defineComponent","Fragment","z","defineComponent","h","z","defineComponent","h","z","reactive","vueComponent","useStateField","useIsStreaming","h","defineComponent","z","reactive","vueComponent","useStateField","useIsStreaming","ref","onBeforeUnmount","h","defineComponent","z","defineComponent","h","z","defineComponent","h","defineFunction","z","z","defineFunction","z","z","defineFunction","defineFunction","z","defineFunction","z","defineFunction","z","createLibrary"],"sources":["../src/shared/tokens.ts","../src/components/defaultThemes.ts","../src/components/ThemeProvider.ts","../src/shared/props.ts","../src/components/LucideIcon.ts","../src/shared/text.ts","../src/lib/Badge/schema.ts","../src/lib/Badge/index.ts","../src/shared/color.ts","../src/shared/url.ts","../src/lib/schemas.ts","../src/lib/Box/schema.ts","../src/lib/Box/index.ts","../src/lib/controls.ts","../src/lib/Button/schema.ts","../src/lib/Button/index.ts","../src/lib/Caption/schema.ts","../src/lib/Caption/index.ts","../src/lib/Card/schema.ts","../src/lib/Card/index.ts","../src/lib/Carousel/schema.ts","../src/lib/Carousel/index.ts","../src/lib/Celebration/schema.ts","../src/lib/Celebration/index.ts","../src/lib/Chart/schema.ts","../src/lib/Chart/index.ts","../src/lib/Checkbox/schema.ts","../src/lib/Checkbox/index.ts","../src/lib/Code/schema.ts","../src/lib/Code/index.ts","../src/lib/Col/schema.ts","../src/lib/Col/index.ts","../src/lib/DatePicker/schema.ts","../src/lib/DatePicker/index.ts","../src/lib/Divider/schema.ts","../src/lib/Divider/index.ts","../src/lib/Flashcard/schema.ts","../src/lib/Flashcard/index.ts","../src/lib/Form/schema.ts","../src/lib/Form/index.ts","../src/lib/Grid/schema.ts","../src/lib/Grid/index.ts","../src/shared/useThemeMode.ts","../src/lib/HtmlView/schema.ts","../src/lib/HtmlView/index.ts","../src/lib/Icon/schema.ts","../src/lib/Icon/index.ts","../src/lib/IconButton/schema.ts","../src/lib/IconButton/index.ts","../src/lib/Image/schema.ts","../src/lib/Image/index.ts","../src/lib/Input/schema.ts","../src/lib/Input/index.ts","../src/lib/Label/schema.ts","../src/lib/Label/index.ts","../src/lib/Link/schema.ts","../src/lib/Link/index.ts","../src/lib/List/schema.ts","../src/lib/List/index.ts","../src/lib/Markdown/schema.ts","../src/lib/Markdown/index.ts","../src/lib/Math/schema.ts","../src/lib/Math/index.ts","../src/lib/Popover/schema.ts","../src/lib/Popover/index.ts","../src/lib/Pressable/schema.ts","../src/lib/Pressable/index.ts","../src/lib/Quote/schema.ts","../src/lib/Quote/index.ts","../src/lib/RadioGroup/schema.ts","../src/lib/RadioGroup/index.ts","../src/lib/Row/schema.ts","../src/lib/Row/index.ts","../src/lib/SegmentedControl/schema.ts","../src/lib/SegmentedControl/index.ts","../src/lib/Select/schema.ts","../src/lib/Select/index.ts","../src/lib/Slider/schema.ts","../src/lib/Slider/index.ts","../src/lib/Spacer/schema.ts","../src/lib/Spacer/index.ts","../src/lib/Svg/index.ts","../src/lib/Table/schema.ts","../src/lib/Table/index.ts","../src/lib/Text/schema.ts","../src/lib/Text/index.ts","../src/lib/TextArea/schema.ts","../src/lib/TextArea/index.ts","../src/lib/Timer/schema.ts","../src/lib/Timer/index.ts","../src/lib/Title/schema.ts","../src/lib/Title/index.ts","../src/lib/YouTube/schema.ts","../src/lib/YouTube/index.ts","../src/lib/defineComponents.ts","../src/lib/functions/colors.ts","../src/lib/functions/helpers.ts","../src/lib/functions/dates.ts","../src/lib/functions/data.ts","../src/lib/functions/lists.ts","../src/lib/functions/numbers.ts","../src/lib/functions/text.ts","../src/lib/functions/index.ts","../src/lib/library.ts","../src/lib/prompt-options/index.ts"],"sourcesContent":["/**\n * The kit's design tokens as they are written in its styles. Each reads a\n * react-components token, so the kit follows ThemeProvider: its mode, its\n * lightTheme and darkTheme, wherever it writes them. Nothing sets the\n * --openui-intelligent-* variables by default; an app sets one to override that\n * token alone. Mixes resolve where they are used, so they follow the theme there.\n * The last fallback in each is react-components' light default, for a response\n * that renders with no theme at all.\n */\nexport const tokens = {\n font: 'var(--openui-intelligent-font, var(--openui-font-body, \"Inter\", sans-serif))',\n mono: \"var(--openui-intelligent-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)\",\n canvas: \"var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876)))\",\n hover:\n \"var(--openui-intelligent-hover, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 5%, transparent))\",\n pressed:\n \"var(--openui-intelligent-pressed, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 8%, transparent))\",\n surface:\n \"var(--openui-intelligent-surface, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 4%, transparent))\",\n surfaceStrong:\n \"var(--openui-intelligent-surface-strong, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 8%, transparent))\",\n ink: \"var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0)))\",\n inkHover:\n \"var(--openui-intelligent-ink-hover, color-mix(in oklch, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 82%, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876)))))\",\n onInk: \"var(--openui-intelligent-on-ink, var(--openui-foreground, oklch(0.994 0 89.876)))\",\n muted:\n \"var(--openui-intelligent-muted, var(--openui-text-neutral-secondary, oklch(0.097 0 0 / 0.6)))\",\n faint:\n \"var(--openui-intelligent-faint, var(--openui-text-neutral-secondary, oklch(0.097 0 0 / 0.6)))\",\n border:\n \"var(--openui-intelligent-border, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 8%, transparent))\",\n borderStrong:\n \"var(--openui-intelligent-border-strong, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 10%, transparent))\",\n rangeTrack:\n \"var(--openui-intelligent-range-track, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 6%, transparent))\",\n rangeThumb:\n \"var(--openui-intelligent-range-thumb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))))\",\n focus:\n \"var(--openui-intelligent-focus, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))))\",\n glass:\n \"var(--openui-intelligent-glass, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 70%, transparent))\",\n glassHover:\n \"var(--openui-intelligent-glass-hover, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 85%, transparent))\",\n glassRing:\n \"var(--openui-intelligent-glass-ring, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 70%, transparent))\",\n glassRingHover:\n \"var(--openui-intelligent-glass-ring-hover, color-mix(in srgb, var(--openui-intelligent-canvas, var(--openui-foreground, oklch(0.994 0 89.876))) 85%, transparent))\",\n shadow:\n \"var(--openui-intelligent-shadow, var(--openui-shadow-l, 0 4px 4px -2px oklch(0 0 0 / 0.05), 0 4px 8px -2px oklch(0 0 0 / 0.04)))\",\n shadowSm:\n \"var(--openui-intelligent-shadow-sm, var(--openui-shadow-s, 0 1px 3px -2px oklch(0 0 0 / 0.02), 0 2px 5px -2px oklch(0 0 0 / 0.04)))\",\n info: \"var(--openui-intelligent-info, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))))\",\n infoSoft:\n \"var(--openui-intelligent-info-soft, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 6%, transparent))\",\n success:\n \"var(--openui-intelligent-success, var(--openui-text-success-primary, oklch(0.448 0.108 151.328)))\",\n successSoft:\n \"var(--openui-intelligent-success-soft, var(--openui-success-background, oklch(0.627 0.17 149.214 / 0.12)))\",\n warning:\n \"var(--openui-intelligent-warning, var(--openui-text-alert-primary, oklch(0.476 0.103 61.907)))\",\n warningSoft:\n \"var(--openui-intelligent-warning-soft, var(--openui-alert-background, oklch(0.795 0.162 86.047 / 0.16)))\",\n danger:\n \"var(--openui-intelligent-danger, var(--openui-text-danger-primary, oklch(0.505 0.19 27.518)))\",\n dangerSoft:\n \"var(--openui-intelligent-danger-soft, var(--openui-danger-background, oklch(0.577 0.215 27.325 / 0.12)))\",\n purple:\n \"var(--openui-intelligent-purple, var(--openui-text-purple-primary, oklch(0.438 0.198 303.724)))\",\n purpleSoft:\n \"var(--openui-intelligent-purple-soft, var(--openui-purple-background, oklch(0.627 0.233 303.9 / 0.12)))\",\n pink: \"var(--openui-intelligent-pink, var(--openui-text-pink-primary, oklch(0.459 0.17 3.815)))\",\n pinkSoft:\n \"var(--openui-intelligent-pink-soft, var(--openui-pink-background, oklch(0.592 0.218 0.584 / 0.12)))\",\n badgeNeutralSoft:\n \"var(--openui-intelligent-badge-neutral-soft, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 6%, transparent))\",\n badgeSuccess:\n \"var(--openui-intelligent-badge-success, var(--openui-text-success-primary, oklch(0.448 0.108 151.328)))\",\n badgeSuccessSoft:\n \"var(--openui-intelligent-badge-success-soft, var(--openui-success-background, oklch(0.627 0.17 149.214 / 0.12)))\",\n badgeWarning:\n \"var(--openui-intelligent-badge-warning, var(--openui-text-alert-primary, oklch(0.476 0.103 61.907)))\",\n badgeWarningSoft:\n \"var(--openui-intelligent-badge-warning-soft, var(--openui-alert-background, oklch(0.795 0.162 86.047 / 0.16)))\",\n badgeDanger:\n \"var(--openui-intelligent-badge-danger, var(--openui-text-danger-primary, oklch(0.505 0.19 27.518)))\",\n badgeDangerSoft:\n \"var(--openui-intelligent-badge-danger-soft, var(--openui-danger-background, oklch(0.577 0.215 27.325 / 0.12)))\",\n badgePurple:\n \"var(--openui-intelligent-badge-purple, var(--openui-text-purple-primary, oklch(0.438 0.198 303.724)))\",\n badgePurpleSoft:\n \"var(--openui-intelligent-badge-purple-soft, var(--openui-purple-background, oklch(0.627 0.233 303.9 / 0.12)))\",\n badgePink:\n \"var(--openui-intelligent-badge-pink, var(--openui-text-pink-primary, oklch(0.459 0.17 3.815)))\",\n badgePinkSoft:\n \"var(--openui-intelligent-badge-pink-soft, var(--openui-pink-background, oklch(0.592 0.218 0.584 / 0.12)))\",\n chart1: \"var(--openui-intelligent-chart-1, #0285ff)\",\n chart2: \"var(--openui-intelligent-chart-2, #00a67d)\",\n chart3: \"var(--openui-intelligent-chart-3, #8b5cf6)\",\n chart4: \"var(--openui-intelligent-chart-4, #f4a340)\",\n chart5: \"var(--openui-intelligent-chart-5, #e46d91)\",\n chart6: \"var(--openui-intelligent-chart-6, #4b9ca6)\",\n spaceTight: \"var(--openui-intelligent-space-tight, 4px)\",\n spaceInner: \"var(--openui-intelligent-space-inner, 8px)\",\n spaceGroup: \"var(--openui-intelligent-space-group, 12px)\",\n spaceGroupLg: \"var(--openui-intelligent-space-group-lg, 16px)\",\n spaceSection: \"var(--openui-intelligent-space-section, 24px)\",\n controlGap: \"var(--openui-intelligent-control-gap, 8px)\",\n fieldGap: \"var(--openui-intelligent-field-gap, 24px)\",\n actionGap: \"var(--openui-intelligent-action-gap, 40px)\",\n radiusSm: \"var(--openui-intelligent-radius-sm, 6px)\",\n radiusMd: \"var(--openui-intelligent-radius-md, 10px)\",\n radiusLg: \"var(--openui-intelligent-radius-lg, 12px)\",\n radiusXl: \"var(--openui-intelligent-radius-xl, 14px)\",\n photoEmpty:\n \"var(--openui-intelligent-photo-empty, var(--openui-intelligent-surface, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 4%, transparent)))\",\n photoEmptyIcon:\n \"var(--openui-intelligent-photo-empty-icon, var(--openui-intelligent-border-strong, color-mix(in srgb, var(--openui-intelligent-ink, var(--openui-text-neutral-primary, oklch(0.097 0 0))) 10%, transparent)))\",\n} as const;\n","import type { Theme as ComponentsTheme } from \"@wodecorp/openui-vue-ui\";\n\nexport type IntelligentTheme = {\n intelligentFont?: string;\n intelligentMono?: string;\n intelligentCanvas?: string;\n intelligentHover?: string;\n intelligentPressed?: string;\n intelligentSurface?: string;\n intelligentSurfaceStrong?: string;\n intelligentInk?: string;\n intelligentInkHover?: string;\n intelligentOnInk?: string;\n intelligentMuted?: string;\n intelligentFaint?: string;\n intelligentBorder?: string;\n intelligentBorderStrong?: string;\n intelligentRangeTrack?: string;\n intelligentRangeThumb?: string;\n intelligentFocus?: string;\n intelligentGlass?: string;\n intelligentGlassHover?: string;\n intelligentGlassRing?: string;\n intelligentGlassRingHover?: string;\n intelligentShadow?: string;\n intelligentShadowSm?: string;\n intelligentInfo?: string;\n intelligentInfoSoft?: string;\n intelligentSuccess?: string;\n intelligentSuccessSoft?: string;\n intelligentWarning?: string;\n intelligentWarningSoft?: string;\n intelligentDanger?: string;\n intelligentDangerSoft?: string;\n intelligentPurple?: string;\n intelligentPurpleSoft?: string;\n intelligentPink?: string;\n intelligentPinkSoft?: string;\n intelligentBadgeNeutralSoft?: string;\n intelligentBadgeSuccess?: string;\n intelligentBadgeSuccessSoft?: string;\n intelligentBadgeWarning?: string;\n intelligentBadgeWarningSoft?: string;\n intelligentBadgeDanger?: string;\n intelligentBadgeDangerSoft?: string;\n intelligentBadgePurple?: string;\n intelligentBadgePurpleSoft?: string;\n intelligentBadgePink?: string;\n intelligentBadgePinkSoft?: string;\n intelligentChart1?: string;\n intelligentChart2?: string;\n intelligentChart3?: string;\n intelligentChart4?: string;\n intelligentChart5?: string;\n intelligentChart6?: string;\n intelligentSpaceTight?: string;\n intelligentSpaceInner?: string;\n intelligentSpaceGroup?: string;\n intelligentSpaceGroupLg?: string;\n intelligentSpaceSection?: string;\n intelligentControlGap?: string;\n intelligentFieldGap?: string;\n intelligentActionGap?: string;\n intelligentRadiusSm?: string;\n intelligentRadiusMd?: string;\n intelligentRadiusLg?: string;\n intelligentRadiusXl?: string;\n intelligentPhotoEmpty?: string;\n intelligentPhotoEmptyIcon?: string;\n};\n\nexport type Theme = ComponentsTheme & IntelligentTheme;\n\nconst shared = {\n intelligentMono: \"ui-monospace, SFMono-Regular, Menlo, Consolas, monospace\",\n intelligentChart1: \"#0285ff\",\n intelligentChart2: \"#00a67d\",\n intelligentChart3: \"#8b5cf6\",\n intelligentChart4: \"#f4a340\",\n intelligentChart5: \"#e46d91\",\n intelligentChart6: \"#4b9ca6\",\n intelligentSpaceTight: \"4px\",\n intelligentSpaceInner: \"8px\",\n intelligentSpaceGroup: \"12px\",\n intelligentSpaceGroupLg: \"16px\",\n intelligentSpaceSection: \"24px\",\n intelligentControlGap: \"8px\",\n intelligentFieldGap: \"24px\",\n intelligentActionGap: \"40px\",\n intelligentRadiusSm: \"6px\",\n intelligentRadiusMd: \"10px\",\n intelligentRadiusLg: \"12px\",\n intelligentRadiusXl: \"14px\",\n} satisfies IntelligentTheme;\n\nexport const defaultLightTheme: IntelligentTheme = { ...shared };\nexport const defaultDarkTheme: IntelligentTheme = { ...shared };\n","import {\n ThemeProvider as ComponentsThemeProvider,\n useTheme as useComponentsTheme,\n type Theme as ComponentsTheme,\n type ThemeMode,\n} from \"@wodecorp/openui-vue-ui\";\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUpdated,\n provide,\n useId,\n type ComputedRef,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { tokens } from \"../shared/tokens\";\nimport {\n defaultDarkTheme,\n defaultLightTheme,\n type IntelligentTheme,\n type Theme,\n} from \"./defaultThemes\";\n\nexport { defaultDarkTheme, defaultLightTheme, type IntelligentTheme, type Theme };\n\nexport interface ThemeProviderProps {\n mode?: ThemeMode;\n lightTheme?: Theme;\n darkTheme?: Theme;\n}\n\nexport interface IntelligentThemeContextValue {\n mode: ComputedRef<ThemeMode>;\n theme: ComputedRef<IntelligentTheme>;\n overrides: ComputedRef<{ light: Theme; dark: Theme }>;\n}\n\nconst IntelligentThemeContext: InjectionKey<IntelligentThemeContextValue | null> = Symbol(\n \"OpenUI.IntelligentTheme\",\n);\n\nexport function useIntelligentTheme(): IntelligentThemeContextValue | null {\n return inject(IntelligentThemeContext, null);\n}\n\nconst INTELLIGENT_PREFIX = \"intelligent\";\n\nfunction camelToKebab(key: string): string {\n return key\n .replace(/([a-z])([A-Z])/g, \"$1-$2\")\n .replace(/([A-Z])([A-Z])/g, \"$1-$2\")\n .replace(/([a-z])(\\d)/g, \"$1-$2\")\n .toLowerCase();\n}\n\nfunction splitTheme(theme: Theme | undefined) {\n const components: Record<string, unknown> = {};\n const intelligent: Record<string, string> = {};\n for (const [key, value] of Object.entries(theme ?? {})) {\n if (key.startsWith(INTELLIGENT_PREFIX) && key.length > INTELLIGENT_PREFIX.length) {\n if (typeof value === \"string\") intelligent[key] = value;\n } else {\n components[key] = value;\n }\n }\n return { components, intelligent: intelligent as IntelligentTheme };\n}\n\nfunction cssVars(theme: IntelligentTheme): string {\n return Object.entries(theme)\n .filter(([, value]) => typeof value === \"string\")\n .map(([key, value]) => `--openui-${camelToKebab(key)}: ${value as string};`)\n .join(\" \");\n}\n\nfunction cssSafeId(id: string): string {\n return id.replace(/[^a-zA-Z0-9-_]/g, \"\");\n}\n\nconst IntelligentVariables = defineComponent({\n name: \"OpenUIIntelligentVariables\",\n props: {\n id: { type: String, required: true },\n scope: { type: String, required: true },\n mode: { type: String as PropType<ThemeMode>, required: true },\n theme: { type: Object as PropType<IntelligentTheme>, required: true },\n },\n setup(props) {\n const { portalThemeClassName } = useComponentsTheme();\n const cssText = computed(() => {\n const rules = `color-scheme: ${props.mode}; color: var(--openui-text-neutral-primary); font-family: ${tokens.font}; ${cssVars(props.theme)}`;\n const selectors = [`.${props.scope}`];\n if (portalThemeClassName.value) selectors.push(`.${portalThemeClassName.value}`);\n return `${selectors.join(\", \")} { ${rules} }`;\n });\n\n let styleEl: HTMLStyleElement | undefined;\n const syncStyle = () => {\n if (typeof document === \"undefined\") return;\n if (styleEl?.textContent === cssText.value) return;\n styleEl?.remove();\n styleEl = document.createElement(\"style\");\n const nonce = (window as Window & { __nonce__?: string }).__nonce__;\n if (nonce) styleEl.nonce = nonce;\n styleEl.setAttribute(\"data-openui-intelligent-theme\", props.id);\n styleEl.textContent = cssText.value;\n document.head.appendChild(styleEl);\n };\n\n onMounted(syncStyle);\n onUpdated(syncStyle);\n onBeforeUnmount(() => styleEl?.remove());\n\n return () => {\n void cssText.value;\n return null;\n };\n },\n});\n\nexport const ThemeProvider = defineComponent({\n name: \"OpenUIIntelligentThemeProvider\",\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 id = cssSafeId(useId());\n const parent = inject(IntelligentThemeContext, null);\n const { mode: componentsMode } = useComponentsTheme();\n const mode = computed<ThemeMode>(\n () => props.mode ?? parent?.mode.value ?? componentsMode.value ?? \"light\",\n );\n const scope = `openui-intelligent-theme-${id}`;\n\n const overrides = computed(() => ({\n light: { ...parent?.overrides.value.light, ...props.lightTheme },\n dark: { ...parent?.overrides.value.dark, ...(props.darkTheme ?? props.lightTheme) },\n }));\n const light = computed(() => splitTheme(overrides.value.light));\n const dark = computed(() => splitTheme(overrides.value.dark));\n const theme = computed<IntelligentTheme>(() =>\n mode.value === \"light\"\n ? { ...defaultLightTheme, ...light.value.intelligent }\n : { ...defaultDarkTheme, ...dark.value.intelligent },\n );\n\n provide(IntelligentThemeContext, { mode, theme, overrides });\n\n return () =>\n h(\n \"div\",\n {\n class: scope,\n \"data-openui-intelligent-mode\": mode.value,\n style: { display: \"contents\" },\n },\n [\n h(\n ComponentsThemeProvider,\n {\n mode: mode.value,\n cssSelector: `.${scope}`,\n lightTheme: light.value.components as ComponentsTheme,\n darkTheme: dark.value.components as ComponentsTheme,\n },\n {\n default: () => [\n h(IntelligentVariables, {\n id,\n scope,\n mode: mode.value,\n theme: theme.value,\n }),\n slots.default?.(),\n ],\n },\n ),\n ],\n );\n },\n});\n\nexport const RootTheme = defineComponent({\n name: \"OpenUIIntelligentRootTheme\",\n inheritAttrs: false,\n setup(_, { slots }) {\n const existing = inject(IntelligentThemeContext, null);\n return () => (existing ? slots.default?.() : h(ThemeProvider, null, { default: () => slots.default?.() }));\n },\n});\n","/**\n * The model's prop values as CSS, shared by the components and the library. Colours are a token\n * (\"ink\", \"muted\", \"info\", \"chart1\", ...) or a CSS colour; spacing counts 4px steps; a length is px\n * or a CSS length; a radius is \"sm\" to \"xl\", \"full\" or px. Anything a model writes is checked first.\n */\nimport type { CSSProperties } from \"vue\";\nimport { tokens } from \"./tokens\";\n\n/** A token or a CSS color. */\nexport type Color = string;\n/** A px number or a CSS length such as \"50%\". */\nexport type Length = number | string;\n/** \"sm\", \"md\", \"lg\", \"xl\", \"full\", or px. */\nexport type Radius = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\" | number;\n/** Cross-axis alignment of a flex layout. */\nexport type Align = \"start\" | \"center\" | \"end\" | \"stretch\";\n/** Main-axis distribution of a flex layout. */\nexport type Justify = \"start\" | \"center\" | \"end\" | \"between\";\n\n// Safety\n// A model-written style value could otherwise load a resource: `background: url(...)`.\nconst UNSAFE_CSS =\n /(url|image|image-set|cross-fade|element|expression|paint|var|attr|env)\\s*\\(|@import|[\\\\;{}<>]/i;\nconst isSafeCss = (value: string) => !UNSAFE_CSS.test(value);\n\n// Values to CSS\nconst STATUS = [\"info\", \"success\", \"warning\", \"danger\", \"purple\", \"pink\"] as const;\nconst FOREGROUND: Record<string, string> = {\n ink: tokens.ink,\n muted: tokens.muted,\n faint: tokens.faint,\n canvas: tokens.canvas,\n surface: tokens.surface,\n ...Object.fromEntries(STATUS.map((s) => [s, tokens[s]])),\n chart1: tokens.chart1,\n chart2: tokens.chart2,\n chart3: tokens.chart3,\n chart4: tokens.chart4,\n chart5: tokens.chart5,\n chart6: tokens.chart6,\n};\nconst BACKGROUND: Record<string, string> = {\n ...FOREGROUND,\n surface: tokens.surface,\n \"surface-strong\": tokens.surfaceStrong,\n border: tokens.border,\n ...Object.fromEntries(STATUS.map((s) => [s, tokens[`${s}Soft`]])),\n};\n\nconst cssValue = (value: unknown) =>\n typeof value === \"string\" && value.trim() && isSafeCss(value) ? value.trim() : undefined;\n\n/** Text, icon and stroke colors: a token or a CSS color. */\nexport const fg = (value: unknown) =>\n typeof value === \"string\" ? (FOREGROUND[value] ?? cssValue(value)) : undefined;\n/** Backgrounds: status tokens become their soft tints. */\nexport const bg = (value: unknown) =>\n typeof value === \"string\" ? (BACKGROUND[value] ?? cssValue(value)) : undefined;\n\n/** Whether a background is one of the kit's tokens, which follow the theme, rather than a raw colour. */\nexport const isColorToken = (value: string) => value in BACKGROUND;\n\n/** Spacing in 4px steps. */\nexport const space = (value: unknown) =>\n typeof value === \"number\" && Number.isFinite(value) ? `${Math.max(0, value) * 4}px` : undefined;\n\nexport function size(value: unknown): string | undefined {\n if (typeof value === \"number\" && Number.isFinite(value)) return `${Math.max(0, value)}px`;\n if (typeof value !== \"string\") return undefined;\n if (/^\\d+(\\.\\d+)?$/.test(value.trim())) return `${value.trim()}px`;\n return /^\\d+(\\.\\d+)?(px|%|em|rem|vh|vw|fr)$|^auto$/.test(value.trim()) ? value.trim() : undefined;\n}\n\nconst RADIUS: Record<string, string> = {\n sm: tokens.radiusSm,\n md: tokens.radiusMd,\n lg: tokens.radiusLg,\n xl: tokens.radiusXl,\n full: \"999px\",\n};\nexport const radius = (value: unknown) => (typeof value === \"string\" ? RADIUS[value] : size(value));\n\n// Layout\nconst FLEX: Record<string, string> = {\n start: \"flex-start\",\n end: \"flex-end\",\n center: \"center\",\n stretch: \"stretch\",\n between: \"space-between\",\n};\n\nexport type FlexProps = { gap?: number; align?: string; justify?: string; wrap?: boolean };\n\nexport const flexStyle = (p: FlexProps, column = false): CSSProperties => ({\n gap: space(p.gap),\n alignItems: p.align ? FLEX[p.align] : undefined,\n justifyContent: p.justify ? FLEX[p.justify] : undefined,\n flexWrap: p.wrap ? \"wrap\" : undefined,\n // A centered column centers its wrapped lines too.\n textAlign: column && (p.align === \"center\" || p.align === \"end\") ? p.align : undefined,\n});\n","import { getIconImport, type LucideIcon as LucideComponent } from \"@wodecorp/openui-vue-ui/icons\";\nimport { defineComponent, h, shallowRef, watch, type PropType } from \"vue\";\nimport { fg } from \"../shared/props\";\n\nconst iconCache = new Map<string, LucideComponent>();\n\nexport const LucideIconView = defineComponent({\n name: \"OpenUIIntelligentLucideIcon\",\n props: {\n name: { type: String, required: true },\n size: { type: Number, default: 16 },\n color: String as PropType<string>,\n },\n setup(props) {\n const resolved = shallowRef<LucideComponent | null>(null);\n\n watch(\n () => props.name,\n (name) => {\n if (!name) {\n resolved.value = null;\n return;\n }\n const cached = iconCache.get(name);\n if (cached) {\n resolved.value = cached;\n return;\n }\n const loader = getIconImport(name);\n if (!loader) {\n resolved.value = null;\n return;\n }\n let cancelled = false;\n void loader()\n .then((mod) => {\n if (cancelled) return;\n const comp = (mod as { default?: LucideComponent })?.default;\n if (comp) {\n iconCache.set(name, comp);\n resolved.value = comp;\n }\n })\n .catch(() => {\n if (!cancelled) resolved.value = null;\n });\n return () => {\n cancelled = true;\n };\n },\n { immediate: true },\n );\n\n return () => {\n const IconComp = resolved.value;\n const color = fg(props.color) ?? \"currentColor\";\n if (!IconComp) {\n return h(\"span\", {\n class: \"openui-intelligent-icon-placeholder\",\n \"data-icon\": props.name,\n \"aria-hidden\": \"true\",\n style: {\n display: \"inline-block\",\n width: `${props.size}px`,\n height: `${props.size}px`,\n verticalAlign: \"middle\",\n },\n });\n }\n return h(IconComp as never, {\n size: props.size,\n color,\n style: { display: \"inline-block\", flexShrink: 0, verticalAlign: \"middle\" },\n });\n };\n },\n});\n","/** A short plain-text name for an element, from its rendered text, for action messages. */\nexport const textOf = (element: HTMLElement | null) =>\n (element?.innerText ?? \"\").replace(/\\s+/g, \" \").trim().slice(0, 120);\n\n/** Coerce a prop to a string; null and undefined become \"\". */\nexport const str = (value: unknown) => (value == null ? \"\" : String(value));\n\n/** A number for display: grouped, at most two decimals. */\nexport const numberText = (value: unknown) => {\n if (typeof value !== \"number\" || !Number.isFinite(value)) return \"\";\n return value.toLocaleString(\"en-US\", { maximumFractionDigits: 2 });\n};\n","import { z } from \"zod/v4\";\n\nexport const BadgeSchema = z.object({\n text: z.string(),\n color: z.enum([\"neutral\", \"info\", \"success\", \"warning\", \"danger\", \"purple\", \"pink\"]).optional(),\n icon: z.string().optional(),\n});\n\nexport type BadgeProps = z.infer<typeof BadgeSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { BadgeSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst BADGE_PALETTE: Record<string, { bg: string; fg: string }> = {\n neutral: { bg: tokens.badgeNeutralSoft, fg: tokens.ink },\n info: { bg: tokens.infoSoft, fg: tokens.info },\n success: { bg: tokens.badgeSuccessSoft, fg: tokens.badgeSuccess },\n warning: { bg: tokens.badgeWarningSoft, fg: tokens.badgeWarning },\n danger: { bg: tokens.badgeDangerSoft, fg: tokens.badgeDanger },\n purple: { bg: tokens.badgePurpleSoft, fg: tokens.badgePurple },\n pink: { bg: tokens.badgePinkSoft, fg: tokens.badgePink },\n};\n\nexport const Badge = defineComponent({\n name: \"Badge\",\n props: BadgeSchema,\n description: \"Pill tag; icon is an optional leading lucide name.\",\n component: ({ props }) => {\n const palette = BADGE_PALETTE[props.color ?? \"neutral\"] ?? BADGE_PALETTE.neutral!;\n return h(\n \"span\",\n {\n class: \"openui-intelligent-badge\",\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"4px\",\n padding: \"2px 8px\",\n borderRadius: \"999px\",\n fontSize: \"12px\",\n fontWeight: 500,\n lineHeight: 1.4,\n background: palette.bg,\n color: palette.fg,\n verticalAlign: \"middle\",\n },\n },\n [\n props.icon ? h(LucideIconView, { name: props.icon, size: 12 }) : null,\n str(props.text),\n ],\n );\n },\n});\n","/** Content on a model-chosen raw colour, which doesn't follow the theme. */\nimport type { CSSProperties } from \"vue\";\nimport { isColorToken } from \"./props\";\n\n/**\n * Text color for a model-chosen CSS color background (hex or rgb). Raw colors\n * do not follow the theme, so text on them is set dark or light to stay legible.\n */\nfunction contrastOn(background: unknown): string | undefined {\n if (typeof background !== \"string\" || isColorToken(background)) return undefined;\n let rgb: number[] | null = null;\n const hex = /^#([\\da-f]{3}|[\\da-f]{6})$/i.exec(background.trim());\n if (hex) {\n const h = hex[1].length === 3 ? hex[1].replace(/./g, \"$&$&\") : hex[1];\n rgb = [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16));\n } else {\n const m = /^rgba?\\(\\s*(\\d+)[\\s,]+(\\d+)[\\s,]+(\\d+)/i.exec(background.trim());\n if (m) rgb = [m[1], m[2], m[3]].map(Number);\n }\n if (!rgb) return undefined;\n const [r, g, b] = rgb.map((c) => {\n const v = c / 255;\n return v <= 0.03928 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b > 0.36 ? \"#0d0d0d\" : \"#ffffff\";\n}\n\n/** A selected tile's tick, drawn in the color that sits on ink: white on dark ink, dark on light. */\nconst tick = (stroke: string) =>\n `url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='${stroke}' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E\")`;\n\n/** The selected tile's tick on the page's ink: white on light mode's dark ink, dark on dark mode's. */\nexport const checkIcon = (mode: \"light\" | \"dark\") => tick(mode === \"dark\" ? \"%23171717\" : \"white\");\n\n/**\n * Style for content on a raw-color background: text tokens switch to the readable color. What sits on\n * ink (a solid button's label, a selected tile's tick) switches with it, or it would keep the page\n * theme's color and vanish: dark on dark in dark mode.\n */\nexport function onColor(background: unknown): CSSProperties {\n const ink = contrastOn(background);\n if (!ink) return {};\n const darkInk = ink !== \"#ffffff\";\n return {\n color: ink,\n \"--openui-intelligent-ink\": ink,\n \"--openui-intelligent-muted\": `color-mix(in srgb, ${ink} 72%, transparent)`,\n \"--openui-intelligent-faint\": `color-mix(in srgb, ${ink} 55%, transparent)`,\n // react-components' parts inside (a field, a chart) read these, so they switch too.\n \"--openui-text-neutral-primary\": ink,\n \"--openui-text-neutral-secondary\": `color-mix(in srgb, ${ink} 72%, transparent)`,\n \"--openui-intelligent-on-ink\": darkInk ? \"#ffffff\" : \"#0d0d0d\",\n \"--_openui-intelligent-pressable-check-icon\": tick(darkInk ? \"white\" : \"%230d0d0d\"),\n } as CSSProperties;\n}\n","function protocolOf(value: string): string | null {\n try {\n return new URL(value.trim()).protocol;\n } catch {\n return null;\n }\n}\n\n/** An absolute http(s) URL, or null. Relative URLs would resolve against this app. */\nexport function webUrl(value: unknown): string | null {\n if (typeof value !== \"string\") return null;\n const protocol = protocolOf(value);\n return protocol === \"http:\" || protocol === \"https:\" ? value.trim() : null;\n}\n","import { tagSchemaId, type ElementNode } from \"@wodecorp/openui-vue-lang\";\nimport { h, type VNodeChild } from \"vue\";\nimport { z } from \"zod/v4\";\nimport { tokens } from \"../shared/tokens\";\nimport { webUrl } from \"../shared/url\";\n\nconst node = z.any();\ntagSchemaId(node, \"Node\");\nexport const children = z.array(node);\n\nexport const color = z.string();\ntagSchemaId(color, \"Color\");\n\nexport const length = z.union([z.number(), z.string()]);\ntagSchemaId(length, \"Length\");\n\nexport const radiusSchema = z.union([z.enum([\"sm\", \"md\", \"lg\", \"xl\", \"full\"]), z.number()]);\ntagSchemaId(radiusSchema, \"Radius\");\n\nexport const fitSchema = z.enum([\"cover\", \"contain\"]);\n\nexport const rulesSchema = z.object({\n required: z.boolean().optional(),\n email: z.boolean().optional(),\n url: z.boolean().optional(),\n numeric: z.boolean().optional(),\n min: z.number().optional(),\n max: z.number().optional(),\n minLength: z.number().optional(),\n maxLength: z.number().optional(),\n pattern: z.string().optional(),\n});\ntagSchemaId(rulesSchema, \"Rules\");\n\nexport const option = z.union([z.string(), z.object({ value: z.string(), label: z.string() })]);\nexport type Option = z.infer<typeof option>;\n\nexport function toOption(\n o: unknown,\n): { value: string; label: string; description?: string } | null {\n if (o == null) return null;\n if (typeof o !== \"object\") return { value: String(o), label: String(o) };\n const { value, label, description } = o as Record<string, unknown>;\n const text = label ?? value;\n if (text == null) return null;\n return {\n value: String(value ?? label),\n label: String(text),\n ...(typeof description === \"string\" && { description }),\n };\n}\n\nexport const align = z.enum([\"start\", \"center\", \"end\", \"stretch\"]);\nexport const justify = z.enum([\"start\", \"center\", \"end\", \"between\"]);\nexport const slot = z.union([z.string(), children]);\n\nexport type Render = (value: unknown) => VNodeChild;\n\nconst INLINE_TOKEN = /(\\*\\*([^*]+)\\*\\*|\\*([^*]+)\\*|`([^`]+)`|\\[([^\\]]+)\\]\\(([^)]+)\\))/g;\n\nexport function renderInlineMarkdown(text: string): VNodeChild {\n if (!text) return \"\";\n const out: VNodeChild[] = [];\n let lastIndex = 0;\n INLINE_TOKEN.lastIndex = 0;\n let match: RegExpExecArray | null;\n while ((match = INLINE_TOKEN.exec(text)) !== null) {\n if (match.index > lastIndex) {\n out.push(text.slice(lastIndex, match.index));\n }\n if (match[2] !== undefined) {\n out.push(h(\"strong\", null, match[2]));\n } else if (match[3] !== undefined) {\n out.push(h(\"em\", null, match[3]));\n } else if (match[4] !== undefined) {\n out.push(\n h(\n \"code\",\n {\n style: {\n fontFamily: tokens.mono,\n fontSize: \"0.88em\",\n padding: \"0.1em 0.35em\",\n borderRadius: tokens.radiusSm,\n background: tokens.surface,\n },\n },\n match[4],\n ),\n );\n } else if (match[5] !== undefined && match[6] !== undefined) {\n const safe = webUrl(match[6]);\n if (safe) {\n out.push(\n h(\n \"a\",\n {\n href: safe,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n style: { color: tokens.info, textDecoration: \"underline\" },\n },\n match[5],\n ),\n );\n } else {\n out.push(match[5]);\n }\n }\n lastIndex = INLINE_TOKEN.lastIndex;\n }\n if (lastIndex < text.length) out.push(text.slice(lastIndex));\n return out.length === 1 ? out[0] : out;\n}\n\nexport const renderSlot = (value: unknown, renderNode: Render): VNodeChild =>\n typeof value === \"string\" || typeof value === \"number\"\n ? renderInlineMarkdown(String(value))\n : renderNode(Array.isArray(value) ? value.flat() : value);\n\nexport const isElement = (value: unknown): value is ElementNode =>\n !!value && typeof value === \"object\" && (value as { type?: unknown }).type === \"element\";\n","import { z } from \"zod/v4\";\nimport { align, children, color, justify, length, radiusSchema } from \"../schemas\";\n\nexport const BoxSchema = z.object({\n children: children.optional(),\n direction: z.enum([\"row\", \"col\"]).optional(),\n gap: z.number().optional(),\n padding: z.number().optional(),\n background: color.optional(),\n radius: radiusSchema.optional(),\n border: z.boolean().optional(),\n width: length.optional(),\n height: length.optional(),\n flex: z.number().optional(),\n align: align.optional(),\n justify: justify.optional(),\n wrap: z.boolean().optional(),\n});\n\nexport type BoxProps = z.infer<typeof BoxSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h, type CSSProperties } from \"vue\";\nimport { onColor } from \"../../shared/color\";\nimport { bg, flexStyle, radius, size, space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { BoxSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Box = defineComponent({\n name: \"Box\",\n props: BoxSchema,\n description: \"Flex container, a column by default. radius also clips the content.\",\n component: ({ props, renderNode }) => {\n const isCol = props.direction !== \"row\";\n const r = radius(props.radius);\n const style: CSSProperties = {\n display: \"flex\",\n flexDirection: isCol ? \"column\" : \"row\",\n padding: space(props.padding),\n background: bg(props.background),\n borderRadius: r,\n overflow: r ? \"hidden\" : undefined,\n border: props.border ? `1px solid ${tokens.border}` : undefined,\n width: size(props.width),\n height: size(props.height),\n flex: typeof props.flex === \"number\" && Number.isFinite(props.flex) ? props.flex : undefined,\n ...flexStyle(props, isCol),\n ...onColor(props.background),\n };\n return h(\"div\", { class: \"openui-intelligent-box\", style }, [renderNode(props.children)]);\n },\n});\n","import {\n ACTION_STEPS,\n parseStructuredRules,\n useFormName,\n useFormValidation,\n useTriggerAction,\n} from \"@wodecorp/openui-vue-lang\";\nimport {\n computed,\n h,\n onScopeDispose,\n toValue,\n useId,\n watchEffect,\n type MaybeRefOrGetter,\n type VNodeChild,\n} from \"vue\";\nimport { z } from \"zod/v4\";\nimport { tokens } from \"../shared/tokens\";\nimport { option, toOption } from \"./schemas\";\n\ntype Plan = Parameters<ReturnType<typeof useTriggerAction>>[2];\ntype Step = { type: string; refType?: string };\n\nconst sends = (plan: unknown): boolean => {\n const steps = (plan as { steps?: Step[] } | null | undefined)?.steps;\n if (!steps) return true;\n return steps.some(\n (s) =>\n s.type === ACTION_STEPS.ToAssistant ||\n s.type === \"custom_action\" ||\n (s.type === ACTION_STEPS.Run && s.refType === \"mutation\"),\n );\n};\n\nexport function useRunAction() {\n const trigger = useTriggerAction();\n const formName = useFormName();\n const form = useFormValidation();\n return (message: string, plan: unknown, sendLabel: boolean) => {\n if (!plan && !sendLabel) return;\n if (form && (!plan || sends(plan)) && !form.validateForm()) return;\n if (plan) void trigger(message, formName.value, plan as Plan);\n else void trigger(message, formName.value);\n };\n}\n\nexport function useFieldRules(\n name: MaybeRefOrGetter<string>,\n rules: MaybeRefOrGetter<unknown>,\n value: MaybeRefOrGetter<unknown>,\n) {\n const form = useFormValidation();\n const parsed = computed(() => parseStructuredRules(toValue(rules)));\n const active = computed(() => !!form && parsed.value.length > 0);\n let registeredName: string | null = null;\n\n watchEffect(() => {\n const fieldName = toValue(name);\n const currentRules = parsed.value;\n if (registeredName && registeredName !== fieldName) {\n form?.unregisterField(registeredName);\n registeredName = null;\n }\n if (form && currentRules.length > 0) {\n form.registerField(fieldName, currentRules, () => toValue(value));\n registeredName = fieldName;\n } else if (registeredName) {\n form?.unregisterField(registeredName);\n registeredName = null;\n }\n });\n\n onScopeDispose(() => {\n if (registeredName) {\n form?.unregisterField(registeredName);\n registeredName = null;\n }\n });\n\n return {\n required: computed(() => active.value && parsed.value.some((r) => r.type === \"required\")),\n error: computed(() => (active.value ? form?.errors[toValue(name)] : undefined)),\n check: () => {\n if (active.value && form) {\n form.validateField(toValue(name), toValue(value), parsed.value);\n }\n },\n clear: () => {\n if (active.value && form) {\n form.clearFieldError(toValue(name));\n }\n },\n };\n}\n\nexport function useFieldName(\n label: MaybeRefOrGetter<unknown>,\n statementId?: MaybeRefOrGetter<string | undefined>,\n) {\n const id = useId();\n return computed(() => {\n const sid = toValue(statementId);\n if (sid) return sid;\n const lbl = toValue(label);\n if (typeof lbl === \"string\" && lbl) return lbl;\n return id;\n });\n}\n\nexport function renderFieldFrame(opts: {\n label?: string;\n required?: boolean;\n error?: string;\n control: VNodeChild;\n}): VNodeChild {\n return h(\n \"div\",\n {\n class: \"openui-intelligent-field\",\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n width: \"100%\",\n fontFamily: tokens.font,\n },\n },\n [\n opts.label\n ? h(\n \"label\",\n {\n style: {\n fontSize: \"13px\",\n fontWeight: 500,\n color: tokens.ink,\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"4px\",\n },\n },\n [\n opts.label,\n opts.required\n ? h(\"span\", { style: { color: tokens.danger }, \"aria-hidden\": \"true\" }, \"*\")\n : null,\n ],\n )\n : null,\n opts.control,\n opts.error\n ? h(\n \"div\",\n {\n role: \"alert\",\n style: { fontSize: \"12px\", color: tokens.danger },\n },\n opts.error,\n )\n : null,\n ],\n );\n}\n\nexport const options = z.array(option);\nexport const optionList = (value: unknown) =>\n Array.isArray(value) ? value.flat().flatMap((o) => toOption(o) ?? []) : [];\n\nexport const choice = z.union([\n z.string(),\n z.object({ value: z.string(), label: z.string(), description: z.string().optional() }),\n]);\nexport type Choice = { value: string; label: string; description?: string };\nexport const choiceList = (value: unknown): Choice[] => optionList(value);\n","import { action } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const ButtonSchema = z.object({\n label: z.string(),\n action: action().optional(),\n variant: z.enum([\"solid\", \"outline\", \"soft\", \"ghost\"]).optional(),\n color: z.enum([\"primary\", \"danger\", \"success\"]).optional(),\n size: z.enum([\"sm\", \"md\", \"lg\"]).optional(),\n icon: z.string().optional(),\n disabled: z.boolean().optional(),\n block: z.boolean().optional(),\n});\n\nexport type ButtonProps = z.infer<typeof ButtonSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type CSSProperties, type PropType } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useRunAction } from \"../controls\";\nimport { ButtonSchema, type ButtonProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SIZE_STYLE: Record<string, CSSProperties> = {\n sm: { padding: \"5px 10px\", fontSize: \"12px\", borderRadius: tokens.radiusSm },\n md: { padding: \"8px 14px\", fontSize: \"13px\", borderRadius: tokens.radiusMd },\n lg: { padding: \"10px 18px\", fontSize: \"14px\", borderRadius: tokens.radiusMd },\n};\n\nconst ButtonImpl = vueComponent({\n name: \"OpenUIIntelligentButton\",\n props: {\n props: { type: Object as PropType<ButtonProps>, required: true },\n },\n setup(p) {\n const run = useRunAction();\n const streaming = useIsStreaming();\n\n return () => {\n const variant = p.props.variant ?? \"solid\";\n const color = p.props.color ?? \"primary\";\n const size = p.props.size ?? \"md\";\n const disabled = Boolean(p.props.disabled || streaming.value);\n const label = str(p.props.label);\n\n const accent =\n color === \"danger\" ? tokens.danger : color === \"success\" ? tokens.success : tokens.ink;\n const accentSoft =\n color === \"danger\"\n ? tokens.dangerSoft\n : color === \"success\"\n ? tokens.successSoft\n : tokens.surface;\n\n const variantStyle: CSSProperties =\n variant === \"solid\"\n ? { background: accent, color: color === \"primary\" ? tokens.onInk : \"#ffffff\", border: \"1px solid transparent\" }\n : variant === \"outline\"\n ? { background: \"transparent\", color: accent, border: `1px solid ${tokens.borderStrong}` }\n : variant === \"soft\"\n ? { background: accentSoft, color: accent, border: \"1px solid transparent\" }\n : { background: \"transparent\", color: accent, border: \"1px solid transparent\" };\n\n return h(\n \"button\",\n {\n type: \"button\",\n disabled,\n class: \"openui-intelligent-button\",\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"6px\",\n fontFamily: tokens.font,\n fontWeight: 500,\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n opacity: disabled ? 0.55 : 1,\n width: p.props.block ? \"100%\" : undefined,\n ...SIZE_STYLE[size],\n ...variantStyle,\n },\n onClick: () => {\n if (disabled) return;\n run(label, p.props.action, true);\n },\n },\n [\n p.props.icon ? h(LucideIconView, { name: p.props.icon, size: size === \"sm\" ? 13 : 15 }) : null,\n label,\n ],\n );\n };\n },\n});\n\nexport const Button = defineComponent({\n name: \"Button\",\n props: ButtonSchema,\n description: \"icon is a lucide name. Without an action it sends its label to the assistant.\",\n component: ButtonImpl,\n});\n","import { z } from \"zod/v4\";\nimport { color } from \"../schemas\";\n\nexport const CaptionSchema = z.object({ text: z.string(), color: color.optional() });\n\nexport type CaptionProps = z.infer<typeof CaptionSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { fg } from \"../../shared/props\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CaptionSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Caption = defineComponent({\n name: \"Caption\",\n props: CaptionSchema,\n description: \"Small secondary text.\",\n component: ({ props }) =>\n h(\n \"span\",\n {\n class: \"openui-intelligent-caption\",\n style: {\n fontSize: \"12px\",\n lineHeight: 1.45,\n color: fg(props.color) ?? tokens.muted,\n },\n },\n str(props.text),\n ),\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const CardSchema = z.object({\n children,\n variant: z.enum([\"outline\", \"soft\"]).optional(),\n gap: z.number().optional(),\n padding: z.number().optional(),\n});\n\nexport type CardProps = z.infer<typeof CardSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CardSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Card = defineComponent({\n name: \"Card\",\n props: CardSchema,\n description: \"Panel with a border; soft is a filled panel for summaries.\",\n component: ({ props, renderNode }) => {\n const isSoft = props.variant === \"soft\";\n return h(\n \"div\",\n {\n class: [\"openui-intelligent-card\", isSoft ? \"openui-intelligent-card--soft\" : \"openui-intelligent-card--outline\"],\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: space(props.gap) ?? tokens.spaceGroup,\n padding: space(props.padding) ?? tokens.spaceGroupLg,\n borderRadius: tokens.radiusLg,\n background: isSoft ? tokens.surface : tokens.canvas,\n border: isSoft ? \"1px solid transparent\" : `1px solid ${tokens.border}`,\n },\n },\n [renderNode(props.children)],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const CarouselSchema = z.object({\n children,\n itemWidth: z.number().optional(),\n gap: z.number().optional(),\n});\n\nexport type CarouselProps = z.infer<typeof CarouselSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CarouselSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Carousel = defineComponent({\n name: \"Carousel\",\n props: CarouselSchema,\n description:\n \"Horizontal row that scrolls and snaps, each child an item itemWidth px wide (default 240): photos, cards, options, days.\",\n component: ({ props, renderNode }) => {\n const itemWidth =\n typeof props.itemWidth === \"number\" && props.itemWidth > 0 ? props.itemWidth : 240;\n const list = Array.isArray(props.children) ? props.children.flat() : [];\n return h(\n \"div\",\n {\n class: \"openui-intelligent-carousel\",\n style: {\n display: \"flex\",\n flexDirection: \"row\",\n gap: space(props.gap) ?? tokens.spaceGroup,\n overflowX: \"auto\",\n scrollSnapType: \"x mandatory\",\n paddingBottom: \"4px\",\n },\n },\n list.map((child, idx) =>\n h(\n \"div\",\n {\n key: idx,\n style: {\n flex: `0 0 ${itemWidth}px`,\n maxWidth: \"100%\",\n scrollSnapAlign: \"start\",\n },\n },\n [renderNode(child)],\n ),\n ),\n );\n },\n});\n","import { z } from \"zod/v4\";\n\nexport const CelebrationSchema = z.object({ when: z.boolean() });\n\nexport type CelebrationProps = z.infer<typeof CelebrationSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, watch, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { CelebrationSchema, type CelebrationProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CONFETTI_COLORS = [\n tokens.chart1,\n tokens.chart2,\n tokens.chart3,\n tokens.chart4,\n tokens.chart5,\n tokens.chart6,\n];\n\nconst CelebrationImpl = vueComponent({\n name: \"OpenUIIntelligentCelebration\",\n props: {\n props: { type: Object as PropType<CelebrationProps>, required: true },\n },\n setup(p) {\n const streaming = useIsStreaming();\n const active = ref(false);\n let timer: ReturnType<typeof setTimeout> | null = null;\n\n watch(\n () => [p.props.when === true, streaming.value] as const,\n ([when, isStreaming], prev) => {\n const wasWhen = prev?.[0] ?? false;\n if (when && !isStreaming && !wasWhen) {\n active.value = true;\n if (timer) clearTimeout(timer);\n timer = setTimeout(() => {\n active.value = false;\n }, 2200);\n }\n },\n { immediate: true },\n );\n\n return () => {\n if (!active.value) return null;\n return h(\n \"div\",\n {\n \"aria-hidden\": \"true\",\n class: \"openui-intelligent-celebration\",\n style: {\n position: \"relative\",\n height: \"12px\",\n overflow: \"visible\",\n pointerEvents: \"none\",\n display: \"flex\",\n justifyContent: \"space-around\",\n },\n },\n Array.from({ length: 12 }, (_, i) =>\n h(\"span\", {\n key: i,\n style: {\n width: \"8px\",\n height: \"8px\",\n borderRadius: i % 2 === 0 ? \"999px\" : \"2px\",\n background: CONFETTI_COLORS[i % CONFETTI_COLORS.length],\n display: \"inline-block\",\n transform: `rotate(${(i * 37) % 360}deg)`,\n },\n }),\n ),\n );\n };\n },\n});\n\nexport const Celebration = defineComponent({\n name: \"Celebration\",\n props: CelebrationSchema,\n description:\n \"Bursts confetti when its condition turns true, e.g. Celebration($score == 5) at the end of a quiz.\",\n component: CelebrationImpl,\n});\n","import { z } from \"zod/v4\";\n\n/**\n * Unchanged from the kit's original Chart. The type is an ARGUMENT, not the\n * component name, because programs switch it at runtime:\n *\n * $type = \"bar\"\n * SegmentedControl($type, [\"bar\", \"line\", \"area\"])\n * chart = Chart($type, rows, \"year\", [...], null, $type != \"line\")\n *\n * Splitting this into BarChart/LineChart/AreaChart the way the chat and\n * dashboard kits do cannot express that, so the vocabulary stays as it is and\n * only the rendering moves to @openuidev/react-components.\n */\nexport const ChartSchema = z.object({\n type: z.enum([\"bar\", \"line\", \"area\", \"pie\", \"donut\", \"scatter\"]),\n data: z.array(z.record(z.string(), z.union([z.string(), z.number()]))),\n x: z.string().optional(),\n series: z.array(z.string()).optional(),\n format: z.enum([\"number\", \"percent\"]).optional(),\n stacked: z.boolean().optional(),\n height: z.number().optional(),\n});\n\nexport type ChartProps = z.infer<typeof ChartSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport {\n AreaChart,\n BarChart,\n LineChart,\n PieChart,\n ScatterChart,\n} from \"@wodecorp/openui-vue-ui\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { defaultLightTheme, useIntelligentTheme } from \"../../components/ThemeProvider\";\nimport { ChartSchema, type ChartProps } from \"./schema\";\n\nexport * from \"./schema\";\n\ntype Row = Record<string, string | number>;\n\nconst rowsOf = (data: unknown): Row[] =>\n Array.isArray(data) ? (data as Row[]).filter((r) => r && typeof r === \"object\") : [];\n\nconst categoryOf = (rows: Row[], x?: string): string => {\n if (x) return x;\n const first = rows[0] ?? {};\n return (\n Object.keys(first).find((k) => typeof first[k] === \"string\") ?? Object.keys(first)[0] ?? \"\"\n );\n};\n\nconst seriesOf = (rows: Row[], category: string, series?: string[]): string[] => {\n if (series?.length) return series;\n const first = rows[0] ?? {};\n return Object.keys(first).filter((k) => k !== category && typeof first[k] === \"number\");\n};\n\nconst narrow = (rows: Row[], category: string, series: string[]): Row[] =>\n rows.map((row) => {\n const out: Row = { [category]: row[category] ?? \"\" };\n for (const key of series) out[key] = typeof row[key] === \"number\" ? (row[key] as number) : 0;\n return out;\n });\n\nconst CHART_KEYS = [\n \"intelligentChart1\",\n \"intelligentChart2\",\n \"intelligentChart3\",\n \"intelligentChart4\",\n \"intelligentChart5\",\n \"intelligentChart6\",\n] as const;\n\nfunction seriesColours(\n themeCtx: ReturnType<typeof useIntelligentTheme>,\n count: number,\n): string[] {\n const source = themeCtx?.theme.value ?? defaultLightTheme;\n const colours = CHART_KEYS.map((key) => source[key] ?? defaultLightTheme[key] ?? \"#0285ff\");\n const ordered = Array.from(\n { length: Math.max(count, 1) },\n (_, i) => colours[i % colours.length]!,\n );\n if (ordered.length > 2 && ordered.length % 2 === 0) ordered.unshift(ordered.pop()!);\n return ordered;\n}\n\nconst ChartImpl = vueComponent({\n name: \"OpenUIIntelligentChart\",\n props: {\n props: { type: Object as PropType<ChartProps>, required: true },\n },\n setup(p) {\n const theme = useIntelligentTheme();\n\n return () => {\n const rows = rowsOf(p.props.data);\n const category = categoryOf(rows, p.props.x);\n const series = seriesOf(rows, category, p.props.series);\n const height = typeof p.props.height === \"number\" ? p.props.height : undefined;\n\n if (!rows.length || !category) return null;\n\n if (p.props.type === \"pie\" || p.props.type === \"donut\") {\n return h(PieChart as never, {\n data: rows,\n categoryKey: category,\n dataKey: series[0] ?? \"\",\n variant: p.props.type,\n format: p.props.format === \"percent\" ? \"percentage\" : \"number\",\n customPalette: seriesColours(theme, rows.length),\n isAnimationActive: false,\n });\n }\n\n if (p.props.type === \"scatter\") {\n const datasets = series.map((key) => ({\n name: key,\n data: rows.map((row) => ({ x: Number(row[category] ?? 0), y: Number(row[key] ?? 0) })),\n }));\n return h(ScatterChart as never, {\n data: datasets,\n xAxisDataKey: \"x\",\n yAxisDataKey: \"y\",\n height,\n customPalette: seriesColours(theme, datasets.length),\n isAnimationActive: false,\n });\n }\n\n const data = narrow(rows, category, series);\n const common = {\n data,\n categoryKey: category,\n height,\n customPalette: seriesColours(theme, series.length),\n isAnimationActive: false,\n };\n\n if (p.props.type === \"line\") return h(LineChart as never, common);\n if (p.props.type === \"area\") {\n return h(AreaChart as never, { ...common, stacked: p.props.stacked === true });\n }\n return h(BarChart as never, {\n ...common,\n variant: p.props.stacked ? \"stacked\" : \"grouped\",\n });\n };\n },\n});\n\nexport const Chart = defineComponent({\n name: \"Chart\",\n props: ChartSchema,\n description:\n 'Rows of data; x is the category key (a number key for scatter), series the value keys (default: every number key). format applies to pie and donut only: \"percent\" shows each slice as a share of the total, \"number\" its value. stacked stacks bar and area series. height sets the plot height in px; pie and donut ignore it and size themselves.',\n component: ChartImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const CheckboxSchema = z.object({\n checked: reactive(z.boolean()),\n label: z.string(),\n lineThrough: z.boolean().optional(),\n rules: rulesSchema.optional(),\n});\nexport type CheckboxProps = z.infer<typeof CheckboxSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useFieldName, useFieldRules } from \"../controls\";\nimport { CheckboxSchema, type CheckboxProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CheckboxImpl = vueComponent({\n name: \"OpenUIIntelligentCheckbox\",\n props: {\n props: { type: Object as PropType<CheckboxProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.checked);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const checked = field.value === true;\n return h(\"div\", { class: \"openui-intelligent-checkbox\", style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" } }, [\n h(\n \"label\",\n {\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"8px\",\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n fontSize: \"14px\",\n color: checked && p.props.lineThrough ? tokens.muted : tokens.ink,\n textDecoration: checked && p.props.lineThrough ? \"line-through\" : undefined,\n },\n },\n [\n h(\"input\", {\n type: \"checkbox\",\n checked,\n disabled: streaming.value,\n style: { width: \"16px\", height: \"16px\", accentColor: tokens.ink },\n onChange: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLInputElement).checked);\n },\n }),\n h(\"span\", null, [\n str(p.props.label),\n rules.required.value\n ? h(\"span\", { style: { color: tokens.danger, marginLeft: \"4px\" } }, \"*\")\n : null,\n ]),\n ],\n ),\n rules.error.value\n ? h(\"div\", { role: \"alert\", style: { fontSize: \"12px\", color: tokens.danger } }, rules.error.value)\n : null,\n ]);\n };\n },\n});\n\nexport const Checkbox = defineComponent({\n name: \"Checkbox\",\n props: CheckboxSchema,\n description: \"lineThrough strikes the label when checked, for to-do lists. rules takes only required.\",\n component: CheckboxImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const CodeSchema = z.object({ code: z.string(), language: z.string().optional() });\n\nexport type CodeProps = z.infer<typeof CodeSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { CodeBlock } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { CodeSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Code = defineComponent({\n name: \"Code\",\n props: CodeSchema,\n description: \"Code block with a copy button.\",\n component: ({ props }) =>\n h(CodeBlock, {\n language: str(props.language) || \"text\",\n codeString: str(props.code),\n }),\n});\n","import { z } from \"zod/v4\";\nimport { align, children } from \"../schemas\";\n\nexport const ColSchema = z.object({\n children,\n gap: z.number().optional(),\n align: align.optional(),\n});\n\nexport type ColProps = z.infer<typeof ColSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { RootTheme } from \"../../components/ThemeProvider\";\nimport { flexStyle } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { ColSchema, type ColProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ColImpl = vueComponent({\n name: \"OpenUIIntelligentCol\",\n inheritAttrs: false,\n props: {\n props: { type: Object as PropType<ColProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n statementId: String,\n },\n setup(p) {\n return () => {\n const col = h(\n \"div\",\n {\n class: \"openui-intelligent-col\",\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: p.props.gap !== undefined ? undefined : tokens.spaceGroup,\n ...flexStyle(p.props, true),\n },\n },\n p.renderNode(p.props.children),\n );\n return p.statementId === \"root\" ? h(RootTheme, null, { default: () => col }) : col;\n };\n },\n});\n\nexport const Col = defineComponent({\n name: \"Col\",\n props: ColSchema,\n description: \"Vertical layout. Without gap it spaces blocks like an article.\",\n component: ColImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const DatePickerSchema = z.object({\n value: reactive(z.string()),\n label: z.string().optional(),\n min: z.string().optional(),\n max: z.string().optional(),\n rules: rulesSchema.optional(),\n});\nexport type DatePickerProps = z.infer<typeof DatePickerSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { DatePickerSchema, type DatePickerProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst DatePickerImpl = vueComponent({\n name: \"OpenUIIntelligentDatePicker\",\n props: {\n props: { type: Object as PropType<DatePickerProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () =>\n renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\"input\", {\n type: \"date\",\n value: field.value == null ? \"\" : String(field.value),\n min: p.props.min ? str(p.props.min) : undefined,\n max: p.props.max ? str(p.props.max) : undefined,\n disabled: streaming.value,\n class: \"openui-intelligent-date-picker\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n boxSizing: \"border-box\",\n },\n onInput: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLInputElement).value);\n },\n onBlur: () => rules.check(),\n }),\n });\n },\n});\n\nexport const DatePicker = defineComponent({\n name: \"DatePicker\",\n props: DatePickerSchema,\n description: 'Dates, min and max are \"YYYY-MM-DD\". rules takes only required.',\n component: DatePickerImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const DividerSchema = z.object({});\n\nexport type DividerProps = z.infer<typeof DividerSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { DividerSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Divider = defineComponent({\n name: \"Divider\",\n props: DividerSchema,\n description: \"A thin horizontal rule between blocks.\",\n component: () =>\n h(\"hr\", {\n class: \"openui-intelligent-divider\",\n style: {\n border: \"none\",\n borderTop: `1px solid ${tokens.border}`,\n margin: \"4px 0\",\n width: \"100%\",\n },\n }),\n});\n","import { z } from \"zod/v4\";\nimport { slot } from \"../schemas\";\n\nexport const FlashcardSchema = z.object({ front: slot, back: slot, hint: z.string().optional() });\n\nexport type FlashcardProps = z.infer<typeof FlashcardSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderSlot } from \"../schemas\";\nimport { FlashcardSchema, type FlashcardProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst FlashcardImpl = vueComponent({\n name: \"OpenUIIntelligentFlashcard\",\n props: {\n props: { type: Object as PropType<FlashcardProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n const flipped = ref(false);\n return () => {\n const face = flipped.value ? p.props.back : p.props.front;\n const content =\n typeof face === \"string\"\n ? h(\"div\", { style: { fontSize: \"20px\", fontWeight: 600, color: tokens.ink, textAlign: \"center\" } }, face)\n : renderSlot(face, p.renderNode);\n const hint = str(p.props.hint);\n return h(\n \"button\",\n {\n type: \"button\",\n \"aria-pressed\": flipped.value,\n class: [\"openui-intelligent-flashcard\", flipped.value ? \"openui-intelligent-flashcard--back\" : \"openui-intelligent-flashcard--front\"],\n style: {\n width: \"100%\",\n minHeight: \"140px\",\n padding: \"20px\",\n borderRadius: tokens.radiusLg,\n border: `1px solid ${tokens.borderStrong}`,\n background: flipped.value ? tokens.surface : tokens.canvas,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: \"10px\",\n cursor: \"pointer\",\n font: \"inherit\",\n color: tokens.ink,\n },\n onClick: () => {\n flipped.value = !flipped.value;\n },\n },\n [\n content,\n !flipped.value && hint\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, hint)\n : h(\"span\", { style: { fontSize: \"11px\", color: tokens.faint } }, flipped.value ? \"Back · tap to flip\" : \"Tap to flip\"),\n ],\n );\n };\n },\n});\n\nexport const Flashcard = defineComponent({\n name: \"Flashcard\",\n props: FlashcardSchema,\n description:\n \"Card that flips between front and back when tapped. Put several in a Carousel or Grid.\",\n component: FlashcardImpl,\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const FormSchema = z.object({\n children,\n});\n\nexport type FormProps = z.infer<typeof FormSchema>;\n","import {\n defineComponent,\n FormNameContext,\n FormValidationContext,\n useCreateFormValidation,\n} from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, provide, useId, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { FormSchema, type FormProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst FormImpl = vueComponent({\n name: \"OpenUIIntelligentForm\",\n props: {\n props: { type: Object as PropType<FormProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n statementId: String,\n },\n setup(p) {\n const id = useId();\n const validation = useCreateFormValidation();\n provide(FormValidationContext, validation);\n provide(FormNameContext, () => p.statementId ?? id);\n\n return () =>\n h(\n \"form\",\n {\n class: \"openui-intelligent-form\",\n novalidate: true,\n style: { display: \"flex\", flexDirection: \"column\", gap: tokens.spaceGroupLg },\n onSubmit: (e: Event) => {\n e.preventDefault();\n },\n },\n p.renderNode(p.props.children),\n );\n },\n});\n\nexport const Form = defineComponent({\n name: \"Form\",\n props: FormSchema,\n description:\n \"Groups fields; their values go with any @ToAssistant inside, once every field's rules pass.\",\n component: FormImpl,\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\nexport const GridSchema = z.object({\n children,\n columns: z.number().optional(),\n minChildWidth: z.number().optional(),\n gap: z.number().optional(),\n});\n\nexport type GridProps = z.infer<typeof GridSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { space } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { GridSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Grid = defineComponent({\n name: \"Grid\",\n props: GridSchema,\n description:\n \"Equal columns, 1 to 12 (default 2). With minChildWidth (px), columns drop on narrow screens.\",\n component: ({ props, renderNode }) => {\n const cols =\n typeof props.columns === \"number\" && Number.isFinite(props.columns)\n ? Math.min(12, Math.max(1, Math.round(props.columns)))\n : 2;\n const minW =\n typeof props.minChildWidth === \"number\" && props.minChildWidth > 0\n ? Math.round(props.minChildWidth)\n : undefined;\n const template = minW\n ? `repeat(auto-fit, minmax(min(${minW}px, 100%), 1fr))`\n : `repeat(${cols}, minmax(0, 1fr))`;\n return h(\n \"div\",\n {\n class: \"openui-intelligent-grid\",\n style: {\n display: \"grid\",\n gridTemplateColumns: template,\n gap: space(props.gap) ?? tokens.spaceGroup,\n },\n },\n [renderNode(props.children)],\n );\n },\n});\n","import { computed, type ComputedRef } from \"vue\";\nimport { useTheme } from \"@wodecorp/openui-vue-ui\";\nimport { useIntelligentTheme } from \"../components/ThemeProvider\";\n\nexport function useThemeMode(): ComputedRef<\"light\" | \"dark\"> {\n const intelligent = useIntelligentTheme();\n const components = useTheme();\n return computed(() => intelligent?.mode.value ?? components.mode.value ?? \"light\");\n}\n","import { z } from \"zod/v4\";\n\nexport const HtmlViewSchema = z.object({\n html: z.string(),\n height: z.number().optional(),\n title: z.string().optional(),\n});\n\nexport type HtmlViewProps = z.infer<typeof HtmlViewSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport {\n computed,\n defineComponent as vueComponent,\n h,\n onBeforeUnmount,\n onMounted,\n ref,\n type PropType,\n} from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useThemeMode } from \"../../shared/useThemeMode\";\nimport { HtmlViewSchema, type HtmlViewProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst CDNS =\n \"https://cdn.jsdelivr.net https://unpkg.com https://cdnjs.cloudflare.com https://esm.sh\";\n\nconst CSP = [\n \"default-src 'none'\",\n `script-src 'unsafe-inline' ${CDNS}`,\n `style-src 'unsafe-inline' ${CDNS} https://fonts.googleapis.com`,\n \"font-src https://fonts.gstatic.com data:\",\n \"img-src data: blob: https:\",\n \"media-src data: blob:\",\n `connect-src ${CDNS}`,\n \"frame-src 'none'\",\n \"form-action 'none'\",\n \"base-uri 'none'\",\n].join(\"; \");\n\nconst MIN_HEIGHT = 80;\nconst MAX_HEIGHT = 2400;\nconst AUTO_START = 360;\n\nconst REPORTER = `<script>(function(){var last=0;function send(){var h=Math.ceil(document.documentElement.getBoundingClientRect().height);if(Math.abs(h-last)>1){last=h;parent.postMessage({type:\"openui-intelligent-html-view-height\",height:h},\"*\")}}addEventListener(\"message\",function(e){if(e.source===parent&&e.data===\"openui-intelligent-html-view-measure\"){last=0;send()}});addEventListener(\"load\",send);new ResizeObserver(send).observe(document.documentElement);send()})()</script>`;\n\nfunction documentFor(html: string, scheme: \"light\" | \"dark\"): string {\n return `<!doctype html><meta charset=\"utf-8\"><meta http-equiv=\"Content-Security-Policy\" content=\"${CSP}\"><meta name=\"viewport\" content=\"width=device-width,initial-scale=1\"><style>:root{color-scheme:${scheme}}html,body{margin:0}body{font:14px/1.5 -apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif}</style>${REPORTER}${html}`;\n}\n\nconst HtmlViewImpl = vueComponent({\n name: \"OpenUIIntelligentHtmlView\",\n props: {\n props: { type: Object as PropType<HtmlViewProps>, required: true },\n },\n setup(p) {\n const streaming = useIsStreaming();\n const scheme = useThemeMode();\n const frameRef = ref<HTMLIFrameElement | null>(null);\n const measured = ref<number | null>(null);\n\n const fixed = computed(() =>\n typeof p.props.height === \"number\" && p.props.height > 0\n ? Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, p.props.height))\n : null,\n );\n const srcDoc = computed(() =>\n documentFor(typeof p.props.html === \"string\" ? p.props.html : \"\", scheme.value),\n );\n\n const onMessage = (event: MessageEvent) => {\n if (fixed.value !== null) return;\n if (event.source !== frameRef.value?.contentWindow) return;\n const data = event.data as { type?: unknown; height?: unknown };\n if (\n data?.type === \"openui-intelligent-html-view-height\" &&\n typeof data.height === \"number\" &&\n Number.isFinite(data.height)\n ) {\n measured.value = Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, data.height));\n }\n };\n\n onMounted(() => {\n if (typeof window === \"undefined\") return;\n window.addEventListener(\"message\", onMessage);\n frameRef.value?.contentWindow?.postMessage(\"openui-intelligent-html-view-measure\", \"*\");\n });\n\n onBeforeUnmount(() => {\n if (typeof window !== \"undefined\") window.removeEventListener(\"message\", onMessage);\n });\n\n return () => {\n const boxHeight = fixed.value ?? measured.value ?? AUTO_START;\n return h(\n \"div\",\n {\n class: \"openui-intelligent-html-view\",\n style: {\n width: \"100%\",\n height: `${boxHeight}px`,\n borderRadius: tokens.radiusMd,\n border: `1px solid ${tokens.border}`,\n overflow: \"hidden\",\n background: tokens.surface,\n },\n },\n streaming.value\n ? [\n h(\n \"div\",\n {\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n height: \"100%\",\n color: tokens.muted,\n fontSize: \"13px\",\n },\n },\n \"Preparing the interactive view…\",\n ),\n ]\n : [\n h(\"iframe\", {\n ref: frameRef,\n title: p.props.title || \"Interactive view\",\n sandbox: \"allow-scripts\",\n srcdoc: srcDoc.value,\n referrerpolicy: \"no-referrer\",\n loading: \"lazy\",\n style: { width: \"100%\", height: \"100%\", border: \"none\", display: \"block\" },\n }),\n ],\n );\n };\n },\n});\n\nexport const HtmlView = defineComponent({\n name: \"HtmlView\",\n props: HtmlViewSchema,\n description:\n \"Sandboxed HTML page with inline JS, for games and canvas. No network except script CDNs. Fits its content unless height is set.\",\n component: HtmlViewImpl,\n});\n","import { z } from \"zod/v4\";\nimport { color } from \"../schemas\";\n\nexport const IconSchema = z.object({\n name: z.string(),\n size: z.enum([\"sm\", \"md\", \"lg\", \"xl\"]).optional(),\n color: color.optional(),\n});\n\nexport type IconProps = z.infer<typeof IconSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { IconSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ICON_SIZES: Record<string, number> = {\n sm: 14,\n md: 18,\n lg: 22,\n xl: 28,\n};\n\nexport const Icon = defineComponent({\n name: \"Icon\",\n props: IconSchema,\n description: 'Lucide icon by name, e.g. \"map-pin\".',\n component: ({ props }) =>\n h(LucideIconView, {\n name: str(props.name),\n size: ICON_SIZES[props.size ?? \"md\"] ?? 18,\n color: props.color,\n }),\n});\n","import { action } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const IconButtonSchema = z.object({\n icon: z.string(),\n action: action().optional(),\n label: z.string().optional(),\n variant: z.enum([\"outline\", \"ghost\", \"solid\"]).optional(),\n});\n\nexport type IconButtonProps = z.infer<typeof IconButtonSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type CSSProperties, type PropType } from \"vue\";\nimport { LucideIconView } from \"../../components/LucideIcon\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useRunAction } from \"../controls\";\nimport { IconButtonSchema, type IconButtonProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst IconButtonImpl = vueComponent({\n name: \"OpenUIIntelligentIconButton\",\n props: {\n props: { type: Object as PropType<IconButtonProps>, required: true },\n },\n setup(p) {\n const run = useRunAction();\n const streaming = useIsStreaming();\n\n return () => {\n const variant = p.props.variant ?? \"outline\";\n const label = str(p.props.label) || str(p.props.icon);\n const disabled = streaming.value;\n const variantStyle: CSSProperties =\n variant === \"solid\"\n ? { background: tokens.ink, color: tokens.onInk, border: \"1px solid transparent\" }\n : variant === \"ghost\"\n ? { background: \"transparent\", color: tokens.ink, border: \"1px solid transparent\" }\n : { background: tokens.canvas, color: tokens.ink, border: `1px solid ${tokens.borderStrong}` };\n\n return h(\n \"button\",\n {\n type: \"button\",\n disabled,\n \"aria-label\": label,\n title: label,\n class: \"openui-intelligent-icon-button\",\n style: {\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: \"34px\",\n height: \"34px\",\n borderRadius: \"999px\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n opacity: disabled ? 0.55 : 1,\n ...variantStyle,\n },\n onClick: () => {\n if (disabled) return;\n run(label, p.props.action, false);\n },\n },\n [h(LucideIconView, { name: str(p.props.icon), size: 16 })],\n );\n };\n },\n});\n\nexport const IconButton = defineComponent({\n name: \"IconButton\",\n props: IconButtonSchema,\n description: \"Round icon-only button; label is read aloud. Needs an action.\",\n component: IconButtonImpl,\n});\n","import { z } from \"zod/v4\";\nimport { fitSchema, radiusSchema } from \"../schemas\";\n\nexport const ImageSchema = z.object({\n src: z.string(),\n alt: z.string(),\n aspectRatio: z.number().optional(),\n radius: radiusSchema.optional(),\n fit: fitSchema.optional(),\n});\n\nexport type ImageProps = z.infer<typeof ImageSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { radius } from \"../../shared/props\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { webUrl } from \"../../shared/url\";\nimport { ImageSchema, type ImageProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst ImageImpl = vueComponent({\n name: \"OpenUIIntelligentImage\",\n props: {\n props: { type: Object as PropType<ImageProps>, required: true },\n },\n setup(p) {\n const failed = ref(false);\n return () => {\n const safe = webUrl(p.props.src);\n const ratio =\n typeof p.props.aspectRatio === \"number\" && Number.isFinite(p.props.aspectRatio)\n ? Math.min(5, Math.max(0.2, p.props.aspectRatio))\n : 1.5;\n const borderRadius = radius(p.props.radius) ?? tokens.radiusMd;\n const boxStyle = {\n width: \"100%\",\n aspectRatio: String(ratio),\n borderRadius,\n overflow: \"hidden\",\n background: tokens.photoEmpty,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n if (!safe || failed.value) {\n return h(\n \"div\",\n {\n role: \"img\",\n \"aria-label\": str(p.props.alt) || \"Image unavailable\",\n class: \"openui-intelligent-image openui-intelligent-image--empty\",\n style: boxStyle,\n },\n [\n h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, str(p.props.alt) || \"Image\"),\n ],\n );\n }\n return h(\"div\", { class: \"openui-intelligent-image\", style: boxStyle }, [\n h(\"img\", {\n src: safe,\n alt: str(p.props.alt),\n loading: \"lazy\",\n referrerpolicy: \"no-referrer\",\n style: {\n width: \"100%\",\n height: \"100%\",\n objectFit: p.props.fit === \"contain\" ? \"contain\" : \"cover\",\n display: \"block\",\n },\n onError: () => {\n failed.value = true;\n },\n }),\n ]);\n };\n },\n});\n\nexport const Image = defineComponent({\n name: \"Image\",\n props: ImageSchema,\n description:\n \"Photo from a URL the user or a tool gave; never invent a URL. If it fails to load, an empty photo placeholder shows. aspectRatio is 0.2 to 5 (default 1.5).\",\n component: ImageImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const InputSchema = z.object({\n value: reactive(z.union([z.string(), z.number()])),\n label: z.string().optional(),\n type: z.enum([\"text\", \"number\"]).optional(),\n placeholder: z.string().optional(),\n rules: rulesSchema.optional(),\n});\nexport type InputProps = z.infer<typeof InputSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { InputSchema, type InputProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst InputImpl = vueComponent({\n name: \"OpenUIIntelligentInput\",\n props: {\n props: { type: Object as PropType<InputProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(\n () => p.props.label,\n () => p.statementId,\n );\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const isNumber = p.props.type === \"number\";\n const val = field.value == null ? \"\" : String(field.value);\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\"input\", {\n type: isNumber ? \"number\" : \"text\",\n value: val,\n placeholder: p.props.placeholder ? str(p.props.placeholder) : undefined,\n disabled: streaming.value,\n class: \"openui-intelligent-input\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n outline: \"none\",\n boxSizing: \"border-box\",\n },\n onInput: (e: Event) => {\n const raw = (e.target as HTMLInputElement).value;\n rules.clear();\n if (isNumber) {\n if (raw.trim() === \"\") {\n field.setValue(null as never);\n } else {\n const parsed = Number(raw);\n field.setValue((Number.isFinite(parsed) ? parsed : null) as never);\n }\n } else {\n field.setValue(raw);\n }\n },\n onBlur: () => rules.check(),\n }),\n });\n };\n },\n});\n\nexport const Input = defineComponent({\n name: \"Input\",\n props: InputSchema,\n description: \"Text or number field; a number field stores numbers, and null when emptied.\",\n component: InputImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const LabelSchema = z.object({ text: z.string() });\n\nexport type LabelProps = z.infer<typeof LabelSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { LabelSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Label = defineComponent({\n name: \"Label\",\n props: LabelSchema,\n description: \"Field or group label.\",\n component: ({ props }) =>\n h(\n \"span\",\n {\n class: \"openui-intelligent-label\",\n style: {\n fontSize: \"12px\",\n fontWeight: 600,\n letterSpacing: \"0.02em\",\n color: tokens.muted,\n },\n },\n str(props.text),\n ),\n});\n","import { z } from \"zod/v4\";\n\nexport const LinkSchema = z.object({ text: z.string(), url: z.string() });\n\nexport type LinkProps = z.infer<typeof LinkSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { webUrl } from \"../../shared/url\";\nimport { LinkSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Link = defineComponent({\n name: \"Link\",\n props: LinkSchema,\n description: \"Opens an http(s) URL in a new tab.\",\n component: ({ props }) => {\n const safe = webUrl(props.url);\n const label = str(props.text);\n if (!safe) {\n return h(\"span\", { class: \"openui-intelligent-link\" }, label);\n }\n return h(\n \"a\",\n {\n class: \"openui-intelligent-link\",\n href: safe,\n target: \"_blank\",\n rel: \"noopener noreferrer\",\n style: {\n color: tokens.info,\n textDecoration: \"underline\",\n textUnderlineOffset: \"2px\",\n },\n },\n label,\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { children } from \"../schemas\";\n\ntype RefComponent = { ref: z.core.$ZodType };\n\nexport const ListItemSchema = z.object({\n title: z.string(),\n description: z.string().optional(),\n marker: z.string().optional(),\n children: children.optional(),\n});\n\nexport type ListItemProps = z.infer<typeof ListItemSchema>;\n\nexport function createListSchema(ListItem: RefComponent) {\n return z.object({\n items: z.array(z.union([z.string(), ListItem.ref])),\n marker: z.enum([\"bullet\", \"number\", \"none\"]).optional(),\n timeline: z.boolean().optional(),\n });\n}\n\nexport type ListProps = z.infer<ReturnType<typeof createListSchema>>;\n","import { defineComponent, type ElementNode } from \"@wodecorp/openui-vue-lang\";\nimport { h, type VNodeChild } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { isElement, renderInlineMarkdown, type Render } from \"../schemas\";\nimport { createListSchema, ListItemSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\ntype ItemProps = { title?: unknown; description?: unknown; marker?: unknown; children?: unknown };\n\nfunction renderItemBody(props: ItemProps, renderNode: Render): VNodeChild {\n return h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"4px\", minWidth: 0, flex: 1 } }, [\n h(\"div\", { style: { fontWeight: 500, color: tokens.ink, lineHeight: 1.45 } }, [renderInlineMarkdown(str(props.title))]),\n props.description\n ? h(\"div\", { style: { fontSize: \"13px\", color: tokens.muted, lineHeight: 1.45 } }, [renderInlineMarkdown(str(props.description))])\n : null,\n props.children ? h(\"div\", { style: { marginTop: \"4px\" } }, [renderNode(props.children)]) : null,\n ]);\n}\n\nexport const ListItem = defineComponent({\n name: \"ListItem\",\n props: ListItemSchema,\n description: \"marker replaces the bullet or number, e.g. a time or an emoji.\",\n component: ({ props, renderNode }) =>\n h(\n \"div\",\n { class: \"openui-intelligent-list-item\", style: { display: \"flex\", gap: \"8px\", alignItems: \"flex-start\" } },\n [\n typeof props.marker === \"string\" && props.marker\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted, flexShrink: 0 } }, props.marker)\n : null,\n renderItemBody(props, renderNode),\n ],\n ),\n});\n\nconst isItem = (value: unknown): value is ElementNode =>\n isElement(value) && value.typeName === \"ListItem\";\n\nexport const List = defineComponent({\n name: \"List\",\n props: createListSchema(ListItem),\n description: \"timeline joins the markers with a line.\",\n component: ({ props, renderNode }) => {\n const items = (Array.isArray(props.items) ? props.items.flat() : []).filter((item) => item != null);\n const markerMode = props.marker ?? \"bullet\";\n const isTimeline = props.timeline === true;\n return h(\n markerMode === \"number\" ? \"ol\" : \"ul\",\n {\n class: [\"openui-intelligent-list\", isTimeline ? \"openui-intelligent-list--timeline\" : null],\n style: {\n listStyle: \"none\",\n margin: 0,\n padding: 0,\n display: \"flex\",\n flexDirection: \"column\",\n gap: isTimeline ? \"12px\" : \"8px\",\n },\n },\n items.map((item, idx) => {\n const itemProps = isItem(item) ? (item.props as ItemProps) : null;\n const customMarker = itemProps && typeof itemProps.marker === \"string\" ? itemProps.marker : undefined;\n const markerNode =\n customMarker ??\n (markerMode === \"none\" ? null : markerMode === \"number\" ? `${idx + 1}.` : \"•\");\n return h(\n \"li\",\n {\n key: idx,\n style: {\n display: \"flex\",\n gap: \"10px\",\n alignItems: \"flex-start\",\n position: \"relative\",\n paddingLeft: isTimeline ? \"4px\" : undefined,\n borderLeft: isTimeline ? `2px solid ${tokens.borderStrong}` : undefined,\n },\n },\n [\n markerNode\n ? h(\n \"span\",\n {\n style: {\n minWidth: customMarker ? \"auto\" : \"18px\",\n fontSize: \"13px\",\n color: tokens.muted,\n fontWeight: 500,\n flexShrink: 0,\n },\n },\n markerNode,\n )\n : null,\n itemProps\n ? renderItemBody(itemProps, renderNode)\n : h(\"div\", { style: { flex: 1, lineHeight: 1.5, color: tokens.ink } }, [renderInlineMarkdown(str(item))]),\n ],\n );\n }),\n );\n },\n});\n","import { z } from \"zod/v4\";\n\nexport const MarkdownSchema = z.object({ text: z.string() });\n\nexport type MarkdownProps = z.infer<typeof MarkdownSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { MarkDownRenderer } from \"@wodecorp/openui-vue-ui\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { MarkdownSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Markdown = defineComponent({\n name: \"Markdown\",\n props: MarkdownSchema,\n description: \"Prose with headings, lists, quotes, code and tables.\",\n component: ({ props }) =>\n h(MarkDownRenderer, {\n textMarkdown: str(props.text),\n className: \"openui-intelligent-markdown\",\n }),\n});\n","import { z } from \"zod/v4\";\n\nexport const MathSchema = z.object({ tex: z.string(), inline: z.boolean().optional() });\n\nexport type MathProps = z.infer<typeof MathSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport katex from \"katex\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { MathSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const MathBlock = defineComponent({\n name: \"Math\",\n props: MathSchema,\n description: 'LaTeX formula, e.g. Math(\"E = mc^2\"); inline true to sit in a Text list.',\n component: ({ props }) => {\n const tex = str(props.tex);\n const inline = props.inline === true;\n let html = \"\";\n try {\n html = katex.renderToString(tex, {\n displayMode: !inline,\n throwOnError: false,\n strict: false,\n });\n } catch {\n return h(inline ? \"span\" : \"div\", { class: \"openui-intelligent-math\" }, tex);\n }\n return h(inline ? \"span\" : \"div\", {\n class: [\"openui-intelligent-math\", inline ? \"openui-intelligent-math--inline\" : \"openui-intelligent-math--block\"],\n style: inline ? undefined : { overflowX: \"auto\", padding: \"4px 0\" },\n innerHTML: html,\n });\n },\n});\n","import { z } from \"zod/v4\";\nimport { slot } from \"../schemas\";\n\nexport const PopoverSchema = z.object({ trigger: slot, content: slot });\n\nexport type PopoverProps = z.infer<typeof PopoverSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderSlot } from \"../schemas\";\nimport { PopoverSchema, type PopoverProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PopoverImpl = vueComponent({\n name: \"OpenUIIntelligentPopover\",\n props: {\n props: { type: Object as PropType<PopoverProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n const open = ref(false);\n return () =>\n h(\n \"span\",\n {\n class: \"openui-intelligent-popover\",\n style: { position: \"relative\", display: \"inline-flex\", alignItems: \"center\" },\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 display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"4px\",\n background: \"transparent\",\n border: \"none\",\n padding: \"2px 4px\",\n cursor: \"pointer\",\n color: \"inherit\",\n font: \"inherit\",\n borderRadius: tokens.radiusSm,\n },\n },\n [renderSlot(p.props.trigger, p.renderNode)],\n ),\n open.value\n ? h(\n \"div\",\n {\n role: \"dialog\",\n class: \"openui-intelligent-popover-panel\",\n style: {\n position: \"absolute\",\n top: \"calc(100% + 6px)\",\n left: 0,\n zIndex: 40,\n minWidth: \"200px\",\n maxWidth: \"320px\",\n padding: tokens.spaceGroup,\n borderRadius: tokens.radiusMd,\n background: tokens.canvas,\n color: tokens.ink,\n border: `1px solid ${tokens.borderStrong}`,\n boxShadow: tokens.shadow,\n },\n },\n [renderSlot(p.props.content, p.renderNode)],\n )\n : null,\n ],\n );\n },\n});\n\nexport const Popover = defineComponent({\n name: \"Popover\",\n props: PopoverSchema,\n description:\n 'Shows content in a small panel when the trigger is clicked: a definition, a source, details behind an Icon(\"info\", \"sm\"). The trigger is text or an Icon, never a Button: it is a button already.',\n component: PopoverImpl,\n});\n","import { action } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { children, color, radiusSchema } from \"../schemas\";\n\nexport const PressableSchema = z.object({\n children,\n action: action().optional(),\n selected: z.boolean().optional(),\n padding: z.number().optional(),\n background: color.optional(),\n radius: radiusSchema.optional(),\n});\n\nexport type PressableProps = z.infer<typeof PressableSchema>;\n","import { defineComponent, useIsStreaming } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, ref, type CSSProperties, type PropType } from \"vue\";\nimport { onColor } from \"../../shared/color\";\nimport { bg, radius, space } from \"../../shared/props\";\nimport { textOf } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useRunAction } from \"../controls\";\nimport { PressableSchema, type PressableProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst PressableImpl = vueComponent({\n name: \"OpenUIIntelligentPressable\",\n props: {\n props: { type: Object as PropType<PressableProps>, required: true },\n renderNode: { type: Function as PropType<(v: unknown) => any>, required: true },\n },\n setup(p) {\n const run = useRunAction();\n const streaming = useIsStreaming();\n const elRef = ref<HTMLElement | null>(null);\n\n return () => {\n const selected = p.props.selected === true;\n const disabled = streaming.value;\n const style: CSSProperties = {\n display: \"flex\",\n flexDirection: \"column\",\n textAlign: \"left\",\n padding: space(p.props.padding) ?? tokens.spaceGroup,\n borderRadius: radius(p.props.radius) ?? tokens.radiusMd,\n background: bg(p.props.background) ?? (selected ? tokens.surfaceStrong : tokens.canvas),\n border: selected ? `2px solid ${tokens.ink}` : `1px solid ${tokens.border}`,\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n width: \"100%\",\n font: \"inherit\",\n color: \"inherit\",\n ...onColor(p.props.background),\n };\n return h(\n \"button\",\n {\n ref: elRef,\n type: \"button\",\n disabled,\n \"aria-pressed\": selected,\n class: [\"openui-intelligent-pressable\", selected ? \"openui-intelligent-pressable--selected\" : null],\n style,\n onClick: () => {\n if (disabled) return;\n run(textOf(elRef.value), p.props.action, false);\n },\n },\n p.renderNode(p.props.children),\n );\n };\n },\n});\n\nexport const Pressable = defineComponent({\n name: \"Pressable\",\n props: PressableSchema,\n description: \"Makes any content clickable, such as a tile or a swatch. Needs an action.\",\n component: PressableImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const QuoteSchema = z.object({ text: z.string(), cite: z.string().optional() });\n\nexport type QuoteProps = z.infer<typeof QuoteSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderInlineMarkdown } from \"../schemas\";\nimport { QuoteSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Quote = defineComponent({\n name: \"Quote\",\n props: QuoteSchema,\n description: \"A quotation or a callout with a side rule; cite names the source.\",\n component: ({ props }) =>\n h(\n \"blockquote\",\n {\n class: \"openui-intelligent-quote\",\n style: {\n margin: 0,\n padding: \"8px 14px\",\n borderLeft: `3px solid ${tokens.borderStrong}`,\n background: tokens.surface,\n borderRadius: `0 ${tokens.radiusSm} ${tokens.radiusSm} 0`,\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"6px\",\n },\n },\n [\n h(\"div\", { style: { color: tokens.ink, lineHeight: 1.55 } }, [renderInlineMarkdown(str(props.text))]),\n props.cite\n ? h(\"cite\", { style: { fontSize: \"12px\", color: tokens.muted, fontStyle: \"normal\" } }, `— ${str(props.cite)}`)\n : null,\n ],\n ),\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { choice } from \"../controls\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const RadioGroupSchema = z.object({\n value: reactive(z.string()),\n options: z.array(choice),\n label: z.string().optional(),\n variant: z.enum([\"list\", \"pills\", \"cards\"]).optional(),\n rules: rulesSchema.optional(),\n});\nexport type RadioGroupProps = z.infer<typeof RadioGroupSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { choiceList, renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { RadioGroupSchema, type RadioGroupProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst RadioGroupImpl = vueComponent({\n name: \"OpenUIIntelligentRadioGroup\",\n props: {\n props: { type: Object as PropType<RadioGroupProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const choices = choiceList(p.props.options);\n const current = field.value == null ? \"\" : String(field.value);\n const variant = p.props.variant ?? \"list\";\n\n const control = h(\n \"div\",\n {\n role: \"radiogroup\",\n class: `openui-intelligent-radio-group openui-intelligent-radio-group--${variant}`,\n style: {\n display: \"flex\",\n flexDirection: variant === \"pills\" ? \"row\" : \"column\",\n flexWrap: variant === \"pills\" ? \"wrap\" : undefined,\n gap: \"8px\",\n },\n },\n choices.map((item) => {\n const selected = current === item.value;\n if (variant === \"pills\") {\n return h(\n \"button\",\n {\n key: item.value,\n type: \"button\",\n role: \"radio\",\n \"aria-checked\": selected,\n disabled: streaming.value,\n style: {\n padding: \"6px 12px\",\n borderRadius: \"999px\",\n fontSize: \"13px\",\n fontWeight: 500,\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n background: selected ? tokens.ink : tokens.surface,\n color: selected ? tokens.onInk : tokens.ink,\n border: `1px solid ${selected ? tokens.ink : tokens.border}`,\n },\n onClick: () => {\n if (streaming.value) return;\n rules.clear();\n field.setValue(item.value);\n },\n },\n item.label,\n );\n }\n\n return h(\n \"label\",\n {\n key: item.value,\n style: {\n display: \"flex\",\n alignItems: \"flex-start\",\n gap: \"8px\",\n padding: variant === \"cards\" ? \"10px 12px\" : \"4px 0\",\n borderRadius: variant === \"cards\" ? tokens.radiusMd : undefined,\n border: variant === \"cards\"\n ? `1px solid ${selected ? tokens.ink : tokens.border}`\n : undefined,\n background: variant === \"cards\" && selected ? tokens.surface : undefined,\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n },\n },\n [\n h(\"input\", {\n type: \"radio\",\n name: fieldName.value,\n value: item.value,\n checked: selected,\n disabled: streaming.value,\n style: { marginTop: \"3px\", accentColor: tokens.ink },\n onChange: () => {\n rules.clear();\n field.setValue(item.value);\n },\n }),\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\" } }, [\n h(\"span\", { style: { fontSize: \"14px\", fontWeight: variant === \"cards\" ? 500 : 400, color: tokens.ink } }, item.label),\n item.description\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, item.description)\n : null,\n ]),\n ],\n );\n }),\n );\n\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control,\n });\n };\n },\n});\n\nexport const RadioGroup = defineComponent({\n name: \"RadioGroup\",\n props: RadioGroupSchema,\n description: \"pills for short choices; cards for choices that need a description line.\",\n component: RadioGroupImpl,\n});\n","import { z } from \"zod/v4\";\nimport { align, children, justify } from \"../schemas\";\n\nexport const RowSchema = z.object({\n children,\n gap: z.number().optional(),\n align: align.optional(),\n justify: justify.optional(),\n wrap: z.boolean().optional(),\n});\n\nexport type RowProps = z.infer<typeof RowSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { flexStyle } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { RowSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Row = defineComponent({\n name: \"Row\",\n props: RowSchema,\n description: \"Horizontal layout; items are vertically centered.\",\n component: ({ props, renderNode }) =>\n h(\n \"div\",\n {\n class: \"openui-intelligent-row\",\n style: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: props.gap !== undefined ? undefined : tokens.spaceInner,\n ...flexStyle(props, false),\n },\n },\n [renderNode(props.children)],\n ),\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { options } from \"../controls\";\n\nexport const SegmentedControlSchema = z.object({\n value: reactive(z.string()),\n options,\n block: z.boolean().optional(),\n});\n\nexport type SegmentedControlProps = z.infer<typeof SegmentedControlSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { tokens } from \"../../shared/tokens\";\nimport { optionList, useFieldName } from \"../controls\";\nimport { SegmentedControlSchema, type SegmentedControlProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SegmentedControlImpl = vueComponent({\n name: \"OpenUIIntelligentSegmentedControl\",\n props: {\n props: { type: Object as PropType<SegmentedControlProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => \"segmented\", () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const streaming = useIsStreaming();\n\n return () => {\n const opts = optionList(p.props.options);\n const current = field.value == null ? \"\" : String(field.value);\n return h(\n \"div\",\n {\n role: \"tablist\",\n class: \"openui-intelligent-segmented\",\n style: {\n display: p.props.block ? \"flex\" : \"inline-flex\",\n flexShrink: 0,\n width: p.props.block ? \"100%\" : undefined,\n padding: \"3px\",\n gap: \"2px\",\n background: tokens.surface,\n borderRadius: tokens.radiusMd,\n border: `1px solid ${tokens.border}`,\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 disabled: streaming.value,\n style: {\n flex: p.props.block ? \"1 1 0%\" : \"0 0 auto\",\n padding: \"6px 12px\",\n fontSize: \"13px\",\n fontWeight: active ? 600 : 500,\n fontFamily: tokens.font,\n whiteSpace: \"nowrap\",\n borderRadius: tokens.radiusSm,\n border: \"none\",\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n background: active ? tokens.canvas : \"transparent\",\n color: active ? tokens.ink : tokens.muted,\n boxShadow: active ? tokens.shadowSm : undefined,\n },\n onClick: () => {\n if (!streaming.value) field.setValue(opt.value);\n },\n },\n opt.label,\n );\n }),\n );\n };\n },\n});\n\nexport const SegmentedControl = defineComponent({\n name: \"SegmentedControl\",\n props: SegmentedControlSchema,\n description: \"2 to 4 short choices in a row.\",\n component: SegmentedControlImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { options } from \"../controls\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const SelectSchema = z.object({\n value: reactive(z.string()),\n options,\n label: z.string().optional(),\n placeholder: z.string().optional(),\n rules: rulesSchema.optional(),\n});\nexport type SelectProps = z.infer<typeof SelectSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { optionList, renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { SelectSchema, type SelectProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SelectImpl = vueComponent({\n name: \"OpenUIIntelligentSelect\",\n props: {\n props: { type: Object as PropType<SelectProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(\n () => p.props.label,\n () => p.statementId,\n );\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const opts = optionList(p.props.options);\n const current = field.value == null ? \"\" : String(field.value);\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\n \"div\",\n { style: { position: \"relative\", display: \"flex\", alignItems: \"center\", width: \"100%\" } },\n [\n h(\n \"select\",\n {\n value: current,\n disabled: streaming.value,\n class: \"openui-intelligent-select\",\n style: {\n appearance: \"none\",\n WebkitAppearance: \"none\",\n width: \"100%\",\n padding: \"8px 32px 8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n boxSizing: \"border-box\",\n cursor: streaming.value ? \"not-allowed\" : \"pointer\",\n },\n onChange: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLSelectElement).value);\n },\n onBlur: () => rules.check(),\n },\n [\n p.props.placeholder && !current\n ? h(\"option\", { value: \"\", disabled: true }, str(p.props.placeholder))\n : null,\n ...opts.map((opt) => h(\"option\", { key: opt.value, value: opt.value }, opt.label)),\n ],\n ),\n h(\n \"svg\",\n {\n width: \"14\",\n height: \"14\",\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n \"aria-hidden\": \"true\",\n style: {\n position: \"absolute\",\n right: \"10px\",\n pointerEvents: \"none\",\n color: tokens.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 };\n },\n});\n\nexport const Select = defineComponent({\n name: \"Select\",\n props: SelectSchema,\n description: \"Dropdown, for long option lists.\",\n component: SelectImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const SliderSchema = z.object({\n value: reactive(z.number()),\n min: z.number(),\n max: z.number(),\n step: z.number().optional(),\n label: z.string().optional(),\n unit: z.string().optional(),\n marks: z.array(z.object({ value: z.number(), label: z.string() })).optional(),\n});\n\nexport type SliderProps = z.infer<typeof SliderSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { numberText, str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useFieldName } from \"../controls\";\nimport { SliderSchema, type SliderProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst SliderImpl = vueComponent({\n name: \"OpenUIIntelligentSlider\",\n props: {\n props: { type: Object as PropType<SliderProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.value);\n const streaming = useIsStreaming();\n\n return () => {\n const min = typeof p.props.min === \"number\" && Number.isFinite(p.props.min) ? p.props.min : 0;\n const max = typeof p.props.max === \"number\" && Number.isFinite(p.props.max) ? p.props.max : 100;\n const step = typeof p.props.step === \"number\" && p.props.step > 0 ? p.props.step : 1;\n const numVal = typeof field.value === \"number\" && Number.isFinite(field.value) ? field.value : min;\n const unit = p.props.unit ? str(p.props.unit) : \"\";\n const formatted = unit === \"$\" || unit === \"€\" || unit === \"£\" || unit === \"¥\"\n ? `${unit}${numberText(numVal)}`\n : `${numberText(numVal)}${unit}`;\n\n return h(\n \"div\",\n {\n class: \"openui-intelligent-slider\",\n style: { display: \"flex\", flexDirection: \"column\", gap: \"6px\", width: \"100%\", fontFamily: tokens.font },\n },\n [\n h(\n \"div\",\n { style: { display: \"flex\", justifyContent: \"space-between\", alignItems: \"baseline\", gap: \"8px\" } },\n [\n p.props.label\n ? h(\"span\", { style: { fontSize: \"13px\", fontWeight: 500, color: tokens.ink } }, str(p.props.label))\n : h(\"span\"),\n h(\n \"span\",\n { style: { fontSize: \"13px\", fontWeight: 600, fontVariantNumeric: \"tabular-nums\", color: tokens.ink } },\n formatted,\n ),\n ],\n ),\n h(\"input\", {\n type: \"range\",\n min,\n max,\n step,\n value: numVal,\n disabled: streaming.value,\n style: { width: \"100%\", accentColor: tokens.rangeThumb, cursor: streaming.value ? \"not-allowed\" : \"pointer\" },\n onInput: (e: Event) => {\n const next = Number((e.target as HTMLInputElement).value);\n if (Number.isFinite(next)) field.setValue(next);\n },\n }),\n Array.isArray(p.props.marks) && p.props.marks.length > 0\n ? h(\n \"div\",\n { style: { display: \"flex\", justifyContent: \"space-between\", fontSize: \"11px\", color: tokens.muted } },\n p.props.marks.map((mark, idx) => h(\"span\", { key: idx }, str(mark.label))),\n )\n : null,\n ],\n );\n };\n },\n});\n\nexport const Slider = defineComponent({\n name: \"Slider\",\n props: SliderSchema,\n description: 'Shows label and value; unit like \"%\" or \"$\" formats the value.',\n component: SliderImpl,\n});\n","import { z } from \"zod/v4\";\n\nexport const SpacerSchema = z.object({});\n\nexport type SpacerProps = z.infer<typeof SpacerSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { SpacerSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Spacer = defineComponent({\n name: \"Spacer\",\n props: SpacerSchema,\n description: \"Fills the free space in a Row.\",\n component: () => h(\"div\", { class: \"openui-intelligent-spacer\", style: { flex: \"1 1 auto\" } }),\n});\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport {\n defineComponent as vueComponent,\n Fragment,\n h,\n inject,\n provide,\n type InjectionKey,\n type PropType,\n} from \"vue\";\nimport { z } from \"zod/v4\";\nimport { fg, size } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { color, isElement, length } from \"../schemas\";\n\nconst InSvgKey: InjectionKey<boolean> = Symbol(\"OpenUI.Intelligent.InSvg\");\n\nconst n = (value: unknown) =>\n typeof value === \"number\" && Number.isFinite(value) ? value : undefined;\n\nconst opacity = (value: unknown) =>\n n(value) === undefined ? undefined : Math.min(1, Math.max(0, value as number));\n\nconst POINTS = /^[\\d\\s,.eE+-]*$/;\nconst PATH = /^[MmLlHhVvCcSsQqTtAaZz\\d\\s,.eE+-]*$/;\nconst VIEWBOX = /^\\s*-?\\d+(\\.\\d+)?[\\s,]+-?\\d+(\\.\\d+)?[\\s,]+\\d+(\\.\\d+)?[\\s,]+\\d+(\\.\\d+)?\\s*$/;\n\nconst ok = (value: unknown, pattern: RegExp) =>\n typeof value === \"string\" && value.length < 20000 && pattern.test(value) ? value : undefined;\n\nconst paint = {\n fill: color.optional(),\n stroke: color.optional(),\n strokeWidth: z.number().optional(),\n opacity: z.number().optional(),\n};\n\ntype Paint = { fill?: string; stroke?: string; strokeWidth?: number; opacity?: number };\n\nconst paintAttrs = (p: Paint, filled: boolean) => ({\n fill:\n p.fill !== undefined\n ? (fg(p.fill) ?? \"none\")\n : filled && p.stroke === undefined\n ? \"currentColor\"\n : \"none\",\n stroke: p.stroke !== undefined ? fg(p.stroke) : filled ? undefined : \"currentColor\",\n \"stroke-width\": n(p.strokeWidth) ?? (filled ? undefined : 2),\n opacity: opacity(p.opacity),\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n});\n\nconst SvgCanvas = vueComponent({\n name: \"OpenUIIntelligentSvgCanvas\",\n props: {\n viewBox: { type: String, required: true },\n label: String,\n width: [Number, String] as PropType<number | string>,\n height: [Number, String] as PropType<number | string>,\n },\n setup(props, { slots }) {\n provide(InSvgKey, true);\n return () => {\n const vb = ok(props.viewBox, VIEWBOX) ?? \"0 0 100 100\";\n return h(\n \"svg\",\n {\n class: \"openui-intelligent-svg\",\n viewBox: vb,\n role: props.label ? \"img\" : undefined,\n \"aria-label\": props.label || undefined,\n \"aria-hidden\": props.label ? undefined : \"true\",\n style: {\n display: \"block\",\n maxWidth: \"100%\",\n width: size(props.width) ?? \"100%\",\n height: size(props.height) ?? \"auto\",\n color: tokens.ink,\n },\n },\n slots.default?.(),\n );\n };\n },\n});\n\nconst Standalone = vueComponent({\n name: \"OpenUIIntelligentSvgStandalone\",\n setup(_, { slots }) {\n const inside = inject(InSvgKey, false);\n return () =>\n inside\n ? slots.default?.()\n : h(SvgCanvas, { viewBox: \"0 0 100 100\", width: 160 }, { default: () => slots.default?.() });\n },\n});\n\nexport const CircleSchema = z.object({ cx: z.number(), cy: z.number(), r: z.number(), ...paint });\nexport const Circle = defineComponent({\n name: \"Circle\",\n props: CircleSchema,\n description: \"fill defaults to the text color; with only a stroke it stays unfilled.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"circle\", {\n cx: n(props.cx),\n cy: n(props.cy),\n r: Math.max(0, n(props.r) ?? 0),\n ...paintAttrs(props, true),\n }),\n }),\n});\n\nexport const EllipseSchema = z.object({\n cx: z.number(),\n cy: z.number(),\n rx: z.number(),\n ry: z.number(),\n ...paint,\n});\nexport const Ellipse = defineComponent({\n name: \"Ellipse\",\n props: EllipseSchema,\n description: \"fill defaults to the text color; with only a stroke it stays unfilled.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"ellipse\", {\n cx: n(props.cx),\n cy: n(props.cy),\n rx: Math.max(0, n(props.rx) ?? 0),\n ry: Math.max(0, n(props.ry) ?? 0),\n ...paintAttrs(props, true),\n }),\n }),\n});\n\nexport const RectSchema = z.object({\n x: z.number(),\n y: z.number(),\n width: z.number(),\n height: z.number(),\n ...paint,\n rx: z.number().optional(),\n});\nexport const Rect = defineComponent({\n name: \"Rect\",\n props: RectSchema,\n description:\n \"rx rounds the corners; fill defaults to the text color, and with only a stroke it stays unfilled.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"rect\", {\n x: n(props.x),\n y: n(props.y),\n width: Math.max(0, n(props.width) ?? 0),\n height: Math.max(0, n(props.height) ?? 0),\n rx: n(props.rx),\n ...paintAttrs(props, true),\n }),\n }),\n});\n\nexport const LineSchema = z.object({\n x1: z.number(),\n y1: z.number(),\n x2: z.number(),\n y2: z.number(),\n stroke: color.optional(),\n strokeWidth: z.number().optional(),\n opacity: z.number().optional(),\n});\nexport const Line = defineComponent({\n name: \"Line\",\n props: LineSchema,\n description: \"Stroked in the text color, 2 wide, unless stroke and strokeWidth are set.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\"line\", {\n x1: n(props.x1),\n y1: n(props.y1),\n x2: n(props.x2),\n y2: n(props.y2),\n ...paintAttrs(props, false),\n }),\n }),\n});\n\nconst ARITY: Record<string, number> = { m: 2, l: 2, t: 2, h: 1, v: 1, c: 6, s: 4, q: 4, a: 7, z: 0 };\nconst NUMBER = /^[+-]?(\\d+\\.?\\d*|\\.\\d+)(e[+-]?\\d+)?/i;\nconst FLAG = /^[01]/;\n\nconst completePath = (d: string): boolean => {\n const last = d.match(/[mlhvcsqtaz][^mlhvcsqtaz]*$/i)?.[0];\n if (!last) return d.trim() === \"\";\n const arity = ARITY[last[0]!.toLowerCase()]!;\n let rest = last.slice(1);\n let count = 0;\n for (;;) {\n rest = rest.replace(/^[\\s,]+/, \"\");\n if (!rest) break;\n const slot = count % 7;\n const token = (arity === 7 && (slot === 3 || slot === 4) ? FLAG : NUMBER).exec(rest);\n if (!token) return false;\n rest = rest.slice(token[0].length);\n count++;\n }\n if (/[.eE+-]$/.test(last.trimEnd())) return false;\n return arity === 0 ? count === 0 : count > 0 && count % arity === 0;\n};\n\nexport const PathSchema = z.object({ d: z.string(), ...paint });\nexport const Path = defineComponent({\n name: \"Path\",\n props: PathSchema,\n description:\n \"d is SVG path data only (M, L, C, A, Z...), else nothing draws; unfilled unless fill is set.\",\n component: ({ props }) => {\n const d = ok(props.d, PATH);\n return h(Standalone, null, {\n default: () =>\n h(\"path\", {\n d: d !== undefined && completePath(d) ? d : undefined,\n ...paintAttrs(props, props.fill !== undefined),\n }),\n });\n },\n});\n\nexport const PolylineSchema = z.object({\n points: z.string(),\n fill: color.optional(),\n stroke: color.optional(),\n strokeWidth: z.number().optional(),\n opacity: z.number().optional(),\n});\nexport const Polyline = defineComponent({\n name: \"Polyline\",\n props: PolylineSchema,\n description: 'points like \"0,0 10,5 20,0\".',\n component: ({ props }) =>\n h(Standalone, null, {\n default: () => h(\"polyline\", { points: ok(props.points, POINTS), ...paintAttrs(props, false) }),\n }),\n});\n\nexport const PolygonSchema = z.object({ points: z.string(), ...paint });\nexport const Polygon = defineComponent({\n name: \"Polygon\",\n props: PolygonSchema,\n description:\n 'Closed shape; points like \"0,0 10,5 20,0\". fill defaults to the text color; with only a stroke it stays unfilled.',\n component: ({ props }) =>\n h(Standalone, null, {\n default: () => h(\"polygon\", { points: ok(props.points, POINTS), ...paintAttrs(props, true) }),\n }),\n});\n\nexport const SvgTextSchema = z.object({\n text: z.string(),\n x: z.number(),\n y: z.number(),\n size: z.number().optional(),\n fill: color.optional(),\n anchor: z.enum([\"start\", \"middle\", \"end\"]).optional(),\n weight: z.enum([\"normal\", \"medium\", \"semibold\"]).optional(),\n});\nexport const SvgText = defineComponent({\n name: \"SvgText\",\n props: SvgTextSchema,\n description: \"A text label at x, y; anchor sets which end sits on x.\",\n component: ({ props }) =>\n h(Standalone, null, {\n default: () =>\n h(\n \"text\",\n {\n x: n(props.x),\n y: n(props.y),\n \"font-size\": n(props.size) ?? 12,\n fill: fg(props.fill) ?? \"currentColor\",\n \"text-anchor\": props.anchor ?? \"start\",\n \"font-weight\": props.weight === \"semibold\" ? 640 : props.weight === \"medium\" ? 560 : 440,\n \"font-family\": tokens.font,\n },\n String(props.text ?? \"\"),\n ),\n }),\n});\n\nexport const shapeComponents = [Circle, Ellipse, Rect, Line, Path, Polyline, Polygon, SvgText];\n\nconst shapes = z.array(\n z.union(\n shapeComponents.map((shape) => shape.ref) as [\n (typeof shapeComponents)[number][\"ref\"],\n ...(typeof shapeComponents)[number][\"ref\"][],\n ],\n ),\n);\n\nconst TRANSFORM_ARGS: Record<string, number[]> = {\n translate: [1, 2],\n rotate: [1, 3],\n scale: [1, 2],\n skewX: [1],\n skewY: [1],\n matrix: [6],\n};\n\nfunction sanitizeTransform(value: unknown): string | undefined {\n if (typeof value !== \"string\" || value.length > 500) return undefined;\n const parts = [...value.matchAll(/\\s*([a-zA-Z]+)\\(([^()]*)\\)\\s*/g)];\n if (!parts.length || parts.map((p) => p[0]).join(\"\") !== value) return undefined;\n const valid = parts.every(([, name, args]) => {\n const numbers = args\n .trim()\n .split(/\\s*,\\s*|\\s+/)\n .filter(Boolean);\n return (\n (TRANSFORM_ARGS[name]?.includes(numbers.length) ?? false) &&\n numbers.every((num) => Number.isFinite(Number(num)))\n );\n });\n return valid ? value.trim() : undefined;\n}\n\nexport const GSchema = z.object({\n children: shapes,\n transform: z.string().optional(),\n opacity: z.number().optional(),\n});\nexport const G = defineComponent({\n name: \"G\",\n props: GSchema,\n description:\n 'Group; transform like \"rotate(30 50 50)\" or \"translate(10 0)\"; one with the wrong number of arguments is dropped.',\n component: ({ props, renderNode }) =>\n h(Standalone, null, {\n default: () =>\n h(\"g\", { transform: sanitizeTransform(props.transform), opacity: opacity(props.opacity) }, [renderNode(props.children)]),\n }),\n});\n\nconst DRAWABLE = new Set([...shapeComponents.map((s) => s.name), G.name]);\n\nexport const SvgSchema = z.object({\n children: z.array(z.union([...shapes.element.options, G.ref])),\n viewBox: z.string(),\n label: z.string().optional(),\n width: length.optional(),\n height: length.optional(),\n});\nexport const Svg = defineComponent({\n name: \"Svg\",\n props: SvgSchema,\n description:\n \"A drawing for steps, parts, mechanisms, diagrams and layouts. Scales to its width; its shapes take expressions, so state can move them. label says in a few words what it shows, for screen readers: always give one.\",\n component: ({ props, renderNode }) => {\n const nodes = (Array.isArray(props.children) ? props.children : []) as unknown[];\n const drawable = (node: unknown) =>\n isElement(node) && DRAWABLE.has(String((node as { typeName?: string }).typeName));\n const rest = nodes.filter((node) => !drawable(node));\n return h(Fragment, null, [\n h(\n SvgCanvas,\n {\n viewBox: props.viewBox,\n label: props.label,\n width: props.width,\n height: props.height,\n },\n { default: () => renderNode(nodes.filter(drawable)) },\n ),\n rest.length ? renderNode(rest) : null,\n ]);\n },\n});\n\nexport const svgComponents = [Svg, ...shapeComponents, G];\n","import { z } from \"zod/v4\";\n\nexport const TableSchema = z.object({\n columns: z.array(z.string()),\n rows: z.array(z.array(z.any())),\n});\n\nexport type TableProps = z.infer<typeof TableSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { numberText, str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { isElement, renderInlineMarkdown } from \"../schemas\";\nimport { TableSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nexport const Table = defineComponent({\n name: \"Table\",\n props: TableSchema,\n description:\n \"Each row lists its cells in column order; a cell may be a component. Number columns align right.\",\n component: ({ props, renderNode }) => {\n const columns = Array.isArray(props.columns) ? props.columns.map(str) : [];\n const rows = Array.isArray(props.rows)\n ? props.rows.filter((r): r is unknown[] => Array.isArray(r))\n : [];\n\n const isNumericCol = columns.map(\n (_, colIdx) =>\n rows.length > 0 && rows.every((row) => row[colIdx] == null || typeof row[colIdx] === \"number\"),\n );\n\n return h(\n \"div\",\n {\n class: \"openui-intelligent-table-wrap\",\n style: {\n width: \"100%\",\n overflowX: \"auto\",\n border: `1px solid ${tokens.border}`,\n borderRadius: tokens.radiusMd,\n },\n },\n [\n h(\n \"table\",\n {\n class: \"openui-intelligent-table\",\n style: {\n width: \"100%\",\n borderCollapse: \"collapse\",\n fontSize: \"13px\",\n fontFamily: tokens.font,\n },\n },\n [\n h(\n \"thead\",\n null,\n h(\n \"tr\",\n { style: { background: tokens.surface, borderBottom: `1px solid ${tokens.border}` } },\n columns.map((col, idx) =>\n h(\n \"th\",\n {\n key: idx,\n style: {\n padding: \"8px 12px\",\n textAlign: isNumericCol[idx] ? \"right\" : \"left\",\n fontWeight: 600,\n color: tokens.muted,\n whiteSpace: \"nowrap\",\n },\n },\n col,\n ),\n ),\n ),\n ),\n h(\n \"tbody\",\n null,\n rows.map((row, rIdx) =>\n h(\n \"tr\",\n {\n key: rIdx,\n style: {\n borderBottom: rIdx < rows.length - 1 ? `1px solid ${tokens.border}` : undefined,\n },\n },\n columns.map((_, cIdx) => {\n const cell = row[cIdx];\n const rendered = isElement(cell) || Array.isArray(cell)\n ? renderNode(cell)\n : typeof cell === \"number\"\n ? numberText(cell)\n : renderInlineMarkdown(str(cell));\n return h(\n \"td\",\n {\n key: cIdx,\n style: {\n padding: \"8px 12px\",\n textAlign: isNumericCol[cIdx] ? \"right\" : \"left\",\n fontVariantNumeric: isNumericCol[cIdx] ? \"tabular-nums\" : undefined,\n color: tokens.ink,\n },\n },\n [rendered],\n );\n }),\n ),\n ),\n ),\n ],\n ),\n ],\n );\n },\n});\n","import { z } from \"zod/v4\";\nimport { children, color } from \"../schemas\";\n\n/** Text, or a run of strings and inline components such as Icon, Badge, Link or Math. */\nexport const richText = z.union([z.string(), children]);\n\nexport const TextSchema = z.object({\n text: richText,\n size: z.enum([\"xs\", \"sm\", \"md\", \"lg\"]).optional(),\n color: color.optional(),\n weight: z.enum([\"normal\", \"medium\", \"semibold\"]).optional(),\n italic: z.boolean().optional(),\n lineThrough: z.boolean().optional(),\n tabularNums: z.boolean().optional(),\n maxLines: z.number().optional(),\n});\n\nexport type TextProps = z.infer<typeof TextSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h, type CSSProperties } from \"vue\";\nimport { fg } from \"../../shared/props\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderSlot } from \"../schemas\";\nimport { TextSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TEXT_SIZES: Record<string, string> = {\n xs: \"12px\",\n sm: \"13px\",\n md: \"14px\",\n lg: \"16px\",\n};\n\nconst TEXT_WEIGHTS: Record<string, number> = {\n normal: 400,\n medium: 500,\n semibold: 600,\n};\n\nexport const Text = defineComponent({\n name: \"Text\",\n props: TextSchema,\n description:\n 'Paragraph; supports **bold**, *italic*, `code` and [links](https://…). text may be a list mixing strings and inline components: [Icon(\"clock\", \"sm\"), \" 25 min · \", Badge(\"Easy\")].',\n component: ({ props, renderNode }) => {\n const style: CSSProperties = {\n margin: 0,\n fontSize: TEXT_SIZES[props.size ?? \"md\"] ?? \"14px\",\n lineHeight: 1.55,\n color: fg(props.color) ?? tokens.ink,\n fontWeight: props.weight ? TEXT_WEIGHTS[props.weight] : undefined,\n fontStyle: props.italic ? \"italic\" : undefined,\n textDecoration: props.lineThrough ? \"line-through\" : undefined,\n fontVariantNumeric: props.tabularNums ? \"tabular-nums\" : undefined,\n };\n if (typeof props.maxLines === \"number\" && props.maxLines > 0) {\n style.display = \"-webkit-box\";\n style.WebkitLineClamp = String(Math.round(props.maxLines));\n style.WebkitBoxOrient = \"vertical\";\n style.overflow = \"hidden\";\n }\n const content = Array.isArray(props.text)\n ? props.text.flat().map((part) => renderSlot(part, renderNode))\n : renderSlot(props.text, renderNode);\n return h(\"p\", { class: \"openui-intelligent-text\", style }, [content]);\n },\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { rulesSchema } from \"../schemas\";\n\nexport const TextAreaSchema = z.object({\n value: reactive(z.string()),\n label: z.string().optional(),\n placeholder: z.string().optional(),\n rows: z.number().optional(),\n rules: rulesSchema.optional(),\n});\nexport type TextAreaProps = z.infer<typeof TextAreaSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { renderFieldFrame, useFieldName, useFieldRules } from \"../controls\";\nimport { TextAreaSchema, type TextAreaProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TextAreaImpl = vueComponent({\n name: \"OpenUIIntelligentTextArea\",\n props: {\n props: { type: Object as PropType<TextAreaProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(\n () => p.props.label,\n () => p.statementId,\n );\n const field = useStateField(fieldName, () => p.props.value);\n const rules = useFieldRules(fieldName, () => p.props.rules, () => field.value);\n const streaming = useIsStreaming();\n\n return () => {\n const rows =\n typeof p.props.rows === \"number\" && Number.isFinite(p.props.rows)\n ? Math.min(20, Math.max(2, Math.round(p.props.rows)))\n : 3;\n return renderFieldFrame({\n label: p.props.label ? str(p.props.label) : undefined,\n required: rules.required.value,\n error: rules.error.value,\n control: h(\"textarea\", {\n rows,\n value: field.value == null ? \"\" : String(field.value),\n placeholder: p.props.placeholder ? str(p.props.placeholder) : undefined,\n disabled: streaming.value,\n class: \"openui-intelligent-textarea\",\n style: {\n width: \"100%\",\n padding: \"8px 10px\",\n fontSize: \"14px\",\n fontFamily: tokens.font,\n color: tokens.ink,\n background: tokens.canvas,\n border: `1px solid ${rules.error.value ? tokens.danger : tokens.borderStrong}`,\n borderRadius: tokens.radiusMd,\n outline: \"none\",\n resize: \"vertical\",\n boxSizing: \"border-box\",\n },\n onInput: (e: Event) => {\n rules.clear();\n field.setValue((e.target as HTMLTextAreaElement).value);\n },\n onBlur: () => rules.check(),\n }),\n });\n };\n },\n});\n\nexport const TextArea = defineComponent({\n name: \"TextArea\",\n props: TextAreaSchema,\n description: \"Multi-line text field; rows is 2 to 20 (default 3).\",\n component: TextAreaImpl,\n});\n","import { reactive } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nexport const TimerSchema = z.object({\n seconds: reactive(z.number()),\n label: z.string().optional(),\n});\n\nexport type TimerProps = z.infer<typeof TimerSchema>;\n","import { defineComponent, useIsStreaming, useStateField } from \"@wodecorp/openui-vue-lang\";\nimport { defineComponent as vueComponent, h, onBeforeUnmount, ref, type PropType } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { useFieldName } from \"../controls\";\nimport { TimerSchema, type TimerProps } from \"./schema\";\n\nexport * from \"./schema\";\n\nfunction formatClock(totalSeconds: number): string {\n const s = Math.max(0, Math.floor(Number.isFinite(totalSeconds) ? totalSeconds : 0));\n const mins = Math.floor(s / 60);\n const secs = s % 60;\n return `${String(mins).padStart(2, \"0\")}:${String(secs).padStart(2, \"0\")}`;\n}\n\nconst TimerImpl = vueComponent({\n name: \"OpenUIIntelligentTimer\",\n props: {\n props: { type: Object as PropType<TimerProps>, required: true },\n statementId: String,\n },\n setup(p) {\n const fieldName = useFieldName(() => p.props.label, () => p.statementId);\n const field = useStateField(fieldName, () => p.props.seconds);\n const streaming = useIsStreaming();\n const initialSeconds = ref<number>(\n typeof field.value === \"number\" && Number.isFinite(field.value) ? field.value : 0,\n );\n const running = ref(false);\n let interval: ReturnType<typeof setInterval> | null = null;\n\n const stop = () => {\n running.value = false;\n if (interval !== null) {\n clearInterval(interval);\n interval = null;\n }\n };\n\n const start = () => {\n if (streaming.value || running.value) return;\n const cur = Number(field.value ?? 0);\n if (cur <= 0) return;\n running.value = true;\n interval = setInterval(() => {\n const current = Number(field.value ?? 0);\n if (current <= 1) {\n field.setValue(0);\n stop();\n } else {\n field.setValue(current - 1);\n }\n }, 1000);\n };\n\n const reset = () => {\n stop();\n field.setValue(initialSeconds.value);\n };\n\n onBeforeUnmount(stop);\n\n return () => {\n const secs = typeof field.value === \"number\" ? field.value : Number(field.value ?? 0);\n const isZh = typeof document !== \"undefined\" && document.documentElement.lang.toLowerCase().startsWith(\"zh\");\n return h(\n \"div\",\n {\n class: \"openui-intelligent-timer\",\n style: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: \"12px\",\n padding: \"12px 14px\",\n borderRadius: tokens.radiusMd,\n background: tokens.surface,\n border: `1px solid ${tokens.border}`,\n },\n },\n [\n h(\"div\", { style: { display: \"flex\", flexDirection: \"column\", gap: \"2px\" } }, [\n p.props.label\n ? h(\"span\", { style: { fontSize: \"12px\", color: tokens.muted } }, str(p.props.label))\n : null,\n h(\n \"span\",\n { style: { fontSize: \"24px\", fontWeight: 700, fontVariantNumeric: \"tabular-nums\", color: tokens.ink } },\n formatClock(secs),\n ),\n ]),\n h(\"div\", { style: { display: \"flex\", gap: \"8px\", flexShrink: 0 } }, [\n h(\n \"button\",\n {\n type: \"button\",\n disabled: streaming.value || (!running.value && secs <= 0),\n onClick: () => (running.value ? stop() : start()),\n style: {\n padding: \"6px 12px\",\n borderRadius: tokens.radiusSm,\n border: \"none\",\n background: tokens.ink,\n color: tokens.onInk,\n fontSize: \"13px\",\n whiteSpace: \"nowrap\",\n cursor: \"pointer\",\n },\n },\n running.value ? (isZh ? \"暂停\" : \"Pause\") : (isZh ? \"开始\" : \"Start\"),\n ),\n h(\n \"button\",\n {\n type: \"button\",\n disabled: streaming.value,\n onClick: reset,\n style: {\n padding: \"6px 12px\",\n borderRadius: tokens.radiusSm,\n border: `1px solid ${tokens.borderStrong}`,\n background: tokens.canvas,\n color: tokens.ink,\n fontSize: \"13px\",\n whiteSpace: \"nowrap\",\n cursor: \"pointer\",\n },\n },\n isZh ? \"重置\" : \"Reset\",\n ),\n ]),\n ],\n );\n };\n },\n});\n\nexport const Timer = defineComponent({\n name: \"Timer\",\n props: TimerSchema,\n description:\n \"Countdown with start, pause and reset. It counts the bound seconds down to 0, so other statements can react, e.g. $left == 0.\",\n component: TimerImpl,\n});\n","import { z } from \"zod/v4\";\nimport { color } from \"../schemas\";\n\nexport const TitleSchema = z.object({\n text: z.string(),\n size: z.enum([\"sm\", \"md\", \"lg\", \"xl\", \"2xl\", \"3xl\"]).optional(),\n color: color.optional(),\n});\n\nexport type TitleProps = z.infer<typeof TitleSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { fg } from \"../../shared/props\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { TitleSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst TITLE_SIZES: Record<string, { fontSize: string; lineHeight: string; fontWeight: number }> = {\n sm: { fontSize: \"14px\", lineHeight: \"1.35\", fontWeight: 600 },\n md: { fontSize: \"16px\", lineHeight: \"1.35\", fontWeight: 600 },\n lg: { fontSize: \"20px\", lineHeight: \"1.28\", fontWeight: 650 },\n xl: { fontSize: \"24px\", lineHeight: \"1.22\", fontWeight: 650 },\n \"2xl\": { fontSize: \"32px\", lineHeight: \"1.15\", fontWeight: 700 },\n \"3xl\": { fontSize: \"40px\", lineHeight: \"1.1\", fontWeight: 700 },\n};\n\nexport const Title = defineComponent({\n name: \"Title\",\n props: TitleSchema,\n description: \"Heading; md for a card title, lg for a section, 2xl for a big number.\",\n component: ({ props }) => {\n const spec = TITLE_SIZES[props.size ?? \"md\"] ?? TITLE_SIZES.md!;\n return h(\n \"div\",\n {\n role: \"heading\",\n \"aria-level\": props.size === \"3xl\" || props.size === \"2xl\" ? 2 : props.size === \"xl\" || props.size === \"lg\" ? 3 : 4,\n class: \"openui-intelligent-title\",\n style: {\n margin: 0,\n color: fg(props.color) ?? tokens.ink,\n letterSpacing: \"-0.015em\",\n ...spec,\n },\n },\n str(props.text),\n );\n },\n});\n","import { z } from \"zod/v4\";\n\nexport const YouTubeSchema = z.object({ video: z.string(), title: z.string().optional() });\n\nexport type YouTubeProps = z.infer<typeof YouTubeSchema>;\n","import { defineComponent } from \"@wodecorp/openui-vue-lang\";\nimport { h } from \"vue\";\nimport { str } from \"../../shared/text\";\nimport { tokens } from \"../../shared/tokens\";\nimport { YouTubeSchema } from \"./schema\";\n\nexport * from \"./schema\";\n\nconst VIDEO_ID = /^[A-Za-z0-9_-]{11}$/;\n\nfunction extractYouTubeId(input: string): string | null {\n const trimmed = input.trim();\n if (VIDEO_ID.test(trimmed)) return trimmed;\n try {\n const url = new URL(trimmed);\n const host = url.hostname.replace(/^www\\./, \"\");\n if (host === \"youtu.be\") {\n const id = url.pathname.slice(1).split(\"/\")[0] ?? \"\";\n return VIDEO_ID.test(id) ? id : null;\n }\n if (host === \"youtube.com\" || host === \"m.youtube.com\" || host === \"youtube-nocookie.com\") {\n const v = url.searchParams.get(\"v\");\n if (v && VIDEO_ID.test(v)) return v;\n const segs = url.pathname.split(\"/\").filter(Boolean);\n const id = segs[1] ?? \"\";\n if ((segs[0] === \"embed\" || segs[0] === \"shorts\") && VIDEO_ID.test(id)) return id;\n }\n } catch {\n return null;\n }\n return null;\n}\n\nexport const YouTube = defineComponent({\n name: \"YouTube\",\n props: YouTubeSchema,\n description: \"Embedded YouTube video by id or URL. Only a video you know exists.\",\n component: ({ props }) => {\n const id = extractYouTubeId(str(props.video));\n if (!id) return null;\n return h(\n \"div\",\n {\n class: \"openui-intelligent-youtube\",\n style: {\n width: \"100%\",\n aspectRatio: \"16 / 9\",\n borderRadius: tokens.radiusMd,\n overflow: \"hidden\",\n background: tokens.surface,\n },\n },\n [\n h(\"iframe\", {\n src: `https://www.youtube-nocookie.com/embed/${id}`,\n title: str(props.title) || \"YouTube video\",\n allow: \"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\",\n allowfullscreen: true,\n loading: \"lazy\",\n referrerpolicy: \"strict-origin-when-cross-origin\",\n style: { width: \"100%\", height: \"100%\", border: \"none\", display: \"block\" },\n }),\n ],\n );\n },\n});\n","import type { DefinedComponent } from \"@wodecorp/openui-vue-lang\";\nimport { Badge } from \"./Badge\";\nimport { Box } from \"./Box\";\nimport { Button } from \"./Button\";\nimport { Caption } from \"./Caption\";\nimport { Card } from \"./Card\";\nimport { Carousel } from \"./Carousel\";\nimport { Celebration } from \"./Celebration\";\nimport { Chart } from \"./Chart\";\nimport { Checkbox } from \"./Checkbox\";\nimport { Code } from \"./Code\";\nimport { Col } from \"./Col\";\nimport { DatePicker } from \"./DatePicker\";\nimport { Divider } from \"./Divider\";\nimport { Flashcard } from \"./Flashcard\";\nimport { Form } from \"./Form\";\nimport { Grid } from \"./Grid\";\nimport { HtmlView } from \"./HtmlView\";\nimport { Icon } from \"./Icon\";\nimport { IconButton } from \"./IconButton\";\nimport { Image } from \"./Image\";\nimport { Input } from \"./Input\";\nimport { Label } from \"./Label\";\nimport { Link } from \"./Link\";\nimport { List, ListItem } from \"./List\";\nimport { Markdown } from \"./Markdown\";\nimport { MathBlock } from \"./Math\";\nimport { Popover } from \"./Popover\";\nimport { Pressable } from \"./Pressable\";\nimport { Quote } from \"./Quote\";\nimport { RadioGroup } from \"./RadioGroup\";\nimport { Row } from \"./Row\";\nimport { SegmentedControl } from \"./SegmentedControl\";\nimport { Select } from \"./Select\";\nimport { Slider } from \"./Slider\";\nimport { Spacer } from \"./Spacer\";\nimport { svgComponents } from \"./Svg\";\nimport { Table } from \"./Table\";\nimport { Text } from \"./Text\";\nimport { TextArea } from \"./TextArea\";\nimport { Timer } from \"./Timer\";\nimport { Title } from \"./Title\";\nimport { YouTube } from \"./YouTube\";\n\nexport const intelligentComponents: DefinedComponent<any>[] = [\n Col,\n Row,\n Box,\n Grid,\n Card,\n Carousel,\n Popover,\n Divider,\n Spacer,\n Title,\n Text,\n Caption,\n Label,\n Badge,\n Link,\n List,\n ListItem,\n Markdown,\n Quote,\n Code,\n MathBlock,\n Button,\n IconButton,\n Pressable,\n Input,\n TextArea,\n Select,\n SegmentedControl,\n Slider,\n Checkbox,\n RadioGroup,\n DatePicker,\n Timer,\n Form,\n Image,\n Icon,\n Table,\n Chart,\n YouTube,\n Flashcard,\n Celebration,\n ...svgComponents,\n HtmlView,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\n\nconst HEX = /^#?([\\da-f]{3}|[\\da-f]{6})$/i;\n\nfunction channels(color: string): number[] {\n const m = HEX.exec(color.trim());\n if (!m) throw new Error(`not a hex color: ${color}`);\n const hex = m[1].length === 3 ? m[1].replace(/./g, \"$&$&\") : m[1];\n return [0, 2, 4].map((i) => parseInt(hex.slice(i, i + 2), 16));\n}\n\nexport const MixColor = defineFunction({\n name: \"MixColor\",\n description:\n 'The hex color a fraction t of the way from one hex color to another, e.g. @MixColor(\"#ffffff\", \"#0285ff\", 0.5) for a heatmap or a tint',\n params: z.object({ from: z.string(), to: z.string(), t: z.number() }),\n returns: z.string(),\n fn: ({ from, to, t }) => {\n const a = channels(from);\n const b = channels(to);\n const k = Math.min(1, Math.max(0, t));\n return `#${a\n .map((v, i) =>\n Math.round(v + (b[i] - v) * k)\n .toString(16)\n .padStart(2, \"0\"),\n )\n .join(\"\")}`;\n },\n});\n\nexport const colorFunctions = [MixColor];\n","import { z } from \"zod/v4\";\n\nexport const list = () => z.array(z.any());\nexport const numbers = () => z.array(z.number());\nexport const date = () => z.union([z.string(), z.number()]);\nexport const agg = () => z.enum([\"sum\", \"avg\", \"count\", \"min\", \"max\"]);\n\n/** Reads `field` from a row, with dot paths; \"\" is the item itself, like @Filter. */\nexport function read(item: unknown, field: string): unknown {\n if (!field) return item;\n let cur: unknown = item;\n for (const key of field.split(\".\")) {\n if (cur == null || typeof cur !== \"object\") return undefined;\n cur = (cur as Record<string, unknown>)[key];\n }\n return cur;\n}\n\n/**\n * Equality by value: lists and objects compare item by item, and a number\n * matches its string form (ids from inputs are often strings).\n */\nexport function same(a: unknown, b: unknown): boolean {\n if (a === b) return true;\n const mixed =\n (typeof a === \"number\" && typeof b === \"string\") ||\n (typeof a === \"string\" && typeof b === \"number\");\n if (mixed) return String(a) === String(b);\n if (a === null || b === null || typeof a !== \"object\" || typeof b !== \"object\") return false;\n if (Array.isArray(a) !== Array.isArray(b)) return false;\n if (Array.isArray(a))\n return a.length === (b as unknown[]).length && a.every((x, i) => same(x, (b as unknown[])[i]));\n const ka = Object.keys(a);\n const kb = Object.keys(b);\n return (\n ka.length === kb.length &&\n ka.every(\n (k) =>\n Object.hasOwn(b, k) &&\n same((a as Record<string, unknown>)[k], (b as Record<string, unknown>)[k]),\n )\n );\n}\n\n/** A finite number or a thrown error, which the runtime turns into null. */\nexport function finite(value: number): number {\n if (!Number.isFinite(value)) throw new Error(\"result is not a finite number\");\n return value;\n}\n\nexport function toNum(value: unknown): number | null {\n if (typeof value === \"number\") return Number.isFinite(value) ? value : null;\n if (typeof value === \"string\" && value.trim() !== \"\") {\n const n = Number(value);\n return Number.isFinite(n) ? n : null;\n }\n return null;\n}\n\nexport type Agg = \"sum\" | \"avg\" | \"count\" | \"min\" | \"max\";\n\n/** Aggregates the numbers read from rows; count counts rows. */\nexport function aggregate(rows: unknown[], field: string | undefined, how: Agg): number {\n if (how === \"count\") return rows.length;\n const values = rows\n .map((r) => toNum(read(r, field ?? \"\")))\n .filter((v): v is number => v !== null);\n if (!values.length) return 0;\n switch (how) {\n case \"sum\":\n return values.reduce((a, b) => a + b, 0);\n case \"avg\":\n return values.reduce((a, b) => a + b, 0) / values.length;\n case \"min\":\n return Math.min(...values);\n case \"max\":\n return Math.max(...values);\n }\n}\n\n/** Groups items by a key in first-seen order. */\nexport function groups(rows: unknown[], key: string): Map<string | number, unknown[]> {\n const out = new Map<string | number, unknown[]>();\n for (const row of rows) {\n const raw = read(row, key);\n const k = typeof raw === \"number\" ? raw : raw == null || raw === \"\" ? \"Unknown\" : String(raw);\n const bucket = out.get(k);\n if (bucket) bucket.push(row);\n else out.set(k, [row]);\n }\n return out;\n}\n\nexport const MAX_ITEMS = 10000;\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { date } from \"./helpers\";\n\nconst DAY = 86_400_000;\nconst DATE_ONLY = /^(\\d{4})-(\\d{2})-(\\d{2})$/;\n\n/**\n * A date as a calendar day (days since 1970-01-01) plus, for a timestamp, the\n * instant. \"YYYY-MM-DD\" is a calendar date with no time zone; a timestamp or an\n * ISO date-time is read in the viewer's time zone.\n */\ntype Parsed = { day: number; instant: Date | null };\n\nexport function parseDate(value: string | number): Parsed {\n if (typeof value === \"string\") {\n const m = DATE_ONLY.exec(value.trim());\n if (m) {\n const [y, mo, d] = [Number(m[1]), Number(m[2]), Number(m[3])];\n const utc = Date.UTC(y, mo - 1, d);\n const check = new Date(utc);\n if (check.getUTCMonth() !== mo - 1 || check.getUTCDate() !== d)\n throw new Error(`invalid date \"${value}\"`);\n return { day: utc / DAY, instant: null };\n }\n }\n const instant = new Date(value);\n if (Number.isNaN(instant.getTime())) throw new Error(`invalid date \"${value}\"`);\n return {\n day: Date.UTC(instant.getFullYear(), instant.getMonth(), instant.getDate()) / DAY,\n instant,\n };\n}\n\nexport function isoDay(day: number): string {\n return new Date(day * DAY).toISOString().slice(0, 10);\n}\n\nconst STYLES: Record<string, Intl.DateTimeFormatOptions> = {\n date: { month: \"short\", day: \"numeric\", year: \"numeric\" },\n short: { month: \"short\", day: \"numeric\" },\n long: { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" },\n weekday: { weekday: \"short\" },\n month: { month: \"short\", year: \"numeric\" },\n time: { hour: \"numeric\", minute: \"2-digit\" },\n datetime: { month: \"short\", day: \"numeric\", hour: \"numeric\", minute: \"2-digit\" },\n};\n\nexport const Now = defineFunction({\n name: \"Now\",\n description: \"The current date and time as an ISO string\",\n params: z.object({}),\n returns: z.string(),\n fn: () => new Date().toISOString(),\n});\n\nexport const FormatDate = defineFunction({\n name: \"FormatDate\",\n description:\n 'A date as text: \"date\" Oct 9, 2026 (default), \"short\" Oct 9, \"long\" Friday, October 9, 2026, \"weekday\" Fri, \"month\" Oct 2026, \"time\" 9:30 PM, \"datetime\", \"iso\" 2026-10-09. Dates are \"YYYY-MM-DD\", ISO or a timestamp; \"time\" and \"datetime\" need a timestamp or an ISO date-time, as a plain date has no time',\n params: z.object({\n date: date(),\n style: z\n .enum([\"date\", \"short\", \"long\", \"weekday\", \"month\", \"time\", \"datetime\", \"iso\"])\n .optional(),\n }),\n returns: z.string(),\n fn: ({ date, style = \"date\" }) => {\n const { day, instant } = parseDate(date);\n if (style === \"iso\") return isoDay(day);\n // A calendar date formats in UTC so its day never shifts with the viewer's zone\n const at = instant ?? new Date(day * DAY);\n return at.toLocaleString(\"en-US\", {\n ...STYLES[style],\n ...(instant ? {} : { timeZone: \"UTC\" }),\n });\n },\n});\n\nexport const AddDays = defineFunction({\n name: \"AddDays\",\n description: 'The date days later (negative: earlier), as \"YYYY-MM-DD\"',\n params: z.object({ date: date(), days: z.number() }),\n returns: z.string(),\n fn: ({ date, days }) => isoDay(parseDate(date).day + Math.trunc(days)),\n});\n\nexport const DaysBetween = defineFunction({\n name: \"DaysBetween\",\n description: \"Calendar days from one date to another (negative if to is earlier)\",\n params: z.object({ from: date(), to: date() }),\n returns: z.number(),\n fn: ({ from, to }) => parseDate(to).day - parseDate(from).day,\n});\n\nexport const Today = defineFunction({\n name: \"Today\",\n description: \"Today's date in the viewer's time zone, as \\\"YYYY-MM-DD\\\"\",\n params: z.object({}),\n returns: z.string(),\n fn: () => isoDay(parseDate(Date.now()).day),\n});\n\n/** Year, month (0-11) and day of a calendar day. */\nfunction ymd(day: number): [number, number, number] {\n const d = new Date(day * DAY);\n return [d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate()];\n}\n\nexport const AddMonths = defineFunction({\n name: \"AddMonths\",\n description:\n 'The date months later (negative: earlier), kept within the month (Jan 31 + 1 is Feb 28), as \"YYYY-MM-DD\"; 12 months is a year',\n params: z.object({ date: date(), months: z.number() }),\n returns: z.string(),\n fn: ({ date, months }) => {\n const [y, m, d] = ymd(parseDate(date).day);\n const target = m + Math.trunc(months);\n const last = new Date(Date.UTC(y, target + 1, 0)).getUTCDate();\n return isoDay(Date.UTC(y, target, Math.min(d, last)) / DAY);\n },\n});\n\nexport const MonthsBetween = defineFunction({\n name: \"MonthsBetween\",\n description:\n \"Whole months from one date to another (negative if to is earlier); @Floor(@MonthsBetween(birthday, @Today()) / 12) is an age\",\n params: z.object({ from: date(), to: date() }),\n returns: z.number(),\n fn: ({ from, to }) => {\n const [y1, m1, d1] = ymd(parseDate(from).day);\n const [y2, m2, d2] = ymd(parseDate(to).day);\n let months = (y2 - y1) * 12 + (m2 - m1);\n if (months > 0 && d2 < d1) months -= 1;\n if (months < 0 && d2 > d1) months += 1;\n return months;\n },\n});\n\nexport const StartOf = defineFunction({\n name: \"StartOf\",\n description: 'First day of the date\\'s \"week\" (Monday), \"month\" or \"year\", as \"YYYY-MM-DD\"',\n params: z.object({ date: date(), unit: z.enum([\"week\", \"month\", \"year\"]) }),\n returns: z.string(),\n fn: ({ date, unit }) => {\n const day = parseDate(date).day;\n const [y, m] = ymd(day);\n if (unit === \"week\") return isoDay(day - ((new Date(day * DAY).getUTCDay() + 6) % 7));\n return isoDay(Date.UTC(y, unit === \"month\" ? m : 0, 1) / DAY);\n },\n});\n\nexport const dateFunctions = [\n Now,\n Today,\n FormatDate,\n AddDays,\n AddMonths,\n DaysBetween,\n MonthsBetween,\n StartOf,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { isoDay, parseDate } from \"./dates\";\nimport {\n agg,\n aggregate,\n finite,\n groups,\n list,\n MAX_ITEMS,\n numbers,\n read,\n toNum,\n type Agg,\n} from \"./helpers\";\n\nconst keyValue = () =>\n z.array(z.object({ key: z.union([z.string(), z.number()]), value: z.number() }));\n// Untyped arrays (a pluck over rows that lack the field) can still hold nulls\nconst finiteOnly = (values: unknown[]) =>\n values.filter((v): v is number => typeof v === \"number\" && Number.isFinite(v));\nconst defaultAgg = (field: string | undefined, how: Agg | undefined): Agg =>\n how ?? (field ? \"sum\" : \"count\");\n\n/** Copy of each row with `field` replaced; field \"\" maps a list of numbers. */\nfunction mapField(rows: unknown[], field: string, values: number[]): unknown[] {\n return rows.map((row, i) => (field ? { ...(row as object), [field]: values[i] } : values[i]));\n}\n\nexport const GroupBy = defineFunction({\n name: \"GroupBy\",\n description:\n 'One row per distinct key, in first-seen order; value is agg of field (default \"sum\"), or the row count without a field',\n params: z.object({\n rows: list(),\n key: z.string(),\n field: z.string().optional(),\n agg: agg().optional(),\n }),\n returns: keyValue(),\n fn: ({ rows, key, field, agg: how }) =>\n [...groups(rows, key)].map(([k, members]) => ({\n key: k,\n value: aggregate(members, field, defaultAgg(field, how)),\n })),\n});\n\nexport const Pivot = defineFunction({\n name: \"Pivot\",\n description:\n \"One row per rowKey value, under key, with a column per colKey value holding agg of field, for stacked or grouped charts\",\n params: z.object({\n rows: list(),\n rowKey: z.string(),\n colKey: z.string(),\n field: z.string().optional(),\n agg: agg().optional(),\n }),\n returns: z.array(z.record(z.string(), z.union([z.string(), z.number()]))),\n fn: ({ rows, rowKey, colKey, field, agg: how }) => {\n const cols = [...groups(rows, colKey).keys()].map(String);\n return [...groups(rows, rowKey)].map(([k, members]) => {\n const out: Record<string, string | number> = { key: k };\n for (const col of cols) out[col] = 0;\n for (const [c, cell] of groups(members, colKey))\n out[String(c)] = aggregate(cell, field, defaultAgg(field, how));\n return out;\n });\n },\n});\n\nexport const Top = defineFunction({\n name: \"Top\",\n description: 'The n rows with the largest field (\"asc\": the smallest)',\n params: z.object({\n rows: list(),\n field: z.string(),\n n: z.number(),\n direction: z.enum([\"desc\", \"asc\"]).optional(),\n }),\n returns: list(),\n fn: ({ rows, field, n, direction = \"desc\" }) => {\n const sign = direction === \"asc\" ? 1 : -1;\n const ranked = rows\n .map((row, i) => ({ row, i, v: toNum(read(row, field)) }))\n .sort((a, b) => {\n if (a.v === null || b.v === null) return a.v === b.v ? a.i - b.i : a.v === null ? 1 : -1;\n return (a.v - b.v) * sign || a.i - b.i;\n });\n return ranked.slice(0, Math.max(0, Math.trunc(n))).map((r) => r.row);\n },\n});\n\nconst ISO_DATE = /^\\d{4}-\\d{2}-\\d{2}/;\nconst isoDate = (value: unknown) => typeof value === \"string\" && ISO_DATE.test(value.trim());\n\n/**\n * Orders two field values: numbers by value; a \"YYYY-MM-DD\" or ISO date against another date or\n * a timestamp by day; anything else as text.\n */\nfunction compare(a: unknown, b: unknown): number {\n const x = toNum(a);\n const y = toNum(b);\n if (x !== null && y !== null) return x - y;\n if ((isoDate(a) || isoDate(b)) && (isoDate(a) || x !== null) && (isoDate(b) || y !== null)) {\n try {\n return parseDate(a as string | number).day - parseDate(b as string | number).day;\n } catch {\n // Not a real date after all: compare as text below.\n }\n }\n const s = String(a);\n const t = String(b);\n return s < t ? -1 : s > t ? 1 : 0;\n}\n\nexport const Between = defineFunction({\n name: \"Between\",\n description:\n 'Rows whose field is from min to max, both included; compares numbers, dates by day (\"YYYY-MM-DD\", ISO or a timestamp), or text. Leave min or max null for an open end',\n params: z.object({\n rows: list(),\n field: z.string(),\n min: z.any().optional(),\n max: z.any().optional(),\n }),\n returns: list(),\n fn: ({ rows, field, min, max }) =>\n rows.filter((row) => {\n const v = read(row, field);\n if (v == null) return false;\n return (min == null || compare(v, min) >= 0) && (max == null || compare(v, max) <= 0);\n }),\n});\n\nfunction periodStart(day: number, unit: \"day\" | \"week\" | \"month\"): number {\n if (unit === \"day\") return day;\n if (unit === \"week\") return day - ((new Date(day * 86_400_000).getUTCDay() + 6) % 7); // Monday\n const d = new Date(day * 86_400_000);\n return Date.UTC(d.getUTCFullYear(), d.getUTCMonth(), 1) / 86_400_000;\n}\n\nfunction nextPeriod(start: number, unit: \"day\" | \"week\" | \"month\"): number {\n if (unit === \"day\") return start + 1;\n if (unit === \"week\") return start + 7;\n const d = new Date(start * 86_400_000);\n return Date.UTC(d.getUTCFullYear(), d.getUTCMonth() + 1, 1) / 86_400_000;\n}\n\nexport const Bucket = defineFunction({\n name: \"Bucket\",\n description:\n 'Rows per day, week (from Monday) or month of dateField, in date order, empty periods 0 for sum and count; key is \"YYYY-MM-DD\", or \"YYYY-MM\" for months',\n params: z.object({\n rows: list(),\n dateField: z.string(),\n unit: z.enum([\"day\", \"week\", \"month\"]),\n field: z.string().optional(),\n agg: agg().optional(),\n }),\n returns: keyValue(),\n fn: ({ rows, dateField, unit, field, agg: how }) => {\n const byPeriod = new Map<number, unknown[]>();\n for (const row of rows) {\n const raw = read(row, dateField);\n if (typeof raw !== \"string\" && typeof raw !== \"number\") continue;\n let day: number;\n try {\n day = parseDate(raw).day;\n } catch {\n continue;\n }\n const start = periodStart(day, unit);\n const bucket = byPeriod.get(start);\n if (bucket) bucket.push(row);\n else byPeriod.set(start, [row]);\n }\n if (!byPeriod.size) return [];\n const mode = defaultAgg(field, how);\n const fill = mode === \"sum\" || mode === \"count\";\n const label = (start: number) => (unit === \"month\" ? isoDay(start).slice(0, 7) : isoDay(start));\n const starts = [...byPeriod.keys()].sort((a, b) => a - b);\n const out: { key: string; value: number }[] = [];\n for (let s = starts[0]!; s <= starts[starts.length - 1]!; s = nextPeriod(s, unit)) {\n const members = byPeriod.get(s);\n if (members) out.push({ key: label(s), value: aggregate(members, field, mode) });\n else if (fill) out.push({ key: label(s), value: 0 });\n if (out.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} periods`);\n }\n return out;\n },\n});\n\nexport const Cumulative = defineFunction({\n name: \"Cumulative\",\n description:\n 'Copy of the rows with field replaced by its running total (field \"\" for a list of numbers)',\n params: z.object({ rows: list(), field: z.string() }),\n returns: list(),\n fn: ({ rows, field }) => {\n let total = 0;\n return mapField(\n rows,\n field,\n rows.map((row) => (total += toNum(read(row, field)) ?? 0)),\n );\n },\n});\n\nexport const MovingAvg = defineFunction({\n name: \"MovingAvg\",\n description:\n 'Copy of the rows with field replaced by the average of its last window values (field \"\" for a list of numbers)',\n params: z.object({ rows: list(), field: z.string(), window: z.number() }),\n returns: list(),\n fn: ({ rows, field, window }) => {\n const w = Math.trunc(window);\n if (w < 1) throw new Error(\"window must be at least 1\");\n const values = rows.map((row) => toNum(read(row, field)) ?? 0);\n const averages = values.map((_, i) => {\n const span = values.slice(Math.max(0, i - w + 1), i + 1);\n return span.reduce((a, b) => a + b, 0) / span.length;\n });\n return mapField(rows, field, averages);\n },\n});\n\nexport const Change = defineFunction({\n name: \"Change\",\n description:\n \"Percent change from previous to current, e.g. @Change(120, 100) is 20; null when previous is 0\",\n params: z.object({ current: z.number(), previous: z.number() }),\n returns: z.number().nullable(),\n // No previous value is normal while data loads, so it is null without an error\n fn: ({ current, previous }) =>\n previous === 0 ? null : finite(((current - previous) / Math.abs(previous)) * 100),\n});\n\nexport const Histogram = defineFunction({\n name: \"Histogram\",\n description:\n \"Counts numbers into equal-width bins as {key, value} rows: key is the bin's start, value the count; min and max fix the range, default the data's\",\n params: z.object({\n values: numbers(),\n bins: z.number(),\n min: z.number().optional(),\n max: z.number().optional(),\n }),\n // Only key and value, as @GroupBy and @Bucket return: Chart plots every number key by default.\n returns: z.array(z.object({ key: z.string(), value: z.number() })),\n fn: ({ values: raw, bins, min, max }) => {\n const values = finiteOnly(raw);\n const n = Math.trunc(bins);\n if (n < 1 || n > 500) throw new Error(\"bins must be from 1 to 500\");\n const lo = min ?? (values.length ? Math.min(...values) : 0);\n let hi = max ?? (values.length ? Math.max(...values) : 1);\n if (hi <= lo) hi = lo + 1;\n const width = (hi - lo) / n;\n const decimals = Math.max(0, 1 - Math.floor(Math.log10(width)));\n const counts = new Array<number>(n).fill(0);\n for (const v of values) {\n if (v < lo || v > hi) continue;\n counts[Math.min(n - 1, Math.floor((v - lo) / width))]!++;\n }\n return counts.map((value, i) => ({\n key: String(Number((lo + i * width).toFixed(decimals))),\n value,\n }));\n },\n});\n\nexport const Stats = defineFunction({\n name: \"Stats\",\n description: \"Summary of numbers, all zeros for an empty list\",\n params: z.object({ values: numbers() }),\n returns: z.object({\n count: z.number(),\n min: z.number(),\n max: z.number(),\n mean: z.number(),\n median: z.number(),\n stdev: z.number(),\n }),\n fn: ({ values: raw }) => {\n const values = finiteOnly(raw);\n const count = values.length;\n if (!count) return { count: 0, min: 0, max: 0, mean: 0, median: 0, stdev: 0 };\n const sorted = [...values].sort((a, b) => a - b);\n const mean = values.reduce((a, b) => a + b, 0) / count;\n const mid = Math.floor(count / 2);\n const median = count % 2 ? sorted[mid]! : (sorted[mid - 1]! + sorted[mid]!) / 2;\n const stdev = Math.sqrt(values.reduce((a, v) => a + (v - mean) ** 2, 0) / count);\n return { count, min: sorted[0]!, max: sorted[count - 1]!, mean, median, stdev };\n },\n});\n\nexport const dataFunctions = [\n GroupBy,\n Pivot,\n Top,\n Between,\n Bucket,\n Cumulative,\n MovingAvg,\n Change,\n Histogram,\n Stats,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { list, MAX_ITEMS, read, same } from \"./helpers\";\n\nconst index = (i: number, length: number) => (i < 0 ? length + i : i);\n\nexport const Append = defineFunction({\n name: \"Append\",\n description: \"Copy of the list with item added at the end\",\n params: z.object({ list: list(), item: z.any() }),\n returns: list(),\n fn: ({ list, item }) => {\n if (list.length + 1 > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return [...list, item];\n },\n});\n\nexport const Prepend = defineFunction({\n name: \"Prepend\",\n description: \"Copy of the list with item added at the start\",\n params: z.object({ list: list(), item: z.any() }),\n returns: list(),\n fn: ({ list, item }) => {\n if (list.length + 1 > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return [item, ...list];\n },\n});\n\nexport const Concat = defineFunction({\n name: \"Concat\",\n description: \"Joins two lists\",\n params: z.object({ list: list(), more: list() }),\n returns: list(),\n fn: ({ list, more }) => {\n if (list.length + more.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return [...list, ...more];\n },\n});\n\nexport const Remove = defineFunction({\n name: \"Remove\",\n description:\n 'Copy without the items whose field equals value; field \"\" compares the items themselves',\n params: z.object({ list: list(), field: z.string(), value: z.any() }),\n returns: list(),\n fn: ({ list, field, value }) => list.filter((item) => !same(read(item, field), value)),\n});\n\nexport const RemoveAt = defineFunction({\n name: \"RemoveAt\",\n description: \"Copy without the item at index (0-based; negative counts from the end)\",\n params: z.object({ list: list(), index: z.number() }),\n returns: list(),\n fn: ({ list, index: at }) => {\n const i = index(Math.trunc(at), list.length);\n return list.filter((_, j) => j !== i);\n },\n});\n\nexport const Update = defineFunction({\n name: \"Update\",\n description: \"Copy where items whose field equals value get setField set to setValue\",\n params: z.object({\n list: list(),\n field: z.string(),\n value: z.any(),\n setField: z.string(),\n setValue: z.any(),\n }),\n returns: list(),\n fn: ({ list, field, value, setField, setValue }) =>\n list.map((item) =>\n item && typeof item === \"object\" && !Array.isArray(item) && same(read(item, field), value)\n ? { ...item, [setField]: setValue }\n : item,\n ),\n});\n\nexport const Toggle = defineFunction({\n name: \"Toggle\",\n description: \"Adds item if missing, removes it if present (a set of strings or numbers)\",\n params: z.object({ list: list(), item: z.any() }),\n returns: list(),\n fn: ({ list, item }) =>\n list.some((x) => same(x, item)) ? list.filter((x) => !same(x, item)) : [...list, item],\n});\n\nexport const Includes = defineFunction({\n name: \"Includes\",\n description: \"True if the list has item, or the text contains it\",\n params: z.object({ list: z.union([list(), z.string()]), item: z.any() }),\n returns: z.boolean(),\n fn: ({ list, item }) =>\n typeof list === \"string\"\n ? item != null && list.includes(String(item))\n : list.some((x) => same(x, item)),\n});\n\nexport const Find = defineFunction({\n name: \"Find\",\n description: \"First item whose field equals value, or null\",\n params: z.object({ list: list(), field: z.string(), value: z.any() }),\n returns: z.any(),\n fn: ({ list, field, value }) => list.find((item) => same(read(item, field), value)) ?? null,\n});\n\nexport const IndexOf = defineFunction({\n name: \"IndexOf\",\n description: \"Index of item in the list, or -1\",\n params: z.object({ list: list(), item: z.any() }),\n returns: z.number(),\n fn: ({ list, item }) => list.findIndex((x) => same(x, item)),\n});\n\nexport const Take = defineFunction({\n name: \"Take\",\n description: \"The first n items; a negative n takes the last n\",\n params: z.object({ list: list(), n: z.number() }),\n returns: list(),\n fn: ({ list, n }) => {\n const k = Math.trunc(n);\n return k >= 0 ? list.slice(0, k) : list.slice(k);\n },\n});\n\nexport const Slice = defineFunction({\n name: \"Slice\",\n description:\n \"Items, or characters of text, from start up to end (not included); negative counts from the end\",\n params: z.object({\n list: z.union([list(), z.string()]),\n start: z.number(),\n end: z.number().optional(),\n }),\n returns: z.union([list(), z.string()]),\n fn: ({ list, start, end }) => {\n const to = end === undefined ? undefined : Math.trunc(end);\n return typeof list === \"string\"\n ? list.slice(Math.trunc(start), to)\n : list.slice(Math.trunc(start), to);\n },\n});\n\nexport const Unique = defineFunction({\n name: \"Unique\",\n description: \"Distinct items in first-seen order\",\n params: z.object({ list: list() }),\n returns: list(),\n // Equal as @Includes and @Toggle see it (same): 1 matches \"1\", and object key order is ignored.\n fn: ({ list }) => {\n const primitives = new Set<string>();\n const objects: unknown[] = [];\n return list.filter((item) => {\n if (item === null || typeof item !== \"object\") {\n const key = String(item);\n if (primitives.has(key)) return false;\n primitives.add(key);\n return true;\n }\n if (objects.some((kept) => same(kept, item))) return false;\n objects.push(item);\n return true;\n });\n },\n});\n\nexport const Reverse = defineFunction({\n name: \"Reverse\",\n description: \"Copy in reverse order\",\n params: z.object({ list: list() }),\n returns: list(),\n fn: ({ list }) => [...list].reverse(),\n});\n\nexport const Range = defineFunction({\n name: \"Range\",\n description:\n \"Numbers from start up to end (not included) by step (default 1), e.g. @Range(0, 3) is [0, 1, 2]\",\n params: z.object({ start: z.number(), end: z.number(), step: z.number().optional() }),\n returns: z.array(z.number()),\n fn: ({ start, end, step = 1 }) => {\n if (step === 0 || !Number.isFinite(step)) throw new Error(\"step must be a non-zero number\");\n const count = Math.max(0, Math.ceil((end - start) / step));\n if (count > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n const whole = Number.isInteger(start) && Number.isInteger(step);\n // Rounding keeps fractional steps clean: 0.1 * 3 is 0.30000000000000004\n return Array.from({ length: count }, (_, i) =>\n whole ? start + i * step : Number((start + i * step).toPrecision(12)),\n );\n },\n});\n\nexport const Pick = defineFunction({\n name: \"Pick\",\n description:\n \"A random item, or null for an empty list; draws anew each time, so call it inside @Set\",\n params: z.object({ list: list() }),\n returns: z.any(),\n fn: ({ list }) => (list.length ? list[Math.floor(Math.random() * list.length)] : null),\n});\n\nexport const Shuffle = defineFunction({\n name: \"Shuffle\",\n description: \"Copy in random order; call it inside @Set\",\n params: z.object({ list: list() }),\n returns: list(),\n fn: ({ list }) => {\n const out = [...list];\n for (let i = out.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [out[i], out[j]] = [out[j], out[i]];\n }\n return out;\n },\n});\n\nexport const Flatten = defineFunction({\n name: \"Flatten\",\n description: \"One list from a list of lists, e.g. [[1, 2], [3]] is [1, 2, 3]\",\n params: z.object({ list: list() }),\n returns: list(),\n fn: ({ list }) => {\n const out = list.flatMap((item) => (Array.isArray(item) ? item : [item]));\n if (out.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return out;\n },\n});\n\nexport const Chunk = defineFunction({\n name: \"Chunk\",\n description: \"The list cut into lists of size items, e.g. for weeks of 7 days or pages\",\n params: z.object({ list: list(), size: z.number() }),\n returns: z.array(list()),\n fn: ({ list, size }) => {\n const n = Math.trunc(size);\n if (n < 1) throw new Error(\"size must be 1 or more\");\n const out: unknown[][] = [];\n for (let i = 0; i < list.length; i += n) out.push(list.slice(i, i + n));\n return out;\n },\n});\n\nexport const listFunctions = [\n Append,\n Prepend,\n Concat,\n Remove,\n RemoveAt,\n Update,\n Toggle,\n Includes,\n Find,\n IndexOf,\n Take,\n Slice,\n Unique,\n Reverse,\n Range,\n Pick,\n Shuffle,\n Flatten,\n Chunk,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { finite, numbers } from \"./helpers\";\n\nexport const Pow = defineFunction({\n name: \"Pow\",\n description: \"base raised to exponent\",\n params: z.object({ base: z.number(), exponent: z.number() }),\n returns: z.number(),\n fn: ({ base, exponent }) => finite(Math.pow(base, exponent)),\n});\n\nexport const Sqrt = defineFunction({\n name: \"Sqrt\",\n description: \"Square root; null for a negative number\",\n params: z.object({ number: z.number() }),\n returns: z.number().nullable(),\n // A negative number is an expected input, not an error, so it returns null without throwing.\n fn: ({ number }) => (number < 0 ? null : finite(Math.sqrt(number))),\n});\n\nexport const Random = defineFunction({\n name: \"Random\",\n description:\n \"Random number from min to max (integer true: a whole number, max included); draws anew each time, so call it inside @Set\",\n params: z.object({ min: z.number(), max: z.number(), integer: z.boolean().optional() }),\n returns: z.number(),\n fn: ({ min, max, integer }) => {\n if (!Number.isFinite(min) || !Number.isFinite(max))\n throw new Error(\"min and max must be numbers\");\n const lo = Math.min(min, max);\n const hi = Math.max(min, max);\n if (!integer) return lo + Math.random() * (hi - lo);\n const a = Math.ceil(lo);\n const b = Math.floor(hi);\n if (a > b) throw new Error(\"no whole number between min and max\");\n return a + Math.floor(Math.random() * (b - a + 1));\n },\n});\n\nexport const Clamp = defineFunction({\n name: \"Clamp\",\n description: \"number kept between min and max\",\n params: z.object({ number: z.number(), min: z.number(), max: z.number() }),\n returns: z.number(),\n fn: ({ number, min, max }) =>\n finite(Math.min(Math.max(number, Math.min(min, max)), Math.max(min, max))),\n});\n\nexport const Percent = defineFunction({\n name: \"Percent\",\n description: \"part / total * 100, e.g. @Percent(3, 4) is 75; 0 when total is 0\",\n params: z.object({ part: z.number(), total: z.number() }),\n returns: z.number(),\n fn: ({ part, total }) => (total === 0 ? 0 : finite((part / total) * 100)),\n});\n\nexport const Lerp = defineFunction({\n name: \"Lerp\",\n description: \"The value a fraction t of the way from a to b\",\n params: z.object({ a: z.number(), b: z.number(), t: z.number() }),\n returns: z.number(),\n fn: ({ a, b, t }) => finite(a + (b - a) * t),\n});\n\nexport const Allocate = defineFunction({\n name: \"Allocate\",\n description:\n \"Splits total in proportion to weights, rounded to decimals (default 2), so the parts add up to exactly total, e.g. @Allocate(100, [1, 1, 1]) is [33.34, 33.33, 33.33]\",\n params: z.object({ total: z.number(), weights: numbers(), decimals: z.number().optional() }),\n returns: z.array(z.number()),\n fn: ({ total, weights, decimals }) => {\n const sum = weights.reduce((a, b) => a + b, 0);\n if (!weights.length || weights.some((w) => !Number.isFinite(w) || w < 0))\n throw new Error(\"weights must be zero or more\");\n // All-zero weights (a day with nothing to split across) give all zeros\n if (sum === 0) return weights.map(() => 0);\n // Whole units (cents for 2 decimals); the leftover units go to the largest remainders\n const places = decimals !== undefined && Number.isFinite(decimals) ? decimals : 2;\n const scale = 10 ** Math.min(6, Math.max(0, Math.round(places)));\n const units = Math.round(Math.abs(total) * scale);\n const exact = weights.map((w) => (units * w) / sum);\n const parts = exact.map(Math.floor);\n let left = units - parts.reduce((a, b) => a + b, 0);\n const order = exact\n .map((x, i) => ({ i, rest: x - Math.floor(x) }))\n .sort((a, b) => b.rest - a.rest || a.i - b.i);\n for (const { i } of order) {\n if (left <= 0) break;\n parts[i] += 1;\n left -= 1;\n }\n return parts.map((p) => (total < 0 ? -p : p) / scale);\n },\n});\n\nexport const Payment = defineFunction({\n name: \"Payment\",\n description:\n \"Payment per period that repays principal over periods at rate percent per period, e.g. a 30-year loan at 6% a year: @Payment(300000, 6 / 12, 360)\",\n params: z.object({ principal: z.number(), rate: z.number(), periods: z.number() }),\n returns: z.number(),\n fn: ({ principal, rate, periods }) => {\n if (!(periods > 0)) throw new Error(\"periods must be positive\");\n const r = rate / 100;\n return finite(\n r === 0 ? principal / periods : (principal * r) / (1 - Math.pow(1 + r, -periods)),\n );\n },\n});\n\n// Units per kind, as the factor to the kind's base unit (m, kg, l, m/s)\nconst UNITS: Record<string, [string, number]> = {\n mm: [\"length\", 0.001],\n cm: [\"length\", 0.01],\n m: [\"length\", 1],\n km: [\"length\", 1000],\n in: [\"length\", 0.0254],\n ft: [\"length\", 0.3048],\n yd: [\"length\", 0.9144],\n mi: [\"length\", 1609.344],\n mg: [\"mass\", 1e-6],\n g: [\"mass\", 0.001],\n kg: [\"mass\", 1],\n oz: [\"mass\", 0.028349523125],\n lb: [\"mass\", 0.45359237],\n st: [\"mass\", 6.35029318],\n ml: [\"volume\", 0.001],\n l: [\"volume\", 1],\n tsp: [\"volume\", 0.00492892159375],\n tbsp: [\"volume\", 0.0147867647812],\n floz: [\"volume\", 0.0295735295625],\n cup: [\"volume\", 0.2365882365],\n pt: [\"volume\", 0.473176473],\n qt: [\"volume\", 0.946352946],\n gal: [\"volume\", 3.785411784],\n \"m/s\": [\"speed\", 1],\n \"km/h\": [\"speed\", 1 / 3.6],\n mph: [\"speed\", 0.44704],\n kn: [\"speed\", 0.514444],\n m2: [\"area\", 1],\n km2: [\"area\", 1e6],\n ft2: [\"area\", 0.09290304],\n ha: [\"area\", 10000],\n acre: [\"area\", 4046.8564224],\n};\nconst TEMPS = [\"c\", \"f\", \"k\"];\nconst toCelsius = (v: number, u: string) =>\n u === \"f\" ? ((v - 32) * 5) / 9 : u === \"k\" ? v - 273.15 : v;\nconst fromCelsius = (v: number, u: string) =>\n u === \"f\" ? (v * 9) / 5 + 32 : u === \"k\" ? v + 273.15 : v;\n\nexport const Convert = defineFunction({\n name: \"Convert\",\n description:\n \"value from one unit to another: mm cm m km in ft yd mi; mg g kg oz lb st; ml l tsp tbsp floz cup pt qt gal (US); m/s km/h mph kn; m2 km2 ft2 ha acre; c f k\",\n params: z.object({ value: z.number(), from: z.string(), to: z.string() }),\n returns: z.number(),\n fn: ({ value, from, to }) => {\n const [a, b] = [from.trim().toLowerCase(), to.trim().toLowerCase()];\n if (TEMPS.includes(a) && TEMPS.includes(b)) return finite(fromCelsius(toCelsius(value, a), b));\n const [ua, ub] = [UNITS[a], UNITS[b]];\n if (!ua || !ub || ua[0] !== ub[0]) throw new Error(`cannot convert ${from} to ${to}`);\n return finite((value * ua[1]) / ub[1]);\n },\n});\n\nexport const numberFunctions = [\n Pow,\n Sqrt,\n Random,\n Clamp,\n Percent,\n Lerp,\n Allocate,\n Payment,\n Convert,\n];\n","import { defineFunction } from \"@wodecorp/openui-vue-lang\";\nimport { z } from \"zod/v4\";\nimport { list, MAX_ITEMS, read } from \"./helpers\";\n\nconst LOCALE = \"en-US\";\n\nfunction currencyCode(code: string | undefined): string {\n const upper = (code ?? \"USD\").toUpperCase();\n return /^[A-Z]{3}$/.test(upper) ? upper : \"USD\";\n}\n\n/** Formats with Intl; an unknown currency code falls back to USD instead of throwing. */\nfunction format(value: number, options: Intl.NumberFormatOptions): string {\n try {\n return value.toLocaleString(LOCALE, options);\n } catch {\n return value.toLocaleString(LOCALE, { ...options, currency: \"USD\" });\n }\n}\n\nexport const Format = defineFunction({\n name: \"Format\",\n description:\n 'Number as text: \"number\" 12,345.6, \"currency\" $12,345.68 (currency is a code like \"EUR\"), \"percent\" 45 -> 45%, \"compact\" 1.2M ($1.2M with a currency)',\n params: z.object({\n value: z.number(),\n kind: z.enum([\"number\", \"currency\", \"percent\", \"compact\"]).optional(),\n decimals: z.number().optional(),\n currency: z.string().optional(),\n }),\n returns: z.string(),\n fn: ({ value, kind = \"number\", decimals, currency }) => {\n if (!Number.isFinite(value)) throw new Error(\"value is not a finite number\");\n const d = decimals === undefined ? undefined : Math.min(Math.max(Math.trunc(decimals), 0), 10);\n // decimals caps the digits; only currency pads to it, so 600 never reads \"600.0\".\n const digits = (fallbackMax: number, fallbackMin = 0) =>\n d === undefined\n ? { minimumFractionDigits: fallbackMin, maximumFractionDigits: fallbackMax }\n : { minimumFractionDigits: fallbackMin && d, maximumFractionDigits: d };\n switch (kind) {\n case \"currency\":\n return format(value, {\n style: \"currency\",\n currency: currencyCode(currency),\n ...digits(2, 2),\n });\n case \"percent\":\n return `${format(value, digits(1))}%`;\n case \"compact\":\n return format(value, {\n notation: \"compact\",\n ...digits(1),\n ...(currency ? { style: \"currency\", currency: currencyCode(currency) } : {}),\n });\n default:\n return format(value, digits(2));\n }\n },\n});\n\nexport const Join = defineFunction({\n name: \"Join\",\n description: 'Joins the items (or their field) into text with sep (default \", \"), skipping nulls',\n params: z.object({ list: list(), sep: z.string().optional(), field: z.string().optional() }),\n returns: z.string(),\n fn: ({ list, sep = \", \", field = \"\" }) =>\n list\n .map((item) => read(item, field))\n .filter((v) => v != null)\n .map((v) => (typeof v === \"object\" ? JSON.stringify(v) : String(v)))\n .join(sep),\n});\n\nexport const Plural = defineFunction({\n name: \"Plural\",\n description:\n 'Count and word: @Plural(1, \"guest\") is \"1 guest\", 3 gives \"3 guests\"; plural defaults to word + \"s\"',\n params: z.object({ n: z.number(), word: z.string(), plural: z.string().optional() }),\n returns: z.string(),\n fn: ({ n, word, plural }) =>\n `${format(n, { maximumFractionDigits: 2 })} ${Math.abs(n) === 1 ? word : (plural ?? `${word}s`)}`,\n});\n\nexport const Pad = defineFunction({\n name: \"Pad\",\n description: 'Pads the start of value to length with char (default \"0\"), e.g. 7 -> \"07\"',\n params: z.object({\n value: z.union([z.string(), z.number()]),\n length: z.number(),\n char: z.string().optional(),\n }),\n returns: z.string(),\n fn: ({ value, length, char = \"0\" }) =>\n String(value).padStart(Math.min(Math.trunc(length), 1000), char || \"0\"),\n});\n\nexport const Upper = defineFunction({\n name: \"Upper\",\n description: \"Text in upper case\",\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) => text.toUpperCase(),\n});\n\nexport const Lower = defineFunction({\n name: \"Lower\",\n description: \"Text in lower case\",\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) => text.toLowerCase(),\n});\n\nexport const Trim = defineFunction({\n name: \"Trim\",\n description: \"Text without spaces at the start and end\",\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) => text.trim(),\n});\n\nexport const Capitalize = defineFunction({\n name: \"Capitalize\",\n description: 'Each word with a capital first letter, e.g. \"new york\" is \"New York\"',\n params: z.object({ text: z.string() }),\n returns: z.string(),\n fn: ({ text }) =>\n text.replace(\n /(^|[\\s\\-(/\"])(\\p{L})/gu,\n (_, before: string, letter: string) => before + letter.toUpperCase(),\n ),\n});\n\nexport const Split = defineFunction({\n name: \"Split\",\n description:\n 'List of the parts of text between sep (default \",\"), each trimmed, empty parts dropped, e.g. @Split(\"a, b,,c\") is [\"a\", \"b\", \"c\"]',\n params: z.object({ text: z.string(), sep: z.string().optional() }),\n returns: z.array(z.string()),\n fn: ({ text, sep = \",\" }) => {\n const parts = text\n .split(sep === \"\" ? \"\" : sep)\n .map((p) => p.trim())\n .filter((p) => p !== \"\");\n if (parts.length > MAX_ITEMS) throw new Error(`more than ${MAX_ITEMS} items`);\n return parts;\n },\n});\n\nexport const Replace = defineFunction({\n name: \"Replace\",\n description: \"Text with every find replaced by replacement\",\n params: z.object({ text: z.string(), find: z.string(), replacement: z.string() }),\n returns: z.string(),\n fn: ({ text, find, replacement }) => (find === \"\" ? text : text.split(find).join(replacement)),\n});\n\nexport const Duration = defineFunction({\n name: \"Duration\",\n description: 'Seconds as text: \"short\" 1h 20m, 4m 05s, 45s (default); \"clock\" 1:20:00, 4:05',\n params: z.object({ seconds: z.number(), style: z.enum([\"short\", \"clock\"]).optional() }),\n returns: z.string(),\n fn: ({ seconds, style = \"short\" }) => {\n if (!Number.isFinite(seconds)) throw new Error(\"seconds is not a finite number\");\n const sign = seconds < 0 ? \"-\" : \"\";\n const total = Math.round(Math.abs(seconds));\n const [h, m, s] = [Math.floor(total / 3600), Math.floor((total % 3600) / 60), total % 60];\n const two = (n: number) => String(n).padStart(2, \"0\");\n if (style === \"clock\") return sign + (h ? `${h}:${two(m)}:${two(s)}` : `${m}:${two(s)}`);\n if (h) return `${sign}${h}h${m ? ` ${m}m` : \"\"}`;\n if (m) return `${sign}${m}m${s ? ` ${two(s)}s` : \"\"}`;\n return `${sign}${s}s`;\n },\n});\n\nexport const Default = defineFunction({\n name: \"Default\",\n description:\n 'value, or fallback when value is null, \"\" or not a number, e.g. an empty number input: @Default($weight, 0)',\n params: z.object({ value: z.any().optional(), fallback: z.any() }),\n returns: z.any(),\n // Annotated explicitly: z.any() params give defineFunction nothing to infer\n // from, and older @openuidev/react-lang then reports an implicit any here.\n fn: ({ value, fallback }: { value?: unknown; fallback: unknown }) =>\n value == null || value === \"\" || (typeof value === \"number\" && Number.isNaN(value))\n ? fallback\n : value,\n});\n\nexport const textFunctions = [\n Format,\n Join,\n Plural,\n Pad,\n Upper,\n Lower,\n Trim,\n Capitalize,\n Split,\n Replace,\n Duration,\n Default,\n];\n","import { colorFunctions } from \"./colors\";\nimport { dataFunctions } from \"./data\";\nimport { dateFunctions } from \"./dates\";\nimport { listFunctions } from \"./lists\";\nimport { numberFunctions } from \"./numbers\";\nimport { textFunctions } from \"./text\";\n\n/**\n * Generic functions the model calls as @Name(args) to compute inside a page:\n * edit lists held in $variables, do the math, format text and dates, and\n * shape Query rows for charts. They are pure except @Random, @Pick, @Shuffle,\n * @Now and @Today. Bad arguments, or a throw, make a call evaluate to null.\n */\nexport const functions = [\n ...listFunctions,\n ...numberFunctions,\n ...textFunctions,\n ...colorFunctions,\n ...dateFunctions,\n ...dataFunctions,\n];\n","import { createLibrary, type ComponentGroup, type Library } from \"@wodecorp/openui-vue-lang\";\nimport { intelligentComponents } from \"./defineComponents\";\nimport { functions } from \"./functions\";\n\nexport const componentGroups: ComponentGroup[] = [\n {\n name: \"Layout\",\n components: [\"Col\", \"Row\", \"Box\", \"Grid\", \"Card\", \"Carousel\", \"Popover\", \"Divider\", \"Spacer\"],\n notes: [\n '- gap and padding count 4px steps. Length is px or a CSS length like \"50%\". Radius is \"sm\", \"md\", \"lg\", \"xl\", \"full\" or px.',\n '- Color is \"ink\", \"muted\", \"faint\", \"surface\", \"info\", \"success\", \"warning\", \"danger\", \"purple\", \"pink\", \"chart1\" to \"chart6\", or a CSS color. As a background, status colors are soft tints.',\n ],\n },\n {\n name: \"Text\",\n components: [\n \"Title\",\n \"Text\",\n \"Caption\",\n \"Label\",\n \"Badge\",\n \"Link\",\n \"List\",\n \"ListItem\",\n \"Markdown\",\n \"Quote\",\n \"Code\",\n \"Math\",\n ],\n },\n {\n name: \"Inputs\",\n components: [\n \"Button\",\n \"IconButton\",\n \"Pressable\",\n \"Input\",\n \"TextArea\",\n \"Select\",\n \"SegmentedControl\",\n \"Slider\",\n \"Checkbox\",\n \"RadioGroup\",\n \"DatePicker\",\n \"Timer\",\n \"Form\",\n ],\n notes: [\n \"- An input's first argument is its value, usually a $variable that other statements read.\",\n '- Every input either changes something shown on the page, or sits in a Form whose submit Button sends a short first-person @ToAssistant (\"Help me choose a bike\"); the form values go with it. No dead inputs.',\n '- In a Form, a field\\'s last argument rules is checked before the form sends, and an error shows under the field. Rules is {required?, min?, max?, minLength?, maxLength?, email?, url?, numeric?, pattern?}: Input($email, \"Email\", \"text\", null, {required: true, email: true}).',\n ],\n },\n {\n name: \"Media and data\",\n components: [\"Image\", \"Icon\", \"Table\", \"Chart\", \"YouTube\"],\n },\n { name: \"Play\", components: [\"Flashcard\", \"Celebration\"] },\n {\n name: \"Drawing\",\n components: [\n \"Svg\",\n \"G\",\n \"Circle\",\n \"Ellipse\",\n \"Rect\",\n \"Line\",\n \"Path\",\n \"Polyline\",\n \"Polygon\",\n \"SvgText\",\n \"HtmlView\",\n ],\n },\n];\n\nexport const library: Required<Library> = createLibrary({\n root: \"Col\",\n components: intelligentComponents,\n functions,\n componentGroups,\n});\n","import type { PromptOptions } from \"@wodecorp/openui-vue-lang\";\n\n/**\n * Prompt options that teach the model to answer with working tools: the page\n * holds its inputs and lists in $variables and computes with @functions, so\n * it works without sending anything back to the assistant.\n */\n\nexport const exampleShoppingList = `root = Col([title, card])\ncard = Card([stepper, list, clear])\n$guests = 4\n$got = []\ntitle = Title(\"Pasta night for \" + @Plural($guests, \"guest\"), \"lg\")\nstepper = Row([IconButton(\"minus\", @Set($guests, @Clamp($guests - 1, 1, 20)), \"Fewer\"), Text($guests + \"\", \"lg\", null, \"semibold\"), IconButton(\"plus\", @Set($guests, @Clamp($guests + 1, 1, 20)), \"More\")], 3)\nlines = @Each(base, \"i\", {name: i.name, qty: @Round(i.qty * $guests / 4) + i.unit})\nlist = Col(@Each(lines, \"l\", Pressable([Row([Icon(@Includes($got, l.name) ? \"check-circle\" : \"circle\", \"sm\"), Text(l.qty + \" \" + l.name, \"sm\", null, null, false, @Includes($got, l.name))], 2)], @Set($got, @Toggle($got, l.name)), @Includes($got, l.name), 2)), 1)\nclear = Button(\"Clear ticks\", @Set($got, []), \"outline\", null, \"sm\", \"rotate-ccw\", @Count($got) == 0)\nbase = [{name: \"spaghetti\", qty: 400, unit: \" g\"}, {name: \"tomatoes\", qty: 6, unit: \"\"}, {name: \"parmesan\", qty: 80, unit: \" g\"}]`;\n\nexport const exampleTrip = `root = Col([title, intro, facts, Title(\"Day by day\", \"md\"), days, prefs])\n$pace = \"Relaxed\"\ntitle = Title(\"Three days in Lisbon\", \"xl\")\nintro = Text(\"Hills, tiled facades and the Tagus: start in **Alfama**, give a day to Belém, then take the train to Sintra.\")\nfacts = Row([Badge(\"Best in April to June\"), Badge(\"Tram 28\", \"info\"), Badge(\"About €120 a day\", \"success\")], 2, null, null, true)\ndays = Col(@Each(plan, \"d\", Card([Row([Badge(\"Day \" + d.day, \"info\"), Text(d.title, \"md\", null, \"semibold\")], 2), Text([Icon(\"map-pin\", \"sm\"), \" \" + d.place], \"sm\"), Text(d.text, \"sm\", \"muted\")], \"soft\")), 3)\nprefs = Card([Title(\"Make it yours\", \"sm\"), Form([RadioGroup($pace, [\"Relaxed\", \"Packed\"], \"Pace\", \"pills\"), Button(\"Plan my trip\", @ToAssistant(\"Tailor my Lisbon trip\"))])], \"soft\")\nplan = [{day: 1, title: \"Alfama\", place: \"São Jorge Castle\", text: \"Climb to the castle, then lunch on grilled sardines.\"}, {day: 2, title: \"Belém\", place: \"Jerónimos Monastery\", text: \"The monastery, the tower and pastéis de Belém.\"}, {day: 3, title: \"Sintra\", place: \"Pena Palace\", text: \"Train from Rossio; book the palace for 9 AM.\"}]`;\n\nexport const exampleSteps = `root = Col([head, viewer, strip])\n$step = 0\nhead = Col([Title(\"Build a small bookcase\", \"xl\"), Text(\"Four steps and about 30 minutes. You need the Allen key from the box and a hammer.\", \"md\", \"muted\")], 2)\nsteps = [{title: \"Lay out the parts\", text: \"Two sides, the top, one shelf and the bottom. Tap the 12 wooden dowels into the holes on the sides.\"}, {title: \"Fix the boards to one side\", text: \"Push the top, shelf and bottom onto one side's dowels, then turn each cam lock clockwise until it pulls tight.\"}, {title: \"Add the other side\", text: \"Fit the second side onto the free dowels and tighten its cam locks the same way.\"}, {title: \"Nail on the back\", text: \"Lay it face down, check the corners are square, then nail the back panel about every 10 cm.\"}]\ns0 = Svg([Rect(16, 20, 22, 120, \"surface\", \"ink\", 2), Rect(48, 20, 22, 120, \"surface\", \"ink\", 2), Rect(100, 28, 120, 16, \"surface\", \"ink\", 2), Rect(100, 68, 120, 16, \"surface\", \"ink\", 2), Rect(100, 108, 120, 16, \"surface\", \"ink\", 2), Circle(27, 36, 3, \"chart1\"), Circle(27, 80, 3, \"chart1\"), Circle(27, 124, 3, \"chart1\"), SvgText(\"Sides\", 43, 154, 11, \"muted\", \"middle\"), SvgText(\"Top\", 160, 22, 11, \"muted\", \"middle\"), SvgText(\"Shelf\", 160, 62, 11, \"muted\", \"middle\"), SvgText(\"Bottom\", 160, 102, 11, \"muted\", \"middle\")], \"0 0 240 160\", \"The parts: two sides, a top, a shelf and a bottom\")\ns1 = Svg([Rect(40, 16, 18, 128, \"surface\", \"ink\", 2), Rect(58, 16, 130, 14, \"surface\", \"ink\", 2), Rect(58, 72, 130, 14, \"surface\", \"ink\", 2), Rect(58, 130, 130, 14, \"surface\", \"ink\", 2), Circle(68, 23, 4, \"info\"), Circle(68, 79, 4, \"info\"), Circle(68, 137, 4, \"info\"), Line(212, 79, 196, 79, \"info\", 2), Polygon(\"192,79 200,74 200,84\", \"info\"), SvgText(\"Cam lock\", 74, 104, 11, \"info\")], \"0 0 240 160\", \"Cam locks join the top, shelf and bottom to one side\")\ns2 = Svg([Rect(40, 16, 18, 128, \"surface\", \"ink\", 2), Rect(58, 16, 130, 14, \"surface\", \"ink\", 2), Rect(58, 72, 130, 14, \"surface\", \"ink\", 2), Rect(58, 130, 130, 14, \"surface\", \"ink\", 2), Rect(196, 16, 18, 128, \"surface\", \"info\", 2), Line(232, 80, 220, 80, \"info\", 2), Polygon(\"216,80 224,75 224,85\", \"info\")], \"0 0 240 160\", \"The second side slides onto the panels\")\ns3 = Svg([Rect(40, 16, 160, 128, \"#EFE9DF\", \"ink\", 2), Rect(40, 16, 160, 14, \"surface\", \"ink\", 2), Rect(40, 72, 160, 14, \"surface\", \"ink\", 2), Rect(40, 130, 160, 14, \"surface\", \"ink\", 2), Circle(48, 50, 2.5, \"ink\"), Circle(192, 50, 2.5, \"ink\"), Circle(48, 108, 2.5, \"ink\"), Circle(192, 108, 2.5, \"ink\"), SvgText(\"Back panel\", 120, 56, 11, \"muted\", \"middle\")], \"0 0 240 160\", \"The back panel nailed to the frame\")\ndrawings = [s0, s1, s2, s3]\nviewer = Card([Row([Badge(\"Step \" + ($step + 1) + \" of 4\", \"info\"), Spacer(), Caption(@Format(@Percent($step + 1, 4), \"percent\") + \" done\")], 2), Box([drawings[$step]], null, null, 3, \"surface\", \"lg\"), Title(steps[$step].title, \"md\"), Text(steps[$step].text, \"sm\"), Row([Button(\"Back\", @Set($step, @Clamp($step - 1, 0, 3)), \"outline\", null, null, \"arrow-left\", $step == 0), Spacer(), Button(\"Next step\", @Set($step, @Clamp($step + 1, 0, 3)), \"solid\", null, null, \"arrow-right\", $step == 3)], 2)], null, null, 4)\nstrip = Grid(@Each(@Range(0, 4), \"i\", Pressable([drawings[i], Caption((i + 1) + \". \" + steps[i].title)], @Set($step, i), i == $step, 2)), 4, 110, 2)`;\n\nexport const additionalRules = [\n \"Compose the answer like a page, not a form letter: a Title, a short Text, then a mix of blocks that show the content. Row, Grid and Carousel to set things side by side; Badge rows for quick facts; Card only to group a block; Popover for an aside.\",\n \"Use Image only with a URL the user or a tool gave in this conversation. Never write an image URL yourself, even for a famous place or product: it will often be wrong. Without a URL, show the subject with an Icon, Badges or an Svg drawing instead.\",\n \"Spacing is a system with three tiers that always nest: inner (gap 1-2, 4-8px) for a title with its subtitle, tags or line; group (gap 3-4, 12-16px) between blocks inside a Card or grid cell; section (24px) between the blocks of the page. Leave gap unset on the page's root Col and on a Card's own contents: the app applies these tiers. Set it on a Row, a Grid or an inner Col. Never use one gap for everything, and never a gap larger than the section gap.\",\n 'A photo beside text is a media row: Row([Box([Image(url, alt, 1.33)]), Col([Title(..., \"md\"), Row([Badge(...), Badge(...)], 1, null, null, true), Text(..., \"sm\")], 2)], 4, \"start\"). The app sizes the photo to a third of the row (at most 200px) and top-aligns the text. Facts are Badges, never Buttons or boxed pills.',\n 'Keep cards compact and scannable: Title \"md\" for a card heading (xl or 2xl only for a single big number), Text \"sm\" for the body, at most one short paragraph, then facts as Badges or label/value rows (Caption label, Spacer, Text value). Don\\'t write bold-lead paragraphs like \"**Weekend rhythm:** ...\" or long prose in a card. Cards side by side in a Grid share the same blocks in the same order and the same Image aspect ratio, so they line up. For example: c = Card([Col([Title(\"Sonoma\", \"md\"), Row([Badge(\"1 h drive\", null, \"car\"), Badge(\"Wine country\", \"purple\")], 1, null, null, true)], 2), Text(\"A slow plaza, tasting rooms and quiet back roads.\", \"sm\"), Col([Row([Caption(\"Best for\"), Spacer(), Text(\"Food and wine\", \"sm\")]), Row([Caption(\"Trade-off\"), Spacer(), Text(\"Tastings add up\", \"sm\")])], 1)])',\n \"Answer with a working tool whenever the request involves numbers, choices, lists, steps, a game or something to explore: keep inputs and lists in $variables, compute everything shown from them with expressions and @functions, and change them with @Set. The page must work on its own, without another message.\",\n \"When the request leaves out a detail the answer depends on (a model, a size, a count), don't stop to ask: assume the most common case, say so in one short line, and build the whole answer, with a SegmentedControl or Select to switch to the other cases where they differ.\",\n 'Use @ToAssistant only for what the page cannot compute: a Form\\'s submit Button, or a new request (\"Plan another day\"). Its message is short and first person, like the user typing it (\"Help me choose a bike\"); the form values travel with it, so never repeat them in the message.',\n \"$variable defaults are literals (numbers, strings, lists, objects), never expressions or @calls. Edit lists with @Append, @Remove, @RemoveAt and @Update; track selections with @Toggle and @Includes.\",\n \"cond ? a : b also picks between components; there is no @If. Use only the listed @functions; you cannot define your own.\",\n 'Derive rows once in a statement with @Each(list, \"x\", {...}), then reuse them in @Each, Table, Chart, @Sum(rows.field) and @Join. @Each(@Range(0, n), \"i\", ...) builds a series or repeats a step.',\n \"@Random, @Pick and @Shuffle give a new value on every evaluation: call them inside @Set, so a click draws once and the page stays still.\",\n \"Pick the medium that shows the idea: Chart for numbers across time or categories; Svg drawings for shapes, parts and movement; Table for comparisons; Flashcard and Celebration for learning and games; HtmlView only for a game or animation that needs a loop.\",\n \"Draw with Svg whenever the user would otherwise have to picture it: assembly and how-to steps (a simple drawing for each step, like an instruction leaflet), knots and folds, how a machine, mechanism or the body works, geometry and science diagrams, the layout of a room, garden or board, chord and clock faces. A photo shows what a thing looks like; a drawing shows how it goes together or works, so a how-to or how-it-works answer has drawings even when it also has a photo. Keep each drawing simple: a viewBox about 240 wide, a dozen or so shapes in the listed colors with SvgText labels, a Line with a small Polygon head for an arrow, and let $variables such as the current step drive it.\",\n 'Format money, percentages and big numbers with @Format, counts with @Plural and dates with @FormatDate. @Percent is unrounded, so show it as @Format(@Percent(part, total), \"percent\"), never @Percent(...) + \"%\".',\n \"Dates relative to now (today, this week, next month) start from @Today(), never a fixed date. <, >, <= and >= compare numbers only, so order two dates with @DaysBetween(a, b) > 0.\",\n 'To change a page from an earlier answer, keep its $variable names and start them from that answer\\'s \"context and form values\", so what the user typed, added or ticked carries over.',\n \"Read a number input for a count or amount through @Default and @Clamp with a sensible minimum, e.g. @Clamp(@Default($people, 1), 1, 50), so 0, empty or negative cannot divide by zero or zero out the page.\",\n \"Answer a plain knowledge or safety question with Markdown text, adding a Quote only where it helps.\",\n];\n\nexport const examples = [\n `Example 1: A guest stepper that rescales a shopping list, with a checklist and a button that clears it:\\n\\n${exampleShoppingList}`,\n `Example 2: A composed trip answer: facts, day cards and a short form:\\n\\n${exampleTrip}`,\n `Example 3: Step-by-step instructions with a drawing for each step, driven by $step:\\n\\n${exampleSteps}`,\n];\n\n/** The chat prompt: no tools, $variables and functions. */\nexport const promptOptions: PromptOptions = {\n bindings: true,\n additionalRules,\n examples,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,SAAS;CACpB,MAAM;CACN,MAAM;CACN,QAAQ;CACR,OACE;CACF,SACE;CACF,SACE;CACF,eACE;CACF,KAAK;CACL,UACE;CACF,OAAO;CACP,OACE;CACF,OACE;CACF,QACE;CACF,cACE;CACF,YACE;CACF,YACE;CACF,OACE;CACF,OACE;CACF,YACE;CACF,WACE;CACF,gBACE;CACF,QACE;CACF,UACE;CACF,MAAM;CACN,UACE;CACF,SACE;CACF,aACE;CACF,SACE;CACF,aACE;CACF,QACE;CACF,YACE;CACF,QACE;CACF,YACE;CACF,MAAM;CACN,UACE;CACF,kBACE;CACF,cACE;CACF,kBACE;CACF,cACE;CACF,kBACE;CACF,aACE;CACF,iBACE;CACF,aACE;CACF,iBACE;CACF,WACE;CACF,eACE;CACF,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,cAAc;CACd,cAAc;CACd,YAAY;CACZ,UAAU;CACV,WAAW;CACX,UAAU;CACV,UAAU;CACV,UAAU;CACV,UAAU;CACV,YACE;CACF,gBACE;AACJ;;AC5CA,MAAM,SAAS;CACb,iBAAiB;CACjB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;CACnB,uBAAuB;CACvB,uBAAuB;CACvB,uBAAuB;CACvB,yBAAyB;CACzB,yBAAyB;CACzB,uBAAuB;CACvB,qBAAqB;CACrB,sBAAsB;CACtB,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;CACrB,qBAAqB;AACvB;AAEA,MAAa,oBAAsC,EAAE,GAAG,OAAO;AAC/D,MAAa,mBAAqC,EAAE,GAAG,OAAO;;ACtD9D,MAAM,0BAA6E,OACjF,yBACF;AAEA,SAAgB,sBA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