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/shared/definition.ts","../src/shared/component-authoring-internal.ts","../src/shared/component.ts"],"sourcesContent":["import type { Json, ResolvedNode } from \"@gik-ai/kernel\";\nimport type { ProjectionView } from \"@gik-ai/react\";\n\nexport interface ComponentAuthoringGuide {\n useWhen: readonly string[];\n avoidWhen: readonly string[];\n rules: readonly string[];\n}\n\nexport interface ComponentAgentFacingMetadata {\n catalog?: {\n for?: readonly string[];\n notFor?: readonly string[];\n interaction?: string;\n };\n detail?: {\n dataProps?: Readonly<Record<string, unknown>>;\n props?: Readonly<Record<string, unknown>>;\n constraints?: readonly string[];\n notes?: readonly string[];\n example?: Readonly<Record<string, unknown>>;\n };\n}\n\nexport interface ComponentVariantDescription {\n value: string;\n summary: string;\n useWhen: readonly string[];\n}\n\nexport interface ComponentEventContract {\n summary: string;\n payloadSchema: Record<string, unknown>;\n}\n\nexport function eventContract(\n summary: string,\n properties: Record<string, unknown> = {},\n required: readonly string[] = Object.keys(properties),\n): ComponentEventContract {\n return {\n summary,\n payloadSchema: {\n type: \"object\",\n additionalProperties: false,\n ...(required.length > 0 ? { required } : {}),\n properties,\n },\n };\n}\n\nexport interface ComponentDescription {\n capability: string;\n summary: string;\n dataProp?: string;\n slots?: readonly string[];\n events: readonly string[];\n eventContracts?: Readonly<Record<string, ComponentEventContract>>;\n semanticTokens: readonly string[];\n defaultVariant?: string;\n variants: readonly ComponentVariantDescription[];\n authoring: ComponentAuthoringGuide;\n agentFacing?: ComponentAgentFacingMetadata;\n}\n\nexport interface ComponentValidationIssue {\n detail: string;\n code?: string;\n}\n\nexport interface ComponentValidationReport {\n ok: boolean;\n errors: ComponentValidationIssue[];\n warnings: ComponentValidationIssue[];\n}\n\nexport interface DeclarativeComponentDefinition {\n capability: string;\n version: string;\n summary: string;\n dataProp?: string;\n slots?: readonly string[];\n events: readonly string[];\n eventContracts: Readonly<Record<string, ComponentEventContract>>;\n semanticTokens: readonly string[];\n defaultVariant?: string;\n variants: readonly ComponentVariantDescription[];\n authoring: ComponentAuthoringGuide;\n component: ProjectionView;\n describe(): ComponentDescription;\n getSchema(): Record<string, unknown>;\n validate(props: unknown): ComponentValidationReport;\n materializeTrial(): ResolvedNode;\n}\n\nexport interface ComponentDefinitionOptions {\n description: ComponentDescription;\n version: string;\n component: ProjectionView;\n getSchema(): Record<string, unknown>;\n validate(props: unknown): ComponentValidationReport;\n materializeTrial(): ResolvedNode;\n}\n\nexport function defineComponent({\n description,\n version,\n component,\n getSchema,\n validate,\n materializeTrial,\n}: ComponentDefinitionOptions): DeclarativeComponentDefinition {\n return {\n capability: description.capability,\n version,\n summary: description.summary,\n dataProp: description.dataProp,\n slots: description.slots,\n events: description.events,\n eventContracts: description.eventContracts ?? {},\n semanticTokens: description.semanticTokens,\n defaultVariant: description.defaultVariant,\n variants: description.variants,\n authoring: description.authoring,\n component,\n describe: () => description,\n getSchema,\n validate,\n materializeTrial,\n };\n}\n\nexport function componentNode(id: string, capability: string, props: Record<string, Json>): ResolvedNode {\n return {\n id,\n capability,\n props,\n visible: true,\n fallback: false,\n children: [],\n };\n}\n\nexport function trialNode(capability: string, props: Record<string, Json>): ResolvedNode {\n return componentNode(`${capability.replace(/[^A-Za-z0-9_-]/g, \"-\")}-trial`, capability, props);\n}","import type { Json, ResolvedNode } from \"@gik-ai/kernel\";\n\nimport type {\n ComponentDescription,\n ComponentEventContract,\n ComponentValidationReport,\n DeclarativeComponentDefinition,\n} from \"./definition\";\nimport type {\n AgentFacingCapabilityCatalog,\n AgentFacingCapabilityDetail,\n AgentFacingCapabilitySelection,\n} from \"./agent-facing\";\n\nexport interface ComponentCatalogEntry {\n id: string;\n capability: string;\n version: string;\n summary: string;\n dataProp?: string;\n slots: readonly string[];\n defaultVariant?: string;\n variants: readonly string[];\n events: readonly string[];\n eventContracts: Readonly<Record<string, ComponentEventContract>>;\n}\n\nexport interface ComponentAuthoringDescription extends ComponentDescription {\n version: string;\n propsSchema: Record<string, unknown>;\n eventContracts: Readonly<Record<string, ComponentEventContract>>;\n}\n\nexport interface ComponentAuthoringTool {\n name: string;\n description: string;\n inputSchema: Record<string, unknown>;\n handler: (args: Record<string, unknown>) => unknown;\n agentSafe: true;\n}\n\nexport interface ComponentPreflightReport extends ComponentValidationReport {\n capability: string;\n effectiveVariant?: string;\n declaredEvents: readonly string[];\n eventContracts: Readonly<Record<string, ComponentEventContract>>;\n}\n\nexport interface ComponentAgentKit {\n capabilities: readonly string[];\n instructions: string;\n tools: ComponentAuthoringTool[];\n}\n\ninterface ComponentAuthoringApiConfig {\n definitions: Record<string, DeclarativeComponentDefinition>;\n kind: \"semantic\" | \"primitive\" | \"fluent\" | \"security\" | \"software\";\n toolKind: \"Semantic\" | \"Primitive\" | \"Fluent\" | \"Security\" | \"Software\";\n}\n\nconst genericProps = new Set([\"className\", \"style\", \"layout\"]);\n\nfunction schemaProperties(schema: Record<string, unknown>): Record<string, unknown> {\n const properties = schema.properties;\n return properties && typeof properties === \"object\" && !Array.isArray(properties)\n ? properties as Record<string, unknown>\n : {};\n}\n\nfunction authoredExample(definition: DeclarativeComponentDefinition): Record<string, unknown> {\n const trial = definition.materializeTrial();\n const props = Object.fromEntries(\n Object.entries(trial.props).filter(([key]) => key !== definition.dataProp && !genericProps.has(key)),\n );\n return {\n capability: definition.capability,\n ...(Object.keys(props).length > 0 ? { props } : {}),\n ...(definition.dataProp\n ? { bindings: { [definition.dataProp]: { from: \"<state-path>\" } } }\n : {}),\n };\n}\n\nexport function createAgentFacingCapabilityCatalog(\n definitions: Readonly<Record<string, DeclarativeComponentDefinition>>,\n): AgentFacingCapabilityCatalog {\n const catalog: Record<string, AgentFacingCapabilitySelection> = {};\n const details: Record<string, AgentFacingCapabilityDetail> = {};\n for (const definition of Object.values(definitions)) {\n const description = definition.describe();\n const override = description.agentFacing;\n const properties = schemaProperties(definition.getSchema());\n const dataProps = {\n ...(definition.dataProp && properties[definition.dataProp] !== undefined\n ? { [definition.dataProp]: properties[definition.dataProp] }\n : {}),\n ...(override?.detail?.dataProps ?? {}),\n };\n const props = {\n ...Object.fromEntries(Object.entries(properties).filter(([key]) =>\n key !== definition.dataProp && key !== \"variant\" && !genericProps.has(key))),\n ...(override?.detail?.props ?? {}),\n };\n const variants = Object.fromEntries(description.variants.map((variant) => [\n variant.value,\n {\n summary: variant.summary,\n useWhen: variant.useWhen,\n ...(variant.value === description.defaultVariant ? { default: true as const } : {}),\n },\n ]));\n catalog[definition.capability] = {\n for: override?.catalog?.for ?? description.authoring.useWhen,\n ...((override?.catalog?.notFor ?? description.authoring.avoidWhen).length > 0\n ? { notFor: override?.catalog?.notFor ?? description.authoring.avoidWhen }\n : {}),\n ...(override?.catalog?.interaction ? { interaction: override.catalog.interaction } : {}),\n };\n details[definition.capability] = {\n ...(Object.keys(dataProps).length > 0 ? { dataProps } : {}),\n ...(Object.keys(props).length > 0 ? { props } : {}),\n ...(Object.keys(variants).length > 0 ? { variants } : {}),\n ...(description.slots?.length ? { slots: description.slots } : {}),\n ...(description.events.length > 0 ? { emits: definition.eventContracts } : {}),\n ...((override?.detail?.constraints ?? description.authoring.rules).length > 0\n ? { constraints: override?.detail?.constraints ?? description.authoring.rules }\n : {}),\n ...(override?.detail?.notes?.length ? { notes: override.detail.notes } : {}),\n example: override?.detail?.example ?? authoredExample(definition),\n };\n }\n return { catalog, details };\n}\n\nconst objectSchema = (\n properties: Record<string, unknown>,\n required: string[] = [],\n): Record<string, unknown> => ({\n type: \"object\",\n properties,\n required,\n additionalProperties: false,\n});\n\nexport function createComponentAuthoringApi(config: ComponentAuthoringApiConfig) {\n const definitions = Object.entries(config.definitions);\n const allCapabilities = definitions.map(([, definition]) => definition.capability);\n const toolNames = {\n list: `list${config.toolKind}Components`,\n describe: `describe${config.toolKind}Component`,\n validate: `validate${config.toolKind}ComponentProps`,\n preflight: `preflight${config.toolKind}Component`,\n materialize: `materialize${config.toolKind}ComponentTrial`,\n };\n\n const findDefinition = (capability: string): [string, DeclarativeComponentDefinition] | undefined =>\n definitions.find(([id, definition]) => id === capability || definition.capability === capability);\n\n const resolveDefinition = (capability: string): DeclarativeComponentDefinition => {\n const match = findDefinition(capability);\n if (!match) throw new Error(`Unknown ${config.kind} component: ${capability}. Available capabilities: ${allCapabilities.join(\", \")}`);\n return match[1];\n };\n\n const selectDefinitions = (components?: readonly string[]): Array<[string, DeclarativeComponentDefinition]> => {\n if (components === undefined) return definitions;\n if (components.length === 0) throw new Error(`At least one ${config.kind} component is required`);\n\n const selected = new Map<string, [string, DeclarativeComponentDefinition]>();\n for (const component of components) {\n const match = findDefinition(component);\n if (!match) throw new Error(`Unknown ${config.kind} component: ${component}. Available capabilities: ${allCapabilities.join(\", \")}`);\n selected.set(match[1].capability, match);\n }\n return [...selected.values()];\n };\n\n const catalogEntries = (selected: Array<[string, DeclarativeComponentDefinition]>): ComponentCatalogEntry[] =>\n selected.map(([id, definition]) => ({\n id,\n capability: definition.capability,\n version: definition.version,\n summary: definition.summary,\n dataProp: definition.dataProp,\n slots: definition.slots ?? [],\n defaultVariant: definition.defaultVariant,\n variants: definition.variants.map((variant) => variant.value),\n events: definition.events,\n eventContracts: definition.eventContracts,\n }));\n\n const describe = (capability: string): ComponentAuthoringDescription => {\n const definition = resolveDefinition(capability);\n return {\n ...definition.describe(),\n eventContracts: definition.eventContracts,\n version: definition.version,\n propsSchema: definition.getSchema(),\n };\n };\n\n const materialize = (capability: string, variant?: string): ResolvedNode => {\n const definition = resolveDefinition(capability);\n const trial = definition.materializeTrial();\n if (variant !== undefined) trial.props.variant = variant as Json;\n const report = definition.validate(trial.props);\n if (!report.ok) throw new Error(report.errors.map((issue) => issue.detail).join(\"; \"));\n return trial;\n };\n\n const preflight = (capability: string, props: unknown): ComponentPreflightReport => {\n const definition = resolveDefinition(capability);\n const candidate = typeof props === \"object\" && props !== null ? props as Record<string, unknown> : {};\n return {\n capability: definition.capability,\n effectiveVariant: typeof candidate.variant === \"string\" ? candidate.variant : definition.defaultVariant,\n declaredEvents: definition.events,\n eventContracts: definition.eventContracts,\n ...definition.validate(props),\n };\n };\n\n const instructions = (components?: readonly string[]): string => {\n const selected = selectDefinitions(components);\n const componentSections = selected.map(([, definition]) => {\n const description = definition.describe();\n const variants = description.variants.map((variant) =>\n ` - ${variant.value}${variant.value === description.defaultVariant ? \" (default)\" : \"\"}: ${variant.summary} Use when: ${variant.useWhen.join(\"; \")}`\n ).join(\"\\n\");\n const eventContracts = Object.entries(definition.eventContracts).map(([event, contract]) =>\n ` - ${event}: ${contract.summary} Payload schema: ${JSON.stringify(contract.payloadSchema)}`\n );\n return [\n `## ${description.capability}`,\n description.summary,\n `- Data prop: ${description.dataProp ?? \"none\"}`,\n `- Slots: ${description.slots?.join(\", \") || \"none\"}`,\n `- Emitted events: ${description.events.length > 0 ? description.events.join(\", \") : \"none\"}`,\n \"- Event payload contracts:\",\n ...(eventContracts.length > 0 ? eventContracts : [\" - none\"]),\n `- Semantic tokens: ${description.semanticTokens.join(\", \")}`,\n \"- Use when:\",\n ...description.authoring.useWhen.map((rule) => ` - ${rule}`),\n \"- Avoid when:\",\n ...description.authoring.avoidWhen.map((rule) => ` - ${rule}`),\n \"- Variants:\",\n variants,\n \"- Authoring rules:\",\n ...description.authoring.rules.map((rule) => ` - ${rule}`),\n ].join(\"\\n\");\n });\n\n return [\n `# GIK ${config.toolKind} Component Authoring`,\n \"Use only the component contracts below. Their schemas are closed.\",\n `Validate candidate props with ${toolNames.validate} or ${toolNames.preflight} before committing them.`,\n \"Materialize a trial when mappings, tokens, variants, rendering, or event payload expectations change.\",\n \"Components are declarative projection leaves. They may emit declared semantic events, but they do not execute runtime behavior directly.\",\n \"Variants express stable presentation modes, not domain state, theme, or behavior. Omit variant when the default is appropriate.\",\n \"These are pure ACX authoring operations, not live AX runtime verification.\",\n ...componentSections,\n ].join(\"\\n\\n\");\n };\n\n const createTools = (components?: readonly string[]): ComponentAuthoringTool[] => {\n const selected = selectDefinitions(components);\n const selectedCapabilities = selected.map(([, definition]) => definition.capability);\n const capabilitySchema = { type: \"string\", enum: selectedCapabilities };\n const resolveSelected = (capability: string): DeclarativeComponentDefinition => {\n const match = selected.find(([id, definition]) => id === capability || definition.capability === capability);\n if (!match) throw new Error(`${config.toolKind} component ${capability} is outside this agent kit. Allowed capabilities: ${selectedCapabilities.join(\", \")}`);\n return match[1];\n };\n\n return [{\n name: toolNames.list,\n description: `List the ${config.kind} projection components assigned to this authoring context, including variants, emitted events, and event payload contracts.`,\n inputSchema: objectSchema({}),\n handler: () => catalogEntries(selected),\n agentSafe: true,\n }, {\n name: toolNames.describe,\n description: `Describe one ${config.kind} component's schema, variants, tokens, events, and agent-facing authoring guidance before using it in a bundle.`,\n inputSchema: objectSchema({ capability: capabilitySchema }, [\"capability\"]),\n handler: (args) => {\n const definition = resolveSelected(String(args.capability));\n return {\n ...definition.describe(),\n eventContracts: definition.eventContracts,\n version: definition.version,\n propsSchema: definition.getSchema(),\n };\n },\n agentSafe: true,\n }, {\n name: toolNames.validate,\n description: `Preflight candidate props against a ${config.kind} component's closed schema and declarative validators.`,\n inputSchema: objectSchema({ capability: capabilitySchema, props: { type: \"object\" } }, [\"capability\", \"props\"]),\n handler: (args) => resolveSelected(String(args.capability)).validate(args.props),\n agentSafe: true,\n }, {\n name: toolNames.preflight,\n description: \"Preflight candidate props and report validation, the effective variant, and declared events for bundle authoring.\",\n inputSchema: objectSchema({ capability: capabilitySchema, props: { type: \"object\" } }, [\"capability\", \"props\"]),\n handler: (args) => {\n const definition = resolveSelected(String(args.capability));\n const candidate = typeof args.props === \"object\" && args.props !== null ? args.props as Record<string, unknown> : {};\n return {\n capability: definition.capability,\n effectiveVariant: typeof candidate.variant === \"string\" ? candidate.variant : definition.defaultVariant,\n declaredEvents: definition.events,\n eventContracts: definition.eventContracts,\n ...definition.validate(args.props),\n } satisfies ComponentPreflightReport;\n },\n agentSafe: true,\n }, {\n name: toolNames.materialize,\n description: `Materialize a valid trial node for one ${config.kind} component and optionally select one of its declared variants.`,\n inputSchema: objectSchema({ capability: capabilitySchema, variant: { type: \"string\" } }, [\"capability\"]),\n handler: (args) => {\n const definition = resolveSelected(String(args.capability));\n const trial = definition.materializeTrial();\n if (args.variant !== undefined) trial.props.variant = String(args.variant);\n const report = definition.validate(trial.props);\n if (!report.ok) throw new Error(report.errors.map((issue) => issue.detail).join(\"; \"));\n return trial;\n },\n agentSafe: true,\n }];\n };\n\n const getKit = (components?: readonly string[]): ComponentAgentKit => {\n const selected = selectDefinitions(components);\n const capabilities = selected.map(([, definition]) => definition.capability);\n return { capabilities, instructions: instructions(capabilities), tools: createTools(capabilities) };\n };\n\n return {\n agentFacingCatalog: () => createAgentFacingCapabilityCatalog(config.definitions),\n list: () => catalogEntries(definitions),\n describe,\n validate: (capability: string, props: unknown) => resolveDefinition(capability).validate(props),\n materialize,\n preflight,\n instructions,\n createTools,\n getKit,\n };\n}","import type React from \"react\";\nimport { mergeClasses, type BadgeProps } from \"@fluentui/react-components\";\nimport type { ResolvedNode } from \"@gik-ai/kernel\";\n\nexport type DataRecord = Record<string, unknown>;\nexport type BadgeColor = NonNullable<BadgeProps[\"color\"]>;\n\nexport const componentStylePropsSchema = {\n className: { type: \"string\" },\n style: {\n type: \"object\",\n additionalProperties: { type: [\"string\", \"number\"] },\n },\n} as const;\n\nexport const componentLayoutPropsSchema = {\n layout: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n slots: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n required: [\"key\", \"slot\"],\n properties: {\n key: { type: \"string\", minLength: 1 },\n slot: { type: \"string\", minLength: 1 },\n },\n },\n },\n },\n },\n} as const;\n\nexport function withComponentStylePropsSchema<T extends { properties?: Record<string, unknown> }>(schema: T): T {\n return {\n ...schema,\n properties: { ...schema.properties, ...componentStylePropsSchema },\n };\n}\n\nexport function componentRootProps(node: ResolvedNode, ...classNames: Array<string | undefined | false>): {\n className: string | undefined;\n style: React.CSSProperties | undefined;\n} {\n const callsiteClassName = typeof node.props.className === \"string\" ? node.props.className : undefined;\n const style = node.props.style && typeof node.props.style === \"object\" && !Array.isArray(node.props.style)\n ? node.props.style as React.CSSProperties\n : undefined;\n return {\n className: mergeClasses(...classNames, callsiteClassName) || undefined,\n style,\n };\n}\n\nexport function asRecord(value: unknown): DataRecord {\n return value && typeof value === \"object\" && !Array.isArray(value) ? value as DataRecord : {};\n}\n\nexport function records(value: unknown): DataRecord[] {\n return Array.isArray(value) ? value.map(asRecord) : [];\n}\n\nexport function readPath(record: DataRecord, path: string | undefined): unknown {\n if (!path) return undefined;\n return path.split(\".\").reduce<unknown>((value, segment) => asRecord(value)[segment], record);\n}\n\nexport function textAt(record: DataRecord, path: string | undefined): string {\n const value = readPath(record, path);\n return value == null ? \"\" : String(value);\n}"],"mappings":"AAmCO,SAASA,EACdC,EACAC,EAAsC,CAAC,EACvCC,EAA8B,OAAO,KAAKD,CAAU,EAC5B,CACxB,MAAO,CACL,QAAAD,EACA,cAAe,CACb,KAAM,SACN,qBAAsB,GACtB,GAAIE,EAAS,OAAS,EAAI,CAAE,SAAAA,CAAS,EAAI,CAAC,EAC1C,WAAAD,CACF,CACF,CACF,CAuDO,SAASE,EAAgB,CAC9B,YAAAC,EACA,QAAAC,EACA,UAAAC,EACA,UAAAC,EACA,SAAAC,EACA,iBAAAC,CACF,EAA+D,CAC7D,MAAO,CACL,WAAYL,EAAY,WACxB,QAAAC,EACA,QAASD,EAAY,QACrB,SAAUA,EAAY,SACtB,MAAOA,EAAY,MACnB,OAAQA,EAAY,OACpB,eAAgBA,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MAAM,UAAY,OACtFG,EAAQH,EAAK,MAAM,OAAS,OAAOA,EAAK,MAAM,OAAU,UAAY,CAAC,MAAM,QAAQA,EAAK,MAAM,KAAK,EACrGA,EAAK,MAAM,MACX,OACJ,MAAO,CACL,UAAWN,EAAa,GAAGO,EAAYC,CAAiB,GAAK,OAC7D,MAAAC,CACF,CACF,CAEO,SAASC,EAASC,EAA4B,CACnD,OAAOA,GAAS,OAAOA,GAAU,UAAY,CAAC,MAAM,QAAQA,CAAK,EAAIA,EAAsB,CAAC,CAC9F,CAEO,SAASC,EAAQD,EAA8B,CACpD,OAAO,MAAM,QAAQA,CAAK,EAAIA,EAAM,IAAID,CAAQ,EAAI,CAAC,CACvD,CAEO,SAASG,EAASC,EAAoBC,EAAmC,CAC9E,GAAKA,EACL,OAAOA,EAAK,MAAM,GAAG,EAAE,OAAgB,CAACJ,EAAOK,IAAYN,EAASC,CAAK,EAAEK,CAAO,EAAGF,CAAM,CAC7F,CAEO,SAASG,EAAOH,EAAoBC,EAAkC,CAC3E,IAAMJ,EAAQE,EAASC,EAAQC,CAAI,EACnC,OAAOJ,GAAS,KAAO,GAAK,OAAOA,CAAK,CAC1C","names":["eventContract","summary","properties","required","defineComponent","description","version","component","getSchema","validate","materializeTrial","componentNode","id","capability","props","trialNode","genericProps","schemaProperties","schema","properties","authoredExample","definition","trial","props","key","createAgentFacingCapabilityCatalog","definitions","catalog","details","description","override","dataProps","variants","variant","objectSchema","required","createComponentAuthoringApi","config","allCapabilities","toolNames","findDefinition","capability","id","resolveDefinition","match","selectDefinitions","components","selected","component","catalogEntries","describe","materialize","report","issue","preflight","candidate","instructions","componentSections","eventContracts","event","contract","rule","createTools","selectedCapabilities","capabilitySchema","resolveSelected","args","capabilities","mergeClasses","componentStylePropsSchema","componentLayoutPropsSchema","withComponentStylePropsSchema","schema","componentRootProps","node","classNames","callsiteClassName","style","asRecord","value","records","readPath","record","path","segment","textAt"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { C as ComponentDescription, c as ComponentEventContract, d as ComponentValidationReport, D as DeclarativeComponentDefinition, A as AgentFacingCapabilityCatalog } from './agent-facing-DjAMQ4Ju.js';
|
|
2
|
+
|
|
3
|
+
interface ComponentCatalogEntry {
|
|
4
|
+
id: string;
|
|
5
|
+
capability: string;
|
|
6
|
+
version: string;
|
|
7
|
+
summary: string;
|
|
8
|
+
dataProp?: string;
|
|
9
|
+
slots: readonly string[];
|
|
10
|
+
defaultVariant?: string;
|
|
11
|
+
variants: readonly string[];
|
|
12
|
+
events: readonly string[];
|
|
13
|
+
eventContracts: Readonly<Record<string, ComponentEventContract>>;
|
|
14
|
+
}
|
|
15
|
+
interface ComponentAuthoringDescription extends ComponentDescription {
|
|
16
|
+
version: string;
|
|
17
|
+
propsSchema: Record<string, unknown>;
|
|
18
|
+
eventContracts: Readonly<Record<string, ComponentEventContract>>;
|
|
19
|
+
}
|
|
20
|
+
interface ComponentAuthoringTool {
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
inputSchema: Record<string, unknown>;
|
|
24
|
+
handler: (args: Record<string, unknown>) => unknown;
|
|
25
|
+
agentSafe: true;
|
|
26
|
+
}
|
|
27
|
+
interface ComponentPreflightReport extends ComponentValidationReport {
|
|
28
|
+
capability: string;
|
|
29
|
+
effectiveVariant?: string;
|
|
30
|
+
declaredEvents: readonly string[];
|
|
31
|
+
eventContracts: Readonly<Record<string, ComponentEventContract>>;
|
|
32
|
+
}
|
|
33
|
+
interface ComponentAgentKit {
|
|
34
|
+
capabilities: readonly string[];
|
|
35
|
+
instructions: string;
|
|
36
|
+
tools: ComponentAuthoringTool[];
|
|
37
|
+
}
|
|
38
|
+
declare function createAgentFacingCapabilityCatalog(definitions: Readonly<Record<string, DeclarativeComponentDefinition>>): AgentFacingCapabilityCatalog;
|
|
39
|
+
|
|
40
|
+
export { type ComponentAuthoringTool as C, type ComponentAgentKit as a, type ComponentAuthoringDescription as b, createAgentFacingCapabilityCatalog as c, type ComponentCatalogEntry as d, type ComponentPreflightReport as e };
|
package/dist/fluent.d.ts
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { d as ComponentValidationReport, D as DeclarativeComponentDefinition } from './agent-facing-DjAMQ4Ju.js';
|
|
2
|
+
export { e as ComponentAgentFacingMetadata, f as ComponentAuthoringGuide, g as ComponentDefinitionOptions, C as ComponentDescription, c as ComponentEventContract, h as ComponentValidationIssue, i as ComponentVariantDescription, j as componentNode, k as defineComponent, l as eventContract, t as trialNode } from './agent-facing-DjAMQ4Ju.js';
|
|
3
|
+
import * as _gik_ai_kernel from '@gik-ai/kernel';
|
|
4
|
+
import { CapabilityDescriptor } from '@gik-ai/kernel';
|
|
5
|
+
import { a as ComponentAgentKit, b as ComponentAuthoringDescription, d as ComponentCatalogEntry, e as ComponentPreflightReport, C as ComponentAuthoringTool } from './component-authoring-internal-DfFqqPhw.js';
|
|
6
|
+
import { ProjectionView, ProjectionViewProps } from '@gik-ai/react';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
|
|
9
|
+
interface FluentComponentCatalogEntry extends ComponentCatalogEntry {
|
|
10
|
+
}
|
|
11
|
+
interface FluentComponentAuthoringDescription extends ComponentAuthoringDescription {
|
|
12
|
+
}
|
|
13
|
+
interface FluentComponentPreflightReport extends ComponentPreflightReport {
|
|
14
|
+
}
|
|
15
|
+
interface FluentComponentAgentKit extends ComponentAgentKit {
|
|
16
|
+
}
|
|
17
|
+
declare const listFluentComponents: () => FluentComponentCatalogEntry[];
|
|
18
|
+
declare const describeFluentComponent: (capability: string) => FluentComponentAuthoringDescription;
|
|
19
|
+
declare const validateFluentComponentProps: (capability: string, props: unknown) => ComponentValidationReport;
|
|
20
|
+
declare const materializeFluentComponentTrial: (capability: string, variant?: string) => _gik_ai_kernel.ResolvedNode;
|
|
21
|
+
declare const preflightFluentComponent: (capability: string, props: unknown) => FluentComponentPreflightReport;
|
|
22
|
+
declare const getFluentComponentAgentInstructions: (components?: readonly string[]) => string;
|
|
23
|
+
declare const createFluentComponentAuthoringTools: (components?: readonly string[]) => ComponentAuthoringTool[];
|
|
24
|
+
declare const getFluentComponentAgentKit: (components?: readonly string[]) => FluentComponentAgentKit;
|
|
25
|
+
declare const fluentComponentAuthoringTools: ComponentAuthoringTool[];
|
|
26
|
+
|
|
27
|
+
declare const FluentButton: ProjectionView;
|
|
28
|
+
declare const fluentButtonDefinition: DeclarativeComponentDefinition;
|
|
29
|
+
|
|
30
|
+
declare const FluentTextField: ProjectionView;
|
|
31
|
+
declare const FluentTextarea: ProjectionView;
|
|
32
|
+
declare const FluentSearchbox: ProjectionView;
|
|
33
|
+
declare const FluentTabBar: ProjectionView;
|
|
34
|
+
declare const FluentChips: ProjectionView;
|
|
35
|
+
declare const fluentTextFieldDefinition: DeclarativeComponentDefinition;
|
|
36
|
+
declare const fluentTextareaDefinition: DeclarativeComponentDefinition;
|
|
37
|
+
declare const fluentSearchboxDefinition: DeclarativeComponentDefinition;
|
|
38
|
+
declare const fluentTabBarDefinition: DeclarativeComponentDefinition;
|
|
39
|
+
declare const fluentChipsDefinition: DeclarativeComponentDefinition;
|
|
40
|
+
|
|
41
|
+
declare const FluentList: ProjectionView;
|
|
42
|
+
declare const FluentTable: ProjectionView;
|
|
43
|
+
declare const FluentDataGrid: ProjectionView;
|
|
44
|
+
declare const fluentListDefinition: DeclarativeComponentDefinition;
|
|
45
|
+
declare const fluentTableDefinition: DeclarativeComponentDefinition;
|
|
46
|
+
declare const fluentDataGridDefinition: DeclarativeComponentDefinition;
|
|
47
|
+
|
|
48
|
+
declare const FluentDialog: ({ node, emit, children }: ProjectionViewProps) => React.JSX.Element;
|
|
49
|
+
declare const fluentDialogDefinition: DeclarativeComponentDefinition;
|
|
50
|
+
|
|
51
|
+
declare const FluentBadge: ProjectionView;
|
|
52
|
+
declare const FluentPersona: ProjectionView;
|
|
53
|
+
declare const FluentSpinner: ProjectionView;
|
|
54
|
+
declare const fluentBadgeDefinition: DeclarativeComponentDefinition;
|
|
55
|
+
declare const fluentPersonaDefinition: DeclarativeComponentDefinition;
|
|
56
|
+
declare const fluentSpinnerDefinition: DeclarativeComponentDefinition;
|
|
57
|
+
|
|
58
|
+
declare const FluentSwitch: ProjectionView;
|
|
59
|
+
declare const FluentToggle: ProjectionView;
|
|
60
|
+
declare const FluentDropdown: ProjectionView;
|
|
61
|
+
declare const fluentSwitchDefinition: DeclarativeComponentDefinition;
|
|
62
|
+
declare const fluentToggleDefinition: DeclarativeComponentDefinition;
|
|
63
|
+
declare const fluentDropdownDefinition: DeclarativeComponentDefinition;
|
|
64
|
+
|
|
65
|
+
declare const FluentRow: ProjectionView;
|
|
66
|
+
declare const FluentPanel: ProjectionView;
|
|
67
|
+
declare const fluentRowDefinition: DeclarativeComponentDefinition;
|
|
68
|
+
declare const fluentPanelDefinition: DeclarativeComponentDefinition;
|
|
69
|
+
|
|
70
|
+
declare const FLUENT_TEXT_VARIANTS: readonly ["body", "caption", "subtitle", "title", "display"];
|
|
71
|
+
declare const FLUENT_TEXT_ELEMENTS: readonly ["span", "p", "div", "label", "h1", "h2", "h3", "h4", "h5", "h6"];
|
|
72
|
+
declare const FluentText: ProjectionView;
|
|
73
|
+
declare const fluentTextDefinition: DeclarativeComponentDefinition;
|
|
74
|
+
|
|
75
|
+
declare const FluentToolbar: ProjectionView;
|
|
76
|
+
declare const fluentToolbarDefinition: DeclarativeComponentDefinition;
|
|
77
|
+
|
|
78
|
+
declare const fluentComponentViews: Record<string, ProjectionView>;
|
|
79
|
+
declare const fluentComponentDefinitions: {
|
|
80
|
+
readonly badge: DeclarativeComponentDefinition;
|
|
81
|
+
readonly button: DeclarativeComponentDefinition;
|
|
82
|
+
readonly chips: DeclarativeComponentDefinition;
|
|
83
|
+
readonly "data-grid": DeclarativeComponentDefinition;
|
|
84
|
+
readonly dialog: DeclarativeComponentDefinition;
|
|
85
|
+
readonly dropdown: DeclarativeComponentDefinition;
|
|
86
|
+
readonly list: DeclarativeComponentDefinition;
|
|
87
|
+
readonly panel: DeclarativeComponentDefinition;
|
|
88
|
+
readonly persona: DeclarativeComponentDefinition;
|
|
89
|
+
readonly searchbox: DeclarativeComponentDefinition;
|
|
90
|
+
readonly row: DeclarativeComponentDefinition;
|
|
91
|
+
readonly spinner: DeclarativeComponentDefinition;
|
|
92
|
+
readonly switch: DeclarativeComponentDefinition;
|
|
93
|
+
readonly table: DeclarativeComponentDefinition;
|
|
94
|
+
readonly text: DeclarativeComponentDefinition;
|
|
95
|
+
readonly "tab-bar": DeclarativeComponentDefinition;
|
|
96
|
+
readonly "text-field": DeclarativeComponentDefinition;
|
|
97
|
+
readonly textarea: DeclarativeComponentDefinition;
|
|
98
|
+
readonly toolbar: DeclarativeComponentDefinition;
|
|
99
|
+
readonly toggle: DeclarativeComponentDefinition;
|
|
100
|
+
};
|
|
101
|
+
declare const fluentComponentCapabilities: Record<string, CapabilityDescriptor>;
|
|
102
|
+
|
|
103
|
+
export { ComponentValidationReport, DeclarativeComponentDefinition, FLUENT_TEXT_ELEMENTS, FLUENT_TEXT_VARIANTS, FluentBadge, FluentButton, FluentChips, type FluentComponentAgentKit, type FluentComponentAuthoringDescription, type FluentComponentCatalogEntry, type FluentComponentPreflightReport, FluentDataGrid, FluentDialog, FluentDropdown, FluentList, FluentPanel, FluentPersona, FluentRow, FluentSearchbox, FluentSpinner, FluentSwitch, FluentTabBar, FluentTable, FluentText, FluentTextField, FluentTextarea, FluentToggle, FluentToolbar, createFluentComponentAuthoringTools, describeFluentComponent, fluentBadgeDefinition, fluentButtonDefinition, fluentChipsDefinition, fluentComponentAuthoringTools, fluentComponentCapabilities, fluentComponentDefinitions, fluentComponentViews, fluentDataGridDefinition, fluentDialogDefinition, fluentDropdownDefinition, fluentListDefinition, fluentPanelDefinition, fluentPersonaDefinition, fluentRowDefinition, fluentSearchboxDefinition, fluentSpinnerDefinition, fluentSwitchDefinition, fluentTabBarDefinition, fluentTableDefinition, fluentTextDefinition, fluentTextFieldDefinition, fluentTextareaDefinition, fluentToggleDefinition, fluentToolbarDefinition, getFluentComponentAgentInstructions, getFluentComponentAgentKit, listFluentComponents, materializeFluentComponentTrial, preflightFluentComponent, validateFluentComponentProps };
|
package/dist/fluent.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{A as I,B as J,C as K,D as L,E as M,F as N,G as U,H as V,I as W,J as X,K as Y,L as Z,M as _,N as $,O as aa,P as ba,Q as ca,R as da,a as g,b as h,c as i,d as j,e as k,f as l,g as m,h as n,i as o,j as p,k as q,l as r,m as s,n as t,o as u,p as v,q as w,r as x,s as y,t as z,u as A,v as B,w as E,x as F,y as G,z as H}from"./chunk-2I33SAGT.js";import{b as e,c as f,g as C,h as D,i as O,j as P,k as Q,l as R,m as S,n as T}from"./chunk-DNHCWSHQ.js";import{a,b,c,d}from"./chunk-XA6FE7ZK.js";export{F as FLUENT_TEXT_ELEMENTS,E as FLUENT_TEXT_VARIANTS,O as FluentBadge,e as FluentButton,k as FluentChips,y as FluentDataGrid,C as FluentDialog,s as FluentDropdown,w as FluentList,L as FluentPanel,P as FluentPersona,K as FluentRow,i as FluentSearchbox,Q as FluentSpinner,q as FluentSwitch,j as FluentTabBar,x as FluentTable,G as FluentText,g as FluentTextField,h as FluentTextarea,r as FluentToggle,I as FluentToolbar,c as componentNode,ba as createFluentComponentAuthoringTools,b as defineComponent,Y as describeFluentComponent,a as eventContract,R as fluentBadgeDefinition,f as fluentButtonDefinition,p as fluentChipsDefinition,da as fluentComponentAuthoringTools,W as fluentComponentCapabilities,V as fluentComponentDefinitions,U as fluentComponentViews,B as fluentDataGridDefinition,D as fluentDialogDefinition,v as fluentDropdownDefinition,z as fluentListDefinition,N as fluentPanelDefinition,S as fluentPersonaDefinition,M as fluentRowDefinition,n as fluentSearchboxDefinition,T as fluentSpinnerDefinition,t as fluentSwitchDefinition,o as fluentTabBarDefinition,A as fluentTableDefinition,H as fluentTextDefinition,l as fluentTextFieldDefinition,m as fluentTextareaDefinition,u as fluentToggleDefinition,J as fluentToolbarDefinition,aa as getFluentComponentAgentInstructions,ca as getFluentComponentAgentKit,X as listFluentComponents,_ as materializeFluentComponentTrial,$ as preflightFluentComponent,d as trialNode,Z as validateFluentComponentProps};
|
|
2
|
+
//# sourceMappingURL=fluent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { A as AgentFacingCapabilityCatalog, D as DeclarativeComponentDefinition } from './agent-facing-DjAMQ4Ju.js';
|
|
2
|
+
export { a as AgentFacingCapabilityDetail, b as AgentFacingCapabilitySelection, e as ComponentAgentFacingMetadata, f as ComponentAuthoringGuide, g as ComponentDefinitionOptions, C as ComponentDescription, c as ComponentEventContract, h as ComponentValidationIssue, d as ComponentValidationReport, i as ComponentVariantDescription, j as componentNode, k as defineComponent, l as eventContract, m as mergeAgentFacingCapabilityCatalogs, t as trialNode } from './agent-facing-DjAMQ4Ju.js';
|
|
3
|
+
export { C as ComponentAuthoringTool, c as createAgentFacingCapabilityCatalog } from './component-authoring-internal-DfFqqPhw.js';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import * as _gik_ai_kernel from '@gik-ai/kernel';
|
|
6
|
+
import { Json, CapabilityDescriptor } from '@gik-ai/kernel';
|
|
7
|
+
import { fluentComponentDefinitions } from './fluent.js';
|
|
8
|
+
export { FLUENT_TEXT_ELEMENTS, FLUENT_TEXT_VARIANTS, FluentBadge, FluentButton, FluentChips, FluentComponentAgentKit, FluentComponentAuthoringDescription, FluentComponentCatalogEntry, FluentComponentPreflightReport, FluentDataGrid, FluentDialog, FluentDropdown, FluentList, FluentPanel, FluentPersona, FluentRow, FluentSearchbox, FluentSpinner, FluentSwitch, FluentTabBar, FluentTable, FluentText, FluentTextField, FluentTextarea, FluentToggle, FluentToolbar, createFluentComponentAuthoringTools, describeFluentComponent, fluentBadgeDefinition, fluentButtonDefinition, fluentChipsDefinition, fluentComponentAuthoringTools, fluentComponentCapabilities, fluentComponentViews, fluentDataGridDefinition, fluentDialogDefinition, fluentDropdownDefinition, fluentListDefinition, fluentPanelDefinition, fluentPersonaDefinition, fluentRowDefinition, fluentSearchboxDefinition, fluentSpinnerDefinition, fluentSwitchDefinition, fluentTabBarDefinition, fluentTableDefinition, fluentTextDefinition, fluentTextFieldDefinition, fluentTextareaDefinition, fluentToggleDefinition, fluentToolbarDefinition, getFluentComponentAgentInstructions, getFluentComponentAgentKit, listFluentComponents, materializeFluentComponentTrial, preflightFluentComponent, validateFluentComponentProps } from './fluent.js';
|
|
9
|
+
import { primitiveComponentDefinitions } from './primitives.js';
|
|
10
|
+
export { AccessGate, Alert, CHART_KINDS, CHART_SEMANTIC_TOKENS, CHART_VARIANTS, COLLECTION_BOARD_VARIANTS, CONTAINER_ALIGNMENTS, CONTAINER_DIRECTIONS, CONTAINER_GAPS, CONTAINER_JUSTIFICATIONS, CONTAINER_VARIANTS, Chart, CollectionBoard, Container, ContainerAlignment, ContainerDirection, ContainerGap, ContainerJustification, ContainerPrimitive, ContainerProps, ContainerVariant, DATETIME_VARIANTS, DateTime, DateTimeFormatOptions, DateTimeVariant, DeclarativeInfiniteCanvasModel, DeclarativeInfiniteCanvasNode, EditableTable, FileDownload, FileInput, FileList, Form, GANTT_VARIANTS, GRAPH_DIAGRAM_TONES, GRAPH_DIAGRAM_VARIANTS, GROWING_CONTAINER_FOLLOW_END, Gantt, GanttScale, GanttSpec, GraphDiagram, GraphDiagramEdge, GraphDiagramModel, GraphDiagramNode, GrowingContainer, GrowingContainerFollowEnd, GrowingContainerPrimitive, GrowingContainerProps, GrowingContainerScrollMetrics, INFINITE_CANVAS_SEMANTIC_TOKENS, INFINITE_CANVAS_THEME_COLORS, INFINITE_CANVAS_VARIANTS, InfiniteCanvas, InfiniteCanvasNodeDescriptor, InfiniteCanvasPort, InfiniteCanvasPortMap, InfiniteCanvasPorts, InfiniteCanvasPrimitive, InfiniteCanvasProps, InfiniteCanvasRef, MAX_GANTT_TICKS, Markdown, MathChallenge, Metric, Note, PANE_WITH_TRIGGER_VARIANTS, PaneWithTrigger, PaneWithTriggerBody, PaneWithTriggerFooter, PaneWithTriggerHeader, PaneWithTriggerTrigger, PaneWithTriggerVariant, PrimitiveComponentAgentKit, PrimitiveComponentAuthoringDescription, PrimitiveComponentCatalogEntry, PrimitiveComponentPreflightReport, Property, SOURCE_VIEWER_KINDS, SOURCE_VIEWER_VARIANTS, SourceViewer, TIMER_BUTTON_APPEARANCES, TIMER_BUTTON_PACES, TIMER_BUTTON_SIZES, TIMER_BUTTON_VARIANTS, TimerButton, TimerButtonPace, TodoList, accessGateDefinition, alertDefinition, appendEditableRowOnLastRowFocus, buildGraphCanvasModel, chartDefinition, collectionBoardDefinition, committedEditableRows, containerDefinition, createPrimitiveComponentAuthoringTools, dateTimeDefinition, describeChart, describeContainer, describeGantt, describeGrowingContainer, describeInfiniteCanvas, describePrimitiveComponent, describeTimerButton, editableTableColumns, editableTableDefinition, fileDownloadDefinition, fileInputDefinition, fileListDefinition, formDefinition, formatDate, formatDateTime, formatGanttAxisCoordinate, formatGanttCoordinate, formatTime, formatTimerButtonCountdown, formatTimestamp, ganttDefinition, getChartSchema, getCollectionBoardSchema, getContainerSchema, getDateTimeSchema, getGanttSchema, getGraphDiagramSchema, getGrowingContainerSchema, getInfiniteCanvasSchema, getPrimitiveComponentAgentInstructions, getPrimitiveComponentAgentKit, getSourceViewerSchema, getTimerButtonSchema, graphDiagramDefinition, growingContainerDefinition, infiniteCanvasDefinition, isEmptyEditableRow, isGrowingContainerPinnedToEnd, listPrimitiveComponents, markdownDefinition, materializeAccessGateTrial, materializeChartTrial, materializeCollectionBoardTrial, materializeContainerTrial, materializeDateTimeTrial, materializeEditableTableTrial, materializeFileDownloadTrial, materializeFileInputTrial, materializeFileListTrial, materializeFormTrial, materializeGanttTrial, materializeGraphDiagramTrial, materializeGrowingContainerTrial, materializeInfiniteCanvasTrial, materializePaneWithTriggerTrial, materializePrimitiveComponentTrial, materializeSourceViewerTrial, materializeTimerButtonTrial, materializeTodoListTrial, mathChallengeDefinition, metricDefinition, noteDefinition, paneWithTriggerDefinition, parseGanttCoordinate, preflightPrimitiveComponent, primitiveComponentAuthoringTools, primitiveComponentCapabilities, primitiveComponentViews, propertyDefinition, safeMarkdownHref, shouldGrowingContainerFollowEnd, sourceViewerDefinition, timerButtonDefinition, todoListDefinition, updateTodoListValues, validateAccessGate, validateAlert, validateChart, validateCollectionBoard, validateContainer, validateDateTime, validateEditableTable, validateFileDownload, validateFileInput, validateFileList, validateForm, validateGantt, validateGraphDiagram, validateGrowingContainer, validateInfiniteCanvas, validateMarkdown, validateMathChallenge, validateMetric, validateNote, validatePaneWithTrigger, validatePrimitiveComponentProps, validateProperty, validateSourceViewer, validateTimerButton, validateTodoList, withTrailingEditableRow } from './primitives.js';
|
|
11
|
+
import { semanticComponentDefinitions } from './semantic.js';
|
|
12
|
+
export { ARGUMENT_SEMANTIC_TOKENS, ARGUMENT_VARIANTS, ASSESSMENT_SEMANTIC_TOKENS, ASSESSMENT_VARIANTS, Argument, Assessment, CHANGE_PROPOSAL_SEMANTIC_TOKENS, CHANGE_PROPOSAL_VARIANTS, CONSISTENCY_CASE_SEMANTIC_TOKENS, CONSISTENCY_CASE_VARIANTS, ChangeProposal, ConsistencyCase, DECISION_VARIANTS, Decision, ENTITY_SET_VARIANTS, EVENT_SERIES_VARIANTS, EVIDENCE_CASE_VARIANTS, EntitySet, EventSeries, EvidenceCase, FINDING_SET_SEMANTIC_TOKENS, FINDING_SET_VARIANTS, FindingSet, MEASURE_SET_SEMANTIC_TOKENS, MEASURE_SET_VARIANTS, MILESTONE_SEMANTIC_TOKENS, MILESTONE_VARIANTS, MeasureSet, Milestones, NARRATIVE_SEMANTIC_TOKENS, NARRATIVE_VARIANTS, Narrative, PROCESS_VARIANTS, Process, RELATIONSHIP_SET_SEMANTIC_TOKENS, RELATIONSHIP_SET_VARIANTS, RelationshipSet, SemanticComponentAgentKit, SemanticComponentAuthoringDescription, SemanticComponentCatalogEntry, SemanticComponentPreflightReport, WORK_SET_VARIANTS, WorkSet, argumentDefinition, assessmentDefinition, changeProposalDefinition, consistencyCaseDefinition, createSemanticComponentAuthoringTools, decisionDefinition, describeSemanticComponent, entitySetDefinition, eventSeriesDefinition, evidenceCaseDefinition, findingSetDefinition, getArgumentSchema, getAssessmentSchema, getChangeProposalSchema, getConsistencyCaseSchema, getFindingSetSchema, getMeasureSetSchema, getMilestonesSchema, getNarrativeSchema, getRelationshipSetSchema, getSemanticComponentAgentInstructions, getSemanticComponentAgentKit, getWorkSetSchema, listSemanticComponents, materializeArgumentTrial, materializeAssessmentTrial, materializeChangeProposalTrial, materializeConsistencyCaseTrial, materializeDecisionTrial, materializeEntitySetTrial, materializeEventSeriesTrial, materializeEvidenceCaseTrial, materializeFindingSetTrial, materializeMeasureSetTrial, materializeMilestonesTrial, materializeNarrativeTrial, materializeProcessTrial, materializeRelationshipSetTrial, materializeSemanticComponentTrial, materializeWorkSetTrial, measureSetDefinition, milestonesDefinition, narrativeDefinition, preflightSemanticComponent, processDefinition, relationshipSetDefinition, semanticComponentAuthoringTools, semanticComponentCapabilities, semanticComponentViews, validateArgument, validateAssessment, validateChangeProposal, validateConsistencyCase, validateFindingSet, validateMeasureSet, validateMilestones, validateNarrative, validateRelationshipSet, validateSemanticComponentProps, validateWorkSet, workSetDefinition } from './semantic.js';
|
|
13
|
+
import { securityComponentDefinitions } from './security.js';
|
|
14
|
+
export { ATTACK_PATH_VARIANTS, AttackPath, SecurityComponentAgentKit, SecurityComponentAuthoringDescription, SecurityComponentCatalogEntry, SecurityComponentPreflightReport, attackPathDefinition, createSecurityComponentAuthoringTools, describeSecurityComponent, getAttackPathSchema, getSecurityComponentAgentInstructions, getSecurityComponentAgentKit, listSecurityComponents, materializeAttackPathTrial, materializeSecurityComponentTrial, preflightSecurityComponent, securityComponentAuthoringTools, securityComponentCapabilities, securityComponentViews, validateAttackPath, validateSecurityComponentProps } from './security.js';
|
|
15
|
+
import { softwareComponentDefinitions } from './software.js';
|
|
16
|
+
export { SOURCE_COMPARISON_VARIANTS, SOURCE_FINDINGS_VARIANTS, SoftwareComponentAgentKit, SoftwareComponentAuthoringDescription, SoftwareComponentCatalogEntry, SoftwareComponentPreflightReport, SourceComparison, SourceFindings, createSoftwareComponentAuthoringTools, describeSoftwareComponent, getSoftwareComponentAgentInstructions, getSoftwareComponentAgentKit, listSoftwareComponents, materializeSoftwareComponentTrial, materializeSourceComparisonTrial, materializeSourceFindingsTrial, preflightSoftwareComponent, softwareComponentAuthoringTools, softwareComponentCapabilities, softwareComponentViews, sourceComparisonDefinition, sourceFindingsDefinition, validateSoftwareComponentProps, validateSourceComparison, validateSourceFindings } from './software.js';
|
|
17
|
+
import * as _gik_ai_react from '@gik-ai/react';
|
|
18
|
+
import { EffectHandlerMap, BundleContextBindings, ProviderResolver, Bundle } from '@gik-ai/react';
|
|
19
|
+
import '@xyflow/react';
|
|
20
|
+
|
|
21
|
+
type FluentComponentName = keyof typeof fluentComponentDefinitions & string;
|
|
22
|
+
type PrimitiveComponentName = keyof typeof primitiveComponentDefinitions & string;
|
|
23
|
+
type SemanticComponentName = keyof typeof semanticComponentDefinitions & string;
|
|
24
|
+
type SecurityComponentName = keyof typeof securityComponentDefinitions & string;
|
|
25
|
+
type SoftwareComponentName = keyof typeof softwareComponentDefinitions & string;
|
|
26
|
+
type GikComponentKind = `fluent:${FluentComponentName}` | `primitive:${PrimitiveComponentName}` | `semantic:${SemanticComponentName}` | `security:${SecurityComponentName}` | `software:${SoftwareComponentName}`;
|
|
27
|
+
interface GikComponentEvent {
|
|
28
|
+
kind: GikComponentKind;
|
|
29
|
+
name: string;
|
|
30
|
+
payload: Record<string, unknown>;
|
|
31
|
+
actorId?: string;
|
|
32
|
+
}
|
|
33
|
+
interface GikComponentProps {
|
|
34
|
+
kind: GikComponentKind;
|
|
35
|
+
id?: string;
|
|
36
|
+
spec?: Json;
|
|
37
|
+
data?: Json;
|
|
38
|
+
variant?: string;
|
|
39
|
+
componentProps?: Record<string, Json>;
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
onEvent?: (event: GikComponentEvent) => void | Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
declare function GikComponent({ kind, id, spec, data, variant, componentProps, children, onEvent, }: GikComponentProps): React.ReactElement;
|
|
44
|
+
|
|
45
|
+
interface GikComponentRuntimeProviderProps {
|
|
46
|
+
children: React.ReactNode;
|
|
47
|
+
state?: Record<string, Json>;
|
|
48
|
+
effectHandlers?: EffectHandlerMap;
|
|
49
|
+
contexts?: BundleContextBindings;
|
|
50
|
+
resolveProvider?: ProviderResolver;
|
|
51
|
+
resolveCapabilityDescriptors?: (from: string) => Record<string, CapabilityDescriptor> | undefined;
|
|
52
|
+
}
|
|
53
|
+
interface GikComponentRuntimeValue {
|
|
54
|
+
state: Record<string, Json>;
|
|
55
|
+
effectHandlers: EffectHandlerMap;
|
|
56
|
+
contexts: BundleContextBindings;
|
|
57
|
+
resolveProvider?: ProviderResolver;
|
|
58
|
+
resolveCapabilityDescriptors?: (from: string) => Record<string, CapabilityDescriptor> | undefined;
|
|
59
|
+
}
|
|
60
|
+
declare function GikComponentRuntimeProvider({ children, state, effectHandlers, contexts, resolveProvider, resolveCapabilityDescriptors, }: GikComponentRuntimeProviderProps): React.ReactElement;
|
|
61
|
+
interface GikComponentDeclarativeProps {
|
|
62
|
+
nodeJson: Json;
|
|
63
|
+
}
|
|
64
|
+
declare function createGikComponentDeclarativeBundle(nodeJson: Json, runtime?: Pick<GikComponentRuntimeValue, "state" | "effectHandlers" | "contexts" | "resolveCapabilityDescriptors">): Bundle;
|
|
65
|
+
declare function GikComponentDeclarative({ nodeJson }: GikComponentDeclarativeProps): React.ReactElement;
|
|
66
|
+
|
|
67
|
+
declare const componentViews: {
|
|
68
|
+
[x: string]: _gik_ai_react.ProjectionView;
|
|
69
|
+
};
|
|
70
|
+
declare const componentDefinitions: {
|
|
71
|
+
"source-findings": DeclarativeComponentDefinition;
|
|
72
|
+
"source-comparison": DeclarativeComponentDefinition;
|
|
73
|
+
"attack-path": DeclarativeComponentDefinition;
|
|
74
|
+
argument: DeclarativeComponentDefinition;
|
|
75
|
+
assessment: DeclarativeComponentDefinition;
|
|
76
|
+
"change-proposal": DeclarativeComponentDefinition;
|
|
77
|
+
"consistency-case": DeclarativeComponentDefinition;
|
|
78
|
+
"finding-set": DeclarativeComponentDefinition;
|
|
79
|
+
"measure-set": DeclarativeComponentDefinition;
|
|
80
|
+
milestones: DeclarativeComponentDefinition;
|
|
81
|
+
narrative: DeclarativeComponentDefinition;
|
|
82
|
+
"relationship-set": DeclarativeComponentDefinition;
|
|
83
|
+
"work-set": DeclarativeComponentDefinition;
|
|
84
|
+
"event-series": DeclarativeComponentDefinition;
|
|
85
|
+
process: DeclarativeComponentDefinition;
|
|
86
|
+
"entity-set": DeclarativeComponentDefinition;
|
|
87
|
+
"evidence-case": DeclarativeComponentDefinition;
|
|
88
|
+
decision: DeclarativeComponentDefinition;
|
|
89
|
+
"access-gate": DeclarativeComponentDefinition;
|
|
90
|
+
alert: DeclarativeComponentDefinition;
|
|
91
|
+
chart: DeclarativeComponentDefinition;
|
|
92
|
+
"collection-board": DeclarativeComponentDefinition;
|
|
93
|
+
container: DeclarativeComponentDefinition;
|
|
94
|
+
datetime: DeclarativeComponentDefinition;
|
|
95
|
+
"pane-with-trigger": DeclarativeComponentDefinition;
|
|
96
|
+
"editable-table": DeclarativeComponentDefinition;
|
|
97
|
+
"file-download": DeclarativeComponentDefinition;
|
|
98
|
+
"file-input": DeclarativeComponentDefinition;
|
|
99
|
+
"file-list": DeclarativeComponentDefinition;
|
|
100
|
+
form: DeclarativeComponentDefinition;
|
|
101
|
+
gantt: DeclarativeComponentDefinition;
|
|
102
|
+
"graph-diagram": DeclarativeComponentDefinition;
|
|
103
|
+
"growing-container": DeclarativeComponentDefinition;
|
|
104
|
+
"infinite-canvas": DeclarativeComponentDefinition;
|
|
105
|
+
"math-challenge": DeclarativeComponentDefinition;
|
|
106
|
+
markdown: DeclarativeComponentDefinition;
|
|
107
|
+
metric: DeclarativeComponentDefinition;
|
|
108
|
+
note: DeclarativeComponentDefinition;
|
|
109
|
+
property: DeclarativeComponentDefinition;
|
|
110
|
+
"source-viewer": DeclarativeComponentDefinition;
|
|
111
|
+
"timer-button": DeclarativeComponentDefinition;
|
|
112
|
+
"todo-list": DeclarativeComponentDefinition;
|
|
113
|
+
badge: DeclarativeComponentDefinition;
|
|
114
|
+
button: DeclarativeComponentDefinition;
|
|
115
|
+
chips: DeclarativeComponentDefinition;
|
|
116
|
+
"data-grid": DeclarativeComponentDefinition;
|
|
117
|
+
dialog: DeclarativeComponentDefinition;
|
|
118
|
+
dropdown: DeclarativeComponentDefinition;
|
|
119
|
+
list: DeclarativeComponentDefinition;
|
|
120
|
+
panel: DeclarativeComponentDefinition;
|
|
121
|
+
persona: DeclarativeComponentDefinition;
|
|
122
|
+
searchbox: DeclarativeComponentDefinition;
|
|
123
|
+
row: DeclarativeComponentDefinition;
|
|
124
|
+
spinner: DeclarativeComponentDefinition;
|
|
125
|
+
switch: DeclarativeComponentDefinition;
|
|
126
|
+
table: DeclarativeComponentDefinition;
|
|
127
|
+
text: DeclarativeComponentDefinition;
|
|
128
|
+
"tab-bar": DeclarativeComponentDefinition;
|
|
129
|
+
"text-field": DeclarativeComponentDefinition;
|
|
130
|
+
textarea: DeclarativeComponentDefinition;
|
|
131
|
+
toolbar: DeclarativeComponentDefinition;
|
|
132
|
+
toggle: DeclarativeComponentDefinition;
|
|
133
|
+
};
|
|
134
|
+
declare const componentCapabilities: {
|
|
135
|
+
[x: string]: _gik_ai_kernel.CapabilityDescriptor;
|
|
136
|
+
};
|
|
137
|
+
declare const agentFacingComponentCatalog: AgentFacingCapabilityCatalog;
|
|
138
|
+
|
|
139
|
+
export { AgentFacingCapabilityCatalog, DeclarativeComponentDefinition, GikComponent, GikComponentDeclarative, type GikComponentDeclarativeProps, type GikComponentEvent, type GikComponentKind, type GikComponentProps, GikComponentRuntimeProvider, type GikComponentRuntimeProviderProps, agentFacingComponentCatalog, componentCapabilities, componentDefinitions, componentViews, createGikComponentDeclarativeBundle, fluentComponentDefinitions, primitiveComponentDefinitions, securityComponentDefinitions, semanticComponentDefinitions, softwareComponentDefinitions };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$ as Oi,A as li,Aa as wr,B as di,Ba as br,C as Ci,Ca as g,D as ui,Da as w,E as yi,Ea as b,F as vi,Fa as Ar,G as gi,Ga as Mr,H as wi,Ha as Or,I as bi,Ia as Fr,J as Di,Ja as Ir,K as xi,Ka as Kr,L as ki,La as qr,M as Ri,Ma as zr,N as Ni,Na as Tr,O as Pi,P as Vi,Q as Gi,R as Ei,S as Ji,T as Si,U as hi,V as ji,W as Hi,X as $i,Y as Bi,Z as Ai,_ as Mi,a as Fn,aa as Fi,b as In,ba as Ii,c as Kn,ca as Qi,d as qn,da as Wi,e as zn,ea as Xi,f as Tn,fa as Yi,g as Ln,ga as Zi,h as Un,ha as er,i as _n,ia as tr,j as Qn,ja as or,k as Wn,ka as nr,l as Xn,la as ir,m as Yn,ma as rr,n as Zn,na as sr,o as ei,oa as ar,p as ti,pa as pr,q as oi,qa as mr,r as ni,ra as cr,s as ii,sa as fr,t as ri,ta as lr,u as si,ua as dr,v as ai,va as Cr,w as pi,wa as ur,x as mi,xa as yr,y as ci,ya as vr,z as fi,za as gr}from"./chunk-4BIHH7HT.js";import{a as Dr,b as xr,c as kr,d as Rr,e as Nr,f as Pr,g as D,h as x,i as k,j as cs,k as fs,l as ls,m as ds,n as Cs,o as us,p as ys,q as vs,r as gs}from"./chunk-6JMFZS2Y.js";import{a as Ki,b as qi,c as zi,d as Ti,e as Li,f as Ui,g as _i}from"./chunk-VR5CS5LA.js";import{a as Vr,b as Gr,c as Er,d as Jr,e as Sr,f as hr,g as jr,h as Hr,i as $r,j as Br,k as R,l as N,m as P,n as ws,o as bs,p as Ds,q as xs,r as ks,s as Rs,t as Ns,u as Ps,v as Vs}from"./chunk-6TBEAKS7.js";import{$ as ro,$a as Lr,A as xt,Aa as mn,B as kt,Ba as cn,C as Rt,Ca as fn,D as Nt,Da as ln,E as Pt,Ea as dn,F as Vt,Fa as Cn,G as Mt,Ga as un,H as Ot,Ha as yn,I as Ft,Ia as Rn,J as It,Ja as Nn,K as Kt,Ka as Pn,L as qt,La as Vn,M as zt,Ma as Gn,N as Tt,Na as En,O as Lt,Oa as Jn,P as Ut,Pa as Sn,Q as _t,Qa as hn,R as Qt,Ra as jn,S as Wt,Sa as Hn,T as Xt,Ta as $n,U as Yt,Ua as Bn,V as Zt,Va as An,W as eo,Wa as Mn,X as to,Xa as On,Y as oo,Ya as u,Z as no,Za as y,_ as io,_a as v,a as ze,aa as so,ab as Ur,b as Te,ba as ao,bb as _r,c as Le,ca as po,cb as Qr,d as Ue,da as mo,db as Wr,e as _e,ea as co,eb as Xr,f as Qe,fa as fo,fb as Yr,g as We,ga as lo,gb as Zr,h as Xe,ha as Co,hb as es,i as Ye,ia as zo,j as Ze,ja as To,k as et,ka as Lo,l as tt,la as Uo,m as ot,ma as _o,n as nt,na as Qo,o as it,oa as Wo,p as rt,pa as Xo,q as st,qa as Yo,r as at,ra as Zo,s as pt,sa as en,t as mt,ta as tn,u as yt,ua as on,v as vt,va as nn,w as gt,wa as rn,x as wt,xa as sn,y as bt,ya as an,z as Dt,za as pn}from"./chunk-2XVVN3LX.js";import{a as ct,b as ft,c as lt,d as dt,e as Ct,f as ut}from"./chunk-UP2OAMPY.js";import{a as ht,b as jt,c as Ht,d as $t,e as Bt,f as At,g as uo,h as yo,i as vo,j as go,k as wo,l as bo,m as Do,n as xo,o as ko,p as Ro,q as No}from"./chunk-H6T3CCU5.js";import{A as Io,B as Ko,C as qo,b as Gt,c as Et,d as Jt,e as St,l as Po,m as Vo,n as Go,o as Eo,p as Jo,q as So,r as ho,s as jo,t as Ho,u as $o,v as Bo,w as Ao,x as Mo,y as Oo,z as Fo}from"./chunk-OFWGYY7S.js";import{a as vn,b as gn,c as wn,d as bn,e as Dn,f as xn,g as kn}from"./chunk-DMIV5ZI5.js";import{A as he,B as je,C as He,D as $e,E as Be,F as Ae,G as l,H as d,I as C,J as ts,K as os,L as ns,M as is,N as rs,O as ss,P as as,Q as ps,R as ms,a as ie,b as re,c as se,d as ae,e as pe,f as me,g as ce,h as fe,i as le,j as de,k as Ce,l as ue,m as ye,n as ve,o as ge,p as we,q as be,r as De,s as xe,t as ke,u as Re,v as Ne,w as Ge,x as Ee,y as Je,z as Se}from"./chunk-2I33SAGT.js";import{b as oe,c as ne,g as Pe,h as Ve,i as Me,j as Oe,k as Fe,l as Ie,m as Ke,n as qe}from"./chunk-DNHCWSHQ.js";import{a as X,b as Y,c as Z,d as ee,e as S}from"./chunk-XA6FE7ZK.js";import{a as te}from"./chunk-GL7PGK3G.js";import A from"react";import{jsx as O}from"react/jsx-runtime";function M(e){let o=e.indexOf(":"),i=e.slice(0,o),t=e.slice(o+1),n=i==="fluent"?d[t]:i==="primitive"?y[t]:i==="semantic"?w[t]:i==="security"?x[t]:N[t];if(!n||n.capability!==e)throw new Error(`Unknown GikComponent kind: ${e}`);return n}function Hs({kind:e,id:o,spec:i,data:t,variant:n,componentProps:s,children:r,onEvent:a}){let m=A.useId(),c=M(e),p={...s};if(i!==void 0&&(p.spec=i),t!==void 0){if(!c.dataProp)throw new Error(`${e} does not declare a data prop`);p[c.dataProp]=t}n!==void 0&&(p.variant=n);let f=c.validate(p);if(!f.ok)throw new Error(`Invalid ${e} props: ${f.errors.map(J=>J.detail).join("; ")}`);let G={capability:e,id:o??`gik-component-${m}`,props:p,visible:!0,fallback:!1,children:[]},E=c.component;return O(E,{node:G,emit:(J,$={},B)=>a?.({kind:e,name:J,payload:$,actorId:B}),children:r})}import V from"react";import{authorProjectedProgram as F}from"@gik-ai/kernel";import{BundleHost as I,bundleFromJson as K}from"@gik-ai/react";import{jsx as H}from"react/jsx-runtime";var q=["assign","assignFrom","derive","invoke","route","confirm","emit"],h=V.createContext({state:{},effectHandlers:{},contexts:{}});function Ts({children:e,state:o={},effectHandlers:i={},contexts:t={},resolveProvider:n,resolveCapabilityDescriptors:s}){let r=V.useMemo(()=>({state:o,effectHandlers:i,contexts:t,resolveProvider:n,resolveCapabilityDescriptors:s}),[o,i,t,n,s]);return H(h.Provider,{value:r,children:e})}function z(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new Error("GikComponentDeclarative nodeJson must be a JSON object");let o=e;if(typeof o.id!="string"||typeof o.capability!="string")throw new Error("GikComponentDeclarative nodeJson requires string id and capability fields")}function T(e){return e.edges?.children??[]}function j(e,o){o(e);for(let i of T(e))j(i,o)}function L(e){return Object.values(e.edges?.on??{}).flat()}function U(e,o){let i=e.indexOf(":"),t=e.slice(0,i),n=e.slice(i+1);if(t==="fluent"){let r=C[n];if(r)return{layer:t,name:n,descriptor:r}}if(t==="primitive"){let r=v[n];if(r)return{layer:t,name:n,descriptor:r}}if(t==="semantic"){let r=b[n];if(r)return{layer:t,name:n,descriptor:r}}if(t==="security"){let r=k[n];if(r)return{layer:t,name:n,descriptor:r}}if(t==="software"){let r=P[n];if(r)return{layer:t,name:n,descriptor:r}}let s=o?.(t)?.[n];if(s)return{layer:t,name:n,descriptor:s};throw new Error(`GikComponentDeclarative does not recognize capability: ${e}`)}function _(e,o={state:{},effectHandlers:{},contexts:{}}){z(e);let i=e,t={},n=new Map,s=new Set;j(i,a=>{let{layer:m,name:c,descriptor:p}=U(a.capability,o.resolveCapabilityDescriptors);t[a.capability]=p;let f=n.get(m)??new Set;f.add(c),n.set(m,f);for(let G of L(a)){let E=G.do==="invoke"?G.control.tool:void 0;typeof E=="string"&&s.add(E)}});let r={version:"1.0.0",expression:"jsonata",namespaces:Object.keys(o.state),contexts:Object.keys(o.contexts),actions:q,capabilities:t,externals:{projectionViews:Object.fromEntries([...n].map(([a,m])=>[a,{from:a,use:[...m]}])),...s.size>0?{effectHandlers:[...s]}:{}}};return K({vocabulary:{gik:"0.1",type:"vocabulary",payload:r},program:F(i),state:o.state},{effectHandlers:o.effectHandlers})}function Ls({nodeJson:e}){let o=V.useContext(h),i=V.useMemo(()=>_(e,o),[e,o]),t=V.useCallback(s=>s==="fluent"?l:s==="primitive"?u:s==="semantic"?g:s==="security"?D:s==="software"?R:o.resolveProvider?.(s),[o.resolveProvider]),n=JSON.stringify([e,o.state]);return H(I,{bundle:i,resolveProvider:t,contexts:o.contexts},n)}var ta={...l,...u,...g,...D,...R},Q={...d,...y,...w,...x,...N},oa={...C,...v,...b,...k,...P},na=S(Q);export{Fn as ARGUMENT_SEMANTIC_TOKENS,In as ARGUMENT_VARIANTS,Un as ASSESSMENT_SEMANTIC_TOKENS,_n as ASSESSMENT_VARIANTS,Dr as ATTACK_PATH_VARIANTS,_e as AccessGate,Ye as Alert,Kn as Argument,Qn as Assessment,xr as AttackPath,ei as CHANGE_PROPOSAL_SEMANTIC_TOKENS,ti as CHANGE_PROPOSAL_VARIANTS,nt as CHART_KINDS,tt as CHART_SEMANTIC_TOKENS,ot as CHART_VARIANTS,ct as COLLECTION_BOARD_VARIANTS,ai as CONSISTENCY_CASE_SEMANTIC_TOKENS,pi as CONSISTENCY_CASE_VARIANTS,gt as CONTAINER_ALIGNMENTS,bt as CONTAINER_DIRECTIONS,vt as CONTAINER_GAPS,wt as CONTAINER_JUSTIFICATIONS,yt as CONTAINER_VARIANTS,oi as ChangeProposal,it as Chart,ft as CollectionBoard,mi as ConsistencyCase,Dt as Container,xt as ContainerPrimitive,ht as DATETIME_VARIANTS,vr as DECISION_VARIANTS,jt as DateTime,gr as Decision,mr as ENTITY_SET_VARIANTS,tr as EVENT_SERIES_VARIANTS,dr as EVIDENCE_CASE_VARIANTS,Yt as EditableTable,cr as EntitySet,or as EventSeries,Cr as EvidenceCase,Ci as FINDING_SET_SEMANTIC_TOKENS,ui as FINDING_SET_VARIANTS,Ee as FLUENT_TEXT_ELEMENTS,Ge as FLUENT_TEXT_VARIANTS,oo as FileDownload,so as FileInput,co as FileList,yi as FindingSet,Me as FluentBadge,oe as FluentButton,pe as FluentChips,xe as FluentDataGrid,Pe as FluentDialog,ye as FluentDropdown,be as FluentList,$e as FluentPanel,Oe as FluentPersona,He as FluentRow,se as FluentSearchbox,Fe as FluentSpinner,Ce as FluentSwitch,ae as FluentTabBar,De as FluentTable,Je as FluentText,ie as FluentTextField,re as FluentTextarea,ue as FluentToggle,he as FluentToolbar,ze as Form,uo as GANTT_VARIANTS,Ao as GRAPH_DIAGRAM_TONES,Bo as GRAPH_DIAGRAM_VARIANTS,zo as GROWING_CONTAINER_FOLLOW_END,bo as Gantt,Hs as GikComponent,Ls as GikComponentDeclarative,Ts as GikComponentRuntimeProvider,Oo as GraphDiagram,Uo as GrowingContainer,_o as GrowingContainerPrimitive,Eo as INFINITE_CANVAS_SEMANTIC_TOKENS,Po as INFINITE_CANVAS_THEME_COLORS,Go as INFINITE_CANVAS_VARIANTS,Vo as InfiniteCanvas,Jo as InfiniteCanvasPrimitive,yo as MAX_GANTT_TICKS,Di as MEASURE_SET_SEMANTIC_TOKENS,xi as MEASURE_SET_VARIANTS,Gi as MILESTONE_SEMANTIC_TOKENS,Ei as MILESTONE_VARIANTS,rn as Markdown,en as MathChallenge,ki as MeasureSet,pn as Metric,Ji as Milestones,$i as NARRATIVE_SEMANTIC_TOKENS,Bi as NARRATIVE_VARIANTS,Ai as Narrative,fn as Note,Mt as PANE_WITH_TRIGGER_VARIANTS,rr as PROCESS_VARIANTS,qt as PaneWithTrigger,It as PaneWithTriggerBody,Kt as PaneWithTriggerFooter,Ot as PaneWithTriggerHeader,Ft as PaneWithTriggerTrigger,sr as Process,Cn as Property,Ki as RELATIONSHIP_SET_SEMANTIC_TOKENS,qi as RELATIONSHIP_SET_VARIANTS,zi as RelationshipSet,Gr as SOURCE_COMPARISON_VARIANTS,Vr as SOURCE_FINDINGS_VARIANTS,gn as SOURCE_VIEWER_KINDS,vn as SOURCE_VIEWER_VARIANTS,Jr as SourceComparison,Er as SourceFindings,wn as SourceViewer,Pn as TIMER_BUTTON_APPEARANCES,Rn as TIMER_BUTTON_PACES,Vn as TIMER_BUTTON_SIZES,Nn as TIMER_BUTTON_VARIANTS,En as TimerButton,Bn as TodoList,Qi as WORK_SET_VARIANTS,Wi as WorkSet,Xe as accessGateDefinition,na as agentFacingComponentCatalog,et as alertDefinition,Wt as appendEditableRowOnLastRowFocus,Ln as argumentDefinition,Zn as assessmentDefinition,Pr as attackPathDefinition,Mo as buildGraphCanvasModel,si as changeProposalDefinition,mt as chartDefinition,ut as collectionBoardDefinition,Qt as committedEditableRows,oa as componentCapabilities,Q as componentDefinitions,Z as componentNode,ta as componentViews,di as consistencyCaseDefinition,Vt as containerDefinition,S as createAgentFacingCapabilityCatalog,as as createFluentComponentAuthoringTools,_ as createGikComponentDeclarativeBundle,Yr as createPrimitiveComponentAuthoringTools,ys as createSecurityComponentAuthoringTools,qr as createSemanticComponentAuthoringTools,Ns as createSoftwareComponentAuthoringTools,At as dateTimeDefinition,br as decisionDefinition,Y as defineComponent,rt as describeChart,kt as describeContainer,os as describeFluentComponent,xo as describeGantt,Qo as describeGrowingContainer,ho as describeInfiniteCanvas,Ur as describePrimitiveComponent,fs as describeSecurityComponent,Mr as describeSemanticComponent,bs as describeSoftwareComponent,Jn as describeTimerButton,Xt as editableTableColumns,to as editableTableDefinition,lr as entitySetDefinition,X as eventContract,ir as eventSeriesDefinition,yr as evidenceCaseDefinition,ro as fileDownloadDefinition,mo as fileInputDefinition,Co as fileListDefinition,bi as findingSetDefinition,Ie as fluentBadgeDefinition,ne as fluentButtonDefinition,de as fluentChipsDefinition,ms as fluentComponentAuthoringTools,C as fluentComponentCapabilities,d as fluentComponentDefinitions,l as fluentComponentViews,Ne as fluentDataGridDefinition,Ve as fluentDialogDefinition,we as fluentDropdownDefinition,ke as fluentListDefinition,Ae as fluentPanelDefinition,Ke as fluentPersonaDefinition,Be as fluentRowDefinition,fe as fluentSearchboxDefinition,qe as fluentSpinnerDefinition,ve as fluentSwitchDefinition,le as fluentTabBarDefinition,Re as fluentTableDefinition,Se as fluentTextDefinition,me as fluentTextFieldDefinition,ce as fluentTextareaDefinition,ge as fluentToggleDefinition,je as fluentToolbarDefinition,Ue as formDefinition,Et as formatDate,Gt as formatDateTime,wo as formatGanttAxisCoordinate,go as formatGanttCoordinate,Jt as formatTime,Gn as formatTimerButtonCountdown,St as formatTimestamp,No as ganttDefinition,qn as getArgumentSchema,Wn as getAssessmentSchema,kr as getAttackPathSchema,ni as getChangeProposalSchema,st as getChartSchema,lt as getCollectionBoardSchema,ci as getConsistencyCaseSchema,Rt as getContainerSchema,Ht as getDateTimeSchema,vi as getFindingSetSchema,ss as getFluentComponentAgentInstructions,ps as getFluentComponentAgentKit,Do as getGanttSchema,Fo as getGraphDiagramSchema,Wo as getGrowingContainerSchema,So as getInfiniteCanvasSchema,Ri as getMeasureSetSchema,Si as getMilestonesSchema,Mi as getNarrativeSchema,Xr as getPrimitiveComponentAgentInstructions,Zr as getPrimitiveComponentAgentKit,Ti as getRelationshipSetSchema,us as getSecurityComponentAgentInstructions,vs as getSecurityComponentAgentKit,Kr as getSemanticComponentAgentInstructions,zr as getSemanticComponentAgentKit,Rs as getSoftwareComponentAgentInstructions,Ps as getSoftwareComponentAgentKit,bn as getSourceViewerSchema,Sn as getTimerButtonSchema,Xi as getWorkSetSchema,qo as graphDiagramDefinition,Zo as growingContainerDefinition,$o as infiniteCanvasDefinition,Ut as isEmptyEditableRow,To as isGrowingContainerPinnedToEnd,ts as listFluentComponents,Lr as listPrimitiveComponents,cs as listSecurityComponents,Ar as listSemanticComponents,ws as listSoftwareComponents,an as markdownDefinition,We as materializeAccessGateTrial,Tn as materializeArgumentTrial,Yn as materializeAssessmentTrial,Nr as materializeAttackPathTrial,ri as materializeChangeProposalTrial,pt as materializeChartTrial,Ct as materializeCollectionBoardTrial,li as materializeConsistencyCaseTrial,Pt as materializeContainerTrial,Bt as materializeDateTimeTrial,wr as materializeDecisionTrial,eo as materializeEditableTableTrial,fr as materializeEntitySetTrial,nr as materializeEventSeriesTrial,ur as materializeEvidenceCaseTrial,io as materializeFileDownloadTrial,po as materializeFileInputTrial,lo as materializeFileListTrial,wi as materializeFindingSetTrial,is as materializeFluentComponentTrial,Le as materializeFormTrial,Ro as materializeGanttTrial,Ko as materializeGraphDiagramTrial,Yo as materializeGrowingContainerTrial,Ho as materializeInfiniteCanvasTrial,Pi as materializeMeasureSetTrial,ji as materializeMilestonesTrial,Fi as materializeNarrativeTrial,Tt as materializePaneWithTriggerTrial,Qr as materializePrimitiveComponentTrial,ar as materializeProcessTrial,Ui as materializeRelationshipSetTrial,ds as materializeSecurityComponentTrial,Fr as materializeSemanticComponentTrial,xs as materializeSoftwareComponentTrial,Hr as materializeSourceComparisonTrial,jr as materializeSourceFindingsTrial,xn as materializeSourceViewerTrial,jn as materializeTimerButtonTrial,Mn as materializeTodoListTrial,Zi as materializeWorkSetTrial,on as mathChallengeDefinition,Vi as measureSetDefinition,te as mergeAgentFacingCapabilityCatalogs,cn as metricDefinition,Hi as milestonesDefinition,Ii as narrativeDefinition,dn as noteDefinition,Lt as paneWithTriggerDefinition,vo as parseGanttCoordinate,rs as preflightFluentComponent,Wr as preflightPrimitiveComponent,Cs as preflightSecurityComponent,Ir as preflightSemanticComponent,ks as preflightSoftwareComponent,es as primitiveComponentAuthoringTools,v as primitiveComponentCapabilities,y as primitiveComponentDefinitions,u as primitiveComponentViews,pr as processDefinition,yn as propertyDefinition,_i as relationshipSetDefinition,nn as safeMarkdownHref,gs as securityComponentAuthoringTools,k as securityComponentCapabilities,x as securityComponentDefinitions,D as securityComponentViews,Tr as semanticComponentAuthoringTools,b as semanticComponentCapabilities,w as semanticComponentDefinitions,g as semanticComponentViews,Lo as shouldGrowingContainerFollowEnd,Vs as softwareComponentAuthoringTools,P as softwareComponentCapabilities,N as softwareComponentDefinitions,R as softwareComponentViews,Br as sourceComparisonDefinition,$r as sourceFindingsDefinition,kn as sourceViewerDefinition,Hn as timerButtonDefinition,On as todoListDefinition,ee as trialNode,$n as updateTodoListValues,Qe as validateAccessGate,Ze as validateAlert,zn as validateArgument,Xn as validateAssessment,Rr as validateAttackPath,ii as validateChangeProposal,at as validateChart,dt as validateCollectionBoard,fi as validateConsistencyCase,Nt as validateContainer,$t as validateDateTime,Zt as validateEditableTable,no as validateFileDownload,ao as validateFileInput,fo as validateFileList,gi as validateFindingSet,ns as validateFluentComponentProps,Te as validateForm,ko as validateGantt,Io as validateGraphDiagram,Xo as validateGrowingContainer,jo as validateInfiniteCanvas,sn as validateMarkdown,tn as validateMathChallenge,Ni as validateMeasureSet,mn as validateMetric,hi as validateMilestones,Oi as validateNarrative,ln as validateNote,zt as validatePaneWithTrigger,_r as validatePrimitiveComponentProps,un as validateProperty,Li as validateRelationshipSet,ls as validateSecurityComponentProps,Or as validateSemanticComponentProps,Ds as validateSoftwareComponentProps,hr as validateSourceComparison,Sr as validateSourceFindings,Dn as validateSourceViewer,hn as validateTimerButton,An as validateTodoList,Yi as validateWorkSet,_t as withTrailingEditableRow,er as workSetDefinition};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/GikComponent.tsx","../src/GikComponentDeclarative.tsx","../src/shared/registry.ts"],"sourcesContent":["import React from \"react\";\nimport type { Json, ResolvedNode } from \"@gik-ai/kernel\";\n\nimport { fluentComponentDefinitions } from \"./fluent/registry\";\nimport { primitiveComponentDefinitions } from \"./primitives/registry\";\nimport { semanticComponentDefinitions } from \"./semantic/registry\";\nimport { securityComponentDefinitions } from \"./security/registry\";\nimport { softwareComponentDefinitions } from \"./software/registry\";\nimport type { DeclarativeComponentDefinition } from \"./shared/definition\";\n\ntype FluentComponentName = keyof typeof fluentComponentDefinitions & string;\ntype PrimitiveComponentName = keyof typeof primitiveComponentDefinitions & string;\ntype SemanticComponentName = keyof typeof semanticComponentDefinitions & string;\ntype SecurityComponentName = keyof typeof securityComponentDefinitions & string;\ntype SoftwareComponentName = keyof typeof softwareComponentDefinitions & string;\n\nexport type GikComponentKind =\n | `fluent:${FluentComponentName}`\n | `primitive:${PrimitiveComponentName}`\n | `semantic:${SemanticComponentName}`\n | `security:${SecurityComponentName}`\n | `software:${SoftwareComponentName}`;\n\nexport interface GikComponentEvent {\n kind: GikComponentKind;\n name: string;\n payload: Record<string, unknown>;\n actorId?: string;\n}\n\nexport interface GikComponentProps {\n kind: GikComponentKind;\n id?: string;\n spec?: Json;\n data?: Json;\n variant?: string;\n componentProps?: Record<string, Json>;\n children?: React.ReactNode;\n onEvent?: (event: GikComponentEvent) => void | Promise<unknown>;\n}\n\nfunction resolveDefinition(kind: GikComponentKind): DeclarativeComponentDefinition {\n const separator = kind.indexOf(\":\");\n const layer = kind.slice(0, separator);\n const name = kind.slice(separator + 1);\n const definition = layer === \"fluent\" ? fluentComponentDefinitions[name as FluentComponentName]\n : layer === \"primitive\" ? primitiveComponentDefinitions[name as PrimitiveComponentName]\n : layer === \"semantic\" ? semanticComponentDefinitions[name as SemanticComponentName]\n : layer === \"security\" ? securityComponentDefinitions[name as SecurityComponentName]\n : softwareComponentDefinitions[name as SoftwareComponentName];\n\n if (!definition || definition.capability !== kind) {\n throw new Error(`Unknown GikComponent kind: ${kind}`);\n }\n return definition;\n}\n\nexport function GikComponent({\n kind,\n id,\n spec,\n data,\n variant,\n componentProps,\n children,\n onEvent,\n}: GikComponentProps): React.ReactElement {\n const generatedId = React.useId();\n const definition = resolveDefinition(kind);\n const props: Record<string, Json> = { ...componentProps };\n\n if (spec !== undefined) props.spec = spec;\n if (data !== undefined) {\n if (!definition.dataProp) {\n throw new Error(`${kind} does not declare a data prop`);\n }\n props[definition.dataProp] = data;\n }\n if (variant !== undefined) props.variant = variant;\n\n const validation = definition.validate(props);\n if (!validation.ok) {\n throw new Error(`Invalid ${kind} props: ${validation.errors.map((issue) => issue.detail).join(\"; \")}`);\n }\n\n const node: ResolvedNode = {\n capability: kind,\n id: id ?? `gik-component-${generatedId}`,\n props,\n visible: true,\n fallback: false,\n children: [],\n };\n const View = definition.component;\n const emit = (name: string, payload: Record<string, unknown> = {}, actorId?: string) =>\n onEvent?.({ kind, name, payload, actorId });\n\n return <View node={node} emit={emit}>{children}</View>;\n}","import React from \"react\";\nimport {\n authorProjectedProgram,\n type Action,\n type CapabilityDescriptor,\n type DocNode,\n type Json,\n type ProjectedVocabularyManifest,\n} from \"@gik-ai/kernel\";\nimport {\n BundleHost,\n bundleFromJson,\n type Bundle,\n type BundleContextBindings,\n type EffectHandlerMap,\n type ProviderResolver,\n} from \"@gik-ai/react\";\n\nimport {\n fluentComponentCapabilities,\n fluentComponentViews,\n} from \"./fluent/registry\";\nimport {\n primitiveComponentCapabilities,\n primitiveComponentViews,\n} from \"./primitives/registry\";\nimport {\n semanticComponentCapabilities,\n semanticComponentViews,\n} from \"./semantic/registry\";\nimport { securityComponentCapabilities, securityComponentViews } from \"./security/registry\";\nimport { softwareComponentCapabilities, softwareComponentViews } from \"./software/registry\";\n\nconst DECLARATIVE_ACTIONS = [\"assign\", \"assignFrom\", \"derive\", \"invoke\", \"route\", \"confirm\", \"emit\"];\n\nexport interface GikComponentRuntimeProviderProps {\n children: React.ReactNode;\n state?: Record<string, Json>;\n effectHandlers?: EffectHandlerMap;\n contexts?: BundleContextBindings;\n resolveProvider?: ProviderResolver;\n resolveCapabilityDescriptors?: (from: string) => Record<string, CapabilityDescriptor> | undefined;\n}\n\ninterface GikComponentRuntimeValue {\n state: Record<string, Json>;\n effectHandlers: EffectHandlerMap;\n contexts: BundleContextBindings;\n resolveProvider?: ProviderResolver;\n resolveCapabilityDescriptors?: (from: string) => Record<string, CapabilityDescriptor> | undefined;\n}\n\nconst GikComponentRuntimeContext = React.createContext<GikComponentRuntimeValue>({\n state: {},\n effectHandlers: {},\n contexts: {},\n});\n\nexport function GikComponentRuntimeProvider({\n children,\n state = {},\n effectHandlers = {},\n contexts = {},\n resolveProvider,\n resolveCapabilityDescriptors,\n}: GikComponentRuntimeProviderProps): React.ReactElement {\n const value = React.useMemo(\n () => ({ state, effectHandlers, contexts, resolveProvider, resolveCapabilityDescriptors }),\n [state, effectHandlers, contexts, resolveProvider, resolveCapabilityDescriptors],\n );\n return <GikComponentRuntimeContext.Provider value={value}>{children}</GikComponentRuntimeContext.Provider>;\n}\n\nexport interface GikComponentDeclarativeProps {\n nodeJson: Json;\n}\n\nfunction assertDocNode(value: Json): asserts value is Json & DocNode {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n throw new Error(\"GikComponentDeclarative nodeJson must be a JSON object\");\n }\n const candidate = value as Record<string, Json>;\n if (typeof candidate.id !== \"string\" || typeof candidate.capability !== \"string\") {\n throw new Error(\"GikComponentDeclarative nodeJson requires string id and capability fields\");\n }\n}\n\nfunction childNodes(node: DocNode): DocNode[] {\n return node.edges?.children ?? [];\n}\n\nfunction visitNodes(node: DocNode, visit: (current: DocNode) => void): void {\n visit(node);\n for (const child of childNodes(node)) visitNodes(child, visit);\n}\n\nfunction actionsIn(node: DocNode): Action[] {\n return Object.values(node.edges?.on ?? {}).flat();\n}\n\nfunction componentContract(\n capability: string,\n resolveCapabilityDescriptors?: (from: string) => Record<string, CapabilityDescriptor> | undefined,\n) {\n const separator = capability.indexOf(\":\");\n const layer = capability.slice(0, separator);\n const name = capability.slice(separator + 1);\n if (layer === \"fluent\") {\n const descriptor = fluentComponentCapabilities[name];\n if (descriptor) return { layer, name, descriptor };\n }\n if (layer === \"primitive\") {\n const descriptor = primitiveComponentCapabilities[name];\n if (descriptor) return { layer, name, descriptor };\n }\n if (layer === \"semantic\") {\n const descriptor = semanticComponentCapabilities[name];\n if (descriptor) return { layer, name, descriptor };\n }\n if (layer === \"security\") {\n const descriptor = securityComponentCapabilities[name];\n if (descriptor) return { layer, name, descriptor };\n }\n if (layer === \"software\") {\n const descriptor = softwareComponentCapabilities[name];\n if (descriptor) return { layer, name, descriptor };\n }\n const descriptor = resolveCapabilityDescriptors?.(layer)?.[name];\n if (descriptor) return { layer, name, descriptor };\n throw new Error(`GikComponentDeclarative does not recognize capability: ${capability}`);\n}\n\nexport function createGikComponentDeclarativeBundle(\n nodeJson: Json,\n runtime: Pick<GikComponentRuntimeValue, \"state\" | \"effectHandlers\" | \"contexts\" | \"resolveCapabilityDescriptors\"> = {\n state: {},\n effectHandlers: {},\n contexts: {},\n },\n): Bundle {\n assertDocNode(nodeJson);\n const root = nodeJson as unknown as DocNode;\n const capabilities: ProjectedVocabularyManifest[\"capabilities\"] = {};\n const imports = new Map<string, Set<string>>();\n const requiredEffects = new Set<string>();\n\n visitNodes(root, (node) => {\n const { layer, name, descriptor } = componentContract(node.capability, runtime.resolveCapabilityDescriptors);\n capabilities[node.capability] = descriptor;\n const names = imports.get(layer) ?? new Set<string>();\n names.add(name);\n imports.set(layer, names);\n for (const action of actionsIn(node)) {\n const tool = action.do === \"invoke\" ? action.control.tool : undefined;\n if (typeof tool === \"string\") requiredEffects.add(tool);\n }\n });\n\n const vocabulary: ProjectedVocabularyManifest = {\n version: \"1.0.0\",\n expression: \"jsonata\",\n namespaces: Object.keys(runtime.state),\n contexts: Object.keys(runtime.contexts),\n actions: DECLARATIVE_ACTIONS,\n capabilities,\n externals: {\n projectionViews: Object.fromEntries(\n [...imports].map(([layer, names]) => [layer, { from: layer, use: [...names] }]),\n ),\n ...(requiredEffects.size > 0 ? { effectHandlers: [...requiredEffects] } : {}),\n },\n };\n\n return bundleFromJson({\n vocabulary: { gik: \"0.1\", type: \"vocabulary\", payload: vocabulary },\n program: authorProjectedProgram(root),\n state: runtime.state,\n }, { effectHandlers: runtime.effectHandlers });\n}\n\nexport function GikComponentDeclarative({ nodeJson }: GikComponentDeclarativeProps): React.ReactElement {\n const runtime = React.useContext(GikComponentRuntimeContext);\n const bundle = React.useMemo(\n () => createGikComponentDeclarativeBundle(nodeJson, runtime),\n [nodeJson, runtime],\n );\n const resolveProvider = React.useCallback<ProviderResolver>((from) => {\n if (from === \"fluent\") return fluentComponentViews;\n if (from === \"primitive\") return primitiveComponentViews;\n if (from === \"semantic\") return semanticComponentViews;\n if (from === \"security\") return securityComponentViews;\n if (from === \"software\") return softwareComponentViews;\n return runtime.resolveProvider?.(from);\n }, [runtime.resolveProvider]);\n const signature = JSON.stringify([nodeJson, runtime.state]);\n\n return (\n <BundleHost\n key={signature}\n bundle={bundle}\n resolveProvider={resolveProvider}\n contexts={runtime.contexts}\n />\n );\n}","import { fluentComponentCapabilities, fluentComponentDefinitions, fluentComponentViews } from \"../fluent/registry\";\nimport { primitiveComponentCapabilities, primitiveComponentDefinitions, primitiveComponentViews } from \"../primitives/registry\";\nimport { semanticComponentCapabilities, semanticComponentDefinitions, semanticComponentViews } from \"../semantic/registry\";\nimport { securityComponentCapabilities, securityComponentDefinitions, securityComponentViews } from \"../security/registry\";\nimport { softwareComponentCapabilities, softwareComponentDefinitions, softwareComponentViews } from \"../software/registry\";\nimport { createAgentFacingCapabilityCatalog } from \"./component-authoring-internal\";\n\nexport { fluentComponentCapabilities, fluentComponentDefinitions, fluentComponentViews } from \"../fluent/registry\";\nexport { primitiveComponentCapabilities, primitiveComponentDefinitions, primitiveComponentViews } from \"../primitives/registry\";\nexport { semanticComponentCapabilities, semanticComponentDefinitions, semanticComponentViews } from \"../semantic/registry\";\nexport { securityComponentCapabilities, securityComponentDefinitions, securityComponentViews } from \"../security/registry\";\nexport { softwareComponentCapabilities, softwareComponentDefinitions, softwareComponentViews } from \"../software/registry\";\n\nexport const componentViews = { ...fluentComponentViews, ...primitiveComponentViews, ...semanticComponentViews, ...securityComponentViews, ...softwareComponentViews };\nexport const componentDefinitions = { ...fluentComponentDefinitions, ...primitiveComponentDefinitions, ...semanticComponentDefinitions, ...securityComponentDefinitions, ...softwareComponentDefinitions };\nexport const componentCapabilities = { ...fluentComponentCapabilities, ...primitiveComponentCapabilities, ...semanticComponentCapabilities, ...securityComponentCapabilities, ...softwareComponentCapabilities };\nexport const agentFacingComponentCatalog = createAgentFacingCapabilityCatalog(componentDefinitions);"],"mappings":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D,CACtG,IAAMC,EAAU9B,EAAM,WAAWD,CAA0B,EACrD2C,EAAS1C,EAAM,QACnB,IAAM4B,EAAoCC,EAAUC,CAAO,EAC3D,CAACD,EAAUC,CAAO,CACpB,EACMxB,EAAkBN,EAAM,YAA+B2C,GACvDA,IAAS,SAAiBC,EAC1BD,IAAS,YAAoBE,EAC7BF,IAAS,WAAmBG,EAC5BH,IAAS,WAAmBI,EAC5BJ,IAAS,WAAmBK,EACzBlB,EAAQ,kBAAkBa,CAAI,EACpC,CAACb,EAAQ,eAAe,CAAC,EACtBmB,EAAY,KAAK,UAAU,CAACpB,EAAUC,EAAQ,KAAK,CAAC,EAE1D,OACEjC,EAACqD,EAAA,CAEC,OAAQR,EACR,gBAAiBpC,EACjB,SAAUwB,EAAQ,UAHbmB,CAIP,CAEJ,CC/LO,IAAME,GAAiB,CAAE,GAAGC,EAAsB,GAAGC,EAAyB,GAAGC,EAAwB,GAAGC,EAAwB,GAAGC,CAAuB,EACxJC,EAAuB,CAAE,GAAGC,EAA4B,GAAGC,EAA+B,GAAGC,EAA8B,GAAGC,EAA8B,GAAGC,CAA6B,EAC5LC,GAAwB,CAAE,GAAGC,EAA6B,GAAGC,EAAgC,GAAGC,EAA+B,GAAGC,EAA+B,GAAGC,CAA8B,EAClMC,GAA8BC,EAAmCb,CAAoB","names":["React","jsx","resolveDefinition","kind","separator","layer","name","definition","fluentComponentDefinitions","primitiveComponentDefinitions","semanticComponentDefinitions","securityComponentDefinitions","softwareComponentDefinitions","GikComponent","id","spec","data","variant","componentProps","children","onEvent","generatedId","React","props","validation","issue","node","View","payload","actorId","React","authorProjectedProgram","BundleHost","bundleFromJson","jsx","DECLARATIVE_ACTIONS","GikComponentRuntimeContext","React","GikComponentRuntimeProvider","children","state","effectHandlers","contexts","resolveProvider","resolveCapabilityDescriptors","value","assertDocNode","candidate","childNodes","node","visitNodes","visit","child","actionsIn","componentContract","capability","separator","layer","name","descriptor","fluentComponentCapabilities","primitiveComponentCapabilities","semanticComponentCapabilities","securityComponentCapabilities","softwareComponentCapabilities","createGikComponentDeclarativeBundle","nodeJson","runtime","root","capabilities","imports","requiredEffects","names","action","tool","vocabulary","bundleFromJson","authorProjectedProgram","GikComponentDeclarative","bundle","from","fluentComponentViews","primitiveComponentViews","semanticComponentViews","securityComponentViews","softwareComponentViews","signature","BundleHost","componentViews","fluentComponentViews","primitiveComponentViews","semanticComponentViews","securityComponentViews","softwareComponentViews","componentDefinitions","fluentComponentDefinitions","primitiveComponentDefinitions","semanticComponentDefinitions","securityComponentDefinitions","softwareComponentDefinitions","componentCapabilities","fluentComponentCapabilities","primitiveComponentCapabilities","semanticComponentCapabilities","securityComponentCapabilities","softwareComponentCapabilities","agentFacingComponentCatalog","createAgentFacingCapabilityCatalog"]}
|