gik-components 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +373 -0
- package/dist/agent-facing-DjAMQ4Ju.d.ts +110 -0
- package/dist/agent-facing.d.ts +8 -0
- package/dist/agent-facing.js +2 -0
- package/dist/agent-facing.js.map +1 -0
- package/dist/chunk-2I33SAGT.js +2 -0
- package/dist/chunk-2I33SAGT.js.map +1 -0
- package/dist/chunk-2XVVN3LX.js +7 -0
- package/dist/chunk-2XVVN3LX.js.map +1 -0
- package/dist/chunk-4BIHH7HT.js +2 -0
- package/dist/chunk-4BIHH7HT.js.map +1 -0
- package/dist/chunk-6JMFZS2Y.js +2 -0
- package/dist/chunk-6JMFZS2Y.js.map +1 -0
- package/dist/chunk-6TBEAKS7.js +2 -0
- package/dist/chunk-6TBEAKS7.js.map +1 -0
- package/dist/chunk-DMIV5ZI5.js +2 -0
- package/dist/chunk-DMIV5ZI5.js.map +1 -0
- package/dist/chunk-DNHCWSHQ.js +2 -0
- package/dist/chunk-DNHCWSHQ.js.map +1 -0
- package/dist/chunk-GL7PGK3G.js +2 -0
- package/dist/chunk-GL7PGK3G.js.map +1 -0
- package/dist/chunk-H6T3CCU5.js +2 -0
- package/dist/chunk-H6T3CCU5.js.map +1 -0
- package/dist/chunk-OFWGYY7S.js +2 -0
- package/dist/chunk-OFWGYY7S.js.map +1 -0
- package/dist/chunk-UP2OAMPY.js +2 -0
- package/dist/chunk-UP2OAMPY.js.map +1 -0
- package/dist/chunk-VR5CS5LA.js +2 -0
- package/dist/chunk-VR5CS5LA.js.map +1 -0
- package/dist/chunk-XA6FE7ZK.js +6 -0
- package/dist/chunk-XA6FE7ZK.js.map +1 -0
- package/dist/component-authoring-internal-DfFqqPhw.d.ts +40 -0
- package/dist/fluent.d.ts +103 -0
- package/dist/fluent.js +2 -0
- package/dist/fluent.js.map +1 -0
- package/dist/index.d.ts +139 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives.d.ts +440 -0
- package/dist/primitives.js +2 -0
- package/dist/primitives.js.map +1 -0
- package/dist/security.d.ts +39 -0
- package/dist/security.js +2 -0
- package/dist/security.js.map +1 -0
- package/dist/semantic.d.ts +147 -0
- package/dist/semantic.js +2 -0
- package/dist/semantic.js.map +1 -0
- package/dist/software.d.ts +44 -0
- package/dist/software.js +2 -0
- package/dist/software.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/primitives/access-gate/AccessGate.tsx","../src/primitives/form/Form.tsx","../src/primitives/alert/Alert.tsx","../src/primitives/chart/Chart.tsx","../src/primitives/container/Container.tsx","../src/primitives/pane-with-trigger/PaneWithTrigger.tsx","../src/primitives/editable-table/EditableTable.tsx","../src/primitives/file-download/FileDownload.tsx","../src/primitives/file-input/FileInput.tsx","../src/primitives/file-list/FileList.tsx","../src/primitives/growing-container/GrowingContainer.tsx","../src/primitives/math-challenge/MathChallenge.tsx","../src/primitives/markdown/Markdown.tsx","../src/primitives/metric/Metric.tsx","../src/primitives/note/Note.tsx","../src/primitives/property/Property.tsx","../src/primitives/timer-button/TimerButton.tsx","../src/primitives/todo-list/TodoList.tsx","../src/primitives/registry.ts","../src/primitives/authoring.ts"],"sourcesContent":["import React from \"react\";\nimport type { Json, ResolvedNode } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionViewProps } from \"@gik-ai/react\";\n\nimport { FluentButton } from \"../../fluent/FluentButtons\";\nimport { FluentDialog } from \"../../fluent/FluentDialog\";\nimport { FluentSpinner } from \"../../fluent/FluentDisplayControls\";\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { asRecord, withComponentStylePropsSchema } from \"../../shared/component\";\nimport { Form, formDefinition } from \"../form\";\n\ninterface AccessGateData {\n triggered?: boolean;\n status?: string;\n title?: string;\n message?: string;\n error?: string;\n inputFormSpec?: Record<string, unknown>;\n actions?: Record<string, unknown>;\n}\n\nfunction projectionNode(id: string, capability: string, props: Record<string, Json>): ResolvedNode {\n return { id, capability, props, visible: true, fallback: false, children: [] };\n}\n\nexport const AccessGate = ({ node, emit, children }: ProjectionViewProps) => {\n const props = readProps(node);\n const access = props.obj<AccessGateData>(\"access\", {});\n if (!access.triggered) return <>{children}</>;\n\n const status = access.status ?? \"required\";\n const title = access.title ?? \"Access required\";\n const formSpec = asRecord(access.inputFormSpec);\n const actions = asRecord(access.actions);\n const dialogNode = projectionNode(`${node.id}-dialog`, \"fluent:dialog\", {\n defaultOpen: true,\n title,\n ariaLabel: title,\n modalType: \"modal\",\n ...(node.props.className ? { className: node.props.className } : {}),\n ...(node.props.style ? { style: node.props.style } : {}),\n });\n const formNode = projectionNode(`${node.id}-form`, \"primitive:form\", formSpec as Record<string, Json>);\n const button = (name: string, defaultLabel: string, event: string, appearance?: string) => (\n actions[name] !== true ? null : (\n <FluentButton\n key={name}\n node={projectionNode(`${node.id}-${name}`, \"fluent:button\", {\n label: typeof actions[`${name}Label`] === \"string\" ? actions[`${name}Label`] as string : defaultLabel,\n ...(appearance ? { appearance } : {}),\n })}\n emit={() => emit(event, {})}\n children={undefined}\n />\n )\n );\n\n return (\n <FluentDialog\n node={dialogNode}\n emit={(_event, payload) => {\n const change = asRecord(payload);\n if (change.open === false) void emit(\"dismiss\", {});\n }}\n children={(\n <div className=\"gx-access-gate-content\">\n {access.message ? <p>{access.message}</p> : null}\n {access.error ? <p role=\"alert\">{access.error}</p> : null}\n {status === \"checking\" ? (\n <FluentSpinner\n node={projectionNode(`${node.id}-spinner`, \"fluent:spinner\", { label: \"Checking access...\" })}\n emit={() => undefined}\n children={undefined}\n />\n ) : null}\n {Object.keys(formSpec).length > 0 ? (\n <Form\n node={formNode}\n emit={(_event, payload) => emit(\"submit\", payload)}\n children={undefined}\n />\n ) : null}\n <div className=\"gx-access-gate-actions\">\n {button(\"reset\", \"Reset\", \"reset\")}\n {button(\"retry\", \"Retry\", \"retry\", \"primary\")}\n </div>\n </div>\n )}\n />\n );\n};\n\nconst accessGateSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"access\"],\n properties: {\n access: {\n type: \"object\",\n additionalProperties: false,\n required: [\"triggered\"],\n properties: {\n triggered: { type: \"boolean\" },\n status: { type: \"string\", enum: [\"idle\", \"checking\", \"required\", \"error\"] },\n title: { type: \"string\" },\n message: { type: \"string\" },\n error: { type: \"string\" },\n inputFormSpec: formDefinition.getSchema(),\n actions: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n retry: { type: \"boolean\" },\n retryLabel: { type: \"string\" },\n reset: { type: \"boolean\" },\n resetLabel: { type: \"string\" },\n },\n },\n },\n },\n },\n} as const);\n\nconst accessGateDescription: ComponentDescription = {\n capability: \"primitive:access-gate\",\n summary: \"Gates protected children behind a controlled access workflow composed from declarative GIK controls.\",\n dataProp: \"access\",\n slots: [\"children\"],\n events: [\"submit\", \"retry\", \"reset\", \"dismiss\"],\n eventContracts: {\n submit: eventContract(\"The user submits the authored access fields.\", { values: { type: \"object\", additionalProperties: true } }),\n retry: eventContract(\"The user requests another access check.\"),\n reset: eventContract(\"The user requests that access state be reset.\"),\n dismiss: eventContract(\"The user dismisses the access prompt without completing the access workflow.\"),\n },\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"Content availability depends on an externally managed access workflow\"],\n avoidWhen: [\"The workflow is a general confirmation without access input\"],\n rules: [\n \"Resolve authored conditions into access.triggered at the call site\",\n \"Describe credential fields through inputFormSpec\",\n \"Handle emitted events with declarative actions or effects\",\n \"Handle dismiss only when the application needs to react to cancellation\",\n \"Never place credentials in the trigger expression\",\n ],\n },\n};\n\nexport function validateAccessGate(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{\n kind: \"ajv-schema\",\n schema: accessGateSchema,\n message: \"Invalid primitive:access-gate props\",\n code: \"primitive-access-gate-schema\",\n }], props as Json);\n}\n\nexport function materializeAccessGateTrial() {\n return trialNode(\"primitive:access-gate\", {\n access: {\n triggered: true,\n status: \"required\",\n title: \"Connect to service\",\n message: \"Enter a credential to continue.\",\n inputFormSpec: {\n fields: {\n properties: {\n credential: { type: \"string\", title: \"Credential\", format: \"password\" },\n },\n required: [\"credential\"],\n },\n value: { credential: \"\" },\n saveLabel: \"Continue\",\n },\n actions: { retry: false, reset: false },\n },\n });\n}\n\nexport const accessGateDefinition = defineComponent({\n description: accessGateDescription,\n version: \"1.0.0\",\n component: AccessGate,\n getSchema: () => accessGateSchema,\n validate: validateAccessGate,\n materializeTrial: materializeAccessGateTrial,\n});","import React from \"react\";\nimport {\n Button,\n Checkbox,\n Dropdown,\n Field,\n Input,\n Option,\n Spinner,\n Textarea,\n makeStyles,\n mergeClasses,\n tokens,\n} from \"@fluentui/react-components\";\nimport { CheckmarkCircleRegular } from \"@fluentui/react-icons\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport {\n runDeclarativeValidators,\n validateDeclarativeFormValues,\n type DeclarativeFormSchema,\n} from \"@gik-ai/evaluators\";\nimport { readProps, resolveLayoutSlots, type ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport {\n componentLayoutPropsSchema,\n componentRootProps,\n withComponentStylePropsSchema,\n} from \"../../shared/component\";\n\ninterface OptionValue {\n value: string;\n label: string;\n}\n\nconst useStyles = makeStyles({\n root: { display: \"grid\", gap: tokens.spacingVerticalL },\n grid: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(12, minmax(0, 1fr))\",\n gap: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalL}`,\n },\n span1: { gridColumn: \"span 1\" }, span2: { gridColumn: \"span 2\" },\n span3: { gridColumn: \"span 3\" }, span4: { gridColumn: \"span 4\" },\n span5: { gridColumn: \"span 5\" }, span6: { gridColumn: \"span 6\" },\n span7: { gridColumn: \"span 7\" }, span8: { gridColumn: \"span 8\" },\n span9: { gridColumn: \"span 9\" }, span10: { gridColumn: \"span 10\" },\n span11: { gridColumn: \"span 11\" }, span12: { gridColumn: \"span 12\" },\n actions: { display: \"flex\", justifyContent: \"flex-end\", gap: tokens.spacingHorizontalS },\n success: {\n display: \"flex\",\n alignItems: \"center\",\n gap: tokens.spacingHorizontalXS,\n color: tokens.colorPaletteGreenForeground1,\n },\n // Fixed-height footer slot reserved for the actions row / saving state / success confirmation /\n // save error / nothing (a pristine, unsaved form shows neither). Keeping its height constant\n // across every state -- rather than only rendering a row when there's something to show --\n // avoids the surrounding layout jumping every time a save toggles between states.\n footer: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-end\",\n height: \"32px\",\n },\n footerError: {\n flex: 1,\n minWidth: 0,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n color: tokens.colorPaletteRedForeground1,\n },\n errors: { display: \"grid\", gap: tokens.spacingVerticalXXS, color: tokens.colorPaletteRedForeground1 },\n fullWidth: { width: \"100%\" },\n checkbox: { alignSelf: \"end\" },\n});\n\nfunction useDraftState<T>(incoming: T, initiallyDirty: boolean) {\n const signature = JSON.stringify(incoming);\n const [draft, setDraft] = React.useState(incoming);\n const [dirty, setDirty] = React.useState(initiallyDirty);\n React.useEffect(() => {\n setDraft(incoming);\n setDirty(initiallyDirty);\n }, [signature, initiallyDirty]);\n const reset = React.useCallback(() => {\n setDraft(incoming);\n setDirty(initiallyDirty);\n }, [signature, initiallyDirty]);\n return { draft, setDraft, dirty, setDirty, reset };\n}\n\nfunction optionsFrom(field: Record<string, unknown>, multiple = false): OptionValue[] {\n const source = multiple ? (field.items as Record<string, unknown> | undefined) ?? {} : field;\n if (Array.isArray(source.oneOf)) {\n return source.oneOf.map((item) => {\n const option = item as Record<string, unknown>;\n return { value: String(option.const ?? \"\"), label: String(option.title ?? option.const ?? \"\") };\n });\n }\n if (Array.isArray(field.options)) {\n return field.options.map((item) => typeof item === \"string\"\n ? { value: item, label: item }\n : { value: String((item as OptionValue).value), label: String((item as OptionValue).label) });\n }\n if (Array.isArray(source.enum)) {\n const names = Array.isArray(source.enumNames) ? source.enumNames : [];\n return source.enum.map((value, index) => ({ value: String(value ?? \"\"), label: String(names[index] ?? value ?? \"\") }));\n }\n return [];\n}\n\nfunction isJsonField(field: Record<string, unknown>) {\n return field.format === \"json\" || field.type === \"json\";\n}\n\nfunction isMultiSelect(field: Record<string, unknown>) {\n const items = (field.items ?? {}) as Record<string, unknown>;\n return field.type === \"array\" && (Array.isArray(items.enum) || Array.isArray(items.oneOf) || Array.isArray(field.options));\n}\n\nfunction isTextarea(field: Record<string, unknown>) {\n return field.format === \"textarea\" || field.multiline === true;\n}\n\nfunction inputType(field: Record<string, unknown>): \"text\" | \"password\" | \"number\" | \"date\" | \"time\" | \"datetime-local\" {\n if (field.format === \"password\" || field.secret === true) return \"password\";\n if (field.format === \"date\") return \"date\";\n if (field.format === \"time\") return \"time\";\n if (field.format === \"date-time\" || field.format === \"datetime\") return \"datetime-local\";\n return field.type === \"number\" || field.type === \"integer\" ? \"number\" : \"text\";\n}\n\nfunction fieldSpan(field: Record<string, unknown>): number {\n const explicit = field.colSpan ?? field.span;\n if (typeof explicit === \"number\" && Number.isFinite(explicit)) return Math.min(12, Math.max(1, Math.round(explicit)));\n const compact = field.type === \"number\" || field.type === \"integer\" || optionsFrom(field).length > 0\n || isMultiSelect(field) || [\"date\", \"time\", \"date-time\", \"datetime\"].includes(String(field.format));\n return compact && !isTextarea(field) ? 6 : 12;\n}\n\nfunction temporalValue(field: Record<string, unknown>, value: unknown): string {\n const text = value == null ? \"\" : String(value);\n if (field.format === \"date\") return text.slice(0, 10);\n if (field.format === \"time\") return text.slice(0, 5);\n if (field.format === \"date-time\" || field.format === \"datetime\") return text.slice(0, 16);\n return text;\n}\n\nexport const Form: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const styles = useStyles();\n const schema = props.obj<DeclarativeFormSchema>(\n \"fields\",\n props.obj<DeclarativeFormSchema>(\"schema\", { properties: {} }),\n );\n const fields = schema.properties ?? {};\n const required = new Set(schema.required ?? []);\n const incoming = props.obj<Record<string, unknown>>(\"value\", props.obj<Record<string, unknown>>(\"data\", {}));\n const validationContext = props.obj<Record<string, Json>>(\"validationContext\", {});\n const readOnly = props.bool(\"readOnly\");\n const initiallyDirty = props.bool(\"initiallyDirty\");\n // Whether the host Blueprint actually binds `saving`/`saveError` (as opposed to those props\n // simply being absent) -- present only when a Cell wires this Form to its own ordinary save\n // state (an author-declared `assign` set true at dispatch, cleared to false by the operation's\n // `settlement`/`failureSettlement` transform once it actually resolves). Untracked forms keep\n // the prior optimistic behavior below (success shown as soon as `save` is emitted).\n const savingTracked = node.props.saving !== undefined;\n const saving = props.bool(\"saving\");\n const saveError = props.str(\"saveError\");\n const { draft: values, setDraft: setValues, dirty, setDirty, reset } = useDraftState(incoming, initiallyDirty);\n const jsonKeys = Object.entries(fields).filter(([, field]) => isJsonField(field)).map(([key]) => key);\n const jsonSignature = jsonKeys.join(\"\\u0000\");\n const jsonTextFrom = React.useCallback((source: Record<string, unknown>) => Object.fromEntries(jsonKeys.map((key) => {\n const value = source[key];\n return [key, value == null ? \"\" : typeof value === \"string\" ? value : JSON.stringify(value, null, 2)];\n })), [jsonSignature]);\n const [jsonText, setJsonText] = React.useState<Record<string, string>>(() => jsonTextFrom(incoming));\n const [jsonErrors, setJsonErrors] = React.useState<Record<string, string>>({});\n const [validationErrors, setValidationErrors] = React.useState<string[]>([]);\n // Local, transient confirmation shown in place of the action row right after a successful save --\n // the commit itself (what `save` does with the values) is entirely the host Blueprint's concern;\n // this only reflects that *this* component's own submit just completed without error. Cleared by\n // any further edit, discard, or a genuinely new incoming value (the same signal that already resets\n // jsonText/validationErrors below), never by a timer -- so it stays visible until the user acts again.\n const [justSaved, setJustSaved] = React.useState(false);\n\n React.useEffect(() => {\n setJsonText(jsonTextFrom(incoming));\n setJsonErrors({});\n setValidationErrors([]);\n setJustSaved(false);\n }, [JSON.stringify(incoming), jsonTextFrom]);\n\n // Reacts to the tracked save this Form itself triggered actually settling -- not to `emit()`\n // returning, which (in the durable runtime) only resolves once the triggering event is queued,\n // long before the invoked service settles. The host Blueprint owns `saving` as ordinary state:\n // an `assign` sets it true at dispatch, and the operation's own `settlement`/`failureSettlement`\n // transform sets it back to false once the save actually resolves -- so a true-to-false edge on\n // `saving` here means *this* save just completed. Success clears the draft and shows `justSaved`;\n // failure leaves the draft (and its actions) in place so the user can retry, with `saveError`\n // shown alongside.\n const wasSavingRef = React.useRef(false);\n React.useEffect(() => {\n if (savingTracked && wasSavingRef.current && !saving && !saveError) {\n setDirty(false);\n setJustSaved(true);\n }\n wasSavingRef.current = saving;\n }, [saving, saveError, savingTracked]);\n\n const setField = (key: string, value: unknown) => {\n setValues((current) => ({ ...current, [key]: value }));\n setDirty(true);\n setJustSaved(false);\n };\n const setJsonField = (key: string, text: string) => {\n setJsonText((current) => ({ ...current, [key]: text }));\n setDirty(true);\n setJustSaved(false);\n if (!text.trim()) {\n setJsonErrors((current) => ({ ...current, [key]: \"\" }));\n setValues((current) => ({ ...current, [key]: undefined }));\n return;\n }\n try {\n const value = JSON.parse(text) as unknown;\n setJsonErrors((current) => ({ ...current, [key]: \"\" }));\n setValues((current) => ({ ...current, [key]: value }));\n } catch (error) {\n setJsonErrors((current) => ({ ...current, [key]: error instanceof Error ? error.message : \"Invalid JSON\" }));\n }\n };\n const discard = () => {\n reset();\n setJsonText(jsonTextFrom(incoming));\n setJsonErrors({});\n setValidationErrors([]);\n setJustSaved(false);\n };\n const submit = (event: React.FormEvent) => {\n event.preventDefault();\n if (readOnly || saving) return;\n if (Object.values(jsonErrors).some(Boolean)) return;\n const report = validateDeclarativeFormValues(\n schema,\n values as Record<string, Json>,\n { bindings: validationContext },\n );\n setValidationErrors(report.errors.map((issue) => issue.detail));\n if (!report.ok) return;\n void emit(\"save\", { values });\n if (!savingTracked) {\n setDirty(false);\n setJustSaved(true);\n }\n };\n const spanClasses = [styles.span1, styles.span2, styles.span3, styles.span4, styles.span5, styles.span6,\n styles.span7, styles.span8, styles.span9, styles.span10, styles.span11, styles.span12];\n const fieldLayout = resolveLayoutSlots(\n Object.entries(fields).map(([key, field]) => ({ key, content: { key, field } })),\n node.props.layout,\n );\n const fieldGroups = [\n { slot: \"children\", fields: fieldLayout.children },\n ...Object.entries(fieldLayout.slots).map(([slot, slottedFields]) => ({ slot, fields: slottedFields })),\n ].filter((group) => group.fields.length > 0);\n\n return (\n <form {...componentRootProps(node, styles.root)} onSubmit={submit}>\n {fieldGroups.map((group) => <div key={group.slot} className={mergeClasses(styles.grid, \"gx-form-grid\")} data-layout-slot={group.slot}>\n {group.fields.map(({ key, field }) => {\n const title = String(field.title ?? key);\n const hint = typeof field.description === \"string\" ? field.description : typeof field.hint === \"string\" ? field.hint : undefined;\n const disabled = readOnly || field.readOnly === true || field.disabled === true;\n const isRequired = required.has(key);\n const current = values[key];\n const span = fieldSpan(field);\n const className = mergeClasses(spanClasses[span - 1], \"gx-field-cell\", `gx-col-span-${span}`);\n const hintContent = hint ? <span className=\"gx-field-hint\">{hint}</span> : undefined;\n if (isJsonField(field)) {\n const error = jsonErrors[key];\n return <Field key={key} className={className} label={title} hint={hintContent} required={isRequired} validationState={error ? \"error\" : \"none\"} validationMessage={error || undefined}>\n <Textarea className={styles.fullWidth} rows={Number(field.rows ?? 8)} resize=\"vertical\" value={jsonText[key] ?? \"\"} placeholder={String(field.placeholder ?? \"\")} readOnly={disabled} onChange={(_, data) => setJsonField(key, data.value)} />\n </Field>;\n }\n if (field.type === \"boolean\") {\n return <Field key={key} className={mergeClasses(className, styles.checkbox)} hint={hintContent}><Checkbox label={title} checked={Boolean(current)} disabled={disabled} onChange={(_, data) => setField(key, data.checked)} /></Field>;\n }\n if (isMultiSelect(field)) {\n const selected = Array.isArray(current) ? current.map(String) : [];\n const options = optionsFrom(field, true);\n return <Field key={key} className={className} label={title} hint={hintContent} required={isRequired}>\n <Dropdown multiselect className={styles.fullWidth} selectedOptions={selected} value={options.filter((option) => selected.includes(option.value)).map((option) => option.label).join(\", \")} disabled={disabled} onOptionSelect={(_, data) => setField(key, data.selectedOptions)}>\n {options.map((option) => <Option key={option.value} value={option.value}>{option.label}</Option>)}\n </Dropdown>\n </Field>;\n }\n const options = optionsFrom(field);\n if (options.length > 0) {\n const value = current == null ? \"\" : String(current);\n return <Field key={key} className={className} label={title} hint={hintContent} required={isRequired}>\n <Dropdown className={styles.fullWidth} selectedOptions={value ? [value] : []} value={options.find((option) => option.value === value)?.label ?? \"\"} placeholder={String(field.placeholder ?? \"All\")} disabled={disabled} onOptionSelect={(_, data) => setField(key, data.optionValue ?? \"\")}>\n {options.map((option) => <Option key={option.value} value={option.value}>{option.label}</Option>)}\n </Dropdown>\n </Field>;\n }\n if (isTextarea(field)) {\n return <Field key={key} className={className} label={title} hint={hintContent} required={isRequired}>\n <Textarea className={styles.fullWidth} rows={Number(field.rows ?? 4)} resize=\"vertical\" value={current == null ? \"\" : String(current)} placeholder={String(field.placeholder ?? \"\")} readOnly={disabled} minLength={typeof field.minLength === \"number\" ? field.minLength : undefined} maxLength={typeof field.maxLength === \"number\" ? field.maxLength : undefined} onChange={(_, data) => setField(key, data.value)} />\n </Field>;\n }\n const type = inputType(field);\n return <Field key={key} className={className} label={title} hint={hintContent} required={isRequired}>\n <Input className={styles.fullWidth} type={type} value={temporalValue(field, current)} placeholder={String(field.placeholder ?? \"\")} readOnly={disabled} min={typeof field.minimum === \"number\" ? field.minimum : undefined} max={typeof field.maximum === \"number\" ? field.maximum : undefined} step={field.type === \"integer\" ? 1 : field.type === \"number\" ? \"any\" : undefined} minLength={type === \"text\" && typeof field.minLength === \"number\" ? field.minLength : undefined} maxLength={type === \"text\" && typeof field.maxLength === \"number\" ? field.maxLength : undefined} pattern={type === \"text\" && typeof field.pattern === \"string\" ? field.pattern : undefined} onChange={(_, data) => setField(key, type === \"number\" && data.value !== \"\" ? Number.parseFloat(data.value) : data.value)} />\n </Field>;\n })}\n </div>)}\n {validationErrors.length > 0 ? <div className={styles.errors} role=\"alert\">{validationErrors.map((error) => <span key={error}>{error}</span>)}</div> : null}\n {readOnly ? null : (\n <div className={styles.footer}>\n {justSaved && !dirty ? (\n <div className={styles.success} role=\"status\">\n <CheckmarkCircleRegular aria-hidden=\"true\" />\n <span>{props.str(\"successLabel\", \"Saved\")}</span>\n </div>\n ) : dirty ? (\n <>\n {saveError ? <span className={styles.footerError} role=\"alert\" title={saveError}>{saveError}</span> : null}\n <div className={styles.actions}>\n <Button type=\"button\" onClick={discard} disabled={saving}>{props.str(\"discardLabel\", \"Discard\")}</Button>\n <Button\n type=\"submit\"\n appearance=\"primary\"\n disabled={saving || Object.values(jsonErrors).some(Boolean)}\n icon={saving ? <Spinner size=\"tiny\" /> : undefined}\n >\n {saving ? props.str(\"savingLabel\", \"Saving…\") : props.str(\"saveLabel\", \"Save\")}\n </Button>\n </div>\n </>\n ) : null}\n </div>\n )}\n </form>\n );\n};\n\nconst schema = {\n type: \"object\",\n additionalProperties: false,\n properties: {\n fields: { type: \"object\" }, schema: { type: \"object\" }, value: { type: \"object\" }, data: { type: \"object\" }, validationContext: { type: \"object\" },\n saveLabel: { type: \"string\" }, discardLabel: { type: \"string\" }, successLabel: { type: \"string\" }, savingLabel: { type: \"string\" },\n saving: { type: \"boolean\" }, saveError: { type: \"string\" },\n initiallyDirty: { type: \"boolean\" }, readOnly: { type: \"boolean\" },\n ...componentLayoutPropsSchema,\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:form\",\n summary: \"Renders a schema-driven committed form using Fluent 2 controls and emits saved values.\",\n dataProp: \"value\",\n events: [\"save\"],\n eventContracts: { save: eventContract(\"The user commits the edited form values.\", { values: { type: \"object\", additionalProperties: true } }) },\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"Users edit a schema-defined object and explicitly commit or discard the draft\"],\n avoidWhen: [\"Each field must emit immediately without an explicit commit\", \"The data is naturally edited as rows; use editable-table\"],\n rules: [\"Define fields through JSON Schema properties\", \"Handle save payload values\", \"Use readOnly for inspect-only forms\", \"Pass external validator bindings through validationContext\", \"Use initiallyDirty only for drafts not yet persisted\", \"Keep workflow effects outside the component\", \"The component itself shows a local success confirmation (successLabel) after a save with no further edits -- do not also author a separate saved-confirmation view for the common case\", \"For a save that resolves asynchronously in the host Blueprint (e.g. a durable service invoke), bind `saving`/`saveError` to ordinary Blueprint state the Cell's own behavior manages -- an `assign` sets `saving` true at dispatch, and the operation's `settlement`/`failureSettlement` transform sets it back to false (plus `saveError` on failure) -- rather than relying on the optimistic success shown as soon as `save` is emitted\"],\n },\n agentFacing: {\n catalog: { interaction: \"committed-input\" },\n detail: {\n notes: [\"Editing is draft-based; values are published only through save.\"],\n },\n },\n};\n\nconst publicSchema = withComponentStylePropsSchema(schema);\n\nexport function validateForm(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema: publicSchema, message: \"Invalid primitive:form props\", code: \"primitive-form-schema\" }], props as Json);\n}\n\nexport function materializeFormTrial() {\n return trialNode(\"primitive:form\", {\n fields: { properties: { name: { type: \"string\", title: \"Name\" }, active: { type: \"boolean\", title: \"Active\" } }, required: [\"name\"] },\n value: { name: \"Ada\", active: true },\n });\n}\n\nexport const formDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: Form,\n getSchema: () => publicSchema,\n validate: validateForm,\n materializeTrial: materializeFormTrial,\n});","import React from \"react\";\nimport { MessageBar, MessageBarBody, MessageBarTitle } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport { defineComponent, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\n\nconst levels = [\"good\", \"success\", \"warn\", \"warning\", \"bad\", \"error\", \"info\", \"unknown\"] as const;\n\nexport const Alert: ProjectionView = ({ node }) => {\n const props = readProps(node);\n const level = props.str(\"level\", \"unknown\");\n const intent = level === \"good\" || level === \"success\" ? \"success\" : level === \"warn\" || level === \"warning\" ? \"warning\" : level === \"bad\" || level === \"error\" ? \"error\" : \"info\";\n return <MessageBar {...componentRootProps(node)} intent={intent}><MessageBarBody>{props.str(\"label\") ? <MessageBarTitle>{props.str(\"label\")}</MessageBarTitle> : null}{props.str(\"value\") || \"-\"}</MessageBarBody></MessageBar>;\n};\n\nconst schema = { type: \"object\", additionalProperties: false, required: [\"value\"], properties: { ...componentStylePropsSchema, value: { type: \"string\" }, label: { type: \"string\" }, level: { type: \"string\", enum: levels } } } as const;\nconst description: ComponentDescription = { capability: \"primitive:alert\", summary: \"Presents a labeled status message using Fluent semantic intent.\", dataProp: \"value\", events: [], semanticTokens: [...levels], variants: [], authoring: { useWhen: [\"A status or failure needs prominent non-interactive feedback\"], avoidWhen: [\"The message is ordinary supporting copy; use primitive:note\"], rules: [\"Bind message text through value\", \"Use level only for semantic status\"] } };\nexport function validateAlert(props: unknown): ComponentValidationReport { return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:alert props\", code: \"primitive-alert-schema\" }], props as Json); }\nexport const alertDefinition = defineComponent({ description, version: \"1.0.0\", component: Alert, getSchema: () => schema, validate: validateAlert, materializeTrial: () => trialNode(\"primitive:alert\", { label: \"Status\", value: \"Investigation active\", level: \"info\" }) });","import React from \"react\";\nimport { Badge, Text, makeStyles, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport type { ProjectionView } from \"@gik-ai/react\";\n\nimport { defineComponent, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\nimport { componentRootProps, componentStylePropsSchema, readPath, records, textAt } from \"../../shared/component\";\n\nexport const CHART_SEMANTIC_TOKENS = [\"accent\", \"positive\", \"negative\", \"warning\", \"neutral\"] as const;\nexport const CHART_VARIANTS = [\"standard\", \"compact\"] as const;\nexport const CHART_KINDS = [\"bar\", \"line\", \"pie\"] as const;\ntype ChartToken = typeof CHART_SEMANTIC_TOKENS[number];\nconst schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\", type: \"object\", additionalProperties: false, required: [\"points\", \"spec\"],\n properties: { ...componentStylePropsSchema, points: { type: \"array\", items: { type: \"object\" } }, summaryValue: { type: [\"string\", \"number\"] }, variant: { enum: CHART_VARIANTS }, spec: { type: \"object\", additionalProperties: false, required: [\"kind\", \"fields\"], properties: {\n kind: { enum: CHART_KINDS }, title: { type: \"string\" }, description: { type: \"string\" }, emptyText: { type: \"string\" }, valueSuffix: { type: \"string\" }, fields: { type: \"object\", additionalProperties: false, required: [\"label\", \"value\"], properties: { label: { type: \"string\", minLength: 1 }, value: { type: \"string\", minLength: 1 }, tone: { type: \"string\", minLength: 1 } } }, toneMap: { type: \"object\", additionalProperties: { enum: CHART_SEMANTIC_TOKENS } },\n summary: { type: \"object\", additionalProperties: false, required: [\"label\"], properties: { label: { type: \"string\", minLength: 1 }, prefix: { type: \"string\" }, suffix: { type: \"string\" } } },\n table: { type: \"object\", additionalProperties: false, required: [\"label\", \"columns\"], properties: { label: { type: \"string\", minLength: 1 }, columns: { type: \"array\", minItems: 1, items: { type: \"object\", additionalProperties: false, required: [\"field\", \"label\"], properties: { field: { type: \"string\", minLength: 1 }, label: { type: \"string\", minLength: 1 }, prefix: { type: \"string\" }, suffix: { type: \"string\" } } } } } },\n } } },\n} as const;\ntype ChartTableColumn = { field: string; label: string; prefix?: string; suffix?: string };\ntype ChartSpec = { kind: typeof CHART_KINDS[number]; title?: string; description?: string; emptyText?: string; valueSuffix?: string; fields: { label: string; value: string; tone?: string }; toneMap?: Record<string, ChartToken>; summary?: { label: string; prefix?: string; suffix?: string }; table?: { label: string; columns: ChartTableColumn[] } };\nconst useStyles = makeStyles({ root: { display: \"grid\", gap: tokens.spacingVerticalM, minWidth: 0 }, header: { display: \"grid\", gap: tokens.spacingVerticalXXS }, description: { color: tokens.colorNeutralForeground3 }, summary: { display: \"grid\", gap: tokens.spacingVerticalXXS }, chart: { width: \"100%\", minWidth: 0, overflow: \"visible\" }, legend: { display: \"flex\", flexWrap: \"wrap\", gap: tokens.spacingHorizontalS }, legendItem: { display: \"flex\", alignItems: \"center\", gap: tokens.spacingHorizontalXS }, swatch: { width: tokens.spacingHorizontalM, height: tokens.spacingVerticalM, borderRadius: tokens.borderRadiusSmall }, tableWrap: { overflowX: \"auto\" }, table: { width: \"100%\", borderCollapse: \"collapse\" }, cell: { padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`, textAlign: \"left\", borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`, whiteSpace: \"nowrap\" } });\nfunction fill(token: ChartToken | undefined): string { if (token === \"positive\") return tokens.colorPaletteGreenForeground1; if (token === \"negative\") return tokens.colorPaletteRedForeground1; if (token === \"warning\") return tokens.colorPaletteDarkOrangeForeground1; if (token === \"neutral\") return tokens.colorNeutralForeground3; return tokens.colorBrandForeground1; }\nconst categoricalFills = [tokens.colorBrandForeground1, tokens.colorPaletteGreenForeground1, tokens.colorPaletteDarkOrangeForeground1, tokens.colorPaletteRedForeground1, tokens.colorPaletteLightTealForeground2];\nfunction pieSlicePath(centerX: number, centerY: number, radius: number, startAngle: number, endAngle: number): string {\n const point = (angle: number) => ({ x: centerX + radius * Math.cos(angle), y: centerY + radius * Math.sin(angle) });\n const start = point(startAngle); const end = point(endAngle); const largeArc = endAngle - startAngle > Math.PI ? 1 : 0;\n return `M ${centerX} ${centerY} L ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArc} 1 ${end.x} ${end.y} Z`;\n}\nexport const Chart: ProjectionView = ({ node }) => {\n const styles = useStyles(); const points = records(node.props.points); const spec = (node.props.spec ?? {}) as ChartSpec; const compact = (node.props.variant ?? \"standard\") === \"compact\";\n const values = points.map((point) => Number(readPath(point, spec.fields?.value))).filter(Number.isFinite); const max = Math.max(...values, 0);\n if (!spec.fields || points.length === 0 || max <= 0) return <Text {...componentRootProps(node)}>{spec.emptyText ?? \"No chart data available.\"}</Text>;\n const width = 640; const height = compact ? 180 : 260; const left = 42; const top = 16; const bottom = compact ? 30 : 48; const plotHeight = height - top - bottom; const step = (width - left - 12) / points.length;\n const coordinates = points.map((point, index) => { const value = Number(readPath(point, spec.fields.value)); return { point, value, x: left + step * index + step / 2, y: top + plotHeight - (value / max) * plotHeight }; });\n const total = coordinates.reduce((sum, entry) => sum + entry.value, 0); let pieAngle = -Math.PI / 2;\n const formatCell = (point: Record<string, unknown>, column: ChartTableColumn) => `${column.prefix ?? \"\"}${textAt(point, column.field)}${column.suffix ?? \"\"}`;\n return <figure {...componentRootProps(node, styles.root)} aria-label={spec.title ?? \"Chart\"}><figcaption className={styles.header}>{spec.title ? <Text weight=\"semibold\" size={500}>{spec.title}</Text> : null}{spec.description ? <Text className={styles.description}>{spec.description}</Text> : null}{spec.summary ? <div className={styles.summary} role=\"group\" aria-label={spec.summary.label}><Text>{spec.summary.label}</Text><Text weight=\"bold\" size={700}>{spec.summary.prefix ?? \"\"}{String(node.props.summaryValue ?? \"\")}{spec.summary.suffix ?? \"\"}</Text></div> : null}</figcaption><svg className={styles.chart} viewBox={`0 0 ${width} ${height}`} role=\"img\"><title>{spec.title ?? \"Chart\"}</title><desc>{spec.description ?? `${spec.kind} chart with ${points.length} points`}</desc>{spec.kind !== \"pie\" ? <line x1={left} y1={top + plotHeight} x2={width - 12} y2={top + plotHeight} stroke={tokens.colorNeutralStroke1} /> : null}\n {spec.kind === \"line\" ? <polyline points={coordinates.map(({ x, y }) => `${x},${y}`).join(\" \")} fill=\"none\" stroke={tokens.colorBrandForeground1} strokeWidth={tokens.strokeWidthThicker} /> : null}\n {coordinates.map(({ point, value, x, y }, index) => { const toneValue = textAt(point, spec.fields.tone); const mappedToken = toneValue ? spec.toneMap?.[toneValue] : undefined; const color = mappedToken ? fill(mappedToken) : categoricalFills[index % categoricalFills.length]; const label = textAt(point, spec.fields.label); if (spec.kind === \"pie\") { const startAngle = pieAngle; const endAngle = pieAngle + (value / total) * Math.PI * 2; pieAngle = endAngle; return <path key={`${label}-${index}`} d={pieSlicePath(width / 2, height / 2, compact ? 72 : 106, startAngle, endAngle)} fill={color} stroke={tokens.colorNeutralBackground1} strokeWidth={tokens.strokeWidthThick}><title>{`${label}: ${value}${spec.valueSuffix ?? \"\"}`}</title></path>; } return <g key={`${label}-${index}`}>{spec.kind === \"bar\" ? <rect x={x - step * 0.3} y={y} width={step * 0.6} height={top + plotHeight - y} rx={tokens.borderRadiusSmall} fill={color}><title>{`${label}: ${value}${spec.valueSuffix ?? \"\"}`}</title></rect> : <circle cx={x} cy={y} r=\"5\" fill={color}><title>{`${label}: ${value}${spec.valueSuffix ?? \"\"}`}</title></circle>}<text x={x} y={height - (compact ? 10 : 22)} textAnchor=\"middle\" fill={tokens.colorNeutralForeground2} fontSize={tokens.fontSizeBase200}>{label}</text>{!compact ? <text x={x} y={Math.max(y - 8, 12)} textAnchor=\"middle\" fill={tokens.colorNeutralForeground1} fontSize={tokens.fontSizeBase200}>{value}{spec.valueSuffix ?? \"\"}</text> : null}</g>; })}\n </svg><div className={styles.legend} aria-hidden=\"true\">{coordinates.map(({ point, value }, index) => { const toneValue = textAt(point, spec.fields.tone); const mappedToken = toneValue ? spec.toneMap?.[toneValue] : undefined; const color = mappedToken ? fill(mappedToken) : categoricalFills[index % categoricalFills.length]; return <div className={styles.legendItem} key={index}><span className={styles.swatch} style={{ backgroundColor: color }} /><Badge appearance=\"outline\">{textAt(point, spec.fields.label)}{spec.kind === \"pie\" ? ` · ${value}${spec.valueSuffix ?? \"\"}` : \"\"}</Badge></div>; })}</div>{spec.table ? <div className={styles.tableWrap}><table className={styles.table} aria-label={spec.table.label}><thead><tr>{spec.table.columns.map((column) => <th className={styles.cell} key={column.field}>{column.label}</th>)}</tr></thead><tbody>{points.map((point, rowIndex) => <tr key={`${textAt(point, spec.fields.label)}-${rowIndex}`}>{spec.table!.columns.map((column) => <td className={styles.cell} key={column.field}>{formatCell(point, column)}</td>)}</tr>)}</tbody></table></div> : null}</figure>;\n};\nconst description: ComponentDescription = { capability: \"primitive:chart\", summary: \"Renders a small mapped numeric series as an accessible bar, line, or pie chart.\", dataProp: \"points\", events: [], semanticTokens: CHART_SEMANTIC_TOKENS, defaultVariant: \"standard\", variants: [{ value: \"standard\", summary: \"Full chart with direct value labels where the chart kind supports them.\", useWhen: [\"The chart is a primary analytical surface\", \"Exact values should remain visible\"] }, { value: \"compact\", summary: \"Reduced-height chart without direct value labels.\", useWhen: [\"The chart supports a dashboard summary\", \"Vertical space is constrained\"] }], authoring: { useWhen: [\"Numeric values need visual comparison, trend reading, or part-to-whole analysis\", \"A small single series is sufficient\"], avoidWhen: [\"Values are primarily read as exact measures; use measure-set\", \"The data needs multi-series interaction or zooming; use a specialized chart capability\"], rules: [\"Provide finite non-negative numeric values\", \"Set spec.kind to bar for category comparison, line for ordered trends, or pie for part-to-whole composition\", \"Keep labels short\", \"Map tone values only to recognized chart tokens\"] } };\nexport function describeChart() { return description; }\nexport function getChartSchema(): Record<string, unknown> { return schema as unknown as Record<string, unknown>; }\nexport function validateChart(props: unknown): ComponentValidationReport { return runDeclarativeValidators([\n { kind: \"ajv-schema\", schema: getChartSchema(), message: \"Invalid primitive:chart props\", code: \"primitive-chart-schema\" },\n { kind: \"jsonata\", expr: \"($field := data.spec.fields.value; $count(data.points[$type($lookup($, $field)) = 'number' and $lookup($, $field) >= 0]) = $count(data.points))\", message: \"Chart values must be finite non-negative numbers\", code: \"semantic-chart-values\" },\n], props as Json); }\nexport function materializeChartTrial() { return trialNode(\"primitive:chart\", { variant: \"standard\", points: [{ hour: \"08:00\", count: 7, posture: \"normal\" }, { hour: \"09:00\", count: 18, posture: \"elevated\" }, { hour: \"10:00\", count: 31, posture: \"critical\" }, { hour: \"11:00\", count: 12, posture: \"normal\" }], spec: { kind: \"line\", title: \"Risk events by hour\", description: \"Observed events during the response window\", fields: { label: \"hour\", value: \"count\", tone: \"posture\" }, toneMap: { normal: \"accent\", elevated: \"warning\", critical: \"negative\" } } }); }\nexport const chartDefinition = defineComponent({ description, version: \"1.1.0\", component: Chart, getSchema: getChartSchema, validate: validateChart, materializeTrial: materializeChartTrial });","import React from \"react\";\nimport { makeStyles, mergeClasses, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport type { ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\n\nexport const CONTAINER_VARIANTS = [\"row\", \"column\", \"stack\", \"flex\"] as const;\nexport const CONTAINER_GAPS = [\"none\", \"xs\", \"s\", \"m\", \"l\", \"xl\"] as const;\nexport const CONTAINER_ALIGNMENTS = [\"stretch\", \"start\", \"center\", \"end\", \"baseline\"] as const;\nexport const CONTAINER_JUSTIFICATIONS = [\"start\", \"center\", \"end\", \"space-between\", \"space-around\", \"space-evenly\"] as const;\nexport const CONTAINER_DIRECTIONS = [\"row\", \"row-reverse\", \"column\", \"column-reverse\"] as const;\n\nexport type ContainerVariant = typeof CONTAINER_VARIANTS[number];\nexport type ContainerGap = typeof CONTAINER_GAPS[number];\nexport type ContainerAlignment = typeof CONTAINER_ALIGNMENTS[number];\nexport type ContainerJustification = typeof CONTAINER_JUSTIFICATIONS[number];\nexport type ContainerDirection = typeof CONTAINER_DIRECTIONS[number];\n\nexport interface ContainerProps {\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n variant?: ContainerVariant;\n gap?: ContainerGap;\n align?: ContainerAlignment;\n justify?: ContainerJustification;\n wrap?: boolean;\n direction?: ContainerDirection;\n fill?: boolean;\n grow?: boolean;\n fullWidth?: boolean;\n fullHeight?: boolean;\n ariaLabel?: string;\n}\n\nconst useStyles = makeStyles({\n root: { boxSizing: \"border-box\", minWidth: 0, minHeight: 0 },\n row: { display: \"flex\", flexDirection: \"row\" },\n column: { display: \"flex\", flexDirection: \"column\" },\n stack: { display: \"grid\", gridTemplateColumns: \"minmax(0, 1fr)\" },\n flex: { display: \"flex\" },\n wrap: { flexWrap: \"wrap\" },\n grow: { flex: \"1 1 0\" },\n fullWidth: { width: \"100%\", minWidth: 0 },\n fullHeight: { height: \"100%\", minHeight: 0 },\n gapNone: { gap: 0 },\n gapXs: { gap: tokens.spacingVerticalXS },\n gapS: { gap: tokens.spacingVerticalS },\n gapM: { gap: tokens.spacingVerticalM },\n gapL: { gap: tokens.spacingVerticalL },\n gapXl: { gap: tokens.spacingVerticalXL },\n alignStretch: { alignItems: \"stretch\" },\n alignStart: { alignItems: \"flex-start\" },\n alignCenter: { alignItems: \"center\" },\n alignEnd: { alignItems: \"flex-end\" },\n alignBaseline: { alignItems: \"baseline\" },\n justifyStart: { justifyContent: \"flex-start\" },\n justifyCenter: { justifyContent: \"center\" },\n justifyEnd: { justifyContent: \"flex-end\" },\n justifySpaceBetween: { justifyContent: \"space-between\" },\n justifySpaceAround: { justifyContent: \"space-around\" },\n justifySpaceEvenly: { justifyContent: \"space-evenly\" },\n directionRow: { flexDirection: \"row\" },\n directionRowReverse: { flexDirection: \"row-reverse\" },\n directionColumn: { flexDirection: \"column\" },\n directionColumnReverse: { flexDirection: \"column-reverse\" },\n});\n\nexport function Container({\n children,\n className,\n style,\n variant = \"column\",\n gap = \"m\",\n align = \"stretch\",\n justify = \"start\",\n wrap = false,\n direction = \"row\",\n fill = false,\n grow = false,\n fullWidth = false,\n fullHeight = false,\n ariaLabel,\n}: ContainerProps): React.ReactElement {\n const styles = useStyles();\n const gapClasses = { none: styles.gapNone, xs: styles.gapXs, s: styles.gapS, m: styles.gapM, l: styles.gapL, xl: styles.gapXl };\n const alignClasses = { stretch: styles.alignStretch, start: styles.alignStart, center: styles.alignCenter, end: styles.alignEnd, baseline: styles.alignBaseline };\n const justifyClasses = { start: styles.justifyStart, center: styles.justifyCenter, end: styles.justifyEnd, \"space-between\": styles.justifySpaceBetween, \"space-around\": styles.justifySpaceAround, \"space-evenly\": styles.justifySpaceEvenly };\n const directionClasses = { row: styles.directionRow, \"row-reverse\": styles.directionRowReverse, column: styles.directionColumn, \"column-reverse\": styles.directionColumnReverse };\n return (\n <div\n className={mergeClasses(\n styles.root,\n styles[variant],\n gapClasses[gap],\n alignClasses[align],\n justifyClasses[justify],\n variant === \"flex\" && directionClasses[direction],\n wrap && variant !== \"stack\" && styles.wrap,\n (fill || grow) && styles.grow,\n (fill || fullWidth) && styles.fullWidth,\n (fill || fullHeight) && styles.fullHeight,\n (fill || grow) && \"gik-container-grow\",\n (fill || fullWidth) && \"gik-container-full-width\",\n (fill || fullHeight) && \"gik-container-full-height\",\n \"gik-container\",\n `gik-container-${variant}`,\n className,\n )}\n style={style}\n role={ariaLabel ? \"region\" : undefined}\n aria-label={ariaLabel}\n >\n {children}\n </div>\n );\n}\n\nfunction enumValue<T extends readonly string[]>(value: unknown, values: T, fallback: T[number]): T[number] {\n return values.includes(value as T[number]) ? value as T[number] : fallback;\n}\n\nexport const ContainerPrimitive: ProjectionView = ({ node, children }) => (\n <Container\n {...componentRootProps(node)}\n variant={enumValue(node.props.variant, CONTAINER_VARIANTS, \"column\")}\n gap={enumValue(node.props.gap, CONTAINER_GAPS, \"m\")}\n align={enumValue(node.props.align, CONTAINER_ALIGNMENTS, \"stretch\")}\n justify={enumValue(node.props.justify, CONTAINER_JUSTIFICATIONS, \"start\")}\n wrap={node.props.wrap === true}\n direction={enumValue(node.props.direction, CONTAINER_DIRECTIONS, \"row\")}\n fill={node.props.fill === true}\n grow={node.props.grow === true}\n fullWidth={node.props.fullWidth === true}\n fullHeight={node.props.fullHeight === true}\n ariaLabel={typeof node.props.ariaLabel === \"string\" ? node.props.ariaLabel : undefined}\n >\n {children}\n </Container>\n);\n\nconst schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n type: \"object\",\n additionalProperties: false,\n properties: {\n ...componentStylePropsSchema,\n variant: { enum: CONTAINER_VARIANTS },\n gap: { enum: CONTAINER_GAPS },\n align: { enum: CONTAINER_ALIGNMENTS },\n justify: { enum: CONTAINER_JUSTIFICATIONS },\n wrap: { type: \"boolean\" },\n direction: { enum: CONTAINER_DIRECTIONS },\n fill: { type: \"boolean\" },\n grow: { type: \"boolean\" },\n fullWidth: { type: \"boolean\" },\n fullHeight: { type: \"boolean\" },\n ariaLabel: { type: \"string\", minLength: 1 },\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:container\",\n summary: \"Declaratively arranges child views without owning their data or behavior.\",\n slots: [\"children\"],\n events: [],\n semanticTokens: [],\n defaultVariant: \"column\",\n variants: [\n { value: \"row\", summary: \"Places children horizontally in source order.\", useWhen: [\"Peers belong on one horizontal line\"] },\n { value: \"column\", summary: \"Places children vertically in source order.\", useWhen: [\"A page or region flows from top to bottom\"] },\n { value: \"stack\", summary: \"Places children in a single-column grid.\", useWhen: [\"Grid sizing should align vertically stacked children\"] },\n { value: \"flex\", summary: \"Provides configurable flex direction, alignment, wrapping, and distribution.\", useWhen: [\"Responsive child distribution needs explicit flex controls\"] },\n ],\n authoring: {\n useWhen: [\"Child views need declarative spatial composition\", \"One projection root must contain several sibling regions\"],\n avoidWhen: [\"The surface has domain semantics better expressed by a semantic component\", \"The region needs bounded scrolling; use primitive:growing-container\"],\n rules: [\n \"Place composed views in the children slot\",\n \"Use row or column for ordinary one-axis layouts and flex only when direction or wrapping must be configurable\",\n \"Use stack for a single-column grid, not for overlapping layers\",\n \"Use named gap values instead of embedding spacing in child styles\",\n \"Use fullWidth or fullHeight for axis sizing, grow for flex growth, and fill only when all three behaviors are intended\",\n \"Do not bind authored data to a container; containers intentionally declare no dataProp\",\n ],\n },\n};\n\nexport function describeContainer(): ComponentDescription {\n return description;\n}\n\nexport function getContainerSchema(): Record<string, unknown> {\n return schema as unknown as Record<string, unknown>;\n}\n\nexport function validateContainer(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{\n kind: \"ajv-schema\",\n schema: getContainerSchema(),\n message: \"Invalid primitive:container props\",\n code: \"primitive-container-schema\",\n }], props as Json);\n}\n\nexport function materializeContainerTrial() {\n return trialNode(\"primitive:container\", { variant: \"column\", gap: \"m\", fill: true, ariaLabel: \"Content region\" });\n}\n\nexport const containerDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: ContainerPrimitive,\n getSchema: getContainerSchema,\n validate: validateContainer,\n materializeTrial: materializeContainerTrial,\n});","import React from \"react\";\nimport {\n Button,\n Dialog,\n DialogBody,\n DialogContent,\n DialogSurface,\n DialogTitle,\n DialogTrigger,\n makeStyles,\n mergeClasses,\n tokens,\n type ButtonProps,\n} from \"@fluentui/react-components\";\nimport {\n ChevronLeftRegular,\n ChevronRightRegular,\n DismissRegular,\n} from \"@fluentui/react-icons\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../../shared/component\";\n\nexport const PANE_WITH_TRIGGER_VARIANTS = [\"drawer\", \"floating-drawer\", \"dialog-modal\"] as const;\nexport type PaneWithTriggerVariant = typeof PANE_WITH_TRIGGER_VARIANTS[number];\n\nconst FAB_POSITIONS = [\"top-left\", \"top-right\", \"bottom-left\", \"bottom-right\"] as const;\nconst TRIGGER_APPEARANCES = [\"primary\", \"secondary\", \"subtle\", \"transparent\", \"outline\"] as const;\ntype TriggerAppearance = Extract<ButtonProps[\"appearance\"], typeof TRIGGER_APPEARANCES[number]>;\n\nconst useStyles = makeStyles({\n root: {\n position: \"fixed\",\n top: tokens.spacingVerticalS,\n bottom: tokens.spacingVerticalS,\n zIndex: 1040,\n display: \"flex\",\n alignItems: \"flex-start\",\n pointerEvents: \"none\",\n },\n left: { left: tokens.spacingHorizontalS },\n right: { right: tokens.spacingHorizontalS, flexDirection: \"row-reverse\" },\n floatingRoot: { pointerEvents: \"auto\" },\n toggle: {\n zIndex: 2,\n pointerEvents: \"auto\",\n boxShadow: tokens.shadow8,\n },\n bottom: { alignSelf: \"flex-end\" },\n edgeHandle: {\n zIndex: 2,\n width: \"24px\",\n minWidth: \"24px\",\n height: \"72px\",\n padding: 0,\n borderRadius: 0,\n boxShadow: tokens.shadow16,\n pointerEvents: \"auto\",\n },\n edgeHandleLeft: {\n borderTopRightRadius: tokens.borderRadiusLarge,\n borderBottomRightRadius: tokens.borderRadiusLarge,\n },\n edgeHandleRight: {\n borderTopLeftRadius: tokens.borderRadiusLarge,\n borderBottomLeftRadius: tokens.borderRadiusLarge,\n },\n backdrop: {\n position: \"fixed\",\n inset: 0,\n zIndex: 0,\n backgroundColor: tokens.colorBackgroundOverlay,\n pointerEvents: \"none\",\n },\n panel: {\n position: \"relative\",\n zIndex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n width: \"min(var(--gik-drawer-width), calc(100vw - 4.5rem))\",\n height: \"100%\",\n minWidth: 0,\n overflow: \"hidden\",\n boxSizing: \"border-box\",\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n borderRadius: tokens.borderRadiusLarge,\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow64,\n pointerEvents: \"auto\",\n },\n floatingHeader: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: tokens.spacingHorizontalM,\n padding: tokens.spacingVerticalS,\n borderRadius: tokens.borderRadiusMedium,\n backgroundColor: tokens.colorNeutralBackground2,\n },\n floatingTitle: {\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n },\n floatingHeaderContent: {\n flex: \"1 1 auto\",\n minWidth: 0,\n },\n sections: {\n display: \"grid\",\n gridTemplateRows: \"auto minmax(0, 1fr) auto\",\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: 0,\n width: \"100%\",\n minHeight: 0,\n overflow: \"hidden\",\n },\n sectionBody: {\n gridRow: 2,\n minHeight: 0,\n overflow: \"auto\",\n boxSizing: \"border-box\",\n padding: tokens.spacingHorizontalL,\n },\n sectionChrome: {\n padding: tokens.spacingVerticalS,\n borderRadius: tokens.borderRadiusMedium,\n backgroundColor: tokens.colorNeutralBackground2,\n },\n sectionHeader: { gridRow: 1 },\n sectionFooter: { gridRow: 3 },\n dialogContent: {\n display: \"flex\",\n minHeight: 0,\n },\n});\n\ntype PaneSectionProps = React.PropsWithChildren;\n\nexport function PaneWithTriggerHeader({ children }: PaneSectionProps): React.ReactElement {\n return <>{children}</>;\n}\n\nexport function PaneWithTriggerTrigger({ children }: PaneSectionProps): React.ReactElement {\n return <>{children}</>;\n}\n\nexport function PaneWithTriggerBody({ children }: PaneSectionProps): React.ReactElement {\n return <>{children}</>;\n}\n\nexport function PaneWithTriggerFooter({ children }: PaneSectionProps): React.ReactElement {\n return <>{children}</>;\n}\n\ninterface ResolvedPaneSections {\n trigger?: React.ReactElement;\n header: React.ReactNode[];\n body: React.ReactNode[];\n footer: React.ReactNode[];\n}\n\nfunction resolvePaneSections(children: React.ReactNode): ResolvedPaneSections {\n let trigger: React.ReactElement | undefined;\n const header: React.ReactNode[] = [];\n const body: React.ReactNode[] = [];\n const footer: React.ReactNode[] = [];\n\n React.Children.forEach(children, (child) => {\n if (React.isValidElement<PaneSectionProps>(child) && child.type === PaneWithTriggerTrigger) {\n const triggerChildren = React.Children.toArray(child.props.children);\n if (triggerChildren.length === 1 && React.isValidElement(triggerChildren[0])) {\n trigger = triggerChildren[0];\n }\n } else if (React.isValidElement<PaneSectionProps>(child) && child.type === PaneWithTriggerHeader) {\n header.push(child.props.children);\n } else if (React.isValidElement<PaneSectionProps>(child) && child.type === PaneWithTriggerBody) {\n body.push(child.props.children);\n } else if (React.isValidElement<PaneSectionProps>(child) && child.type === PaneWithTriggerFooter) {\n footer.push(child.props.children);\n } else {\n body.push(child);\n }\n });\n\n return { trigger, header, body, footer };\n}\n\nfunction clickableTrigger(\n trigger: React.ReactElement,\n onClick: () => void,\n label: string,\n expanded: boolean,\n): React.ReactElement {\n const authoredProps = trigger.props as {\n onClick?: (event: React.MouseEvent) => void;\n \"aria-label\"?: string;\n title?: string;\n };\n return React.cloneElement(trigger, {\n onClick: (event: React.MouseEvent) => {\n authoredProps.onClick?.(event);\n if (!event.defaultPrevented) onClick();\n },\n \"aria-label\": authoredProps[\"aria-label\"] ?? label,\n title: authoredProps.title ?? label,\n \"aria-expanded\": expanded,\n } as React.HTMLAttributes<HTMLElement>);\n}\n\nfunction PaneSections({\n sections,\n styles,\n includeHeader = true,\n}: {\n sections: ResolvedPaneSections;\n styles: ReturnType<typeof useStyles>;\n includeHeader?: boolean;\n}): React.ReactElement {\n return (\n <div className={styles.sections}>\n {includeHeader && sections.header.length > 0\n ? (\n <header className={mergeClasses(styles.sectionChrome, styles.sectionHeader)}>\n {sections.header}\n </header>\n )\n : null}\n <div className={styles.sectionBody}>{sections.body}</div>\n {sections.footer.length > 0\n ? (\n <footer className={mergeClasses(styles.sectionChrome, styles.sectionFooter)}>\n {sections.footer}\n </footer>\n )\n : null}\n </div>\n );\n}\n\nexport const PaneWithTrigger: ProjectionView = ({ node, emit, children }) => {\n const styles = useStyles();\n const props = readProps(node);\n const variant = props.str(\"variant\", \"drawer\") as PaneWithTriggerVariant;\n const position = props.str(\"fabPosition\", \"top-left\");\n const isRight = position.endsWith(\"-right\");\n const isBottom = position.startsWith(\"bottom-\");\n const controlled = typeof node.props.open === \"boolean\";\n const [localOpen, setLocalOpen] = React.useState(() =>\n typeof node.props.defaultOpen === \"boolean\"\n ? node.props.defaultOpen\n : variant === \"floating-drawer\");\n const open = controlled ? props.bool(\"open\") : localOpen;\n const title = props.str(\"title\", \"Panel\");\n const openLabel = props.str(\"openLabel\", `Open ${title}`);\n const closeLabel = props.str(\"closeLabel\", `Close ${title}`);\n const triggerLabel = props.str(\"triggerLabel\", openLabel);\n const authoredWidthPercent = typeof node.props.panelWidthPercent === \"number\"\n ? node.props.panelWidthPercent\n : 80;\n const widthPercent = Math.min(80, Math.max(20, authoredWidthPercent));\n const authoredWidthPx = typeof node.props.panelWidthPx === \"number\"\n ? node.props.panelWidthPx\n : undefined;\n const panelWidth = authoredWidthPx === undefined\n ? `${widthPercent}vw`\n : `${Math.min(720, Math.max(240, authoredWidthPx))}px`;\n const rootProps = componentRootProps(node);\n const sections = resolvePaneSections(children);\n const floatingInset = open ? \"36px\" : \"0px\";\n const floatingVerticalInset = open ? \"36px\" : tokens.spacingVerticalS;\n const setOpen = (nextOpen: boolean) => {\n if (!controlled) setLocalOpen(nextOpen);\n void emit(\"openChange\", { open: nextOpen });\n };\n\n if (variant === \"dialog-modal\") {\n const dialogTrigger = sections.trigger\n ? clickableTrigger(sections.trigger, () => setOpen(true), triggerLabel, open)\n : (\n <Button appearance={props.str(\"triggerAppearance\") as TriggerAppearance || undefined}>\n {triggerLabel}\n </Button>\n );\n return (\n <Dialog\n open={open}\n modalType=\"modal\"\n onOpenChange={(_event, data) => setOpen(data.open)}\n >\n <DialogTrigger disableButtonEnhancement>\n {dialogTrigger}\n </DialogTrigger>\n <DialogSurface\n {...rootProps}\n aria-label={props.str(\"ariaLabel\", title)}\n >\n <DialogBody>\n <DialogTitle\n action={(\n <DialogTrigger action=\"close\" disableButtonEnhancement>\n <Button appearance=\"subtle\" icon={<DismissRegular />} aria-label={closeLabel} />\n </DialogTrigger>\n )}\n >\n {title}\n </DialogTitle>\n <DialogContent className={styles.dialogContent}>\n <PaneSections sections={sections} styles={styles} />\n </DialogContent>\n </DialogBody>\n </DialogSurface>\n </Dialog>\n );\n }\n\n const toggleIcon = isRight === open ? <ChevronRightRegular /> : <ChevronLeftRegular />;\n const defaultToggle = variant === \"floating-drawer\"\n ? (\n <Button\n className={mergeClasses(\n styles.edgeHandle,\n isRight ? styles.edgeHandleRight : styles.edgeHandleLeft,\n isBottom && styles.bottom,\n )}\n appearance=\"primary\"\n icon={toggleIcon}\n aria-label={openLabel}\n title={openLabel}\n aria-expanded={false}\n onClick={() => setOpen(true)}\n />\n )\n : (\n <Button\n className={mergeClasses(styles.toggle, isBottom && styles.bottom)}\n appearance=\"primary\"\n shape=\"circular\"\n size=\"large\"\n icon={toggleIcon}\n aria-label={open ? closeLabel : openLabel}\n title={open ? closeLabel : openLabel}\n aria-expanded={open}\n onClick={() => setOpen(!open)}\n />\n );\n const toggle = sections.trigger\n ? clickableTrigger(\n sections.trigger,\n () => setOpen(variant === \"floating-drawer\" ? true : !open),\n open ? closeLabel : openLabel,\n open,\n )\n : defaultToggle;\n\n return (\n <aside\n {...rootProps}\n className={mergeClasses(\n styles.root,\n isRight ? styles.right : styles.left,\n variant === \"floating-drawer\" && styles.floatingRoot,\n rootProps.className,\n )}\n style={{\n ...rootProps.style,\n ...(variant === \"floating-drawer\"\n ? {\n top: floatingVerticalInset,\n bottom: floatingVerticalInset,\n ...(isRight ? { right: floatingInset } : { left: floatingInset }),\n }\n : {}),\n }}\n aria-label={props.str(\"ariaLabel\", title)}\n >\n {!open ? toggle : variant === \"drawer\" ? toggle : null}\n {open ? (\n <>\n {variant === \"drawer\"\n ? <div className={styles.backdrop} data-pane-backdrop aria-hidden=\"true\" />\n : null}\n <div\n className={styles.panel}\n style={{ \"--gik-drawer-width\": panelWidth } as React.CSSProperties}\n >\n {variant === \"floating-drawer\" ? (\n <header className={styles.floatingHeader}>\n <div className={styles.floatingHeaderContent}>\n {sections.header.length > 0\n ? sections.header\n : <span className={styles.floatingTitle}>{title}</span>}\n </div>\n <Button\n appearance=\"subtle\"\n size=\"small\"\n icon={isRight ? <ChevronRightRegular /> : <ChevronLeftRegular />}\n aria-label={closeLabel}\n title={closeLabel}\n onClick={() => setOpen(false)}\n />\n </header>\n ) : null}\n <PaneSections\n sections={sections}\n styles={styles}\n includeHeader={variant !== \"floating-drawer\"}\n />\n </div>\n </>\n ) : null}\n </aside>\n );\n};\n\nconst schema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"variant\", \"title\"],\n properties: {\n variant: { enum: PANE_WITH_TRIGGER_VARIANTS },\n open: { type: \"boolean\" },\n defaultOpen: { type: \"boolean\" },\n fabPosition: { enum: FAB_POSITIONS },\n ariaLabel: { type: \"string\", minLength: 1 },\n title: { type: \"string\", minLength: 1 },\n openLabel: { type: \"string\", minLength: 1 },\n closeLabel: { type: \"string\", minLength: 1 },\n triggerLabel: { type: \"string\", minLength: 1 },\n triggerAppearance: { type: \"string\", enum: TRIGGER_APPEARANCES },\n panelWidthPercent: { type: \"number\", minimum: 20, maximum: 80 },\n panelWidthPx: { type: \"number\", minimum: 240, maximum: 720 },\n },\n allOf: [\n {\n if: { properties: { variant: { const: \"dialog-modal\" } }, required: [\"variant\"] },\n then: { required: [\"triggerLabel\", \"closeLabel\"] },\n },\n ],\n} as const);\n\nconst description: ComponentDescription = {\n capability: \"primitive:pane-with-trigger\",\n summary: \"Reveals authored children in a trigger-controlled drawer or modal dialog.\",\n slots: [\"trigger\", \"header\", \"body\", \"footer\"],\n events: [\"openChange\"],\n eventContracts: {\n openChange: eventContract(\"The drawer open state changed; handling this event is optional unless open is controlled.\", { open: { type: \"boolean\" } }),\n },\n semanticTokens: [],\n defaultVariant: \"drawer\",\n variants: [\n {\n value: \"drawer\",\n summary: \"Composes a corner-pinned circular toggle with a dimmed full-height overlay panel.\",\n useWhen: [\"Secondary tools should visually suppress the workspace while open\"],\n },\n {\n value: \"floating-drawer\",\n summary: \"Composes a non-dimming floating panel with an internal hide action and a directional edge handle when closed.\",\n useWhen: [\"Controls should open by default alongside a visible, interactive workspace\"],\n },\n {\n value: \"dialog-modal\",\n summary: \"Composes a labeled trigger with a modal dialog, title, and close action.\",\n useWhen: [\"A focused temporary workflow must interrupt the current surface\"],\n },\n ],\n authoring: {\n useWhen: [\"Authored children belong in a temporary surface opened by its own trigger\"],\n avoidWhen: [\"Content should permanently remain in the page flow\"],\n rules: [\n \"Choose drawer when the open pane should visually suppress the workspace\",\n \"Choose floating-drawer when controls and the workspace must remain visible together\",\n \"Floating-drawer opens by default; set defaultOpen only when it should initially be closed\",\n \"Floating-drawer derives its edge and hide direction from fabPosition\",\n \"Choose dialog-modal for a focused modal workflow\",\n \"Prefer local pane state; use defaultOpen only to choose its initial state\",\n \"Bind open only when application behavior or cross-Cell coordination must control the drawer\",\n \"Handle openChange only when the application needs to observe or control pane state\",\n \"Use the optional trigger section to provide the clickable trigger element; otherwise the generated trigger button is used\",\n \"Use optional header and footer sections around the required body section\",\n \"Bare children remain supported and render in the body section\",\n \"For drawer and floating-drawer, choose the toggle corner with fabPosition\",\n \"Use panelWidthPx for a stable pane width or panelWidthPercent for a viewport-relative drawer width; do not provide both\",\n \"For dialog-modal, provide triggerLabel and closeLabel\",\n \"Provide concise accessible labels for both variants\",\n ],\n },\n};\n\nexport function validatePaneWithTrigger(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{\n kind: \"ajv-schema\",\n schema,\n message: \"Invalid primitive:pane-with-trigger props\",\n code: \"primitive-pane-with-trigger-schema\",\n }], props as Json);\n}\n\nexport function materializePaneWithTriggerTrial() {\n return trialNode(\"primitive:pane-with-trigger\", {\n variant: \"drawer\",\n defaultOpen: true,\n fabPosition: \"top-left\",\n title: \"Source reports\",\n triggerLabel: \"Open source reports\",\n closeLabel: \"Close source reports\",\n panelWidthPercent: 80,\n });\n}\n\nexport const paneWithTriggerDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: PaneWithTrigger,\n getSchema: () => schema as unknown as Record<string, unknown>,\n validate: validatePaneWithTrigger,\n materializeTrial: materializePaneWithTriggerTrial,\n});","import React from \"react\";\nimport {\n Button,\n Input,\n Table,\n TableBody,\n TableCell,\n TableHeader,\n TableHeaderCell,\n TableRow,\n Text,\n makeStyles,\n mergeClasses,\n tokens,\n} from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../../shared/component\";\n\ninterface EditableTableSpec {\n schema?: { properties?: Record<string, Record<string, unknown>> };\n columns?: string[];\n addRow?: boolean;\n deleteRow?: boolean;\n placeholder?: string;\n}\n\nconst useStyles = makeStyles({\n root: { display: \"grid\", gap: tokens.spacingVerticalM, minWidth: 0 },\n overflow: { overflowX: \"auto\" },\n table: { width: \"100%\" },\n input: { width: \"100%\" },\n actionCell: { width: \"1%\", whiteSpace: \"nowrap\" },\n actions: { display: \"flex\", justifyContent: \"flex-end\", gap: tokens.spacingHorizontalS },\n placeholder: { color: tokens.colorNeutralForeground3 },\n});\n\nfunction editableRowsFrom(source: unknown[]): Array<Record<string, unknown>> {\n return source.map((row) => row && typeof row === \"object\" && !Array.isArray(row)\n ? { ...(row as Record<string, unknown>) }\n : { value: row ?? \"\" });\n}\n\nfunction blankEditableRow(columns: string[]): Record<string, unknown> {\n return Object.fromEntries(columns.map((column) => [column, \"\"]));\n}\n\nexport function isEmptyEditableRow(row: Record<string, unknown>): boolean {\n return Object.values(row).every((value) => value == null || (typeof value === \"string\" && value.trim() === \"\"));\n}\n\nexport function withTrailingEditableRow(rows: Array<Record<string, unknown>>, columns: string[]): Array<Record<string, unknown>> {\n return rows.length > 0 && isEmptyEditableRow(rows[rows.length - 1]) ? rows : [...rows, blankEditableRow(columns)];\n}\n\nexport function committedEditableRows(rows: Array<Record<string, unknown>>): Array<Record<string, unknown>> {\n return rows.filter((row) => !isEmptyEditableRow(row));\n}\n\nexport function appendEditableRowOnLastRowFocus(rows: Array<Record<string, unknown>>, columns: string[], rowIndex: number): Array<Record<string, unknown>> {\n return rowIndex === rows.length - 1 ? [...rows, blankEditableRow(columns)] : rows;\n}\n\nexport function editableTableColumns(spec: EditableTableSpec, rows: Array<Record<string, unknown>>): string[] {\n if (Array.isArray(spec.columns) && spec.columns.length > 0) return spec.columns.map(String);\n const schemaColumns = Object.keys(spec.schema?.properties ?? {});\n if (schemaColumns.length > 0) return schemaColumns;\n const seen = new Set<string>();\n for (const row of rows) for (const key of Object.keys(row)) seen.add(key);\n return [...seen];\n}\n\nexport const EditableTable: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const styles = useStyles();\n const spec = props.obj<EditableTableSpec>(\"spec\", {});\n const incomingRows = editableRowsFrom(props.list<unknown>(\"rows\").length > 0 ? props.list<unknown>(\"rows\") : props.list<unknown>(\"baseRows\"));\n const columns = editableTableColumns(spec, incomingRows);\n const incomingSignature = JSON.stringify(incomingRows);\n const columnsSignature = columns.join(\"\\u0000\");\n const initialRows = React.useMemo(() => withTrailingEditableRow(incomingRows, columns), [incomingSignature, columnsSignature]);\n const [rows, setRows] = React.useState(initialRows);\n const [dirty, setDirty] = React.useState(false);\n React.useEffect(() => {\n setRows(initialRows);\n setDirty(false);\n }, [initialRows]);\n const canAdd = spec.addRow !== false;\n const canDelete = spec.deleteRow !== false;\n const schemaProperties = spec.schema?.properties ?? {};\n const updateCell = (rowIndex: number, column: string, value: string, numeric: boolean) => {\n setRows((current) => current.map((row, index) => index === rowIndex\n ? { ...row, [column]: numeric && value !== \"\" ? Number.parseFloat(value) : value }\n : row));\n setDirty(true);\n };\n const deleteRow = (rowIndex: number) => {\n setRows((current) => withTrailingEditableRow(current.filter((_, index) => index !== rowIndex), columns));\n setDirty(true);\n };\n\n if (columns.length === 0 && !canAdd) return <Text className={styles.placeholder}>{spec.placeholder ?? \"No data\"}</Text>;\n\n return <div {...componentRootProps(node, styles.root, \"gx-editable-table\")}>\n <div className={styles.overflow}>\n <Table className={mergeClasses(styles.table, \"gx-table\", \"gx-table-editable\")} aria-label={props.str(\"ariaLabel\", \"Editable table\")}>\n <TableHeader><TableRow>\n {columns.map((column) => <TableHeaderCell key={column}>{String(schemaProperties[column]?.title ?? column)}</TableHeaderCell>)}\n {canDelete ? <TableHeaderCell className={styles.actionCell}>Actions</TableHeaderCell> : null}\n </TableRow></TableHeader>\n <TableBody>\n {rows.length === 0 ? <TableRow><TableCell colSpan={columns.length + (canDelete ? 1 : 0)}><Text className={styles.placeholder}>{spec.placeholder ?? \"No data\"}</Text></TableCell></TableRow>\n : rows.map((row, rowIndex) => <TableRow key={rowIndex}>\n {columns.map((column) => {\n const field = schemaProperties[column] ?? {};\n const numeric = field.type === \"number\" || field.type === \"integer\" || typeof row[column] === \"number\";\n return <TableCell key={column}><Input className={styles.input} type={numeric ? \"number\" : \"text\"} step={numeric ? \"any\" : undefined} value={row[column] == null ? \"\" : String(row[column])} aria-label={`${String(field.title ?? column)}, row ${rowIndex + 1}`} onFocus={rowIndex === rows.length - 1 ? () => setRows((current) => appendEditableRowOnLastRowFocus(current, columns, rowIndex)) : undefined} onChange={(_, data) => updateCell(rowIndex, column, data.value, numeric)} /></TableCell>;\n })}\n {canDelete ? <TableCell className={styles.actionCell}><Button className=\"gx-cell-delete\" appearance=\"subtle\" size=\"small\" aria-label={`remove row ${rowIndex + 1}`} title={`Remove row ${rowIndex + 1}`} onClick={() => deleteRow(rowIndex)}>Remove</Button></TableCell> : null}\n </TableRow>)}\n </TableBody>\n </Table>\n </div>\n {(canAdd || dirty) ? <div className={mergeClasses(styles.actions, \"gx-panel-actions\")}>\n {canAdd ? <Button className=\"gx-btn\" onClick={() => { setRows((current) => [...current, blankEditableRow(columns)]); setDirty(true); }}>+ Add row</Button> : null}\n {dirty ? <Button onClick={() => { setRows(initialRows); setDirty(false); }}>{props.str(\"discardLabel\", \"Discard\")}</Button> : null}\n {dirty ? <Button appearance=\"primary\" onClick={() => { void emit(\"save\", { rows: committedEditableRows(rows) }); setDirty(false); }}>{props.str(\"saveLabel\", \"Save\")}</Button> : null}\n </div> : null}\n </div>;\n};\n\nconst schema = {\n type: \"object\", additionalProperties: false,\n properties: {\n spec: { type: \"object\" }, rows: { type: \"array\" }, baseRows: { type: \"array\" },\n saveLabel: { type: \"string\" }, discardLabel: { type: \"string\" }, ariaLabel: { type: \"string\" },\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:editable-table\",\n summary: \"Renders a committed row editor with Fluent 2 table, input, and action controls.\",\n dataProp: \"rows\", events: [\"save\"], semanticTokens: [], variants: [],\n eventContracts: { save: eventContract(\"The user commits the edited rows.\", { rows: { type: \"array\", items: { type: \"object\" } } }) },\n authoring: {\n useWhen: [\"Users edit a small tabular collection and explicitly commit or discard the draft\"],\n avoidWhen: [\"Rows are read-only\", \"The dataset requires virtualization or spreadsheet formulas\"],\n rules: [\"Declare columns or a property schema when rows may be empty\", \"Handle save payload rows\", \"Keep persistence outside the component\"],\n },\n};\n\nconst publicSchema = withComponentStylePropsSchema(schema);\n\nexport function validateEditableTable(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema: publicSchema, message: \"Invalid primitive:editable-table props\", code: \"primitive-editable-table-schema\" }], props as Json);\n}\n\nexport function materializeEditableTableTrial() {\n return trialNode(\"primitive:editable-table\", {\n spec: { schema: { properties: { name: { type: \"string\", title: \"Name\" }, amount: { type: \"number\", title: \"Amount\" } } } },\n rows: [{ name: \"Budget\", amount: 3 }],\n });\n}\n\nexport const editableTableDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: EditableTable,\n getSchema: () => publicSchema,\n validate: validateEditableTable,\n materializeTrial: materializeEditableTableTrial,\n});","import React from \"react\";\nimport { Button } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\n\nfunction base64Bytes(content: string): Uint8Array<ArrayBuffer> {\n const binary = atob(content);\n const bytes = new Uint8Array(new ArrayBuffer(binary.length));\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\n\nexport const FileDownload: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const filename = props.str(\"filename\", \"download.txt\");\n const content = props.str(\"content\", \"\");\n const mediaType = props.str(\"mediaType\", \"text/plain\");\n const encoding = props.str(\"encoding\", \"text\");\n const disabled = props.bool(\"disabled\");\n\n const download = () => {\n if (disabled) return;\n const body: BlobPart = encoding === \"base64\" ? base64Bytes(content) : content;\n const url = URL.createObjectURL(new Blob([body], { type: mediaType }));\n const anchor = document.createElement(\"a\");\n anchor.href = url;\n anchor.download = filename;\n anchor.click();\n URL.revokeObjectURL(url);\n void emit(\"download\", { filename });\n };\n\n return <Button {...componentRootProps(node)} type=\"button\" disabled={disabled} onClick={download}>{props.str(\"label\", \"Download\")}</Button>;\n};\n\nconst schema = {\n type: \"object\",\n additionalProperties: false,\n properties: {\n label: { type: \"string\" },\n filename: { type: \"string\", minLength: 1 },\n content: { type: \"string\" },\n mediaType: { type: \"string\" },\n encoding: { enum: [\"text\", \"base64\"] },\n disabled: { type: \"boolean\" },\n ...componentStylePropsSchema,\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:file-download\",\n summary: \"Downloads declaratively supplied text or base64 content as a local file.\",\n events: [\"download\"],\n eventContracts: { download: eventContract(\"The file download was requested.\", { filename: { type: \"string\" } }) },\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"A workflow exposes generated or persisted content as a local download\"],\n avoidWhen: [\"A remote URL should be navigated directly\"],\n rules: [\"Bind filename and content from committed state\", \"Specify the media type\", \"Use base64 only for binary content\"],\n },\n};\n\nexport function validateFileDownload(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:file-download props\", code: \"primitive-file-download-schema\" }], props as Json);\n}\n\nexport function materializeFileDownloadTrial() {\n return trialNode(\"primitive:file-download\", { label: \"Download report\", filename: \"report.txt\", content: \"Ready\", mediaType: \"text/plain\" });\n}\n\nexport const fileDownloadDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: FileDownload,\n getSchema: () => schema,\n validate: validateFileDownload,\n materializeTrial: materializeFileDownloadTrial,\n});\n","import React from \"react\";\nimport { Button, makeStyles, mergeClasses, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\n\nconst useStyles = makeStyles({\n root: { display: \"inline-flex\" },\n dropzone: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: \"96px\",\n width: \"100%\",\n padding: tokens.spacingVerticalL,\n border: `1px dashed ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n backgroundColor: tokens.colorNeutralBackground2,\n color: tokens.colorNeutralForeground1,\n cursor: \"pointer\",\n },\n active: {\n boxShadow: `inset 0 0 0 1px ${tokens.colorBrandStroke1}`,\n backgroundColor: tokens.colorBrandBackground2,\n },\n disabled: { cursor: \"not-allowed\", opacity: 0.6 },\n});\n\ntype ReadMode = \"metadata\" | \"text\" | \"base64\";\n\nfunction bytesToBase64(bytes: Uint8Array): string {\n let binary = \"\";\n for (let offset = 0; offset < bytes.length; offset += 0x8000) {\n binary += String.fromCharCode(...bytes.subarray(offset, offset + 0x8000));\n }\n return btoa(binary);\n}\n\nasync function serializeFile(file: File, readAs: ReadMode): Promise<Record<string, Json>> {\n const record: Record<string, Json> = {\n name: file.name,\n type: file.type,\n size: file.size,\n lastModified: file.lastModified,\n };\n if (readAs === \"text\") return { ...record, text: await file.text(), encoding: \"text\" };\n if (readAs === \"base64\") {\n return { ...record, content: bytesToBase64(new Uint8Array(await file.arrayBuffer())), encoding: \"base64\" };\n }\n return record;\n}\n\nexport const FileInput: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const styles = useStyles();\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [dragActive, setDragActive] = React.useState(false);\n const disabled = props.bool(\"disabled\");\n const multiple = props.bool(\"multiple\");\n const variant = props.str(\"variant\", \"button\");\n const readAs = props.str(\"readAs\", \"metadata\") as ReadMode;\n const accept = props.str(\"accept\", \"\");\n const label = props.str(\"label\", multiple ? \"Choose files\" : \"Choose file\");\n\n const acceptFiles = async (list: FileList | null) => {\n if (disabled) return;\n const selected = Array.from(list ?? []);\n const files = await Promise.all((multiple ? selected : selected.slice(0, 1)).map((file) => serializeFile(file, readAs)));\n if (files.length === 0) return;\n await emit(\"select\", { files, ...(multiple ? {} : { file: files[0] }) });\n if (inputRef.current) inputRef.current.value = \"\";\n };\n const input = <input ref={inputRef} type=\"file\" hidden accept={accept || undefined} multiple={multiple} disabled={disabled} onChange={(event) => void acceptFiles(event.currentTarget.files)} />;\n\n if (variant === \"dropzone\") {\n return <div {...componentRootProps(node, styles.root)}>\n <div\n className={mergeClasses(styles.dropzone, dragActive && styles.active, disabled && styles.disabled)}\n role=\"button\"\n tabIndex={disabled ? -1 : 0}\n aria-disabled={disabled || undefined}\n onClick={() => { if (!disabled) inputRef.current?.click(); }}\n onKeyDown={(event) => {\n if (!disabled && (event.key === \"Enter\" || event.key === \" \")) {\n event.preventDefault();\n inputRef.current?.click();\n }\n }}\n onDragEnter={(event) => { event.preventDefault(); if (!disabled) setDragActive(true); }}\n onDragOver={(event) => { event.preventDefault(); if (!disabled) setDragActive(true); }}\n onDragLeave={(event) => { event.preventDefault(); if (event.currentTarget === event.target) setDragActive(false); }}\n onDrop={(event) => { event.preventDefault(); setDragActive(false); void acceptFiles(event.dataTransfer.files); }}\n >{label}</div>\n {input}\n </div>;\n }\n\n return <span {...componentRootProps(node, styles.root)}>\n <Button type=\"button\" disabled={disabled} onClick={() => inputRef.current?.click()}>{label}</Button>\n {input}\n </span>;\n};\n\nconst schema = {\n type: \"object\",\n additionalProperties: false,\n properties: {\n label: { type: \"string\" },\n accept: { type: \"string\" },\n multiple: { type: \"boolean\" },\n disabled: { type: \"boolean\" },\n variant: { enum: [\"button\", \"dropzone\"] },\n readAs: { enum: [\"metadata\", \"text\", \"base64\"] },\n ...componentStylePropsSchema,\n },\n} as const;\n\nconst normalizedFileSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"name\", \"type\", \"size\", \"lastModified\"],\n properties: {\n name: { type: \"string\" },\n type: { type: \"string\" },\n size: { type: \"number\" },\n lastModified: { type: \"number\" },\n text: { type: \"string\" },\n content: { type: \"string\" },\n encoding: { enum: [\"text\", \"base64\"] },\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:file-input\",\n summary: \"Selects or drops one or more files and emits JSON-serializable file records.\",\n events: [\"select\"],\n eventContracts: {\n select: eventContract(\"Files were selected or dropped.\", {\n files: { type: \"array\", items: normalizedFileSchema },\n file: normalizedFileSchema,\n }, [\"files\"]),\n },\n semanticTokens: [],\n defaultVariant: \"button\",\n variants: [\n { value: \"button\", summary: \"Opens a native file picker from a compact button.\", useWhen: [\"File selection is a secondary command\"] },\n { value: \"dropzone\", summary: \"Accepts drag-and-drop and click selection.\", useWhen: [\"File acquisition is a primary workflow\"] },\n ],\n authoring: {\n useWhen: [\"A declarative workflow needs local files or attachments\"],\n avoidWhen: [\"The host must acquire files without user interaction\"],\n rules: [\"Use text for textual documents\", \"Use base64 only when binary content must cross the event boundary\", \"Use metadata when content stays browser-owned\"],\n },\n};\n\nexport function validateFileInput(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:file-input props\", code: \"primitive-file-input-schema\" }], props as Json);\n}\n\nexport function materializeFileInputTrial() {\n return trialNode(\"primitive:file-input\", { label: \"Attach files\", multiple: true, variant: \"dropzone\", readAs: \"metadata\" });\n}\n\nexport const fileInputDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: FileInput,\n getSchema: () => schema,\n validate: validateFileInput,\n materializeTrial: materializeFileInputTrial,\n});\n","import React from \"react\";\nimport { Button, makeStyles, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\n\nconst useStyles = makeStyles({\n root: { display: \"flex\", flexDirection: \"column\", gap: tokens.spacingVerticalXS, margin: 0, padding: 0, listStyleType: \"none\" },\n item: { display: \"flex\", alignItems: \"center\", gap: tokens.spacingHorizontalS, padding: tokens.spacingVerticalS, borderBottom: `1px solid ${tokens.colorNeutralStroke2}` },\n name: { flexGrow: 1, minWidth: 0, overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" },\n metadata: { color: tokens.colorNeutralForeground3, fontSize: tokens.fontSizeBase200 },\n empty: { color: tokens.colorNeutralForeground3 },\n});\n\ntype FileRecord = Record<string, Json>;\n\nfunction formatSize(value: Json | undefined): string {\n const bytes = Number(value);\n if (!Number.isFinite(bytes) || bytes < 0) return \"\";\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n\nexport const FileList: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const styles = useStyles();\n const files = Array.isArray(node.props.files) ? node.props.files as FileRecord[] : [];\n const removable = props.bool(\"removable\");\n if (files.length === 0) return <div {...componentRootProps(node, styles.empty)}>{props.str(\"emptyText\", \"No files\")}</div>;\n\n return <ul {...componentRootProps(node, styles.root)}>\n {files.map((file, index) => {\n const name = String(file.name ?? `File ${index + 1}`);\n const url = typeof file.url === \"string\" ? file.url : \"\";\n const size = formatSize(file.size);\n return <li className={styles.item} key={String(file.id ?? `${name}-${index}`)}>\n {url\n ? <a className={styles.name} href={url} download={name} onClick={() => void emit(\"download\", { index, file })}>{name}</a>\n : <button className={styles.name} type=\"button\" onClick={() => void emit(\"select\", { index, file })}>{name}</button>}\n {size ? <span className={styles.metadata}>{size}</span> : null}\n {removable ? <Button size=\"small\" appearance=\"subtle\" type=\"button\" onClick={() => void emit(\"remove\", { index, file })}>Remove</Button> : null}\n </li>;\n })}\n </ul>;\n};\n\nconst fileSchema = {\n type: \"object\",\n additionalProperties: true,\n required: [\"name\"],\n properties: {\n id: { type: [\"string\", \"number\"] },\n name: { type: \"string\" },\n type: { type: \"string\" },\n size: { type: \"number\" },\n url: { type: \"string\" },\n },\n} as const;\nconst schema = {\n type: \"object\",\n additionalProperties: false,\n properties: {\n files: { type: \"array\", items: fileSchema },\n removable: { type: \"boolean\" },\n emptyText: { type: \"string\" },\n ...componentStylePropsSchema,\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:file-list\",\n summary: \"Presents normalized file records with optional download and removal actions.\",\n dataProp: \"files\",\n events: [\"select\", \"download\", \"remove\"],\n eventContracts: {\n select: eventContract(\"A non-downloadable file was selected.\", { index: { type: \"integer\" }, file: fileSchema }),\n download: eventContract(\"A URL-backed file download was requested.\", { index: { type: \"integer\" }, file: fileSchema }),\n remove: eventContract(\"A file removal was requested.\", { index: { type: \"integer\" }, file: fileSchema }),\n },\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"A workflow presents uploaded, staged, or downloadable files\"],\n avoidWhen: [\"Only one command-style download is needed; use file-download\"],\n rules: [\"Bind JSON-serializable normalized file records\", \"Keep upload and storage effects outside the component\", \"Provide URLs only for host-authorized downloads\"],\n },\n};\n\nexport function validateFileList(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:file-list props\", code: \"primitive-file-list-schema\" }], props as Json);\n}\n\nexport function materializeFileListTrial() {\n return trialNode(\"primitive:file-list\", { files: [{ name: \"report.pdf\", type: \"application/pdf\", size: 2048, url: \"/report.pdf\" }], removable: true });\n}\n\nexport const fileListDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: FileList,\n getSchema: () => schema,\n validate: validateFileList,\n materializeTrial: materializeFileListTrial,\n});\n","import React from \"react\";\nimport { makeStyles, mergeClasses } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport type { ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\n\nexport const GROWING_CONTAINER_FOLLOW_END = [\"always\", \"when-at-end\", \"off\"] as const;\nexport type GrowingContainerFollowEnd = typeof GROWING_CONTAINER_FOLLOW_END[number];\n\nexport interface GrowingContainerScrollMetrics {\n scrollHeight: number;\n scrollTop: number;\n clientHeight: number;\n}\n\nexport interface GrowingContainerProps {\n children?: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n followEnd?: GrowingContainerFollowEnd;\n ariaLabel?: string;\n}\n\nconst useStyles = makeStyles({\n root: {\n boxSizing: \"border-box\",\n width: \"100%\",\n height: \"100%\",\n minWidth: 0,\n minHeight: 0,\n maxWidth: \"100%\",\n maxHeight: \"100%\",\n overflow: \"auto\",\n overscrollBehavior: \"contain\",\n },\n content: { minWidth: 0, minHeight: \"100%\" },\n});\n\nconst useIsomorphicLayoutEffect = typeof window === \"undefined\" ? React.useEffect : React.useLayoutEffect;\n\nexport function isGrowingContainerPinnedToEnd(\n metrics: GrowingContainerScrollMetrics,\n threshold = 8,\n): boolean {\n return metrics.scrollHeight - metrics.scrollTop - metrics.clientHeight <= threshold;\n}\n\nexport function shouldGrowingContainerFollowEnd(\n mode: GrowingContainerFollowEnd,\n pinnedToEnd: boolean,\n): boolean {\n return mode === \"always\" || (mode === \"when-at-end\" && pinnedToEnd);\n}\n\nexport function GrowingContainer({\n children,\n className,\n style,\n followEnd = \"always\",\n ariaLabel,\n}: GrowingContainerProps): React.ReactElement {\n const styles = useStyles();\n const viewportRef = React.useRef<HTMLDivElement>(null);\n const contentRef = React.useRef<HTMLDivElement>(null);\n const pinnedToEndRef = React.useRef(true);\n\n const scrollToEnd = React.useCallback(() => {\n const viewport = viewportRef.current;\n if (viewport) viewport.scrollTop = viewport.scrollHeight;\n }, []);\n\n useIsomorphicLayoutEffect(() => {\n const content = contentRef.current;\n if (!viewportRef.current || !content || followEnd === \"off\") return;\n\n const onContentResize = () => {\n if (shouldGrowingContainerFollowEnd(followEnd, pinnedToEndRef.current)) scrollToEnd();\n };\n const resizeObserver = typeof ResizeObserver === \"undefined\" ? undefined : new ResizeObserver(onContentResize);\n const mutationObserver = typeof MutationObserver === \"undefined\" ? undefined : new MutationObserver(onContentResize);\n resizeObserver?.observe(content);\n mutationObserver?.observe(content, { childList: true, subtree: true, characterData: true });\n scrollToEnd();\n return () => {\n resizeObserver?.disconnect();\n mutationObserver?.disconnect();\n };\n }, [followEnd, scrollToEnd]);\n\n const onScroll = () => {\n const viewport = viewportRef.current;\n if (viewport) pinnedToEndRef.current = isGrowingContainerPinnedToEnd(viewport);\n };\n\n return (\n <div\n ref={viewportRef}\n className={mergeClasses(styles.root, \"gik-growing-container\", className)}\n style={style}\n role={ariaLabel ? \"region\" : undefined}\n aria-label={ariaLabel}\n onScroll={onScroll}\n >\n <div\n ref={contentRef}\n className={mergeClasses(styles.content, \"gik-growing-container-content\")}\n >\n {children}\n </div>\n </div>\n );\n}\n\nexport const GrowingContainerPrimitive: ProjectionView = ({ node, children }) => {\n const requestedFollowEnd = node.props.followEnd;\n const followEnd = GROWING_CONTAINER_FOLLOW_END.includes(requestedFollowEnd as GrowingContainerFollowEnd)\n ? requestedFollowEnd as GrowingContainerFollowEnd\n : \"always\";\n const ariaLabel = typeof node.props.ariaLabel === \"string\" ? node.props.ariaLabel : undefined;\n return <GrowingContainer {...componentRootProps(node)} followEnd={followEnd} ariaLabel={ariaLabel}>{children}</GrowingContainer>;\n};\n\nconst schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n type: \"object\",\n additionalProperties: false,\n properties: {\n ...componentStylePropsSchema,\n followEnd: { enum: GROWING_CONTAINER_FOLLOW_END },\n ariaLabel: { type: \"string\", minLength: 1 },\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:growing-container\",\n summary: \"Provides a bounded scrolling viewport that can follow content appended at its end.\",\n slots: [\"children\"],\n events: [],\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\n \"A bounded region receives content incrementally\",\n \"The viewport should own overflow and optionally follow appended content\",\n ],\n avoidWhen: [\n \"The parent already owns scrolling\",\n \"Content should expand the surrounding document instead of remaining bounded\",\n ],\n rules: [\n \"Place rendered content in the children slot\",\n \"Use always for output surfaces that must stay at the newest content\",\n \"Use when-at-end when users must be able to scroll back without being pulled to the end\",\n \"Use off when the viewport must never move automatically\",\n \"Provide ariaLabel when the scrolling region needs an accessible name\",\n ],\n },\n};\n\nexport function describeGrowingContainer(): ComponentDescription {\n return description;\n}\n\nexport function getGrowingContainerSchema(): Record<string, unknown> {\n return schema as unknown as Record<string, unknown>;\n}\n\nexport function validateGrowingContainer(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{\n kind: \"ajv-schema\",\n schema: getGrowingContainerSchema(),\n message: \"Invalid primitive:growing-container props\",\n code: \"primitive-growing-container-schema\",\n }], props as Json);\n}\n\nexport function materializeGrowingContainerTrial() {\n return trialNode(\"primitive:growing-container\", {\n followEnd: \"when-at-end\",\n ariaLabel: \"Streaming output\",\n });\n}\n\nexport const growingContainerDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: GrowingContainerPrimitive,\n getSchema: getGrowingContainerSchema,\n validate: validateGrowingContainer,\n materializeTrial: materializeGrowingContainerTrial,\n});","import React from \"react\";\nimport { Button, Dialog, DialogActions, DialogBody, DialogContent, DialogSurface, DialogTitle, Input, makeStyles, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport { defineComponent, eventContract, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\n\nconst useStyles = makeStyles({\n message: { margin: `0 0 ${tokens.spacingVerticalL}`, color: tokens.colorNeutralForeground2 },\n label: { display: \"grid\", gap: tokens.spacingVerticalS, fontWeight: tokens.fontWeightSemibold },\n error: { minHeight: tokens.lineHeightBase300, marginTop: tokens.spacingVerticalXS, color: tokens.colorPaletteRedForeground1 },\n});\n\nexport const MathChallenge: ProjectionView = ({ node, emit }) => {\n const styles = useStyles();\n const props = readProps(node);\n const operandA = Number(node.props.operandA ?? 3);\n const operandB = Number(node.props.operandB ?? 7);\n const [answer, setAnswer] = React.useState(\"\");\n const inputRef = React.useRef<HTMLInputElement>(null);\n const titleId = `${node.id}-title`;\n const messageId = `${node.id}-message`;\n const answered = answer.trim().length > 0;\n const correct = answered && Number(answer) === operandA + operandB;\n React.useEffect(() => { inputRef.current?.focus(); }, []);\n return (\n <Dialog open modalType=\"alert\" onOpenChange={(_event, data) => { if (!data.open) void emit(\"cancel\", { reason: \"escape\" }); }}>\n <DialogSurface {...componentRootProps(node)} aria-labelledby={titleId} aria-describedby={messageId}>\n <form onSubmit={(event) => { event.preventDefault(); if (correct) void emit(\"confirm\", {}); }}>\n <DialogBody>\n <DialogTitle id={titleId}>{props.str(\"title\", \"Confirm destructive action\")}</DialogTitle>\n <DialogContent>\n <p className={styles.message} id={messageId}>{props.str(\"message\", \"This action cannot be undone.\")}</p>\n <label className={styles.label} htmlFor={`${node.id}-answer`}>Solve to continue: <strong>{operandA} + {operandB} = ?</strong></label>\n <Input ref={inputRef} id={`${node.id}-answer`} type=\"number\" inputMode=\"numeric\" value={answer} aria-invalid={answered && !correct} autoComplete=\"off\" onChange={(_, data) => setAnswer(data.value)} />\n <div className={styles.error} aria-live=\"polite\">{answered && !correct ? \"Incorrect answer. Try again.\" : \"\"}</div>\n </DialogContent>\n <DialogActions>\n <Button type=\"button\" onClick={() => void emit(\"cancel\", { reason: \"button\" })}>{props.str(\"cancelLabel\", \"Cancel\")}</Button>\n <Button appearance=\"primary\" type=\"submit\" disabled={!correct}>{props.str(\"confirmLabel\", \"Delete\")}</Button>\n </DialogActions>\n </DialogBody>\n </form>\n </DialogSurface>\n </Dialog>\n );\n};\n\nconst schema = {\n type: \"object\",\n additionalProperties: false,\n properties: { ...componentStylePropsSchema, operandA: { type: \"number\" }, operandB: { type: \"number\" }, title: { type: \"string\" }, message: { type: \"string\" }, cancelLabel: { type: \"string\" }, confirmLabel: { type: \"string\" } },\n} as const;\nconst description: ComponentDescription = {\n capability: \"primitive:math-challenge\",\n summary: \"Gates a destructive confirmation behind a small arithmetic challenge.\",\n dataProp: \"message\",\n events: [\"confirm\", \"cancel\"],\n eventContracts: {\n confirm: eventContract(\"The user solves the challenge and confirms the action.\"),\n cancel: eventContract(\"The user cancels the challenge.\", { reason: { enum: [\"escape\", \"button\"] } }),\n },\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"A destructive action requires deliberate confirmation\"],\n avoidWhen: [\"A normal confirmation button is sufficient\", \"The operation is reversible\"],\n rules: [\"Handle both confirm and cancel\", \"Explain the destructive consequence in message\", \"Do not use as authentication\"],\n },\n};\nexport function validateMathChallenge(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:math-challenge props\", code: \"primitive-math-challenge-schema\" }], props as Json);\n}\nexport const mathChallengeDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: MathChallenge,\n getSchema: () => schema,\n validate: validateMathChallenge,\n materializeTrial: () => trialNode(\"primitive:math-challenge\", { title: \"Delete Blueprint\", message: \"This action cannot be undone.\", operandA: 3, operandB: 7 }),\n});","import React from \"react\";\nimport { makeStyles, mergeClasses, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport { defineComponent, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\n\nconst useStyles = makeStyles({\n root: {\n minWidth: 0,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n lineHeight: tokens.lineHeightBase300,\n overflowWrap: \"anywhere\",\n \"& h1\": { fontSize: tokens.fontSizeHero700, lineHeight: tokens.lineHeightHero700, margin: `${tokens.spacingVerticalL} 0 ${tokens.spacingVerticalS}` },\n \"& h2\": { fontSize: tokens.fontSizeBase600, lineHeight: tokens.lineHeightBase600, margin: `${tokens.spacingVerticalL} 0 ${tokens.spacingVerticalS}` },\n \"& h3\": { fontSize: tokens.fontSizeBase500, lineHeight: tokens.lineHeightBase500, margin: `${tokens.spacingVerticalM} 0 ${tokens.spacingVerticalXS}` },\n \"& h4\": { fontSize: tokens.fontSizeBase400, lineHeight: tokens.lineHeightBase400, margin: `${tokens.spacingVerticalM} 0 ${tokens.spacingVerticalXS}` },\n \"& p\": { margin: `0 0 ${tokens.spacingVerticalM}` },\n \"& ul, & ol\": { margin: `0 0 ${tokens.spacingVerticalM}`, paddingLeft: tokens.spacingHorizontalXXL },\n \"& a\": { color: tokens.colorBrandForegroundLink, textDecorationLine: \"underline\", textUnderlineOffset: \"2px\" },\n \"& code\": { fontFamily: tokens.fontFamilyMonospace, color: tokens.colorBrandForeground1 },\n },\n code: {\n overflow: \"auto\",\n padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n borderRadius: tokens.borderRadiusMedium,\n },\n diagram: { overflow: \"auto\", margin: `${tokens.spacingVerticalM} 0`, textAlign: \"center\", \"& svg\": { display: \"inline-block\", maxWidth: \"100%\", height: \"auto\" } },\n tableWrap: { maxWidth: \"100%\", overflowX: \"auto\", margin: `${tokens.spacingVerticalM} 0` },\n table: {\n width: \"100%\",\n borderCollapse: \"collapse\",\n fontSize: tokens.fontSizeBase200,\n \"& th\": { padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`, borderBottom: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralStroke1}`, textAlign: \"left\", whiteSpace: \"nowrap\" },\n \"& td\": { padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`, borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`, textAlign: \"left\", verticalAlign: \"top\" },\n \"& tbody tr:hover\": { backgroundColor: tokens.colorNeutralBackground2 },\n },\n});\n\nexport function safeMarkdownHref(url: string): string | null {\n const trimmed = url.trim();\n return /^(https?:|mailto:|\\/|#|\\.)/i.test(trimmed) ? trimmed : null;\n}\n\nfunction renderInline(text: string): React.ReactNode {\n const pattern = /(`[^`]+`)|(\\[[^\\]]+\\]\\([^)\\s]+\\))|(\\*\\*[^*]+\\*\\*)|(\\*[^*]+\\*)|(_[^_]+_)/g;\n const nodes: React.ReactNode[] = [];\n let last = 0;\n let key = 0;\n let match: RegExpExecArray | null;\n while ((match = pattern.exec(text)) !== null) {\n if (match.index > last) nodes.push(text.slice(last, match.index));\n const token = match[0];\n if (token.startsWith(\"`\")) nodes.push(<code key={key++}>{token.slice(1, -1)}</code>);\n else if (token.startsWith(\"[\")) {\n const link = /^\\[([^\\]]+)\\]\\(([^)\\s]+)\\)$/.exec(token);\n const href = link ? safeMarkdownHref(link[2]) : null;\n nodes.push(link && href ? <a key={key++} href={href} target=\"_blank\" rel=\"noreferrer noopener\">{link[1]}</a> : token);\n } else if (token.startsWith(\"**\")) nodes.push(<strong key={key++}>{token.slice(2, -2)}</strong>);\n else nodes.push(<em key={key++}>{token.slice(1, -1)}</em>);\n last = match.index + token.length;\n }\n if (last < text.length) nodes.push(text.slice(last));\n return nodes.length === 0 ? text : nodes.length === 1 ? nodes[0] : nodes;\n}\n\nlet mermaidInitialized = false;\n\nfunction MermaidDiagram({ source, className, codeClassName }: { source: string; className: string; codeClassName: string }) {\n const diagramId = React.useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n const [svg, setSvg] = React.useState<string | null>(null);\n React.useEffect(() => {\n let active = true;\n setSvg(null);\n void import(\"mermaid\").then(async ({ default: mermaid }) => {\n if (!mermaidInitialized) {\n mermaid.initialize({ startOnLoad: false, securityLevel: \"strict\" });\n mermaidInitialized = true;\n }\n const rendered = await mermaid.render(`gik-mermaid-${diagramId}`, source);\n if (active) setSvg(rendered.svg);\n }).catch(() => undefined);\n return () => { active = false; };\n }, [diagramId, source]);\n return svg\n ? <div className={className} role=\"img\" aria-label=\"Mermaid diagram\" dangerouslySetInnerHTML={{ __html: svg }} />\n : <pre className={codeClassName} data-mermaid-fallback><code className=\"language-mermaid\">{source}</code></pre>;\n}\n\nfunction tableCells(line: string): string[] {\n const cells: string[] = [];\n let cell = \"\";\n let escaped = false;\n for (const character of line.trim().replace(/^\\|/, \"\").replace(/\\|$/, \"\")) {\n if (escaped) { cell += character; escaped = false; }\n else if (character === \"\\\\\") escaped = true;\n else if (character === \"|\") { cells.push(cell.trim()); cell = \"\"; }\n else cell += character;\n }\n if (escaped) cell += \"\\\\\";\n cells.push(cell.trim());\n return cells;\n}\n\nfunction renderBlocks(value: string, styles: ReturnType<typeof useStyles>): React.ReactNode[] {\n const lines = value.replace(/\\r\\n/g, \"\\n\").split(\"\\n\");\n const nodes: React.ReactNode[] = [];\n let paragraph: string[] = [];\n let items: string[] = [];\n let ordered = false;\n let fence: string | null = null;\n let fenceLines: string[] = [];\n const flushParagraph = () => { if (paragraph.length) { nodes.push(<p key={`p-${nodes.length}`}>{renderInline(paragraph.join(\" \"))}</p>); paragraph = []; } };\n const flushList = () => {\n if (!items.length) return;\n const children = items.map((item, index) => <li key={index}>{renderInline(item)}</li>);\n nodes.push(ordered ? <ol key={`ol-${nodes.length}`}>{children}</ol> : <ul key={`ul-${nodes.length}`}>{children}</ul>);\n items = [];\n };\n const flushFence = () => {\n if (fence === null) return;\n const source = fenceLines.join(\"\\n\");\n nodes.push(fence.toLowerCase() === \"mermaid\"\n ? <MermaidDiagram key={`f-${nodes.length}`} source={source} className={styles.diagram} codeClassName={styles.code} />\n : <pre key={`f-${nodes.length}`} className={styles.code}><code className={fence ? `language-${fence}` : undefined}>{source}</code></pre>);\n fence = null;\n fenceLines = [];\n };\n for (let index = 0; index < lines.length; index += 1) {\n const raw = lines[index];\n const line = raw.trim();\n if (fence !== null) { if (/^```\\s*$/.test(line)) flushFence(); else fenceLines.push(raw); continue; }\n const fenceStart = /^```([^\\s`]*)\\s*$/.exec(line);\n if (fenceStart) { flushParagraph(); flushList(); fence = fenceStart[1]; continue; }\n if (!line) { flushParagraph(); flushList(); continue; }\n const headers = line.includes(\"|\") ? tableCells(line) : [];\n const separator = lines[index + 1]?.trim() ?? \"\";\n if (headers.length > 1 && tableCells(separator).length === headers.length && tableCells(separator).every((cell) => /^:?-{3,}:?$/.test(cell))) {\n flushParagraph(); flushList();\n const rows: string[][] = [];\n index += 2;\n while (index < lines.length && lines[index].trim().includes(\"|\")) {\n const row = tableCells(lines[index]);\n if (row.length !== headers.length) break;\n rows.push(row); index += 1;\n }\n index -= 1;\n nodes.push(<div key={`t-${nodes.length}`} className={styles.tableWrap}><table className={styles.table}><thead><tr>{headers.map((header, cell) => <th key={cell}>{renderInline(header)}</th>)}</tr></thead><tbody>{rows.map((row, rowIndex) => <tr key={rowIndex}>{row.map((value, cell) => <td key={cell}>{renderInline(value)}</td>)}</tr>)}</tbody></table></div>);\n continue;\n }\n const heading = /^(#{1,4})\\s+(.*)$/.exec(line);\n if (heading) { flushParagraph(); flushList(); const Tag = `h${heading[1].length}` as \"h1\" | \"h2\" | \"h3\" | \"h4\"; nodes.push(<Tag key={`h-${nodes.length}`}>{renderInline(heading[2])}</Tag>); continue; }\n const numbered = /^\\d+\\.\\s+(.*)$/.exec(line);\n if (numbered) { flushParagraph(); if (!ordered) flushList(); ordered = true; items.push(numbered[1]); continue; }\n const bullet = /^[-*]\\s+(.*)$/.exec(line);\n if (bullet) { flushParagraph(); if (ordered) flushList(); ordered = false; items.push(bullet[1]); continue; }\n flushList(); paragraph.push(line);\n }\n flushParagraph(); flushList(); flushFence();\n return nodes;\n}\n\nexport const Markdown: ProjectionView = ({ node }) => {\n const styles = useStyles();\n const value = readProps(node).str(\"value\");\n return value ? <div {...componentRootProps(node, styles.root, \"gik-markdown\")}>{renderBlocks(value, styles)}</div> : null;\n};\n\nconst schema = { $schema: \"http://json-schema.org/draft-07/schema#\", type: \"object\", additionalProperties: false, required: [\"value\"], properties: { ...componentStylePropsSchema, value: { type: \"string\" } } } as const;\nconst description: ComponentDescription = {\n capability: \"primitive:markdown\",\n summary: \"Safely renders authored Markdown as structured document content, including tables, code, and Mermaid diagrams.\",\n dataProp: \"value\",\n events: [],\n semanticTokens: [],\n variants: [],\n authoring: {\n useWhen: [\"A trusted scalar contains Markdown document content\", \"Headings, lists, tables, code, and links must retain their structure\"],\n avoidWhen: [\"The value is plain text; use fluent:text\", \"The source must be shown verbatim; use primitive:source-viewer\"],\n rules: [\"Bind Markdown through value\", \"Do not pass HTML as a substitute for Markdown\", \"Use fenced mermaid blocks for diagrams\"],\n },\n};\nexport function validateMarkdown(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:markdown props\", code: \"primitive-markdown-schema\" }], props as Json);\n}\nexport const markdownDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: Markdown,\n getSchema: () => schema as unknown as Record<string, unknown>,\n validate: validateMarkdown,\n materializeTrial: () => trialNode(\"primitive:markdown\", { value: \"# Incident report\\n\\n**Status:** Ready\" }),\n});","import React from \"react\";\nimport { makeStyles, Text, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport { defineComponent, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\n\nconst useStyles = makeStyles({ root: { minWidth: 0, display: \"flex\", flexDirection: \"column\", gap: tokens.spacingVerticalXXS }, label: { color: tokens.colorNeutralForeground3 }, value: { overflowWrap: \"anywhere\" } });\nexport const Metric: ProjectionView = ({ node }) => { const styles = useStyles(); const props = readProps(node); return <div {...componentRootProps(node, styles.root)}><Text className={styles.label} size={200}>{props.str(\"label\")}</Text><Text className={styles.value} size={500} weight=\"semibold\">{props.str(\"value\")}</Text></div>; };\nconst schema = { type: \"object\", additionalProperties: false, required: [\"label\", \"value\"], properties: { ...componentStylePropsSchema, label: { type: \"string\" }, value: { type: [\"string\", \"number\"] } } } as const;\nconst description: ComponentDescription = { capability: \"primitive:metric\", summary: \"Presents one labeled scalar measure.\", dataProp: \"value\", events: [], semanticTokens: [], variants: [], authoring: { useWhen: [\"One scalar deserves compact visual prominence\"], avoidWhen: [\"Several related measures should be compared; use semantic:measure-set\"], rules: [\"Provide a concise label\", \"Bind the scalar through value\"] } };\nexport function validateMetric(props: unknown): ComponentValidationReport { return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:metric props\", code: \"primitive-metric-schema\" }], props as Json); }\nexport const metricDefinition = defineComponent({ description, version: \"1.0.0\", component: Metric, getSchema: () => schema, validate: validateMetric, materializeTrial: () => trialNode(\"primitive:metric\", { label: \"Coverage\", value: \"94%\" }) });","import React from \"react\";\nimport { makeStyles, mergeClasses, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport { defineComponent, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\n\nconst useStyles = makeStyles({\n root: { margin: 0, color: tokens.colorNeutralForeground3, lineHeight: tokens.lineHeightBase300 },\n info: { color: tokens.colorBrandForeground1 },\n warning: { color: tokens.colorPaletteDarkOrangeForeground2 },\n danger: { color: tokens.colorPaletteRedForeground1 },\n success: { color: tokens.colorPaletteGreenForeground1 },\n});\n\nexport const Note: ProjectionView = ({ node }) => {\n const styles = useStyles();\n const props = readProps(node);\n const tone = props.str(\"tone\", \"muted\");\n const toneClass = tone === \"info\" ? styles.info : tone === \"warning\" ? styles.warning : tone === \"danger\" ? styles.danger : tone === \"success\" ? styles.success : undefined;\n return <p {...componentRootProps(node, mergeClasses(styles.root, toneClass))}>{props.str(\"value\")}</p>;\n};\n\nconst schema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"value\"],\n properties: { ...componentStylePropsSchema, value: { type: \"string\" }, tone: { type: \"string\", enum: [\"muted\", \"info\", \"warning\", \"danger\", \"success\"] } },\n} as const;\nconst description: ComponentDescription = {\n capability: \"primitive:note\",\n summary: \"Presents a short, non-interactive status or supporting note with an optional semantic tone.\",\n dataProp: \"value\",\n events: [],\n semanticTokens: [\"muted\", \"info\", \"warning\", \"danger\", \"success\"],\n variants: [],\n authoring: {\n useWhen: [\"Short supporting or status copy needs visual emphasis without interaction\"],\n avoidWhen: [\"Content contains document structure; use primitive:markdown\", \"The message requires dismissal or an action\"],\n rules: [\"Bind text through value\", \"Use tone only for semantic status\"],\n },\n};\nexport function validateNote(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:note props\", code: \"primitive-note-schema\" }], props as Json);\n}\nexport const noteDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: Note,\n getSchema: () => schema,\n validate: validateNote,\n materializeTrial: () => trialNode(\"primitive:note\", { value: \"Refinement complete.\", tone: \"success\" }),\n});","import React from \"react\";\nimport { makeStyles, Text, tokens } from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\nimport { defineComponent, trialNode, type ComponentDescription, type ComponentValidationReport } from \"../../shared/definition\";\n\nconst useStyles = makeStyles({ root: { minWidth: 0, display: \"flex\", flexDirection: \"column\", gap: tokens.spacingVerticalXXS }, label: { color: tokens.colorNeutralForeground3, textTransform: \"uppercase\" }, value: { overflowWrap: \"anywhere\" } });\nexport const Property: ProjectionView = ({ node }) => { const styles = useStyles(); const props = readProps(node); return <div {...componentRootProps(node, styles.root)}><Text className={styles.label} size={100}>{props.str(\"label\")}</Text><Text className={styles.value} size={300} weight=\"semibold\">{props.str(\"value\")}</Text></div>; };\nconst schema = { type: \"object\", additionalProperties: false, required: [\"label\", \"value\"], properties: { ...componentStylePropsSchema, label: { type: \"string\" }, value: { type: [\"string\", \"number\", \"boolean\"] } } } as const;\nconst description: ComponentDescription = { capability: \"primitive:property\", summary: \"Presents one compact labeled attribute.\", dataProp: \"value\", events: [], semanticTokens: [], variants: [], authoring: { useWhen: [\"An identifier, enum, count, or short phrase needs a visible label\"], avoidWhen: [\"The value is a prominent measure; use primitive:metric\"], rules: [\"Keep values concise\", \"Bind the attribute through value\"] } };\nexport function validateProperty(props: unknown): ComponentValidationReport { return runDeclarativeValidators([{ kind: \"ajv-schema\", schema, message: \"Invalid primitive:property props\", code: \"primitive-property-schema\" }], props as Json); }\nexport const propertyDefinition = defineComponent({ description, version: \"1.0.0\", component: Property, getSchema: () => schema, validate: validateProperty, materializeTrial: () => trialNode(\"primitive:property\", { label: \"Version\", value: \"1.0.0\" }) });","import React from \"react\";\nimport {\n Button,\n ToggleButton,\n makeStyles,\n tokens,\n type ButtonProps,\n} from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, useCountdownTimer, type ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { componentRootProps, componentStylePropsSchema } from \"../../shared/component\";\n\nexport const TIMER_BUTTON_PACES = [\"manual\", \"auto\"] as const;\nexport const TIMER_BUTTON_VARIANTS = [\"standard\", \"auto-only\"] as const;\nexport const TIMER_BUTTON_APPEARANCES = [\"primary\", \"secondary\", \"outline\", \"subtle\", \"transparent\"] as const;\nexport const TIMER_BUTTON_SIZES = [\"small\", \"medium\", \"large\"] as const;\nexport type TimerButtonPace = typeof TIMER_BUTTON_PACES[number];\n\nconst useStyles = makeStyles({\n root: {\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: tokens.spacingHorizontalS,\n flexWrap: \"wrap\",\n },\n countdownButton: {\n minWidth: \"4.75rem\",\n fontFamily: tokens.fontFamilyMonospace,\n fontVariantNumeric: \"tabular-nums\",\n },\n});\n\nexport function formatTimerButtonCountdown(remainingSeconds: number): string {\n const seconds = Math.max(0, Math.floor(remainingSeconds));\n const minutes = Math.floor(seconds / 60);\n return `${String(minutes).padStart(2, \"0\")}:${String(seconds % 60).padStart(2, \"0\")}`;\n}\n\nfunction duration(value: unknown, fallback: number): number {\n const parsed = Number(value ?? fallback);\n return Number.isFinite(parsed) ? Math.max(0, parsed) : fallback;\n}\n\nexport const TimerButton: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const styles = useStyles();\n const [pace, setPace] = React.useState<TimerButtonPace>(\n () => node.props.defaultPace === \"manual\" ? \"manual\" : \"auto\",\n );\n const autoOnly = node.props.variant === \"auto-only\";\n const effectivePace: TimerButtonPace = autoOnly ? \"auto\" : pace;\n const defaultDurationMs = duration(node.props.durationMs, 3000);\n const durationMs = effectivePace === \"auto\"\n ? duration(node.props.autoDurationMs, defaultDurationMs)\n : duration(node.props.manualDurationMs, defaultDurationMs);\n const disabled = props.bool(\"disabled\");\n const showCountdown = node.props.showCountdown !== false;\n const countdownOnly = node.props.countdownOnly === true;\n const showPaceSwitch = !autoOnly && node.props.showPaceSwitch === true;\n const running = effectivePace === \"auto\" && node.props.autoStart !== false && !disabled;\n const externalResetKey = node.props.resetKey ?? \"\";\n const immediateKey = JSON.stringify(externalResetKey);\n const immediatelyTriggeredKey = React.useRef<string>();\n const previousResetKey = React.useRef(externalResetKey);\n React.useEffect(() => {\n const previous = Number(previousResetKey.current);\n const current = Number(externalResetKey);\n previousResetKey.current = externalResetKey;\n if (Number.isFinite(previous) && Number.isFinite(current) && current < previous) {\n setPace(autoOnly || node.props.defaultPace !== \"manual\" ? \"auto\" : \"manual\");\n }\n }, [autoOnly, externalResetKey, node.props.defaultPace]);\n const timer = useCountdownTimer({\n durationMs,\n running,\n resetKey: `${JSON.stringify(externalResetKey)}:${effectivePace}`,\n onElapsed: () => {\n void emit(\"press\", { reason: \"timeout\" });\n if (node.props.repeat === true) timer.restart();\n },\n });\n React.useEffect(() => {\n if (node.props.triggerImmediately !== true\n || !running\n || immediatelyTriggeredKey.current === immediateKey) return;\n immediatelyTriggeredKey.current = immediateKey;\n void emit(\"press\", { reason: \"immediate\" });\n }, [emit, immediateKey, node.props.triggerImmediately, running]);\n const label = props.str(\"label\");\n const countdown = formatTimerButtonCountdown(timer.remainingSeconds);\n const ariaLabel = props.str(\"ariaLabel\") || label;\n\n return (\n <div {...componentRootProps(node, styles.root)}>\n {showPaceSwitch ? (\n <ToggleButton\n checked={effectivePace === \"auto\"}\n size=\"small\"\n aria-label={props.str(\"paceAriaLabel\", \"Automatically trigger when the countdown ends\")}\n onClick={() => setPace((current) => current === \"auto\" ? \"manual\" : \"auto\")}\n >\n {effectivePace === \"auto\" ? props.str(\"autoLabel\", \"Auto\") : props.str(\"manualLabel\", \"Manual\")}\n </ToggleButton>\n ) : null}\n <Button\n className={countdownOnly ? styles.countdownButton : undefined}\n appearance={props.str(\"appearance\", \"secondary\") as ButtonProps[\"appearance\"]}\n size={props.str(\"size\", \"medium\") as ButtonProps[\"size\"]}\n disabled={disabled}\n aria-label={running && showCountdown ? `${ariaLabel}, ${timer.remainingSeconds} seconds remaining` : ariaLabel}\n onClick={() => {\n void emit(\"press\", { reason: \"manual\" });\n timer.restart();\n }}\n >\n {countdownOnly && showCountdown\n ? countdown\n : <>\n {label}\n {running && showCountdown ? ` · ${countdown}` : null}\n </>}\n </Button>\n </div>\n );\n};\n\nconst schema = {\n $schema: \"http://json-schema.org/draft-07/schema#\",\n type: \"object\",\n additionalProperties: false,\n required: [\"label\"],\n properties: {\n ...componentStylePropsSchema,\n label: { type: \"string\", minLength: 1 },\n variant: { enum: TIMER_BUTTON_VARIANTS },\n ariaLabel: { type: \"string\", minLength: 1 },\n durationMs: { type: \"number\", minimum: 0 },\n autoDurationMs: { type: \"number\", minimum: 0 },\n manualDurationMs: { type: \"number\", minimum: 0 },\n defaultPace: { enum: TIMER_BUTTON_PACES },\n autoStart: { type: \"boolean\" },\n triggerImmediately: { type: \"boolean\" },\n repeat: { type: \"boolean\" },\n showCountdown: { type: \"boolean\" },\n countdownOnly: { type: \"boolean\" },\n showPaceSwitch: { type: \"boolean\" },\n disabled: { type: \"boolean\" },\n resetKey: { type: [\"string\", \"number\", \"boolean\", \"null\"] },\n appearance: { enum: TIMER_BUTTON_APPEARANCES },\n size: { enum: TIMER_BUTTON_SIZES },\n paceAriaLabel: { type: \"string\", minLength: 1 },\n autoLabel: { type: \"string\", minLength: 1 },\n manualLabel: { type: \"string\", minLength: 1 },\n },\n} as const;\n\nconst description: ComponentDescription = {\n capability: \"primitive:timer-button\",\n summary: \"Renders a button that can emit manually or when an optional countdown elapses.\",\n events: [\"press\"],\n eventContracts: { press: eventContract(\"The button invokes immediately, manually, or when its countdown elapses.\", { reason: { enum: [\"immediate\", \"manual\", \"timeout\"] } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: [\n {\n value: \"standard\",\n summary: \"Supports manual or automatic pace, with an optional user-facing pace switch.\",\n useWhen: [\"The authored flow may use manual pace or let the user choose between manual and automatic pace\"],\n },\n {\n value: \"auto-only\",\n summary: \"Always runs in automatic pace and never displays the manual/auto switch.\",\n useWhen: [\"The action must trigger automatically without exposing manual versus automatic pace controls\"],\n },\n ],\n authoring: {\n useWhen: [\n \"An action may be triggered manually or after a visible delay\",\n \"A user-selectable manual/auto pace supports repeated demonstrations or guided flows\",\n ],\n avoidWhen: [\n \"Elapsed time is informational and must not trigger an action\",\n \"The workflow needs scheduling that must survive an unmounted UI\",\n ],\n rules: [\n \"Handle press payload reason as immediate, manual, or timeout\",\n \"Set triggerImmediately when the action must run once as soon as each resetKey becomes active\",\n \"Set showPaceSwitch only when the user should control manual versus auto behavior\",\n \"Set countdownOnly when a compact fixed-width MM:SS action is more useful than a changing text label\",\n \"Use auto-only when the action must always run in automatic pace without exposing pace controls\",\n \"Set repeat only when every elapsed interval should trigger another press\",\n \"Use resetKey to restart the countdown when external progress changes\",\n \"Keep durable scheduling and domain workflow state outside the projection component\",\n ],\n },\n};\n\nexport function describeTimerButton(): ComponentDescription {\n return description;\n}\n\nexport function getTimerButtonSchema(): Record<string, unknown> {\n return schema as unknown as Record<string, unknown>;\n}\n\nexport function validateTimerButton(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{\n kind: \"ajv-schema\",\n schema: getTimerButtonSchema(),\n message: \"Invalid primitive:timer-button props\",\n code: \"primitive-timer-button-schema\",\n }], props as Json);\n}\n\nexport function materializeTimerButtonTrial() {\n return trialNode(\"primitive:timer-button\", {\n label: \"Continue\",\n variant: \"standard\",\n durationMs: 5000,\n defaultPace: \"auto\",\n showCountdown: true,\n showPaceSwitch: true,\n });\n}\n\nexport const timerButtonDefinition = defineComponent({\n description,\n version: \"1.1.0\",\n component: TimerButton,\n getSchema: getTimerButtonSchema,\n validate: validateTimerButton,\n materializeTrial: materializeTimerButtonTrial,\n});","import React from \"react\";\nimport {\n Checkbox,\n Field,\n List,\n ListItem,\n Text,\n} from \"@fluentui/react-components\";\nimport type { Json } from \"@gik-ai/kernel\";\nimport { runDeclarativeValidators } from \"@gik-ai/evaluators\";\nimport { readProps, type ProjectionView } from \"@gik-ai/react\";\n\nimport {\n defineComponent,\n eventContract,\n trialNode,\n type ComponentDescription,\n type ComponentValidationReport,\n} from \"../../shared/definition\";\nimport { componentRootProps, withComponentStylePropsSchema } from \"../../shared/component\";\n\ninterface TodoListFields {\n properties?: Record<string, Record<string, unknown>>;\n}\n\nexport function updateTodoListValues(\n values: Readonly<Record<string, boolean>>,\n key: string,\n checked: boolean,\n): Record<string, boolean> {\n return { ...values, [key]: checked };\n}\n\nexport const TodoList: ProjectionView = ({ node, emit }) => {\n const props = readProps(node);\n const fields = props.obj<TodoListFields>(\"fields\", {});\n const properties = fields.properties ?? {};\n const incoming = props.obj<Record<string, boolean>>(\"value\", {});\n const incomingSignature = JSON.stringify(incoming);\n const [values, setValues] = React.useState(incoming);\n const compact = node.props.variant === \"compact\";\n\n React.useEffect(() => setValues(incoming), [incomingSignature]);\n\n return (\n <div {...componentRootProps(node)}>\n {Object.keys(properties).length === 0 ? <Text>{props.str(\"emptyText\", \"Nothing here yet.\")}</Text> : null}\n <List aria-label={props.str(\"ariaLabel\", \"Todo list\")}>\n {Object.entries(properties).map(([key, field]) => {\n const title = String(field.title ?? key);\n const hint = typeof field.description === \"string\" ? field.description : typeof field.hint === \"string\" ? field.hint : undefined;\n const checked = Boolean(values[key]);\n return (\n <ListItem key={key}>\n <Field hint={hint}>\n <Checkbox\n checked={checked}\n size={compact ? \"medium\" : \"large\"}\n label={<Text strikethrough={checked}>{title}</Text>}\n disabled={field.readOnly === true || field.disabled === true}\n onChange={(_, data) => {\n const nextValues = updateTodoListValues(values, key, data.checked === true);\n setValues(nextValues);\n void emit(\"save\", { values: nextValues });\n }}\n />\n </Field>\n </ListItem>\n );\n })}\n </List>\n </div>\n );\n};\n\nconst checkboxFieldSchema = {\n type: \"object\",\n additionalProperties: false,\n required: [\"type\", \"title\"],\n properties: {\n type: { const: \"boolean\" },\n title: { type: \"string\" },\n description: { type: \"string\" },\n hint: { type: \"string\" },\n readOnly: { type: \"boolean\" },\n disabled: { type: \"boolean\" },\n },\n} as const;\n\nconst publicSchema = withComponentStylePropsSchema({\n type: \"object\",\n additionalProperties: false,\n required: [\"fields\", \"value\"],\n properties: {\n fields: {\n type: \"object\",\n additionalProperties: false,\n required: [\"properties\"],\n properties: {\n properties: { type: \"object\", additionalProperties: checkboxFieldSchema },\n },\n },\n value: { type: \"object\", additionalProperties: { type: \"boolean\" } },\n variant: { type: \"string\", enum: [\"standard\", \"compact\"] },\n ariaLabel: { type: \"string\" },\n emptyText: { type: \"string\" },\n },\n} as const);\n\nconst description: ComponentDescription = {\n capability: \"primitive:todo-list\",\n summary: \"Renders boolean form fields as a todo list and immediately saves each changed value.\",\n dataProp: \"value\",\n events: [\"save\"],\n eventContracts: { save: eventContract(\"A todo change commits the complete next values object.\", { values: { type: \"object\", additionalProperties: { type: \"boolean\" } } }) },\n semanticTokens: [],\n defaultVariant: \"standard\",\n variants: [\n { value: \"standard\", summary: \"Uses standard Fluent control sizing.\", useWhen: [\"The todo editor appears in a normal panel or form\"] },\n { value: \"compact\", summary: \"Uses native compact Fluent control sizing.\", useWhen: [\"The todo editor appears in a dense or constrained surface\"] },\n ],\n authoring: {\n useWhen: [\"Boolean form fields should be presented as immediately committed todo items\"],\n avoidWhen: [\"Values require an explicit Save or Discard step; use primitive:form\", \"Items are read-only; use fluent:list\"],\n rules: [\"Define every field as a titled boolean property\", \"Provide values as a keyed boolean object\", \"Handle each save payload values object as the complete next value\", \"Keep persistence outside the component\"],\n },\n};\n\nexport function validateTodoList(props: unknown): ComponentValidationReport {\n return runDeclarativeValidators([{\n kind: \"ajv-schema\",\n schema: publicSchema,\n message: \"Invalid primitive:todo-list props\",\n code: \"primitive-todo-list-schema\",\n }], props as Json);\n}\n\nexport function materializeTodoListTrial() {\n return trialNode(\"primitive:todo-list\", {\n variant: \"standard\",\n fields: {\n properties: {\n shipComponent: { type: \"boolean\", title: \"Ship the component\" },\n publishDocs: { type: \"boolean\", title: \"Publish the docs\" },\n },\n },\n value: { shipComponent: false, publishDocs: true },\n });\n}\n\nexport const todoListDefinition = defineComponent({\n description,\n version: \"1.0.0\",\n component: TodoList,\n getSchema: () => publicSchema,\n validate: validateTodoList,\n materializeTrial: materializeTodoListTrial,\n});","import type { CapabilityDescriptor } from \"@gik-ai/kernel\";\nimport type { ProjectionView } from \"@gik-ai/react\";\n\nimport { AccessGate, accessGateDefinition } from \"./access-gate\";\nimport { Alert, alertDefinition } from \"./alert\";\nimport { Chart, chartDefinition } from \"./chart\";\nimport { CollectionBoard, collectionBoardDefinition } from \"./collection-board\";\nimport { ContainerPrimitive, containerDefinition } from \"./container\";\nimport { DateTime, dateTimeDefinition } from \"./datetime\";\nimport { PaneWithTrigger, paneWithTriggerDefinition } from \"./pane-with-trigger\";\nimport { EditableTable, editableTableDefinition } from \"./editable-table\";\nimport { FileDownload, fileDownloadDefinition } from \"./file-download\";\nimport { FileInput, fileInputDefinition } from \"./file-input\";\nimport { FileList, fileListDefinition } from \"./file-list\";\nimport { Form, formDefinition } from \"./form\";\nimport { Gantt, ganttDefinition } from \"./gantt\";\nimport { GraphDiagram, graphDiagramDefinition } from \"./graph-diagram\";\nimport { GrowingContainerPrimitive, growingContainerDefinition } from \"./growing-container\";\nimport { InfiniteCanvasPrimitive, infiniteCanvasDefinition } from \"./infinite-canvas\";\nimport { MathChallenge, mathChallengeDefinition } from \"./math-challenge\";\nimport { Markdown, markdownDefinition } from \"./markdown\";\nimport { Metric, metricDefinition } from \"./metric\";\nimport { Note, noteDefinition } from \"./note\";\nimport { Property, propertyDefinition } from \"./property\";\nimport { SourceViewer, sourceViewerDefinition } from \"./source-viewer\";\nimport { TimerButton, timerButtonDefinition } from \"./timer-button\";\nimport { TodoList, todoListDefinition } from \"./todo-list\";\n\nexport const primitiveComponentViews: Record<string, ProjectionView> = {\n \"access-gate\": AccessGate,\n alert: Alert,\n chart: Chart,\n \"collection-board\": CollectionBoard,\n container: ContainerPrimitive,\n datetime: DateTime,\n \"pane-with-trigger\": PaneWithTrigger,\n \"editable-table\": EditableTable,\n \"file-download\": FileDownload,\n \"file-input\": FileInput,\n \"file-list\": FileList,\n form: Form,\n gantt: Gantt,\n \"graph-diagram\": GraphDiagram,\n \"growing-container\": GrowingContainerPrimitive,\n \"infinite-canvas\": InfiniteCanvasPrimitive,\n \"math-challenge\": MathChallenge,\n markdown: Markdown,\n metric: Metric,\n note: Note,\n property: Property,\n \"source-viewer\": SourceViewer,\n \"timer-button\": TimerButton,\n \"todo-list\": TodoList,\n};\n\nexport const primitiveComponentDefinitions = {\n \"access-gate\": accessGateDefinition,\n alert: alertDefinition,\n chart: chartDefinition,\n \"collection-board\": collectionBoardDefinition,\n container: containerDefinition,\n datetime: dateTimeDefinition,\n \"pane-with-trigger\": paneWithTriggerDefinition,\n \"editable-table\": editableTableDefinition,\n \"file-download\": fileDownloadDefinition,\n \"file-input\": fileInputDefinition,\n \"file-list\": fileListDefinition,\n form: formDefinition,\n gantt: ganttDefinition,\n \"graph-diagram\": graphDiagramDefinition,\n \"growing-container\": growingContainerDefinition,\n \"infinite-canvas\": infiniteCanvasDefinition,\n \"math-challenge\": mathChallengeDefinition,\n markdown: markdownDefinition,\n metric: metricDefinition,\n note: noteDefinition,\n property: propertyDefinition,\n \"source-viewer\": sourceViewerDefinition,\n \"timer-button\": timerButtonDefinition,\n \"todo-list\": todoListDefinition,\n} as const;\n\nexport const primitiveComponentCapabilities: Record<string, CapabilityDescriptor> = Object.fromEntries(\n Object.entries(primitiveComponentDefinitions).map(([name, definition]) => [name, {\n propsSchema: definition.getSchema(),\n ...(definition.dataProp ? { dataProp: definition.dataProp } : {}),\n ...(definition.slots ? { slots: [...definition.slots] } : {}),\n emits: [...definition.events],\n }])\n);","import type { ComponentValidationReport } from \"../shared/definition\";\nimport {\n createComponentAuthoringApi,\n type ComponentAgentKit,\n type ComponentAuthoringDescription,\n type ComponentAuthoringTool,\n type ComponentCatalogEntry,\n type ComponentPreflightReport,\n} from \"../shared/component-authoring-internal\";\nimport { primitiveComponentDefinitions } from \"./registry\";\n\nexport interface PrimitiveComponentCatalogEntry extends ComponentCatalogEntry {}\nexport interface PrimitiveComponentAuthoringDescription extends ComponentAuthoringDescription {}\nexport interface PrimitiveComponentPreflightReport extends ComponentPreflightReport {}\nexport interface PrimitiveComponentAgentKit extends ComponentAgentKit {}\n\nconst api = createComponentAuthoringApi({\n definitions: primitiveComponentDefinitions,\n kind: \"primitive\",\n toolKind: \"Primitive\",\n});\n\nexport const listPrimitiveComponents = (): PrimitiveComponentCatalogEntry[] => api.list();\n\nexport const describePrimitiveComponent = (\n capability: string,\n): PrimitiveComponentAuthoringDescription => api.describe(capability);\n\nexport const validatePrimitiveComponentProps = (\n capability: string,\n props: unknown,\n): ComponentValidationReport => api.validate(capability, props);\n\nexport const materializePrimitiveComponentTrial = api.materialize;\n\nexport const preflightPrimitiveComponent = (\n capability: string,\n props: unknown,\n): PrimitiveComponentPreflightReport => api.preflight(capability, props);\n\nexport const getPrimitiveComponentAgentInstructions = api.instructions;\n\nexport const createPrimitiveComponentAuthoringTools = (\n components?: readonly string[],\n): ComponentAuthoringTool[] => api.createTools(components);\n\nexport const getPrimitiveComponentAgentKit = (\n components?: readonly string[],\n): PrimitiveComponentAgentKit => api.getKit(components);\n\nexport const primitiveComponentAuthoringTools = createPrimitiveComponentAuthoringTools();"],"mappings":"wZAEA,OAAS,4BAAAA,OAAgC,qBACzC,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oBAAqBC,GACrB,iBAAkBC,GAClB,gBAAiBC,GACjB,aAAcC,GACd,YAAaC,GACb,KAAMC,GACN,MAAOC,GACP,gBAAiBC,GACjB,oBAAqBC,GACrB,kBAAmBC,GACnB,iBAAkBC,GAClB,SAAUC,GACV,OAAQC,GACR,KAAMC,GACN,SAAUC,GACV,gBAAiBC,GACjB,eAAgBC,GAChB,YAAaC,EACf,EAEaC,GAAuE,OAAO,YACzF,OAAO,QAAQzB,EAA6B,EAAE,IAAI,CAAC,CAAC0B,EAAMC,CAAU,IAAM,CAACD,EAAM,CAC/E,YAAaC,EAAW,UAAU,EAClC,GAAIA,EAAW,SAAW,CAAE,SAAUA,EAAW,QAAS,EAAI,CAAC,EAC/D,GAAIA,EAAW,MAAQ,CAAE,MAAO,CAAC,GAAGA,EAAW,KAAK,CAAE,EAAI,CAAC,EAC3D,MAAO,CAAC,GAAGA,EAAW,MAAM,CAC9B,CAAC,CAAC,CACJ,ECzEA,IAAMC,GAAMC,GAA4B,CACtC,YAAaC,GACb,KAAM,YACN,SAAU,WACZ,CAAC,EAEYC,GAA0B,IAAwCH,GAAI,KAAK,EAE3EI,GACXC,GAC2CL,GAAI,SAASK,CAAU,EAEvDC,GAAkC,CAC7CD,EACAE,IAC8BP,GAAI,SAASK,EAAYE,CAAK,EAEjDC,GAAqCR,GAAI,YAEzCS,GAA8B,CACzCJ,EACAE,IACsCP,GAAI,UAAUK,EAAYE,CAAK,EAE1DG,GAAyCV,GAAI,aAE7CW,GACXC,GAC6BZ,GAAI,YAAYY,CAAU,EAE5CC,GACXD,GAC+BZ,GAAI,OAAOY,CAAU,EAEzCE,GAAmCH,GAAuC","names":["runDeclarativeValidators","readProps","React","Button","Checkbox","Dropdown","Field","Input","Option","Spinner","Textarea","makeStyles","mergeClasses","tokens","CheckmarkCircleRegular","runDeclarativeValidators","validateDeclarativeFormValues","readProps","resolveLayoutSlots","Fragment","jsx","jsxs","useStyles","makeStyles","tokens","useDraftState","incoming","initiallyDirty","signature","draft","setDraft","React","dirty","setDirty","reset","optionsFrom","field","multiple","source","item","option","names","value","index","isJsonField","isMultiSelect","items","isTextarea","inputType","fieldSpan","explicit","temporalValue","text","Form","node","emit","props","readProps","styles","schema","fields","required","validationContext","readOnly","savingTracked","saving","saveError","values","setValues","jsonKeys","key","jsonSignature","jsonTextFrom","jsonText","setJsonText","jsonErrors","setJsonErrors","validationErrors","setValidationErrors","justSaved","setJustSaved","wasSavingRef","setField","current","setJsonField","error","discard","submit","event","report","validateDeclarativeFormValues","issue","spanClasses","fieldLayout","resolveLayoutSlots","fieldGroups","slot","slottedFields","group","componentRootProps","mergeClasses","title","hint","disabled","isRequired","span","className","hintContent","Field","Textarea","_","data","Checkbox","selected","options","Dropdown","Option","type","Input","CheckmarkCircleRegular","Button","Spinner","componentLayoutPropsSchema","description","eventContract","publicSchema","withComponentStylePropsSchema","validateForm","runDeclarativeValidators","materializeFormTrial","trialNode","formDefinition","defineComponent","Fragment","jsx","jsxs","projectionNode","id","capability","props","AccessGate","node","emit","children","access","readProps","status","title","formSpec","asRecord","actions","dialogNode","formNode","button","name","defaultLabel","event","appearance","FluentButton","FluentDialog","_event","payload","FluentSpinner","Form","accessGateSchema","withComponentStylePropsSchema","formDefinition","accessGateDescription","eventContract","validateAccessGate","runDeclarativeValidators","materializeAccessGateTrial","trialNode","accessGateDefinition","defineComponent","MessageBar","MessageBarBody","MessageBarTitle","runDeclarativeValidators","readProps","jsx","jsxs","levels","Alert","node","props","readProps","level","intent","MessageBar","componentRootProps","MessageBarBody","MessageBarTitle","schema","componentStylePropsSchema","description","validateAlert","runDeclarativeValidators","alertDefinition","defineComponent","trialNode","Badge","Text","makeStyles","tokens","runDeclarativeValidators","jsx","jsxs","CHART_SEMANTIC_TOKENS","CHART_VARIANTS","CHART_KINDS","schema","componentStylePropsSchema","useStyles","makeStyles","tokens","fill","token","categoricalFills","pieSlicePath","centerX","centerY","radius","startAngle","endAngle","point","angle","start","end","largeArc","Chart","node","styles","points","records","spec","compact","values","readPath","max","Text","componentRootProps","width","height","left","top","bottom","plotHeight","step","coordinates","index","value","total","sum","entry","pieAngle","formatCell","column","textAt","x","y","toneValue","mappedToken","color","label","Badge","rowIndex","description","describeChart","getChartSchema","validateChart","props","runDeclarativeValidators","materializeChartTrial","trialNode","chartDefinition","defineComponent","makeStyles","mergeClasses","tokens","runDeclarativeValidators","jsx","CONTAINER_VARIANTS","CONTAINER_GAPS","CONTAINER_ALIGNMENTS","CONTAINER_JUSTIFICATIONS","CONTAINER_DIRECTIONS","useStyles","makeStyles","tokens","Container","children","className","style","variant","gap","align","justify","wrap","direction","fill","grow","fullWidth","fullHeight","ariaLabel","styles","gapClasses","alignClasses","justifyClasses","directionClasses","mergeClasses","enumValue","value","values","fallback","ContainerPrimitive","node","componentRootProps","schema","componentStylePropsSchema","description","describeContainer","getContainerSchema","validateContainer","props","runDeclarativeValidators","materializeContainerTrial","trialNode","containerDefinition","defineComponent","React","Button","Dialog","DialogBody","DialogContent","DialogSurface","DialogTitle","DialogTrigger","makeStyles","mergeClasses","tokens","ChevronLeftRegular","ChevronRightRegular","DismissRegular","runDeclarativeValidators","readProps","Fragment","jsx","jsxs","PANE_WITH_TRIGGER_VARIANTS","FAB_POSITIONS","TRIGGER_APPEARANCES","useStyles","makeStyles","tokens","PaneWithTriggerHeader","children","PaneWithTriggerTrigger","PaneWithTriggerBody","PaneWithTriggerFooter","resolvePaneSections","trigger","header","body","footer","React","child","triggerChildren","clickableTrigger","onClick","label","expanded","authoredProps","event","PaneSections","sections","styles","includeHeader","mergeClasses","PaneWithTrigger","node","emit","props","readProps","variant","position","isRight","isBottom","controlled","localOpen","setLocalOpen","open","title","openLabel","closeLabel","triggerLabel","authoredWidthPercent","widthPercent","authoredWidthPx","panelWidth","rootProps","componentRootProps","floatingInset","floatingVerticalInset","setOpen","nextOpen","dialogTrigger","Button","Dialog","_event","data","DialogTrigger","DialogSurface","DialogBody","DialogTitle","DismissRegular","DialogContent","toggleIcon","ChevronRightRegular","ChevronLeftRegular","defaultToggle","toggle","schema","withComponentStylePropsSchema","description","eventContract","validatePaneWithTrigger","runDeclarativeValidators","materializePaneWithTriggerTrial","trialNode","paneWithTriggerDefinition","defineComponent","React","Button","Input","Table","TableBody","TableCell","TableHeader","TableHeaderCell","TableRow","Text","makeStyles","mergeClasses","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","editableRowsFrom","source","row","blankEditableRow","columns","column","isEmptyEditableRow","value","withTrailingEditableRow","rows","committedEditableRows","appendEditableRowOnLastRowFocus","rowIndex","editableTableColumns","spec","schemaColumns","seen","key","EditableTable","node","emit","props","readProps","styles","incomingRows","incomingSignature","columnsSignature","initialRows","React","setRows","dirty","setDirty","canAdd","canDelete","schemaProperties","updateCell","numeric","current","index","deleteRow","_","Text","componentRootProps","Table","mergeClasses","TableHeader","TableRow","TableHeaderCell","TableBody","TableCell","field","Input","data","Button","schema","description","eventContract","publicSchema","withComponentStylePropsSchema","validateEditableTable","runDeclarativeValidators","materializeEditableTableTrial","trialNode","editableTableDefinition","defineComponent","Button","runDeclarativeValidators","readProps","jsx","base64Bytes","content","binary","bytes","index","FileDownload","node","emit","props","readProps","filename","mediaType","encoding","disabled","download","body","url","anchor","Button","componentRootProps","schema","componentStylePropsSchema","description","eventContract","validateFileDownload","runDeclarativeValidators","materializeFileDownloadTrial","trialNode","fileDownloadDefinition","defineComponent","React","Button","makeStyles","mergeClasses","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","bytesToBase64","bytes","binary","offset","serializeFile","file","readAs","record","FileInput","node","emit","props","readProps","styles","inputRef","React","dragActive","setDragActive","disabled","multiple","variant","accept","label","acceptFiles","list","selected","files","input","event","componentRootProps","mergeClasses","Button","schema","componentStylePropsSchema","normalizedFileSchema","description","eventContract","validateFileInput","runDeclarativeValidators","materializeFileInputTrial","trialNode","fileInputDefinition","defineComponent","Button","makeStyles","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","formatSize","value","bytes","FileList","node","emit","props","readProps","styles","files","removable","componentRootProps","file","index","name","url","size","Button","fileSchema","schema","componentStylePropsSchema","description","eventContract","validateFileList","runDeclarativeValidators","materializeFileListTrial","trialNode","fileListDefinition","defineComponent","React","makeStyles","mergeClasses","runDeclarativeValidators","jsx","GROWING_CONTAINER_FOLLOW_END","useStyles","makeStyles","useIsomorphicLayoutEffect","React","isGrowingContainerPinnedToEnd","metrics","threshold","shouldGrowingContainerFollowEnd","mode","pinnedToEnd","GrowingContainer","children","className","style","followEnd","ariaLabel","styles","viewportRef","contentRef","pinnedToEndRef","scrollToEnd","viewport","content","onContentResize","resizeObserver","mutationObserver","onScroll","mergeClasses","GrowingContainerPrimitive","node","requestedFollowEnd","componentRootProps","schema","componentStylePropsSchema","description","describeGrowingContainer","getGrowingContainerSchema","validateGrowingContainer","props","runDeclarativeValidators","materializeGrowingContainerTrial","trialNode","growingContainerDefinition","defineComponent","React","Button","Dialog","DialogActions","DialogBody","DialogContent","DialogSurface","DialogTitle","Input","makeStyles","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","MathChallenge","node","emit","styles","props","readProps","operandA","operandB","answer","setAnswer","React","inputRef","titleId","messageId","answered","correct","Dialog","_event","data","DialogSurface","componentRootProps","event","DialogBody","DialogTitle","DialogContent","Input","_","DialogActions","Button","schema","componentStylePropsSchema","description","eventContract","validateMathChallenge","runDeclarativeValidators","mathChallengeDefinition","defineComponent","trialNode","React","makeStyles","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","safeMarkdownHref","url","trimmed","renderInline","text","pattern","nodes","last","key","match","token","link","href","mermaidInitialized","MermaidDiagram","source","className","codeClassName","diagramId","React","svg","setSvg","active","mermaid","rendered","tableCells","line","cells","cell","escaped","character","renderBlocks","value","styles","lines","paragraph","items","ordered","fence","fenceLines","flushParagraph","flushList","children","item","index","flushFence","raw","fenceStart","headers","separator","rows","row","header","rowIndex","heading","Tag","numbered","bullet","Markdown","node","readProps","componentRootProps","schema","componentStylePropsSchema","description","validateMarkdown","props","runDeclarativeValidators","markdownDefinition","defineComponent","trialNode","makeStyles","Text","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","Metric","node","styles","props","readProps","componentRootProps","Text","schema","componentStylePropsSchema","description","validateMetric","runDeclarativeValidators","metricDefinition","defineComponent","trialNode","makeStyles","mergeClasses","tokens","runDeclarativeValidators","readProps","jsx","useStyles","makeStyles","tokens","Note","node","styles","props","readProps","tone","toneClass","componentRootProps","mergeClasses","schema","componentStylePropsSchema","description","validateNote","runDeclarativeValidators","noteDefinition","defineComponent","trialNode","makeStyles","Text","tokens","runDeclarativeValidators","readProps","jsx","jsxs","useStyles","makeStyles","tokens","Property","node","styles","props","readProps","componentRootProps","Text","schema","componentStylePropsSchema","description","validateProperty","runDeclarativeValidators","propertyDefinition","defineComponent","trialNode","React","Button","ToggleButton","makeStyles","tokens","runDeclarativeValidators","readProps","useCountdownTimer","Fragment","jsx","jsxs","TIMER_BUTTON_PACES","TIMER_BUTTON_VARIANTS","TIMER_BUTTON_APPEARANCES","TIMER_BUTTON_SIZES","useStyles","makeStyles","tokens","formatTimerButtonCountdown","remainingSeconds","seconds","minutes","duration","value","fallback","parsed","TimerButton","node","emit","props","readProps","styles","pace","setPace","React","autoOnly","effectivePace","defaultDurationMs","durationMs","disabled","showCountdown","countdownOnly","showPaceSwitch","running","externalResetKey","immediateKey","immediatelyTriggeredKey","previousResetKey","previous","current","timer","useCountdownTimer","label","countdown","ariaLabel","componentRootProps","ToggleButton","Button","schema","componentStylePropsSchema","description","eventContract","describeTimerButton","getTimerButtonSchema","validateTimerButton","runDeclarativeValidators","materializeTimerButtonTrial","trialNode","timerButtonDefinition","defineComponent","React","Checkbox","Field","List","ListItem","Text","runDeclarativeValidators","readProps","jsx","jsxs","updateTodoListValues","values","key","checked","TodoList","node","emit","props","readProps","properties","incoming","incomingSignature","setValues","React","compact","componentRootProps","Text","List","field","title","hint","ListItem","Field","Checkbox","_","data","nextValues","checkboxFieldSchema","publicSchema","withComponentStylePropsSchema","description","eventContract","validateTodoList","runDeclarativeValidators","materializeTodoListTrial","trialNode","todoListDefinition","defineComponent","primitiveComponentViews","AccessGate","Alert","Chart","CollectionBoard","ContainerPrimitive","DateTime","PaneWithTrigger","EditableTable","FileDownload","FileInput","FileList","Form","Gantt","GraphDiagram","GrowingContainerPrimitive","InfiniteCanvasPrimitive","MathChallenge","Markdown","Metric","Note","Property","SourceViewer","TimerButton","TodoList","primitiveComponentDefinitions","accessGateDefinition","alertDefinition","chartDefinition","collectionBoardDefinition","containerDefinition","dateTimeDefinition","paneWithTriggerDefinition","editableTableDefinition","fileDownloadDefinition","fileInputDefinition","fileListDefinition","formDefinition","ganttDefinition","graphDiagramDefinition","growingContainerDefinition","infiniteCanvasDefinition","mathChallengeDefinition","markdownDefinition","metricDefinition","noteDefinition","propertyDefinition","sourceViewerDefinition","timerButtonDefinition","todoListDefinition","primitiveComponentCapabilities","name","definition","api","createComponentAuthoringApi","primitiveComponentDefinitions","listPrimitiveComponents","describePrimitiveComponent","capability","validatePrimitiveComponentProps","props","materializePrimitiveComponentTrial","preflightPrimitiveComponent","getPrimitiveComponentAgentInstructions","createPrimitiveComponentAuthoringTools","components","getPrimitiveComponentAgentKit","primitiveComponentAuthoringTools"]}
|