@tai42/studio-sdk 16.0.0 → 17.0.0
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/components/code-block.js +1 -1
- package/dist/components/code-block.js.map +1 -1
- package/dist/components/confirm-dialog.js +1 -1
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-field.js +1 -1
- package/dist/components/copy-field.js.map +1 -1
- package/dist/components/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/dirty-guard.d.ts.map +1 -1
- package/dist/components/dirty-guard.js +1 -1
- package/dist/components/dirty-guard.js.map +1 -1
- package/dist/components/explorer-body.d.ts +49 -0
- package/dist/components/explorer-body.d.ts.map +1 -0
- package/dist/components/explorer-body.js +67 -0
- package/dist/components/explorer-body.js.map +1 -0
- package/dist/components/explorer-page-size.d.ts +4 -0
- package/dist/components/explorer-page-size.d.ts.map +1 -0
- package/dist/components/explorer-page-size.js +36 -0
- package/dist/components/explorer-page-size.js.map +1 -0
- package/dist/components/explorer-tag-filter.d.ts +17 -0
- package/dist/components/explorer-tag-filter.d.ts.map +1 -0
- package/dist/components/explorer-tag-filter.js +29 -0
- package/dist/components/explorer-tag-filter.js.map +1 -0
- package/dist/components/explorer-tags.d.ts +22 -0
- package/dist/components/explorer-tags.d.ts.map +1 -0
- package/dist/components/explorer-tags.js +51 -0
- package/dist/components/explorer-tags.js.map +1 -0
- package/dist/components/explorer-view.d.ts +3 -17
- package/dist/components/explorer-view.d.ts.map +1 -1
- package/dist/components/explorer-view.js +53 -170
- package/dist/components/explorer-view.js.map +1 -1
- package/dist/components/extension-combo-builder.d.ts +1 -6
- package/dist/components/extension-combo-builder.d.ts.map +1 -1
- package/dist/components/extension-combo-builder.js +4 -79
- package/dist/components/extension-combo-builder.js.map +1 -1
- package/dist/components/extension-combo-parts.d.ts +44 -0
- package/dist/components/extension-combo-parts.d.ts.map +1 -0
- package/dist/components/extension-combo-parts.js +52 -0
- package/dist/components/extension-combo-parts.js.map +1 -0
- package/dist/components/field.d.ts +8 -0
- package/dist/components/field.d.ts.map +1 -1
- package/dist/components/field.js +0 -8
- package/dist/components/field.js.map +1 -1
- package/dist/components/fleet-report.d.ts +1 -1
- package/dist/components/fleet-report.d.ts.map +1 -1
- package/dist/components/fleet-report.js +51 -37
- package/dist/components/fleet-report.js.map +1 -1
- package/dist/components/folder-nav.d.ts.map +1 -1
- package/dist/components/folder-nav.js +1 -1
- package/dist/components/folder-nav.js.map +1 -1
- package/dist/components/form-dialog.d.ts.map +1 -1
- package/dist/components/form-dialog.js +1 -1
- package/dist/components/form-dialog.js.map +1 -1
- package/dist/components/icons/chrome-marks.d.ts +50 -0
- package/dist/components/icons/chrome-marks.d.ts.map +1 -0
- package/dist/components/icons/chrome-marks.js +51 -0
- package/dist/components/icons/chrome-marks.js.map +1 -0
- package/dist/components/icons/icon-frame.d.ts +29 -0
- package/dist/components/icons/icon-frame.d.ts.map +1 -0
- package/dist/components/icons/icon-frame.js +19 -0
- package/dist/components/icons/icon-frame.js.map +1 -0
- package/dist/components/icons/index.d.ts +40 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/icons/index.js +39 -0
- package/dist/components/icons/index.js.map +1 -0
- package/dist/components/icons/nav-map.d.ts +14 -0
- package/dist/components/icons/nav-map.d.ts.map +1 -0
- package/dist/components/icons/nav-map.js +28 -0
- package/dist/components/icons/nav-map.js.map +1 -0
- package/dist/components/icons/nav-marks.d.ts +44 -0
- package/dist/components/icons/nav-marks.d.ts.map +1 -0
- package/dist/components/icons/nav-marks.js +45 -0
- package/dist/components/icons/nav-marks.js.map +1 -0
- package/dist/components/icons/status-marks.d.ts +21 -0
- package/dist/components/icons/status-marks.d.ts.map +1 -0
- package/dist/components/icons/status-marks.js +22 -0
- package/dist/components/icons/status-marks.js.map +1 -0
- package/dist/components/icons/theme-marks.d.ts +9 -0
- package/dist/components/icons/theme-marks.d.ts.map +1 -0
- package/dist/components/icons/theme-marks.js +10 -0
- package/dist/components/icons/theme-marks.js.map +1 -0
- package/dist/components/inputs.js.map +1 -1
- package/dist/components/json-diff.d.ts.map +1 -1
- package/dist/components/json-diff.js +1 -3
- package/dist/components/json-diff.js.map +1 -1
- package/dist/components/json-tree-context.d.ts +13 -0
- package/dist/components/json-tree-context.d.ts.map +1 -0
- package/dist/components/json-tree-context.js +15 -0
- package/dist/components/json-tree-context.js.map +1 -0
- package/dist/components/json-tree-model.d.ts +56 -0
- package/dist/components/json-tree-model.d.ts.map +1 -0
- package/dist/components/json-tree-model.js +125 -0
- package/dist/components/json-tree-model.js.map +1 -0
- package/dist/components/json-tree-nodes.d.ts +35 -0
- package/dist/components/json-tree-nodes.d.ts.map +1 -0
- package/dist/components/json-tree-nodes.js +113 -0
- package/dist/components/json-tree-nodes.js.map +1 -0
- package/dist/components/json-tree.d.ts +20 -0
- package/dist/components/json-tree.d.ts.map +1 -1
- package/dist/components/json-tree.js +7 -315
- package/dist/components/json-tree.js.map +1 -1
- package/dist/components/json-value-format.d.ts +20 -0
- package/dist/components/json-value-format.d.ts.map +1 -0
- package/dist/components/json-value-format.js +63 -0
- package/dist/components/json-value-format.js.map +1 -0
- package/dist/components/markdown-blocks.d.ts +38 -0
- package/dist/components/markdown-blocks.d.ts.map +1 -0
- package/dist/components/markdown-blocks.js +168 -0
- package/dist/components/markdown-blocks.js.map +1 -0
- package/dist/components/markdown-inline.d.ts +24 -0
- package/dist/components/markdown-inline.d.ts.map +1 -0
- package/dist/components/markdown-inline.js +257 -0
- package/dist/components/markdown-inline.js.map +1 -0
- package/dist/components/markdown.d.ts +3 -52
- package/dist/components/markdown.d.ts.map +1 -1
- package/dist/components/markdown.js +4 -376
- package/dist/components/markdown.js.map +1 -1
- package/dist/components/observer-registry.d.ts +38 -0
- package/dist/components/observer-registry.d.ts.map +1 -0
- package/dist/components/observer-registry.js +131 -0
- package/dist/components/observer-registry.js.map +1 -0
- package/dist/components/overflow-measure.d.ts +38 -0
- package/dist/components/overflow-measure.d.ts.map +1 -0
- package/dist/components/overflow-measure.js +54 -0
- package/dist/components/overflow-measure.js.map +1 -0
- package/dist/components/page-fill.d.ts.map +1 -1
- package/dist/components/page-fill.js.map +1 -1
- package/dist/components/prose-regions.d.ts +81 -0
- package/dist/components/prose-regions.d.ts.map +1 -0
- package/dist/components/prose-regions.js +128 -0
- package/dist/components/prose-regions.js.map +1 -0
- package/dist/components/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group.js.map +1 -1
- package/dist/components/scroll-region.d.ts +24 -0
- package/dist/components/scroll-region.d.ts.map +1 -1
- package/dist/components/scroll-region.js +3 -322
- package/dist/components/scroll-region.js.map +1 -1
- package/dist/components/tab-stop-parse.d.ts +53 -0
- package/dist/components/tab-stop-parse.d.ts.map +1 -0
- package/dist/components/tab-stop-parse.js +202 -0
- package/dist/components/tab-stop-parse.js.map +1 -0
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/tags.d.ts.map +1 -1
- package/dist/components/tags.js +1 -1
- package/dist/components/tags.js.map +1 -1
- package/dist/components/templated-text-field.d.ts +1 -1
- package/dist/components/templated-text-field.d.ts.map +1 -1
- package/dist/components/templated-text-field.js +10 -174
- package/dist/components/templated-text-field.js.map +1 -1
- package/dist/components/templated-text-kwargs-editor.d.ts +24 -0
- package/dist/components/templated-text-kwargs-editor.d.ts.map +1 -0
- package/dist/components/templated-text-kwargs-editor.js +48 -0
- package/dist/components/templated-text-kwargs-editor.js.map +1 -0
- package/dist/components/templated-text-kwargs.d.ts +37 -0
- package/dist/components/templated-text-kwargs.d.ts.map +1 -0
- package/dist/components/templated-text-kwargs.js +66 -0
- package/dist/components/templated-text-kwargs.js.map +1 -0
- package/dist/components/templated-text-source.d.ts +33 -0
- package/dist/components/templated-text-source.d.ts.map +1 -0
- package/dist/components/templated-text-source.js +53 -0
- package/dist/components/templated-text-source.js.map +1 -0
- package/dist/components/tool-picker-parts.d.ts +39 -0
- package/dist/components/tool-picker-parts.d.ts.map +1 -0
- package/dist/components/tool-picker-parts.js +87 -0
- package/dist/components/tool-picker-parts.js.map +1 -0
- package/dist/components/tool-picker.d.ts +1 -2
- package/dist/components/tool-picker.d.ts.map +1 -1
- package/dist/components/tool-picker.js +4 -66
- package/dist/components/tool-picker.js.map +1 -1
- package/dist/components/version-history-panel.d.ts.map +1 -1
- package/dist/components/version-history-panel.js +7 -34
- package/dist/components/version-history-panel.js.map +1 -1
- package/dist/components/version-history-rows.d.ts +48 -0
- package/dist/components/version-history-rows.d.ts.map +1 -0
- package/dist/components/version-history-rows.js +51 -0
- package/dist/components/version-history-rows.js.map +1 -0
- package/dist/components/view-toggle.d.ts.map +1 -1
- package/dist/components/view-toggle.js.map +1 -1
- package/dist/element-slot.d.ts +11 -0
- package/dist/element-slot.d.ts.map +1 -1
- package/dist/element-slot.js +0 -11
- package/dist/element-slot.js.map +1 -1
- package/dist/guards.d.ts +6 -0
- package/dist/guards.d.ts.map +1 -0
- package/dist/guards.js +8 -0
- package/dist/guards.js.map +1 -0
- package/dist/hooks/interactions-connection.d.ts +43 -0
- package/dist/hooks/interactions-connection.d.ts.map +1 -0
- package/dist/hooks/interactions-connection.js +171 -0
- package/dist/hooks/interactions-connection.js.map +1 -0
- package/dist/hooks/interactions-stream.d.ts +80 -0
- package/dist/hooks/interactions-stream.d.ts.map +1 -0
- package/dist/hooks/interactions-stream.js +233 -0
- package/dist/hooks/interactions-stream.js.map +1 -0
- package/dist/hooks/useApi.d.ts +2259 -2189
- package/dist/hooks/useApi.d.ts.map +1 -1
- package/dist/hooks/useApi.js +0 -11
- package/dist/hooks/useApi.js.map +1 -1
- package/dist/hooks/useAuth.d.ts +6 -0
- package/dist/hooks/useAuth.d.ts.map +1 -1
- package/dist/hooks/useAuth.js +0 -6
- package/dist/hooks/useAuth.js.map +1 -1
- package/dist/hooks/useCapabilities.d.ts +18 -2
- package/dist/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/hooks/useCapabilities.js +1 -17
- package/dist/hooks/useCapabilities.js.map +1 -1
- package/dist/hooks/useSse.d.ts +34 -6
- package/dist/hooks/useSse.d.ts.map +1 -1
- package/dist/hooks/useSse.js +27 -471
- package/dist/hooks/useSse.js.map +1 -1
- package/dist/hooks/useSystemKinds.d.ts +1 -1
- package/dist/hooks/useSystemKinds.d.ts.map +1 -1
- package/dist/hooks/useSystemKinds.js +0 -18
- package/dist/hooks/useSystemKinds.js.map +1 -1
- package/dist/hooks/useTheme.d.ts +15 -0
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useTheme.js +0 -15
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/hooks/useToolDisplayNames.d.ts +0 -14
- package/dist/hooks/useToolDisplayNames.d.ts.map +1 -1
- package/dist/hooks/useToolDisplayNames.js +0 -14
- package/dist/hooks/useToolDisplayNames.js.map +1 -1
- package/dist/host.d.ts +3 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +2 -9
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +103 -103
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +49 -62
- package/dist/index.js.map +1 -1
- package/dist/navigation/app-link.d.ts +25 -0
- package/dist/navigation/app-link.d.ts.map +1 -0
- package/dist/navigation/app-link.js +33 -0
- package/dist/navigation/app-link.js.map +1 -0
- package/dist/navigation/context.d.ts +3 -20
- package/dist/navigation/context.d.ts.map +1 -1
- package/dist/navigation/context.js +7 -267
- package/dist/navigation/context.js.map +1 -1
- package/dist/navigation/entry-state.d.ts +23 -0
- package/dist/navigation/entry-state.d.ts.map +1 -0
- package/dist/navigation/entry-state.js +39 -0
- package/dist/navigation/entry-state.js.map +1 -0
- package/dist/navigation/guard-registry.d.ts +30 -0
- package/dist/navigation/guard-registry.d.ts.map +1 -0
- package/dist/navigation/guard-registry.js +46 -0
- package/dist/navigation/guard-registry.js.map +1 -0
- package/dist/navigation/guarded-navigation.d.ts +24 -0
- package/dist/navigation/guarded-navigation.d.ts.map +1 -0
- package/dist/navigation/guarded-navigation.js +102 -0
- package/dist/navigation/guarded-navigation.js.map +1 -0
- package/dist/navigation/index.d.ts +5 -4
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +2 -1
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/types.d.ts +8 -11
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/navigation/use-back-forward-guard.d.ts +12 -0
- package/dist/navigation/use-back-forward-guard.d.ts.map +1 -0
- package/dist/navigation/use-back-forward-guard.js +75 -0
- package/dist/navigation/use-back-forward-guard.js.map +1 -0
- package/dist/navigation/use-search-commit.d.ts.map +1 -1
- package/dist/navigation/use-search-commit.js.map +1 -1
- package/dist/plugin/host-state.d.ts.map +1 -1
- package/dist/plugin/host-state.js.map +1 -1
- package/dist/plugin/registry.d.ts +6 -15
- package/dist/plugin/registry.d.ts.map +1 -1
- package/dist/plugin/registry.js +83 -75
- package/dist/plugin/registry.js.map +1 -1
- package/dist/schema-editor/SchemaEditor.d.ts.map +1 -1
- package/dist/schema-editor/SchemaEditor.js.map +1 -1
- package/dist/schema-editor/index.d.ts +3 -3
- package/dist/schema-editor/index.d.ts.map +1 -1
- package/dist/schema-editor/index.js +1 -6
- package/dist/schema-editor/index.js.map +1 -1
- package/dist/schema-form/SecretRefField.d.ts +18 -3
- package/dist/schema-form/SecretRefField.d.ts.map +1 -1
- package/dist/schema-form/SecretRefField.js +21 -26
- package/dist/schema-form/SecretRefField.js.map +1 -1
- package/dist/schema-form/classify.d.ts +1 -113
- package/dist/schema-form/classify.d.ts.map +1 -1
- package/dist/schema-form/classify.js +174 -246
- package/dist/schema-form/classify.js.map +1 -1
- package/dist/schema-form/context.d.ts +6 -0
- package/dist/schema-form/context.d.ts.map +1 -1
- package/dist/schema-form/context.js +0 -6
- package/dist/schema-form/context.js.map +1 -1
- package/dist/schema-form/default-value.d.ts.map +1 -1
- package/dist/schema-form/default-value.js +42 -19
- package/dist/schema-form/default-value.js.map +1 -1
- package/dist/schema-form/enum-field.d.ts +1 -1
- package/dist/schema-form/enum-field.d.ts.map +1 -1
- package/dist/schema-form/field-group.d.ts +6 -0
- package/dist/schema-form/field-group.d.ts.map +1 -1
- package/dist/schema-form/field-group.js +0 -6
- package/dist/schema-form/field-group.js.map +1 -1
- package/dist/schema-form/field-model.d.ts +121 -0
- package/dist/schema-form/field-model.d.ts.map +1 -0
- package/dist/schema-form/field-model.js +2 -0
- package/dist/schema-form/field-model.js.map +1 -0
- package/dist/schema-form/field-node.d.ts.map +1 -1
- package/dist/schema-form/field-node.js +25 -14
- package/dist/schema-form/field-node.js.map +1 -1
- package/dist/schema-form/index.d.ts +8 -8
- package/dist/schema-form/index.d.ts.map +1 -1
- package/dist/schema-form/index.js +3 -34
- package/dist/schema-form/index.js.map +1 -1
- package/dist/schema-form/json-field.d.ts +19 -0
- package/dist/schema-form/json-field.d.ts.map +1 -1
- package/dist/schema-form/json-field.js +0 -19
- package/dist/schema-form/json-field.js.map +1 -1
- package/dist/schema-form/media-field.d.ts +1 -1
- package/dist/schema-form/media-field.d.ts.map +1 -1
- package/dist/schema-form/media-field.js +49 -30
- package/dist/schema-form/media-field.js.map +1 -1
- package/dist/schema-form/record-field.d.ts +12 -0
- package/dist/schema-form/record-field.d.ts.map +1 -1
- package/dist/schema-form/record-field.js +1 -13
- package/dist/schema-form/record-field.js.map +1 -1
- package/dist/schema-form/string-annotations.d.ts +20 -0
- package/dist/schema-form/string-annotations.d.ts.map +1 -0
- package/dist/schema-form/string-annotations.js +105 -0
- package/dist/schema-form/string-annotations.js.map +1 -0
- package/dist/schema-form/string-field.d.ts +1 -1
- package/dist/schema-form/string-field.d.ts.map +1 -1
- package/dist/schema-form/string-field.js +1 -1
- package/dist/schema-form/string-field.js.map +1 -1
- package/dist/schema-form/union-field.d.ts +1 -1
- package/dist/schema-form/union-field.d.ts.map +1 -1
- package/dist/schema-form/union-field.js.map +1 -1
- package/dist/schema-form/union.d.ts +8 -1
- package/dist/schema-form/union.d.ts.map +1 -1
- package/dist/schema-form/union.js +0 -7
- package/dist/schema-form/union.js.map +1 -1
- package/dist/schema-form/validate.d.ts.map +1 -1
- package/dist/schema-form/validate.js +126 -105
- package/dist/schema-form/validate.js.map +1 -1
- package/dist/state-binding/AdapterMapping.d.ts.map +1 -1
- package/dist/state-binding/AdapterMapping.js +0 -0
- package/dist/state-binding/AdapterMapping.js.map +1 -1
- package/dist/state-binding/BindingJqField.d.ts.map +1 -1
- package/dist/state-binding/BindingJqField.js +2 -2
- package/dist/state-binding/BindingJqField.js.map +1 -1
- package/dist/state-binding/InputInjectionRow.d.ts.map +1 -1
- package/dist/state-binding/InputInjectionRow.js +3 -3
- package/dist/state-binding/InputInjectionRow.js.map +1 -1
- package/dist/state-binding/StateAttachRow.d.ts.map +1 -1
- package/dist/state-binding/StateAttachRow.js +57 -41
- package/dist/state-binding/StateAttachRow.js.map +1 -1
- package/dist/state-binding/StateBindingSection.d.ts.map +1 -1
- package/dist/state-binding/StateBindingSection.js.map +1 -1
- package/dist/state-binding/SubjectScopeFields.d.ts.map +1 -1
- package/dist/state-binding/SubjectScopeFields.js.map +1 -1
- package/dist/state-binding/UpdateRow.d.ts.map +1 -1
- package/dist/state-binding/UpdateRow.js +2 -2
- package/dist/state-binding/UpdateRow.js.map +1 -1
- package/dist/state-binding/adapter-mapping-row.d.ts +17 -0
- package/dist/state-binding/adapter-mapping-row.d.ts.map +1 -0
- package/dist/state-binding/adapter-mapping-row.js +87 -0
- package/dist/state-binding/adapter-mapping-row.js.map +1 -0
- package/dist/state-binding/index.d.ts +21 -21
- package/dist/state-binding/index.d.ts.map +1 -1
- package/dist/state-binding/index.js +9 -15
- package/dist/state-binding/index.js.map +1 -1
- package/dist/state-binding/templated-text-catalog.d.ts.map +1 -1
- package/dist/state-binding/templated-text-catalog.js.map +1 -1
- package/dist/state-binding/types.d.ts +2 -2
- package/dist/state-binding/types.d.ts.map +1 -1
- package/dist/structured-output/StructuredOutput.d.ts.map +1 -1
- package/dist/structured-output/StructuredOutput.js +1 -3
- package/dist/structured-output/StructuredOutput.js.map +1 -1
- package/package.json +2 -2
- package/src/components/code-block.tsx +1 -1
- package/src/components/confirm-dialog.tsx +1 -1
- package/src/components/copy-field.tsx +1 -1
- package/src/components/date-range-picker.tsx +1 -1
- package/src/components/dialog.tsx +1 -1
- package/src/components/dirty-guard.tsx +3 -3
- package/src/components/explorer-body.tsx +239 -0
- package/src/components/explorer-page-size.ts +39 -0
- package/src/components/explorer-tag-filter.tsx +80 -0
- package/src/components/explorer-tags.ts +64 -0
- package/src/components/explorer-view.tsx +115 -367
- package/src/components/extension-combo-builder.tsx +35 -153
- package/src/components/extension-combo-parts.tsx +236 -0
- package/src/components/field.tsx +1 -1
- package/src/components/fleet-report.tsx +98 -55
- package/src/components/folder-nav.tsx +2 -2
- package/src/components/form-dialog.tsx +2 -2
- package/src/components/icons/chrome-marks.tsx +195 -0
- package/src/components/icons/icon-frame.tsx +50 -0
- package/src/components/icons/index.ts +84 -0
- package/src/components/icons/nav-map.ts +55 -0
- package/src/components/icons/nav-marks.tsx +205 -0
- package/src/components/icons/status-marks.tsx +46 -0
- package/src/components/icons/theme-marks.tsx +33 -0
- package/src/components/inputs.tsx +1 -1
- package/src/components/json-diff.tsx +1 -4
- package/src/components/json-tree-context.ts +26 -0
- package/src/components/json-tree-model.ts +139 -0
- package/src/components/json-tree-nodes.tsx +224 -0
- package/src/components/json-tree.tsx +15 -434
- package/src/components/json-value-format.ts +64 -0
- package/src/components/markdown-blocks.ts +198 -0
- package/src/components/markdown-inline.tsx +365 -0
- package/src/components/markdown.tsx +6 -472
- package/src/components/observer-registry.ts +139 -0
- package/src/components/overflow-measure.ts +69 -0
- package/src/components/page-fill.tsx +1 -1
- package/src/components/prose-regions.ts +153 -0
- package/src/components/radio-group.tsx +1 -1
- package/src/components/scroll-region.tsx +22 -361
- package/src/components/tab-stop-parse.ts +217 -0
- package/src/components/table.tsx +1 -1
- package/src/components/tags.tsx +2 -2
- package/src/components/templated-text-field.tsx +39 -332
- package/src/components/templated-text-kwargs-editor.tsx +147 -0
- package/src/components/templated-text-kwargs.ts +92 -0
- package/src/components/templated-text-source.tsx +226 -0
- package/src/components/tool-picker-parts.tsx +184 -0
- package/src/components/tool-picker.tsx +22 -114
- package/src/components/version-history-panel.tsx +39 -143
- package/src/components/version-history-rows.tsx +220 -0
- package/src/components/view-toggle.tsx +1 -1
- package/src/element-slot.ts +1 -1
- package/src/guards.ts +7 -0
- package/src/hooks/interactions-connection.ts +227 -0
- package/src/hooks/interactions-stream.ts +274 -0
- package/src/hooks/useApi.ts +1 -1
- package/src/hooks/useAuth.ts +1 -1
- package/src/hooks/useCapabilities.ts +3 -3
- package/src/hooks/useSse.ts +51 -478
- package/src/hooks/useSystemKinds.tsx +2 -2
- package/src/hooks/useTheme.ts +1 -1
- package/src/hooks/useToolDisplayNames.tsx +2 -2
- package/src/host.ts +7 -7
- package/src/index.ts +292 -292
- package/src/navigation/app-link.tsx +70 -0
- package/src/navigation/context.tsx +12 -331
- package/src/navigation/entry-state.ts +42 -0
- package/src/navigation/guard-registry.ts +65 -0
- package/src/navigation/guarded-navigation.ts +147 -0
- package/src/navigation/index.ts +14 -14
- package/src/navigation/types.ts +8 -11
- package/src/navigation/use-back-forward-guard.ts +90 -0
- package/src/navigation/use-search-commit.ts +1 -1
- package/src/plugin/host-state.ts +1 -1
- package/src/plugin/registry.ts +111 -90
- package/src/schema-editor/SchemaEditor.tsx +1 -1
- package/src/schema-editor/index.ts +3 -3
- package/src/schema-form/SecretRefField.tsx +122 -72
- package/src/schema-form/classify.ts +245 -396
- package/src/schema-form/context.ts +1 -1
- package/src/schema-form/default-value.ts +48 -17
- package/src/schema-form/enum-field.tsx +1 -1
- package/src/schema-form/field-group.tsx +1 -1
- package/src/schema-form/field-model.ts +133 -0
- package/src/schema-form/field-node.tsx +95 -39
- package/src/schema-form/index.ts +10 -10
- package/src/schema-form/json-field.tsx +1 -1
- package/src/schema-form/media-field.tsx +136 -67
- package/src/schema-form/record-field.tsx +2 -2
- package/src/schema-form/string-annotations.ts +111 -0
- package/src/schema-form/string-field.tsx +2 -2
- package/src/schema-form/union-field.tsx +3 -2
- package/src/schema-form/union.ts +1 -1
- package/src/schema-form/validate.ts +185 -104
- package/src/state-binding/AdapterMapping.tsx +0 -0
- package/src/state-binding/BindingJqField.tsx +3 -3
- package/src/state-binding/InputInjectionRow.tsx +4 -4
- package/src/state-binding/StateAttachRow.tsx +229 -154
- package/src/state-binding/StateBindingSection.tsx +1 -1
- package/src/state-binding/SubjectScopeFields.tsx +1 -1
- package/src/state-binding/UpdateRow.tsx +3 -3
- package/src/state-binding/adapter-mapping-row.tsx +232 -0
- package/src/state-binding/index.ts +43 -43
- package/src/state-binding/templated-text-catalog.ts +0 -1
- package/src/state-binding/types.ts +2 -2
- package/src/structured-output/StructuredOutput.tsx +1 -4
- package/dist/components/icons.d.ts +0 -160
- package/dist/components/icons.d.ts.map +0 -1
- package/dist/components/icons.js +0 -160
- package/dist/components/icons.js.map +0 -1
- package/src/components/icons.tsx +0 -586
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The overflow measurement and the region-attribute contract: whether a box
|
|
3
|
+
* scrolls right now, and the conditional `tabindex`/`role`/`aria-label` a
|
|
4
|
+
* scrolling box wears. The leaf the React surface and the prose walk both build
|
|
5
|
+
* on; it imports neither of them, which is what breaks the write/measure cycle.
|
|
6
|
+
*/
|
|
7
|
+
export const SCROLL_REGION_CLASS = 'tai-scroll-region';
|
|
8
|
+
export function overflows(element) {
|
|
9
|
+
return element.scrollWidth > element.clientWidth;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Whether the element should carry the region attributes right now.
|
|
13
|
+
*
|
|
14
|
+
* A region that stops overflowing keeps its tab stop for as long as it holds
|
|
15
|
+
* focus: taking `tabindex` off the focused element drops the reader onto the
|
|
16
|
+
* document body, and a window resize is not their doing. Only an element that
|
|
17
|
+
* already has the stop can be the active element, so this can hold a stop open
|
|
18
|
+
* but never invent one.
|
|
19
|
+
*/
|
|
20
|
+
export function needsRegion(element) {
|
|
21
|
+
return overflows(element) || element.ownerDocument.activeElement === element;
|
|
22
|
+
}
|
|
23
|
+
/** Strips the region attributes from a surface that is not a region now. */
|
|
24
|
+
export function clearScrollRegionAttributes(wrapper) {
|
|
25
|
+
wrapper.removeAttribute('tabindex');
|
|
26
|
+
wrapper.removeAttribute('role');
|
|
27
|
+
wrapper.removeAttribute('aria-label');
|
|
28
|
+
}
|
|
29
|
+
/** Applies the same conditional attribute set `ScrollRegion` renders. */
|
|
30
|
+
export function applyScrollRegionAttributes(wrapper, label, scrolling) {
|
|
31
|
+
if (!scrolling) {
|
|
32
|
+
clearScrollRegionAttributes(wrapper);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
wrapper.setAttribute('tabindex', '0');
|
|
36
|
+
wrapper.setAttribute('role', 'region');
|
|
37
|
+
wrapper.setAttribute('aria-label', label);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Re-applies the region attributes to `tracked`, reading ALL of them before
|
|
41
|
+
* writing any.
|
|
42
|
+
*
|
|
43
|
+
* `needsRegion` reads `scrollWidth`, which forces layout if anything has been
|
|
44
|
+
* written since the last one — so measuring and writing surface by surface makes
|
|
45
|
+
* the browser re-lay-out the prose once per surface, every time. Two phases cost
|
|
46
|
+
* one layout for the whole batch however many surfaces it holds.
|
|
47
|
+
*/
|
|
48
|
+
export function refreshRegions(tracked) {
|
|
49
|
+
const scrolling = tracked.map((entry) => needsRegion(entry.surface));
|
|
50
|
+
for (const [index, entry] of tracked.entries()) {
|
|
51
|
+
applyScrollRegionAttributes(entry.surface, entry.label, scrolling[index] === true);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=overflow-measure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"over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AO,EAAE,EAAE,CAAC;QAC/C,2BAA2B,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC;IACrF,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-fill.d.ts","sourceRoot":"","sources":["../../src/components/page-fill.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"page-fill.d.ts","sourceRoot":"","sources":["../../src/components/page-fill.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAiB,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAWhG;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAuBjF;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAQtC;AAED;0DAC0D;AAC1D,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-fill.js","sourceRoot":"","sources":["../../src/components/page-fill.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"page-fill.js","sourceRoot":"","sources":["../../src/components/page-fill.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,aAAa,EAAkB,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQhG,MAAM,uBAAuB,GAAG,aAAa,CAA0B,IAAI,CAAC,CAAC;AAC7E,MAAM,qBAAqB,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAA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markup, naming each by the heading that precedes it, and disambiguating
|
|
4
|
+
* names a section shares. React never renders these surfaces, so they are located
|
|
5
|
+
* and wrapped imperatively.
|
|
6
|
+
*/
|
|
7
|
+
import { type TrackedSurface } from './overflow-measure';
|
|
8
|
+
/**
|
|
9
|
+
* The names for a prose surface that has no heading above it.
|
|
10
|
+
*
|
|
11
|
+
* They say what the surface IS and nothing about which document it came from,
|
|
12
|
+
* because this walk cannot know: it instruments whatever markup the caller
|
|
13
|
+
* injected. A default that named one document put that document's name on every
|
|
14
|
+
* caller's regions, and a region a reader hears the wrong name for is worse than
|
|
15
|
+
* a plain one.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_PROSE_LABELS: {
|
|
18
|
+
readonly table: "Table";
|
|
19
|
+
readonly pre: "Code block";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The most surfaces one rendered document is given regions for.
|
|
23
|
+
*
|
|
24
|
+
* The prose is publisher-authored and unbounded in length, and every region is
|
|
25
|
+
* an entry in the landmark list a screen-reader user navigates the page by: a
|
|
26
|
+
* README with more surfaces than this turns that list into the very thing the
|
|
27
|
+
* regions exist to spare a reader. Past the cap a table still gets its scrolling
|
|
28
|
+
* wrapper — the wrapper is what keeps it inside the column — but no name and no
|
|
29
|
+
* tab stop, so the landmark list stays a list a person can read.
|
|
30
|
+
*/
|
|
31
|
+
export declare const MAX_PROSE_REGIONS = 200;
|
|
32
|
+
/**
|
|
33
|
+
* The wrapper a prose table sits inside, creating it on first pass. Idempotent:
|
|
34
|
+
* a table already inside a `.tai-scroll-region` keeps the wrapper it has.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ensureScrollWrapper(table: HTMLTableElement): HTMLElement;
|
|
37
|
+
/** A scrollable prose surface, with the heading text that names it. */
|
|
38
|
+
interface LabelledProseSurface {
|
|
39
|
+
readonly element: HTMLElement;
|
|
40
|
+
readonly heading: string | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Every scrollable prose surface under `root` — each `<table>` and each `<pre>`
|
|
44
|
+
* — paired with the text of the nearest heading PRECEDING it, or `undefined`
|
|
45
|
+
* when no heading does.
|
|
46
|
+
*
|
|
47
|
+
* One query returns the headings and the surfaces interleaved in document order,
|
|
48
|
+
* so a single walk over that list names all of them: the heading a surface
|
|
49
|
+
* belongs to is the last one seen before reaching it. Naming each surface by
|
|
50
|
+
* searching backwards from it instead would re-read the same prose once per
|
|
51
|
+
* surface, at a cost that grows with the product of the two.
|
|
52
|
+
*
|
|
53
|
+
* Blank headings never enter the list, so a decorative empty heading names
|
|
54
|
+
* nothing and the section above it is used instead. A heading INSIDE a surface
|
|
55
|
+
* (a `<pre>` or a table cell holding one) comes AFTER that surface in document
|
|
56
|
+
* order and so can never name it, though it does name later surfaces — exactly
|
|
57
|
+
* as being the last heading before them implies.
|
|
58
|
+
*
|
|
59
|
+
* Read in full before the pass wraps anything, and safely so: a name depends
|
|
60
|
+
* only on what PRECEDES its surface, and `ensureScrollWrapper` puts the wrapper
|
|
61
|
+
* in the table's own place, moving nothing else and leaving every heading where
|
|
62
|
+
* it was — so a name stays true whether its table is wrapped yet or not.
|
|
63
|
+
*/
|
|
64
|
+
export declare function labelledProseSurfaces(root: Element): LabelledProseSurface[];
|
|
65
|
+
/** A prose surface's scrolling box and the name it would take on its own. */
|
|
66
|
+
interface ProseSurfaceBox {
|
|
67
|
+
readonly surface: HTMLElement;
|
|
68
|
+
readonly name: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* The same surfaces, each given a name no other one in the list carries.
|
|
72
|
+
*
|
|
73
|
+
* A name is only as useful as it is distinguishing, and one heading names every
|
|
74
|
+
* surface under it: two wide tables in one section, or two code blocks under no
|
|
75
|
+
* heading at all, would otherwise be two landmarks a reader hears identically
|
|
76
|
+
* and cannot choose between. A name more than one surface claims is therefore
|
|
77
|
+
* numbered, in document order, and a name only one surface claims is left alone.
|
|
78
|
+
*/
|
|
79
|
+
export declare function uniquelyNamed(boxes: readonly ProseSurfaceBox[]): TrackedSurface[];
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=prose-regions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose-regions.d.ts","sourceRoot":"","sources":["../../src/components/prose-regions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAE9E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;CAAiD,CAAC;AAWnF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CAQxE;AAQD,uEAAuE;AACvE,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAsBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,GAAG,oBAAoB,EAAE,CAgB3E;AAED,6EAA6E;AAC7E,UAAU,eAAe;IACvB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,GAAG,cAAc,EAAE,CAWjF"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The prose DOM walk: finding every scrollable `<table>` and `<pre>` inside
|
|
3
|
+
* injected markup, naming each by the heading that precedes it, and disambiguating
|
|
4
|
+
* names a section shares. React never renders these surfaces, so they are located
|
|
5
|
+
* and wrapped imperatively.
|
|
6
|
+
*/
|
|
7
|
+
import { SCROLL_REGION_CLASS } from './overflow-measure';
|
|
8
|
+
/**
|
|
9
|
+
* The names for a prose surface that has no heading above it.
|
|
10
|
+
*
|
|
11
|
+
* They say what the surface IS and nothing about which document it came from,
|
|
12
|
+
* because this walk cannot know: it instruments whatever markup the caller
|
|
13
|
+
* injected. A default that named one document put that document's name on every
|
|
14
|
+
* caller's regions, and a region a reader hears the wrong name for is worse than
|
|
15
|
+
* a plain one.
|
|
16
|
+
*/
|
|
17
|
+
export const DEFAULT_PROSE_LABELS = { table: 'Table', pre: 'Code block' };
|
|
18
|
+
const HEADING_SELECTOR = 'h1, h2, h3, h4, h5, h6';
|
|
19
|
+
/**
|
|
20
|
+
* Headings AND the surfaces they name, in one selector: a single query returns
|
|
21
|
+
* both interleaved in document order, which is what lets one walk name every
|
|
22
|
+
* surface (see `labelledProseSurfaces`).
|
|
23
|
+
*/
|
|
24
|
+
const PROSE_SURFACE_SELECTOR = `${HEADING_SELECTOR}, table, pre`;
|
|
25
|
+
/**
|
|
26
|
+
* The most surfaces one rendered document is given regions for.
|
|
27
|
+
*
|
|
28
|
+
* The prose is publisher-authored and unbounded in length, and every region is
|
|
29
|
+
* an entry in the landmark list a screen-reader user navigates the page by: a
|
|
30
|
+
* README with more surfaces than this turns that list into the very thing the
|
|
31
|
+
* regions exist to spare a reader. Past the cap a table still gets its scrolling
|
|
32
|
+
* wrapper — the wrapper is what keeps it inside the column — but no name and no
|
|
33
|
+
* tab stop, so the landmark list stays a list a person can read.
|
|
34
|
+
*/
|
|
35
|
+
export const MAX_PROSE_REGIONS = 200;
|
|
36
|
+
/**
|
|
37
|
+
* The wrapper a prose table sits inside, creating it on first pass. Idempotent:
|
|
38
|
+
* a table already inside a `.tai-scroll-region` keeps the wrapper it has.
|
|
39
|
+
*/
|
|
40
|
+
export function ensureScrollWrapper(table) {
|
|
41
|
+
const parent = table.parentElement;
|
|
42
|
+
if (parent?.classList.contains(SCROLL_REGION_CLASS) === true)
|
|
43
|
+
return parent;
|
|
44
|
+
const wrapper = table.ownerDocument.createElement('div');
|
|
45
|
+
wrapper.className = SCROLL_REGION_CLASS;
|
|
46
|
+
table.replaceWith(wrapper);
|
|
47
|
+
wrapper.append(table);
|
|
48
|
+
return wrapper;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The text of the last heading in `headings` that does not ENCLOSE `surface`.
|
|
52
|
+
*
|
|
53
|
+
* A heading wrapping the surface does precede it in document order, but it is
|
|
54
|
+
* not a section the surface sits UNDER, so it is stepped over in favour of the
|
|
55
|
+
* heading before it — which is the answer an outward walk from the surface
|
|
56
|
+
* reaches. In well-formed prose no heading contains a table or a code block, so
|
|
57
|
+
* this returns the last heading on the first look.
|
|
58
|
+
*/
|
|
59
|
+
function namingHeadingText(headings, surface) {
|
|
60
|
+
for (let index = headings.length - 1; index >= 0; index -= 1) {
|
|
61
|
+
const heading = headings[index];
|
|
62
|
+
if (heading !== undefined && !heading.element.contains(surface))
|
|
63
|
+
return heading.text;
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Every scrollable prose surface under `root` — each `<table>` and each `<pre>`
|
|
69
|
+
* — paired with the text of the nearest heading PRECEDING it, or `undefined`
|
|
70
|
+
* when no heading does.
|
|
71
|
+
*
|
|
72
|
+
* One query returns the headings and the surfaces interleaved in document order,
|
|
73
|
+
* so a single walk over that list names all of them: the heading a surface
|
|
74
|
+
* belongs to is the last one seen before reaching it. Naming each surface by
|
|
75
|
+
* searching backwards from it instead would re-read the same prose once per
|
|
76
|
+
* surface, at a cost that grows with the product of the two.
|
|
77
|
+
*
|
|
78
|
+
* Blank headings never enter the list, so a decorative empty heading names
|
|
79
|
+
* nothing and the section above it is used instead. A heading INSIDE a surface
|
|
80
|
+
* (a `<pre>` or a table cell holding one) comes AFTER that surface in document
|
|
81
|
+
* order and so can never name it, though it does name later surfaces — exactly
|
|
82
|
+
* as being the last heading before them implies.
|
|
83
|
+
*
|
|
84
|
+
* Read in full before the pass wraps anything, and safely so: a name depends
|
|
85
|
+
* only on what PRECEDES its surface, and `ensureScrollWrapper` puts the wrapper
|
|
86
|
+
* in the table's own place, moving nothing else and leaving every heading where
|
|
87
|
+
* it was — so a name stays true whether its table is wrapped yet or not.
|
|
88
|
+
*/
|
|
89
|
+
export function labelledProseSurfaces(root) {
|
|
90
|
+
const headings = [];
|
|
91
|
+
const surfaces = [];
|
|
92
|
+
for (const node of root.querySelectorAll(PROSE_SURFACE_SELECTOR)) {
|
|
93
|
+
if (node.matches(HEADING_SELECTOR)) {
|
|
94
|
+
// textContent is nullable under strict DOM typings; the local eslint
|
|
95
|
+
// profile assumes non-null, so the necessary guard trips its rule.
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
97
|
+
const text = (node.textContent ?? '').trim();
|
|
98
|
+
if (text !== '')
|
|
99
|
+
headings.push({ element: node, text });
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
surfaces.push({ element: node, heading: namingHeadingText(headings, node) });
|
|
103
|
+
}
|
|
104
|
+
return surfaces;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The same surfaces, each given a name no other one in the list carries.
|
|
108
|
+
*
|
|
109
|
+
* A name is only as useful as it is distinguishing, and one heading names every
|
|
110
|
+
* surface under it: two wide tables in one section, or two code blocks under no
|
|
111
|
+
* heading at all, would otherwise be two landmarks a reader hears identically
|
|
112
|
+
* and cannot choose between. A name more than one surface claims is therefore
|
|
113
|
+
* numbered, in document order, and a name only one surface claims is left alone.
|
|
114
|
+
*/
|
|
115
|
+
export function uniquelyNamed(boxes) {
|
|
116
|
+
const claims = new Map();
|
|
117
|
+
for (const { name } of boxes)
|
|
118
|
+
claims.set(name, (claims.get(name) ?? 0) + 1);
|
|
119
|
+
const taken = new Map();
|
|
120
|
+
return boxes.map(({ surface, name }) => {
|
|
121
|
+
if (claims.get(name) === 1)
|
|
122
|
+
return { surface, label: name };
|
|
123
|
+
const ordinal = (taken.get(name) ?? 0) + 1;
|
|
124
|
+
taken.set(name, ordinal);
|
|
125
|
+
return { surface, label: `${name} (${String(ordinal)})` };
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=prose-regions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prose-regions.js","sourceRoot":"","sources":["../../src/components/prose-regions.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,mBAAmB,EAAuB,MAAM,oBAAoB,CAAC;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAW,CAAC;AAEnF,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD;;;;GAIG;AACH,MAAM,sBAAsB,GAAG,GAAG,gBAAgB,cAAc,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAuB;IACzD,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;IACnC,IAAI,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,mBAAmB,CAAC,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAC5E,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzD,OAAO,CAAC,SAAS,GAAG,mBAAmB,CAAC;IACxC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtB,OAAO,OAAO,CAAC;AACjB,CAAC;AAcD;;;;;;;;GAQG;AACH,SAAS,iBAAiB,CACxB,QAAiC,EACjC,OAAgB;IAEhB,KAAK,IAAI,KAAK,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,EAA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AAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAE5E,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QACrC,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;YAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QAC5D,MAAM,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QAC3C,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACzB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,KAAK,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;IAC5D,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,kFAAkF;IAClF,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC;IAC1B,uFAAuF;IACvF,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACjD,oFAAoF;IACpF,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CACzC;AAWD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,WAAW,EACX,OAAgB,GACjB,EAAE,eAAe,+BA0EjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/components/radio-group.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAsC1C,wFAAwF;AACxF,SAAS,WAAW,C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,EAAE;YACtB,IAAI,OAAO,KAAK,WAAW,EAAE,CAAC;gBAC5B,OAAO,CACL,MAAC,eAAe,CAAC,IAAI,IAEnB,SAAS,EAAC,aAAa,EACvB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ,aAExB,MAAM,CAAC,IAAI,EACZ,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,GAAI,KAN1B,MAAM,CAAC,KAAK,CAOI,CACxB,CAAC;YACJ,CAAC;YACD,MAAM,MAAM,GAAG,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YAC3C,OAAO,CACL,iBAA0B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAC,YAAY,aAC/D,KAAC,eAAe,CAAC,IAAI,IACnB,EAAE,EAAE,MAAM,EACV,SAAS,EAAC,WAAW,EACrB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ,YAEzB,KAAC,eAAe,CAAC,SAAS,IAAC,SAAS,EAAC,qBAAqB,GAAG,GACxC,EACtB,MAAM,CAAC,IAAI,EACZ,KAAC,WAAW,IAAC,MAAM,EAAE,MAAM,GAAI,KAVrB,MAAM,CAAC,KAAK,CAWhB,CACT,CAAC;QACJ,CAAC,CAAC,GACmB,CACxB,CAAC;IAEF,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACtC,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,eAAM,EAAE,EAAE,UAAU,EAAE,SAAS,EAAC,iBAAiB,YAC9C,KAAK,GACD,EACN,KAAK,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `ScrollRegion` — a horizontally scrollable container that becomes a keyboard
|
|
3
|
+
* target ONLY while it actually overflows.
|
|
4
|
+
*
|
|
5
|
+
* A pane that scrolls must be reachable without a pointer (WCAG 2.1.1), which
|
|
6
|
+
* needs `tabIndex`, `role="region"` and a name. Applying those unconditionally
|
|
7
|
+
* would litter every screen with phantom landmarks and dead tab stops for tables
|
|
8
|
+
* that happen to fit, so the attributes are driven by a live measurement:
|
|
9
|
+
* `scrollWidth > clientWidth`, re-taken whenever the container or its content
|
|
10
|
+
* resizes and whenever the content is replaced.
|
|
11
|
+
*
|
|
12
|
+
* `useOverflowRegion` is the same measurement for a component that IS its own
|
|
13
|
+
* scrolling box (a `<pre>`, a JSON pane) and therefore cannot be wrapped in a
|
|
14
|
+
* `<div>` without gaining a second scroller. `useProseScrollRegions` applies the
|
|
15
|
+
* rules to the surfaces React never renders — the tables and code blocks inside
|
|
16
|
+
* `dangerouslySetInnerHTML` (rendered README/markdown), which cannot be wrapped
|
|
17
|
+
* in a component and are therefore instrumented imperatively.
|
|
18
|
+
*
|
|
19
|
+
* Both hooks hand back a CALLBACK REF for the element they measure, rather than
|
|
20
|
+
* reading one the caller holds: a ref object tells a hook nothing about WHEN it
|
|
21
|
+
* is filled, so a hook that read one would never instrument an element that
|
|
22
|
+
* mounts later than the hook (a README that arrives with the second render) and
|
|
23
|
+
* would never notice one being swapped for another.
|
|
24
|
+
*/
|
|
1
25
|
import type { CSSProperties, ReactNode, Ref, RefCallback } from 'react';
|
|
2
26
|
export interface ScrollRegionProps {
|
|
3
27
|
/** The region's accessible name, applied only while it actually scrolls. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-region.d.ts","sourceRoot":"","sources":["../../src/components/scroll-region.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scroll-region.d.ts","sourceRoot":"","sources":["../../src/components/scroll-region.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAwBxE,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC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