@wildo-ai/presets-components 1.1.4 → 1.1.6
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/esm/components/actions/action-bar.d.ts.map +1 -1
- package/dist/esm/components/actions/action-bar.js +65 -8
- package/dist/esm/components/actions/action-bar.js.map +1 -1
- package/dist/esm/components/actions/action-bar.labels.d.ts.map +1 -1
- package/dist/esm/components/actions/action-button.d.ts.map +1 -1
- package/dist/esm/components/actions/action-button.js +3 -3
- package/dist/esm/components/actions/action-button.js.map +1 -1
- package/dist/esm/components/actions/action-button.labels.d.ts.map +1 -1
- package/dist/esm/components/actions/button-group.d.ts.map +1 -1
- package/dist/esm/components/actions/button.d.ts.map +1 -1
- package/dist/esm/components/actions/button.js +62 -3
- package/dist/esm/components/actions/button.js.map +1 -1
- package/dist/esm/components/actions/button.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/artifact-browser.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/artifact.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/artifact.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/code-block.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/code-block.js +1 -1
- package/dist/esm/components/ai-elements/artifacts/code-block.js.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/code-block.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/diff-block.d.ts +4 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.d.ts.map +1 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.js +165 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.js.map +1 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.labels.d.ts +3 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.labels.d.ts.map +1 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.labels.js +63 -0
- package/dist/esm/components/ai-elements/artifacts/diff-block.labels.js.map +1 -0
- package/dist/esm/components/ai-elements/artifacts/image.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/image.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/shiki-highlighter-runtime.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/shiki-highlighter.lazy.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/web-preview.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/artifacts/web-preview.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/conversation.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/conversation.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/message.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/message.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/prompt-input.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/prompt-input.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/sources.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/sources.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.js +8 -1
- package/dist/esm/components/ai-elements/chat/suggestion.js.map +1 -1
- package/dist/esm/components/ai-elements/chat/suggestion.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval-argument-fields.d.ts +68 -0
- package/dist/esm/components/ai-elements/decision/approval-argument-fields.d.ts.map +1 -0
- package/dist/esm/components/ai-elements/decision/approval-argument-fields.js +208 -0
- package/dist/esm/components/ai-elements/decision/approval-argument-fields.js.map +1 -0
- package/dist/esm/components/ai-elements/decision/approval.d.ts +124 -17
- package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/approval.js +105 -13
- package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
- package/dist/esm/components/ai-elements/decision/decision-request.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/decision/decision-request.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/confirmation.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/confirmation.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/queue.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/queue.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/task.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/task.js +1 -1
- package/dist/esm/components/ai-elements/execution/task.js.map +1 -1
- package/dist/esm/components/ai-elements/execution/task.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/tool.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/execution/tool.js +8 -1
- package/dist/esm/components/ai-elements/execution/tool.js.map +1 -1
- package/dist/esm/components/ai-elements/execution/tool.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/canvas.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/canvas.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/connection.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/connection.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/controls.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/controls.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/edge.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/edge.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts +3 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.js +3 -1
- package/dist/esm/components/ai-elements/graph/graph-runtime.js.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph.lazy.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/graph.lazy.js +15 -15
- package/dist/esm/components/ai-elements/graph/graph.lazy.js.map +1 -1
- package/dist/esm/components/ai-elements/graph/node.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/node.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/panel.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/panel.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/toolbar.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/graph/toolbar.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/agent.d.ts +0 -1
- package/dist/esm/components/ai-elements/meta/agent.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/agent.js +23 -18
- package/dist/esm/components/ai-elements/meta/agent.js.map +1 -1
- package/dist/esm/components/ai-elements/meta/context.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/context.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/context.lazy.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/context.lazy.js +13 -11
- package/dist/esm/components/ai-elements/meta/context.lazy.js.map +1 -1
- package/dist/esm/components/ai-elements/meta/model-selector.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/model-selector.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/open-in-chat.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/meta/open-in-chat.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/shared/loader.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/shared/loader.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/shared/shimmer.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/shared/shimmer.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/stream/execution-stream.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/stream/execution-stream.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/chain-of-thought.d.ts +6 -0
- package/dist/esm/components/ai-elements/trace/chain-of-thought.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/chain-of-thought.js +13 -1
- package/dist/esm/components/ai-elements/trace/chain-of-thought.js.map +1 -1
- package/dist/esm/components/ai-elements/trace/chain-of-thought.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/checkpoint.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/checkpoint.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/inline-citation.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/inline-citation.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/plan.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/plan.labels.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/reasoning.d.ts.map +1 -1
- package/dist/esm/components/ai-elements/trace/reasoning.labels.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-consent-gate.d.ts +23 -0
- package/dist/esm/components/app/app-layout-consent-gate.d.ts.map +1 -0
- package/dist/esm/components/app/app-layout-consent-gate.js +133 -0
- package/dist/esm/components/app/app-layout-consent-gate.js.map +1 -0
- package/dist/esm/components/app/app-layout-document-acceptance-gate.d.ts +19 -0
- package/dist/esm/components/app/app-layout-document-acceptance-gate.d.ts.map +1 -0
- package/dist/esm/components/app/app-layout-document-acceptance-gate.js +56 -0
- package/dist/esm/components/app/app-layout-document-acceptance-gate.js.map +1 -0
- package/dist/esm/components/app/app-layout-main-container.d.ts +9 -0
- package/dist/esm/components/app/app-layout-main-container.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.js +17 -23
- package/dist/esm/components/app/app-layout-main-container.js.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.labels.d.ts.map +1 -1
- package/dist/esm/components/app/app-layout-main-container.labels.js +48 -0
- package/dist/esm/components/app/app-layout-main-container.labels.js.map +1 -1
- package/dist/esm/components/app/public-layout-main-container.d.ts +1 -1
- package/dist/esm/components/app/public-layout-main-container.d.ts.map +1 -1
- package/dist/esm/components/app/public-layout-main-container.js +9 -8
- package/dist/esm/components/app/public-layout-main-container.js.map +1 -1
- package/dist/esm/components/app/public-layout-main-container.labels.d.ts.map +1 -1
- package/dist/esm/components/app/public-layout-terms.d.ts +46 -0
- package/dist/esm/components/app/public-layout-terms.d.ts.map +1 -0
- package/dist/esm/components/app/public-layout-terms.js +137 -0
- package/dist/esm/components/app/public-layout-terms.js.map +1 -0
- package/dist/esm/components/billing/billing-format.utils.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-invoice-history.d.ts +1 -1
- package/dist/esm/components/billing/billing-invoice-history.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-invoice-history.js +3 -1
- package/dist/esm/components/billing/billing-invoice-history.js.map +1 -1
- package/dist/esm/components/billing/billing-invoice-history.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-invoice-history.labels.js +1 -0
- package/dist/esm/components/billing/billing-invoice-history.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-plan-change-preview.d.ts +5 -0
- package/dist/esm/components/billing/billing-plan-change-preview.d.ts.map +1 -0
- package/dist/esm/components/billing/billing-plan-change-preview.js +25 -0
- package/dist/esm/components/billing/billing-plan-change-preview.js.map +1 -0
- package/dist/esm/components/billing/billing-plan-change-preview.labels.d.ts +3 -0
- package/dist/esm/components/billing/billing-plan-change-preview.labels.d.ts.map +1 -0
- package/dist/esm/components/billing/billing-plan-change-preview.labels.js +22 -0
- package/dist/esm/components/billing/billing-plan-change-preview.labels.js.map +1 -0
- package/dist/esm/components/billing/billing-portal-link.d.ts +1 -1
- package/dist/esm/components/billing/billing-portal-link.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-portal-link.js +3 -1
- package/dist/esm/components/billing/billing-portal-link.js.map +1 -1
- package/dist/esm/components/billing/billing-portal-link.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-portal-link.labels.js +1 -0
- package/dist/esm/components/billing/billing-portal-link.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts +1 -1
- package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.js +10 -4
- package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.js +8 -1
- package/dist/esm/components/billing/billing-pricing-table.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.d.ts +1 -1
- package/dist/esm/components/billing/billing-subscription-status.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.js +3 -1
- package/dist/esm/components/billing/billing-subscription-status.js.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-subscription-status.labels.js +1 -0
- package/dist/esm/components/billing/billing-subscription-status.labels.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.js +10 -7
- package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.d.ts.map +1 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.js +4 -1
- package/dist/esm/components/billing/billing-usage-dashboard.labels.js.map +1 -1
- package/dist/esm/components/data-display/avatar.d.ts.map +1 -1
- package/dist/esm/components/data-display/avatar.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/badge.d.ts.map +1 -1
- package/dist/esm/components/data-display/badge.js +16 -15
- package/dist/esm/components/data-display/badge.js.map +1 -1
- package/dist/esm/components/data-display/badge.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/description-list.d.ts +2 -1
- package/dist/esm/components/data-display/description-list.d.ts.map +1 -1
- package/dist/esm/components/data-display/description-list.js +24 -8
- package/dist/esm/components/data-display/description-list.js.map +1 -1
- package/dist/esm/components/data-display/description-list.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/duration.d.ts +15 -0
- package/dist/esm/components/data-display/duration.d.ts.map +1 -0
- package/dist/esm/components/data-display/duration.js +50 -0
- package/dist/esm/components/data-display/duration.js.map +1 -0
- package/dist/esm/components/data-display/duration.labels.d.ts +15 -0
- package/dist/esm/components/data-display/duration.labels.d.ts.map +1 -0
- package/dist/esm/components/data-display/duration.labels.js +35 -0
- package/dist/esm/components/data-display/duration.labels.js.map +1 -0
- package/dist/esm/components/data-display/formatters/display-field-address.d.ts +21 -0
- package/dist/esm/components/data-display/formatters/display-field-address.d.ts.map +1 -0
- package/dist/esm/components/data-display/formatters/display-field-address.js +75 -0
- package/dist/esm/components/data-display/formatters/display-field-address.js.map +1 -0
- package/dist/esm/components/data-display/formatters/display-field-address.labels.d.ts +3 -0
- package/dist/esm/components/data-display/formatters/display-field-address.labels.d.ts.map +1 -0
- package/dist/esm/components/data-display/formatters/display-field-address.labels.js +13 -0
- package/dist/esm/components/data-display/formatters/display-field-address.labels.js.map +1 -0
- package/dist/esm/components/data-display/formatters/display-field-bigdecimal.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-bigdecimal.js +6 -2
- package/dist/esm/components/data-display/formatters/display-field-bigdecimal.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-bigdecimal.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-boolean.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-boolean.js +2 -2
- package/dist/esm/components/data-display/formatters/display-field-boolean.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-boolean.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-code.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-code.js +2 -2
- package/dist/esm/components/data-display/formatters/display-field-code.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-code.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-date.d.ts +3 -3
- package/dist/esm/components/data-display/formatters/display-field-date.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-date.js +17 -4
- package/dist/esm/components/data-display/formatters/display-field-date.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-date.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-datetime.d.ts +3 -3
- package/dist/esm/components/data-display/formatters/display-field-datetime.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-datetime.js +17 -4
- package/dist/esm/components/data-display/formatters/display-field-datetime.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-datetime.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-duration.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-duration.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.js +29 -11
- package/dist/esm/components/data-display/formatters/display-field-enum.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-enum.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-audio.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-audio.js +2 -1
- package/dist/esm/components/data-display/formatters/display-field-file-audio.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-audio.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-document.d.ts +4 -1
- package/dist/esm/components/data-display/formatters/display-field-file-document.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-document.js +18 -5
- package/dist/esm/components/data-display/formatters/display-field-file-document.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-document.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-document.labels.js +20 -0
- package/dist/esm/components/data-display/formatters/display-field-file-document.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-gallery.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-gallery.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-image.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-image.js +3 -1
- package/dist/esm/components/data-display/formatters/display-field-file-image.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-image.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-video.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file-video.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.js +14 -15
- package/dist/esm/components/data-display/formatters/display-field-file.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-file.labels.js +2 -0
- package/dist/esm/components/data-display/formatters/display-field-file.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-format.utils.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-i18n.utils.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-money.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-money.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.js +8 -3
- package/dist/esm/components/data-display/formatters/display-field-number.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-number.labels.js +5 -2
- package/dist/esm/components/data-display/formatters/display-field-number.labels.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-phone.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-phone.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-bigdecimal.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-bigdecimal.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-date.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-date.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-datetime.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-datetime.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-money.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-money.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-number.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-number.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-time.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-range-time.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.d.ts +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.js +129 -15
- package/dist/esm/components/data-display/formatters/display-field-string.js.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-string.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-time.d.ts.map +1 -1
- package/dist/esm/components/data-display/formatters/display-field-time.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/identifier.d.ts +19 -0
- package/dist/esm/components/data-display/identifier.d.ts.map +1 -0
- package/dist/esm/components/data-display/identifier.js +21 -0
- package/dist/esm/components/data-display/identifier.js.map +1 -0
- package/dist/esm/components/data-display/kbd.d.ts +17 -0
- package/dist/esm/components/data-display/kbd.d.ts.map +1 -0
- package/dist/esm/components/data-display/kbd.js +18 -0
- package/dist/esm/components/data-display/kbd.js.map +1 -0
- package/dist/esm/components/data-display/markdown-content.d.ts.map +1 -1
- package/dist/esm/components/data-display/markdown-stream-runtime.d.ts.map +1 -1
- package/dist/esm/components/data-display/markdown-stream.lazy.d.ts.map +1 -1
- package/dist/esm/components/data-display/markdown-stream.lazy.js +13 -2
- package/dist/esm/components/data-display/markdown-stream.lazy.js.map +1 -1
- package/dist/esm/components/data-display/notification-indicator.d.ts.map +1 -1
- package/dist/esm/components/data-display/notification-indicator.js +3 -11
- package/dist/esm/components/data-display/notification-indicator.js.map +1 -1
- package/dist/esm/components/data-display/notification-indicator.labels.d.ts.map +1 -1
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.d.ts +63 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.d.ts.map +1 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.js +75 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.js.map +1 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.vite.d.ts +32 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.vite.d.ts.map +1 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.vite.js +36 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer-worker.vite.js.map +1 -0
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.d.ts +46 -6
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.d.ts.map +1 -1
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.js +70 -46
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.js.map +1 -1
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.lazy.d.ts +12 -2
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.lazy.d.ts.map +1 -1
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.lazy.js +3 -2
- package/dist/esm/components/data-display/pdf-viewer/pdf-viewer.lazy.js.map +1 -1
- package/dist/esm/components/data-display/timeline.d.ts +3 -0
- package/dist/esm/components/data-display/timeline.d.ts.map +1 -0
- package/dist/esm/components/data-display/timeline.js +92 -0
- package/dist/esm/components/data-display/timeline.js.map +1 -0
- package/dist/esm/components/data-display/untrusted-html-content.d.ts +55 -0
- package/dist/esm/components/data-display/untrusted-html-content.d.ts.map +1 -0
- package/dist/esm/components/data-display/untrusted-html-content.js +67 -0
- package/dist/esm/components/data-display/untrusted-html-content.js.map +1 -0
- package/dist/esm/components/feedback/celebration-overlay.d.ts +13 -4
- package/dist/esm/components/feedback/celebration-overlay.d.ts.map +1 -1
- package/dist/esm/components/feedback/celebration-overlay.js +146 -22
- package/dist/esm/components/feedback/celebration-overlay.js.map +1 -1
- package/dist/esm/components/feedback/celebration-overlay.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/danger-zone.d.ts.map +1 -1
- package/dist/esm/components/feedback/danger-zone.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/empty-state.d.ts.map +1 -1
- package/dist/esm/components/feedback/empty-state.js.map +1 -1
- package/dist/esm/components/feedback/empty-state.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/error-display.d.ts.map +1 -1
- package/dist/esm/components/feedback/error-display.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-limit-indicator.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-limit-indicator.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-lock-badge.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-lock-badge.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-dialog.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-dialog.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.d.ts.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.js.map +1 -1
- package/dist/esm/components/feedback/features/feature-unavailable-prompt.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/loading-overlay.d.ts.map +1 -1
- package/dist/esm/components/feedback/loading-overlay.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/loading-spinner.d.ts.map +1 -1
- package/dist/esm/components/feedback/loading-spinner.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/notification-center.d.ts.map +1 -1
- package/dist/esm/components/feedback/notification-center.js +5 -5
- package/dist/esm/components/feedback/notification-center.js.map +1 -1
- package/dist/esm/components/feedback/operations-confirm-critical.d.ts +1 -1
- package/dist/esm/components/feedback/operations-confirm-critical.d.ts.map +1 -1
- package/dist/esm/components/feedback/operations-confirm-critical.js +9 -7
- package/dist/esm/components/feedback/operations-confirm-critical.js.map +1 -1
- package/dist/esm/components/feedback/operations-confirm-critical.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/progress.d.ts.map +1 -1
- package/dist/esm/components/feedback/progress.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/skeleton.d.ts.map +1 -1
- package/dist/esm/components/feedback/skeleton.labels.d.ts.map +1 -1
- package/dist/esm/components/feedback/toast.d.ts.map +1 -1
- package/dist/esm/components/feedback/toast.labels.d.ts.map +1 -1
- package/dist/esm/components/form/autosave-indicator.d.ts.map +1 -1
- package/dist/esm/components/form/autosave-indicator.labels.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/field.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/field.js +11 -3
- package/dist/esm/components/form/chromes/field.js.map +1 -1
- package/dist/esm/components/form/chromes/field.labels.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/form-primitive.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/form-primitive.labels.d.ts.map +1 -1
- package/dist/esm/components/form/chromes/form-primitive.labels.js +37 -0
- package/dist/esm/components/form/chromes/form-primitive.labels.js.map +1 -1
- package/dist/esm/components/form/combobox.d.ts.map +1 -1
- package/dist/esm/components/form/combobox.js +14 -13
- package/dist/esm/components/form/combobox.js.map +1 -1
- package/dist/esm/components/form/combobox.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts +42 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js +120 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts +16 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts.map +1 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js +8 -0
- package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js.map +1 -0
- package/dist/esm/components/form/controls/boolean/checkbox.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/checkbox.js +2 -2
- package/dist/esm/components/form/controls/boolean/checkbox.js.map +1 -1
- package/dist/esm/components/form/controls/boolean/checkbox.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/switch.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/switch.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/toggle-group-boolean.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/toggle-group-boolean.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/toggle.d.ts.map +1 -1
- package/dist/esm/components/form/controls/boolean/toggle.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/code-editor/cm6-editor-appearance.d.ts.map +1 -1
- package/dist/esm/components/form/controls/code-editor/cm6-editor.d.ts.map +1 -1
- package/dist/esm/components/form/controls/code-editor/cm6-editor.lazy.d.ts.map +1 -1
- package/dist/esm/components/form/controls/code-editor/cm6-editor.lazy.js +11 -2
- package/dist/esm/components/form/controls/code-editor/cm6-editor.lazy.js.map +1 -1
- package/dist/esm/components/form/controls/code-editor/form-field-code.d.ts.map +1 -1
- package/dist/esm/components/form/controls/code-editor/markdown-editor.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/calendar.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/calendar.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/date-range-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/date-range-picker.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datepicker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datepicker.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-picker.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.labels.js +11 -2
- package/dist/esm/components/form/controls/date-time/datetime-range-picker.labels.js.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-picker.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-range-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-range-picker.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/date-time/time-range-picker.labels.js +11 -2
- package/dist/esm/components/form/controls/date-time/time-range-picker.labels.js.map +1 -1
- package/dist/esm/components/form/controls/enum/radio.d.ts +1 -1
- package/dist/esm/components/form/controls/enum/radio.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/radio.js +13 -12
- package/dist/esm/components/form/controls/enum/radio.js.map +1 -1
- package/dist/esm/components/form/controls/enum/radio.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/select-multiple.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/select-multiple.js +5 -3
- package/dist/esm/components/form/controls/enum/select-multiple.js.map +1 -1
- package/dist/esm/components/form/controls/enum/select-multiple.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/select.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/select.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/toggle-group.d.ts.map +1 -1
- package/dist/esm/components/form/controls/enum/toggle-group.js +96 -5
- package/dist/esm/components/form/controls/enum/toggle-group.js.map +1 -1
- package/dist/esm/components/form/controls/enum/toggle-group.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/file-upload.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/file-upload.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/image-crop.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/image-crop.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.d.ts +44 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.d.ts.map +1 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.js +137 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.js.map +1 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.lazy.d.ts +22 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.lazy.d.ts.map +1 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.lazy.js +27 -0
- package/dist/esm/components/form/controls/file/providers/dropbox-picker.lazy.js.map +1 -0
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.d.ts +3 -1
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.js +3 -1
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.js.map +1 -1
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.lazy.d.ts +6 -0
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.lazy.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.lazy.js +8 -1
- package/dist/esm/components/form/controls/file/providers/google-drive-picker.lazy.js.map +1 -1
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.d.ts +6 -2
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.js +6 -2
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.js.map +1 -1
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.lazy.d.ts +6 -0
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.lazy.d.ts.map +1 -1
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.lazy.js +8 -1
- package/dist/esm/components/form/controls/file/providers/onedrive-picker.lazy.js.map +1 -1
- package/dist/esm/components/form/controls/input-group.d.ts.map +1 -1
- package/dist/esm/components/form/controls/input-group.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/input.d.ts.map +1 -1
- package/dist/esm/components/form/controls/input.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/number/slider.d.ts.map +1 -1
- package/dist/esm/components/form/controls/number/slider.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/number/slider.labels.js +9 -2
- package/dist/esm/components/form/controls/number/slider.labels.js.map +1 -1
- package/dist/esm/components/form/controls/string/color-input.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/color-input.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/color-picker-surface.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/color-picker-surface.js.map +1 -1
- package/dist/esm/components/form/controls/string/inline-edit-text.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/input-otp.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/input-otp.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/password-input.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/password-input.labels.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/password-input.labels.js +9 -2
- package/dist/esm/components/form/controls/string/password-input.labels.js.map +1 -1
- package/dist/esm/components/form/controls/string/textarea.d.ts.map +1 -1
- package/dist/esm/components/form/controls/string/textarea.labels.d.ts.map +1 -1
- package/dist/esm/components/layout/aspect-ratio.d.ts.map +1 -1
- package/dist/esm/components/layout/aspect-ratio.labels.d.ts.map +1 -1
- package/dist/esm/components/layout/carousel.d.ts.map +1 -1
- package/dist/esm/components/layout/carousel.labels.d.ts.map +1 -1
- package/dist/esm/components/layout/divider.d.ts.map +1 -1
- package/dist/esm/components/layout/divider.labels.d.ts.map +1 -1
- package/dist/esm/components/layout/resizable.d.ts.map +1 -1
- package/dist/esm/components/layout/resizable.labels.d.ts.map +1 -1
- package/dist/esm/components/layout/scroll-area.d.ts.map +1 -1
- package/dist/esm/components/layout/scroll-area.labels.d.ts.map +1 -1
- package/dist/esm/components/layout/separator.d.ts.map +1 -1
- package/dist/esm/components/layout/separator.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/activity-bar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/activity-bar.js +2 -2
- package/dist/esm/components/navigation/app-level/activity-bar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/activity-bar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/command-menu.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/command-menu.js +2 -2
- package/dist/esm/components/navigation/app-level/command-menu.js.map +1 -1
- package/dist/esm/components/navigation/app-level/command-menu.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/control-panel.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/control-panel.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.js +10 -4
- package/dist/esm/components/navigation/app-level/menu-user-org.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.js +7 -0
- package/dist/esm/components/navigation/app-level/menu-user-org.labels.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.js +36 -14
- package/dist/esm/components/navigation/app-level/menubar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/menubar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.js +31 -5
- package/dist/esm/components/navigation/app-level/navigation-back.js.map +1 -1
- package/dist/esm/components/navigation/app-level/navigation-back.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/notification-center.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/notification-center.js.map +1 -1
- package/dist/esm/components/navigation/app-level/notification-center.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/notification-center.labels.js +15 -0
- package/dist/esm/components/navigation/app-level/notification-center.labels.js.map +1 -1
- package/dist/esm/components/navigation/app-level/quick-action-button.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/quick-action-button.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/quick-action-button.labels.js +4 -0
- package/dist/esm/components/navigation/app-level/quick-action-button.labels.js.map +1 -1
- package/dist/esm/components/navigation/app-level/quick-switcher.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/quick-switcher.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/sidebar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/sidebar.js +41 -25
- package/dist/esm/components/navigation/app-level/sidebar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/sidebar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/sidebar.labels.js +1 -0
- package/dist/esm/components/navigation/app-level/sidebar.labels.js.map +1 -1
- package/dist/esm/components/navigation/app-level/status-bar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/status-bar.js +2 -2
- package/dist/esm/components/navigation/app-level/status-bar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/status-bar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.js +2 -2
- package/dist/esm/components/navigation/app-level/toolbar.js.map +1 -1
- package/dist/esm/components/navigation/app-level/toolbar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/utility-panel.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/utility-panel.js +24 -6
- package/dist/esm/components/navigation/app-level/utility-panel.js.map +1 -1
- package/dist/esm/components/navigation/app-level/utility-panel.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/app-level/utility-panel.labels.js.map +1 -1
- package/dist/esm/components/navigation/breadcrumb.d.ts.map +1 -1
- package/dist/esm/components/navigation/breadcrumb.js +1 -1
- package/dist/esm/components/navigation/breadcrumb.js.map +1 -1
- package/dist/esm/components/navigation/breadcrumb.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.d.ts.map +1 -1
- package/dist/esm/components/navigation/command.js +2 -2
- package/dist/esm/components/navigation/command.js.map +1 -1
- package/dist/esm/components/navigation/command.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/menu-bar.d.ts.map +1 -1
- package/dist/esm/components/navigation/menu-bar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/navbar.d.ts.map +1 -1
- package/dist/esm/components/navigation/navbar.labels.d.ts.map +1 -1
- package/dist/esm/components/navigation/sidebar.d.ts.map +1 -1
- package/dist/esm/components/navigation/sidebar.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/alert-dialog.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/alert-dialog.js +11 -1
- package/dist/esm/components/overlays/containers/alert-dialog.js.map +1 -1
- package/dist/esm/components/overlays/containers/alert-dialog.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/alert.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/alert.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/dialog.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/dialog.js +11 -1
- package/dist/esm/components/overlays/containers/dialog.js.map +1 -1
- package/dist/esm/components/overlays/containers/dialog.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/drawer.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/drawer.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/sheet.d.ts.map +1 -1
- package/dist/esm/components/overlays/containers/sheet.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/context-menu.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/context-menu.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/dropdown-menu.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/dropdown-menu.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/hover-card.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/hover-card.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/popover.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/popover.labels.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/tooltip.d.ts.map +1 -1
- package/dist/esm/components/overlays/floating/tooltip.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/accordion.d.ts.map +1 -1
- package/dist/esm/components/sections/accordion.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/card.d.ts.map +1 -1
- package/dist/esm/components/sections/card.js +71 -6
- package/dist/esm/components/sections/card.js.map +1 -1
- package/dist/esm/components/sections/card.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/collapsible.d.ts.map +1 -1
- package/dist/esm/components/sections/collapsible.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.d.ts.map +1 -1
- package/dist/esm/components/sections/content-section.js +36 -6
- package/dist/esm/components/sections/content-section.js.map +1 -1
- package/dist/esm/components/sections/disclosure-nesting.d.ts.map +1 -1
- package/dist/esm/components/sections/option-gesture.d.ts +15 -0
- package/dist/esm/components/sections/option-gesture.d.ts.map +1 -0
- package/dist/esm/components/sections/option-gesture.js +66 -0
- package/dist/esm/components/sections/option-gesture.js.map +1 -0
- package/dist/esm/components/sections/pagination.d.ts.map +1 -1
- package/dist/esm/components/sections/pagination.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/stacked-layout.d.ts.map +1 -1
- package/dist/esm/components/sections/stacked-layout.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.d.ts.map +1 -1
- package/dist/esm/components/sections/stepper.js +5 -3
- package/dist/esm/components/sections/stepper.js.map +1 -1
- package/dist/esm/components/sections/stepper.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/table.d.ts.map +1 -1
- package/dist/esm/components/sections/table.labels.d.ts.map +1 -1
- package/dist/esm/components/sections/tabs.d.ts.map +1 -1
- package/dist/esm/components/sections/tabs.js +60 -15
- package/dist/esm/components/sections/tabs.js.map +1 -1
- package/dist/esm/components/sections/tabs.labels.d.ts.map +1 -1
- package/dist/esm/components/typography/heading.d.ts.map +1 -1
- package/dist/esm/components/typography/heading.labels.d.ts.map +1 -1
- package/dist/esm/components/typography/label.d.ts.map +1 -1
- package/dist/esm/components/typography/label.labels.d.ts.map +1 -1
- package/dist/esm/components/typography/link.d.ts.map +1 -1
- package/dist/esm/components/typography/link.js +9 -3
- package/dist/esm/components/typography/link.js.map +1 -1
- package/dist/esm/components/typography/link.labels.d.ts.map +1 -1
- package/dist/esm/components/typography/text.d.ts +1 -1
- package/dist/esm/components/typography/text.d.ts.map +1 -1
- package/dist/esm/components/typography/text.js +3 -2
- package/dist/esm/components/typography/text.js.map +1 -1
- package/dist/esm/components/typography/text.labels.d.ts.map +1 -1
- package/dist/esm/components/typography/truncated-text.d.ts.map +1 -1
- package/dist/esm/config/billing-shell.presets.d.ts.map +1 -1
- package/dist/esm/config/index.d.ts.map +1 -1
- package/dist/esm/config/preset-design-system.d.ts.map +1 -1
- package/dist/esm/config/preset-design-system.js +37 -60
- package/dist/esm/config/preset-design-system.js.map +1 -1
- package/dist/esm/config/preset-error-pages.d.ts.map +1 -1
- package/dist/esm/config/preset-kits.d.ts.map +1 -1
- package/dist/esm/config/preset-navigation.d.ts.map +1 -1
- package/dist/esm/config/preset-navigation.js +23 -7
- package/dist/esm/config/preset-navigation.js.map +1 -1
- package/dist/esm/config/preset-resources.d.ts.map +1 -1
- package/dist/esm/config/preset-shell.d.ts.map +1 -1
- package/dist/esm/config/preset-utils.d.ts.map +1 -1
- package/dist/esm/config/presets.d.ts.map +1 -1
- package/dist/esm/config/resources/agent-work.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/agent-work.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/agent-work.resource-presets.js +115 -0
- package/dist/esm/config/resources/agent-work.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/api-key-rotation-window.d.ts +22 -0
- package/dist/esm/config/resources/api-key-rotation-window.d.ts.map +1 -0
- package/dist/esm/config/resources/api-key-rotation-window.js +45 -0
- package/dist/esm/config/resources/api-key-rotation-window.js.map +1 -0
- package/dist/esm/config/resources/application.resource-presets.d.ts +2 -0
- package/dist/esm/config/resources/application.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/application.resource-presets.js +268 -26
- package/dist/esm/config/resources/application.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/billing.resource-presets.d.ts +4 -3
- package/dist/esm/config/resources/billing.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/billing.resource-presets.js +241 -111
- package/dist/esm/config/resources/billing.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.js +105 -0
- package/dist/esm/config/resources/conversation-threads.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/guidance.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/guidance.resource-presets.js +39 -16
- package/dist/esm/config/resources/guidance.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/identity.resource-presets.d.ts +0 -13
- package/dist/esm/config/resources/identity.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/identity.resource-presets.js +71 -17
- package/dist/esm/config/resources/identity.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts +6 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.js +112 -0
- package/dist/esm/config/resources/inbound-deliveries.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.js +182 -0
- package/dist/esm/config/resources/inbound-email.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/index.d.ts.map +1 -1
- package/dist/esm/config/resources/index.js +9 -2
- package/dist/esm/config/resources/index.js.map +1 -1
- package/dist/esm/config/resources/legal-holds.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.js +76 -0
- package/dist/esm/config/resources/legal-holds.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/organizations.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/organizations.resource-presets.js +216 -35
- package/dist/esm/config/resources/organizations.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/resource.config.utils.d.ts +20 -0
- package/dist/esm/config/resources/resource.config.utils.d.ts.map +1 -1
- package/dist/esm/config/resources/resource.config.utils.js +20 -0
- package/dist/esm/config/resources/resource.config.utils.js.map +1 -1
- package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts +5 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.js +74 -0
- package/dist/esm/config/resources/retention-enforcement.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/security.resource-presets.d.ts +11 -3
- package/dist/esm/config/resources/security.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/security.resource-presets.js +685 -99
- package/dist/esm/config/resources/security.resource-presets.js.map +1 -1
- package/dist/esm/config/resources/service-providers.resource-presets.d.ts +4 -0
- package/dist/esm/config/resources/service-providers.resource-presets.d.ts.map +1 -0
- package/dist/esm/config/resources/service-providers.resource-presets.js +321 -0
- package/dist/esm/config/resources/service-providers.resource-presets.js.map +1 -0
- package/dist/esm/config/resources/webhooks.resource-presets.d.ts +4 -3
- package/dist/esm/config/resources/webhooks.resource-presets.d.ts.map +1 -1
- package/dist/esm/config/resources/webhooks.resource-presets.js +102 -26
- package/dist/esm/config/resources/webhooks.resource-presets.js.map +1 -1
- package/dist/esm/index.d.ts +7 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lottie/lottie.content.definitions.d.ts.map +1 -1
- package/dist/esm/lottie/lottie.definitions.d.ts.map +1 -1
- package/dist/esm/mermaid-stub.d.ts.map +1 -1
- package/dist/esm/registration/register-common-enums.d.ts.map +1 -1
- package/dist/esm/registration/register-common-enums.js +63 -34
- package/dist/esm/registration/register-common-enums.js.map +1 -1
- package/dist/esm/registration/register-default-animations.d.ts.map +1 -1
- package/dist/esm/registration/register-default-icons.d.ts.map +1 -1
- package/dist/esm/registration/register-default-icons.js +3 -1
- package/dist/esm/registration/register-default-icons.js.map +1 -1
- package/dist/esm/registration/register-default-presets.d.ts.map +1 -1
- package/dist/esm/registration/register-default-presets.js +32 -4
- package/dist/esm/registration/register-default-presets.js.map +1 -1
- package/dist/esm/registration/register-provider-components.d.ts.map +1 -1
- package/dist/esm/registration/register-provider-components.js +11 -0
- package/dist/esm/registration/register-provider-components.js.map +1 -1
- package/dist/esm/shiki-subset.d.ts +11 -3
- package/dist/esm/shiki-subset.d.ts.map +1 -1
- package/dist/esm/shiki-subset.js +10 -2
- package/dist/esm/shiki-subset.js.map +1 -1
- package/dist/esm/theme-exports.d.ts.map +1 -1
- package/dist/esm/themes/cozy.theme.d.ts.map +1 -1
- package/dist/esm/themes/cozy.theme.js +19 -5
- package/dist/esm/themes/cozy.theme.js.map +1 -1
- package/dist/esm/themes/dense.theme.d.ts.map +1 -1
- package/dist/esm/themes/dense.theme.js +76 -10
- package/dist/esm/themes/dense.theme.js.map +1 -1
- package/dist/esm/themes/editorial.theme.d.ts.map +1 -1
- package/dist/esm/themes/editorial.theme.js +19 -5
- package/dist/esm/themes/editorial.theme.js.map +1 -1
- package/dist/esm/themes/glass.theme.d.ts.map +1 -1
- package/dist/esm/themes/glass.theme.js +5 -1
- package/dist/esm/themes/glass.theme.js.map +1 -1
- package/dist/esm/themes/neo-brutalist.theme.d.ts.map +1 -1
- package/dist/esm/themes/neo-brutalist.theme.js +9 -2
- package/dist/esm/themes/neo-brutalist.theme.js.map +1 -1
- package/dist/esm/themes/terminal.theme.d.ts.map +1 -1
- package/dist/esm/themes/terminal.theme.js +19 -5
- package/dist/esm/themes/terminal.theme.js.map +1 -1
- package/dist/esm/themes/trading.theme.d.ts.map +1 -1
- package/dist/esm/themes/trading.theme.js +22 -6
- package/dist/esm/themes/trading.theme.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +31 -45
- package/dist/esm/components/form/controls/form-field-checkbox-group.d.ts +0 -16
- package/dist/esm/components/form/controls/form-field-checkbox-group.d.ts.map +0 -1
- package/dist/esm/components/form/controls/form-field-checkbox-group.js +0 -143
- package/dist/esm/components/form/controls/form-field-checkbox-group.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-group.labels.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"toggle-group.labels.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/enum/toggle-group.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM/H,eAAO,MAAM,yBAAyB,EAAE,mBAAmB,EAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/file/file-upload.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAWL,eAAe,EACf,aAAa,EACd,MAAM,6BAA6B,CAAC;AAMrC,QAAA,MAAM,UAAU,uFAsTd,CAED;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.labels.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"file-upload.labels.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/file/file-upload.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EA+BzD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-crop.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"image-crop.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/file/image-crop.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAoBL,KAAK,oBAAoB,EAE1B,MAAM,6BAA6B,CAAA;AAkBpC,QAAA,MAAM,SAAS,6FA+Ub,CAED;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-crop.labels.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"image-crop.labels.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/file/image-crop.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,mBAAmB,EAA2B,MAAM,qCAAqC,CAAC;AAM1I,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,EAiBxD,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dropbox file picker — the component the `dropbox` provider contributes for `FRONTEND_FILE_PICKER`.
|
|
3
|
+
*
|
|
4
|
+
* ## Why it declares BROWSER_READABLE_URL, like OneDrive and unlike Drive
|
|
5
|
+
*
|
|
6
|
+
* The Chooser opened with `linkType: 'direct'` returns each chosen file carrying a link that needs no
|
|
7
|
+
* credential to fetch and expires after four hours. The browser genuinely can read the bytes, so the
|
|
8
|
+
* honest arm is `BROWSER_READABLE_URL` and the framework ingests the result into the field's own
|
|
9
|
+
* storage. Drive's picker returns metadata only, whose bytes need a credential the browser must not
|
|
10
|
+
* hold — which is why #383 was answered PER VENDOR rather than once.
|
|
11
|
+
*
|
|
12
|
+
* spec-cite: Dropbox Chooser reference —
|
|
13
|
+
* https://docs.dropboxapi.com/dropbox-api/docs/pre-built-components/chooser — for the `choose`
|
|
14
|
+
* options used here, the direct link being credential-free, and the returned file's fields.
|
|
15
|
+
* Paraphrased rather than quoted.
|
|
16
|
+
*
|
|
17
|
+
* ## The app key does NOT ride on the script tag
|
|
18
|
+
*
|
|
19
|
+
* The vendor documents `data-app-key` on a script carrying `id="dropboxjs"`, which the framework's
|
|
20
|
+
* declarative `scripts` channel cannot express: that declaration is static engine data and the key is
|
|
21
|
+
* per-application configuration. Reading the shipped `dropins.js` shows a second, public source —
|
|
22
|
+
* `Dropbox.init({ appKey })` — so the script is declared plainly in the provider module and the key
|
|
23
|
+
* is supplied HERE from `publicConfig`, after the script has executed.
|
|
24
|
+
*
|
|
25
|
+
* ## Two vendor limits worth knowing before debugging one
|
|
26
|
+
*
|
|
27
|
+
* `choose` has NO error callback — only `success` and `cancel` — so a failure inside the vendor's own
|
|
28
|
+
* overlay surfaces as a cancel or as silence. Everything this component CAN detect is checked before
|
|
29
|
+
* `choose` is called, which is why the guards below are eager rather than defensive.
|
|
30
|
+
*
|
|
31
|
+
* And a chosen file carries no MIME type. The selection therefore omits `mimeType` rather than
|
|
32
|
+
* guessing one from the extension: absent means UNKNOWN, and the field validates every chosen file
|
|
33
|
+
* against `allowedMimeTypes` on its own.
|
|
34
|
+
*
|
|
35
|
+
* ## Not proven in a browser
|
|
36
|
+
*
|
|
37
|
+
* Nothing here has been driven against a real Dropbox account. Tracked on #460, which is where the
|
|
38
|
+
* DROPBOX storage member's fate lives: this picker is the ATTACH-only offering, the governed path is
|
|
39
|
+
* not built, and `google-drive` remains the one proven governed mechanism.
|
|
40
|
+
*/
|
|
41
|
+
import { type ProviderFilePickerProps } from '@wildo-ai/saas-models/public-runtime';
|
|
42
|
+
/** Opens the Chooser as soon as it mounts — see the Drive picker for why mounting IS opening. */
|
|
43
|
+
export declare function DropboxPicker(props: ProviderFilePickerProps): null;
|
|
44
|
+
//# sourceMappingURL=dropbox-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropbox-picker.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/dropbox-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,sCAAsC,CAAC;AA0C9C,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAiGlE"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dropbox file picker — the component the `dropbox` provider contributes for `FRONTEND_FILE_PICKER`.
|
|
3
|
+
*
|
|
4
|
+
* ## Why it declares BROWSER_READABLE_URL, like OneDrive and unlike Drive
|
|
5
|
+
*
|
|
6
|
+
* The Chooser opened with `linkType: 'direct'` returns each chosen file carrying a link that needs no
|
|
7
|
+
* credential to fetch and expires after four hours. The browser genuinely can read the bytes, so the
|
|
8
|
+
* honest arm is `BROWSER_READABLE_URL` and the framework ingests the result into the field's own
|
|
9
|
+
* storage. Drive's picker returns metadata only, whose bytes need a credential the browser must not
|
|
10
|
+
* hold — which is why #383 was answered PER VENDOR rather than once.
|
|
11
|
+
*
|
|
12
|
+
* spec-cite: Dropbox Chooser reference —
|
|
13
|
+
* https://docs.dropboxapi.com/dropbox-api/docs/pre-built-components/chooser — for the `choose`
|
|
14
|
+
* options used here, the direct link being credential-free, and the returned file's fields.
|
|
15
|
+
* Paraphrased rather than quoted.
|
|
16
|
+
*
|
|
17
|
+
* ## The app key does NOT ride on the script tag
|
|
18
|
+
*
|
|
19
|
+
* The vendor documents `data-app-key` on a script carrying `id="dropboxjs"`, which the framework's
|
|
20
|
+
* declarative `scripts` channel cannot express: that declaration is static engine data and the key is
|
|
21
|
+
* per-application configuration. Reading the shipped `dropins.js` shows a second, public source —
|
|
22
|
+
* `Dropbox.init({ appKey })` — so the script is declared plainly in the provider module and the key
|
|
23
|
+
* is supplied HERE from `publicConfig`, after the script has executed.
|
|
24
|
+
*
|
|
25
|
+
* ## Two vendor limits worth knowing before debugging one
|
|
26
|
+
*
|
|
27
|
+
* `choose` has NO error callback — only `success` and `cancel` — so a failure inside the vendor's own
|
|
28
|
+
* overlay surfaces as a cancel or as silence. Everything this component CAN detect is checked before
|
|
29
|
+
* `choose` is called, which is why the guards below are eager rather than defensive.
|
|
30
|
+
*
|
|
31
|
+
* And a chosen file carries no MIME type. The selection therefore omits `mimeType` rather than
|
|
32
|
+
* guessing one from the extension: absent means UNKNOWN, and the field validates every chosen file
|
|
33
|
+
* against `allowedMimeTypes` on its own.
|
|
34
|
+
*
|
|
35
|
+
* ## Not proven in a browser
|
|
36
|
+
*
|
|
37
|
+
* Nothing here has been driven against a real Dropbox account. Tracked on #460, which is where the
|
|
38
|
+
* DROPBOX storage member's fate lives: this picker is the ATTACH-only offering, the governed path is
|
|
39
|
+
* not built, and `google-drive` remains the one proven governed mechanism.
|
|
40
|
+
*/
|
|
41
|
+
import { useEffect, useRef } from 'react';
|
|
42
|
+
import { ProviderFrontendSelectionDelivery, } from '@wildo-ai/saas-models/public-runtime';
|
|
43
|
+
function readString(value) {
|
|
44
|
+
return typeof value === 'string' && value.length > 0 ? value : undefined;
|
|
45
|
+
}
|
|
46
|
+
function readNumber(value) {
|
|
47
|
+
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
48
|
+
}
|
|
49
|
+
/** Opens the Chooser as soon as it mounts — see the Drive picker for why mounting IS opening. */
|
|
50
|
+
export function DropboxPicker(props) {
|
|
51
|
+
const openedRef = useRef(false);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (openedRef.current)
|
|
54
|
+
return;
|
|
55
|
+
openedRef.current = true;
|
|
56
|
+
let cancelled = false;
|
|
57
|
+
const fail = (message) => {
|
|
58
|
+
if (!cancelled)
|
|
59
|
+
props.onError(new Error(message));
|
|
60
|
+
};
|
|
61
|
+
const globals = window;
|
|
62
|
+
const dropbox = globals.Dropbox;
|
|
63
|
+
if (dropbox === undefined) {
|
|
64
|
+
fail('The Dropbox Chooser script has not loaded, so the picker cannot open. The `dropbox` provider declares it '
|
|
65
|
+
+ 'in `scripts`; check that the surface injects provider scripts and that the composed '
|
|
66
|
+
+ 'Content-Security-Policy admits https://www.dropbox.com.');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const appKey = readString(props.publicConfig.appKey);
|
|
70
|
+
if (appKey === undefined) {
|
|
71
|
+
fail("The `dropbox` provider's publicConfig declares no `appKey`, which the Dropbox Chooser requires.");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// The framework injects the script WITHOUT the vendor's documented `data-app-key` attribute — see
|
|
75
|
+
// the module note — so `init` is the only thing that can supply the key. A build of `dropins.js`
|
|
76
|
+
// without it would leave the Chooser keyless and throw from inside the vendor's own code, which is
|
|
77
|
+
// far harder to read than this sentence.
|
|
78
|
+
if (typeof dropbox.init !== 'function') {
|
|
79
|
+
fail('The loaded Dropbox Chooser script exposes no `Dropbox.init`, so its app key cannot be supplied. The '
|
|
80
|
+
+ 'framework injects the script without the vendor-documented `data-app-key` attribute because that key is '
|
|
81
|
+
+ 'per-application configuration, and `Dropbox.init({ appKey })` is the documented alternative.');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
dropbox.init({ appKey });
|
|
85
|
+
dropbox.choose({
|
|
86
|
+
// `direct` is what makes this picker's result browser-readable: it is the value that returns a
|
|
87
|
+
// credential-free download link rather than a shareable preview page. Changing it to `preview`
|
|
88
|
+
// would change what a selection CONTAINS, and the provider's declared `selectionDelivery` would
|
|
89
|
+
// then be a lie the framework refuses — see `receiveProviderFileSelections`.
|
|
90
|
+
linkType: 'direct',
|
|
91
|
+
multiselect: props.constraints.maxFiles !== undefined && props.constraints.maxFiles > 1,
|
|
92
|
+
// Incompatible with `linkType: 'direct'` by the vendor's own contract, and meaningless for a
|
|
93
|
+
// file field regardless: a folder has no bytes to ingest.
|
|
94
|
+
folderselect: false,
|
|
95
|
+
// Dropbox enforces this itself, so the user is stopped in the overlay rather than after
|
|
96
|
+
// choosing. Unlike the MIME allow-list, which the vendor filters by EXTENSION and so cannot be
|
|
97
|
+
// translated faithfully — that stays with the field, which validates every chosen file anyway.
|
|
98
|
+
...(props.constraints.maxSize === undefined ? {} : { sizeLimit: props.constraints.maxSize }),
|
|
99
|
+
success: (files) => {
|
|
100
|
+
if (cancelled)
|
|
101
|
+
return;
|
|
102
|
+
const selections = [];
|
|
103
|
+
for (const file of files) {
|
|
104
|
+
const url = readString(file.link);
|
|
105
|
+
// No link means the Chooser did not run with `linkType: 'direct'` — a misconfiguration, and
|
|
106
|
+
// the one case where handing the selection up anyway would break the declaration this
|
|
107
|
+
// provider makes.
|
|
108
|
+
if (url === undefined) {
|
|
109
|
+
fail('Dropbox returned a chosen file with no link. The Chooser must be opened with `linkType: "direct"` '
|
|
110
|
+
+ 'for its result to be browser-readable, which is what this provider declares.');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
selections.push({
|
|
114
|
+
kind: ProviderFrontendSelectionDelivery.BROWSER_READABLE_URL,
|
|
115
|
+
url,
|
|
116
|
+
displayName: readString(file.name),
|
|
117
|
+
// No `mimeType`: Dropbox does not return one, and guessing from the extension would put an
|
|
118
|
+
// invented value where the framework reads a fact.
|
|
119
|
+
sizeBytes: readNumber(file.bytes),
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
props.onSelect(selections);
|
|
123
|
+
},
|
|
124
|
+
cancel: () => {
|
|
125
|
+
if (!cancelled)
|
|
126
|
+
props.onCancel();
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
return () => {
|
|
130
|
+
cancelled = true;
|
|
131
|
+
};
|
|
132
|
+
// Mount-only — see the Drive picker.
|
|
133
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
|
+
}, []);
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=dropbox-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropbox-picker.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/dropbox-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iCAAiC,GAGlC,MAAM,sCAAsC,CAAC;AAkC9C,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjF,CAAC;AAED,iGAAiG;AACjG,MAAM,UAAU,aAAa,CAAC,KAA8B;IAC1D,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAEhC,SAAS,CAAC,GAAG,EAA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ourcesContent":["/**\n * Dropbox file picker — the component the `dropbox` provider contributes for `FRONTEND_FILE_PICKER`.\n *\n * ## Why it declares BROWSER_READABLE_URL, like OneDrive and unlike Drive\n *\n * The Chooser opened with `linkType: 'direct'` returns each chosen file carrying a link that needs no\n * credential to fetch and expires after four hours. The browser genuinely can read the bytes, so the\n * honest arm is `BROWSER_READABLE_URL` and the framework ingests the result into the field's own\n * storage. Drive's picker returns metadata only, whose bytes need a credential the browser must not\n * hold — which is why #383 was answered PER VENDOR rather than once.\n *\n * spec-cite: Dropbox Chooser reference —\n * https://docs.dropboxapi.com/dropbox-api/docs/pre-built-components/chooser — for the `choose`\n * options used here, the direct link being credential-free, and the returned file's fields.\n * Paraphrased rather than quoted.\n *\n * ## The app key does NOT ride on the script tag\n *\n * The vendor documents `data-app-key` on a script carrying `id=\"dropboxjs\"`, which the framework's\n * declarative `scripts` channel cannot express: that declaration is static engine data and the key is\n * per-application configuration. Reading the shipped `dropins.js` shows a second, public source —\n * `Dropbox.init({ appKey })` — so the script is declared plainly in the provider module and the key\n * is supplied HERE from `publicConfig`, after the script has executed.\n *\n * ## Two vendor limits worth knowing before debugging one\n *\n * `choose` has NO error callback — only `success` and `cancel` — so a failure inside the vendor's own\n * overlay surfaces as a cancel or as silence. Everything this component CAN detect is checked before\n * `choose` is called, which is why the guards below are eager rather than defensive.\n *\n * And a chosen file carries no MIME type. The selection therefore omits `mimeType` rather than\n * guessing one from the extension: absent means UNKNOWN, and the field validates every chosen file\n * against `allowedMimeTypes` on its own.\n *\n * ## Not proven in a browser\n *\n * Nothing here has been driven against a real Dropbox account. Tracked on #460, which is where the\n * DROPBOX storage member's fate lives: this picker is the ATTACH-only offering, the governed path is\n * not built, and `google-drive` remains the one proven governed mechanism.\n */\n\nimport { useEffect, useRef } from 'react';\nimport {\n ProviderFrontendSelectionDelivery,\n type ProviderFilePickerProps,\n type ProviderFileSelection,\n} from '@wildo-ai/saas-models/public-runtime';\n\n/** The slice of a chosen Dropbox file this component reads. */\ninterface DropboxChosenFile {\n readonly id?: unknown;\n readonly name?: unknown;\n readonly link?: unknown;\n readonly bytes?: unknown;\n readonly isDir?: unknown;\n}\n\ninterface DropboxChooseOptions {\n linkType: string;\n multiselect: boolean;\n folderselect: boolean;\n sizeLimit?: number;\n success(files: readonly DropboxChosenFile[]): void;\n cancel(): void;\n}\n\n/**\n * The `Dropbox` global `dropins.js` installs.\n *\n * Typed locally for the same reason as the Drive and OneDrive pickers: the surface used is two\n * functions, and a `@types` package for a global that may not be present buys nothing this file does\n * not already state.\n */\ninterface DropboxGlobals {\n readonly Dropbox?: {\n choose(options: DropboxChooseOptions): void;\n init?(options: { appKey: string }): void;\n };\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction readNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** Opens the Chooser as soon as it mounts — see the Drive picker for why mounting IS opening. */\nexport function DropboxPicker(props: ProviderFilePickerProps): null {\n const openedRef = useRef(false);\n\n useEffect(() => {\n if (openedRef.current) return;\n openedRef.current = true;\n\n let cancelled = false;\n const fail = (message: string): void => {\n if (!cancelled) props.onError(new Error(message));\n };\n\n const globals = window as unknown as DropboxGlobals;\n const dropbox = globals.Dropbox;\n if (dropbox === undefined) {\n fail(\n 'The Dropbox Chooser script has not loaded, so the picker cannot open. The `dropbox` provider declares it '\n + 'in `scripts`; check that the surface injects provider scripts and that the composed '\n + 'Content-Security-Policy admits https://www.dropbox.com.',\n );\n return;\n }\n\n const appKey = readString(props.publicConfig.appKey);\n if (appKey === undefined) {\n fail(\"The `dropbox` provider's publicConfig declares no `appKey`, which the Dropbox Chooser requires.\");\n return;\n }\n\n // The framework injects the script WITHOUT the vendor's documented `data-app-key` attribute — see\n // the module note — so `init` is the only thing that can supply the key. A build of `dropins.js`\n // without it would leave the Chooser keyless and throw from inside the vendor's own code, which is\n // far harder to read than this sentence.\n if (typeof dropbox.init !== 'function') {\n fail(\n 'The loaded Dropbox Chooser script exposes no `Dropbox.init`, so its app key cannot be supplied. The '\n + 'framework injects the script without the vendor-documented `data-app-key` attribute because that key is '\n + 'per-application configuration, and `Dropbox.init({ appKey })` is the documented alternative.',\n );\n return;\n }\n dropbox.init({ appKey });\n\n dropbox.choose({\n // `direct` is what makes this picker's result browser-readable: it is the value that returns a\n // credential-free download link rather than a shareable preview page. Changing it to `preview`\n // would change what a selection CONTAINS, and the provider's declared `selectionDelivery` would\n // then be a lie the framework refuses — see `receiveProviderFileSelections`.\n linkType: 'direct',\n multiselect: props.constraints.maxFiles !== undefined && props.constraints.maxFiles > 1,\n // Incompatible with `linkType: 'direct'` by the vendor's own contract, and meaningless for a\n // file field regardless: a folder has no bytes to ingest.\n folderselect: false,\n // Dropbox enforces this itself, so the user is stopped in the overlay rather than after\n // choosing. Unlike the MIME allow-list, which the vendor filters by EXTENSION and so cannot be\n // translated faithfully — that stays with the field, which validates every chosen file anyway.\n ...(props.constraints.maxSize === undefined ? {} : { sizeLimit: props.constraints.maxSize }),\n success: (files) => {\n if (cancelled) return;\n\n const selections: ProviderFileSelection[] = [];\n for (const file of files) {\n const url = readString(file.link);\n // No link means the Chooser did not run with `linkType: 'direct'` — a misconfiguration, and\n // the one case where handing the selection up anyway would break the declaration this\n // provider makes.\n if (url === undefined) {\n fail(\n 'Dropbox returned a chosen file with no link. The Chooser must be opened with `linkType: \"direct\"` '\n + 'for its result to be browser-readable, which is what this provider declares.',\n );\n return;\n }\n selections.push({\n kind: ProviderFrontendSelectionDelivery.BROWSER_READABLE_URL,\n url,\n displayName: readString(file.name),\n // No `mimeType`: Dropbox does not return one, and guessing from the extension would put an\n // invented value where the framework reads a fact.\n sizeBytes: readNumber(file.bytes),\n });\n }\n props.onSelect(selections);\n },\n cancel: () => {\n if (!cancelled) props.onCancel();\n },\n });\n\n return () => {\n cancelled = true;\n };\n // Mount-only — see the Drive picker.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return null;\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DropboxPickerLazy — the ONLY public door onto the DropboxPicker module.
|
|
3
|
+
*
|
|
4
|
+
* Lazy-boundary wrapper (`*.lazy.tsx` convention, PdfViewerLazy precedent): owns the
|
|
5
|
+
* `React.lazy(() => import(...))` split point so the picker's code never lands in the
|
|
6
|
+
* application's entry chunk, and `pnpm check:lazy-boundaries` refuses any static import of
|
|
7
|
+
* the wrapped module from anywhere else. A provider picker is opened by a user who asked
|
|
8
|
+
* for one; every other visitor pays nothing for it.
|
|
9
|
+
*
|
|
10
|
+
* No Suspense fallback with a shape: a picker renders NOTHING of its own (it opens a
|
|
11
|
+
* vendor overlay), so reserving layout would draw a box where there will never be one.
|
|
12
|
+
*/
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import type { ProviderFilePickerProps } from "@wildo-ai/saas-models/public-runtime";
|
|
15
|
+
/**
|
|
16
|
+
* A chunk that fails to download throws during render, and Suspense does not catch it. The door
|
|
17
|
+
* catches it and reports it through the picker contract's own `onError` — the channel the host
|
|
18
|
+
* already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,
|
|
19
|
+
* not a crashed form.
|
|
20
|
+
*/
|
|
21
|
+
export declare function DropboxPickerLazy(props: ProviderFilePickerProps): React.JSX.Element;
|
|
22
|
+
//# sourceMappingURL=dropbox-picker.lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropbox-picker.lazy.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/dropbox-picker.lazy.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAKnF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAQnF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* DropboxPickerLazy — the ONLY public door onto the DropboxPicker module.
|
|
5
|
+
*
|
|
6
|
+
* Lazy-boundary wrapper (`*.lazy.tsx` convention, PdfViewerLazy precedent): owns the
|
|
7
|
+
* `React.lazy(() => import(...))` split point so the picker's code never lands in the
|
|
8
|
+
* application's entry chunk, and `pnpm check:lazy-boundaries` refuses any static import of
|
|
9
|
+
* the wrapped module from anywhere else. A provider picker is opened by a user who asked
|
|
10
|
+
* for one; every other visitor pays nothing for it.
|
|
11
|
+
*
|
|
12
|
+
* No Suspense fallback with a shape: a picker renders NOTHING of its own (it opens a
|
|
13
|
+
* vendor overlay), so reserving layout would draw a box where there will never be one.
|
|
14
|
+
*/
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
import { LazyDoorErrorBoundary } from "@wildo-ai/saas-frontend-lib";
|
|
17
|
+
const LazyDropboxPicker = React.lazy(async () => ({ default: (await import("./dropbox-picker.js")).DropboxPicker }));
|
|
18
|
+
/**
|
|
19
|
+
* A chunk that fails to download throws during render, and Suspense does not catch it. The door
|
|
20
|
+
* catches it and reports it through the picker contract's own `onError` — the channel the host
|
|
21
|
+
* already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,
|
|
22
|
+
* not a crashed form.
|
|
23
|
+
*/
|
|
24
|
+
export function DropboxPickerLazy(props) {
|
|
25
|
+
return (_jsx(LazyDoorErrorBoundary, { doorName: "DropboxPickerLazy", fallback: null, onError: props.onError, children: _jsx(React.Suspense, { fallback: null, children: _jsx(LazyDropboxPicker, { ...props }) }) }));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=dropbox-picker.lazy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropbox-picker.lazy.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/dropbox-picker.lazy.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,MAAM,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;AAEjH;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA8B;IAC9D,OAAO,CACL,KAAC,qBAAqB,IAAC,QAAQ,EAAC,mBAAmB,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,YACxF,KAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YAC5B,KAAC,iBAAiB,OAAK,KAAK,GAAI,GACjB,GACK,CACzB,CAAA;AACH,CAAC","sourcesContent":["\"use client\"\n\n/**\n * DropboxPickerLazy — the ONLY public door onto the DropboxPicker module.\n *\n * Lazy-boundary wrapper (`*.lazy.tsx` convention, PdfViewerLazy precedent): owns the\n * `React.lazy(() => import(...))` split point so the picker's code never lands in the\n * application's entry chunk, and `pnpm check:lazy-boundaries` refuses any static import of\n * the wrapped module from anywhere else. A provider picker is opened by a user who asked\n * for one; every other visitor pays nothing for it.\n *\n * No Suspense fallback with a shape: a picker renders NOTHING of its own (it opens a\n * vendor overlay), so reserving layout would draw a box where there will never be one.\n */\n\nimport * as React from \"react\"\nimport type { ProviderFilePickerProps } from \"@wildo-ai/saas-models/public-runtime\"\nimport { LazyDoorErrorBoundary } from \"@wildo-ai/saas-frontend-lib\"\n\nconst LazyDropboxPicker = React.lazy(async () => ({ default: (await import(\"./dropbox-picker\")).DropboxPicker }))\n\n/**\n * A chunk that fails to download throws during render, and Suspense does not catch it. The door\n * catches it and reports it through the picker contract's own `onError` — the channel the host\n * already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,\n * not a crashed form.\n */\nexport function DropboxPickerLazy(props: ProviderFilePickerProps): React.JSX.Element {\n return (\n <LazyDoorErrorBoundary doorName=\"DropboxPickerLazy\" fallback={null} onError={props.onError}>\n <React.Suspense fallback={null}>\n <LazyDropboxPicker {...props} />\n </React.Suspense>\n </LazyDoorErrorBoundary>\n )\n}\n"]}
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
* which is the account-connection surface (#333) and does not exist yet. Without
|
|
39
39
|
* one this picker reports through `onError` and opens nothing — deliberately,
|
|
40
40
|
* rather than reading a token from `publicConfig`, which is served to every
|
|
41
|
-
* browser. Tracked
|
|
41
|
+
* browser. Tracked on #569, which is this picker's own unproven record — a Drive file picked, linked
|
|
42
|
+
* and read through the GOOGLE_DRIVE storage by somebody who did not write it. (The previous pointer
|
|
43
|
+
* here was #359, which is closed.)
|
|
42
44
|
*/
|
|
43
45
|
import { type ProviderFilePickerProps } from '@wildo-ai/saas-models/public-runtime';
|
|
44
46
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-drive-picker.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"google-drive-picker.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/google-drive-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,sCAAsC,CAAC;AAsD9C;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAuGtE"}
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
* which is the account-connection surface (#333) and does not exist yet. Without
|
|
39
39
|
* one this picker reports through `onError` and opens nothing — deliberately,
|
|
40
40
|
* rather than reading a token from `publicConfig`, which is served to every
|
|
41
|
-
* browser. Tracked
|
|
41
|
+
* browser. Tracked on #569, which is this picker's own unproven record — a Drive file picked, linked
|
|
42
|
+
* and read through the GOOGLE_DRIVE storage by somebody who did not write it. (The previous pointer
|
|
43
|
+
* here was #359, which is closed.)
|
|
42
44
|
*/
|
|
43
45
|
import { useEffect, useRef } from 'react';
|
|
44
46
|
import { ProviderFrontendSelectionDelivery, } from '@wildo-ai/saas-models/public-runtime';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-drive-picker.js","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/file/providers/google-drive-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iCAAiC,GAGlC,MAAM,sCAAsC,CAAC;AAyC9C,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtE,8EAA8E;IAC9E,6EAA6E;IAC7E,6CAA6C;IAC7C,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAC7F,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CA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AC,CAAC;oBACL,CAAC;oBACD,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;gBAC7B,CAAC,CAAC,CAAC;gBAEL,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC;oBAC/E,OAAO,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;gBAC9C,CAAC;gBACD,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;gBACjE,IAAI,YAAY,KAAK,SAAS;oBAAE,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;gBAEtE,OAAO,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,EAAE,CAAC;QAEL,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;QACF,6EAA6E;QAC7E,uCAAuC;QACvC,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,8EAA8E;IAC9E,gDAAgD;IAChD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * Google Drive file picker — the component the `google-drive` provider contributes for\n * `FRONTEND_FILE_PICKER`.\n *\n * ## Why it declares REMOTE_REFERENCE\n *\n * Drive's Picker hands back file METADATA — an id, a name, a mime type — never\n * the bytes. Fetching the bytes is a separate authenticated call to the Drive\n * API, and in a Wildo application the credential that call needs belongs to the\n * backend. So a selection here is an opaque handle the application's executor\n * door resolves, which is exactly `REMOTE_REFERENCE`.\n *\n * Its sibling `onedrive-picker.tsx` declares the OTHER arm,\n * and the contrast is why issue #383 was answered per-vendor rather than\n * globally: two real pickers for one capability genuinely return different\n * things, and a framework insisting on one contract would have had to exclude\n * one of them.\n *\n * ## Why it lives in presets-components, behind a lazy boundary\n *\n * The engine's provider MODULES live in `@wildo-ai/external-connectors-public`,\n * which ships into three browser bundles behind a one-entry allow-list and\n * deliberately has no renderer. A component cannot live there, and that\n * package cannot name a loader that reaches this one either — it would close a\n * package cycle. So the module DECLARES the picker (its delivery, its keys) and\n * this library REGISTERS the loader beside its presets (`register-provider-components.ts`),\n * keyed by capability and provider ref. `google-drive-picker.lazy.tsx` is the\n * only door onto this file, and `check:lazy-boundaries` keeps it that way.\n *\n * This component has no vendor dependency: the Picker arrives as a `<script>`\n * global the provider module declares. A per-vendor package was built for it\n * first and retired for exactly that reason (#394).\n *\n * ## Not proven in a browser\n *\n * Nothing here has been driven against a real Drive account: the Picker\n * authorizes as the SIGNED-IN USER, so it needs a user-consented OAuth token,\n * which is the account-connection surface (#333) and does not exist yet. Without\n * one this picker reports through `onError` and opens nothing — deliberately,\n * rather than reading a token from `publicConfig`, which is served to every\n * browser. Tracked with the rest of the frontend provider surface in #359.\n */\n\nimport { useEffect, useRef } from 'react';\nimport {\n ProviderFrontendSelectionDelivery,\n type ProviderFilePickerProps,\n type ProviderFileSelection,\n} from '@wildo-ai/saas-models/public-runtime';\n\n/** The slice of Drive's picker metadata this component reads. */\ninterface GooglePickerDocument {\n readonly id?: unknown;\n readonly name?: unknown;\n readonly mimeType?: unknown;\n readonly sizeBytes?: unknown;\n}\n\ninterface GooglePickerBuilder {\n setOAuthToken(token: string): GooglePickerBuilder;\n setAppId(appId: string): GooglePickerBuilder;\n setDeveloperKey(key: string): GooglePickerBuilder;\n addView(view: object): GooglePickerBuilder;\n enableFeature(feature: string): GooglePickerBuilder;\n setCallback(\n callback: (data: { action?: unknown; docs?: readonly GooglePickerDocument[] }) => void,\n ): GooglePickerBuilder;\n build(): { setVisible(visible: boolean): void };\n}\n\n/**\n * The `gapi` / `google.picker` globals the vendor's `<script>` installs.\n *\n * Typed structurally and locally rather than through `@types/gapi`: the surface\n * used here is four calls wide, and a `@types` package for a global that may not\n * be present is a dependency bought for a shape this file already states.\n */\ninterface GooglePickerGlobals {\n readonly gapi?: { load(name: string, callback: () => void): void };\n readonly google?: {\n readonly picker?: {\n readonly Action: { readonly PICKED: string; readonly CANCEL: string };\n readonly ViewId: { readonly DOCS: string };\n readonly PickerBuilder: new () => GooglePickerBuilder;\n readonly DocsView: new (viewId: string) => object;\n };\n };\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction readNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n // Drive reports `sizeBytes` as a decimal STRING for large files, so this is a\n // real case rather than defensiveness. A bare `Number()` would turn an empty\n // string into 0 and claim the file is empty.\n const parsed = typeof value === 'string' && value.trim() !== '' ? Number(value) : Number.NaN;\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\n/**\n * Opens the Drive picker as soon as it mounts.\n *\n * Mounting IS opening: the framework host mounts a picker only once a user has\n * asked for one, so an extra button inside the component would be a second click\n * for the same intent.\n */\nexport function GoogleDrivePicker(props: ProviderFilePickerProps): null {\n // A picker must open exactly once per mount. Without this, any re-render\n // caused by a parent — a resize, a sibling's state — would open a second Drive\n // dialog over the first, and dismissing one would leave the other live.\n const openedRef = useRef(false);\n\n useEffect(() => {\n if (openedRef.current) return;\n openedRef.current = true;\n\n let cancelled = false;\n const fail = (message: string): void => {\n if (!cancelled) props.onError(new Error(message));\n };\n\n void (async () => {\n const globals = window as unknown as GooglePickerGlobals;\n if (globals.gapi === undefined) {\n fail(\n 'The Google API script has not loaded, so the Drive picker cannot open. The `google-drive` provider '\n + 'declares it in `scripts`; check that the surface injects provider scripts and that the composed '\n + 'Content-Security-Policy admits https://apis.google.com.',\n );\n return;\n }\n\n const token = await props.getAccessToken?.();\n if (token === undefined) {\n fail(\n 'No Google access token is available for this user, so the Drive picker cannot open. The Picker '\n + \"authorizes as the SIGNED-IN USER, so the application must connect the user's Google account \"\n + 'first. A token must never be read from `publicConfig`, which is served to every browser.',\n );\n return;\n }\n\n const appId = readString(props.publicConfig.appId);\n if (appId === undefined) {\n fail(\"The `google-drive` provider's publicConfig declares no `appId`, which the Drive picker requires.\");\n return;\n }\n\n globals.gapi.load('picker', () => {\n const picker = (window as unknown as GooglePickerGlobals).google?.picker;\n if (picker === undefined) {\n fail('The Google Picker module loaded but installed no `google.picker` global.');\n return;\n }\n\n const builder = new picker.PickerBuilder()\n .setOAuthToken(token)\n .setAppId(appId)\n .addView(new picker.DocsView(picker.ViewId.DOCS))\n .setCallback((data) => {\n if (cancelled) return;\n if (data.action === picker.Action.CANCEL) {\n props.onCancel();\n return;\n }\n if (data.action !== picker.Action.PICKED) return;\n\n const selections: ProviderFileSelection[] = [];\n for (const document of data.docs ?? []) {\n const externalId = readString(document.id);\n // A document with no id is one the backend could never resolve.\n // Reporting beats handing up a selection whose reference is empty,\n // which would fail later and somewhere else.\n if (externalId === undefined) {\n fail('Google Picker returned a selected document with no id, which cannot be resolved.');\n return;\n }\n selections.push({\n kind: ProviderFrontendSelectionDelivery.REMOTE_REFERENCE,\n externalId,\n displayName: readString(document.name),\n mimeType: readString(document.mimeType),\n sizeBytes: readNumber(document.sizeBytes),\n });\n }\n props.onSelect(selections);\n });\n\n if (props.constraints.maxFiles !== undefined && props.constraints.maxFiles > 1) {\n builder.enableFeature('multiselectEnabled');\n }\n const developerKey = readString(props.publicConfig.developerKey);\n if (developerKey !== undefined) builder.setDeveloperKey(developerKey);\n\n builder.build().setVisible(true);\n });\n })();\n\n return () => {\n cancelled = true;\n };\n // Mount-only: re-running this opens a second dialog, and every prop it reads\n // is fixed for the life of one picker.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // The picker is a vendor-owned overlay. This component renders nothing of its\n // own and must not put a placeholder behind it.\n return null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"google-drive-picker.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/google-drive-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,IAAI,CAAC,CAAC;YACnC,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,EAAE,CAAC;QAEL,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;QACF,6EAA6E;QAC7E,uCAAuC;QACvC,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,8EAA8E;IAC9E,gDAAgD;IAChD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * Google Drive file picker — the component the `google-drive` provider contributes for\n * `FRONTEND_FILE_PICKER`.\n *\n * ## Why it declares REMOTE_REFERENCE\n *\n * Drive's Picker hands back file METADATA — an id, a name, a mime type — never\n * the bytes. Fetching the bytes is a separate authenticated call to the Drive\n * API, and in a Wildo application the credential that call needs belongs to the\n * backend. So a selection here is an opaque handle the application's executor\n * door resolves, which is exactly `REMOTE_REFERENCE`.\n *\n * Its sibling `onedrive-picker.tsx` declares the OTHER arm,\n * and the contrast is why issue #383 was answered per-vendor rather than\n * globally: two real pickers for one capability genuinely return different\n * things, and a framework insisting on one contract would have had to exclude\n * one of them.\n *\n * ## Why it lives in presets-components, behind a lazy boundary\n *\n * The engine's provider MODULES live in `@wildo-ai/external-connectors-public`,\n * which ships into three browser bundles behind a one-entry allow-list and\n * deliberately has no renderer. A component cannot live there, and that\n * package cannot name a loader that reaches this one either — it would close a\n * package cycle. So the module DECLARES the picker (its delivery, its keys) and\n * this library REGISTERS the loader beside its presets (`register-provider-components.ts`),\n * keyed by capability and provider ref. `google-drive-picker.lazy.tsx` is the\n * only door onto this file, and `check:lazy-boundaries` keeps it that way.\n *\n * This component has no vendor dependency: the Picker arrives as a `<script>`\n * global the provider module declares. A per-vendor package was built for it\n * first and retired for exactly that reason (#394).\n *\n * ## Not proven in a browser\n *\n * Nothing here has been driven against a real Drive account: the Picker\n * authorizes as the SIGNED-IN USER, so it needs a user-consented OAuth token,\n * which is the account-connection surface (#333) and does not exist yet. Without\n * one this picker reports through `onError` and opens nothing — deliberately,\n * rather than reading a token from `publicConfig`, which is served to every\n * browser. Tracked on #569, which is this picker's own unproven record — a Drive file picked, linked\n * and read through the GOOGLE_DRIVE storage by somebody who did not write it. (The previous pointer\n * here was #359, which is closed.)\n */\n\nimport { useEffect, useRef } from 'react';\nimport {\n ProviderFrontendSelectionDelivery,\n type ProviderFilePickerProps,\n type ProviderFileSelection,\n} from '@wildo-ai/saas-models/public-runtime';\n\n/** The slice of Drive's picker metadata this component reads. */\ninterface GooglePickerDocument {\n readonly id?: unknown;\n readonly name?: unknown;\n readonly mimeType?: unknown;\n readonly sizeBytes?: unknown;\n}\n\ninterface GooglePickerBuilder {\n setOAuthToken(token: string): GooglePickerBuilder;\n setAppId(appId: string): GooglePickerBuilder;\n setDeveloperKey(key: string): GooglePickerBuilder;\n addView(view: object): GooglePickerBuilder;\n enableFeature(feature: string): GooglePickerBuilder;\n setCallback(\n callback: (data: { action?: unknown; docs?: readonly GooglePickerDocument[] }) => void,\n ): GooglePickerBuilder;\n build(): { setVisible(visible: boolean): void };\n}\n\n/**\n * The `gapi` / `google.picker` globals the vendor's `<script>` installs.\n *\n * Typed structurally and locally rather than through `@types/gapi`: the surface\n * used here is four calls wide, and a `@types` package for a global that may not\n * be present is a dependency bought for a shape this file already states.\n */\ninterface GooglePickerGlobals {\n readonly gapi?: { load(name: string, callback: () => void): void };\n readonly google?: {\n readonly picker?: {\n readonly Action: { readonly PICKED: string; readonly CANCEL: string };\n readonly ViewId: { readonly DOCS: string };\n readonly PickerBuilder: new () => GooglePickerBuilder;\n readonly DocsView: new (viewId: string) => object;\n };\n };\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction readNumber(value: unknown): number | undefined {\n if (typeof value === 'number' && Number.isFinite(value)) return value;\n // Drive reports `sizeBytes` as a decimal STRING for large files, so this is a\n // real case rather than defensiveness. A bare `Number()` would turn an empty\n // string into 0 and claim the file is empty.\n const parsed = typeof value === 'string' && value.trim() !== '' ? Number(value) : Number.NaN;\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\n/**\n * Opens the Drive picker as soon as it mounts.\n *\n * Mounting IS opening: the framework host mounts a picker only once a user has\n * asked for one, so an extra button inside the component would be a second click\n * for the same intent.\n */\nexport function GoogleDrivePicker(props: ProviderFilePickerProps): null {\n // A picker must open exactly once per mount. Without this, any re-render\n // caused by a parent — a resize, a sibling's state — would open a second Drive\n // dialog over the first, and dismissing one would leave the other live.\n const openedRef = useRef(false);\n\n useEffect(() => {\n if (openedRef.current) return;\n openedRef.current = true;\n\n let cancelled = false;\n const fail = (message: string): void => {\n if (!cancelled) props.onError(new Error(message));\n };\n\n void (async () => {\n const globals = window as unknown as GooglePickerGlobals;\n if (globals.gapi === undefined) {\n fail(\n 'The Google API script has not loaded, so the Drive picker cannot open. The `google-drive` provider '\n + 'declares it in `scripts`; check that the surface injects provider scripts and that the composed '\n + 'Content-Security-Policy admits https://apis.google.com.',\n );\n return;\n }\n\n const token = await props.getAccessToken?.();\n if (token === undefined) {\n fail(\n 'No Google access token is available for this user, so the Drive picker cannot open. The Picker '\n + \"authorizes as the SIGNED-IN USER, so the application must connect the user's Google account \"\n + 'first. A token must never be read from `publicConfig`, which is served to every browser.',\n );\n return;\n }\n\n const appId = readString(props.publicConfig.appId);\n if (appId === undefined) {\n fail(\"The `google-drive` provider's publicConfig declares no `appId`, which the Drive picker requires.\");\n return;\n }\n\n globals.gapi.load('picker', () => {\n const picker = (window as unknown as GooglePickerGlobals).google?.picker;\n if (picker === undefined) {\n fail('The Google Picker module loaded but installed no `google.picker` global.');\n return;\n }\n\n const builder = new picker.PickerBuilder()\n .setOAuthToken(token)\n .setAppId(appId)\n .addView(new picker.DocsView(picker.ViewId.DOCS))\n .setCallback((data) => {\n if (cancelled) return;\n if (data.action === picker.Action.CANCEL) {\n props.onCancel();\n return;\n }\n if (data.action !== picker.Action.PICKED) return;\n\n const selections: ProviderFileSelection[] = [];\n for (const document of data.docs ?? []) {\n const externalId = readString(document.id);\n // A document with no id is one the backend could never resolve.\n // Reporting beats handing up a selection whose reference is empty,\n // which would fail later and somewhere else.\n if (externalId === undefined) {\n fail('Google Picker returned a selected document with no id, which cannot be resolved.');\n return;\n }\n selections.push({\n kind: ProviderFrontendSelectionDelivery.REMOTE_REFERENCE,\n externalId,\n displayName: readString(document.name),\n mimeType: readString(document.mimeType),\n sizeBytes: readNumber(document.sizeBytes),\n });\n }\n props.onSelect(selections);\n });\n\n if (props.constraints.maxFiles !== undefined && props.constraints.maxFiles > 1) {\n builder.enableFeature('multiselectEnabled');\n }\n const developerKey = readString(props.publicConfig.developerKey);\n if (developerKey !== undefined) builder.setDeveloperKey(developerKey);\n\n builder.build().setVisible(true);\n });\n })();\n\n return () => {\n cancelled = true;\n };\n // Mount-only: re-running this opens a second dialog, and every prop it reads\n // is fixed for the life of one picker.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // The picker is a vendor-owned overlay. This component renders nothing of its\n // own and must not put a placeholder behind it.\n return null;\n}\n"]}
|
|
@@ -12,5 +12,11 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import type { ProviderFilePickerProps } from "@wildo-ai/saas-models/public-runtime";
|
|
15
|
+
/**
|
|
16
|
+
* A chunk that fails to download throws during render, and Suspense does not catch it. The door
|
|
17
|
+
* catches it and reports it through the picker contract's own `onError` — the channel the host
|
|
18
|
+
* already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,
|
|
19
|
+
* not a crashed form.
|
|
20
|
+
*/
|
|
15
21
|
export declare function GoogleDrivePickerLazy(props: ProviderFilePickerProps): React.JSX.Element;
|
|
16
22
|
//# sourceMappingURL=google-drive-picker.lazy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-drive-picker.lazy.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"google-drive-picker.lazy.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/google-drive-picker.lazy.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAKnF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAQvF"}
|
|
@@ -13,8 +13,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
* vendor overlay), so reserving layout would draw a box where there will never be one.
|
|
14
14
|
*/
|
|
15
15
|
import * as React from "react";
|
|
16
|
+
import { LazyDoorErrorBoundary } from "@wildo-ai/saas-frontend-lib";
|
|
16
17
|
const LazyGoogleDrivePicker = React.lazy(async () => ({ default: (await import("./google-drive-picker.js")).GoogleDrivePicker }));
|
|
18
|
+
/**
|
|
19
|
+
* A chunk that fails to download throws during render, and Suspense does not catch it. The door
|
|
20
|
+
* catches it and reports it through the picker contract's own `onError` — the channel the host
|
|
21
|
+
* already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,
|
|
22
|
+
* not a crashed form.
|
|
23
|
+
*/
|
|
17
24
|
export function GoogleDrivePickerLazy(props) {
|
|
18
|
-
return (_jsx(React.Suspense, { fallback: null, children: _jsx(LazyGoogleDrivePicker, { ...props }) }));
|
|
25
|
+
return (_jsx(LazyDoorErrorBoundary, { doorName: "GoogleDrivePickerLazy", fallback: null, onError: props.onError, children: _jsx(React.Suspense, { fallback: null, children: _jsx(LazyGoogleDrivePicker, { ...props }) }) }));
|
|
19
26
|
}
|
|
20
27
|
//# sourceMappingURL=google-drive-picker.lazy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-drive-picker.lazy.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"google-drive-picker.lazy.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/google-drive-picker.lazy.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,MAAM,qBAAqB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAA;AAE9H;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAA8B;IAClE,OAAO,CACL,KAAC,qBAAqB,IAAC,QAAQ,EAAC,uBAAuB,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,YAC5F,KAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YAC5B,KAAC,qBAAqB,OAAK,KAAK,GAAI,GACrB,GACK,CACzB,CAAA;AACH,CAAC","sourcesContent":["\"use client\"\n\n/**\n * GoogleDrivePickerLazy — the ONLY public door onto the GoogleDrivePicker module.\n *\n * Lazy-boundary wrapper (`*.lazy.tsx` convention, PdfViewerLazy precedent): owns the\n * `React.lazy(() => import(...))` split point so the picker's code never lands in the\n * application's entry chunk, and `pnpm check:lazy-boundaries` refuses any static import of\n * the wrapped module from anywhere else. A provider picker is opened by a user who asked\n * for one; every other visitor pays nothing for it.\n *\n * No Suspense fallback with a shape: a picker renders NOTHING of its own (it opens a\n * vendor overlay), so reserving layout would draw a box where there will never be one.\n */\n\nimport * as React from \"react\"\nimport type { ProviderFilePickerProps } from \"@wildo-ai/saas-models/public-runtime\"\nimport { LazyDoorErrorBoundary } from \"@wildo-ai/saas-frontend-lib\"\n\nconst LazyGoogleDrivePicker = React.lazy(async () => ({ default: (await import(\"./google-drive-picker\")).GoogleDrivePicker }))\n\n/**\n * A chunk that fails to download throws during render, and Suspense does not catch it. The door\n * catches it and reports it through the picker contract's own `onError` — the channel the host\n * already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,\n * not a crashed form.\n */\nexport function GoogleDrivePickerLazy(props: ProviderFilePickerProps): React.JSX.Element {\n return (\n <LazyDoorErrorBoundary doorName=\"GoogleDrivePickerLazy\" fallback={null} onError={props.onError}>\n <React.Suspense fallback={null}>\n <LazyGoogleDrivePicker {...props} />\n </React.Suspense>\n </LazyDoorErrorBoundary>\n )\n}\n"]}
|
|
@@ -28,8 +28,12 @@
|
|
|
28
28
|
* Nothing here has been driven against a real OneDrive account. Unlike the Drive
|
|
29
29
|
* picker this one authenticates through the vendor's own popup rather than
|
|
30
30
|
* needing a token from the application, so it does not depend on #333 — but it
|
|
31
|
-
* still needs a real `clientId` and a real user.
|
|
32
|
-
*
|
|
31
|
+
* still needs a real `clientId` and a real user.
|
|
32
|
+
*
|
|
33
|
+
* Tracked on #570, which is where OneDrive's whole state lives — and #570 is DEFERRED by decision:
|
|
34
|
+
* this v7.2 picker stays as the OneDrive offering, the governed v8 path is not built, and the
|
|
35
|
+
* capability is honest about being "OneDrive files can be attached" rather than "stored in OneDrive".
|
|
36
|
+
* (The previous pointer here was #359, which is closed.)
|
|
33
37
|
*/
|
|
34
38
|
import { type ProviderFilePickerProps } from '@wildo-ai/saas-models/public-runtime';
|
|
35
39
|
/** Opens the OneDrive picker as soon as it mounts — see the Drive picker for why mounting IS opening. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onedrive-picker.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"onedrive-picker.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/onedrive-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EAEL,KAAK,uBAAuB,EAE7B,MAAM,sCAAsC,CAAC;AAwC9C,yGAAyG;AACzG,wBAAgB,cAAc,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,CAyFnE"}
|
|
@@ -28,8 +28,12 @@
|
|
|
28
28
|
* Nothing here has been driven against a real OneDrive account. Unlike the Drive
|
|
29
29
|
* picker this one authenticates through the vendor's own popup rather than
|
|
30
30
|
* needing a token from the application, so it does not depend on #333 — but it
|
|
31
|
-
* still needs a real `clientId` and a real user.
|
|
32
|
-
*
|
|
31
|
+
* still needs a real `clientId` and a real user.
|
|
32
|
+
*
|
|
33
|
+
* Tracked on #570, which is where OneDrive's whole state lives — and #570 is DEFERRED by decision:
|
|
34
|
+
* this v7.2 picker stays as the OneDrive offering, the governed v8 path is not built, and the
|
|
35
|
+
* capability is honest about being "OneDrive files can be attached" rather than "stored in OneDrive".
|
|
36
|
+
* (The previous pointer here was #359, which is closed.)
|
|
33
37
|
*/
|
|
34
38
|
import { useEffect, useRef } from 'react';
|
|
35
39
|
import { ProviderFrontendSelectionDelivery, } from '@wildo-ai/saas-models/public-runtime';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onedrive-picker.js","sourceRoot":"","sources":["../../../../../../../src/components/form/controls/file/providers/onedrive-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iCAAiC,GAGlC,MAAM,sCAAsC,CAAC;AAgC9C,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAA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CAAC;YAC5F,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;QACF,qCAAqC;QACrC,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * OneDrive file picker — the component the `microsoft-onedrive` provider contributes for\n * `FRONTEND_FILE_PICKER`.\n *\n * ## Why it declares BROWSER_READABLE_URL, where its Google sibling declares REMOTE_REFERENCE\n *\n * This is the pair that shows why issue #383 was answered PER VENDOR.\n *\n * OneDrive's picker, opened with the `download` action, returns each chosen file\n * carrying a pre-authenticated download URL — a short-lived link that needs no\n * credential to fetch. The browser genuinely can read the bytes, so the honest\n * declaration is `BROWSER_READABLE_URL` and the framework uploads the result the\n * way it uploads any other file.\n *\n * spec-cite: Microsoft Graph `driveItem` reference —\n * https://learn.microsoft.com/en-us/graph/api/resources/driveitem — for the\n * pre-authenticated `@microsoft.graph.downloadUrl` property. Paraphrased rather\n * than quoted; the reading that matters here is that the URL carries its own\n * authorization and expires, which is what makes the browser-readable arm\n * available at all.\n *\n * Drive's picker returns metadata only, so its bytes need a credential the\n * browser must not hold. Two real vendors, two different contracts, and a\n * framework that insisted on one would have had to drop one of them.\n *\n * ## Not proven in a browser\n *\n * Nothing here has been driven against a real OneDrive account. Unlike the Drive\n * picker this one authenticates through the vendor's own popup rather than\n * needing a token from the application, so it does not depend on #333 — but it\n * still needs a real `clientId` and a real user. Tracked with the rest of the\n * frontend provider surface in #359.\n */\n\nimport { useEffect, useRef } from 'react';\nimport {\n ProviderFrontendSelectionDelivery,\n type ProviderFilePickerProps,\n type ProviderFileSelection,\n} from '@wildo-ai/saas-models/public-runtime';\n\n/** The slice of a returned OneDrive item this component reads. */\ninterface OneDriveItem {\n readonly id?: unknown;\n readonly name?: unknown;\n readonly size?: unknown;\n readonly file?: { readonly mimeType?: unknown };\n readonly '@microsoft.graph.downloadUrl'?: unknown;\n}\n\ninterface OneDriveOpenOptions {\n clientId: string;\n action: string;\n multiSelect: boolean;\n advanced: { filter?: string; redirectUri?: string };\n success(response: { value?: readonly OneDriveItem[] }): void;\n cancel(): void;\n error(error: unknown): void;\n}\n\n/**\n * The `OneDrive` global the vendor's `<script>` installs.\n *\n * Typed locally for the same reason as the Drive picker's `gapi`: the surface\n * used is one function, and a `@types` package for a global that may not be\n * present buys nothing this file does not already state.\n */\ninterface OneDriveGlobals {\n readonly OneDrive?: { open(options: OneDriveOpenOptions): void };\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction readNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** Opens the OneDrive picker as soon as it mounts — see the Drive picker for why mounting IS opening. */\nexport function OneDrivePicker(props: ProviderFilePickerProps): null {\n const openedRef = useRef(false);\n\n useEffect(() => {\n if (openedRef.current) return;\n openedRef.current = true;\n\n let cancelled = false;\n const fail = (message: string): void => {\n if (!cancelled) props.onError(new Error(message));\n };\n\n const globals = window as unknown as OneDriveGlobals;\n if (globals.OneDrive === undefined) {\n fail(\n 'The OneDrive picker script has not loaded, so the picker cannot open. The `microsoft-onedrive` provider '\n + 'declares it in `scripts`; check that the surface injects provider scripts and that the composed '\n + 'Content-Security-Policy admits https://js.live.net.',\n );\n return;\n }\n\n const clientId = readString(props.publicConfig.clientId);\n if (clientId === undefined) {\n fail(\"The `microsoft-onedrive` provider's publicConfig declares no `clientId`, which the OneDrive picker requires.\");\n return;\n }\n\n globals.OneDrive.open({\n clientId,\n // `download` is what makes this picker's result browser-readable: it is the\n // action that returns a pre-authenticated URL rather than a bare item id.\n // Changing it to `share` or `query` would change what a selection CONTAINS,\n // and the provider's declared `selectionDelivery` would then be a lie the\n // framework refuses — see `receiveProviderFileSelections`.\n action: 'download',\n multiSelect: props.constraints.maxFiles !== undefined && props.constraints.maxFiles > 1,\n advanced: {\n // The vendor filters by extension, not by MIME type, so an allow-list of\n // MIME types cannot be translated faithfully. It is left to the field,\n // which validates every chosen file against `allowedMimeTypes` anyway —\n // a filter that silently narrowed to the wrong set would be worse than\n // no filter, because the user would never see the file they wanted.\n ...(props.publicConfig.pickerRedirectUri === undefined\n ? {}\n : { redirectUri: String(props.publicConfig.pickerRedirectUri) }),\n },\n success: (response) => {\n if (cancelled) return;\n\n const selections: ProviderFileSelection[] = [];\n for (const item of response.value ?? []) {\n const url = readString(item['@microsoft.graph.downloadUrl']);\n // No download URL means the picker did not run the `download` action —\n // a misconfiguration, and the one case where handing the selection up\n // anyway would break the declaration this provider makes.\n if (url === undefined) {\n fail(\n 'OneDrive returned a selected item with no download URL. The picker must be opened with the '\n + '`download` action for its result to be browser-readable, which is what this provider declares.',\n );\n return;\n }\n selections.push({\n kind: ProviderFrontendSelectionDelivery.BROWSER_READABLE_URL,\n url,\n displayName: readString(item.name),\n mimeType: readString(item.file?.mimeType),\n sizeBytes: readNumber(item.size),\n });\n }\n props.onSelect(selections);\n },\n cancel: () => {\n if (!cancelled) props.onCancel();\n },\n error: (error) => {\n fail(error instanceof Error ? error.message : `OneDrive picker failed: ${String(error)}`);\n },\n });\n\n return () => {\n cancelled = true;\n };\n // Mount-only — see the Drive picker.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return null;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"onedrive-picker.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/onedrive-picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EACL,iCAAiC,GAGlC,MAAM,sCAAsC,CAAC;AAgC9C,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,C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C,QAAQ,EAAE,CAAC;YACnC,CAAC;YACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;gBACf,IAAI,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,2BAA2B,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;SACF,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,IAAI,CAAC;QACnB,CAAC,CAAC;QACF,qCAAqC;QACrC,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["/**\n * OneDrive file picker — the component the `microsoft-onedrive` provider contributes for\n * `FRONTEND_FILE_PICKER`.\n *\n * ## Why it declares BROWSER_READABLE_URL, where its Google sibling declares REMOTE_REFERENCE\n *\n * This is the pair that shows why issue #383 was answered PER VENDOR.\n *\n * OneDrive's picker, opened with the `download` action, returns each chosen file\n * carrying a pre-authenticated download URL — a short-lived link that needs no\n * credential to fetch. The browser genuinely can read the bytes, so the honest\n * declaration is `BROWSER_READABLE_URL` and the framework uploads the result the\n * way it uploads any other file.\n *\n * spec-cite: Microsoft Graph `driveItem` reference —\n * https://learn.microsoft.com/en-us/graph/api/resources/driveitem — for the\n * pre-authenticated `@microsoft.graph.downloadUrl` property. Paraphrased rather\n * than quoted; the reading that matters here is that the URL carries its own\n * authorization and expires, which is what makes the browser-readable arm\n * available at all.\n *\n * Drive's picker returns metadata only, so its bytes need a credential the\n * browser must not hold. Two real vendors, two different contracts, and a\n * framework that insisted on one would have had to drop one of them.\n *\n * ## Not proven in a browser\n *\n * Nothing here has been driven against a real OneDrive account. Unlike the Drive\n * picker this one authenticates through the vendor's own popup rather than\n * needing a token from the application, so it does not depend on #333 — but it\n * still needs a real `clientId` and a real user.\n *\n * Tracked on #570, which is where OneDrive's whole state lives — and #570 is DEFERRED by decision:\n * this v7.2 picker stays as the OneDrive offering, the governed v8 path is not built, and the\n * capability is honest about being \"OneDrive files can be attached\" rather than \"stored in OneDrive\".\n * (The previous pointer here was #359, which is closed.)\n */\n\nimport { useEffect, useRef } from 'react';\nimport {\n ProviderFrontendSelectionDelivery,\n type ProviderFilePickerProps,\n type ProviderFileSelection,\n} from '@wildo-ai/saas-models/public-runtime';\n\n/** The slice of a returned OneDrive item this component reads. */\ninterface OneDriveItem {\n readonly id?: unknown;\n readonly name?: unknown;\n readonly size?: unknown;\n readonly file?: { readonly mimeType?: unknown };\n readonly '@microsoft.graph.downloadUrl'?: unknown;\n}\n\ninterface OneDriveOpenOptions {\n clientId: string;\n action: string;\n multiSelect: boolean;\n advanced: { filter?: string; redirectUri?: string };\n success(response: { value?: readonly OneDriveItem[] }): void;\n cancel(): void;\n error(error: unknown): void;\n}\n\n/**\n * The `OneDrive` global the vendor's `<script>` installs.\n *\n * Typed locally for the same reason as the Drive picker's `gapi`: the surface\n * used is one function, and a `@types` package for a global that may not be\n * present buys nothing this file does not already state.\n */\ninterface OneDriveGlobals {\n readonly OneDrive?: { open(options: OneDriveOpenOptions): void };\n}\n\nfunction readString(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction readNumber(value: unknown): number | undefined {\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined;\n}\n\n/** Opens the OneDrive picker as soon as it mounts — see the Drive picker for why mounting IS opening. */\nexport function OneDrivePicker(props: ProviderFilePickerProps): null {\n const openedRef = useRef(false);\n\n useEffect(() => {\n if (openedRef.current) return;\n openedRef.current = true;\n\n let cancelled = false;\n const fail = (message: string): void => {\n if (!cancelled) props.onError(new Error(message));\n };\n\n const globals = window as unknown as OneDriveGlobals;\n if (globals.OneDrive === undefined) {\n fail(\n 'The OneDrive picker script has not loaded, so the picker cannot open. The `microsoft-onedrive` provider '\n + 'declares it in `scripts`; check that the surface injects provider scripts and that the composed '\n + 'Content-Security-Policy admits https://js.live.net.',\n );\n return;\n }\n\n const clientId = readString(props.publicConfig.clientId);\n if (clientId === undefined) {\n fail(\"The `microsoft-onedrive` provider's publicConfig declares no `clientId`, which the OneDrive picker requires.\");\n return;\n }\n\n globals.OneDrive.open({\n clientId,\n // `download` is what makes this picker's result browser-readable: it is the\n // action that returns a pre-authenticated URL rather than a bare item id.\n // Changing it to `share` or `query` would change what a selection CONTAINS,\n // and the provider's declared `selectionDelivery` would then be a lie the\n // framework refuses — see `receiveProviderFileSelections`.\n action: 'download',\n multiSelect: props.constraints.maxFiles !== undefined && props.constraints.maxFiles > 1,\n advanced: {\n // The vendor filters by extension, not by MIME type, so an allow-list of\n // MIME types cannot be translated faithfully. It is left to the field,\n // which validates every chosen file against `allowedMimeTypes` anyway —\n // a filter that silently narrowed to the wrong set would be worse than\n // no filter, because the user would never see the file they wanted.\n ...(props.publicConfig.pickerRedirectUri === undefined\n ? {}\n : { redirectUri: String(props.publicConfig.pickerRedirectUri) }),\n },\n success: (response) => {\n if (cancelled) return;\n\n const selections: ProviderFileSelection[] = [];\n for (const item of response.value ?? []) {\n const url = readString(item['@microsoft.graph.downloadUrl']);\n // No download URL means the picker did not run the `download` action —\n // a misconfiguration, and the one case where handing the selection up\n // anyway would break the declaration this provider makes.\n if (url === undefined) {\n fail(\n 'OneDrive returned a selected item with no download URL. The picker must be opened with the '\n + '`download` action for its result to be browser-readable, which is what this provider declares.',\n );\n return;\n }\n selections.push({\n kind: ProviderFrontendSelectionDelivery.BROWSER_READABLE_URL,\n url,\n displayName: readString(item.name),\n mimeType: readString(item.file?.mimeType),\n sizeBytes: readNumber(item.size),\n });\n }\n props.onSelect(selections);\n },\n cancel: () => {\n if (!cancelled) props.onCancel();\n },\n error: (error) => {\n fail(error instanceof Error ? error.message : `OneDrive picker failed: ${String(error)}`);\n },\n });\n\n return () => {\n cancelled = true;\n };\n // Mount-only — see the Drive picker.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return null;\n}\n"]}
|
|
@@ -12,5 +12,11 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import * as React from "react";
|
|
14
14
|
import type { ProviderFilePickerProps } from "@wildo-ai/saas-models/public-runtime";
|
|
15
|
+
/**
|
|
16
|
+
* A chunk that fails to download throws during render, and Suspense does not catch it. The door
|
|
17
|
+
* catches it and reports it through the picker contract's own `onError` — the channel the host
|
|
18
|
+
* already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,
|
|
19
|
+
* not a crashed form.
|
|
20
|
+
*/
|
|
15
21
|
export declare function OneDrivePickerLazy(props: ProviderFilePickerProps): React.JSX.Element;
|
|
16
22
|
//# sourceMappingURL=onedrive-picker.lazy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onedrive-picker.lazy.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"onedrive-picker.lazy.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/onedrive-picker.lazy.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAKnF;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAQpF"}
|
|
@@ -13,8 +13,15 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
* vendor overlay), so reserving layout would draw a box where there will never be one.
|
|
14
14
|
*/
|
|
15
15
|
import * as React from "react";
|
|
16
|
+
import { LazyDoorErrorBoundary } from "@wildo-ai/saas-frontend-lib";
|
|
16
17
|
const LazyOneDrivePicker = React.lazy(async () => ({ default: (await import("./onedrive-picker.js")).OneDrivePicker }));
|
|
18
|
+
/**
|
|
19
|
+
* A chunk that fails to download throws during render, and Suspense does not catch it. The door
|
|
20
|
+
* catches it and reports it through the picker contract's own `onError` — the channel the host
|
|
21
|
+
* already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,
|
|
22
|
+
* not a crashed form.
|
|
23
|
+
*/
|
|
17
24
|
export function OneDrivePickerLazy(props) {
|
|
18
|
-
return (_jsx(React.Suspense, { fallback: null, children: _jsx(LazyOneDrivePicker, { ...props }) }));
|
|
25
|
+
return (_jsx(LazyDoorErrorBoundary, { doorName: "OneDrivePickerLazy", fallback: null, onError: props.onError, children: _jsx(React.Suspense, { fallback: null, children: _jsx(LazyOneDrivePicker, { ...props }) }) }));
|
|
19
26
|
}
|
|
20
27
|
//# sourceMappingURL=onedrive-picker.lazy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onedrive-picker.lazy.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"onedrive-picker.lazy.js","sourceRoot":"","sources":["../../../../../../../../src/components/form/controls/file/providers/onedrive-picker.lazy.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAA;AAEpH;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA8B;IAC/D,OAAO,CACL,KAAC,qBAAqB,IAAC,QAAQ,EAAC,oBAAoB,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,YACzF,KAAC,KAAK,CAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YAC5B,KAAC,kBAAkB,OAAK,KAAK,GAAI,GAClB,GACK,CACzB,CAAA;AACH,CAAC","sourcesContent":["\"use client\"\n\n/**\n * OneDrivePickerLazy — the ONLY public door onto the OneDrivePicker module.\n *\n * Lazy-boundary wrapper (`*.lazy.tsx` convention, PdfViewerLazy precedent): owns the\n * `React.lazy(() => import(...))` split point so the picker's code never lands in the\n * application's entry chunk, and `pnpm check:lazy-boundaries` refuses any static import of\n * the wrapped module from anywhere else. A provider picker is opened by a user who asked\n * for one; every other visitor pays nothing for it.\n *\n * No Suspense fallback with a shape: a picker renders NOTHING of its own (it opens a\n * vendor overlay), so reserving layout would draw a box where there will never be one.\n */\n\nimport * as React from \"react\"\nimport type { ProviderFilePickerProps } from \"@wildo-ai/saas-models/public-runtime\"\nimport { LazyDoorErrorBoundary } from \"@wildo-ai/saas-frontend-lib\"\n\nconst LazyOneDrivePicker = React.lazy(async () => ({ default: (await import(\"./onedrive-picker\")).OneDrivePicker }))\n\n/**\n * A chunk that fails to download throws during render, and Suspense does not catch it. The door\n * catches it and reports it through the picker contract's own `onError` — the channel the host\n * already turns into `onProviderFailure` — so a picker that could not arrive is a reported failure,\n * not a crashed form.\n */\nexport function OneDrivePickerLazy(props: ProviderFilePickerProps): React.JSX.Element {\n return (\n <LazyDoorErrorBoundary doorName=\"OneDrivePickerLazy\" fallback={null} onError={props.onError}>\n <React.Suspense fallback={null}>\n <LazyOneDrivePicker {...props} />\n </React.Suspense>\n </LazyDoorErrorBoundary>\n )\n}\n"]}
|