@flanksource/clicky-ui 0.3.41 → 0.3.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +4 -0
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +4 -0
- package/dist/ai.js.map +1 -1
- package/dist/comments/CommentCard.cjs +3 -1
- package/dist/comments/CommentCard.cjs.map +1 -1
- package/dist/comments/CommentCard.d.ts.map +1 -1
- package/dist/comments/CommentCard.js +4 -2
- package/dist/comments/CommentCard.js.map +1 -1
- package/dist/comments/CommentCardParts.cjs +16 -0
- package/dist/comments/CommentCardParts.cjs.map +1 -1
- package/dist/comments/CommentCardParts.d.ts +4 -1
- package/dist/comments/CommentCardParts.d.ts.map +1 -1
- package/dist/comments/CommentCardParts.js +16 -0
- package/dist/comments/CommentCardParts.js.map +1 -1
- package/dist/comments/comment-types.cjs.map +1 -1
- package/dist/comments/comment-types.d.ts +4 -0
- package/dist/comments/comment-types.d.ts.map +1 -1
- package/dist/comments/comment-types.js.map +1 -1
- package/dist/components/Combobox.cjs +54 -8
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +56 -10
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +139 -113
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.d.ts +3 -1
- package/dist/components/ComboboxMenu.d.ts.map +1 -1
- package/dist/components/ComboboxMenu.js +139 -113
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/ComboboxMenuTrigger.cjs +87 -0
- package/dist/components/ComboboxMenuTrigger.cjs.map +1 -0
- package/dist/components/ComboboxMenuTrigger.d.ts +23 -0
- package/dist/components/ComboboxMenuTrigger.d.ts.map +1 -0
- package/dist/components/ComboboxMenuTrigger.js +87 -0
- package/dist/components/ComboboxMenuTrigger.js.map +1 -0
- package/dist/components/JsonSchemaForm.cjs +30 -7
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +30 -7
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +20 -3
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts +11 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +21 -4
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/combobox-types.d.ts +8 -0
- package/dist/components/combobox-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-debug-badge.cjs +108 -0
- package/dist/components/json-schema-form-debug-badge.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-badge.d.ts +10 -0
- package/dist/components/json-schema-form-debug-badge.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-badge.js +108 -0
- package/dist/components/json-schema-form-debug-badge.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs +129 -0
- package/dist/components/json-schema-form-debug-glyph-map.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.d.ts +20 -0
- package/dist/components/json-schema-form-debug-glyph-map.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-glyph-map.js +129 -0
- package/dist/components/json-schema-form-debug-glyph-map.js.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.cjs +13 -0
- package/dist/components/json-schema-form-debug-glyph.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.d.ts +6 -0
- package/dist/components/json-schema-form-debug-glyph.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-glyph.js +13 -0
- package/dist/components/json-schema-form-debug-glyph.js.map +1 -0
- package/dist/components/json-schema-form-debug-groups.cjs +56 -0
- package/dist/components/json-schema-form-debug-groups.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-groups.d.ts +8 -0
- package/dist/components/json-schema-form-debug-groups.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-groups.js +56 -0
- package/dist/components/json-schema-form-debug-groups.js.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.cjs +159 -0
- package/dist/components/json-schema-form-debug-keywords.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.d.ts +6 -0
- package/dist/components/json-schema-form-debug-keywords.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-keywords.js +159 -0
- package/dist/components/json-schema-form-debug-keywords.js.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.cjs +102 -0
- package/dist/components/json-schema-form-debug-listeners.cjs.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.d.ts +6 -0
- package/dist/components/json-schema-form-debug-listeners.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug-listeners.js +102 -0
- package/dist/components/json-schema-form-debug-listeners.js.map +1 -0
- package/dist/components/json-schema-form-debug.cjs +31 -0
- package/dist/components/json-schema-form-debug.cjs.map +1 -0
- package/dist/components/json-schema-form-debug.d.ts +11 -0
- package/dist/components/json-schema-form-debug.d.ts.map +1 -0
- package/dist/components/json-schema-form-debug.js +31 -0
- package/dist/components/json-schema-form-debug.js.map +1 -0
- package/dist/components/json-schema-form-enum-choice.cjs +114 -0
- package/dist/components/json-schema-form-enum-choice.cjs.map +1 -0
- package/dist/components/json-schema-form-enum-choice.d.ts +14 -0
- package/dist/components/json-schema-form-enum-choice.d.ts.map +1 -0
- package/dist/components/json-schema-form-enum-choice.js +114 -0
- package/dist/components/json-schema-form-enum-choice.js.map +1 -0
- package/dist/components/json-schema-form-fields.cjs +3 -93
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +1 -91
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-listeners.cjs +7 -1
- package/dist/components/json-schema-form-listeners.cjs.map +1 -1
- package/dist/components/json-schema-form-listeners.d.ts.map +1 -1
- package/dist/components/json-schema-form-listeners.js +7 -1
- package/dist/components/json-schema-form-listeners.js.map +1 -1
- package/dist/components/json-schema-form-preferences.cjs +1 -0
- package/dist/components/json-schema-form-preferences.cjs.map +1 -1
- package/dist/components/json-schema-form-preferences.d.ts +1 -0
- package/dist/components/json-schema-form-preferences.d.ts.map +1 -1
- package/dist/components/json-schema-form-preferences.js +1 -0
- package/dist/components/json-schema-form-preferences.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +21 -5
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +21 -5
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +1 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-tone.cjs +12 -0
- package/dist/components/json-schema-form-tone.cjs.map +1 -1
- package/dist/components/json-schema-form-tone.js +12 -0
- package/dist/components/json-schema-form-tone.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +1 -0
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/data/GraphDiagram.cjs +125 -138
- package/dist/data/GraphDiagram.cjs.map +1 -1
- package/dist/data/GraphDiagram.d.ts +30 -23
- package/dist/data/GraphDiagram.d.ts.map +1 -1
- package/dist/data/GraphDiagram.js +128 -141
- package/dist/data/GraphDiagram.js.map +1 -1
- package/dist/data/GraphDiagramEdges.cjs +208 -0
- package/dist/data/GraphDiagramEdges.cjs.map +1 -0
- package/dist/data/GraphDiagramEdges.d.ts +40 -0
- package/dist/data/GraphDiagramEdges.d.ts.map +1 -0
- package/dist/data/GraphDiagramEdges.js +208 -0
- package/dist/data/GraphDiagramEdges.js.map +1 -0
- package/dist/data/GraphDiagramNodes.cjs +142 -0
- package/dist/data/GraphDiagramNodes.cjs.map +1 -0
- package/dist/data/GraphDiagramNodes.d.ts +22 -0
- package/dist/data/GraphDiagramNodes.d.ts.map +1 -0
- package/dist/data/GraphDiagramNodes.js +142 -0
- package/dist/data/GraphDiagramNodes.js.map +1 -0
- package/dist/data/ai/PromptRunEditor/RuntimeRows.cjs +8 -3
- package/dist/data/ai/PromptRunEditor/RuntimeRows.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/RuntimeRows.js +8 -3
- package/dist/data/ai/PromptRunEditor/RuntimeRows.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.cjs +37 -43
- package/dist/data/ai/PromptRunEditor/index.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts +3 -1
- package/dist/data/ai/PromptRunEditor/index.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/index.js +38 -44
- package/dist/data/ai/PromptRunEditor/index.js.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs +16 -5
- package/dist/data/ai/PromptRunEditor/runtimeActions.cjs.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts +4 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.d.ts.map +1 -1
- package/dist/data/ai/PromptRunEditor/runtimeActions.js +17 -6
- package/dist/data/ai/PromptRunEditor/runtimeActions.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.cjs +12 -0
- package/dist/data/ai/SessionInspector.approvals-model.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.d.ts +11 -2
- package/dist/data/ai/SessionInspector.approvals-model.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.approvals-model.js +12 -0
- package/dist/data/ai/SessionInspector.approvals-model.js.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.cjs +25 -1
- package/dist/data/ai/SessionInspector.approvals.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.approvals.js +26 -2
- package/dist/data/ai/SessionInspector.approvals.js.map +1 -1
- package/dist/data/ai/SessionInspector.summary.cjs +9 -3
- package/dist/data/ai/SessionInspector.summary.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.summary.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.summary.js +9 -3
- package/dist/data/ai/SessionInspector.summary.js.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.cjs +4 -0
- package/dist/data/ai/SessionInspector.transcript.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.js +4 -0
- package/dist/data/ai/SessionInspector.transcript.js.map +1 -1
- package/dist/data/ai/SessionViewer.approval-body.cjs +146 -0
- package/dist/data/ai/SessionViewer.approval-body.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.d.ts +11 -0
- package/dist/data/ai/SessionViewer.approval-body.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.approval-body.js +146 -0
- package/dist/data/ai/SessionViewer.approval-body.js.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.cjs +150 -0
- package/dist/data/ai/SessionViewer.approval-forms.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.d.ts +23 -0
- package/dist/data/ai/SessionViewer.approval-forms.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.approval-forms.js +150 -0
- package/dist/data/ai/SessionViewer.approval-forms.js.map +1 -0
- package/dist/data/ai/SessionViewer.cjs +57 -20
- package/dist/data/ai/SessionViewer.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.d.ts +13 -3
- package/dist/data/ai/SessionViewer.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.decision-controls.cjs +313 -0
- package/dist/data/ai/SessionViewer.decision-controls.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.decision-controls.d.ts +43 -0
- package/dist/data/ai/SessionViewer.decision-controls.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.decision-controls.js +313 -0
- package/dist/data/ai/SessionViewer.decision-controls.js.map +1 -0
- package/dist/data/ai/SessionViewer.decision.cjs +21 -0
- package/dist/data/ai/SessionViewer.decision.cjs.map +1 -0
- package/dist/data/ai/SessionViewer.decision.d.ts +12 -0
- package/dist/data/ai/SessionViewer.decision.d.ts.map +1 -0
- package/dist/data/ai/SessionViewer.decision.js +21 -0
- package/dist/data/ai/SessionViewer.decision.js.map +1 -0
- package/dist/data/ai/SessionViewer.input.cjs +14 -0
- package/dist/data/ai/SessionViewer.input.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.input.d.ts +5 -0
- package/dist/data/ai/SessionViewer.input.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.input.js +14 -0
- package/dist/data/ai/SessionViewer.input.js.map +1 -1
- package/dist/data/ai/SessionViewer.js +58 -21
- package/dist/data/ai/SessionViewer.js.map +1 -1
- package/dist/data/ai/SessionViewer.model.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.model.d.ts +4 -0
- package/dist/data/ai/SessionViewer.model.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.model.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +6 -3
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts +2 -1
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +6 -3
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.cjs +29 -237
- package/dist/data/ai/SessionViewer.tool-row.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.js +27 -235
- package/dist/data/ai/SessionViewer.tool-row.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +4 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.cjs +8 -2
- package/dist/data/ai/SessionViewerMenu.cjs.map +1 -1
- package/dist/data/ai/SessionViewerMenu.d.ts +4 -1
- package/dist/data/ai/SessionViewerMenu.d.ts.map +1 -1
- package/dist/data/ai/SessionViewerMenu.js +8 -2
- package/dist/data/ai/SessionViewerMenu.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs +28 -17
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts +10 -2
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js +29 -18
- package/dist/data/ai/SpecRuntimeEditor/CommitSection.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs +9 -1
- package/dist/data/ai/SpecRuntimeEditor/index.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts +9 -2
- package/dist/data/ai/SpecRuntimeEditor/index.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js +9 -1
- package/dist/data/ai/SpecRuntimeEditor/index.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.cjs +1 -1
- package/dist/data/ai/SpecRuntimeEditor/permission-mode-visuals.js +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts +8 -2
- package/dist/data/ai/SpecRuntimeEditor/summaries.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/summaries.js.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.cjs +14 -6
- package/dist/data/ai/SpecRuntimeEditor/update.cjs.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts +1 -0
- package/dist/data/ai/SpecRuntimeEditor/update.d.ts.map +1 -1
- package/dist/data/ai/SpecRuntimeEditor/update.js +14 -6
- package/dist/data/ai/SpecRuntimeEditor/update.js.map +1 -1
- package/dist/data/ai/approval-request.cjs +75 -0
- package/dist/data/ai/approval-request.cjs.map +1 -0
- package/dist/data/ai/approval-request.d.ts +155 -0
- package/dist/data/ai/approval-request.d.ts.map +1 -0
- package/dist/data/ai/approval-request.js +75 -0
- package/dist/data/ai/approval-request.js.map +1 -0
- package/dist/data/ai/index.d.ts +3 -0
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.cjs +125 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.d.ts +11 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.js +125 -0
- package/dist/data/ai/runtime-preset-menu/SavePresetDialog.js.map +1 -0
- package/dist/data/ai/runtime-preset-menu/index.d.ts +3 -0
- package/dist/data/ai/runtime-preset-menu/index.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.cjs +73 -0
- package/dist/data/ai/runtime-preset-menu/model.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.d.ts +13 -0
- package/dist/data/ai/runtime-preset-menu/model.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/model.js +73 -0
- package/dist/data/ai/runtime-preset-menu/model.js.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.cjs +149 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.cjs.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.d.ts +15 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.d.ts.map +1 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.js +149 -0
- package/dist/data/ai/runtime-preset-menu/use-runtime-preset-menu.js.map +1 -0
- package/dist/data/ai/runtime-spec-fields.cjs +166 -0
- package/dist/data/ai/runtime-spec-fields.cjs.map +1 -0
- package/dist/data/ai/runtime-spec-fields.d.ts +13 -0
- package/dist/data/ai/runtime-spec-fields.d.ts.map +1 -0
- package/dist/data/ai/runtime-spec-fields.js +166 -0
- package/dist/data/ai/runtime-spec-fields.js.map +1 -0
- package/dist/data/ai/session-categories.cjs +4 -0
- package/dist/data/ai/session-categories.cjs.map +1 -1
- package/dist/data/ai/session-categories.d.ts +1 -0
- package/dist/data/ai/session-categories.d.ts.map +1 -1
- package/dist/data/ai/session-categories.js +4 -0
- package/dist/data/ai/session-categories.js.map +1 -1
- package/dist/data/ai/use-session-scroll.cjs +49 -21
- package/dist/data/ai/use-session-scroll.cjs.map +1 -1
- package/dist/data/ai/use-session-scroll.d.ts +2 -0
- package/dist/data/ai/use-session-scroll.d.ts.map +1 -1
- package/dist/data/ai/use-session-scroll.js +49 -21
- package/dist/data/ai/use-session-scroll.js.map +1 -1
- package/dist/data/chat/Chat.runtime.cjs +1 -1
- package/dist/data/chat/Chat.runtime.cjs.map +1 -1
- package/dist/data/chat/Chat.runtime.d.ts.map +1 -1
- package/dist/data/chat/Chat.runtime.js +1 -1
- package/dist/data/chat/Chat.runtime.js.map +1 -1
- package/dist/data/graph-columns-layout.cjs +216 -0
- package/dist/data/graph-columns-layout.cjs.map +1 -0
- package/dist/data/graph-columns-layout.d.ts +56 -0
- package/dist/data/graph-columns-layout.d.ts.map +1 -0
- package/dist/data/graph-columns-layout.js +216 -0
- package/dist/data/graph-columns-layout.js.map +1 -0
- package/dist/data/graph-diagram-model.cjs +73 -0
- package/dist/data/graph-diagram-model.cjs.map +1 -0
- package/dist/data/graph-diagram-model.d.ts +90 -0
- package/dist/data/graph-diagram-model.d.ts.map +1 -0
- package/dist/data/graph-diagram-model.js +73 -0
- package/dist/data/graph-diagram-model.js.map +1 -0
- package/dist/data/graph-edge-routing.cjs +235 -0
- package/dist/data/graph-edge-routing.cjs.map +1 -0
- package/dist/data/graph-edge-routing.d.ts +73 -0
- package/dist/data/graph-edge-routing.d.ts.map +1 -0
- package/dist/data/graph-edge-routing.js +235 -0
- package/dist/data/graph-edge-routing.js.map +1 -0
- package/dist/data/graph-layout.cjs +0 -82
- package/dist/data/graph-layout.cjs.map +1 -1
- package/dist/data/graph-layout.d.ts +1 -28
- package/dist/data/graph-layout.d.ts.map +1 -1
- package/dist/data/graph-layout.js +1 -83
- package/dist/data/graph-layout.js.map +1 -1
- package/dist/data/har/HarPanel.cjs +129 -33
- package/dist/data/har/HarPanel.cjs.map +1 -1
- package/dist/data/har/HarPanel.d.ts +13 -1
- package/dist/data/har/HarPanel.d.ts.map +1 -1
- package/dist/data/har/HarPanel.js +130 -34
- package/dist/data/har/HarPanel.js.map +1 -1
- package/dist/data/har/fixtures.d.ts +12 -0
- package/dist/data/har/fixtures.d.ts.map +1 -1
- package/dist/data/har/types.d.ts +12 -0
- package/dist/data/har/types.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.cjs +67 -84
- package/dist/data/runtime/RuntimeBar.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBar.d.ts +4 -5
- package/dist/data/runtime/RuntimeBar.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBar.fields.cjs +170 -0
- package/dist/data/runtime/RuntimeBar.fields.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.fields.d.ts +16 -0
- package/dist/data/runtime/RuntimeBar.fields.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.fields.js +170 -0
- package/dist/data/runtime/RuntimeBar.fields.js.map +1 -0
- package/dist/data/runtime/RuntimeBar.js +70 -87
- package/dist/data/runtime/RuntimeBar.js.map +1 -1
- package/dist/data/runtime/RuntimeBar.selection.cjs +56 -0
- package/dist/data/runtime/RuntimeBar.selection.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBar.selection.d.ts +20 -0
- package/dist/data/runtime/RuntimeBar.selection.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBar.selection.js +56 -0
- package/dist/data/runtime/RuntimeBar.selection.js.map +1 -0
- package/dist/data/runtime/RuntimeBarActions.cjs +10 -6
- package/dist/data/runtime/RuntimeBarActions.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts +8 -1
- package/dist/data/runtime/RuntimeBarActions.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarActions.js +10 -6
- package/dist/data/runtime/RuntimeBarActions.js.map +1 -1
- package/dist/data/runtime/RuntimeBarIdentity.cjs +166 -0
- package/dist/data/runtime/RuntimeBarIdentity.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarIdentity.d.ts +25 -0
- package/dist/data/runtime/RuntimeBarIdentity.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarIdentity.js +166 -0
- package/dist/data/runtime/RuntimeBarIdentity.js.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.cjs +95 -0
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.d.ts +9 -0
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeBarLayout.js +95 -0
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -0
- package/dist/data/runtime/RuntimeBarSegment.cjs +25 -14
- package/dist/data/runtime/RuntimeBarSegment.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.d.ts +4 -0
- package/dist/data/runtime/RuntimeBarSegment.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarSegment.js +25 -14
- package/dist/data/runtime/RuntimeBarSegment.js.map +1 -1
- package/dist/data/runtime/RuntimeLimitInput.cjs +41 -0
- package/dist/data/runtime/RuntimeLimitInput.cjs.map +1 -0
- package/dist/data/runtime/RuntimeLimitInput.d.ts +9 -0
- package/dist/data/runtime/RuntimeLimitInput.d.ts.map +1 -0
- package/dist/data/runtime/RuntimeLimitInput.js +41 -0
- package/dist/data/runtime/RuntimeLimitInput.js.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.cjs +70 -0
- package/dist/data/runtime/use-runtime-bar-overflow.cjs.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts +13 -0
- package/dist/data/runtime/use-runtime-bar-overflow.d.ts.map +1 -0
- package/dist/data/runtime/use-runtime-bar-overflow.js +70 -0
- package/dist/data/runtime/use-runtime-bar-overflow.js.map +1 -0
- package/dist/data/use-edge-focus.cjs +20 -0
- package/dist/data/use-edge-focus.cjs.map +1 -0
- package/dist/data/use-edge-focus.d.ts +23 -0
- package/dist/data/use-edge-focus.d.ts.map +1 -0
- package/dist/data/use-edge-focus.js +20 -0
- package/dist/data/use-edge-focus.js.map +1 -0
- package/dist/data/use-pan-zoom.cjs +159 -0
- package/dist/data/use-pan-zoom.cjs.map +1 -0
- package/dist/data/use-pan-zoom.d.ts +79 -0
- package/dist/data/use-pan-zoom.d.ts.map +1 -0
- package/dist/data/use-pan-zoom.js +159 -0
- package/dist/data/use-pan-zoom.js.map +1 -0
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +5 -1
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +4 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +6 -2
- package/dist/data.js.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/overlay/DropdownMenu.cjs +1 -0
- package/dist/overlay/DropdownMenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenu.d.ts +4 -0
- package/dist/overlay/DropdownMenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenu.js +1 -0
- package/dist/overlay/DropdownMenu.js.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.cjs +31 -15
- package/dist/overlay/DropdownMenuSubmenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.js +31 -15
- package/dist/overlay/DropdownMenuSubmenu.js.map +1 -1
- package/dist/rpc/OperationCatalog.cjs +3 -1
- package/dist/rpc/OperationCatalog.cjs.map +1 -1
- package/dist/rpc/OperationCatalog.d.ts +3 -1
- package/dist/rpc/OperationCatalog.d.ts.map +1 -1
- package/dist/rpc/OperationCatalog.js +3 -1
- package/dist/rpc/OperationCatalog.js.map +1 -1
- package/dist/rpc/useOperationPages.cjs +6 -1
- package/dist/rpc/useOperationPages.cjs.map +1 -1
- package/dist/rpc/useOperationPages.d.ts +3 -1
- package/dist/rpc/useOperationPages.d.ts.map +1 -1
- package/dist/rpc/useOperationPages.js +6 -1
- package/dist/rpc/useOperationPages.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/schemas/json-schema-form.schema.json +5 -0
- package/dist/data/runtime/RuntimeBarCombo.cjs +0 -423
- package/dist/data/runtime/RuntimeBarCombo.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarCombo.d.ts +0 -33
- package/dist/data/runtime/RuntimeBarCombo.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarCombo.js +0 -423
- package/dist/data/runtime/RuntimeBarCombo.js.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.cjs +0 -262
- package/dist/data/runtime/RuntimeBarLimits.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.d.ts +0 -17
- package/dist/data/runtime/RuntimeBarLimits.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarLimits.js +0 -262
- package/dist/data/runtime/RuntimeBarLimits.js.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.cjs +0 -346
- package/dist/data/runtime/RuntimeBarSegments.cjs.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.d.ts +0 -37
- package/dist/data/runtime/RuntimeBarSegments.d.ts.map +0 -1
- package/dist/data/runtime/RuntimeBarSegments.js +0 -346
- package/dist/data/runtime/RuntimeBarSegments.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-preferences.cjs","sources":["../../src/components/json-schema-form-preferences.ts"],"sourcesContent":["import type { FormSize } from \"./json-schema-form-size\";\n\n// FormPreferences are the form-local appearance overrides the display-options\n// menu persists: the input/label scale and the layout mode. They never touch\n// field values or the global page density — only how one form looks.\nexport interface FormPreferences {\n size?: FormSize;\n layoutMode?: LayoutMode;\n sortMode?: SortMode;\n}\n\nexport type LayoutMode = \"stacked\" | \"inline\" | \"properties\";\n\n// SortMode controls the order fields render in at every object level:\n// - \"schema\": schema/x-order order (the default).\n// - \"required-first\": required keys first, then optional, each group stable.\n// - \"priority\": required AND non-empty keys bubble to the top — required-and-\n// filled, then required-and-empty, then optional-and-filled, then the rest.\nexport type SortMode = \"schema\" | \"required-first\" | \"priority\";\n\nexport const DEFAULT_PREFERENCES_STORAGE_KEY = \"clicky-ui-json-schema-form-preferences\";\n\nconst VALID_SIZES: readonly string[] = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"];\n\nfunction isFormSize(value: unknown): value is FormSize {\n return typeof value === \"string\" && VALID_SIZES.includes(value);\n}\n\nfunction isLayoutMode(value: unknown): value is LayoutMode {\n return value === \"stacked\" || value === \"inline\" || value === \"properties\";\n}\n\nfunction isSortMode(value: unknown): value is SortMode {\n return value === \"schema\" || value === \"required-first\" || value === \"priority\";\n}\n\n// readPreferences loads stored preferences, tolerating anything malformed: a\n// missing key, invalid JSON, a non-object payload, out-of-range values, or a\n// localStorage that throws (private mode / storage disabled). Each field is\n// validated independently so one bad value doesn't discard the whole record.\n// Display preferences are best-effort, so a read failure yields {} rather than\n// an error — the form falls back to its props.\nexport function readPreferences(storageKey: string): FormPreferences {\n let raw: string | null;\n try {\n raw = localStorage.getItem(storageKey);\n } catch {\n return {};\n }\n if (!raw) return {};\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return {};\n }\n if (typeof parsed !== \"object\" || parsed === null) return {};\n\n const record = parsed as Record<string, unknown>;\n const prefs: FormPreferences = {};\n if (isFormSize(record.size)) prefs.size = record.size;\n if (isLayoutMode(record.layoutMode)) prefs.layoutMode = record.layoutMode;\n if (isSortMode(record.sortMode)) prefs.sortMode = record.sortMode;\n return prefs;\n}\n\n// writePreferences persists the record as JSON, swallowing localStorage errors\n// (quota exceeded / storage disabled). Like reads, persistence is best-effort:\n// failing to save a display preference must never break the form.\nexport function writePreferences(storageKey: string, prefs: FormPreferences): void {\n try {\n localStorage.setItem(storageKey, JSON.stringify(prefs));\n } catch {\n // Best-effort persistence; ignore storage failures.\n }\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"json-schema-form-preferences.cjs","sources":["../../src/components/json-schema-form-preferences.ts"],"sourcesContent":["import type { FormSize } from \"./json-schema-form-size\";\n\n// FormPreferences are the form-local appearance overrides the display-options\n// menu persists: the input/label scale and the layout mode. They never touch\n// field values or the global page density — only how one form looks.\nexport interface FormPreferences {\n size?: FormSize;\n layoutMode?: LayoutMode;\n sortMode?: SortMode;\n // debug renders every field the form would hide, marked with why, and a\n // hover card per field telling where it comes from.\n debug?: boolean;\n}\n\nexport type LayoutMode = \"stacked\" | \"inline\" | \"properties\";\n\n// SortMode controls the order fields render in at every object level:\n// - \"schema\": schema/x-order order (the default).\n// - \"required-first\": required keys first, then optional, each group stable.\n// - \"priority\": required AND non-empty keys bubble to the top — required-and-\n// filled, then required-and-empty, then optional-and-filled, then the rest.\nexport type SortMode = \"schema\" | \"required-first\" | \"priority\";\n\nexport const DEFAULT_PREFERENCES_STORAGE_KEY = \"clicky-ui-json-schema-form-preferences\";\n\nconst VALID_SIZES: readonly string[] = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"];\n\nfunction isFormSize(value: unknown): value is FormSize {\n return typeof value === \"string\" && VALID_SIZES.includes(value);\n}\n\nfunction isLayoutMode(value: unknown): value is LayoutMode {\n return value === \"stacked\" || value === \"inline\" || value === \"properties\";\n}\n\nfunction isSortMode(value: unknown): value is SortMode {\n return value === \"schema\" || value === \"required-first\" || value === \"priority\";\n}\n\n// readPreferences loads stored preferences, tolerating anything malformed: a\n// missing key, invalid JSON, a non-object payload, out-of-range values, or a\n// localStorage that throws (private mode / storage disabled). Each field is\n// validated independently so one bad value doesn't discard the whole record.\n// Display preferences are best-effort, so a read failure yields {} rather than\n// an error — the form falls back to its props.\nexport function readPreferences(storageKey: string): FormPreferences {\n let raw: string | null;\n try {\n raw = localStorage.getItem(storageKey);\n } catch {\n return {};\n }\n if (!raw) return {};\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return {};\n }\n if (typeof parsed !== \"object\" || parsed === null) return {};\n\n const record = parsed as Record<string, unknown>;\n const prefs: FormPreferences = {};\n if (isFormSize(record.size)) prefs.size = record.size;\n if (isLayoutMode(record.layoutMode)) prefs.layoutMode = record.layoutMode;\n if (isSortMode(record.sortMode)) prefs.sortMode = record.sortMode;\n if (typeof record.debug === \"boolean\") prefs.debug = record.debug;\n return prefs;\n}\n\n// writePreferences persists the record as JSON, swallowing localStorage errors\n// (quota exceeded / storage disabled). Like reads, persistence is best-effort:\n// failing to save a display preference must never break the form.\nexport function writePreferences(storageKey: string, prefs: FormPreferences): void {\n try {\n localStorage.setItem(storageKey, JSON.stringify(prefs));\n } catch {\n // Best-effort persistence; ignore storage failures.\n }\n}\n"],"names":[],"mappings":";;AAuBO,MAAM,kCAAkC;AAE/C,MAAM,cAAiC,CAAC,MAAM,MAAM,MAAM,MAAM,IAAI;AAEpE,SAAS,WAAW,OAAmC;AACrD,SAAO,OAAO,UAAU,YAAY,YAAY,SAAS,KAAK;AAChE;AAEA,SAAS,aAAa,OAAqC;AACzD,SAAO,UAAU,aAAa,UAAU,YAAY,UAAU;AAChE;AAEA,SAAS,WAAW,OAAmC;AACrD,SAAO,UAAU,YAAY,UAAU,oBAAoB,UAAU;AACvE;AAQO,SAAS,gBAAgB,YAAqC;AACnE,MAAI;AACJ,MAAI;AACF,UAAM,aAAa,QAAQ,UAAU;AAAA,EACvC,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACA,MAAI,CAAC,IAAK,QAAO,CAAA;AAEjB,MAAI;AACJ,MAAI;AACF,aAAS,KAAK,MAAM,GAAG;AAAA,EACzB,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACA,MAAI,OAAO,WAAW,YAAY,WAAW,aAAa,CAAA;AAE1D,QAAM,SAAS;AACf,QAAM,QAAyB,CAAA;AAC/B,MAAI,WAAW,OAAO,IAAI,EAAG,OAAM,OAAO,OAAO;AACjD,MAAI,aAAa,OAAO,UAAU,EAAG,OAAM,aAAa,OAAO;AAC/D,MAAI,WAAW,OAAO,QAAQ,EAAG,OAAM,WAAW,OAAO;AACzD,MAAI,OAAO,OAAO,UAAU,UAAW,OAAM,QAAQ,OAAO;AAC5D,SAAO;AACT;AAKO,SAAS,iBAAiB,YAAoB,OAA8B;AACjF,MAAI;AACF,iBAAa,QAAQ,YAAY,KAAK,UAAU,KAAK,CAAC;AAAA,EACxD,QAAQ;AAAA,EAER;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-preferences.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKxD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"json-schema-form-preferences.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-preferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAKxD,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAGpB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAO7D,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,gBAAgB,GAAG,UAAU,CAAC;AAEhE,eAAO,MAAM,+BAA+B,2CAA2C,CAAC;AAsBxF,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,eAAe,CAwBnE;AAKD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI,CAMjF"}
|
|
@@ -29,6 +29,7 @@ function readPreferences(storageKey) {
|
|
|
29
29
|
if (isFormSize(record.size)) prefs.size = record.size;
|
|
30
30
|
if (isLayoutMode(record.layoutMode)) prefs.layoutMode = record.layoutMode;
|
|
31
31
|
if (isSortMode(record.sortMode)) prefs.sortMode = record.sortMode;
|
|
32
|
+
if (typeof record.debug === "boolean") prefs.debug = record.debug;
|
|
32
33
|
return prefs;
|
|
33
34
|
}
|
|
34
35
|
function writePreferences(storageKey, prefs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-preferences.js","sources":["../../src/components/json-schema-form-preferences.ts"],"sourcesContent":["import type { FormSize } from \"./json-schema-form-size\";\n\n// FormPreferences are the form-local appearance overrides the display-options\n// menu persists: the input/label scale and the layout mode. They never touch\n// field values or the global page density — only how one form looks.\nexport interface FormPreferences {\n size?: FormSize;\n layoutMode?: LayoutMode;\n sortMode?: SortMode;\n}\n\nexport type LayoutMode = \"stacked\" | \"inline\" | \"properties\";\n\n// SortMode controls the order fields render in at every object level:\n// - \"schema\": schema/x-order order (the default).\n// - \"required-first\": required keys first, then optional, each group stable.\n// - \"priority\": required AND non-empty keys bubble to the top — required-and-\n// filled, then required-and-empty, then optional-and-filled, then the rest.\nexport type SortMode = \"schema\" | \"required-first\" | \"priority\";\n\nexport const DEFAULT_PREFERENCES_STORAGE_KEY = \"clicky-ui-json-schema-form-preferences\";\n\nconst VALID_SIZES: readonly string[] = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"];\n\nfunction isFormSize(value: unknown): value is FormSize {\n return typeof value === \"string\" && VALID_SIZES.includes(value);\n}\n\nfunction isLayoutMode(value: unknown): value is LayoutMode {\n return value === \"stacked\" || value === \"inline\" || value === \"properties\";\n}\n\nfunction isSortMode(value: unknown): value is SortMode {\n return value === \"schema\" || value === \"required-first\" || value === \"priority\";\n}\n\n// readPreferences loads stored preferences, tolerating anything malformed: a\n// missing key, invalid JSON, a non-object payload, out-of-range values, or a\n// localStorage that throws (private mode / storage disabled). Each field is\n// validated independently so one bad value doesn't discard the whole record.\n// Display preferences are best-effort, so a read failure yields {} rather than\n// an error — the form falls back to its props.\nexport function readPreferences(storageKey: string): FormPreferences {\n let raw: string | null;\n try {\n raw = localStorage.getItem(storageKey);\n } catch {\n return {};\n }\n if (!raw) return {};\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return {};\n }\n if (typeof parsed !== \"object\" || parsed === null) return {};\n\n const record = parsed as Record<string, unknown>;\n const prefs: FormPreferences = {};\n if (isFormSize(record.size)) prefs.size = record.size;\n if (isLayoutMode(record.layoutMode)) prefs.layoutMode = record.layoutMode;\n if (isSortMode(record.sortMode)) prefs.sortMode = record.sortMode;\n return prefs;\n}\n\n// writePreferences persists the record as JSON, swallowing localStorage errors\n// (quota exceeded / storage disabled). Like reads, persistence is best-effort:\n// failing to save a display preference must never break the form.\nexport function writePreferences(storageKey: string, prefs: FormPreferences): void {\n try {\n localStorage.setItem(storageKey, JSON.stringify(prefs));\n } catch {\n // Best-effort persistence; ignore storage failures.\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json-schema-form-preferences.js","sources":["../../src/components/json-schema-form-preferences.ts"],"sourcesContent":["import type { FormSize } from \"./json-schema-form-size\";\n\n// FormPreferences are the form-local appearance overrides the display-options\n// menu persists: the input/label scale and the layout mode. They never touch\n// field values or the global page density — only how one form looks.\nexport interface FormPreferences {\n size?: FormSize;\n layoutMode?: LayoutMode;\n sortMode?: SortMode;\n // debug renders every field the form would hide, marked with why, and a\n // hover card per field telling where it comes from.\n debug?: boolean;\n}\n\nexport type LayoutMode = \"stacked\" | \"inline\" | \"properties\";\n\n// SortMode controls the order fields render in at every object level:\n// - \"schema\": schema/x-order order (the default).\n// - \"required-first\": required keys first, then optional, each group stable.\n// - \"priority\": required AND non-empty keys bubble to the top — required-and-\n// filled, then required-and-empty, then optional-and-filled, then the rest.\nexport type SortMode = \"schema\" | \"required-first\" | \"priority\";\n\nexport const DEFAULT_PREFERENCES_STORAGE_KEY = \"clicky-ui-json-schema-form-preferences\";\n\nconst VALID_SIZES: readonly string[] = [\"xs\", \"sm\", \"md\", \"lg\", \"xl\"];\n\nfunction isFormSize(value: unknown): value is FormSize {\n return typeof value === \"string\" && VALID_SIZES.includes(value);\n}\n\nfunction isLayoutMode(value: unknown): value is LayoutMode {\n return value === \"stacked\" || value === \"inline\" || value === \"properties\";\n}\n\nfunction isSortMode(value: unknown): value is SortMode {\n return value === \"schema\" || value === \"required-first\" || value === \"priority\";\n}\n\n// readPreferences loads stored preferences, tolerating anything malformed: a\n// missing key, invalid JSON, a non-object payload, out-of-range values, or a\n// localStorage that throws (private mode / storage disabled). Each field is\n// validated independently so one bad value doesn't discard the whole record.\n// Display preferences are best-effort, so a read failure yields {} rather than\n// an error — the form falls back to its props.\nexport function readPreferences(storageKey: string): FormPreferences {\n let raw: string | null;\n try {\n raw = localStorage.getItem(storageKey);\n } catch {\n return {};\n }\n if (!raw) return {};\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(raw);\n } catch {\n return {};\n }\n if (typeof parsed !== \"object\" || parsed === null) return {};\n\n const record = parsed as Record<string, unknown>;\n const prefs: FormPreferences = {};\n if (isFormSize(record.size)) prefs.size = record.size;\n if (isLayoutMode(record.layoutMode)) prefs.layoutMode = record.layoutMode;\n if (isSortMode(record.sortMode)) prefs.sortMode = record.sortMode;\n if (typeof record.debug === \"boolean\") prefs.debug = record.debug;\n return prefs;\n}\n\n// writePreferences persists the record as JSON, swallowing localStorage errors\n// (quota exceeded / storage disabled). Like reads, persistence is best-effort:\n// failing to save a display preference must never break the form.\nexport function writePreferences(storageKey: string, prefs: FormPreferences): void {\n try {\n localStorage.setItem(storageKey, JSON.stringify(prefs));\n } catch {\n // Best-effort persistence; ignore storage failures.\n }\n}\n"],"names":[],"mappings":"AAuBO,MAAM,kCAAkC;AAE/C,MAAM,cAAiC,CAAC,MAAM,MAAM,MAAM,MAAM,IAAI;AAEpE,SAAS,WAAW,OAAmC;AACrD,SAAO,OAAO,UAAU,YAAY,YAAY,SAAS,KAAK;AAChE;AAEA,SAAS,aAAa,OAAqC;AACzD,SAAO,UAAU,aAAa,UAAU,YAAY,UAAU;AAChE;AAEA,SAAS,WAAW,OAAmC;AACrD,SAAO,UAAU,YAAY,UAAU,oBAAoB,UAAU;AACvE;AAQO,SAAS,gBAAgB,YAAqC;AACnE,MAAI;AACJ,MAAI;AACF,UAAM,aAAa,QAAQ,UAAU;AAAA,EACvC,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACA,MAAI,CAAC,IAAK,QAAO,CAAA;AAEjB,MAAI;AACJ,MAAI;AACF,aAAS,KAAK,MAAM,GAAG;AAAA,EACzB,QAAQ;AACN,WAAO,CAAA;AAAA,EACT;AACA,MAAI,OAAO,WAAW,YAAY,WAAW,aAAa,CAAA;AAE1D,QAAM,SAAS;AACf,QAAM,QAAyB,CAAA;AAC/B,MAAI,WAAW,OAAO,IAAI,EAAG,OAAM,OAAO,OAAO;AACjD,MAAI,aAAa,OAAO,UAAU,EAAG,OAAM,aAAa,OAAO;AAC/D,MAAI,WAAW,OAAO,QAAQ,EAAG,OAAM,WAAW,OAAO;AACzD,MAAI,OAAO,OAAO,UAAU,UAAW,OAAM,QAAQ,OAAO;AAC5D,SAAO;AACT;AAKO,SAAS,iBAAiB,YAAoB,OAA8B;AACjF,MAAI;AACF,iBAAa,QAAQ,YAAY,KAAK,UAAU,KAAK,CAAC;AAAA,EACxD,QAAQ;AAAA,EAER;AACF;"}
|
|
@@ -4,6 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
require("react");
|
|
5
5
|
const utils = require("../lib/utils.cjs");
|
|
6
6
|
const Icon = require("../data/Icon.cjs");
|
|
7
|
+
const jsonSchemaFormDebug = require("./json-schema-form-debug.cjs");
|
|
7
8
|
const jsonSchemaFormFields = require("./json-schema-form-fields.cjs");
|
|
8
9
|
const jsonSchemaFormLayout = require("./json-schema-form-layout.cjs");
|
|
9
10
|
const jsonSchemaFormArray = require("./json-schema-form-array.cjs");
|
|
@@ -73,11 +74,20 @@ function ownsReadOnlyRendering(kind) {
|
|
|
73
74
|
return kind === "array" || kind === "object" || kind === "string-map" || kind === "textarea" || kind === "markdown" || kind === "display" || kind === "link";
|
|
74
75
|
}
|
|
75
76
|
function buildField(args, ctx) {
|
|
76
|
-
|
|
77
|
+
let hiddenReason;
|
|
78
|
+
const hide = (reason) => {
|
|
79
|
+
if (!ctx.debug) return true;
|
|
80
|
+
hiddenReason ?? (hiddenReason = reason);
|
|
81
|
+
return false;
|
|
82
|
+
};
|
|
83
|
+
const hiddenBy = args.prop["x-hidden-by"];
|
|
84
|
+
if (args.prop["x-hidden"] && hide(hiddenBy ? `hidden by ${hiddenBy}` : "hidden by the schema (x-hidden)")) return null;
|
|
77
85
|
const base = jsonSchemaFormResolve.resolveControl(args);
|
|
78
86
|
let field = base;
|
|
87
|
+
let beforeDrop = base;
|
|
79
88
|
for (const ext of ctx.pre) {
|
|
80
89
|
if (!field) break;
|
|
90
|
+
beforeDrop = field;
|
|
81
91
|
field = ext(field, {
|
|
82
92
|
key: args.key,
|
|
83
93
|
prop: args.prop,
|
|
@@ -86,10 +96,13 @@ function buildField(args, ctx) {
|
|
|
86
96
|
...ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}
|
|
87
97
|
});
|
|
88
98
|
}
|
|
89
|
-
if (!field)
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
if (!field) {
|
|
100
|
+
if (hide("dropped by a form extension")) return null;
|
|
101
|
+
field = beforeDrop;
|
|
102
|
+
}
|
|
103
|
+
if (ctx.hideReadOnlyFields && field.readOnly && hide("hidden: read-only")) return null;
|
|
104
|
+
if (field.writeOnly && (ctx.viewOnly || field.readOnly) && hide("hidden: write-only")) return null;
|
|
105
|
+
if (ctx.hideEmpty && jsonSchemaFormUtils.isEmptyValue(field.value) && hide("hidden: empty")) return null;
|
|
93
106
|
const view = field.readOnly === true;
|
|
94
107
|
if (ctx.presentation) field = { ...field, readOnly: true };
|
|
95
108
|
const instancePath = args.instancePath ?? jsonSchemaFormErrors.appendInstancePath(ctx.instancePath, args.key);
|
|
@@ -145,6 +158,9 @@ function buildField(args, ctx) {
|
|
|
145
158
|
}
|
|
146
159
|
);
|
|
147
160
|
}
|
|
161
|
+
if (ctx.debug && field.kind !== "display") {
|
|
162
|
+
({ label, value } = jsonSchemaFormDebug.withFieldDebug({ label, value }, { fieldKey: args.key, instancePath, field, prop: args.prop, hiddenReason }));
|
|
163
|
+
}
|
|
148
164
|
return { field, fieldId, label, value, messages, help };
|
|
149
165
|
}
|
|
150
166
|
function renderFieldNodes(args, ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-render.cjs","sources":["../../src/components/json-schema-form-render.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { LabelIcon } from \"../data/Icon\";\nimport {\n BooleanControl,\n DateControl,\n DisplayControl,\n EnumControl,\n LinkControl,\n LookupControl,\n MarkdownControl,\n NumberControl,\n ReadOnlyValue,\n StringControl,\n TextareaControl,\n} from \"./json-schema-form-fields\";\nimport {\n FieldLabel,\n FieldWrapper,\n HelpHint,\n ObjectSection,\n SectionHeading,\n} from \"./json-schema-form-layout\";\nimport { ArrayControl } from \"./json-schema-form-array\";\nimport { ObjectControl, StringMapControl } from \"./json-schema-form-object\";\nimport { FieldErrorMessages, FieldErrorText } from \"./json-schema-form-error-display\";\nimport { appendInstancePath, errorsAtInstancePath } from \"./json-schema-form-errors\";\nimport type { JsonSchemaFormError } from \"./json-schema-form-error-types\";\nimport { applyPostExtensions } from \"./json-schema-form-extensions\";\nimport { resolveControl, schemaRendersAsObject } from \"./json-schema-form-resolve\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { applyChangeEffects, applyListenerState } from \"./json-schema-form-listeners\";\nimport type {\n FieldArgs,\n FieldControl,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderApi,\n RenderContext,\n} from \"./json-schema-form-types\";\nimport {\n fieldErrorId,\n fieldInputId,\n hasObjectItemProperties,\n rendersAsSection,\n isEmptyValue,\n normalizeColSpan,\n normalizeColumns,\n orderByClickyOrder,\n orderByPriority,\n orderByXOrder,\n orderRequiredFirst,\n seedFromSchema,\n softError,\n} from \"./json-schema-form-utils\";\nimport { labelSizeClass } from \"./json-schema-form-size\";\nimport { PropertiesFieldRow, PropertyValueEditor } from \"./json-schema-form-properties\";\nimport { PropertyValuePreview } from \"./json-schema-form-property-preview\";\nimport { propertyControlSize } from \"./json-schema-form-properties-size\";\nimport { matchesFieldFilter } from \"./json-schema-form-filter\";\nimport { Combobox } from \"./Combobox\";\n\n// This module is the top of the json-schema-form graph: it imports the control\n// components and dispatches into them, while container controls recurse back in\n// only through ctx.render (see RenderApi). Nothing here is a React component,\n// so the component modules stay Fast-Refresh-eligible and cycle-free.\n\n// renderValueControl produces just the value node for a field, dispatching on\n// its resolved kind. The RenderContext carries readOnly + the pre/post stacks so\n// container controls (array/object/map) can recurse with full context.\nexport function renderValueControl(field: FieldControl, ctx: RenderContext): ReactNode {\n // ctx.instancePath is the field's own path here: buildField descends into the\n // child context before rendering the value.\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (ctx.presentation && field.kind !== \"display\" && field.kind !== \"link\") {\n return <PropertyValuePreview field={field} fieldId={fieldId} ctx={ctx} />;\n }\n // A field the schema marks `readOnly` is never editable: it shows its current\n // value as plain text, not a disabled input. (The form-level ctx.readOnly,\n // below, instead disables the real controls so the structure stays visible;\n // a table's grid is its structure, so TableArray shows its cells as values.)\n // Containers (array/object/map) still render structurally so nested read-only\n // values surface, and textarea/display/link own their non-editable rendering\n // (multi-line text / static element / hyperlink), so all of these are excluded\n // from the plain ReadOnlyValue fallback.\n if (field.readOnly && !ownsReadOnlyRendering(field.kind)) {\n return <ReadOnlyValue field={field} fieldId={fieldId} size={ctx.size} />;\n }\n const readOnly = ctx.readOnly || field.readOnly === true;\n const size = ctx.size;\n switch (field.kind) {\n case \"enum\":\n return <EnumControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"lookup\":\n return (\n <LookupControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={size}\n {...(ctx.rootValue ? { rootValue: ctx.rootValue } : {})}\n />\n );\n case \"boolean\":\n return <BooleanControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"number\":\n return <NumberControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"date\":\n return <DateControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"textarea\":\n return <TextareaControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"markdown\":\n return <MarkdownControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"display\":\n return <DisplayControl field={field} size={size} />;\n case \"link\":\n return <LinkControl field={field} fieldId={fieldId} size={size} />;\n case \"array\":\n return <ArrayControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"object\":\n return <ObjectControl field={field} ctx={ctx} />;\n case \"string-map\":\n return <StringMapControl field={field} ctx={ctx} />;\n default:\n return <StringControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n }\n}\n\n// ownsReadOnlyRendering reports whether a control renders its own non-editable\n// form, so the renderer must not pre-empt it with the plain ReadOnlyValue text:\n// containers recurse structurally, and textarea/display/link have bespoke\n// read-only output.\nfunction ownsReadOnlyRendering(kind: FieldControl[\"kind\"]): boolean {\n return (\n kind === \"array\" ||\n kind === \"object\" ||\n kind === \"string-map\" ||\n kind === \"textarea\" ||\n kind === \"markdown\" ||\n kind === \"display\" ||\n kind === \"link\"\n );\n}\n\n// buildField resolves a control, applies the pre-extensions (any returning\n// null drops the field), renders the value node, then applies the\n// post-extensions to the {label, value} node pair.\nfunction buildField(\n args: FieldArgs,\n ctx: RenderContext,\n): {\n field: FieldControl;\n fieldId: string;\n label: ReactNode;\n value: ReactNode;\n messages: JsonSchemaFormError[];\n help: HelpDisplay;\n} | null {\n // `x-hidden` is a property of the schema, not of the resolved control, so no\n // extension can set or clear it — checked before anything is resolved. A\n // matching `allOf` branch that re-declares the property without the flag is\n // what reveals it; see effectiveProperties.\n if (args.prop[\"x-hidden\"]) return null;\n const base = resolveControl(args);\n let field: FieldControl | null = base;\n for (const ext of ctx.pre) {\n if (!field) break;\n field = ext(field, {\n key: args.key,\n prop: args.prop,\n value: args.value,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n });\n }\n if (!field) return null;\n // Drop read-only fields entirely when the form opts out of displaying them.\n // Checked after pre-extensions so an extension that sets/clears readOnly wins.\n if (ctx.hideReadOnlyFields && field.readOnly) return null;\n // A writeOnly value is never read back, so a view has nothing to show for it.\n if (field.writeOnly && (ctx.viewOnly || field.readOnly)) return null;\n // Same placement, same reason: an extension that supplies a value decides\n // whether the field has one.\n if (ctx.hideEmpty && isEmptyValue(field.value)) return null;\n // A readOnly field's subtree is a view, like a read-only form's. Read before\n // the presentation override, which marks fields readOnly only to show text.\n const view = field.readOnly === true;\n if (ctx.presentation) field = { ...field, readOnly: true };\n\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n const fieldId = fieldInputId(instancePath, ctx.idPrefix);\n // Resolve this field's errors before rendering its control, so the control can\n // carry aria-invalid / aria-describedby rather than leaving the error text\n // visually adjacent but programmatically unassociated. Host-supplied errors\n // and the locally-derived soft hint (e.g. \"Required\" on an empty required\n // field) are one validation state: either one marks the field invalid and is\n // rendered into the aria-describedby target, so a locally-invalid field is\n // never invalid only to sighted users. softError reads value/required/kind —\n // never `invalid` — so deriving it from `field` here is not circular.\n const errors = errorsAtInstancePath(ctx.errors, instancePath);\n const soft = errors.length === 0 ? softError(field) : undefined;\n const messages: JsonSchemaFormError[] =\n errors.length > 0 ? errors : soft ? [{ instancePath, message: soft }] : [];\n if (messages.length > 0) field = { ...field, invalid: true };\n // A field's own x-help-display wins over the form-level setting; both default\n // to the permanent paragraph every form renders today.\n const help = field.helpDisplay ?? ctx.layout.help ?? \"inline\";\n // A section's label is its header row (none for an empty title), so post\n // extensions decorate it too.\n let label: ReactNode = rendersAsSection(field, ctx.layout.mode) ? (\n field.label === \"\" ? null : <SectionHeading field={field} size={ctx.size} helpDisplay={help} />\n ) : (\n <FieldLabel field={field} fieldId={fieldId} size={ctx.layout.mode === \"properties\" ? propertyControlSize[ctx.size] : ctx.size} helpDisplay={help} />\n );\n // A field's `x-layout: inline|stack` overrides the form-level layout for its\n // own value subtree (the field's own row keeps the parent layout). \"table\" is\n // handled structurally inside the array/string-map controls, not here.\n const overrideMode =\n field.layout === \"inline\" ? \"inline\" : field.layout === \"stack\" ? \"stacked\" : undefined;\n const nestedProperty = ctx.layout.mode === \"properties\" && (field.kind === \"object\" || field.kind === \"string-map\");\n // A disabled field keeps its real control (unlike readOnly's value text), and\n // containers read ctx.readOnly, so a disabled object disables its subtree.\n const valueCtx: RenderContext = {\n ...ctx,\n ...(field.disabled ? { readOnly: true } : {}),\n ...(view ? { viewOnly: true } : {}),\n ...(ctx.layout.mode === \"properties\" && !nestedProperty ? { size: propertyControlSize[ctx.size] } : {}),\n instancePath,\n ...(overrideMode && !nestedProperty ? { layout: { ...ctx.layout, mode: overrideMode } } : {}),\n ...(ctx.layout.mode === \"properties\" && field.kind === \"array\"\n ? { layout: { ...ctx.layout, mode: overrideMode ?? \"stacked\" } } : {}),\n };\n let value: ReactNode = renderValueControl(field, valueCtx);\n const postCtx = {\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n instancePath,\n };\n ({ label, value } = applyPostExtensions(\n field,\n { label, value },\n ctx.post,\n postCtx,\n ));\n if (ctx.layout.mode === \"properties\" && !nestedProperty && field.kind !== \"display\" && field.kind !== \"link\") {\n value = <PropertyValueEditor field={field} fieldId={fieldId} ctx={valueCtx}\n renderPreview={(previewField) => applyPostExtensions(\n { ...previewField, readOnly: true },\n { label, value: <PropertyValuePreview field={previewField} fieldId={`${fieldId}-preview`} ctx={{ ...valueCtx, idPrefix: `${ctx.idPrefix ?? \"\"}-preview` }} /> },\n ctx.post,\n postCtx,\n ).value}\n renderEditor={(draftField, draftCtx) => applyPostExtensions(\n draftField,\n { label, value: renderValueControl(draftField, draftCtx) },\n draftCtx.post,\n { ...postCtx, ...(draftCtx.rootValue ? { rootValue: draftCtx.rootValue } : {}), ...(draftCtx.onRootChange ? { onRootChange: draftCtx.onRootChange } : {}) },\n ).value} />;\n }\n return { field, fieldId, label, value, messages, help };\n}\n\n// renderFieldNodes runs the full pipeline and returns the raw {label, value}\n// nodes (no FieldWrapper). Used where the caller arranges layout itself — map\n// rows (value only) and scalar array items.\nexport function renderFieldNodes(\n args: FieldArgs,\n ctx: RenderContext,\n): { label: ReactNode; value: ReactNode } | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n return {\n label: built.label,\n value:\n built.messages.length > 0 ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {built.value}\n <FieldErrorText id={fieldErrorId(built.fieldId)} errors={built.messages} />\n </div>\n ) : (\n built.value\n ),\n };\n}\n\n// renderFieldRow runs the pipeline and wraps it in a FieldWrapper with the soft\n// validation hint. `labelOverride` lets a container relabel a field that has no\n// natural key (e.g. array items → \"Item 1\").\nexport function renderFieldRow(\n args: FieldArgs,\n ctx: RenderContext,\n opts?: { labelOverride?: string },\n): ReactNode | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n const { field } = built;\n if (ctx.layout.mode === \"properties\" && field.kind !== \"display\") {\n return <PropertiesFieldRow {...built} label={opts?.labelOverride ?? built.label} ctx={ctx} />;\n }\n // Object fields — and table-laid-out arrays/string-maps — render as a flat\n // section: a header followed by their body at full width, rather than an\n // inline label + narrow value column. This keeps deep schemas (e.g. policy →\n // shape, asfile → params) readable as a single column of labelled sections,\n // and gives a `x-layout: \"table\"` array the full width its columns need\n // instead of cramming it into the inline value column.\n // An accordion joins this list: crammed into the 600px inline value column it\n // is unusable, and it needs the ObjectSection header to carry the array's own\n // title, required marker and help. Cards are the same shape of thing — a\n // full-width stack of item panels — so they join it too.\n if (rendersAsSection(field, ctx.layout.mode)) {\n return (\n <ObjectSection\n heading={\n opts?.labelOverride === undefined ? built.label : opts.labelOverride === \"\" ? null : (\n <SectionHeading field={field} label={opts.labelOverride} size={ctx.size} helpDisplay={built.help} />\n )\n }\n size={ctx.size}\n helpDisplay={built.help}\n {...(field.helper ? { helper: field.helper } : {})}\n >\n <FieldErrorText\n id={fieldErrorId(built.fieldId)}\n errors={built.messages}\n className=\"min-w-0 break-words\"\n />\n {built.value}\n </ObjectSection>\n );\n }\n // A display field (heading/divider/info/spacer) is the label — it carries no\n // value column, so it spans the full grid width with no inline label cell.\n if (field.kind === \"display\") {\n return <div className=\"col-span-full\">{built.value}</div>;\n }\n const label = opts?.labelOverride ? (\n <span className={cn(\"flex items-center gap-2 font-medium\", labelSizeClass[ctx.size])}>\n <LabelIcon icon={field.labelIcon} className=\"text-[15px] text-muted-foreground\" />\n <span>{opts.labelOverride}</span>\n {field.required && <span className=\"text-destructive\">*</span>}\n {field.badge && (\n <span className=\"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground\">\n {field.badge}\n </span>\n )}\n {/* Without this the `?` silently disappears for relabelled rows (array\n items), taking the description with it — FieldWrapper has already\n dropped the paragraph by then. */}\n {built.help === \"hover\" && field.helper && (\n <HelpHint label={opts.labelOverride} helper={field.helper} />\n )}\n </span>\n ) : (\n built.label\n );\n // One rendering path for both sources, so the soft hint lands in the same\n // fieldErrorId element the control's aria-describedby already points at.\n const err =\n built.messages.length > 0 ? (\n <FieldErrorMessages id={fieldErrorId(built.fieldId)} errors={built.messages} />\n ) : undefined;\n return (\n <FieldWrapper\n layout={ctx.layout}\n size={ctx.size}\n label={label}\n value={built.value}\n {...(field.colSpan === \"full\" ? { maxWidth: \"none\" } : {})}\n {...(field.helper && built.help !== \"hover\" ? { helper: field.helper } : {})}\n {...(err ? { error: err } : {})}\n />\n );\n}\n\n// renderObjectFields maps an object subschema's effective properties to field\n// rows. It is the recursive heart, shared by the top-level form and the nested\n// ObjectControl. Edits spread immutably onto the object, carrying the value\n// effects of the edited field's `x-on-change` listeners in the same commit.\nexport function renderObjectFields(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n onChange: (next: Record<string, unknown>) => void,\n ctx: RenderContext,\n opts?: { hiddenKeys?: string[] },\n): ReactNode[] {\n const listenerOptions = {\n root: ctx.rootValue ?? value,\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n const { properties, required } = applyListenerState(schema, value, listenerOptions);\n const hidden = new Set(opts?.hiddenKeys ?? []);\n // Per-property `x-clicky-order` wins (composes across merged branches); the\n // object-level `x-order` array is the fallback; document order otherwise.\n const ordered = orderByClickyOrder(orderByXOrder(Object.entries(properties), schema[\"x-order\"]));\n const sorted =\n ctx.sortMode === \"required-first\"\n ? orderRequiredFirst(ordered, required)\n : ctx.sortMode === \"priority\"\n ? orderByPriority(ordered, required, value)\n : ordered;\n // The field filter narrows only the outermost object level (depth 0); nested\n // object subtrees render in full so a matched parent keeps all its children.\n const entries =\n ctx.depth === 0 && ctx.fieldFilter\n ? sorted.filter(([key, prop]) => matchesFieldFilter({ key, prop, filter: ctx.fieldFilter!, value: value[key] }))\n : sorted;\n // Object-level `x-columns` lays the fields out in a multi-column stacked grid;\n // each field spans `x-col-span` columns (object sections/table arrays span the\n // full row). Only takes effect in stacked mode — inline owns its 2-track grid.\n const columns = ctx.layout.mode !== \"stacked\" ? 1 : normalizeColumns(schema[\"x-columns\"]);\n const arrayEntries = entries.filter(([, prop]) => prop.type === \"array\");\n const compactArrays = ctx.layout.mode !== \"properties\" && arrayEntries.length > 3;\n const rows = entries.flatMap(([key, prop]) => {\n if (hidden.has(key)) return [];\n if (compactArrays && prop.type === \"array\" && (!Array.isArray(value[key]) || value[key].length === 0)) return [];\n const row = renderFieldRow(\n {\n key,\n prop,\n required: required.includes(key),\n value: value[key],\n onChange: (next) => onChange(applyChangeEffects(schema, { ...listenerOptions, value, key, next })),\n instancePath: appendInstancePath(ctx.instancePath, key),\n },\n ctx,\n );\n if (!row) return [];\n if (columns === \"auto\" || columns > 1) {\n const span = rendersFullWidth(prop)\n ? \"full\"\n : normalizeColSpan(prop[\"x-col-span\"], columns);\n return [\n <div\n key={key}\n // Under \"auto\" the track count only exists at layout time, so a\n // full-width field must say `1 / -1` rather than span a number.\n style={{\n gridColumn: span === \"full\" ? \"1 / -1\" : `span ${span} / span ${span}`,\n }}\n >\n {row}\n </div>,\n ];\n }\n // `contents` keeps the keyed wrapper out of the box tree so the row's own\n // node (a subgrid FieldWrapper or a full-width ObjectSection) is a direct\n // child of the FieldsGrid and snaps to its label/value tracks.\n return [<div key={key} className=\"contents\">{row}</div>];\n });\n if (compactArrays && !ctx.readOnly && !ctx.presentation) {\n const available = arrayEntries.filter(([key, prop]) =>\n !hidden.has(key) && (!Array.isArray(value[key]) || prop.maxItems === undefined || value[key].length < prop.maxItems),\n );\n if (available.length > 0) {\n rows.push(\n <div key=\"keyed-array-add\" className=\"col-span-full w-full max-w-72\">\n <Combobox\n ariaLabel=\"Add item\"\n placeholder=\"Add item…\"\n options={available.map(([key, prop]) => ({ value: key, label: prop.title || key }))}\n value=\"\"\n allowCustomValue={false}\n onChange={(key) => {\n const prop = properties[key];\n if (!prop || prop.type !== \"array\") throw new Error(`cannot add item to ${key}`);\n const items = value[key];\n if (items !== undefined && !Array.isArray(items)) throw new Error(`${key} is not an array`);\n onChange({ ...value, [key]: [...(items ?? []), seedFromSchema(prop.items ?? { type: \"string\" })] });\n }}\n />\n </div>,\n );\n }\n }\n return rows;\n}\n\n// rendersFullWidth reports whether a property renders as a full-width block\n// (a structured object → ObjectSection, or an `x-layout: \"table\"` array/map) so\n// a multi-column grid gives it the whole row instead of a single column.\nfunction rendersFullWidth(prop: JsonSchemaProperty): boolean {\n const fixedProperties = effectiveProperties(prop as JsonSchemaObject, {}).properties;\n if (schemaRendersAsObject(prop) && (prop.properties !== undefined || Object.keys(fixedProperties).length > 0)) {\n return true;\n }\n // An object-item array is a summary-row list (or cards) unless it opts out,\n // and each of those renderers owns the row — mirrors ArrayControl's own\n // branching, which decides the same thing from the resolved FieldControl.\n if (hasObjectItemProperties(prop.items) && prop[\"x-array-display\"] !== \"stacked\") {\n return true;\n }\n return prop[\"x-layout\"] === \"table\";\n}\n\n// renderApi is the RenderContext injection bundle: the root form stores it on\n// the context so container controls can recurse without importing this module.\nexport const renderApi: RenderApi = {\n renderFieldNodes,\n renderFieldRow,\n renderObjectFields,\n};\n"],"names":["fieldInputId","jsx","PropertyValuePreview","ReadOnlyValue","EnumControl","LookupControl","BooleanControl","NumberControl","DateControl","TextareaControl","MarkdownControl","DisplayControl","LinkControl","ArrayControl","ObjectControl","StringMapControl","StringControl","resolveControl","isEmptyValue","appendInstancePath","errorsAtInstancePath","softError","rendersAsSection","SectionHeading","FieldLabel","propertyControlSize","applyPostExtensions","PropertyValueEditor","jsxs","FieldErrorText","fieldErrorId","PropertiesFieldRow","ObjectSection","cn","labelSizeClass","LabelIcon","HelpHint","FieldErrorMessages","FieldWrapper","applyListenerState","orderByClickyOrder","orderByXOrder","orderRequiredFirst","orderByPriority","matchesFieldFilter","normalizeColumns","applyChangeEffects","normalizeColSpan","Combobox","seedFromSchema","effectiveProper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C1E,MAAIC,4CAAsB,IAAI,MAAM,KAAK,eAAe,UAAa,OAAO,KAAK,eAAe,EAAE,SAAS,IAAI;AAC7G,WAAO;AAAA,EACT;AAIA,MAAIC,oBAAAA,wBAAwB,KAAK,KAAK,KAAK,KAAK,iBAAiB,MAAM,WAAW;AAChF,WAAO;AAAA,EACT;AACA,SAAO,KAAK,UAAU,MAAM;AAC9B;AAIO,MAAM,YAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;;;;;;"}
|
|
1
|
+
{"version":3,"file":"json-schema-form-render.cjs","sources":["../../src/components/json-schema-form-render.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { withFieldDebug } from \"./json-schema-form-debug\";\nimport {\n BooleanControl,\n DateControl,\n DisplayControl,\n EnumControl,\n LinkControl,\n LookupControl,\n MarkdownControl,\n NumberControl,\n ReadOnlyValue,\n StringControl,\n TextareaControl,\n} from \"./json-schema-form-fields\";\nimport {\n FieldLabel,\n FieldWrapper,\n HelpHint,\n ObjectSection,\n SectionHeading,\n} from \"./json-schema-form-layout\";\nimport { ArrayControl } from \"./json-schema-form-array\";\nimport { ObjectControl, StringMapControl } from \"./json-schema-form-object\";\nimport { FieldErrorMessages, FieldErrorText } from \"./json-schema-form-error-display\";\nimport { appendInstancePath, errorsAtInstancePath } from \"./json-schema-form-errors\";\nimport type { JsonSchemaFormError } from \"./json-schema-form-error-types\";\nimport { applyPostExtensions } from \"./json-schema-form-extensions\";\nimport { resolveControl, schemaRendersAsObject } from \"./json-schema-form-resolve\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { applyChangeEffects, applyListenerState } from \"./json-schema-form-listeners\";\nimport type {\n FieldArgs,\n FieldControl,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderApi,\n RenderContext,\n} from \"./json-schema-form-types\";\nimport {\n fieldErrorId,\n fieldInputId,\n hasObjectItemProperties,\n rendersAsSection,\n isEmptyValue,\n normalizeColSpan,\n normalizeColumns,\n orderByClickyOrder,\n orderByPriority,\n orderByXOrder,\n orderRequiredFirst,\n seedFromSchema,\n softError,\n} from \"./json-schema-form-utils\";\nimport { labelSizeClass } from \"./json-schema-form-size\";\nimport { PropertiesFieldRow, PropertyValueEditor } from \"./json-schema-form-properties\";\nimport { PropertyValuePreview } from \"./json-schema-form-property-preview\";\nimport { propertyControlSize } from \"./json-schema-form-properties-size\";\nimport { matchesFieldFilter } from \"./json-schema-form-filter\";\nimport { Combobox } from \"./Combobox\";\n\n// This module is the top of the json-schema-form graph: it imports the control\n// components and dispatches into them, while container controls recurse back in\n// only through ctx.render (see RenderApi). Nothing here is a React component,\n// so the component modules stay Fast-Refresh-eligible and cycle-free.\n\n// renderValueControl produces just the value node for a field, dispatching on\n// its resolved kind. The RenderContext carries readOnly + the pre/post stacks so\n// container controls (array/object/map) can recurse with full context.\nexport function renderValueControl(field: FieldControl, ctx: RenderContext): ReactNode {\n // ctx.instancePath is the field's own path here: buildField descends into the\n // child context before rendering the value.\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (ctx.presentation && field.kind !== \"display\" && field.kind !== \"link\") {\n return <PropertyValuePreview field={field} fieldId={fieldId} ctx={ctx} />;\n }\n // A field the schema marks `readOnly` is never editable: it shows its current\n // value as plain text, not a disabled input. (The form-level ctx.readOnly,\n // below, instead disables the real controls so the structure stays visible;\n // a table's grid is its structure, so TableArray shows its cells as values.)\n // Containers (array/object/map) still render structurally so nested read-only\n // values surface, and textarea/display/link own their non-editable rendering\n // (multi-line text / static element / hyperlink), so all of these are excluded\n // from the plain ReadOnlyValue fallback.\n if (field.readOnly && !ownsReadOnlyRendering(field.kind)) {\n return <ReadOnlyValue field={field} fieldId={fieldId} size={ctx.size} />;\n }\n const readOnly = ctx.readOnly || field.readOnly === true;\n const size = ctx.size;\n switch (field.kind) {\n case \"enum\":\n return <EnumControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"lookup\":\n return (\n <LookupControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={size}\n {...(ctx.rootValue ? { rootValue: ctx.rootValue } : {})}\n />\n );\n case \"boolean\":\n return <BooleanControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"number\":\n return <NumberControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"date\":\n return <DateControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"textarea\":\n return <TextareaControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"markdown\":\n return <MarkdownControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"display\":\n return <DisplayControl field={field} size={size} />;\n case \"link\":\n return <LinkControl field={field} fieldId={fieldId} size={size} />;\n case \"array\":\n return <ArrayControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"object\":\n return <ObjectControl field={field} ctx={ctx} />;\n case \"string-map\":\n return <StringMapControl field={field} ctx={ctx} />;\n default:\n return <StringControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n }\n}\n\n// ownsReadOnlyRendering reports whether a control renders its own non-editable\n// form, so the renderer must not pre-empt it with the plain ReadOnlyValue text:\n// containers recurse structurally, and textarea/display/link have bespoke\n// read-only output.\nfunction ownsReadOnlyRendering(kind: FieldControl[\"kind\"]): boolean {\n return (\n kind === \"array\" ||\n kind === \"object\" ||\n kind === \"string-map\" ||\n kind === \"textarea\" ||\n kind === \"markdown\" ||\n kind === \"display\" ||\n kind === \"link\"\n );\n}\n\n// buildField resolves a control, applies the pre-extensions (any returning\n// null drops the field), renders the value node, then applies the\n// post-extensions to the {label, value} node pair.\nfunction buildField(\n args: FieldArgs,\n ctx: RenderContext,\n): {\n field: FieldControl;\n fieldId: string;\n label: ReactNode;\n value: ReactNode;\n messages: JsonSchemaFormError[];\n help: HelpDisplay;\n} | null {\n // `x-hidden` is a property of the schema, not of the resolved control, so no\n // extension can set or clear it — checked before anything is resolved. A\n // matching `allOf` branch that re-declares the property without the flag is\n // what reveals it; see effectiveProperties.\n // hide says whether to drop the field; in debug mode it keeps it and records\n // the first reason it would have gone.\n let hiddenReason: string | undefined;\n const hide = (reason: string) => {\n if (!ctx.debug) return true;\n hiddenReason ??= reason;\n return false;\n };\n const hiddenBy = args.prop[\"x-hidden-by\"];\n if (args.prop[\"x-hidden\"] && hide(hiddenBy ? `hidden by ${hiddenBy}` : \"hidden by the schema (x-hidden)\")) return null;\n const base = resolveControl(args);\n let field: FieldControl | null = base;\n let beforeDrop: FieldControl = base;\n for (const ext of ctx.pre) {\n if (!field) break;\n beforeDrop = field;\n field = ext(field, {\n key: args.key,\n prop: args.prop,\n value: args.value,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n });\n }\n if (!field) {\n if (hide(\"dropped by a form extension\")) return null;\n field = beforeDrop;\n }\n // Drop read-only fields entirely when the form opts out of displaying them.\n // Checked after pre-extensions so an extension that sets/clears readOnly wins.\n if (ctx.hideReadOnlyFields && field.readOnly && hide(\"hidden: read-only\")) return null;\n // A writeOnly value is never read back, so a view has nothing to show for it.\n if (field.writeOnly && (ctx.viewOnly || field.readOnly) && hide(\"hidden: write-only\")) return null;\n // Same placement, same reason: an extension that supplies a value decides\n // whether the field has one.\n if (ctx.hideEmpty && isEmptyValue(field.value) && hide(\"hidden: empty\")) return null;\n // A readOnly field's subtree is a view, like a read-only form's. Read before\n // the presentation override, which marks fields readOnly only to show text.\n const view = field.readOnly === true;\n if (ctx.presentation) field = { ...field, readOnly: true };\n\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n const fieldId = fieldInputId(instancePath, ctx.idPrefix);\n // Resolve this field's errors before rendering its control, so the control can\n // carry aria-invalid / aria-describedby rather than leaving the error text\n // visually adjacent but programmatically unassociated. Host-supplied errors\n // and the locally-derived soft hint (e.g. \"Required\" on an empty required\n // field) are one validation state: either one marks the field invalid and is\n // rendered into the aria-describedby target, so a locally-invalid field is\n // never invalid only to sighted users. softError reads value/required/kind —\n // never `invalid` — so deriving it from `field` here is not circular.\n const errors = errorsAtInstancePath(ctx.errors, instancePath);\n const soft = errors.length === 0 ? softError(field) : undefined;\n const messages: JsonSchemaFormError[] =\n errors.length > 0 ? errors : soft ? [{ instancePath, message: soft }] : [];\n if (messages.length > 0) field = { ...field, invalid: true };\n // A field's own x-help-display wins over the form-level setting; both default\n // to the permanent paragraph every form renders today.\n const help = field.helpDisplay ?? ctx.layout.help ?? \"inline\";\n // A section's label is its header row (none for an empty title), so post\n // extensions decorate it too.\n let label: ReactNode = rendersAsSection(field, ctx.layout.mode) ? (\n field.label === \"\" ? null : <SectionHeading field={field} size={ctx.size} helpDisplay={help} />\n ) : (\n <FieldLabel field={field} fieldId={fieldId} size={ctx.layout.mode === \"properties\" ? propertyControlSize[ctx.size] : ctx.size} helpDisplay={help} />\n );\n // A field's `x-layout: inline|stack` overrides the form-level layout for its\n // own value subtree (the field's own row keeps the parent layout). \"table\" is\n // handled structurally inside the array/string-map controls, not here.\n const overrideMode =\n field.layout === \"inline\" ? \"inline\" : field.layout === \"stack\" ? \"stacked\" : undefined;\n const nestedProperty = ctx.layout.mode === \"properties\" && (field.kind === \"object\" || field.kind === \"string-map\");\n // A disabled field keeps its real control (unlike readOnly's value text), and\n // containers read ctx.readOnly, so a disabled object disables its subtree.\n const valueCtx: RenderContext = {\n ...ctx,\n ...(field.disabled ? { readOnly: true } : {}),\n ...(view ? { viewOnly: true } : {}),\n ...(ctx.layout.mode === \"properties\" && !nestedProperty ? { size: propertyControlSize[ctx.size] } : {}),\n instancePath,\n ...(overrideMode && !nestedProperty ? { layout: { ...ctx.layout, mode: overrideMode } } : {}),\n ...(ctx.layout.mode === \"properties\" && field.kind === \"array\"\n ? { layout: { ...ctx.layout, mode: overrideMode ?? \"stacked\" } } : {}),\n };\n let value: ReactNode = renderValueControl(field, valueCtx);\n const postCtx = {\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n instancePath,\n };\n ({ label, value } = applyPostExtensions(\n field,\n { label, value },\n ctx.post,\n postCtx,\n ));\n if (ctx.layout.mode === \"properties\" && !nestedProperty && field.kind !== \"display\" && field.kind !== \"link\") {\n value = <PropertyValueEditor field={field} fieldId={fieldId} ctx={valueCtx}\n renderPreview={(previewField) => applyPostExtensions(\n { ...previewField, readOnly: true },\n { label, value: <PropertyValuePreview field={previewField} fieldId={`${fieldId}-preview`} ctx={{ ...valueCtx, idPrefix: `${ctx.idPrefix ?? \"\"}-preview` }} /> },\n ctx.post,\n postCtx,\n ).value}\n renderEditor={(draftField, draftCtx) => applyPostExtensions(\n draftField,\n { label, value: renderValueControl(draftField, draftCtx) },\n draftCtx.post,\n { ...postCtx, ...(draftCtx.rootValue ? { rootValue: draftCtx.rootValue } : {}), ...(draftCtx.onRootChange ? { onRootChange: draftCtx.onRootChange } : {}) },\n ).value} />;\n }\n if (ctx.debug && field.kind !== \"display\") {\n ({ label, value } = withFieldDebug({ label, value }, { fieldKey: args.key, instancePath, field, prop: args.prop, hiddenReason }));\n }\n return { field, fieldId, label, value, messages, help };\n}\n\n// renderFieldNodes runs the full pipeline and returns the raw {label, value}\n// nodes (no FieldWrapper). Used where the caller arranges layout itself — map\n// rows (value only) and scalar array items.\nexport function renderFieldNodes(\n args: FieldArgs,\n ctx: RenderContext,\n): { label: ReactNode; value: ReactNode } | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n return {\n label: built.label,\n value:\n built.messages.length > 0 ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {built.value}\n <FieldErrorText id={fieldErrorId(built.fieldId)} errors={built.messages} />\n </div>\n ) : (\n built.value\n ),\n };\n}\n\n// renderFieldRow runs the pipeline and wraps it in a FieldWrapper with the soft\n// validation hint. `labelOverride` lets a container relabel a field that has no\n// natural key (e.g. array items → \"Item 1\").\nexport function renderFieldRow(\n args: FieldArgs,\n ctx: RenderContext,\n opts?: { labelOverride?: string },\n): ReactNode | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n const { field } = built;\n if (ctx.layout.mode === \"properties\" && field.kind !== \"display\") {\n return <PropertiesFieldRow {...built} label={opts?.labelOverride ?? built.label} ctx={ctx} />;\n }\n // Object fields — and table-laid-out arrays/string-maps — render as a flat\n // section: a header followed by their body at full width, rather than an\n // inline label + narrow value column. This keeps deep schemas (e.g. policy →\n // shape, asfile → params) readable as a single column of labelled sections,\n // and gives a `x-layout: \"table\"` array the full width its columns need\n // instead of cramming it into the inline value column.\n // An accordion joins this list: crammed into the 600px inline value column it\n // is unusable, and it needs the ObjectSection header to carry the array's own\n // title, required marker and help. Cards are the same shape of thing — a\n // full-width stack of item panels — so they join it too.\n if (rendersAsSection(field, ctx.layout.mode)) {\n return (\n <ObjectSection\n heading={\n opts?.labelOverride === undefined ? built.label : opts.labelOverride === \"\" ? null : (\n <SectionHeading field={field} label={opts.labelOverride} size={ctx.size} helpDisplay={built.help} />\n )\n }\n size={ctx.size}\n helpDisplay={built.help}\n {...(field.helper ? { helper: field.helper } : {})}\n >\n <FieldErrorText\n id={fieldErrorId(built.fieldId)}\n errors={built.messages}\n className=\"min-w-0 break-words\"\n />\n {built.value}\n </ObjectSection>\n );\n }\n // A display field (heading/divider/info/spacer) is the label — it carries no\n // value column, so it spans the full grid width with no inline label cell.\n if (field.kind === \"display\") {\n return <div className=\"col-span-full\">{built.value}</div>;\n }\n const label = opts?.labelOverride ? (\n <span className={cn(\"flex items-center gap-2 font-medium\", labelSizeClass[ctx.size])}>\n <LabelIcon icon={field.labelIcon} className=\"text-[15px] text-muted-foreground\" />\n <span>{opts.labelOverride}</span>\n {field.required && <span className=\"text-destructive\">*</span>}\n {field.badge && (\n <span className=\"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground\">\n {field.badge}\n </span>\n )}\n {/* Without this the `?` silently disappears for relabelled rows (array\n items), taking the description with it — FieldWrapper has already\n dropped the paragraph by then. */}\n {built.help === \"hover\" && field.helper && (\n <HelpHint label={opts.labelOverride} helper={field.helper} />\n )}\n </span>\n ) : (\n built.label\n );\n // One rendering path for both sources, so the soft hint lands in the same\n // fieldErrorId element the control's aria-describedby already points at.\n const err =\n built.messages.length > 0 ? (\n <FieldErrorMessages id={fieldErrorId(built.fieldId)} errors={built.messages} />\n ) : undefined;\n return (\n <FieldWrapper\n layout={ctx.layout}\n size={ctx.size}\n label={label}\n value={built.value}\n {...(field.colSpan === \"full\" ? { maxWidth: \"none\" } : {})}\n {...(field.helper && built.help !== \"hover\" ? { helper: field.helper } : {})}\n {...(err ? { error: err } : {})}\n />\n );\n}\n\n// renderObjectFields maps an object subschema's effective properties to field\n// rows. It is the recursive heart, shared by the top-level form and the nested\n// ObjectControl. Edits spread immutably onto the object, carrying the value\n// effects of the edited field's `x-on-change` listeners in the same commit.\nexport function renderObjectFields(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n onChange: (next: Record<string, unknown>) => void,\n ctx: RenderContext,\n opts?: { hiddenKeys?: string[] },\n): ReactNode[] {\n const listenerOptions = {\n root: ctx.rootValue ?? value,\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n const { properties, required } = applyListenerState(schema, value, listenerOptions);\n const hidden = new Set(opts?.hiddenKeys ?? []);\n // Per-property `x-clicky-order` wins (composes across merged branches); the\n // object-level `x-order` array is the fallback; document order otherwise.\n const ordered = orderByClickyOrder(orderByXOrder(Object.entries(properties), schema[\"x-order\"]));\n const sorted =\n ctx.sortMode === \"required-first\"\n ? orderRequiredFirst(ordered, required)\n : ctx.sortMode === \"priority\"\n ? orderByPriority(ordered, required, value)\n : ordered;\n // The field filter narrows only the outermost object level (depth 0); nested\n // object subtrees render in full so a matched parent keeps all its children.\n const entries =\n ctx.depth === 0 && ctx.fieldFilter\n ? sorted.filter(([key, prop]) => matchesFieldFilter({ key, prop, filter: ctx.fieldFilter!, value: value[key] }))\n : sorted;\n // Object-level `x-columns` lays the fields out in a multi-column stacked grid;\n // each field spans `x-col-span` columns (object sections/table arrays span the\n // full row). Only takes effect in stacked mode — inline owns its 2-track grid.\n const columns = ctx.layout.mode !== \"stacked\" ? 1 : normalizeColumns(schema[\"x-columns\"]);\n const arrayEntries = entries.filter(([, prop]) => prop.type === \"array\");\n const compactArrays = ctx.layout.mode !== \"properties\" && arrayEntries.length > 3;\n const rows = entries.flatMap(([key, prop]) => {\n if (hidden.has(key)) return [];\n if (compactArrays && prop.type === \"array\" && (!Array.isArray(value[key]) || value[key].length === 0)) return [];\n const row = renderFieldRow(\n {\n key,\n prop,\n required: required.includes(key),\n value: value[key],\n onChange: (next) => onChange(applyChangeEffects(schema, { ...listenerOptions, value, key, next })),\n instancePath: appendInstancePath(ctx.instancePath, key),\n },\n ctx,\n );\n if (!row) return [];\n if (columns === \"auto\" || columns > 1) {\n const span = rendersFullWidth(prop)\n ? \"full\"\n : normalizeColSpan(prop[\"x-col-span\"], columns);\n return [\n <div\n key={key}\n // Under \"auto\" the track count only exists at layout time, so a\n // full-width field must say `1 / -1` rather than span a number.\n style={{\n gridColumn: span === \"full\" ? \"1 / -1\" : `span ${span} / span ${span}`,\n }}\n >\n {row}\n </div>,\n ];\n }\n // `contents` keeps the keyed wrapper out of the box tree so the row's own\n // node (a subgrid FieldWrapper or a full-width ObjectSection) is a direct\n // child of the FieldsGrid and snaps to its label/value tracks.\n return [<div key={key} className=\"contents\">{row}</div>];\n });\n if (compactArrays && !ctx.readOnly && !ctx.presentation) {\n const available = arrayEntries.filter(([key, prop]) =>\n !hidden.has(key) && (!Array.isArray(value[key]) || prop.maxItems === undefined || value[key].length < prop.maxItems),\n );\n if (available.length > 0) {\n rows.push(\n <div key=\"keyed-array-add\" className=\"col-span-full w-full max-w-72\">\n <Combobox\n ariaLabel=\"Add item\"\n placeholder=\"Add item…\"\n options={available.map(([key, prop]) => ({ value: key, label: prop.title || key }))}\n value=\"\"\n allowCustomValue={false}\n onChange={(key) => {\n const prop = properties[key];\n if (!prop || prop.type !== \"array\") throw new Error(`cannot add item to ${key}`);\n const items = value[key];\n if (items !== undefined && !Array.isArray(items)) throw new Error(`${key} is not an array`);\n onChange({ ...value, [key]: [...(items ?? []), seedFromSchema(prop.items ?? { type: \"string\" })] });\n }}\n />\n </div>,\n );\n }\n }\n return rows;\n}\n\n// rendersFullWidth reports whether a property renders as a full-width block\n// (a structured object → ObjectSection, or an `x-layout: \"table\"` array/map) so\n// a multi-column grid gives it the whole row instead of a single column.\nfunction rendersFullWidth(prop: JsonSchemaProperty): boolean {\n const fixedProperties = effectiveProperties(prop as JsonSchemaObject, {}).properties;\n if (schemaRendersAsObject(prop) && (prop.properties !== undefined || Object.keys(fixedProperties).length > 0)) {\n return true;\n }\n // An object-item array is a summary-row list (or cards) unless it opts out,\n // and each of those renderers owns the row — mirrors ArrayControl's own\n // branching, which decides the same thing from the resolved FieldControl.\n if (hasObjectItemProperties(prop.items) && prop[\"x-array-display\"] !== \"stacked\") {\n return true;\n }\n return prop[\"x-layout\"] === \"table\";\n}\n\n// renderApi is the RenderContext injection bundle: the root form stores it on\n// the context so container controls can recurse without importing this module.\nexport const renderApi: RenderApi = {\n renderFieldNodes,\n renderFieldRow,\n renderObjectFields,\n};\n"],"names":["fieldInputId","jsx","PropertyValuePreview","ReadOnlyValue","EnumControl","LookupControl","BooleanControl","NumberControl","DateControl","TextareaControl","MarkdownControl","DisplayControl","LinkControl","ArrayControl","ObjectControl","StringMapControl","StringControl","resolveControl","isEmptyValue","appendInstancePath","errorsAtInstancePath","softError","rendersAsSection","SectionHeading","FieldLabel","propertyControlSize","applyPostExtensions","PropertyValueEditor","withFieldDebug","jsxs","FieldErrorText","fieldErrorId","PropertiesFieldRow","ObjectSection","cn","labelSizeClass","LabelIcon","HelpHint","FieldErrorMessages","FieldWrapper","applyListenerState","orderByClickyOrder","orderByXOrder","orderRequiredFirst","orderByPriority","matchesFieldFilter","normalizeColumns","applyChangeEffects","normalizeColSpan","Combobox","seedFromSchema","effectiveProperties","schemaRendersAsObject","hasObjectItemProperties"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwEO,SAAS,mBAAmB,OAAqB,KAA+B;AAGrF,QAAM,UAAUA,oBAAAA,aAAa,IAAI,cAAc,IAAI,QAAQ;AAC3D,MAAI,IAAI,gBAAgB,MAAM,SAAS,aAAa,MAAM,SAAS,QAAQ;AACzE,WAAOC,2BAAAA,IAACC,8BAAAA,sBAAA,EAAqB,OAAc,SAAkB,IAAA,CAAU;AAAA,EACzE;AASA,MAAI,MAAM,YAAY,CAAC,sBAAsB,MAAM,IAAI,GAAG;AACxD,0CAAQC,qBAAAA,eAAA,EAAc,OAAc,SAAkB,MAAM,IAAI,MAAM;AAAA,EACxE;AACA,QAAM,WAAW,IAAI,YAAY,MAAM,aAAa;AACpD,QAAM,OAAO,IAAI;AACjB,UAAQ,MAAM,MAAA;AAAA,IACZ,KAAK;AACH,aAAOF,2BAAAA,IAACG,qBAAAA,aAAA,EAAY,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACtF,KAAK;AACH,aACEH,2BAAAA;AAAAA,QAACI,qBAAAA;AAAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAI,IAAI,YAAY,EAAE,WAAW,IAAI,UAAA,IAAc,CAAA;AAAA,QAAC;AAAA,MAAA;AAAA,IAG3D,KAAK;AACH,aAAOJ,2BAAAA,IAACK,qBAAAA,gBAAA,EAAe,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACzF,KAAK;AACH,aAAOL,2BAAAA,IAACM,qBAAAA,eAAA,EAAc,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACxF,KAAK;AACH,aAAON,2BAAAA,IAACO,qBAAAA,aAAA,EAAY,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACtF,KAAK;AACH,aAAOP,2BAAAA,IAACQ,qBAAAA,iBAAA,EA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AAU,CAAC,QAAQ;AACjB,oBAAM,OAAO,WAAW,GAAG;AAC3B,kBAAI,CAAC,QAAQ,KAAK,SAAS,eAAe,IAAI,MAAM,sBAAsB,GAAG,EAAE;AAC/E,oBAAM,QAAQ,MAAM,GAAG;AACvB,kBAAI,UAAU,UAAa,CAAC,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,GAAG,GAAG,kBAAkB;AAC1F,uBAAS,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,GAAI,SAAS,CAAA,GAAKC,oBAAAA,eAAe,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC,GAAG;AAAA,YACpG;AAAA,UAAA;AAAA,QAAA,KAbK,iBAeT;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AACA,SAAO;AACT;AAKA,SAAS,iBAAiB,MAAmC;AAC3D,QAAM,kBAAkBC,2BAAAA,oBAAoB,MAA0B,CAAA,CAAE,EAAE;AAC1E,MAAIC,4CAAsB,IAAI,MAAM,KAAK,eAAe,UAAa,OAAO,KAAK,eAAe,EAAE,SAAS,IAAI;AAC7G,WAAO;AAAA,EACT;AAIA,MAAIC,oBAAAA,wBAAwB,KAAK,KAAK,KAAK,KAAK,iBAAiB,MAAM,WAAW;AAChF,WAAO;AAAA,EACT;AACA,SAAO,KAAK,UAAU,MAAM;AAC9B;AAIO,MAAM,YAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-render.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"json-schema-form-render.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiCvC,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EAEZ,gBAAgB,EAEhB,SAAS,EACT,aAAa,EACd,MAAM,0BAA0B,CAAC;AA+BlC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,GAAG,SAAS,CAwDrF;AA4JD,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,aAAa,GACjB;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAe/C;AAKD,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAChC,SAAS,GAAG,IAAI,CAgFlB;AAMD,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,gBAAgB,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,EACjD,GAAG,EAAE,aAAa,EAClB,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAC/B,SAAS,EAAE,CA2Fb;AAqBD,eAAO,MAAM,SAAS,EAAE,SAIvB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
4
|
import { LabelIcon } from "../data/Icon.js";
|
|
5
|
+
import { withFieldDebug } from "./json-schema-form-debug.js";
|
|
5
6
|
import { ReadOnlyValue, StringControl, LinkControl, DisplayControl, MarkdownControl, TextareaControl, DateControl, NumberControl, BooleanControl, LookupControl, EnumControl } from "./json-schema-form-fields.js";
|
|
6
7
|
import { ObjectSection, SectionHeading, HelpHint, FieldWrapper, FieldLabel } from "./json-schema-form-layout.js";
|
|
7
8
|
import { ArrayControl } from "./json-schema-form-array.js";
|
|
@@ -71,11 +72,20 @@ function ownsReadOnlyRendering(kind) {
|
|
|
71
72
|
return kind === "array" || kind === "object" || kind === "string-map" || kind === "textarea" || kind === "markdown" || kind === "display" || kind === "link";
|
|
72
73
|
}
|
|
73
74
|
function buildField(args, ctx) {
|
|
74
|
-
|
|
75
|
+
let hiddenReason;
|
|
76
|
+
const hide = (reason) => {
|
|
77
|
+
if (!ctx.debug) return true;
|
|
78
|
+
hiddenReason ?? (hiddenReason = reason);
|
|
79
|
+
return false;
|
|
80
|
+
};
|
|
81
|
+
const hiddenBy = args.prop["x-hidden-by"];
|
|
82
|
+
if (args.prop["x-hidden"] && hide(hiddenBy ? `hidden by ${hiddenBy}` : "hidden by the schema (x-hidden)")) return null;
|
|
75
83
|
const base = resolveControl(args);
|
|
76
84
|
let field = base;
|
|
85
|
+
let beforeDrop = base;
|
|
77
86
|
for (const ext of ctx.pre) {
|
|
78
87
|
if (!field) break;
|
|
88
|
+
beforeDrop = field;
|
|
79
89
|
field = ext(field, {
|
|
80
90
|
key: args.key,
|
|
81
91
|
prop: args.prop,
|
|
@@ -84,10 +94,13 @@ function buildField(args, ctx) {
|
|
|
84
94
|
...ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}
|
|
85
95
|
});
|
|
86
96
|
}
|
|
87
|
-
if (!field)
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
97
|
+
if (!field) {
|
|
98
|
+
if (hide("dropped by a form extension")) return null;
|
|
99
|
+
field = beforeDrop;
|
|
100
|
+
}
|
|
101
|
+
if (ctx.hideReadOnlyFields && field.readOnly && hide("hidden: read-only")) return null;
|
|
102
|
+
if (field.writeOnly && (ctx.viewOnly || field.readOnly) && hide("hidden: write-only")) return null;
|
|
103
|
+
if (ctx.hideEmpty && isEmptyValue(field.value) && hide("hidden: empty")) return null;
|
|
91
104
|
const view = field.readOnly === true;
|
|
92
105
|
if (ctx.presentation) field = { ...field, readOnly: true };
|
|
93
106
|
const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);
|
|
@@ -143,6 +156,9 @@ function buildField(args, ctx) {
|
|
|
143
156
|
}
|
|
144
157
|
);
|
|
145
158
|
}
|
|
159
|
+
if (ctx.debug && field.kind !== "display") {
|
|
160
|
+
({ label, value } = withFieldDebug({ label, value }, { fieldKey: args.key, instancePath, field, prop: args.prop, hiddenReason }));
|
|
161
|
+
}
|
|
146
162
|
return { field, fieldId, label, value, messages, help };
|
|
147
163
|
}
|
|
148
164
|
function renderFieldNodes(args, ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-render.js","sources":["../../src/components/json-schema-form-render.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { LabelIcon } from \"../data/Icon\";\nimport {\n BooleanControl,\n DateControl,\n DisplayControl,\n EnumControl,\n LinkControl,\n LookupControl,\n MarkdownControl,\n NumberControl,\n ReadOnlyValue,\n StringControl,\n TextareaControl,\n} from \"./json-schema-form-fields\";\nimport {\n FieldLabel,\n FieldWrapper,\n HelpHint,\n ObjectSection,\n SectionHeading,\n} from \"./json-schema-form-layout\";\nimport { ArrayControl } from \"./json-schema-form-array\";\nimport { ObjectControl, StringMapControl } from \"./json-schema-form-object\";\nimport { FieldErrorMessages, FieldErrorText } from \"./json-schema-form-error-display\";\nimport { appendInstancePath, errorsAtInstancePath } from \"./json-schema-form-errors\";\nimport type { JsonSchemaFormError } from \"./json-schema-form-error-types\";\nimport { applyPostExtensions } from \"./json-schema-form-extensions\";\nimport { resolveControl, schemaRendersAsObject } from \"./json-schema-form-resolve\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { applyChangeEffects, applyListenerState } from \"./json-schema-form-listeners\";\nimport type {\n FieldArgs,\n FieldControl,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderApi,\n RenderContext,\n} from \"./json-schema-form-types\";\nimport {\n fieldErrorId,\n fieldInputId,\n hasObjectItemProperties,\n rendersAsSection,\n isEmptyValue,\n normalizeColSpan,\n normalizeColumns,\n orderByClickyOrder,\n orderByPriority,\n orderByXOrder,\n orderRequiredFirst,\n seedFromSchema,\n softError,\n} from \"./json-schema-form-utils\";\nimport { labelSizeClass } from \"./json-schema-form-size\";\nimport { PropertiesFieldRow, PropertyValueEditor } from \"./json-schema-form-properties\";\nimport { PropertyValuePreview } from \"./json-schema-form-property-preview\";\nimport { propertyControlSize } from \"./json-schema-form-properties-size\";\nimport { matchesFieldFilter } from \"./json-schema-form-filter\";\nimport { Combobox } from \"./Combobox\";\n\n// This module is the top of the json-schema-form graph: it imports the control\n// components and dispatches into them, while container controls recurse back in\n// only through ctx.render (see RenderApi). Nothing here is a React component,\n// so the component modules stay Fast-Refresh-eligible and cycle-free.\n\n// renderValueControl produces just the value node for a field, dispatching on\n// its resolved kind. The RenderContext carries readOnly + the pre/post stacks so\n// container controls (array/object/map) can recurse with full context.\nexport function renderValueControl(field: FieldControl, ctx: RenderContext): ReactNode {\n // ctx.instancePath is the field's own path here: buildField descends into the\n // child context before rendering the value.\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (ctx.presentation && field.kind !== \"display\" && field.kind !== \"link\") {\n return <PropertyValuePreview field={field} fieldId={fieldId} ctx={ctx} />;\n }\n // A field the schema marks `readOnly` is never editable: it shows its current\n // value as plain text, not a disabled input. (The form-level ctx.readOnly,\n // below, instead disables the real controls so the structure stays visible;\n // a table's grid is its structure, so TableArray shows its cells as values.)\n // Containers (array/object/map) still render structurally so nested read-only\n // values surface, and textarea/display/link own their non-editable rendering\n // (multi-line text / static element / hyperlink), so all of these are excluded\n // from the plain ReadOnlyValue fallback.\n if (field.readOnly && !ownsReadOnlyRendering(field.kind)) {\n return <ReadOnlyValue field={field} fieldId={fieldId} size={ctx.size} />;\n }\n const readOnly = ctx.readOnly || field.readOnly === true;\n const size = ctx.size;\n switch (field.kind) {\n case \"enum\":\n return <EnumControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"lookup\":\n return (\n <LookupControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={size}\n {...(ctx.rootValue ? { rootValue: ctx.rootValue } : {})}\n />\n );\n case \"boolean\":\n return <BooleanControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"number\":\n return <NumberControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"date\":\n return <DateControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"textarea\":\n return <TextareaControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"markdown\":\n return <MarkdownControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"display\":\n return <DisplayControl field={field} size={size} />;\n case \"link\":\n return <LinkControl field={field} fieldId={fieldId} size={size} />;\n case \"array\":\n return <ArrayControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"object\":\n return <ObjectControl field={field} ctx={ctx} />;\n case \"string-map\":\n return <StringMapControl field={field} ctx={ctx} />;\n default:\n return <StringControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n }\n}\n\n// ownsReadOnlyRendering reports whether a control renders its own non-editable\n// form, so the renderer must not pre-empt it with the plain ReadOnlyValue text:\n// containers recurse structurally, and textarea/display/link have bespoke\n// read-only output.\nfunction ownsReadOnlyRendering(kind: FieldControl[\"kind\"]): boolean {\n return (\n kind === \"array\" ||\n kind === \"object\" ||\n kind === \"string-map\" ||\n kind === \"textarea\" ||\n kind === \"markdown\" ||\n kind === \"display\" ||\n kind === \"link\"\n );\n}\n\n// buildField resolves a control, applies the pre-extensions (any returning\n// null drops the field), renders the value node, then applies the\n// post-extensions to the {label, value} node pair.\nfunction buildField(\n args: FieldArgs,\n ctx: RenderContext,\n): {\n field: FieldControl;\n fieldId: string;\n label: ReactNode;\n value: ReactNode;\n messages: JsonSchemaFormError[];\n help: HelpDisplay;\n} | null {\n // `x-hidden` is a property of the schema, not of the resolved control, so no\n // extension can set or clear it — checked before anything is resolved. A\n // matching `allOf` branch that re-declares the property without the flag is\n // what reveals it; see effectiveProperties.\n if (args.prop[\"x-hidden\"]) return null;\n const base = resolveControl(args);\n let field: FieldControl | null = base;\n for (const ext of ctx.pre) {\n if (!field) break;\n field = ext(field, {\n key: args.key,\n prop: args.prop,\n value: args.value,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n });\n }\n if (!field) return null;\n // Drop read-only fields entirely when the form opts out of displaying them.\n // Checked after pre-extensions so an extension that sets/clears readOnly wins.\n if (ctx.hideReadOnlyFields && field.readOnly) return null;\n // A writeOnly value is never read back, so a view has nothing to show for it.\n if (field.writeOnly && (ctx.viewOnly || field.readOnly)) return null;\n // Same placement, same reason: an extension that supplies a value decides\n // whether the field has one.\n if (ctx.hideEmpty && isEmptyValue(field.value)) return null;\n // A readOnly field's subtree is a view, like a read-only form's. Read before\n // the presentation override, which marks fields readOnly only to show text.\n const view = field.readOnly === true;\n if (ctx.presentation) field = { ...field, readOnly: true };\n\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n const fieldId = fieldInputId(instancePath, ctx.idPrefix);\n // Resolve this field's errors before rendering its control, so the control can\n // carry aria-invalid / aria-describedby rather than leaving the error text\n // visually adjacent but programmatically unassociated. Host-supplied errors\n // and the locally-derived soft hint (e.g. \"Required\" on an empty required\n // field) are one validation state: either one marks the field invalid and is\n // rendered into the aria-describedby target, so a locally-invalid field is\n // never invalid only to sighted users. softError reads value/required/kind —\n // never `invalid` — so deriving it from `field` here is not circular.\n const errors = errorsAtInstancePath(ctx.errors, instancePath);\n const soft = errors.length === 0 ? softError(field) : undefined;\n const messages: JsonSchemaFormError[] =\n errors.length > 0 ? errors : soft ? [{ instancePath, message: soft }] : [];\n if (messages.length > 0) field = { ...field, invalid: true };\n // A field's own x-help-display wins over the form-level setting; both default\n // to the permanent paragraph every form renders today.\n const help = field.helpDisplay ?? ctx.layout.help ?? \"inline\";\n // A section's label is its header row (none for an empty title), so post\n // extensions decorate it too.\n let label: ReactNode = rendersAsSection(field, ctx.layout.mode) ? (\n field.label === \"\" ? null : <SectionHeading field={field} size={ctx.size} helpDisplay={help} />\n ) : (\n <FieldLabel field={field} fieldId={fieldId} size={ctx.layout.mode === \"properties\" ? propertyControlSize[ctx.size] : ctx.size} helpDisplay={help} />\n );\n // A field's `x-layout: inline|stack` overrides the form-level layout for its\n // own value subtree (the field's own row keeps the parent layout). \"table\" is\n // handled structurally inside the array/string-map controls, not here.\n const overrideMode =\n field.layout === \"inline\" ? \"inline\" : field.layout === \"stack\" ? \"stacked\" : undefined;\n const nestedProperty = ctx.layout.mode === \"properties\" && (field.kind === \"object\" || field.kind === \"string-map\");\n // A disabled field keeps its real control (unlike readOnly's value text), and\n // containers read ctx.readOnly, so a disabled object disables its subtree.\n const valueCtx: RenderContext = {\n ...ctx,\n ...(field.disabled ? { readOnly: true } : {}),\n ...(view ? { viewOnly: true } : {}),\n ...(ctx.layout.mode === \"properties\" && !nestedProperty ? { size: propertyControlSize[ctx.size] } : {}),\n instancePath,\n ...(overrideMode && !nestedProperty ? { layout: { ...ctx.layout, mode: overrideMode } } : {}),\n ...(ctx.layout.mode === \"properties\" && field.kind === \"array\"\n ? { layout: { ...ctx.layout, mode: overrideMode ?? \"stacked\" } } : {}),\n };\n let value: ReactNode = renderValueControl(field, valueCtx);\n const postCtx = {\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n instancePath,\n };\n ({ label, value } = applyPostExtensions(\n field,\n { label, value },\n ctx.post,\n postCtx,\n ));\n if (ctx.layout.mode === \"properties\" && !nestedProperty && field.kind !== \"display\" && field.kind !== \"link\") {\n value = <PropertyValueEditor field={field} fieldId={fieldId} ctx={valueCtx}\n renderPreview={(previewField) => applyPostExtensions(\n { ...previewField, readOnly: true },\n { label, value: <PropertyValuePreview field={previewField} fieldId={`${fieldId}-preview`} ctx={{ ...valueCtx, idPrefix: `${ctx.idPrefix ?? \"\"}-preview` }} /> },\n ctx.post,\n postCtx,\n ).value}\n renderEditor={(draftField, draftCtx) => applyPostExtensions(\n draftField,\n { label, value: renderValueControl(draftField, draftCtx) },\n draftCtx.post,\n { ...postCtx, ...(draftCtx.rootValue ? { rootValue: draftCtx.rootValue } : {}), ...(draftCtx.onRootChange ? { onRootChange: draftCtx.onRootChange } : {}) },\n ).value} />;\n }\n return { field, fieldId, label, value, messages, help };\n}\n\n// renderFieldNodes runs the full pipeline and returns the raw {label, value}\n// nodes (no FieldWrapper). Used where the caller arranges layout itself — map\n// rows (value only) and scalar array items.\nexport function renderFieldNodes(\n args: FieldArgs,\n ctx: RenderContext,\n): { label: ReactNode; value: ReactNode } | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n return {\n label: built.label,\n value:\n built.messages.length > 0 ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {built.value}\n <FieldErrorText id={fieldErrorId(built.fieldId)} errors={built.messages} />\n </div>\n ) : (\n built.value\n ),\n };\n}\n\n// renderFieldRow runs the pipeline and wraps it in a FieldWrapper with the soft\n// validation hint. `labelOverride` lets a container relabel a field that has no\n// natural key (e.g. array items → \"Item 1\").\nexport function renderFieldRow(\n args: FieldArgs,\n ctx: RenderContext,\n opts?: { labelOverride?: string },\n): ReactNode | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n const { field } = built;\n if (ctx.layout.mode === \"properties\" && field.kind !== \"display\") {\n return <PropertiesFieldRow {...built} label={opts?.labelOverride ?? built.label} ctx={ctx} />;\n }\n // Object fields — and table-laid-out arrays/string-maps — render as a flat\n // section: a header followed by their body at full width, rather than an\n // inline label + narrow value column. This keeps deep schemas (e.g. policy →\n // shape, asfile → params) readable as a single column of labelled sections,\n // and gives a `x-layout: \"table\"` array the full width its columns need\n // instead of cramming it into the inline value column.\n // An accordion joins this list: crammed into the 600px inline value column it\n // is unusable, and it needs the ObjectSection header to carry the array's own\n // title, required marker and help. Cards are the same shape of thing — a\n // full-width stack of item panels — so they join it too.\n if (rendersAsSection(field, ctx.layout.mode)) {\n return (\n <ObjectSection\n heading={\n opts?.labelOverride === undefined ? built.label : opts.labelOverride === \"\" ? null : (\n <SectionHeading field={field} label={opts.labelOverride} size={ctx.size} helpDisplay={built.help} />\n )\n }\n size={ctx.size}\n helpDisplay={built.help}\n {...(field.helper ? { helper: field.helper } : {})}\n >\n <FieldErrorText\n id={fieldErrorId(built.fieldId)}\n errors={built.messages}\n className=\"min-w-0 break-words\"\n />\n {built.value}\n </ObjectSection>\n );\n }\n // A display field (heading/divider/info/spacer) is the label — it carries no\n // value column, so it spans the full grid width with no inline label cell.\n if (field.kind === \"display\") {\n return <div className=\"col-span-full\">{built.value}</div>;\n }\n const label = opts?.labelOverride ? (\n <span className={cn(\"flex items-center gap-2 font-medium\", labelSizeClass[ctx.size])}>\n <LabelIcon icon={field.labelIcon} className=\"text-[15px] text-muted-foreground\" />\n <span>{opts.labelOverride}</span>\n {field.required && <span className=\"text-destructive\">*</span>}\n {field.badge && (\n <span className=\"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground\">\n {field.badge}\n </span>\n )}\n {/* Without this the `?` silently disappears for relabelled rows (array\n items), taking the description with it — FieldWrapper has already\n dropped the paragraph by then. */}\n {built.help === \"hover\" && field.helper && (\n <HelpHint label={opts.labelOverride} helper={field.helper} />\n )}\n </span>\n ) : (\n built.label\n );\n // One rendering path for both sources, so the soft hint lands in the same\n // fieldErrorId element the control's aria-describedby already points at.\n const err =\n built.messages.length > 0 ? (\n <FieldErrorMessages id={fieldErrorId(built.fieldId)} errors={built.messages} />\n ) : undefined;\n return (\n <FieldWrapper\n layout={ctx.layout}\n size={ctx.size}\n label={label}\n value={built.value}\n {...(field.colSpan === \"full\" ? { maxWidth: \"none\" } : {})}\n {...(field.helper && built.help !== \"hover\" ? { helper: field.helper } : {})}\n {...(err ? { error: err } : {})}\n />\n );\n}\n\n// renderObjectFields maps an object subschema's effective properties to field\n// rows. It is the recursive heart, shared by the top-level form and the nested\n// ObjectControl. Edits spread immutably onto the object, carrying the value\n// effects of the edited field's `x-on-change` listeners in the same commit.\nexport function renderObjectFields(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n onChange: (next: Record<string, unknown>) => void,\n ctx: RenderContext,\n opts?: { hiddenKeys?: string[] },\n): ReactNode[] {\n const listenerOptions = {\n root: ctx.rootValue ?? value,\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n const { properties, required } = applyListenerState(schema, value, listenerOptions);\n const hidden = new Set(opts?.hiddenKeys ?? []);\n // Per-property `x-clicky-order` wins (composes across merged branches); the\n // object-level `x-order` array is the fallback; document order otherwise.\n const ordered = orderByClickyOrder(orderByXOrder(Object.entries(properties), schema[\"x-order\"]));\n const sorted =\n ctx.sortMode === \"required-first\"\n ? orderRequiredFirst(ordered, required)\n : ctx.sortMode === \"priority\"\n ? orderByPriority(ordered, required, value)\n : ordered;\n // The field filter narrows only the outermost object level (depth 0); nested\n // object subtrees render in full so a matched parent keeps all its children.\n const entries =\n ctx.depth === 0 && ctx.fieldFilter\n ? sorted.filter(([key, prop]) => matchesFieldFilter({ key, prop, filter: ctx.fieldFilter!, value: value[key] }))\n : sorted;\n // Object-level `x-columns` lays the fields out in a multi-column stacked grid;\n // each field spans `x-col-span` columns (object sections/table arrays span the\n // full row). Only takes effect in stacked mode — inline owns its 2-track grid.\n const columns = ctx.layout.mode !== \"stacked\" ? 1 : normalizeColumns(schema[\"x-columns\"]);\n const arrayEntries = entries.filter(([, prop]) => prop.type === \"array\");\n const compactArrays = ctx.layout.mode !== \"properties\" && arrayEntries.length > 3;\n const rows = entries.flatMap(([key, prop]) => {\n if (hidden.has(key)) return [];\n if (compactArrays && prop.type === \"array\" && (!Array.isArray(value[key]) || value[key].length === 0)) return [];\n const row = renderFieldRow(\n {\n key,\n prop,\n required: required.includes(key),\n value: value[key],\n onChange: (next) => onChange(applyChangeEffects(schema, { ...listenerOptions, value, key, next })),\n instancePath: appendInstancePath(ctx.instancePath, key),\n },\n ctx,\n );\n if (!row) return [];\n if (columns === \"auto\" || columns > 1) {\n const span = rendersFullWidth(prop)\n ? \"full\"\n : normalizeColSpan(prop[\"x-col-span\"], columns);\n return [\n <div\n key={key}\n // Under \"auto\" the track count only exists at layout time, so a\n // full-width field must say `1 / -1` rather than span a number.\n style={{\n gridColumn: span === \"full\" ? \"1 / -1\" : `span ${span} / span ${span}`,\n }}\n >\n {row}\n </div>,\n ];\n }\n // `contents` keeps the keyed wrapper out of the box tree so the row's own\n // node (a subgrid FieldWrapper or a full-width ObjectSection) is a direct\n // child of the FieldsGrid and snaps to its label/value tracks.\n return [<div key={key} className=\"contents\">{row}</div>];\n });\n if (compactArrays && !ctx.readOnly && !ctx.presentation) {\n const available = arrayEntries.filter(([key, prop]) =>\n !hidden.has(key) && (!Array.isArray(value[key]) || prop.maxItems === undefined || value[key].length < prop.maxItems),\n );\n if (available.length > 0) {\n rows.push(\n <div key=\"keyed-array-add\" className=\"col-span-full w-full max-w-72\">\n <Combobox\n ariaLabel=\"Add item\"\n placeholder=\"Add item…\"\n options={available.map(([key, prop]) => ({ value: key, label: prop.title || key }))}\n value=\"\"\n allowCustomValue={false}\n onChange={(key) => {\n const prop = properties[key];\n if (!prop || prop.type !== \"array\") throw new Error(`cannot add item to ${key}`);\n const items = value[key];\n if (items !== undefined && !Array.isArray(items)) throw new Error(`${key} is not an array`);\n onChange({ ...value, [key]: [...(items ?? []), seedFromSchema(prop.items ?? { type: \"string\" })] });\n }}\n />\n </div>,\n );\n }\n }\n return rows;\n}\n\n// rendersFullWidth reports whether a property renders as a full-width block\n// (a structured object → ObjectSection, or an `x-layout: \"table\"` array/map) so\n// a multi-column grid gives it the whole row instead of a single column.\nfunction rendersFullWidth(prop: JsonSchemaProperty): boolean {\n const fixedProperties = effectiveProperties(prop as JsonSchemaObject, {}).properties;\n if (schemaRendersAsObject(prop) && (prop.properties !== undefined || Object.keys(fixedProperties).length > 0)) {\n return true;\n }\n // An object-item array is a summary-row list (or cards) unless it opts out,\n // and each of those renderers owns the row — mirrors ArrayControl's own\n // branching, which decides the same thing from the resolved FieldControl.\n if (hasObjectItemProperties(prop.items) && prop[\"x-array-display\"] !== \"stacked\") {\n return true;\n }\n return prop[\"x-layout\"] === \"table\";\n}\n\n// renderApi is the RenderContext injection bundle: the root form stores it on\n// the context so container controls can recurse without importing this module.\nexport const renderApi: RenderApi = {\n renderFieldNodes,\n renderFieldRow,\n renderObjectFields,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuEO,SAAS,mBAAmB,OAAqB,KAA+B;AAGrF,QAAM,UAAU,aAAa,IAAI,cAAc,IAAI,QAAQ;AAC3D,MAAI,IAAI,gBAAgB,MAAM,SAAS,aAAa,MAAM,SAAS,QAAQ;AACzE,WAAO,oBAAC,sBAAA,EAAqB,OAAc,SAAkB,IAAA,CAAU;AAAA,EACzE;AASA,MAAI,MAAM,YAAY,CAAC,sBAAsB,MAAM,IAAI,GAAG;AACxD,+BAAQ,eAAA,EAAc,OAAc,SAAkB,MAAM,IAAI,MAAM;AAAA,EACxE;AACA,QAAM,WAAW,IAAI,YAAY,MAAM,aAAa;AACpD,QAAM,OAAO,IAAI;AACjB,UAAQ,MAAM,MAAA;AAAA,IACZ,KAAK;AACH,aAAO,oBAAC,aAAA,EAAY,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACtF,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAI,IAAI,YAAY,EAAE,WAAW,IAAI,UAAA,IAAc,CAAA;AAAA,QAAC;AAAA,MAAA;AAAA,IAG3D,KAAK;AACH,aAAO,oBAAC,gBAAA,EAAe,OAA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AAA,EAA0B,WAAU,iCACnC,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,aAAY;AAAA,YACZ,SAAS,UAAU,IAAI,CAAC,CAAC,KAAK,IAAI,OAAO,EAAE,OAAO,KAAK,OAAO,KAAK,SAAS,MAAM;AAAA,YAClF,OAAM;AAAA,YACN,kBAAkB;AAAA,YAClB,UAAU,CAAC,QAAQ;AACjB,oBAAM,OAAO,WAAW,GAAG;AAC3B,kBAAI,CAAC,QAAQ,KAAK,SAAS,eAAe,IAAI,MAAM,sBAAsB,GAAG,EAAE;AAC/E,oBAAM,QAAQ,MAAM,GAAG;AACvB,kBAAI,UAAU,UAAa,CAAC,MAAM,QAAQ,KAAK,EAAG,OAAM,IAAI,MAAM,GAAG,GAAG,kBAAkB;AAC1F,uBAAS,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,CAAC,GAAI,SAAS,CAAA,GAAK,eAAe,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC,GAAG;AAAA,YACpG;AAAA,UAAA;AAAA,QAAA,KAbK,iBAeT;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF;AACA,SAAO;AACT;AAKA,SAAS,iBAAiB,MAAmC;AAC3D,QAAM,kBAAkB,oBAAoB,MAA0B,CAAA,CAAE,EAAE;AAC1E,MAAI,sBAAsB,IAAI,MAAM,KAAK,eAAe,UAAa,OAAO,KAAK,eAAe,EAAE,SAAS,IAAI;AAC7G,WAAO;AAAA,EACT;AAIA,MAAI,wBAAwB,KAAK,KAAK,KAAK,KAAK,iBAAiB,MAAM,WAAW;AAChF,WAAO;AAAA,EACT;AACA,SAAO,KAAK,UAAU,MAAM;AAC9B;AAIO,MAAM,YAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
1
|
+
{"version":3,"file":"json-schema-form-render.js","sources":["../../src/components/json-schema-form-render.tsx"],"sourcesContent":["import { type ReactNode } from \"react\";\nimport { cn } from \"../lib/utils\";\nimport { LabelIcon } from \"../data/Icon\";\nimport { withFieldDebug } from \"./json-schema-form-debug\";\nimport {\n BooleanControl,\n DateControl,\n DisplayControl,\n EnumControl,\n LinkControl,\n LookupControl,\n MarkdownControl,\n NumberControl,\n ReadOnlyValue,\n StringControl,\n TextareaControl,\n} from \"./json-schema-form-fields\";\nimport {\n FieldLabel,\n FieldWrapper,\n HelpHint,\n ObjectSection,\n SectionHeading,\n} from \"./json-schema-form-layout\";\nimport { ArrayControl } from \"./json-schema-form-array\";\nimport { ObjectControl, StringMapControl } from \"./json-schema-form-object\";\nimport { FieldErrorMessages, FieldErrorText } from \"./json-schema-form-error-display\";\nimport { appendInstancePath, errorsAtInstancePath } from \"./json-schema-form-errors\";\nimport type { JsonSchemaFormError } from \"./json-schema-form-error-types\";\nimport { applyPostExtensions } from \"./json-schema-form-extensions\";\nimport { resolveControl, schemaRendersAsObject } from \"./json-schema-form-resolve\";\nimport { effectiveProperties } from \"./json-schema-form-conditionals\";\nimport { applyChangeEffects, applyListenerState } from \"./json-schema-form-listeners\";\nimport type {\n FieldArgs,\n FieldControl,\n HelpDisplay,\n JsonSchemaObject,\n JsonSchemaProperty,\n RenderApi,\n RenderContext,\n} from \"./json-schema-form-types\";\nimport {\n fieldErrorId,\n fieldInputId,\n hasObjectItemProperties,\n rendersAsSection,\n isEmptyValue,\n normalizeColSpan,\n normalizeColumns,\n orderByClickyOrder,\n orderByPriority,\n orderByXOrder,\n orderRequiredFirst,\n seedFromSchema,\n softError,\n} from \"./json-schema-form-utils\";\nimport { labelSizeClass } from \"./json-schema-form-size\";\nimport { PropertiesFieldRow, PropertyValueEditor } from \"./json-schema-form-properties\";\nimport { PropertyValuePreview } from \"./json-schema-form-property-preview\";\nimport { propertyControlSize } from \"./json-schema-form-properties-size\";\nimport { matchesFieldFilter } from \"./json-schema-form-filter\";\nimport { Combobox } from \"./Combobox\";\n\n// This module is the top of the json-schema-form graph: it imports the control\n// components and dispatches into them, while container controls recurse back in\n// only through ctx.render (see RenderApi). Nothing here is a React component,\n// so the component modules stay Fast-Refresh-eligible and cycle-free.\n\n// renderValueControl produces just the value node for a field, dispatching on\n// its resolved kind. The RenderContext carries readOnly + the pre/post stacks so\n// container controls (array/object/map) can recurse with full context.\nexport function renderValueControl(field: FieldControl, ctx: RenderContext): ReactNode {\n // ctx.instancePath is the field's own path here: buildField descends into the\n // child context before rendering the value.\n const fieldId = fieldInputId(ctx.instancePath, ctx.idPrefix);\n if (ctx.presentation && field.kind !== \"display\" && field.kind !== \"link\") {\n return <PropertyValuePreview field={field} fieldId={fieldId} ctx={ctx} />;\n }\n // A field the schema marks `readOnly` is never editable: it shows its current\n // value as plain text, not a disabled input. (The form-level ctx.readOnly,\n // below, instead disables the real controls so the structure stays visible;\n // a table's grid is its structure, so TableArray shows its cells as values.)\n // Containers (array/object/map) still render structurally so nested read-only\n // values surface, and textarea/display/link own their non-editable rendering\n // (multi-line text / static element / hyperlink), so all of these are excluded\n // from the plain ReadOnlyValue fallback.\n if (field.readOnly && !ownsReadOnlyRendering(field.kind)) {\n return <ReadOnlyValue field={field} fieldId={fieldId} size={ctx.size} />;\n }\n const readOnly = ctx.readOnly || field.readOnly === true;\n const size = ctx.size;\n switch (field.kind) {\n case \"enum\":\n return <EnumControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"lookup\":\n return (\n <LookupControl\n field={field}\n fieldId={fieldId}\n readOnly={readOnly}\n size={size}\n {...(ctx.rootValue ? { rootValue: ctx.rootValue } : {})}\n />\n );\n case \"boolean\":\n return <BooleanControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"number\":\n return <NumberControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"date\":\n return <DateControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"textarea\":\n return <TextareaControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"markdown\":\n return <MarkdownControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n case \"display\":\n return <DisplayControl field={field} size={size} />;\n case \"link\":\n return <LinkControl field={field} fieldId={fieldId} size={size} />;\n case \"array\":\n return <ArrayControl field={field} fieldId={fieldId} ctx={ctx} />;\n case \"object\":\n return <ObjectControl field={field} ctx={ctx} />;\n case \"string-map\":\n return <StringMapControl field={field} ctx={ctx} />;\n default:\n return <StringControl field={field} fieldId={fieldId} readOnly={readOnly} size={size} />;\n }\n}\n\n// ownsReadOnlyRendering reports whether a control renders its own non-editable\n// form, so the renderer must not pre-empt it with the plain ReadOnlyValue text:\n// containers recurse structurally, and textarea/display/link have bespoke\n// read-only output.\nfunction ownsReadOnlyRendering(kind: FieldControl[\"kind\"]): boolean {\n return (\n kind === \"array\" ||\n kind === \"object\" ||\n kind === \"string-map\" ||\n kind === \"textarea\" ||\n kind === \"markdown\" ||\n kind === \"display\" ||\n kind === \"link\"\n );\n}\n\n// buildField resolves a control, applies the pre-extensions (any returning\n// null drops the field), renders the value node, then applies the\n// post-extensions to the {label, value} node pair.\nfunction buildField(\n args: FieldArgs,\n ctx: RenderContext,\n): {\n field: FieldControl;\n fieldId: string;\n label: ReactNode;\n value: ReactNode;\n messages: JsonSchemaFormError[];\n help: HelpDisplay;\n} | null {\n // `x-hidden` is a property of the schema, not of the resolved control, so no\n // extension can set or clear it — checked before anything is resolved. A\n // matching `allOf` branch that re-declares the property without the flag is\n // what reveals it; see effectiveProperties.\n // hide says whether to drop the field; in debug mode it keeps it and records\n // the first reason it would have gone.\n let hiddenReason: string | undefined;\n const hide = (reason: string) => {\n if (!ctx.debug) return true;\n hiddenReason ??= reason;\n return false;\n };\n const hiddenBy = args.prop[\"x-hidden-by\"];\n if (args.prop[\"x-hidden\"] && hide(hiddenBy ? `hidden by ${hiddenBy}` : \"hidden by the schema (x-hidden)\")) return null;\n const base = resolveControl(args);\n let field: FieldControl | null = base;\n let beforeDrop: FieldControl = base;\n for (const ext of ctx.pre) {\n if (!field) break;\n beforeDrop = field;\n field = ext(field, {\n key: args.key,\n prop: args.prop,\n value: args.value,\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n });\n }\n if (!field) {\n if (hide(\"dropped by a form extension\")) return null;\n field = beforeDrop;\n }\n // Drop read-only fields entirely when the form opts out of displaying them.\n // Checked after pre-extensions so an extension that sets/clears readOnly wins.\n if (ctx.hideReadOnlyFields && field.readOnly && hide(\"hidden: read-only\")) return null;\n // A writeOnly value is never read back, so a view has nothing to show for it.\n if (field.writeOnly && (ctx.viewOnly || field.readOnly) && hide(\"hidden: write-only\")) return null;\n // Same placement, same reason: an extension that supplies a value decides\n // whether the field has one.\n if (ctx.hideEmpty && isEmptyValue(field.value) && hide(\"hidden: empty\")) return null;\n // A readOnly field's subtree is a view, like a read-only form's. Read before\n // the presentation override, which marks fields readOnly only to show text.\n const view = field.readOnly === true;\n if (ctx.presentation) field = { ...field, readOnly: true };\n\n const instancePath = args.instancePath ?? appendInstancePath(ctx.instancePath, args.key);\n const fieldId = fieldInputId(instancePath, ctx.idPrefix);\n // Resolve this field's errors before rendering its control, so the control can\n // carry aria-invalid / aria-describedby rather than leaving the error text\n // visually adjacent but programmatically unassociated. Host-supplied errors\n // and the locally-derived soft hint (e.g. \"Required\" on an empty required\n // field) are one validation state: either one marks the field invalid and is\n // rendered into the aria-describedby target, so a locally-invalid field is\n // never invalid only to sighted users. softError reads value/required/kind —\n // never `invalid` — so deriving it from `field` here is not circular.\n const errors = errorsAtInstancePath(ctx.errors, instancePath);\n const soft = errors.length === 0 ? softError(field) : undefined;\n const messages: JsonSchemaFormError[] =\n errors.length > 0 ? errors : soft ? [{ instancePath, message: soft }] : [];\n if (messages.length > 0) field = { ...field, invalid: true };\n // A field's own x-help-display wins over the form-level setting; both default\n // to the permanent paragraph every form renders today.\n const help = field.helpDisplay ?? ctx.layout.help ?? \"inline\";\n // A section's label is its header row (none for an empty title), so post\n // extensions decorate it too.\n let label: ReactNode = rendersAsSection(field, ctx.layout.mode) ? (\n field.label === \"\" ? null : <SectionHeading field={field} size={ctx.size} helpDisplay={help} />\n ) : (\n <FieldLabel field={field} fieldId={fieldId} size={ctx.layout.mode === \"properties\" ? propertyControlSize[ctx.size] : ctx.size} helpDisplay={help} />\n );\n // A field's `x-layout: inline|stack` overrides the form-level layout for its\n // own value subtree (the field's own row keeps the parent layout). \"table\" is\n // handled structurally inside the array/string-map controls, not here.\n const overrideMode =\n field.layout === \"inline\" ? \"inline\" : field.layout === \"stack\" ? \"stacked\" : undefined;\n const nestedProperty = ctx.layout.mode === \"properties\" && (field.kind === \"object\" || field.kind === \"string-map\");\n // A disabled field keeps its real control (unlike readOnly's value text), and\n // containers read ctx.readOnly, so a disabled object disables its subtree.\n const valueCtx: RenderContext = {\n ...ctx,\n ...(field.disabled ? { readOnly: true } : {}),\n ...(view ? { viewOnly: true } : {}),\n ...(ctx.layout.mode === \"properties\" && !nestedProperty ? { size: propertyControlSize[ctx.size] } : {}),\n instancePath,\n ...(overrideMode && !nestedProperty ? { layout: { ...ctx.layout, mode: overrideMode } } : {}),\n ...(ctx.layout.mode === \"properties\" && field.kind === \"array\"\n ? { layout: { ...ctx.layout, mode: overrideMode ?? \"stacked\" } } : {}),\n };\n let value: ReactNode = renderValueControl(field, valueCtx);\n const postCtx = {\n ...(ctx.rootValue ? { rootValue: ctx.rootValue } : {}),\n ...(ctx.onRootChange ? { onRootChange: ctx.onRootChange } : {}),\n instancePath,\n };\n ({ label, value } = applyPostExtensions(\n field,\n { label, value },\n ctx.post,\n postCtx,\n ));\n if (ctx.layout.mode === \"properties\" && !nestedProperty && field.kind !== \"display\" && field.kind !== \"link\") {\n value = <PropertyValueEditor field={field} fieldId={fieldId} ctx={valueCtx}\n renderPreview={(previewField) => applyPostExtensions(\n { ...previewField, readOnly: true },\n { label, value: <PropertyValuePreview field={previewField} fieldId={`${fieldId}-preview`} ctx={{ ...valueCtx, idPrefix: `${ctx.idPrefix ?? \"\"}-preview` }} /> },\n ctx.post,\n postCtx,\n ).value}\n renderEditor={(draftField, draftCtx) => applyPostExtensions(\n draftField,\n { label, value: renderValueControl(draftField, draftCtx) },\n draftCtx.post,\n { ...postCtx, ...(draftCtx.rootValue ? { rootValue: draftCtx.rootValue } : {}), ...(draftCtx.onRootChange ? { onRootChange: draftCtx.onRootChange } : {}) },\n ).value} />;\n }\n if (ctx.debug && field.kind !== \"display\") {\n ({ label, value } = withFieldDebug({ label, value }, { fieldKey: args.key, instancePath, field, prop: args.prop, hiddenReason }));\n }\n return { field, fieldId, label, value, messages, help };\n}\n\n// renderFieldNodes runs the full pipeline and returns the raw {label, value}\n// nodes (no FieldWrapper). Used where the caller arranges layout itself — map\n// rows (value only) and scalar array items.\nexport function renderFieldNodes(\n args: FieldArgs,\n ctx: RenderContext,\n): { label: ReactNode; value: ReactNode } | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n return {\n label: built.label,\n value:\n built.messages.length > 0 ? (\n <div className=\"flex min-w-0 flex-col gap-0.5\">\n {built.value}\n <FieldErrorText id={fieldErrorId(built.fieldId)} errors={built.messages} />\n </div>\n ) : (\n built.value\n ),\n };\n}\n\n// renderFieldRow runs the pipeline and wraps it in a FieldWrapper with the soft\n// validation hint. `labelOverride` lets a container relabel a field that has no\n// natural key (e.g. array items → \"Item 1\").\nexport function renderFieldRow(\n args: FieldArgs,\n ctx: RenderContext,\n opts?: { labelOverride?: string },\n): ReactNode | null {\n const built = buildField(args, ctx);\n if (!built) return null;\n const { field } = built;\n if (ctx.layout.mode === \"properties\" && field.kind !== \"display\") {\n return <PropertiesFieldRow {...built} label={opts?.labelOverride ?? built.label} ctx={ctx} />;\n }\n // Object fields — and table-laid-out arrays/string-maps — render as a flat\n // section: a header followed by their body at full width, rather than an\n // inline label + narrow value column. This keeps deep schemas (e.g. policy →\n // shape, asfile → params) readable as a single column of labelled sections,\n // and gives a `x-layout: \"table\"` array the full width its columns need\n // instead of cramming it into the inline value column.\n // An accordion joins this list: crammed into the 600px inline value column it\n // is unusable, and it needs the ObjectSection header to carry the array's own\n // title, required marker and help. Cards are the same shape of thing — a\n // full-width stack of item panels — so they join it too.\n if (rendersAsSection(field, ctx.layout.mode)) {\n return (\n <ObjectSection\n heading={\n opts?.labelOverride === undefined ? built.label : opts.labelOverride === \"\" ? null : (\n <SectionHeading field={field} label={opts.labelOverride} size={ctx.size} helpDisplay={built.help} />\n )\n }\n size={ctx.size}\n helpDisplay={built.help}\n {...(field.helper ? { helper: field.helper } : {})}\n >\n <FieldErrorText\n id={fieldErrorId(built.fieldId)}\n errors={built.messages}\n className=\"min-w-0 break-words\"\n />\n {built.value}\n </ObjectSection>\n );\n }\n // A display field (heading/divider/info/spacer) is the label — it carries no\n // value column, so it spans the full grid width with no inline label cell.\n if (field.kind === \"display\") {\n return <div className=\"col-span-full\">{built.value}</div>;\n }\n const label = opts?.labelOverride ? (\n <span className={cn(\"flex items-center gap-2 font-medium\", labelSizeClass[ctx.size])}>\n <LabelIcon icon={field.labelIcon} className=\"text-[15px] text-muted-foreground\" />\n <span>{opts.labelOverride}</span>\n {field.required && <span className=\"text-destructive\">*</span>}\n {field.badge && (\n <span className=\"rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-muted-foreground\">\n {field.badge}\n </span>\n )}\n {/* Without this the `?` silently disappears for relabelled rows (array\n items), taking the description with it — FieldWrapper has already\n dropped the paragraph by then. */}\n {built.help === \"hover\" && field.helper && (\n <HelpHint label={opts.labelOverride} helper={field.helper} />\n )}\n </span>\n ) : (\n built.label\n );\n // One rendering path for both sources, so the soft hint lands in the same\n // fieldErrorId element the control's aria-describedby already points at.\n const err =\n built.messages.length > 0 ? (\n <FieldErrorMessages id={fieldErrorId(built.fieldId)} errors={built.messages} />\n ) : undefined;\n return (\n <FieldWrapper\n layout={ctx.layout}\n size={ctx.size}\n label={label}\n value={built.value}\n {...(field.colSpan === \"full\" ? { maxWidth: \"none\" } : {})}\n {...(field.helper && built.help !== \"hover\" ? { helper: field.helper } : {})}\n {...(err ? { error: err } : {})}\n />\n );\n}\n\n// renderObjectFields maps an object subschema's effective properties to field\n// rows. It is the recursive heart, shared by the top-level form and the nested\n// ObjectControl. Edits spread immutably onto the object, carrying the value\n// effects of the edited field's `x-on-change` listeners in the same commit.\nexport function renderObjectFields(\n schema: JsonSchemaObject,\n value: Record<string, unknown>,\n onChange: (next: Record<string, unknown>) => void,\n ctx: RenderContext,\n opts?: { hiddenKeys?: string[] },\n): ReactNode[] {\n const listenerOptions = {\n root: ctx.rootValue ?? value,\n ...(ctx.expressionEvaluator ? { evaluate: ctx.expressionEvaluator } : {}),\n };\n const { properties, required } = applyListenerState(schema, value, listenerOptions);\n const hidden = new Set(opts?.hiddenKeys ?? []);\n // Per-property `x-clicky-order` wins (composes across merged branches); the\n // object-level `x-order` array is the fallback; document order otherwise.\n const ordered = orderByClickyOrder(orderByXOrder(Object.entries(properties), schema[\"x-order\"]));\n const sorted =\n ctx.sortMode === \"required-first\"\n ? orderRequiredFirst(ordered, required)\n : ctx.sortMode === \"priority\"\n ? orderByPriority(ordered, required, value)\n : ordered;\n // The field filter narrows only the outermost object level (depth 0); nested\n // object subtrees render in full so a matched parent keeps all its children.\n const entries =\n ctx.depth === 0 && ctx.fieldFilter\n ? sorted.filter(([key, prop]) => matchesFieldFilter({ key, prop, filter: ctx.fieldFilter!, value: value[key] }))\n : sorted;\n // Object-level `x-columns` lays the fields out in a multi-column stacked grid;\n // each field spans `x-col-span` columns (object sections/table arrays span the\n // full row). Only takes effect in stacked mode — inline owns its 2-track grid.\n const columns = ctx.layout.mode !== \"stacked\" ? 1 : normalizeColumns(schema[\"x-columns\"]);\n const arrayEntries = entries.filter(([, prop]) => prop.type === \"array\");\n const compactArrays = ctx.layout.mode !== \"properties\" && arrayEntries.length > 3;\n const rows = entries.flatMap(([key, prop]) => {\n if (hidden.has(key)) return [];\n if (compactArrays && prop.type === \"array\" && (!Array.isArray(value[key]) || value[key].length === 0)) return [];\n const row = renderFieldRow(\n {\n key,\n prop,\n required: required.includes(key),\n value: value[key],\n onChange: (next) => onChange(applyChangeEffects(schema, { ...listenerOptions, value, key, next })),\n instancePath: appendInstancePath(ctx.instancePath, key),\n },\n ctx,\n );\n if (!row) return [];\n if (columns === \"auto\" || columns > 1) {\n const span = rendersFullWidth(prop)\n ? \"full\"\n : normalizeColSpan(prop[\"x-col-span\"], columns);\n return [\n <div\n key={key}\n // Under \"auto\" the track count only exists at layout time, so a\n // full-width field must say `1 / -1` rather than span a number.\n style={{\n gridColumn: span === \"full\" ? \"1 / -1\" : `span ${span} / span ${span}`,\n }}\n >\n {row}\n </div>,\n ];\n }\n // `contents` keeps the keyed wrapper out of the box tree so the row's own\n // node (a subgrid FieldWrapper or a full-width ObjectSection) is a direct\n // child of the FieldsGrid and snaps to its label/value tracks.\n return [<div key={key} className=\"contents\">{row}</div>];\n });\n if (compactArrays && !ctx.readOnly && !ctx.presentation) {\n const available = arrayEntries.filter(([key, prop]) =>\n !hidden.has(key) && (!Array.isArray(value[key]) || prop.maxItems === undefined || value[key].length < prop.maxItems),\n );\n if (available.length > 0) {\n rows.push(\n <div key=\"keyed-array-add\" className=\"col-span-full w-full max-w-72\">\n <Combobox\n ariaLabel=\"Add item\"\n placeholder=\"Add item…\"\n options={available.map(([key, prop]) => ({ value: key, label: prop.title || key }))}\n value=\"\"\n allowCustomValue={false}\n onChange={(key) => {\n const prop = properties[key];\n if (!prop || prop.type !== \"array\") throw new Error(`cannot add item to ${key}`);\n const items = value[key];\n if (items !== undefined && !Array.isArray(items)) throw new Error(`${key} is not an array`);\n onChange({ ...value, [key]: [...(items ?? []), seedFromSchema(prop.items ?? { type: \"string\" })] });\n }}\n />\n </div>,\n );\n }\n }\n return rows;\n}\n\n// rendersFullWidth reports whether a property renders as a full-width block\n// (a structured object → ObjectSection, or an `x-layout: \"table\"` array/map) so\n// a multi-column grid gives it the whole row instead of a single column.\nfunction rendersFullWidth(prop: JsonSchemaProperty): boolean {\n const fixedProperties = effectiveProperties(prop as JsonSchemaObject, {}).properties;\n if (schemaRendersAsObject(prop) && (prop.properties !== undefined || Object.keys(fixedProperties).length > 0)) {\n return true;\n }\n // An object-item array is a summary-row list (or cards) unless it opts out,\n // and each of those renderers owns the row — mirrors ArrayControl's own\n // branching, which decides the same thing from the resolved FieldControl.\n if (hasObjectItemProperties(prop.items) && prop[\"x-array-display\"] !== \"stacked\") {\n return true;\n }\n return prop[\"x-layout\"] === \"table\";\n}\n\n// renderApi is the RenderContext injection bundle: the root form stores it on\n// the context so container controls can recurse without importing this module.\nexport const renderApi: RenderApi = {\n renderFieldNodes,\n renderFieldRow,\n renderObjectFields,\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwEO,SAAS,mBAAmB,OAAqB,KAA+B;AAGrF,QAAM,UAAU,aAAa,IAAI,cAAc,IAAI,QAAQ;AAC3D,MAAI,IAAI,gBAAgB,MAAM,SAAS,aAAa,MAAM,SAAS,QAAQ;AACzE,WAAO,oBAAC,sBAAA,EAAqB,OAAc,SAAkB,IAAA,CAAU;AAAA,EACzE;AASA,MAAI,MAAM,YAAY,CAAC,sBAAsB,MAAM,IAAI,GAAG;AACxD,+BAAQ,eAAA,EAAc,OAAc,SAAkB,MAAM,IAAI,MAAM;AAAA,EACxE;AACA,QAAM,WAAW,IAAI,YAAY,MAAM,aAAa;AACpD,QAAM,OAAO,IAAI;AACjB,UAAQ,MAAM,MAAA;AAAA,IACZ,KAAK;AACH,aAAO,oBAAC,aAAA,EAAY,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACtF,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACC,GAAI,IAAI,YAAY,EAAE,WAAW,IAAI,UAAA,IAAc,CAAA;AAAA,QAAC;AAAA,MAAA;AAAA,IAG3D,KAAK;AACH,aAAO,oBAAC,gBAAA,EAAe,OAAc,SAAkB,UAAoB,MAAY;AAAA,IACzF,KAAK;AACH,aAAO,oBAAC,e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kBAAkB,oBAAoB,MAA0B,CAAA,CAAE,EAAE;AAC1E,MAAI,sBAAsB,IAAI,MAAM,KAAK,eAAe,UAAa,OAAO,KAAK,eAAe,EAAE,SAAS,IAAI;AAC7G,WAAO;AAAA,EACT;AAIA,MAAI,wBAAwB,KAAK,KAAK,KAAK,KAAK,iBAAiB,MAAM,WAAW;AAChF,WAAO;AAAA,EACT;AACA,SAAO,KAAK,UAAU,MAAM;AAC9B;AAIO,MAAM,YAAuB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-form-runtime-types.d.ts","sourceRoot":"","sources":["../../src/components/json-schema-form-runtime-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EACV,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,gBAAgB,EAChB,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAMlC,MAAM,WAAW,gBAAgB;IAE/B,GAAG,EAAE,MAAM,CAAC;IAGZ,MAAM,EAAE,MAAM,CAAC;IAGf,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAGhB,KAAK,CAAC,EAAE,WAAW,CAAC;IAKpB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B;AAID,MAAM,WAAW,eAAe;IAG9B,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,WAAW;IAE1B,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,EAAE,MAAM,CAAC;IAGb,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