@50arms/ui 0.0.0-stage → 35.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +193 -2
- package/dist/components/Accordion.js +68 -0
- package/dist/components/Accordion.js.map +1 -0
- package/dist/components/AgentWorkingSpinner.js +46 -0
- package/dist/components/AgentWorkingSpinner.js.map +1 -0
- package/dist/components/AppShell.js +228 -0
- package/dist/components/AppShell.js.map +1 -0
- package/dist/components/Attention.js +130 -0
- package/dist/components/Attention.js.map +1 -0
- package/dist/components/Avatar.js +99 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Badge.js +143 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Board.js +292 -0
- package/dist/components/Board.js.map +1 -0
- package/dist/components/Button.js +327 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Callout.js +106 -0
- package/dist/components/Callout.js.map +1 -0
- package/dist/components/Card.js +140 -0
- package/dist/components/Card.js.map +1 -0
- package/dist/components/Choice.js +361 -0
- package/dist/components/Choice.js.map +1 -0
- package/dist/components/CodeEditor.js +384 -0
- package/dist/components/CodeEditor.js.map +1 -0
- package/dist/components/ColorPicker.js +174 -0
- package/dist/components/ColorPicker.js.map +1 -0
- package/dist/components/Combobox.js +212 -0
- package/dist/components/Combobox.js.map +1 -0
- package/dist/components/CommandPalette.js +163 -0
- package/dist/components/CommandPalette.js.map +1 -0
- package/dist/components/ConcentricRing.js +60 -0
- package/dist/components/ConcentricRing.js.map +1 -0
- package/dist/components/ConnectionCard.js +98 -0
- package/dist/components/ConnectionCard.js.map +1 -0
- package/dist/components/ContextItemRow.js +49 -0
- package/dist/components/ContextItemRow.js.map +1 -0
- package/dist/components/CopyValue.js +57 -0
- package/dist/components/CopyValue.js.map +1 -0
- package/dist/components/CountBadge.js +26 -0
- package/dist/components/CountBadge.js.map +1 -0
- package/dist/components/DateCalendar.js +156 -0
- package/dist/components/DateCalendar.js.map +1 -0
- package/dist/components/DateField.js +166 -0
- package/dist/components/DateField.js.map +1 -0
- package/dist/components/DatePicker.js +56 -0
- package/dist/components/DatePicker.js.map +1 -0
- package/dist/components/DateTimeText.js +19 -0
- package/dist/components/DateTimeText.js.map +1 -0
- package/dist/components/DescriptionList.js +25 -0
- package/dist/components/DescriptionList.js.map +1 -0
- package/dist/components/Dialog.js +332 -0
- package/dist/components/Dialog.js.map +1 -0
- package/dist/components/DragDrop.js +395 -0
- package/dist/components/DragDrop.js.map +1 -0
- package/dist/components/Drawer.js +100 -0
- package/dist/components/Drawer.js.map +1 -0
- package/dist/components/EditGutter.js +110 -0
- package/dist/components/EditGutter.js.map +1 -0
- package/dist/components/EmojiPicker.js +174 -0
- package/dist/components/EmojiPicker.js.map +1 -0
- package/dist/components/ErrorBoundary.js +47 -0
- package/dist/components/ErrorBoundary.js.map +1 -0
- package/dist/components/Field.js +115 -0
- package/dist/components/Field.js.map +1 -0
- package/dist/components/FileUpload.js +128 -0
- package/dist/components/FileUpload.js.map +1 -0
- package/dist/components/FilterMenu.js +256 -0
- package/dist/components/FilterMenu.js.map +1 -0
- package/dist/components/GatesSection.js +79 -0
- package/dist/components/GatesSection.js.map +1 -0
- package/dist/components/Icon.js +50 -0
- package/dist/components/Icon.js.map +1 -0
- package/dist/components/IconButton.js +59 -0
- package/dist/components/IconButton.js.map +1 -0
- package/dist/components/IconStack.js +69 -0
- package/dist/components/IconStack.js.map +1 -0
- package/dist/components/ImageUploadField.js +146 -0
- package/dist/components/ImageUploadField.js.map +1 -0
- package/dist/components/InlineEdit.js +432 -0
- package/dist/components/InlineEdit.js.map +1 -0
- package/dist/components/InlineMarkdownEdit.js +184 -0
- package/dist/components/InlineMarkdownEdit.js.map +1 -0
- package/dist/components/Input.js +156 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/LegalDocument.js +155 -0
- package/dist/components/LegalDocument.js.map +1 -0
- package/dist/components/LineDiff.js +95 -0
- package/dist/components/LineDiff.js.map +1 -0
- package/dist/components/ListHeader.js +72 -0
- package/dist/components/ListHeader.js.map +1 -0
- package/dist/components/Loading.js +111 -0
- package/dist/components/Loading.js.map +1 -0
- package/dist/components/Markdown.js +28 -0
- package/dist/components/Markdown.js.map +1 -0
- package/dist/components/MarkdownEditor.js +467 -0
- package/dist/components/MarkdownEditor.js.map +1 -0
- package/dist/components/Menu.js +185 -0
- package/dist/components/Menu.js.map +1 -0
- package/dist/components/Navigation.js +87 -0
- package/dist/components/Navigation.js.map +1 -0
- package/dist/components/NumberInput.js +119 -0
- package/dist/components/NumberInput.js.map +1 -0
- package/dist/components/OTPInput.js +71 -0
- package/dist/components/OTPInput.js.map +1 -0
- package/dist/components/OrderedEntityManager.js +170 -0
- package/dist/components/OrderedEntityManager.js.map +1 -0
- package/dist/components/PagedWindowList.js +74 -0
- package/dist/components/PagedWindowList.js.map +1 -0
- package/dist/components/PaginationBar.js +95 -0
- package/dist/components/PaginationBar.js.map +1 -0
- package/dist/components/Panel.js +396 -0
- package/dist/components/Panel.js.map +1 -0
- package/dist/components/PasswordInput.js +32 -0
- package/dist/components/PasswordInput.js.map +1 -0
- package/dist/components/PasswordRequirements.js +25 -0
- package/dist/components/PasswordRequirements.js.map +1 -0
- package/dist/components/PatchDiff.js +96 -0
- package/dist/components/PatchDiff.js.map +1 -0
- package/dist/components/PendingVeil.js +18 -0
- package/dist/components/PendingVeil.js.map +1 -0
- package/dist/components/Popover.js +214 -0
- package/dist/components/Popover.js.map +1 -0
- package/dist/components/Progress.js +419 -0
- package/dist/components/Progress.js.map +1 -0
- package/dist/components/RatingScale.js +89 -0
- package/dist/components/RatingScale.js.map +1 -0
- package/dist/components/ReadMore.js +232 -0
- package/dist/components/ReadMore.js.map +1 -0
- package/dist/components/RecordCard.js +202 -0
- package/dist/components/RecordCard.js.map +1 -0
- package/dist/components/RelativeTime.js +29 -0
- package/dist/components/RelativeTime.js.map +1 -0
- package/dist/components/SandboxedFrame.js +135 -0
- package/dist/components/SandboxedFrame.js.map +1 -0
- package/dist/components/SearchInput.js +38 -0
- package/dist/components/SearchInput.js.map +1 -0
- package/dist/components/SecretField.js +228 -0
- package/dist/components/SecretField.js.map +1 -0
- package/dist/components/SectionNav.js +42 -0
- package/dist/components/SectionNav.js.map +1 -0
- package/dist/components/Select.js +172 -0
- package/dist/components/Select.js.map +1 -0
- package/dist/components/SequenceDiagram.js +109 -0
- package/dist/components/SequenceDiagram.js.map +1 -0
- package/dist/components/SettingRow.js +124 -0
- package/dist/components/SettingRow.js.map +1 -0
- package/dist/components/SignOffRings.js +36 -0
- package/dist/components/SignOffRings.js.map +1 -0
- package/dist/components/Slider.js +353 -0
- package/dist/components/Slider.js.map +1 -0
- package/dist/components/SolutionChoice.js +89 -0
- package/dist/components/SolutionChoice.js.map +1 -0
- package/dist/components/SortMenu.js +75 -0
- package/dist/components/SortMenu.js.map +1 -0
- package/dist/components/Spinner.js +42 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/Stat.js +148 -0
- package/dist/components/Stat.js.map +1 -0
- package/dist/components/StatusSelect.js +119 -0
- package/dist/components/StatusSelect.js.map +1 -0
- package/dist/components/Surface.js +210 -0
- package/dist/components/Surface.js.map +1 -0
- package/dist/components/Table.js +300 -0
- package/dist/components/Table.js.map +1 -0
- package/dist/components/Tabs.js +288 -0
- package/dist/components/Tabs.js.map +1 -0
- package/dist/components/ThemeMenu.js +198 -0
- package/dist/components/ThemeMenu.js.map +1 -0
- package/dist/components/Toast.js +217 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/components/Toggle.js +147 -0
- package/dist/components/Toggle.js.map +1 -0
- package/dist/components/ToggleMatrix.js +157 -0
- package/dist/components/ToggleMatrix.js.map +1 -0
- package/dist/components/Tree.js +125 -0
- package/dist/components/Tree.js.map +1 -0
- package/dist/components/TriStateSwitch.js +111 -0
- package/dist/components/TriStateSwitch.js.map +1 -0
- package/dist/components/VideoPlayer.js +64 -0
- package/dist/components/VideoPlayer.js.map +1 -0
- package/dist/components/auth/AcceptInvitationCard.js +110 -0
- package/dist/components/auth/AcceptInvitationCard.js.map +1 -0
- package/dist/components/auth/AuthLayout.js +18 -0
- package/dist/components/auth/AuthLayout.js.map +1 -0
- package/dist/components/auth/ForgotPasswordForm.js +44 -0
- package/dist/components/auth/ForgotPasswordForm.js.map +1 -0
- package/dist/components/auth/LoginForm.js +76 -0
- package/dist/components/auth/LoginForm.js.map +1 -0
- package/dist/components/auth/ResetPasswordForm.js +69 -0
- package/dist/components/auth/ResetPasswordForm.js.map +1 -0
- package/dist/components/auth/SignInProviders.js +45 -0
- package/dist/components/auth/SignInProviders.js.map +1 -0
- package/dist/components/auth/SignupCard.js +204 -0
- package/dist/components/auth/SignupCard.js.map +1 -0
- package/dist/components/auth/TermsAcceptance.js +43 -0
- package/dist/components/auth/TermsAcceptance.js.map +1 -0
- package/dist/components/board/context.js +32 -0
- package/dist/components/board/context.js.map +1 -0
- package/dist/components/board/recipe.js +94 -0
- package/dist/components/board/recipe.js.map +1 -0
- package/dist/components/calendar/CalendarMonth.js +299 -0
- package/dist/components/calendar/CalendarMonth.js.map +1 -0
- package/dist/components/calendar/CalendarTimeGrid.js +430 -0
- package/dist/components/calendar/CalendarTimeGrid.js.map +1 -0
- package/dist/components/calendar/EventActions.js +101 -0
- package/dist/components/calendar/EventActions.js.map +1 -0
- package/dist/components/calendar/format.js +73 -0
- package/dist/components/calendar/format.js.map +1 -0
- package/dist/components/calendar/palette.js +31 -0
- package/dist/components/calendar/palette.js.map +1 -0
- package/dist/components/calendar/use-calendar-drag.js +149 -0
- package/dist/components/calendar/use-calendar-drag.js.map +1 -0
- package/dist/components/calendar/use-event-keyboard.js +87 -0
- package/dist/components/calendar/use-event-keyboard.js.map +1 -0
- package/dist/components/calendar/use-grid-navigation.js +79 -0
- package/dist/components/calendar/use-grid-navigation.js.map +1 -0
- package/dist/components/calendar/use-now.js +27 -0
- package/dist/components/calendar/use-now.js.map +1 -0
- package/dist/components/card-face/AcRingGlyph.js +39 -0
- package/dist/components/card-face/AcRingGlyph.js.map +1 -0
- package/dist/components/card-face/BoardCardAgentSlot.js +17 -0
- package/dist/components/card-face/BoardCardAgentSlot.js.map +1 -0
- package/dist/components/card-face/CardFace.js +109 -0
- package/dist/components/card-face/CardFace.js.map +1 -0
- package/dist/components/card-face/CardTypeBadge.js +17 -0
- package/dist/components/card-face/CardTypeBadge.js.map +1 -0
- package/dist/components/card-face/EffortBadge.js +11 -0
- package/dist/components/card-face/EffortBadge.js.map +1 -0
- package/dist/components/card-face/GateRingGlyph.js +31 -0
- package/dist/components/card-face/GateRingGlyph.js.map +1 -0
- package/dist/components/card-face/OverflowRow.js +70 -0
- package/dist/components/card-face/OverflowRow.js.map +1 -0
- package/dist/components/card-face/TapTip.js +32 -0
- package/dist/components/card-face/TapTip.js.map +1 -0
- package/dist/components/card-face/hit-area.js +6 -0
- package/dist/components/card-face/hit-area.js.map +1 -0
- package/dist/components/card-face/vocabulary.js +102 -0
- package/dist/components/card-face/vocabulary.js.map +1 -0
- package/dist/components/chart/BarList.js +78 -0
- package/dist/components/chart/BarList.js.map +1 -0
- package/dist/components/chart/LineChart.js +310 -0
- package/dist/components/chart/LineChart.js.map +1 -0
- package/dist/components/chart/ShareBar.js +141 -0
- package/dist/components/chart/ShareBar.js.map +1 -0
- package/dist/components/chart/TimeSeriesChart.js +305 -0
- package/dist/components/chart/TimeSeriesChart.js.map +1 -0
- package/dist/components/chart/label-metrics.js +17 -0
- package/dist/components/chart/label-metrics.js.map +1 -0
- package/dist/components/chart/line-chart-axis.js +38 -0
- package/dist/components/chart/line-chart-axis.js.map +1 -0
- package/dist/components/chart/line-chart-scale.js +132 -0
- package/dist/components/chart/line-chart-scale.js.map +1 -0
- package/dist/components/chart/line-series-style.js +22 -0
- package/dist/components/chart/line-series-style.js.map +1 -0
- package/dist/components/chart/share-bar-labels.js +14 -0
- package/dist/components/chart/share-bar-labels.js.map +1 -0
- package/dist/components/chart/shared.js +157 -0
- package/dist/components/chart/shared.js.map +1 -0
- package/dist/components/chart/time-series-scale.js +51 -0
- package/dist/components/chart/time-series-scale.js.map +1 -0
- package/dist/components/chat/Attachment.js +316 -0
- package/dist/components/chat/Attachment.js.map +1 -0
- package/dist/components/chat/Chat.js +171 -0
- package/dist/components/chat/Chat.js.map +1 -0
- package/dist/components/chat/Composer.js +274 -0
- package/dist/components/chat/Composer.js.map +1 -0
- package/dist/components/chat/ContextMeter.js +202 -0
- package/dist/components/chat/ContextMeter.js.map +1 -0
- package/dist/components/chat/EffortControl.js +116 -0
- package/dist/components/chat/EffortControl.js.map +1 -0
- package/dist/components/chat/FileCover.js +78 -0
- package/dist/components/chat/FileCover.js.map +1 -0
- package/dist/components/chat/Message.js +356 -0
- package/dist/components/chat/Message.js.map +1 -0
- package/dist/components/chat/MessageScroller.js +104 -0
- package/dist/components/chat/MessageScroller.js.map +1 -0
- package/dist/components/chat/ModelSelector.js +156 -0
- package/dist/components/chat/ModelSelector.js.map +1 -0
- package/dist/components/chat/StreamingMarkdown.js +42 -0
- package/dist/components/chat/StreamingMarkdown.js.map +1 -0
- package/dist/components/chat/download-file.js +9 -0
- package/dist/components/chat/download-file.js.map +1 -0
- package/dist/components/chat/file-icon.js +39 -0
- package/dist/components/chat/file-icon.js.map +1 -0
- package/dist/components/checklist/StatusChecklist.js +103 -0
- package/dist/components/checklist/StatusChecklist.js.map +1 -0
- package/dist/components/checklist/tally.js +29 -0
- package/dist/components/checklist/tally.js.map +1 -0
- package/dist/components/code-editor/context.js +13 -0
- package/dist/components/code-editor/context.js.map +1 -0
- package/dist/components/code-editor/editing.js +93 -0
- package/dist/components/code-editor/editing.js.map +1 -0
- package/dist/components/code-editor/highlight.js +27 -0
- package/dist/components/code-editor/highlight.js.map +1 -0
- package/dist/components/code-editor/recipe.js +75 -0
- package/dist/components/code-editor/recipe.js.map +1 -0
- package/dist/components/date-timeline/DateTimeline.js +358 -0
- package/dist/components/date-timeline/DateTimeline.js.map +1 -0
- package/dist/components/date-timeline/TimelineRow.js +100 -0
- package/dist/components/date-timeline/TimelineRow.js.map +1 -0
- package/dist/components/date-timeline/useBarDrag.js +44 -0
- package/dist/components/date-timeline/useBarDrag.js.map +1 -0
- package/dist/components/date-timeline/useMarkerDrag.js +40 -0
- package/dist/components/date-timeline/useMarkerDrag.js.map +1 -0
- package/dist/components/date-timeline/useTimelineZoom.js +44 -0
- package/dist/components/date-timeline/useTimelineZoom.js.map +1 -0
- package/dist/components/drag-drop/context.js +37 -0
- package/dist/components/drag-drop/context.js.map +1 -0
- package/dist/components/drag-drop/recipe.js +270 -0
- package/dist/components/drag-drop/recipe.js.map +1 -0
- package/dist/components/drag-drop/shift.js +157 -0
- package/dist/components/drag-drop/shift.js.map +1 -0
- package/dist/components/edit/activation.js +10 -0
- package/dist/components/edit/activation.js.map +1 -0
- package/dist/components/edit/outcome.js +47 -0
- package/dist/components/edit/outcome.js.map +1 -0
- package/dist/components/edit/use-edit-session.js +146 -0
- package/dist/components/edit/use-edit-session.js.map +1 -0
- package/dist/components/file-viewer/FileViewer.js +97 -0
- package/dist/components/file-viewer/FileViewer.js.map +1 -0
- package/dist/components/file-viewer/PageNumberJumpField.js +47 -0
- package/dist/components/file-viewer/PageNumberJumpField.js.map +1 -0
- package/dist/components/file-viewer/ViewerControls.js +122 -0
- package/dist/components/file-viewer/ViewerControls.js.map +1 -0
- package/dist/components/file-viewer/ViewerRail.js +57 -0
- package/dist/components/file-viewer/ViewerRail.js.map +1 -0
- package/dist/components/file-viewer/ViewerStage.js +112 -0
- package/dist/components/file-viewer/ViewerStage.js.map +1 -0
- package/dist/components/file-viewer/frames.js +37 -0
- package/dist/components/file-viewer/frames.js.map +1 -0
- package/dist/components/file-viewer/use-frame-cursor.js +32 -0
- package/dist/components/file-viewer/use-frame-cursor.js.map +1 -0
- package/dist/components/file-viewer/use-viewer-keys.js +50 -0
- package/dist/components/file-viewer/use-viewer-keys.js.map +1 -0
- package/dist/components/file-viewer/use-viewer-zoom.js +68 -0
- package/dist/components/file-viewer/use-viewer-zoom.js.map +1 -0
- package/dist/components/focus-web/FocusWeb.js +322 -0
- package/dist/components/focus-web/FocusWeb.js.map +1 -0
- package/dist/components/focus-web/layout.js +34 -0
- package/dist/components/focus-web/layout.js.map +1 -0
- package/dist/components/graph-explorer/GraphExplorer.js +441 -0
- package/dist/components/graph-explorer/GraphExplorer.js.map +1 -0
- package/dist/components/graph-explorer/camera-math.js +102 -0
- package/dist/components/graph-explorer/camera-math.js.map +1 -0
- package/dist/components/graph-explorer/tree-layout.js +103 -0
- package/dist/components/graph-explorer/tree-layout.js.map +1 -0
- package/dist/components/graph-explorer/use-camera.js +82 -0
- package/dist/components/graph-explorer/use-camera.js.map +1 -0
- package/dist/components/graph-explorer/viewport-gesture.js +107 -0
- package/dist/components/graph-explorer/viewport-gesture.js.map +1 -0
- package/dist/components/kanban/KanbanBoard.js +219 -0
- package/dist/components/kanban/KanbanBoard.js.map +1 -0
- package/dist/components/kanban/recipe.js +144 -0
- package/dist/components/kanban/recipe.js.map +1 -0
- package/dist/components/markdown/Affordances.js +398 -0
- package/dist/components/markdown/Affordances.js.map +1 -0
- package/dist/components/markdown/AttachmentStrip.js +128 -0
- package/dist/components/markdown/AttachmentStrip.js.map +1 -0
- package/dist/components/markdown/ImageUpload.js +45 -0
- package/dist/components/markdown/ImageUpload.js.map +1 -0
- package/dist/components/media-error.js +7 -0
- package/dist/components/media-error.js.map +1 -0
- package/dist/components/nav-sections.js +61 -0
- package/dist/components/nav-sections.js.map +1 -0
- package/dist/components/node-canvas/NodeCanvas.js +384 -0
- package/dist/components/node-canvas/NodeCanvas.js.map +1 -0
- package/dist/components/node-canvas/layout.js +237 -0
- package/dist/components/node-canvas/layout.js.map +1 -0
- package/dist/components/node-canvas/use-canvas-gestures.js +143 -0
- package/dist/components/node-canvas/use-canvas-gestures.js.map +1 -0
- package/dist/components/openapi/OpenApiViewer.js +137 -0
- package/dist/components/openapi/OpenApiViewer.js.map +1 -0
- package/dist/components/openapi/OperationCard.js +145 -0
- package/dist/components/openapi/OperationCard.js.map +1 -0
- package/dist/components/openapi/SchemaView.js +68 -0
- package/dist/components/openapi/SchemaView.js.map +1 -0
- package/dist/components/openapi/resolve.js +102 -0
- package/dist/components/openapi/resolve.js.map +1 -0
- package/dist/components/openapi/types.js +5 -0
- package/dist/components/openapi/types.js.map +1 -0
- package/dist/components/overlay-shell.js +29 -0
- package/dist/components/overlay-shell.js.map +1 -0
- package/dist/components/overlay-stack.js +27 -0
- package/dist/components/overlay-stack.js.map +1 -0
- package/dist/components/paged-window/PageBlock.js +50 -0
- package/dist/components/paged-window/PageBlock.js.map +1 -0
- package/dist/components/provenance/ConfidenceBar.js +60 -0
- package/dist/components/provenance/ConfidenceBar.js.map +1 -0
- package/dist/components/provenance/ConfidenceMeter.js +36 -0
- package/dist/components/provenance/ConfidenceMeter.js.map +1 -0
- package/dist/components/provenance/ConfidenceReadout.js +31 -0
- package/dist/components/provenance/ConfidenceReadout.js.map +1 -0
- package/dist/components/provenance/ProvenanceBadge.js +44 -0
- package/dist/components/provenance/ProvenanceBadge.js.map +1 -0
- package/dist/components/provenance/ProvenanceDetail.js +114 -0
- package/dist/components/provenance/ProvenanceDetail.js.map +1 -0
- package/dist/components/provenance/ProvenanceDisclosure.js +111 -0
- package/dist/components/provenance/ProvenanceDisclosure.js.map +1 -0
- package/dist/components/provenance/absence.js +31 -0
- package/dist/components/provenance/absence.js.map +1 -0
- package/dist/components/provenance/types.js +30 -0
- package/dist/components/provenance/types.js.map +1 -0
- package/dist/components/rbac/AccessRequestPanel.js +153 -0
- package/dist/components/rbac/AccessRequestPanel.js.map +1 -0
- package/dist/components/rbac/AccountMenu.js +118 -0
- package/dist/components/rbac/AccountMenu.js.map +1 -0
- package/dist/components/rbac/AgentKeysList.js +20 -0
- package/dist/components/rbac/AgentKeysList.js.map +1 -0
- package/dist/components/rbac/ApiKeysPanel.js +172 -0
- package/dist/components/rbac/ApiKeysPanel.js.map +1 -0
- package/dist/components/rbac/ApiKeysTable.js +169 -0
- package/dist/components/rbac/ApiKeysTable.js.map +1 -0
- package/dist/components/rbac/Brand.js +13 -0
- package/dist/components/rbac/Brand.js.map +1 -0
- package/dist/components/rbac/Can.js +18 -0
- package/dist/components/rbac/Can.js.map +1 -0
- package/dist/components/rbac/ChangePasswordForm.js +73 -0
- package/dist/components/rbac/ChangePasswordForm.js.map +1 -0
- package/dist/components/rbac/DangerZone.js +27 -0
- package/dist/components/rbac/DangerZone.js.map +1 -0
- package/dist/components/rbac/DevToolsPopover.js +140 -0
- package/dist/components/rbac/DevToolsPopover.js.map +1 -0
- package/dist/components/rbac/EndedLine.js +24 -0
- package/dist/components/rbac/EndedLine.js.map +1 -0
- package/dist/components/rbac/InvitationsList.js +148 -0
- package/dist/components/rbac/InvitationsList.js.map +1 -0
- package/dist/components/rbac/InviteMembersDialog.js +97 -0
- package/dist/components/rbac/InviteMembersDialog.js.map +1 -0
- package/dist/components/rbac/MembersPanel.js +138 -0
- package/dist/components/rbac/MembersPanel.js.map +1 -0
- package/dist/components/rbac/PermissionRequestPanel.js +141 -0
- package/dist/components/rbac/PermissionRequestPanel.js.map +1 -0
- package/dist/components/rbac/ProfileForm.js +86 -0
- package/dist/components/rbac/ProfileForm.js.map +1 -0
- package/dist/components/rbac/ProfilePage.js +58 -0
- package/dist/components/rbac/ProfilePage.js.map +1 -0
- package/dist/components/rbac/RBACProvider.js +82 -0
- package/dist/components/rbac/RBACProvider.js.map +1 -0
- package/dist/components/rbac/RoleEditorDialog.js +90 -0
- package/dist/components/rbac/RoleEditorDialog.js.map +1 -0
- package/dist/components/rbac/RoleKeyPicker.js +77 -0
- package/dist/components/rbac/RoleKeyPicker.js.map +1 -0
- package/dist/components/rbac/RolePermissionMatrix.js +37 -0
- package/dist/components/rbac/RolePermissionMatrix.js.map +1 -0
- package/dist/components/rbac/RolesPermissionsPage.js +142 -0
- package/dist/components/rbac/RolesPermissionsPage.js.map +1 -0
- package/dist/components/rbac/SessionsList.js +146 -0
- package/dist/components/rbac/SessionsList.js.map +1 -0
- package/dist/components/rbac/TeamSettingsForm.js +69 -0
- package/dist/components/rbac/TeamSettingsForm.js.map +1 -0
- package/dist/components/rbac/TeamSwitcher.js +66 -0
- package/dist/components/rbac/TeamSwitcher.js.map +1 -0
- package/dist/components/rbac/approvalPanelParts.js +130 -0
- package/dist/components/rbac/approvalPanelParts.js.map +1 -0
- package/dist/components/rbac/permissionSections.js +8 -0
- package/dist/components/rbac/permissionSections.js.map +1 -0
- package/dist/components/rbac/stagedForm.js +42 -0
- package/dist/components/rbac/stagedForm.js.map +1 -0
- package/dist/components/rbac/useStagedImage.js +21 -0
- package/dist/components/rbac/useStagedImage.js.map +1 -0
- package/dist/components/roadmap/PhaseManager.js +48 -0
- package/dist/components/roadmap/PhaseManager.js.map +1 -0
- package/dist/components/roadmap/RoadmapItemCard.js +96 -0
- package/dist/components/roadmap/RoadmapItemCard.js.map +1 -0
- package/dist/components/roadmap/RoadmapPage.js +34 -0
- package/dist/components/roadmap/RoadmapPage.js.map +1 -0
- package/dist/components/roadmap/RoadmapSwimlaneBoard.js +91 -0
- package/dist/components/roadmap/RoadmapSwimlaneBoard.js.map +1 -0
- package/dist/components/roadmap/TrackManager.js +58 -0
- package/dist/components/roadmap/TrackManager.js.map +1 -0
- package/dist/components/roadmap/UseCaseCard.js +93 -0
- package/dist/components/roadmap/UseCaseCard.js.map +1 -0
- package/dist/components/roadmap/UseCaseLedgerPage.js +98 -0
- package/dist/components/roadmap/UseCaseLedgerPage.js.map +1 -0
- package/dist/components/roadmap/chip-tones.js +9 -0
- package/dist/components/roadmap/chip-tones.js.map +1 -0
- package/dist/components/roadmap/derive.js +28 -0
- package/dist/components/roadmap/derive.js.map +1 -0
- package/dist/components/stepper/Stepper.js +276 -0
- package/dist/components/stepper/Stepper.js.map +1 -0
- package/dist/components/stepper/derive.js +53 -0
- package/dist/components/stepper/derive.js.map +1 -0
- package/dist/confidence.css +222 -0
- package/dist/fonts/bricolage-grotesque-0.woff2 +0 -0
- package/dist/fonts/bricolage-grotesque-1.woff2 +0 -0
- package/dist/fonts/bricolage-grotesque-2.woff2 +0 -0
- package/dist/fonts/figtree-0.woff2 +0 -0
- package/dist/fonts/figtree-1.woff2 +0 -0
- package/dist/fonts/figtree-2.woff2 +0 -0
- package/dist/fonts/figtree-3.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-0.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-1.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-10.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-11.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-2.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-3.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-4.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-5.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-6.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-7.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-8.woff2 +0 -0
- package/dist/fonts/jetbrains-mono-9.woff2 +0 -0
- package/dist/fonts.css +187 -0
- package/dist/icons/data.js +233 -0
- package/dist/icons/data.js.map +1 -0
- package/dist/index.js +942 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/attention.js +75 -0
- package/dist/lib/attention.js.map +1 -0
- package/dist/lib/board/anchor.js +14 -0
- package/dist/lib/board/anchor.js.map +1 -0
- package/dist/lib/board/model.js +41 -0
- package/dist/lib/board/model.js.map +1 -0
- package/dist/lib/board/move.js +161 -0
- package/dist/lib/board/move.js.map +1 -0
- package/dist/lib/board/position.js +11 -0
- package/dist/lib/board/position.js.map +1 -0
- package/dist/lib/board/rejection.js +22 -0
- package/dist/lib/board/rejection.js.map +1 -0
- package/dist/lib/board/use-board.js +43 -0
- package/dist/lib/board/use-board.js.map +1 -0
- package/dist/lib/calendar/band-packer.js +44 -0
- package/dist/lib/calendar/band-packer.js.map +1 -0
- package/dist/lib/calendar/drag.js +74 -0
- package/dist/lib/calendar/drag.js.map +1 -0
- package/dist/lib/calendar/lane-packer.js +67 -0
- package/dist/lib/calendar/lane-packer.js.map +1 -0
- package/dist/lib/calendar/segments.js +82 -0
- package/dist/lib/calendar/segments.js.map +1 -0
- package/dist/lib/calendar/types.js +7 -0
- package/dist/lib/calendar/types.js.map +1 -0
- package/dist/lib/chart-palette.js +27 -0
- package/dist/lib/chart-palette.js.map +1 -0
- package/dist/lib/clipboard.js +30 -0
- package/dist/lib/clipboard.js.map +1 -0
- package/dist/lib/cn.js +9 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/color.js +24 -0
- package/dist/lib/color.js.map +1 -0
- package/dist/lib/component-guidance.js +297 -0
- package/dist/lib/component-guidance.js.map +1 -0
- package/dist/lib/confidence.js +22 -0
- package/dist/lib/confidence.js.map +1 -0
- package/dist/lib/date-timeline/scale.js +197 -0
- package/dist/lib/date-timeline/scale.js.map +1 -0
- package/dist/lib/design-frame/document.js +44 -0
- package/dist/lib/design-frame/document.js.map +1 -0
- package/dist/lib/design-frame/mini-app-script.js +107 -0
- package/dist/lib/design-frame/mini-app-script.js.map +1 -0
- package/dist/lib/design-frame/mini-app.js +12 -0
- package/dist/lib/design-frame/mini-app.js.map +1 -0
- package/dist/lib/design-frame/protocol.js +46 -0
- package/dist/lib/design-frame/protocol.js.map +1 -0
- package/dist/lib/dev-warn.js +17 -0
- package/dist/lib/dev-warn.js.map +1 -0
- package/dist/lib/dnd/announce.js +120 -0
- package/dist/lib/dnd/announce.js.map +1 -0
- package/dist/lib/dnd/autoscroll.js +123 -0
- package/dist/lib/dnd/autoscroll.js.map +1 -0
- package/dist/lib/dnd/cross-drop.js +11 -0
- package/dist/lib/dnd/cross-drop.js.map +1 -0
- package/dist/lib/dnd/geometry.js +99 -0
- package/dist/lib/dnd/geometry.js.map +1 -0
- package/dist/lib/dnd/sensors/gesture.js +86 -0
- package/dist/lib/dnd/sensors/gesture.js.map +1 -0
- package/dist/lib/dnd/sensors/keyboard.js +47 -0
- package/dist/lib/dnd/sensors/keyboard.js.map +1 -0
- package/dist/lib/dnd/sensors/pointer.js +32 -0
- package/dist/lib/dnd/sensors/pointer.js.map +1 -0
- package/dist/lib/dnd/session.js +256 -0
- package/dist/lib/dnd/session.js.map +1 -0
- package/dist/lib/dnd/use-drag.js +90 -0
- package/dist/lib/dnd/use-drag.js.map +1 -0
- package/dist/lib/dom/scroll-ancestor.js +18 -0
- package/dist/lib/dom/scroll-ancestor.js.map +1 -0
- package/dist/lib/format.js +23 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/group-in-order.js +13 -0
- package/dist/lib/group-in-order.js.map +1 -0
- package/dist/lib/header-fold.js +11 -0
- package/dist/lib/header-fold.js.map +1 -0
- package/dist/lib/i18n/areas/auth-provenance-flows.js +156 -0
- package/dist/lib/i18n/areas/auth-provenance-flows.js.map +1 -0
- package/dist/lib/i18n/areas/board.js +35 -0
- package/dist/lib/i18n/areas/board.js.map +1 -0
- package/dist/lib/i18n/areas/card-face.js +10 -0
- package/dist/lib/i18n/areas/card-face.js.map +1 -0
- package/dist/lib/i18n/areas/chat-chart.js +118 -0
- package/dist/lib/i18n/areas/chat-chart.js.map +1 -0
- package/dist/lib/i18n/areas/code-editor.js +24 -0
- package/dist/lib/i18n/areas/code-editor.js.map +1 -0
- package/dist/lib/i18n/areas/date-timeline.js +21 -0
- package/dist/lib/i18n/areas/date-timeline.js.map +1 -0
- package/dist/lib/i18n/areas/dates.js +71 -0
- package/dist/lib/i18n/areas/dates.js.map +1 -0
- package/dist/lib/i18n/areas/docs-views.js +183 -0
- package/dist/lib/i18n/areas/docs-views.js.map +1 -0
- package/dist/lib/i18n/areas/feedback.js +75 -0
- package/dist/lib/i18n/areas/feedback.js.map +1 -0
- package/dist/lib/i18n/areas/formats.js +24 -0
- package/dist/lib/i18n/areas/formats.js.map +1 -0
- package/dist/lib/i18n/areas/forms.js +110 -0
- package/dist/lib/i18n/areas/forms.js.map +1 -0
- package/dist/lib/i18n/areas/keys.js +25 -0
- package/dist/lib/i18n/areas/keys.js.map +1 -0
- package/dist/lib/i18n/areas/markdown.js +136 -0
- package/dist/lib/i18n/areas/markdown.js.map +1 -0
- package/dist/lib/i18n/areas/move-rejected.js +14 -0
- package/dist/lib/i18n/areas/move-rejected.js.map +1 -0
- package/dist/lib/i18n/areas/navigation.js +104 -0
- package/dist/lib/i18n/areas/navigation.js.map +1 -0
- package/dist/lib/i18n/areas/rbac.js +332 -0
- package/dist/lib/i18n/areas/rbac.js.map +1 -0
- package/dist/lib/i18n/emphasis.js +6 -0
- package/dist/lib/i18n/emphasis.js.map +1 -0
- package/dist/lib/i18n/number-format.js +9 -0
- package/dist/lib/i18n/number-format.js.map +1 -0
- package/dist/lib/i18n/plural.js +9 -0
- package/dist/lib/i18n/plural.js.map +1 -0
- package/dist/lib/i18n/provider.js +27 -0
- package/dist/lib/i18n/provider.js.map +1 -0
- package/dist/lib/i18n/strings.js +38 -0
- package/dist/lib/i18n/strings.js.map +1 -0
- package/dist/lib/icons.js +17 -0
- package/dist/lib/icons.js.map +1 -0
- package/dist/lib/interactive-target.js +9 -0
- package/dist/lib/interactive-target.js.map +1 -0
- package/dist/lib/intl-cache.js +69 -0
- package/dist/lib/intl-cache.js.map +1 -0
- package/dist/lib/legal-document.js +37 -0
- package/dist/lib/legal-document.js.map +1 -0
- package/dist/lib/line-diff-model.js +51 -0
- package/dist/lib/line-diff-model.js.map +1 -0
- package/dist/lib/markdown/attachments.js +71 -0
- package/dist/lib/markdown/attachments.js.map +1 -0
- package/dist/lib/markdown/caret-map.js +153 -0
- package/dist/lib/markdown/caret-map.js.map +1 -0
- package/dist/lib/markdown/caret.js +35 -0
- package/dist/lib/markdown/caret.js.map +1 -0
- package/dist/lib/markdown/commands.js +443 -0
- package/dist/lib/markdown/commands.js.map +1 -0
- package/dist/lib/markdown/convert.js +153 -0
- package/dist/lib/markdown/convert.js.map +1 -0
- package/dist/lib/markdown/dom.js +89 -0
- package/dist/lib/markdown/dom.js.map +1 -0
- package/dist/lib/markdown/edit.js +92 -0
- package/dist/lib/markdown/edit.js.map +1 -0
- package/dist/lib/markdown/history.js +79 -0
- package/dist/lib/markdown/history.js.map +1 -0
- package/dist/lib/markdown/hotkeys.js +63 -0
- package/dist/lib/markdown/hotkeys.js.map +1 -0
- package/dist/lib/markdown/image-pipeline.js +236 -0
- package/dist/lib/markdown/image-pipeline.js.map +1 -0
- package/dist/lib/markdown/images.js +85 -0
- package/dist/lib/markdown/images.js.map +1 -0
- package/dist/lib/markdown/input.js +210 -0
- package/dist/lib/markdown/input.js.map +1 -0
- package/dist/lib/markdown/keys.js +37 -0
- package/dist/lib/markdown/keys.js.map +1 -0
- package/dist/lib/markdown/paste.js +180 -0
- package/dist/lib/markdown/paste.js.map +1 -0
- package/dist/lib/markdown/position.js +111 -0
- package/dist/lib/markdown/position.js.map +1 -0
- package/dist/lib/markdown/project.js +108 -0
- package/dist/lib/markdown/project.js.map +1 -0
- package/dist/lib/markdown/reconcile.js +127 -0
- package/dist/lib/markdown/reconcile.js.map +1 -0
- package/dist/lib/markdown/surface.js +373 -0
- package/dist/lib/markdown/surface.js.map +1 -0
- package/dist/lib/motion.js +22 -0
- package/dist/lib/motion.js.map +1 -0
- package/dist/lib/pad.js +7 -0
- package/dist/lib/pad.js.map +1 -0
- package/dist/lib/paged-window/layout.js +15 -0
- package/dist/lib/paged-window/layout.js.map +1 -0
- package/dist/lib/paged-window/list-owner.js +21 -0
- package/dist/lib/paged-window/list-owner.js.map +1 -0
- package/dist/lib/paged-window/records-binding.js +239 -0
- package/dist/lib/paged-window/records-binding.js.map +1 -0
- package/dist/lib/paged-window/store.js +562 -0
- package/dist/lib/paged-window/store.js.map +1 -0
- package/dist/lib/paged-window/use-measured-pitch.js +38 -0
- package/dist/lib/paged-window/use-measured-pitch.js.map +1 -0
- package/dist/lib/paged-window/use-page-visibility.js +36 -0
- package/dist/lib/paged-window/use-page-visibility.js.map +1 -0
- package/dist/lib/paged-window/use-paged-window.js +43 -0
- package/dist/lib/paged-window/use-paged-window.js.map +1 -0
- package/dist/lib/paged-window/use-scroll-root.js +12 -0
- package/dist/lib/paged-window/use-scroll-root.js.map +1 -0
- package/dist/lib/persist.js +84 -0
- package/dist/lib/persist.js.map +1 -0
- package/dist/lib/preference-values.js +13 -0
- package/dist/lib/preference-values.js.map +1 -0
- package/dist/lib/preferences.js +86 -0
- package/dist/lib/preferences.js.map +1 -0
- package/dist/lib/reads/hooks.js +156 -0
- package/dist/lib/reads/hooks.js.map +1 -0
- package/dist/lib/reads/optimistic.js +169 -0
- package/dist/lib/reads/optimistic.js.map +1 -0
- package/dist/lib/reads/refetch.js +108 -0
- package/dist/lib/reads/refetch.js.map +1 -0
- package/dist/lib/reads/slots.js +215 -0
- package/dist/lib/reads/slots.js.map +1 -0
- package/dist/lib/realtime/hooks.js +40 -0
- package/dist/lib/realtime/hooks.js.map +1 -0
- package/dist/lib/realtime/provider.js +25 -0
- package/dist/lib/realtime/provider.js.map +1 -0
- package/dist/lib/realtime/registry.js +472 -0
- package/dist/lib/realtime/registry.js.map +1 -0
- package/dist/lib/records/define-record-type.js +33 -0
- package/dist/lib/records/define-record-type.js.map +1 -0
- package/dist/lib/records/hooks.js +39 -0
- package/dist/lib/records/hooks.js.map +1 -0
- package/dist/lib/records/store.js +572 -0
- package/dist/lib/records/store.js.map +1 -0
- package/dist/lib/records/wire.js +58 -0
- package/dist/lib/records/wire.js.map +1 -0
- package/dist/lib/reduced-motion-help.js +19 -0
- package/dist/lib/reduced-motion-help.js.map +1 -0
- package/dist/lib/scroll-caret.js +18 -0
- package/dist/lib/scroll-caret.js.map +1 -0
- package/dist/lib/sim/createSimStore.js +54 -0
- package/dist/lib/sim/createSimStore.js.map +1 -0
- package/dist/lib/sim/latency.js +28 -0
- package/dist/lib/sim/latency.js.map +1 -0
- package/dist/lib/sim/registry.js +13 -0
- package/dist/lib/sim/registry.js.map +1 -0
- package/dist/lib/sim/settings.js +41 -0
- package/dist/lib/sim/settings.js.map +1 -0
- package/dist/lib/submit-shortcut.js +25 -0
- package/dist/lib/submit-shortcut.js.map +1 -0
- package/dist/lib/syntax/index.js +33 -0
- package/dist/lib/syntax/index.js.map +1 -0
- package/dist/lib/syntax/languages/bash.js +77 -0
- package/dist/lib/syntax/languages/bash.js.map +1 -0
- package/dist/lib/syntax/languages/css.js +81 -0
- package/dist/lib/syntax/languages/css.js.map +1 -0
- package/dist/lib/syntax/languages/html.js +91 -0
- package/dist/lib/syntax/languages/html.js.map +1 -0
- package/dist/lib/syntax/languages/index.js +49 -0
- package/dist/lib/syntax/languages/index.js.map +1 -0
- package/dist/lib/syntax/languages/javascript.js +133 -0
- package/dist/lib/syntax/languages/javascript.js.map +1 -0
- package/dist/lib/syntax/languages/json.js +45 -0
- package/dist/lib/syntax/languages/json.js.map +1 -0
- package/dist/lib/syntax/languages/mongodb.js +24 -0
- package/dist/lib/syntax/languages/mongodb.js.map +1 -0
- package/dist/lib/syntax/languages/plain.js +10 -0
- package/dist/lib/syntax/languages/plain.js.map +1 -0
- package/dist/lib/syntax/languages/sql.js +113 -0
- package/dist/lib/syntax/languages/sql.js.map +1 -0
- package/dist/lib/syntax/languages/vue.js +31 -0
- package/dist/lib/syntax/languages/vue.js.map +1 -0
- package/dist/lib/syntax/languages/yaml.js +55 -0
- package/dist/lib/syntax/languages/yaml.js.map +1 -0
- package/dist/lib/syntax/markdown/grammar.js +52 -0
- package/dist/lib/syntax/markdown/grammar.js.map +1 -0
- package/dist/lib/syntax/markdown/inline.js +477 -0
- package/dist/lib/syntax/markdown/inline.js.map +1 -0
- package/dist/lib/syntax/markdown/parse.js +464 -0
- package/dist/lib/syntax/markdown/parse.js.map +1 -0
- package/dist/lib/syntax/markdown/refs.js +94 -0
- package/dist/lib/syntax/markdown/refs.js.map +1 -0
- package/dist/lib/syntax/markdown/render.js +230 -0
- package/dist/lib/syntax/markdown/render.js.map +1 -0
- package/dist/lib/syntax/markdown/spans.js +40 -0
- package/dist/lib/syntax/markdown/spans.js.map +1 -0
- package/dist/lib/syntax/registry.js +55 -0
- package/dist/lib/syntax/registry.js.map +1 -0
- package/dist/lib/syntax/tokenize.js +96 -0
- package/dist/lib/syntax/tokenize.js.map +1 -0
- package/dist/lib/time/instant.js +7 -0
- package/dist/lib/time/instant.js.map +1 -0
- package/dist/lib/time/plain.js +83 -0
- package/dist/lib/time/plain.js.map +1 -0
- package/dist/lib/time/relativeAge.js +20 -0
- package/dist/lib/time/relativeAge.js.map +1 -0
- package/dist/lib/time/relativeClock.js +59 -0
- package/dist/lib/time/relativeClock.js.map +1 -0
- package/dist/lib/time/types.js +23 -0
- package/dist/lib/time/types.js.map +1 -0
- package/dist/lib/time/zone.js +148 -0
- package/dist/lib/time/zone.js.map +1 -0
- package/dist/lib/use-controllable.js +16 -0
- package/dist/lib/use-controllable.js.map +1 -0
- package/dist/lib/use-fill-height.js +49 -0
- package/dist/lib/use-fill-height.js.map +1 -0
- package/dist/lib/use-hydrated.js +14 -0
- package/dist/lib/use-hydrated.js.map +1 -0
- package/dist/lib/use-media-query.js +30 -0
- package/dist/lib/use-media-query.js.map +1 -0
- package/dist/lib/use-relabel-base-ui-dismiss.js +26 -0
- package/dist/lib/use-relabel-base-ui-dismiss.js.map +1 -0
- package/dist/lib/use-release-snap-drag.js +29 -0
- package/dist/lib/use-release-snap-drag.js.map +1 -0
- package/dist/lib/use-roving-options.js +18 -0
- package/dist/lib/use-roving-options.js.map +1 -0
- package/dist/lib/values/absent.js +5 -0
- package/dist/lib/values/absent.js.map +1 -0
- package/dist/lib/values/boolean.js +13 -0
- package/dist/lib/values/boolean.js.map +1 -0
- package/dist/lib/values/currency.js +23 -0
- package/dist/lib/values/currency.js.map +1 -0
- package/dist/lib/values/date.js +35 -0
- package/dist/lib/values/date.js.map +1 -0
- package/dist/lib/values/datetime.js +54 -0
- package/dist/lib/values/datetime.js.map +1 -0
- package/dist/lib/values/locale-date.js +60 -0
- package/dist/lib/values/locale-date.js.map +1 -0
- package/dist/lib/values/number.js +16 -0
- package/dist/lib/values/number.js.map +1 -0
- package/dist/pure.js +379 -0
- package/dist/pure.js.map +1 -0
- package/dist/styles.css +190 -0
- package/dist/theme.css +360 -0
- package/dist/types/components/Accordion.d.ts +15 -0
- package/dist/types/components/AgentWorkingSpinner.d.ts +23 -0
- package/dist/types/components/AppShell.d.ts +164 -0
- package/dist/types/components/Attention.d.ts +87 -0
- package/dist/types/components/Avatar.d.ts +154 -0
- package/dist/types/components/Badge.d.ts +131 -0
- package/dist/types/components/Board.d.ts +239 -0
- package/dist/types/components/Button.d.ts +208 -0
- package/dist/types/components/Callout.d.ts +163 -0
- package/dist/types/components/Card.d.ts +219 -0
- package/dist/types/components/Choice.d.ts +127 -0
- package/dist/types/components/CodeEditor.d.ts +86 -0
- package/dist/types/components/ColorPicker.d.ts +14 -0
- package/dist/types/components/Combobox.d.ts +43 -0
- package/dist/types/components/CommandPalette.d.ts +35 -0
- package/dist/types/components/ConcentricRing.d.ts +61 -0
- package/dist/types/components/ConnectionCard.d.ts +64 -0
- package/dist/types/components/ContextItemRow.d.ts +35 -0
- package/dist/types/components/CopyValue.d.ts +14 -0
- package/dist/types/components/CountBadge.d.ts +14 -0
- package/dist/types/components/DateCalendar.d.ts +30 -0
- package/dist/types/components/DateField.d.ts +29 -0
- package/dist/types/components/DatePicker.d.ts +20 -0
- package/dist/types/components/DateTimeText.d.ts +9 -0
- package/dist/types/components/DescriptionList.d.ts +40 -0
- package/dist/types/components/Dialog.d.ts +269 -0
- package/dist/types/components/DragDrop.d.ts +196 -0
- package/dist/types/components/Drawer.d.ts +163 -0
- package/dist/types/components/EditGutter.d.ts +44 -0
- package/dist/types/components/EmojiPicker.d.ts +30 -0
- package/dist/types/components/ErrorBoundary.d.ts +43 -0
- package/dist/types/components/Field.d.ts +37 -0
- package/dist/types/components/FileUpload.d.ts +22 -0
- package/dist/types/components/FilterMenu.d.ts +120 -0
- package/dist/types/components/GatesSection.d.ts +79 -0
- package/dist/types/components/Icon.d.ts +40 -0
- package/dist/types/components/IconButton.d.ts +69 -0
- package/dist/types/components/IconStack.d.ts +28 -0
- package/dist/types/components/ImageUploadField.d.ts +38 -0
- package/dist/types/components/InlineEdit.d.ts +183 -0
- package/dist/types/components/InlineMarkdownEdit.d.ts +100 -0
- package/dist/types/components/Input.d.ts +128 -0
- package/dist/types/components/LegalDocument.d.ts +23 -0
- package/dist/types/components/LineDiff.d.ts +53 -0
- package/dist/types/components/ListHeader.d.ts +45 -0
- package/dist/types/components/Loading.d.ts +131 -0
- package/dist/types/components/Markdown.d.ts +35 -0
- package/dist/types/components/MarkdownEditor.d.ts +129 -0
- package/dist/types/components/Menu.d.ts +157 -0
- package/dist/types/components/Navigation.d.ts +67 -0
- package/dist/types/components/NumberInput.d.ts +177 -0
- package/dist/types/components/OTPInput.d.ts +13 -0
- package/dist/types/components/OrderedEntityManager.d.ts +64 -0
- package/dist/types/components/PagedWindowList.d.ts +23 -0
- package/dist/types/components/PaginationBar.d.ts +31 -0
- package/dist/types/components/Panel.d.ts +94 -0
- package/dist/types/components/PasswordInput.d.ts +7 -0
- package/dist/types/components/PasswordRequirements.d.ts +11 -0
- package/dist/types/components/PatchDiff.d.ts +38 -0
- package/dist/types/components/PendingVeil.d.ts +8 -0
- package/dist/types/components/Popover.d.ts +231 -0
- package/dist/types/components/Progress.d.ts +580 -0
- package/dist/types/components/RatingScale.d.ts +30 -0
- package/dist/types/components/ReadMore.d.ts +26 -0
- package/dist/types/components/RecordCard.d.ts +413 -0
- package/dist/types/components/RelativeTime.d.ts +17 -0
- package/dist/types/components/SandboxedFrame.d.ts +37 -0
- package/dist/types/components/SearchInput.d.ts +6 -0
- package/dist/types/components/SecretField.d.ts +90 -0
- package/dist/types/components/SectionNav.d.ts +15 -0
- package/dist/types/components/Select.d.ts +53 -0
- package/dist/types/components/SequenceDiagram.d.ts +15 -0
- package/dist/types/components/SettingRow.d.ts +144 -0
- package/dist/types/components/SignOffRings.d.ts +29 -0
- package/dist/types/components/Slider.d.ts +255 -0
- package/dist/types/components/SolutionChoice.d.ts +49 -0
- package/dist/types/components/SortMenu.d.ts +45 -0
- package/dist/types/components/Spinner.d.ts +29 -0
- package/dist/types/components/Stat.d.ts +136 -0
- package/dist/types/components/StatusSelect.d.ts +93 -0
- package/dist/types/components/Surface.d.ts +145 -0
- package/dist/types/components/Table.d.ts +164 -0
- package/dist/types/components/Tabs.d.ts +142 -0
- package/dist/types/components/ThemeMenu.d.ts +56 -0
- package/dist/types/components/Toast.d.ts +63 -0
- package/dist/types/components/Toggle.d.ts +168 -0
- package/dist/types/components/ToggleMatrix.d.ts +51 -0
- package/dist/types/components/Tree.d.ts +20 -0
- package/dist/types/components/TriStateSwitch.d.ts +63 -0
- package/dist/types/components/VideoPlayer.d.ts +26 -0
- package/dist/types/components/auth/AcceptInvitationCard.d.ts +54 -0
- package/dist/types/components/auth/AuthLayout.d.ts +12 -0
- package/dist/types/components/auth/ForgotPasswordForm.d.ts +6 -0
- package/dist/types/components/auth/LoginForm.d.ts +13 -0
- package/dist/types/components/auth/ResetPasswordForm.d.ts +9 -0
- package/dist/types/components/auth/SignInProviders.d.ts +56 -0
- package/dist/types/components/auth/SignupCard.d.ts +62 -0
- package/dist/types/components/auth/TermsAcceptance.d.ts +14 -0
- package/dist/types/components/auth/index.d.ts +8 -0
- package/dist/types/components/board/context.d.ts +65 -0
- package/dist/types/components/board/recipe.d.ts +97 -0
- package/dist/types/components/calendar/CalendarMonth.d.ts +32 -0
- package/dist/types/components/calendar/CalendarTimeGrid.d.ts +74 -0
- package/dist/types/components/calendar/EventActions.d.ts +16 -0
- package/dist/types/components/calendar/format.d.ts +42 -0
- package/dist/types/components/calendar/palette.d.ts +17 -0
- package/dist/types/components/calendar/use-calendar-drag.d.ts +53 -0
- package/dist/types/components/calendar/use-event-keyboard.d.ts +23 -0
- package/dist/types/components/calendar/use-grid-navigation.d.ts +47 -0
- package/dist/types/components/calendar/use-now.d.ts +20 -0
- package/dist/types/components/card-face/AcRingGlyph.d.ts +20 -0
- package/dist/types/components/card-face/BoardCardAgentSlot.d.ts +19 -0
- package/dist/types/components/card-face/CardFace.d.ts +106 -0
- package/dist/types/components/card-face/CardTypeBadge.d.ts +21 -0
- package/dist/types/components/card-face/EffortBadge.d.ts +9 -0
- package/dist/types/components/card-face/GateRingGlyph.d.ts +22 -0
- package/dist/types/components/card-face/OverflowRow.d.ts +40 -0
- package/dist/types/components/card-face/TapTip.d.ts +15 -0
- package/dist/types/components/card-face/hit-area.d.ts +20 -0
- package/dist/types/components/card-face/vocabulary.d.ts +83 -0
- package/dist/types/components/chart/BarList.d.ts +27 -0
- package/dist/types/components/chart/LineChart.d.ts +64 -0
- package/dist/types/components/chart/ShareBar.d.ts +26 -0
- package/dist/types/components/chart/TimeSeriesChart.d.ts +60 -0
- package/dist/types/components/chart/label-metrics.d.ts +9 -0
- package/dist/types/components/chart/line-chart-axis.d.ts +14 -0
- package/dist/types/components/chart/line-chart-scale.d.ts +55 -0
- package/dist/types/components/chart/line-series-style.d.ts +14 -0
- package/dist/types/components/chart/share-bar-labels.d.ts +17 -0
- package/dist/types/components/chart/shared.d.ts +122 -0
- package/dist/types/components/chart/time-series-scale.d.ts +29 -0
- package/dist/types/components/chat/Attachment.d.ts +125 -0
- package/dist/types/components/chat/Chat.d.ts +60 -0
- package/dist/types/components/chat/Composer.d.ts +62 -0
- package/dist/types/components/chat/ContextMeter.d.ts +45 -0
- package/dist/types/components/chat/EffortControl.d.ts +23 -0
- package/dist/types/components/chat/FileCover.d.ts +14 -0
- package/dist/types/components/chat/Message.d.ts +66 -0
- package/dist/types/components/chat/MessageScroller.d.ts +18 -0
- package/dist/types/components/chat/ModelSelector.d.ts +44 -0
- package/dist/types/components/chat/StreamingMarkdown.d.ts +11 -0
- package/dist/types/components/chat/download-file.d.ts +7 -0
- package/dist/types/components/chat/file-icon.d.ts +29 -0
- package/dist/types/components/chat/types.d.ts +165 -0
- package/dist/types/components/checklist/StatusChecklist.d.ts +37 -0
- package/dist/types/components/checklist/index.d.ts +3 -0
- package/dist/types/components/checklist/tally.d.ts +19 -0
- package/dist/types/components/checklist/types.d.ts +28 -0
- package/dist/types/components/code-editor/context.d.ts +32 -0
- package/dist/types/components/code-editor/editing.d.ts +39 -0
- package/dist/types/components/code-editor/highlight.d.ts +20 -0
- package/dist/types/components/code-editor/recipe.d.ts +109 -0
- package/dist/types/components/date-timeline/DateTimeline.d.ts +99 -0
- package/dist/types/components/date-timeline/TimelineRow.d.ts +22 -0
- package/dist/types/components/date-timeline/useBarDrag.d.ts +15 -0
- package/dist/types/components/date-timeline/useMarkerDrag.d.ts +14 -0
- package/dist/types/components/date-timeline/useTimelineZoom.d.ts +23 -0
- package/dist/types/components/drag-drop/context.d.ts +85 -0
- package/dist/types/components/drag-drop/recipe.d.ts +163 -0
- package/dist/types/components/drag-drop/shift.d.ts +153 -0
- package/dist/types/components/edit/activation.d.ts +21 -0
- package/dist/types/components/edit/outcome.d.ts +29 -0
- package/dist/types/components/edit/use-edit-session.d.ts +77 -0
- package/dist/types/components/file-viewer/FileViewer.d.ts +2 -0
- package/dist/types/components/file-viewer/PageNumberJumpField.d.ts +9 -0
- package/dist/types/components/file-viewer/ViewerControls.d.ts +20 -0
- package/dist/types/components/file-viewer/ViewerRail.d.ts +10 -0
- package/dist/types/components/file-viewer/ViewerStage.d.ts +22 -0
- package/dist/types/components/file-viewer/frames.d.ts +28 -0
- package/dist/types/components/file-viewer/index.d.ts +3 -0
- package/dist/types/components/file-viewer/types.d.ts +70 -0
- package/dist/types/components/file-viewer/use-frame-cursor.d.ts +13 -0
- package/dist/types/components/file-viewer/use-viewer-keys.d.ts +24 -0
- package/dist/types/components/file-viewer/use-viewer-zoom.d.ts +29 -0
- package/dist/types/components/focus-web/FocusWeb.d.ts +3 -0
- package/dist/types/components/focus-web/index.d.ts +4 -0
- package/dist/types/components/focus-web/layout.d.ts +55 -0
- package/dist/types/components/focus-web/types.d.ts +131 -0
- package/dist/types/components/graph-explorer/GraphExplorer.d.ts +42 -0
- package/dist/types/components/graph-explorer/camera-math.d.ts +119 -0
- package/dist/types/components/graph-explorer/index.d.ts +5 -0
- package/dist/types/components/graph-explorer/tree-layout.d.ts +67 -0
- package/dist/types/components/graph-explorer/types.d.ts +62 -0
- package/dist/types/components/graph-explorer/use-camera.d.ts +81 -0
- package/dist/types/components/graph-explorer/viewport-gesture.d.ts +32 -0
- package/dist/types/components/kanban/KanbanBoard.d.ts +72 -0
- package/dist/types/components/kanban/recipe.d.ts +73 -0
- package/dist/types/components/kanban/types.d.ts +55 -0
- package/dist/types/components/markdown/Affordances.d.ts +105 -0
- package/dist/types/components/markdown/AttachmentStrip.d.ts +25 -0
- package/dist/types/components/markdown/ImageUpload.d.ts +56 -0
- package/dist/types/components/media-error.d.ts +11 -0
- package/dist/types/components/nav-sections.d.ts +10 -0
- package/dist/types/components/node-canvas/NodeCanvas.d.ts +66 -0
- package/dist/types/components/node-canvas/index.d.ts +3 -0
- package/dist/types/components/node-canvas/layout.d.ts +29 -0
- package/dist/types/components/node-canvas/types.d.ts +207 -0
- package/dist/types/components/node-canvas/use-canvas-gestures.d.ts +39 -0
- package/dist/types/components/openapi/OpenApiViewer.d.ts +14 -0
- package/dist/types/components/openapi/OperationCard.d.ts +33 -0
- package/dist/types/components/openapi/SchemaView.d.ts +14 -0
- package/dist/types/components/openapi/index.d.ts +6 -0
- package/dist/types/components/openapi/resolve.d.ts +72 -0
- package/dist/types/components/openapi/types.d.ts +128 -0
- package/dist/types/components/overlay-shell.d.ts +48 -0
- package/dist/types/components/overlay-stack.d.ts +18 -0
- package/dist/types/components/paged-window/PageBlock.d.ts +31 -0
- package/dist/types/components/provenance/ConfidenceBar.d.ts +118 -0
- package/dist/types/components/provenance/ConfidenceMeter.d.ts +21 -0
- package/dist/types/components/provenance/ConfidenceReadout.d.ts +17 -0
- package/dist/types/components/provenance/ProvenanceBadge.d.ts +23 -0
- package/dist/types/components/provenance/ProvenanceDetail.d.ts +109 -0
- package/dist/types/components/provenance/ProvenanceDisclosure.d.ts +107 -0
- package/dist/types/components/provenance/absence.d.ts +37 -0
- package/dist/types/components/provenance/index.d.ts +7 -0
- package/dist/types/components/provenance/types.d.ts +137 -0
- package/dist/types/components/rbac/AccessRequestPanel.d.ts +92 -0
- package/dist/types/components/rbac/AccountMenu.d.ts +46 -0
- package/dist/types/components/rbac/AgentKeysList.d.ts +22 -0
- package/dist/types/components/rbac/ApiKeysPanel.d.ts +26 -0
- package/dist/types/components/rbac/ApiKeysTable.d.ts +65 -0
- package/dist/types/components/rbac/Brand.d.ts +8 -0
- package/dist/types/components/rbac/Can.d.ts +19 -0
- package/dist/types/components/rbac/ChangePasswordForm.d.ts +18 -0
- package/dist/types/components/rbac/DangerZone.d.ts +8 -0
- package/dist/types/components/rbac/DevToolsPopover.d.ts +36 -0
- package/dist/types/components/rbac/EndedLine.d.ts +21 -0
- package/dist/types/components/rbac/InvitationsList.d.ts +39 -0
- package/dist/types/components/rbac/InviteMembersDialog.d.ts +21 -0
- package/dist/types/components/rbac/MembersPanel.d.ts +31 -0
- package/dist/types/components/rbac/PermissionRequestPanel.d.ts +36 -0
- package/dist/types/components/rbac/ProfileForm.d.ts +27 -0
- package/dist/types/components/rbac/ProfilePage.d.ts +16 -0
- package/dist/types/components/rbac/RBACProvider.d.ts +69 -0
- package/dist/types/components/rbac/RoleEditorDialog.d.ts +28 -0
- package/dist/types/components/rbac/RoleKeyPicker.d.ts +24 -0
- package/dist/types/components/rbac/RolePermissionMatrix.d.ts +21 -0
- package/dist/types/components/rbac/RolesPermissionsPage.d.ts +24 -0
- package/dist/types/components/rbac/SessionsList.d.ts +35 -0
- package/dist/types/components/rbac/TeamSettingsForm.d.ts +22 -0
- package/dist/types/components/rbac/TeamSwitcher.d.ts +5 -0
- package/dist/types/components/rbac/approvalPanelParts.d.ts +69 -0
- package/dist/types/components/rbac/index.d.ts +25 -0
- package/dist/types/components/rbac/permissionSections.d.ts +8 -0
- package/dist/types/components/rbac/stagedForm.d.ts +25 -0
- package/dist/types/components/rbac/types.d.ts +65 -0
- package/dist/types/components/rbac/useStagedImage.d.ts +15 -0
- package/dist/types/components/roadmap/PhaseManager.d.ts +19 -0
- package/dist/types/components/roadmap/RoadmapItemCard.d.ts +51 -0
- package/dist/types/components/roadmap/RoadmapPage.d.ts +12 -0
- package/dist/types/components/roadmap/RoadmapSwimlaneBoard.d.ts +15 -0
- package/dist/types/components/roadmap/TrackManager.d.ts +19 -0
- package/dist/types/components/roadmap/UseCaseCard.d.ts +30 -0
- package/dist/types/components/roadmap/UseCaseLedgerPage.d.ts +29 -0
- package/dist/types/components/roadmap/chip-tones.d.ts +2 -0
- package/dist/types/components/roadmap/derive.d.ts +39 -0
- package/dist/types/components/roadmap/index.d.ts +10 -0
- package/dist/types/components/roadmap/types.d.ts +86 -0
- package/dist/types/components/stepper/Stepper.d.ts +79 -0
- package/dist/types/components/stepper/derive.d.ts +49 -0
- package/dist/types/components/stepper/index.d.ts +3 -0
- package/dist/types/components/stepper/types.d.ts +118 -0
- package/dist/types/icons/data.d.ts +2054 -0
- package/dist/types/index.d.ts +209 -0
- package/dist/types/lib/attention.d.ts +62 -0
- package/dist/types/lib/board/anchor.d.ts +69 -0
- package/dist/types/lib/board/index.d.ts +17 -0
- package/dist/types/lib/board/model.d.ts +43 -0
- package/dist/types/lib/board/move.d.ts +181 -0
- package/dist/types/lib/board/position.d.ts +22 -0
- package/dist/types/lib/board/rejection.d.ts +8 -0
- package/dist/types/lib/board/types.d.ts +294 -0
- package/dist/types/lib/board/use-board.d.ts +47 -0
- package/dist/types/lib/calendar/band-packer.d.ts +53 -0
- package/dist/types/lib/calendar/drag.d.ts +125 -0
- package/dist/types/lib/calendar/index.d.ts +4 -0
- package/dist/types/lib/calendar/lane-packer.d.ts +88 -0
- package/dist/types/lib/calendar/segments.d.ts +91 -0
- package/dist/types/lib/calendar/types.d.ts +166 -0
- package/dist/types/lib/chart-palette.d.ts +14 -0
- package/dist/types/lib/clipboard.d.ts +12 -0
- package/dist/types/lib/cn.d.ts +7 -0
- package/dist/types/lib/color.d.ts +14 -0
- package/dist/types/lib/component-guidance.d.ts +15 -0
- package/dist/types/lib/confidence.d.ts +28 -0
- package/dist/types/lib/date-timeline/scale.d.ts +143 -0
- package/dist/types/lib/design-frame/document.d.ts +39 -0
- package/dist/types/lib/design-frame/mini-app-script.d.ts +29 -0
- package/dist/types/lib/design-frame/mini-app.d.ts +17 -0
- package/dist/types/lib/design-frame/protocol.d.ts +78 -0
- package/dist/types/lib/dev-warn.d.ts +10 -0
- package/dist/types/lib/dnd/announce.d.ts +124 -0
- package/dist/types/lib/dnd/autoscroll.d.ts +88 -0
- package/dist/types/lib/dnd/cross-drop.d.ts +18 -0
- package/dist/types/lib/dnd/geometry.d.ts +126 -0
- package/dist/types/lib/dnd/index.d.ts +17 -0
- package/dist/types/lib/dnd/sensors/gesture.d.ts +37 -0
- package/dist/types/lib/dnd/sensors/keyboard.d.ts +54 -0
- package/dist/types/lib/dnd/sensors/pointer.d.ts +59 -0
- package/dist/types/lib/dnd/session.d.ts +124 -0
- package/dist/types/lib/dnd/types.d.ts +226 -0
- package/dist/types/lib/dnd/use-drag.d.ts +82 -0
- package/dist/types/lib/dom/scroll-ancestor.d.ts +15 -0
- package/dist/types/lib/format.d.ts +33 -0
- package/dist/types/lib/group-in-order.d.ts +13 -0
- package/dist/types/lib/header-fold.d.ts +10 -0
- package/dist/types/lib/i18n/areas/auth-provenance-flows.d.ts +287 -0
- package/dist/types/lib/i18n/areas/board.d.ts +51 -0
- package/dist/types/lib/i18n/areas/card-face.d.ts +8 -0
- package/dist/types/lib/i18n/areas/chat-chart.d.ts +202 -0
- package/dist/types/lib/i18n/areas/code-editor.d.ts +40 -0
- package/dist/types/lib/i18n/areas/date-timeline.d.ts +36 -0
- package/dist/types/lib/i18n/areas/dates.d.ts +103 -0
- package/dist/types/lib/i18n/areas/docs-views.d.ts +297 -0
- package/dist/types/lib/i18n/areas/feedback.d.ts +132 -0
- package/dist/types/lib/i18n/areas/formats.d.ts +30 -0
- package/dist/types/lib/i18n/areas/forms.d.ts +182 -0
- package/dist/types/lib/i18n/areas/keys.d.ts +15 -0
- package/dist/types/lib/i18n/areas/markdown.d.ts +150 -0
- package/dist/types/lib/i18n/areas/move-rejected.d.ts +16 -0
- package/dist/types/lib/i18n/areas/navigation.d.ts +185 -0
- package/dist/types/lib/i18n/areas/rbac.d.ts +635 -0
- package/dist/types/lib/i18n/emphasis.d.ts +3 -0
- package/dist/types/lib/i18n/index.d.ts +10 -0
- package/dist/types/lib/i18n/number-format.d.ts +5 -0
- package/dist/types/lib/i18n/plural.d.ts +7 -0
- package/dist/types/lib/i18n/provider.d.ts +16 -0
- package/dist/types/lib/i18n/strings.d.ts +18 -0
- package/dist/types/lib/icons.d.ts +22 -0
- package/dist/types/lib/interactive-target.d.ts +3 -0
- package/dist/types/lib/intl-cache.d.ts +31 -0
- package/dist/types/lib/legal-document.d.ts +82 -0
- package/dist/types/lib/line-diff-model.d.ts +39 -0
- package/dist/types/lib/markdown/attachments.d.ts +50 -0
- package/dist/types/lib/markdown/caret-map.d.ts +69 -0
- package/dist/types/lib/markdown/caret.d.ts +6 -0
- package/dist/types/lib/markdown/commands.d.ts +186 -0
- package/dist/types/lib/markdown/convert.d.ts +99 -0
- package/dist/types/lib/markdown/dom.d.ts +30 -0
- package/dist/types/lib/markdown/edit.d.ts +16 -0
- package/dist/types/lib/markdown/history.d.ts +59 -0
- package/dist/types/lib/markdown/hotkeys.d.ts +63 -0
- package/dist/types/lib/markdown/image-pipeline.d.ts +173 -0
- package/dist/types/lib/markdown/images.d.ts +138 -0
- package/dist/types/lib/markdown/input.d.ts +38 -0
- package/dist/types/lib/markdown/keys.d.ts +34 -0
- package/dist/types/lib/markdown/paste.d.ts +9 -0
- package/dist/types/lib/markdown/position.d.ts +43 -0
- package/dist/types/lib/markdown/project.d.ts +88 -0
- package/dist/types/lib/markdown/reconcile.d.ts +63 -0
- package/dist/types/lib/markdown/surface.d.ts +236 -0
- package/dist/types/lib/motion.d.ts +30 -0
- package/dist/types/lib/pad.d.ts +6 -0
- package/dist/types/lib/paged-window/index.d.ts +2 -0
- package/dist/types/lib/paged-window/layout.d.ts +21 -0
- package/dist/types/lib/paged-window/list-owner.d.ts +12 -0
- package/dist/types/lib/paged-window/records-binding.d.ts +102 -0
- package/dist/types/lib/paged-window/store.d.ts +307 -0
- package/dist/types/lib/paged-window/use-measured-pitch.d.ts +34 -0
- package/dist/types/lib/paged-window/use-page-visibility.d.ts +20 -0
- package/dist/types/lib/paged-window/use-paged-window.d.ts +61 -0
- package/dist/types/lib/paged-window/use-scroll-root.d.ts +18 -0
- package/dist/types/lib/persist.d.ts +57 -0
- package/dist/types/lib/preference-values.d.ts +72 -0
- package/dist/types/lib/preferences.d.ts +26 -0
- package/dist/types/lib/reads/hooks.d.ts +49 -0
- package/dist/types/lib/reads/index.d.ts +5 -0
- package/dist/types/lib/reads/optimistic.d.ts +119 -0
- package/dist/types/lib/reads/refetch.d.ts +83 -0
- package/dist/types/lib/reads/slots.d.ts +137 -0
- package/dist/types/lib/reads/types.d.ts +155 -0
- package/dist/types/lib/realtime/hooks.d.ts +38 -0
- package/dist/types/lib/realtime/index.d.ts +4 -0
- package/dist/types/lib/realtime/provider.d.ts +38 -0
- package/dist/types/lib/realtime/registry.d.ts +225 -0
- package/dist/types/lib/realtime/types.d.ts +242 -0
- package/dist/types/lib/records/define-record-type.d.ts +29 -0
- package/dist/types/lib/records/hooks.d.ts +46 -0
- package/dist/types/lib/records/index.d.ts +5 -0
- package/dist/types/lib/records/store.d.ts +289 -0
- package/dist/types/lib/records/types.d.ts +195 -0
- package/dist/types/lib/records/wire.d.ts +96 -0
- package/dist/types/lib/reduced-motion-help.d.ts +23 -0
- package/dist/types/lib/scroll-caret.d.ts +6 -0
- package/dist/types/lib/sim/createSimStore.d.ts +18 -0
- package/dist/types/lib/sim/index.d.ts +5 -0
- package/dist/types/lib/sim/latency.d.ts +10 -0
- package/dist/types/lib/sim/registry.d.ts +14 -0
- package/dist/types/lib/sim/settings.d.ts +11 -0
- package/dist/types/lib/sim/types.d.ts +3 -0
- package/dist/types/lib/submit-shortcut.d.ts +24 -0
- package/dist/types/lib/syntax/index.d.ts +16 -0
- package/dist/types/lib/syntax/languages/bash.d.ts +1 -0
- package/dist/types/lib/syntax/languages/css.d.ts +1 -0
- package/dist/types/lib/syntax/languages/html.d.ts +17 -0
- package/dist/types/lib/syntax/languages/index.d.ts +33 -0
- package/dist/types/lib/syntax/languages/javascript.d.ts +22 -0
- package/dist/types/lib/syntax/languages/json.d.ts +1 -0
- package/dist/types/lib/syntax/languages/mongodb.d.ts +1 -0
- package/dist/types/lib/syntax/languages/plain.d.ts +9 -0
- package/dist/types/lib/syntax/languages/sql.d.ts +4 -0
- package/dist/types/lib/syntax/languages/vue.d.ts +1 -0
- package/dist/types/lib/syntax/languages/yaml.d.ts +1 -0
- package/dist/types/lib/syntax/markdown/frames.d.ts +145 -0
- package/dist/types/lib/syntax/markdown/grammar.d.ts +1 -0
- package/dist/types/lib/syntax/markdown/index.d.ts +5 -0
- package/dist/types/lib/syntax/markdown/inline.d.ts +21 -0
- package/dist/types/lib/syntax/markdown/parse.d.ts +15 -0
- package/dist/types/lib/syntax/markdown/refs.d.ts +47 -0
- package/dist/types/lib/syntax/markdown/render.d.ts +25 -0
- package/dist/types/lib/syntax/markdown/spans.d.ts +84 -0
- package/dist/types/lib/syntax/markdown/types.d.ts +108 -0
- package/dist/types/lib/syntax/registry.d.ts +37 -0
- package/dist/types/lib/syntax/tokenize.d.ts +17 -0
- package/dist/types/lib/syntax/types.d.ts +119 -0
- package/dist/types/lib/time/index.d.ts +4 -0
- package/dist/types/lib/time/instant.d.ts +2 -0
- package/dist/types/lib/time/plain.d.ts +61 -0
- package/dist/types/lib/time/relativeAge.d.ts +18 -0
- package/dist/types/lib/time/relativeClock.d.ts +8 -0
- package/dist/types/lib/time/types.d.ts +87 -0
- package/dist/types/lib/time/zone.d.ts +106 -0
- package/dist/types/lib/use-controllable.d.ts +14 -0
- package/dist/types/lib/use-fill-height.d.ts +26 -0
- package/dist/types/lib/use-hydrated.d.ts +8 -0
- package/dist/types/lib/use-media-query.d.ts +29 -0
- package/dist/types/lib/use-relabel-base-ui-dismiss.d.ts +6 -0
- package/dist/types/lib/use-release-snap-drag.d.ts +25 -0
- package/dist/types/lib/use-roving-options.d.ts +10 -0
- package/dist/types/lib/values/absent.d.ts +7 -0
- package/dist/types/lib/values/boolean.d.ts +29 -0
- package/dist/types/lib/values/currency.d.ts +22 -0
- package/dist/types/lib/values/date.d.ts +30 -0
- package/dist/types/lib/values/datetime.d.ts +48 -0
- package/dist/types/lib/values/index.d.ts +5 -0
- package/dist/types/lib/values/locale-date.d.ts +34 -0
- package/dist/types/lib/values/number.d.ts +27 -0
- package/dist/types/pure.d.ts +48 -0
- package/package.json +136 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scale.js","sources":["../../../src/lib/date-timeline/scale.ts"],"sourcesContent":["/* ----------------------------------------------------------------------------\n THE ARITHMETIC OF THE TIMELINE (DXUI-45) — pure functions, no React, so the\n axis is tested as numbers and not as pixels.\n\n EVERYTHING IS A \"DAY NUMBER\": whole local calendar days since 1970-01-01 plus\n the fraction of the local day elapsed. A daylight-saving day is therefore\n still exactly one unit wide, and a bar's x never depends on the viewer's UTC\n offset. Unit starts (week, month, quarter) are whole day numbers.\n\n WHY NOT `lib/time/plain.ts`: its plain dates are whole days. A bar starts and ends at an\n instant, so the axis needs the fraction of the day as well, and a day number carries it.\n -------------------------------------------------------------------------- */\n\nimport { DAY_MS } from \"@/components/chart/time-series-scale\";\n\n/** The unit one axis tick spans; it follows the scale (`tickUnitFor`), nobody picks it. */\nexport type DateTimelineUnit = \"days\" | \"weeks\" | \"months\" | \"quarters\";\n\n/** The scale limits, in horizontal pixels per calendar day (DXUI-61): a year is 365px at the least and 43,800px at the most. */\nexport const MIN_PX_PER_DAY = 1;\nexport const MAX_PX_PER_DAY = 120;\n/** The scale a timeline opens at and Ctrl + 0 returns to: about 365px a month. */\nexport const DEFAULT_PX_PER_DAY = 12;\n\n/** Pixels per day from which the axis ticks by day, by week and by month; below the month threshold it ticks by quarter. A tick is never narrower than a label needs. */\nconst DAY_FROM_PX = 60;\nconst WEEK_FROM_PX = 20;\nconst MONTH_FROM_PX = 5;\n\n/** The tick unit the axis uses at this scale. */\nexport function tickUnitFor(pxPerDay: number): DateTimelineUnit {\n if (pxPerDay >= DAY_FROM_PX) return \"days\";\n if (pxPerDay >= WEEK_FROM_PX) return \"weeks\";\n if (pxPerDay >= MONTH_FROM_PX) return \"months\";\n return \"quarters\";\n}\n\n/** A scale outside the limits, or not a number, is a caller's bug and throws. */\nexport function assertPxPerDay(pxPerDay: number): void {\n if (!Number.isFinite(pxPerDay) || pxPerDay < MIN_PX_PER_DAY || pxPerDay > MAX_PX_PER_DAY) {\n throw new Error(`timeline: pxPerDay must be a number from ${MIN_PX_PER_DAY} to ${MAX_PX_PER_DAY}`);\n }\n}\n\n/** `pxPerDay` held inside the limits. */\nexport function clampPxPerDay(pxPerDay: number): number {\n return Math.min(MAX_PX_PER_DAY, Math.max(MIN_PX_PER_DAY, pxPerDay));\n}\n\n/** `pxPerDay` times `factor`, held inside the limits. */\nexport function scalePxPerDay(pxPerDay: number, factor: number): number {\n return clampPxPerDay(pxPerDay * factor);\n}\n\n/** The slider runs 0..100 along the log of the scale, so each step is the same percentage of zoom. */\nexport const ZOOM_SLIDER_MAX = 100;\nconst LOG_SPAN = Math.log(MAX_PX_PER_DAY / MIN_PX_PER_DAY);\n\nexport function pxPerDayToSlider(pxPerDay: number): number {\n return (Math.log(pxPerDay / MIN_PX_PER_DAY) / LOG_SPAN) * ZOOM_SLIDER_MAX;\n}\n\nexport function sliderToPxPerDay(value: number): number {\n return clampPxPerDay(MIN_PX_PER_DAY * Math.exp((value / ZOOM_SLIDER_MAX) * LOG_SPAN));\n}\n\n/** `WheelEvent.deltaMode` values for a wheel that reports lines or pages, and the pixels each stands for. */\nconst WHEEL_DELTA_LINE = 1;\nconst WHEEL_DELTA_PAGE = 2;\nconst WHEEL_LINE_PX = 16;\nconst WHEEL_PAGE_PX = 400;\n/** Wheel sensitivity: the natural-log change of the scale per pixel of wheel movement (a 100px notch is e^0.2, about 22%). */\nconst WHEEL_ZOOM_PER_PX = 0.002;\n\n/** The scale after a mouse-wheel (or pinch) movement of `deltaY` px (`deltaMode`: 0 pixels, 1 lines, 2 pages): a 100px notch is about 22%. Scrolling up zooms in. */\nexport function wheelZoomFactor(deltaY: number, deltaMode: number): number {\n const px = deltaMode === WHEEL_DELTA_LINE ? deltaY * WHEEL_LINE_PX : deltaMode === WHEEL_DELTA_PAGE ? deltaY * WHEEL_PAGE_PX : deltaY;\n return Math.exp(-px * WHEEL_ZOOM_PER_PX);\n}\n\n/** One press of Ctrl + plus (or minus, its inverse). */\nexport const KEY_ZOOM_FACTOR = 1.25;\n\n/** The `scrollLeft` that keeps `day` at `viewportX` (px from the scroller's left edge, label column included). Never negative. */\nexport function scrollLeftForAnchor(day: number, rangeStartDay: number, pxPerDay: number, labelWidth: number, viewportX: number): number {\n return Math.max(0, labelWidth + dayToX(day, rangeStartDay, pxPerDay) - viewportX);\n}\n\n/** The day number under `viewportX` (px from the scroller's left edge) at this scroll position. */\nexport function dayAtViewportX(viewportX: number, scrollLeft: number, rangeStartDay: number, pxPerDay: number, labelWidth: number): number {\n return rangeStartDay + (scrollLeft + viewportX - labelWidth) / pxPerDay;\n}\n\nexport interface DateTimelineSpan {\n start: Date;\n end: Date;\n /** A second end instant drawn as its own marker (DXUI-60); the axis extends to hold it. */\n plannedEnd?: Date;\n}\n\nexport interface DayRange {\n /** First day number of the axis: a unit start. */\n startDay: number;\n /** Day number the axis ends at (exclusive): a unit start. */\n endDay: number;\n}\n\nexport interface Tick {\n /** Day number of the unit's first day. */\n startDay: number;\n /** Day number of the next unit's first day. */\n endDay: number;\n /** Left edge in px from the axis start. */\n x: number;\n width: number;\n}\n\n/** Local calendar day number of `date`, with the elapsed fraction of the local day. */\nexport function toDayNumber(date: Date): number {\n const time = date.getTime();\n if (!Number.isFinite(time)) throw new Error(\"timeline: an invalid Date reached the date axis\");\n const whole = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()) / DAY_MS;\n const ms = ((date.getHours() * 60 + date.getMinutes()) * 60 + date.getSeconds()) * 1000 + date.getMilliseconds();\n return whole + ms / DAY_MS;\n}\n\n/** The local midnight Date that opens the day with this number. */\nexport function fromDayNumber(day: number): Date {\n const utc = new Date(Math.floor(day) * DAY_MS);\n return new Date(utc.getUTCFullYear(), utc.getUTCMonth(), utc.getUTCDate());\n}\n\nfunction utcParts(day: number): { year: number; month: number; weekday: number } {\n const d = new Date(Math.floor(day) * DAY_MS);\n return { year: d.getUTCFullYear(), month: d.getUTCMonth(), weekday: d.getUTCDay() };\n}\n\nconst dayOf = (year: number, month: number) => Date.UTC(year, month, 1) / DAY_MS;\n\n/** The first day of the unit holding `day`. `weekStartsOn`: 0 = Sunday ... 6 = Saturday. */\nexport function unitStart(day: number, unit: DateTimelineUnit, weekStartsOn: number): number {\n const { year, month, weekday } = utcParts(day);\n if (unit === \"days\") return Math.floor(day);\n if (unit === \"weeks\") return Math.floor(day) - ((weekday - weekStartsOn + 7) % 7);\n if (unit === \"months\") return dayOf(year, month);\n return dayOf(year, month - (month % 3));\n}\n\n/** The first day of the unit after the one that starts at `start`. */\nexport function nextUnitStart(start: number, unit: DateTimelineUnit): number {\n if (unit === \"days\") return start + 1;\n if (unit === \"weeks\") return start + 7;\n const { year, month } = utcParts(start);\n return dayOf(year, month + (unit === \"months\" ? 1 : 3));\n}\n\n/** Calendar quarter (1-4) of the day. */\nexport function quarterOf(day: number): number {\n return Math.floor(utcParts(day).month / 3) + 1;\n}\n\nexport function yearOf(day: number): number {\n return utcParts(day).year;\n}\n\nfunction assertSpanOrder(from: number, to: number): void {\n if (to < from) throw new Error(\"timeline: an item ends before it starts\");\n}\n\n/** Units of air before and after the items: the axis is never so short that a zoom cannot keep its anchor still. */\nconst AIR_UNITS: Record<DateTimelineUnit, number> = { days: 14, weeks: 2, months: 1, quarters: 1 };\n\n/**\n * The axis range for these items and today: from the earliest start or today to the latest end or today, widened to\n * whole units with `AIR_UNITS` of air around, so every bar and the today line sit inside it.\n * A bar is drawn at its true length (DXUI-60), so only the dates decide the range; a `plannedEnd` counts like an end.\n * An item that ends before it starts is a caller's bug and throws.\n */\nexport function timelineRange(\n spans: readonly DateTimelineSpan[],\n today: Date,\n unit: DateTimelineUnit,\n weekStartsOn: number,\n markerDates: readonly Date[] = [],\n): DayRange {\n const todayDay = toDayNumber(today);\n let min = todayDay;\n let max = todayDay;\n for (const date of markerDates) {\n const markerDay = toDayNumber(date);\n min = Math.min(min, markerDay);\n max = Math.max(max, markerDay);\n }\n for (const span of spans) {\n const from = toDayNumber(span.start);\n const to = toDayNumber(span.end);\n assertSpanOrder(from, to);\n min = Math.min(min, from);\n max = Math.max(max, to);\n if (span.plannedEnd) {\n const planned = toDayNumber(span.plannedEnd);\n min = Math.min(min, planned);\n max = Math.max(max, planned);\n }\n }\n let startDay = unitStart(min, unit, weekStartsOn);\n let endDay = nextUnitStart(unitStart(max, unit, weekStartsOn), unit);\n for (let i = 0; i < AIR_UNITS[unit]; i++) {\n startDay = unitStart(startDay - 1, unit, weekStartsOn);\n endDay = nextUnitStart(endDay, unit);\n }\n return { startDay, endDay };\n}\n\n/** Pixel x of a day number on an axis that starts at `rangeStartDay`. */\nexport function dayToX(day: number, rangeStartDay: number, pxPerDay: number): number {\n return (day - rangeStartDay) * pxPerDay;\n}\n\n/** The axis width in px. */\nexport function trackWidth(range: DayRange, pxPerDay: number): number {\n return dayToX(range.endDay, range.startDay, pxPerDay);\n}\n\n/** One tick per unit across the range, each with its pixel box. */\nexport function unitTicks(range: DayRange, unit: DateTimelineUnit, pxPerDay: number): Tick[] {\n const ticks: Tick[] = [];\n for (let start = range.startDay; start < range.endDay; ) {\n const end = nextUnitStart(start, unit);\n ticks.push({ startDay: start, endDay: end, x: dayToX(start, range.startDay, pxPerDay), width: (end - start) * pxPerDay });\n start = end;\n }\n return ticks;\n}\n\n/** Pixel x of an instant on an axis that starts at `rangeStartDay`. */\nexport function instantToX(date: Date, rangeStartDay: number, pxPerDay: number): number {\n return dayToX(toDayNumber(date), rangeStartDay, pxPerDay);\n}\n\n/** Where an item's bar sits: from the x of its start to the x of its end, its true length at any scale. */\nexport function barBox(span: DateTimelineSpan, range: DayRange, pxPerDay: number): { left: number; width: number } {\n assertSpanOrder(toDayNumber(span.start), toDayNumber(span.end));\n const left = instantToX(span.start, range.startDay, pxPerDay);\n return { left, width: instantToX(span.end, range.startDay, pxPerDay) - left };\n}\n\n/** `date` moved `days` whole calendar days, keeping its time of day (a daylight-saving day is still one day). */\nexport function addDays(date: Date, days: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days, date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n}\n\n/** What a drag or key press changes: the whole bar, only its end, or only its start. */\nexport type DateTimelineEdit = \"move\" | \"end\" | \"start\";\n\n/**\n * The span after `days` whole days of `edit` (DXUI-60): \"move\" shifts both ends; \"end\" and \"start\" shift one and\n * stop at the other end, so a bar never inverts. Returns the original dates unchanged for 0 days.\n */\nexport function editSpan(span: { start: Date; end: Date }, edit: DateTimelineEdit, days: number): { start: Date; end: Date } {\n if (!Number.isInteger(days)) throw new Error(\"timeline: an edit is a whole number of days\");\n const length = toDayNumber(span.end) - toDayNumber(span.start);\n if (edit === \"move\") return { start: addDays(span.start, days), end: addDays(span.end, days) };\n if (edit === \"end\") return { start: span.start, end: addDays(span.end, Math.max(days, Math.ceil(-length))) };\n return { start: addDays(span.start, Math.min(days, Math.floor(length))), end: span.end };\n}\n\n/**\n * `days` limited so a marker moved by it (DXUI-67) stays on the axis: the axis is built from the markers' own dates, so a drag\n * must not carry one past its ends. Whole days in, whole days out.\n */\nexport function clampMarkerDays(date: Date, days: number, range: DayRange): number {\n const day = toDayNumber(date);\n return Math.min(Math.max(days, range.startDay - day), range.endDay - 1 - day);\n}\n\n/** The `scrollLeft` that puts x (a px offset on the axis) in the middle of the date area: `viewportWidth` wide, less the sticky label column. Never negative. */\nexport function scrollLeftToCenter(x: number, viewportWidth: number, labelWidth: number): number {\n return Math.max(0, x - (viewportWidth - labelWidth) / 2);\n}\n\n/** A progress value clamped to 0..1; NaN is a caller's bug and throws. */\nexport function clampProgress(progress: number): number {\n if (Number.isNaN(progress)) throw new Error(\"timeline: progress is not a number\");\n return Math.min(1, Math.max(0, progress));\n}\n\n/** Throws on a marker with an invalid date or an id another marker already uses. */\nexport function assertMarkers(markers: readonly { id: string; date: Date }[]): void {\n const seen = new Set<string>();\n for (const marker of markers) {\n if (Number.isNaN(marker.date.getTime())) throw new Error(`timeline: marker \"${marker.id}\" has an invalid date`);\n if (seen.has(marker.id)) throw new Error(`timeline: two markers share the id \"${marker.id}\"`);\n seen.add(marker.id);\n }\n}\n\nexport interface MarkerTagPlacement {\n /** Index of the marker in the input. */\n index: number;\n /** Left edge of the tag in the track, px: centred on the line, then clamped inside [0, trackWidth - width]. */\n left: number;\n /** Row, 0 = the one nearest the dates; a tag overlapping (or within `gap` of) an earlier one on a row moves to the next. */\n row: number;\n}\n\n/**\n * Places each marker's header tag (DXUI-64). A tag is centred on its line, clamped so it never leaves the track (the line\n * stays on its date), and stacked in rows so two tags never overlap or touch closer than `gap`.\n */\nexport function layoutMarkerTags(\n tags: readonly { x: number; width: number }[],\n trackWidth: number,\n gap: number,\n): MarkerTagPlacement[] {\n const rowEnds: number[] = [];\n return tags\n .map((tag, index) => ({ ...tag, index }))\n .sort((a, b) => a.x - b.x || a.index - b.index)\n .map(({ x, width, index }) => {\n const left = Math.min(Math.max(x - width / 2, 0), Math.max(trackWidth - width, 0));\n let row = rowEnds.findIndex((end) => end + gap <= left);\n if (row < 0) row = rowEnds.length;\n rowEnds[row] = left + width;\n return { index, left, row };\n });\n}\n\n/** The tag row's top, in px relative to the date header: row 0 sits directly above the dates and each further row one `rowPx` higher. */\nexport function markerTagTop(row: number, rowPx: number): number {\n return -(row + 1) * rowPx;\n}\n\nexport interface MarkerFlagPlacement {\n /** Index of the marker in the input. */\n index: number;\n /** Lane, 0 = the one nearest the top of the band. */\n lane: number;\n /** The flag's width, cut short when the next flag in its lane would otherwise run into it; never below `minWidth`. */\n maxWidth: number;\n}\n\n/**\n * Places each marker's flag in the Phases band above the date header (DXUI-68). Flags go left to right: each takes the first lane\n * whose last flag has ended `gap` px before it, else the lane that frees up soonest. A flag that runs into the next one in its lane\n * is cut short to the room before that one, so no flag is ever drawn over another.\n */\nexport function layoutMarkerFlags(\n flags: readonly { x: number; width: number }[],\n lanes: number,\n gap: number,\n minWidth: number,\n): MarkerFlagPlacement[] {\n const laneEnds: number[] = Array.from({ length: lanes }, () => -Infinity);\n const lastInLane: ({ x: number; maxWidth: number; index: number } | undefined)[] = Array.from({ length: lanes });\n const placed: { x: number; maxWidth: number; index: number; lane: number }[] = [];\n flags\n .map((flag, index) => ({ ...flag, index }))\n .sort((a, b) => a.x - b.x || a.index - b.index)\n .forEach(({ x, width, index }) => {\n let lane = laneEnds.findIndex((end) => end + gap <= x);\n if (lane === -1) lane = laneEnds.indexOf(Math.min(...laneEnds));\n const prev = lastInLane[lane];\n if (prev && prev.x + prev.maxWidth + gap > x) prev.maxWidth = Math.max(minWidth, x - prev.x - gap);\n const entry = { x, maxWidth: width, index, lane };\n placed.push(entry);\n lastInLane[lane] = entry;\n laneEnds[lane] = x + width;\n });\n return placed.sort((a, b) => a.index - b.index).map(({ index, lane, maxWidth }) => ({ index, lane, maxWidth }));\n}\n"],"names":["MIN_PX_PER_DAY","MAX_PX_PER_DAY","DEFAULT_PX_PER_DAY","DAY_FROM_PX","WEEK_FROM_PX","MONTH_FROM_PX","tickUnitFor","pxPerDay","assertPxPerDay","clampPxPerDay","scalePxPerDay","factor","ZOOM_SLIDER_MAX","LOG_SPAN","pxPerDayToSlider","sliderToPxPerDay","value","WHEEL_DELTA_LINE","WHEEL_DELTA_PAGE","WHEEL_LINE_PX","WHEEL_PAGE_PX","WHEEL_ZOOM_PER_PX","wheelZoomFactor","deltaY","deltaMode","px","KEY_ZOOM_FACTOR","scrollLeftForAnchor","day","rangeStartDay","labelWidth","viewportX","dayToX","dayAtViewportX","scrollLeft","toDayNumber","date","time","whole","DAY_MS","ms","fromDayNumber","utc","utcParts","d","dayOf","year","month","unitStart","unit","weekStartsOn","weekday","nextUnitStart","start","quarterOf","yearOf","assertSpanOrder","from","to","AIR_UNITS","timelineRange","spans","today","markerDates","todayDay","min","max","markerDay","span","planned","startDay","endDay","i","trackWidth","range","unitTicks","ticks","end","instantToX","barBox","left","addDays","days","editSpan","edit","length","clampMarkerDays","scrollLeftToCenter","x","viewportWidth","clampProgress","progress","assertMarkers","markers","seen","marker","layoutMarkerTags","tags","gap","rowEnds","tag","index","a","b","width","row","markerTagTop","rowPx","layoutMarkerFlags","flags","lanes","minWidth","laneEnds","lastInLane","placed","flag","lane","prev","entry","maxWidth"],"mappings":";AAmBO,MAAMA,IAAiB,GACjBC,IAAiB,KAEjBC,IAAqB,IAG5BC,IAAc,IACdC,IAAe,IACfC,IAAgB;AAGf,SAASC,EAAYC,GAAoC;AAC9D,SAAIA,KAAYJ,IAAoB,SAChCI,KAAYH,IAAqB,UACjCG,KAAYF,IAAsB,WAC/B;AACT;AAGO,SAASG,EAAeD,GAAwB;AACrD,MAAI,CAAC,OAAO,SAASA,CAAQ,KAAKA,IAAWP,KAAkBO,IAAWN;AACxE,UAAM,IAAI,MAAM,4CAA4CD,CAAc,OAAOC,CAAc,EAAE;AAErG;AAGO,SAASQ,EAAcF,GAA0B;AACtD,SAAO,KAAK,IAAIN,GAAgB,KAAK,IAAID,GAAgBO,CAAQ,CAAC;AACpE;AAGO,SAASG,EAAcH,GAAkBI,GAAwB;AACtE,SAAOF,EAAcF,IAAWI,CAAM;AACxC;AAGO,MAAMC,IAAkB,KACzBC,IAAW,KAAK,IAAIZ,IAAiBD,CAAc;AAElD,SAASc,EAAiBP,GAA0B;AACzD,SAAQ,KAAK,I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UAAMoB,IAAQ,EAAE,GAAA9B,GAAG,UAAUgB,GAAO,OAAAH,GAAO,MAAAe,EAAA;AAC3C,IAAAF,EAAO,KAAKI,CAAK,GACjBL,EAAWG,CAAI,IAAIE,GACnBN,EAASI,CAAI,IAAI5B,IAAIgB;AAAA,EACvB,CAAC,GACIU,EAAO,KAAK,CAAC,GAAGX,MAAM,EAAE,QAAQA,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,OAAAF,GAAO,MAAAe,GAAM,UAAAG,EAAA,OAAgB,EAAE,OAAAlB,GAAO,MAAAe,GAAM,UAAAG,EAAA,EAAW;AAChH;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { THEMES as u } from "../preference-values.js";
|
|
2
|
+
import { danxMiniAppScript as p } from "./mini-app-script.js";
|
|
3
|
+
import { APPEARANCE_ATTRIBUTES as d } from "./protocol.js";
|
|
4
|
+
const s = "default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; media-src data: blob:; connect-src 'none'; form-action 'none'; base-uri 'none'";
|
|
5
|
+
function l(t) {
|
|
6
|
+
const e = t.createElement("meta");
|
|
7
|
+
return e.setAttribute("http-equiv", "Content-Security-Policy"), e.setAttribute("content", s), e;
|
|
8
|
+
}
|
|
9
|
+
const f = u.map(
|
|
10
|
+
(t) => `:root[data-theme="${t}"]{color-scheme:${t}}`
|
|
11
|
+
).join("");
|
|
12
|
+
function S(t) {
|
|
13
|
+
const e = t.createElement("style");
|
|
14
|
+
return e.textContent = f, e;
|
|
15
|
+
}
|
|
16
|
+
function E(t, e) {
|
|
17
|
+
const r = t.createElement("script");
|
|
18
|
+
return r.textContent = p(e), r;
|
|
19
|
+
}
|
|
20
|
+
function y(t) {
|
|
21
|
+
return (t.doctype ? new XMLSerializer().serializeToString(t.doctype) : "") + t.documentElement.outerHTML;
|
|
22
|
+
}
|
|
23
|
+
function g(t, e, r) {
|
|
24
|
+
if (typeof t != "string" || t.trim() === "")
|
|
25
|
+
throw new Error("SandboxedFrame: html must be a non-empty string");
|
|
26
|
+
const n = new DOMParser().parseFromString(t, "text/html");
|
|
27
|
+
n.head.prepend(E(n, r)), n.head.prepend(S(n)), n.head.prepend(l(n));
|
|
28
|
+
for (const [a, m] of Object.entries(d)) {
|
|
29
|
+
const c = e[a];
|
|
30
|
+
c !== void 0 && n.documentElement.setAttribute(`data-${m}`, c);
|
|
31
|
+
}
|
|
32
|
+
const i = y(n), o = new DOMParser().parseFromString(i, "text/html").head.firstElementChild;
|
|
33
|
+
if (!o || o.tagName !== "META" || o.getAttribute("http-equiv") !== "Content-Security-Policy" || o.getAttribute("content") !== s)
|
|
34
|
+
throw new Error(
|
|
35
|
+
"SandboxedFrame: the Content-Security-Policy was not first in the document head; refusing to render"
|
|
36
|
+
);
|
|
37
|
+
return i;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
f as DESIGN_FRAME_COLOR_SCHEME_CSS,
|
|
41
|
+
s as DESIGN_FRAME_CSP,
|
|
42
|
+
g as prepareDesignDocument
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=document.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"document.js","sources":["../../../src/lib/design-frame/document.ts"],"sourcesContent":["import { THEMES } from \"../preference-values\";\nimport { danxMiniAppScript } from \"./mini-app-script\";\nimport { APPEARANCE_ATTRIBUTES, type DesignFrameAppearance } from \"./protocol\";\n\n/**\n * Turns an untrusted single-file HTML document into the one string a\n * `SandboxedFrame` hands the browser as `srcdoc` (DX-4075).\n */\n\n/**\n * What the framed document may do: run its own inline script and style, and show\n * data:/blob: media. It may not fetch, submit, set a base, or load anything by URL.\n */\nexport const DESIGN_FRAME_CSP =\n \"default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; media-src data: blob:; connect-src 'none'; form-action 'none'; base-uri 'none'\";\n\nfunction cspMeta(doc: Document): HTMLMetaElement {\n const meta = doc.createElement(\"meta\");\n meta.setAttribute(\"http-equiv\", \"Content-Security-Policy\");\n meta.setAttribute(\"content\", DESIGN_FRAME_CSP);\n return meta;\n}\n\n/**\n * DX-4693: the framed document declares the colour-scheme of the theme it mirrors. The host\n * `<iframe>` element takes its colour-scheme from the host page; a framed document that declares\n * none is `normal` (light), and under that mismatch Chromium paints an opaque backdrop that can\n * hide the design entirely (reproduced in Electron's Chromium and real Chrome). The declaration is\n * keyed on the `data-theme` attribute, so the frame follows a live flip: the injected mini-app script\n * writes that attribute with every appearance the host posts.\n */\nexport const DESIGN_FRAME_COLOR_SCHEME_CSS = THEMES.map(\n (theme) => `:root[data-theme=\"${theme}\"]{color-scheme:${theme}}`,\n).join(\"\");\n\nfunction colorSchemeStyle(doc: Document): HTMLStyleElement {\n const style = doc.createElement(\"style\");\n style.textContent = DESIGN_FRAME_COLOR_SCHEME_CSS;\n return style;\n}\n\nfunction miniAppScript(doc: Document, docId: string): HTMLScriptElement {\n const script = doc.createElement(\"script\");\n script.textContent = danxMiniAppScript(docId);\n return script;\n}\n\nfunction serialize(doc: Document): string {\n const doctype = doc.doctype ? new XMLSerializer().serializeToString(doc.doctype) : \"\";\n return doctype + doc.documentElement.outerHTML;\n}\n\n/**\n * The policy is inserted by PARSING, never by string or regex surgery: text\n * placed after the first literal `<head>` is defeated by a decoy earlier in the\n * document (`<!-- <head> -->`, or the word in a script string), which would leave\n * the REAL head with no policy. The HTML parser always synthesises a head, so\n * `prepend` has somewhere to put it; whether the author wrote an explicit\n * `<head>` is not decidable here.\n *\n * THE RESULT IS SELF-VERIFIED: the serialised document is parsed once more and\n * this throws unless the first element of its head is the policy, exactly. A\n * document is never rendered unprotected.\n *\n * `docId` is the id the injected script puts on every height message, so the host can drop a report from a\n * document it has since replaced (DXUI-6).\n *\n * The host's `appearance` is stamped on the framed `<html>` here, so the frame\n * paints in the right theme from its first frame, with the matching color-scheme\n * declared right behind the policy (DX-4693).\n */\nexport function prepareDesignDocument(html: unknown, appearance: DesignFrameAppearance, docId: string): string {\n if (typeof html !== \"string\" || html.trim() === \"\") {\n throw new Error(\"SandboxedFrame: html must be a non-empty string\");\n }\n\n const doc = new DOMParser().parseFromString(html, \"text/html\");\n /* DXUI-6: the mini-app script goes right behind the policy and the colour-scheme style, ahead of every page script. */\n doc.head.prepend(miniAppScript(doc, docId));\n doc.head.prepend(colorSchemeStyle(doc));\n doc.head.prepend(cspMeta(doc));\n for (const [field, attribute] of Object.entries(APPEARANCE_ATTRIBUTES)) {\n const value = appearance[field as keyof DesignFrameAppearance];\n if (value !== undefined) doc.documentElement.setAttribute(`data-${attribute}`, value);\n }\n const out = serialize(doc);\n\n const first = new DOMParser().parseFromString(out, \"text/html\").head.firstElementChild;\n if (\n !first ||\n first.tagName !== \"META\" ||\n first.getAttribute(\"http-equiv\") !== \"Content-Security-Policy\" ||\n first.getAttribute(\"content\") !== DESIGN_FRAME_CSP\n ) {\n throw new Error(\n \"SandboxedFrame: the Content-Security-Policy was not first in the document head; refusing to render\",\n );\n }\n return out;\n}\n"],"names":["DESIGN_FRAME_CSP","cspMeta","doc","meta","DESIGN_FRAME_COLOR_SCHEME_CSS","THEMES","theme","colorSchemeStyle","style","miniAppScript","docId","script","danxMiniAppScript","serialize","prepareDesignDocument","html","appearance","field","attribute","APPEARANCE_ATTRIBUTES","value","out","first"],"mappings":";;;AAaO,MAAMA,IACX;AAEF,SAASC,EAAQC,GAAgC;AAC/C,QAAMC,IAAOD,EAAI,cAAc,MAAM;AACrC,SAAAC,EAAK,aAAa,cAAc,yBAAyB,GACzDA,EAAK,aAAa,WAAWH,CAAgB,GACtCG;AACT;AAUO,MAAMC,IAAgCC,EAAO;AAAA,EAClD,CAACC,MAAU,qBAAqBA,CAAK,mBAAmBA,CAAK;AAC/D,EAAE,KAAK,EAAE;AAET,SAASC,EAAiBL,GAAiC;AACzD,QAAMM,IAAQN,EAAI,cAAc,OAAO;AACvC,SAAAM,EAAM,cAAcJ,GACbI;AACT;AAEA,SAASC,EAAcP,GAAeQ,GAAkC;AACtE,QAAMC,IAAST,EAAI,cAAc,QAAQ;AACzC,SAAAS,EAAO,cAAcC,EAAkBF,CAAK,GACrCC;AACT;AAEA,SAASE,EAAUX,GAAuB;AAExC,UADgBA,EAAI,UAAU,IAAI,gBAAgB,kBAAkBA,EAAI,OAAO,IAAI,MAClEA,EAAI,gBAAgB;AACvC;AAqBO,SAASY,EAAsBC,GAAeC,GAAmCN,GAAuB;AAC7G,MAAI,OAAOK,KAAS,YAAYA,EAAK,KAAA,MAAW;AAC9C,UAAM,IAAI,MAAM,iDAAiD;AAGnE,QAAMb,IAAM,IAAI,UAAA,EAAY,gBAAgBa,GAAM,WAAW;AAE7D,EAAAb,EAAI,KAAK,QAAQO,EAAcP,GAAKQ,CAAK,CAAC,GAC1CR,EAAI,KAAK,QAAQK,EAAiBL,CAAG,CAAC,GACtCA,EAAI,KAAK,QAAQD,EAAQC,CAAG,CAAC;AAC7B,aAAW,CAACe,GAAOC,CAAS,KAAK,OAAO,QAAQC,CAAqB,GAAG;AACtE,UAAMC,IAAQJ,EAAWC,CAAoC;AAC7D,IAAIG,MAAU,UAAWlB,EAAI,gBAAgB,aAAa,QAAQgB,CAAS,IAAIE,CAAK;AAAA,EACtF;AACA,QAAMC,IAAMR,EAAUX,CAAG,GAEnBoB,IAAQ,IAAI,YAAY,gBAAgBD,GAAK,WAAW,EAAE,KAAK;AACrE,MACE,CAACC,KACDA,EAAM,YAAY,UAClBA,EAAM,aAAa,YAAY,MAAM,6BACrCA,EAAM,aAAa,SAAS,MAAMtB;AAElC,UAAM,IAAI;AAAA,MACR;AAAA,IAAA;AAGJ,SAAOqB;AACT;"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { MOTION as t, SCALES as r, CONTRAST as n, THEMES as i } from "../preference-values.js";
|
|
2
|
+
import { DESIGN_FRAME_ERROR_MAX_LENGTH as o, DESIGN_FRAME_APPEARANCE as a, APPEARANCE_ATTRIBUTES as s, DESIGN_FRAME_READY as d, DESIGN_FRAME_ERROR as l, DESIGN_FRAME_HEIGHT as u } from "./protocol.js";
|
|
3
|
+
function p(e) {
|
|
4
|
+
return JSON.stringify(e).replace(/</g, "\\u003c").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
|
|
5
|
+
}
|
|
6
|
+
const f = {
|
|
7
|
+
theme: i,
|
|
8
|
+
contrast: n,
|
|
9
|
+
uiScale: r,
|
|
10
|
+
motion: t
|
|
11
|
+
};
|
|
12
|
+
function g(e) {
|
|
13
|
+
return `(function () {
|
|
14
|
+
var DOC = ${p(e)};
|
|
15
|
+
var parentWindow = window.parent;
|
|
16
|
+
var APPEARANCE = ${JSON.stringify(a)};
|
|
17
|
+
var ATTRS = ${JSON.stringify(s)};
|
|
18
|
+
var DOMAINS = ${JSON.stringify(f)};
|
|
19
|
+
var MAX = ${o};
|
|
20
|
+
var root = document.documentElement;
|
|
21
|
+
var held = false;
|
|
22
|
+
var readySent = false;
|
|
23
|
+
var listeners = [];
|
|
24
|
+
|
|
25
|
+
function post(message) { parentWindow.postMessage(message, "*"); }
|
|
26
|
+
function text(value) { return String(value).slice(0, MAX); }
|
|
27
|
+
|
|
28
|
+
function ready() {
|
|
29
|
+
if (readySent) return;
|
|
30
|
+
readySent = true;
|
|
31
|
+
post({ type: ${JSON.stringify(d)} });
|
|
32
|
+
}
|
|
33
|
+
function reportError(message) { post({ type: ${JSON.stringify(l)}, message: text(message) }); }
|
|
34
|
+
|
|
35
|
+
function apply(attribute, value) {
|
|
36
|
+
if (root.getAttribute("data-" + attribute) === value) return;
|
|
37
|
+
root.setAttribute("data-motion-suspend", "");
|
|
38
|
+
root.setAttribute("data-" + attribute, value);
|
|
39
|
+
void getComputedStyle(root).backgroundColor;
|
|
40
|
+
root.removeAttribute("data-motion-suspend");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
window.addEventListener("message", function (event) {
|
|
44
|
+
var data = event.data;
|
|
45
|
+
if (event.source !== parentWindow || !data || data.type !== APPEARANCE) return;
|
|
46
|
+
var applied = {};
|
|
47
|
+
var fields = Object.keys(ATTRS);
|
|
48
|
+
for (var i = 0; i < fields.length; i++) {
|
|
49
|
+
var value = data[fields[i]];
|
|
50
|
+
if (value === undefined) continue;
|
|
51
|
+
if (typeof value !== "string" || DOMAINS[fields[i]].indexOf(value) < 0) return;
|
|
52
|
+
}
|
|
53
|
+
for (var j = 0; j < fields.length; j++) {
|
|
54
|
+
var next = data[fields[j]];
|
|
55
|
+
if (next === undefined) continue;
|
|
56
|
+
apply(ATTRS[fields[j]], next);
|
|
57
|
+
applied[fields[j]] = next;
|
|
58
|
+
}
|
|
59
|
+
listeners.slice().forEach(function (callback) { callback(applied); });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
window.addEventListener("error", function (event) {
|
|
63
|
+
reportError(event.message || (event.error && event.error.message) || "Uncaught error");
|
|
64
|
+
});
|
|
65
|
+
/* DXUI-6: a null or undefined reason, or one with no message, would otherwise report "null" or "undefined". */
|
|
66
|
+
function rejectionText(reason) {
|
|
67
|
+
if (typeof reason === "string" && reason) return reason;
|
|
68
|
+
if (reason && reason.message) return reason.message;
|
|
69
|
+
return "Unhandled promise rejection";
|
|
70
|
+
}
|
|
71
|
+
window.addEventListener("unhandledrejection", function (event) {
|
|
72
|
+
reportError(rejectionText(event.reason));
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
window.addEventListener("load", function () { if (!held) ready(); });
|
|
76
|
+
|
|
77
|
+
var lastHeight = -1;
|
|
78
|
+
var lastViewport = -1;
|
|
79
|
+
function reportHeight() {
|
|
80
|
+
var height = Math.ceil(root.getBoundingClientRect().height);
|
|
81
|
+
var viewport = window.innerHeight;
|
|
82
|
+
if (height === lastHeight && viewport === lastViewport) return;
|
|
83
|
+
lastHeight = height;
|
|
84
|
+
lastViewport = viewport;
|
|
85
|
+
post({ type: ${JSON.stringify(u)}, height: height, viewport: viewport, doc: DOC });
|
|
86
|
+
}
|
|
87
|
+
new ResizeObserver(reportHeight).observe(root);
|
|
88
|
+
window.addEventListener("resize", reportHeight);
|
|
89
|
+
/* DXUI-6: a browser does not render an off-screen sandboxed frame, so ResizeObserver stays silent until the frame is
|
|
90
|
+
scrolled into view; the document still loads, so report once then (the dedupe drops it when nothing changed). */
|
|
91
|
+
window.addEventListener("load", reportHeight);
|
|
92
|
+
|
|
93
|
+
window.danxMiniApp = {
|
|
94
|
+
holdReady: function () { held = true; },
|
|
95
|
+
ready: ready,
|
|
96
|
+
reportError: reportError,
|
|
97
|
+
onAppearance: function (callback) {
|
|
98
|
+
listeners.push(callback);
|
|
99
|
+
return function () { listeners = listeners.filter(function (entry) { return entry !== callback; }); };
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
})();`;
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
g as danxMiniAppScript
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=mini-app-script.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mini-app-script.js","sources":["../../../src/lib/design-frame/mini-app-script.ts"],"sourcesContent":["import { CONTRAST, MOTION, SCALES, THEMES } from \"../preference-values\";\nimport {\n APPEARANCE_ATTRIBUTES,\n DESIGN_FRAME_APPEARANCE,\n DESIGN_FRAME_ERROR,\n DESIGN_FRAME_ERROR_MAX_LENGTH,\n DESIGN_FRAME_HEIGHT,\n DESIGN_FRAME_READY,\n} from \"./protocol\";\n\n/**\n * A JavaScript string literal for `value` that cannot end the `<script>` element it is serialised into: `<` is\n * written as an escape (so neither a closing tag nor a comment opener can appear), and so are the two line\n * separators that were not legal in a string literal before ES2019.\n */\nfunction scriptString(value: string): string {\n return JSON.stringify(value).replace(/</g, \"\\\\u003c\").replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\");\n}\n\nconst DOMAINS = {\n theme: THEMES,\n contrast: CONTRAST,\n uiScale: SCALES,\n motion: MOTION,\n};\n\n/**\n * DXUI-6: the script `prepareDesignDocument` injects into every framed page, which defines\n * `window.danxMiniApp`. The page installs nothing, so a repo on any version of this library, or on\n * another framework, gets the theme, ready, error reporting and height with no client code.\n *\n * It is a STRING, not a function serialised with `toString()`: a bundler or minifier may rewrite a\n * function's body (renamed helpers, hoisted imports), and this code must run alone in a document\n * that has none of the library. It is plain ES5 and dependency-free for the same reason, and the\n * protocol names and domains are interpolated from the host's own constants so the two sides\n * cannot drift. Nothing in it may contain a closing script tag or a comment opener, which would end\n * the element it is serialised into (pinned by `design-frame-mini-app.test.ts`).\n *\n * THE APPEARANCE WRITE MIRRORS `applyPreference` (`preference-values.ts`), including the forced\n * style read inside the `data-motion-suspend` window: without it a theme flip dissolves every\n * transition in the page instead of cutting. A value the frame already shows writes nothing (DX-5526).\n *\n * EVERY HEIGHT MESSAGE ALSO CARRIES `doc`, the id the host generated for this document. Setting `srcdoc` only starts\n * a navigation: the old document stays live, and shares its window object with the new one, until the new one\n * commits, so the host tells their reports apart by this id.\n *\n * EVERY HEIGHT MESSAGE CARRIES THE FRAME'S OWN VIEWPORT HEIGHT (`window.innerHeight`), and a viewport change alone is\n * reported (the `resize` event), so the host can tell a page whose height changed by itself from one whose height\n * only moved because the host resized the frame.\n *\n * THE HEIGHT IS THE `<html>` ELEMENT'S, not `scrollHeight`: `scrollHeight` is never below the\n * viewport, so a page could never shrink. A page whose root is `100vh` has an `<html>` as tall as the\n * frame, reports the frame's own height, and the host leaves it there.\n */\nexport function danxMiniAppScript(docId: string): string {\n // I18N-ALLOW: the injected script's own JavaScript source, run inside the framed page: code, not UI text.\n return `(function () {\n var DOC = ${scriptString(docId)};\n var parentWindow = window.parent;\n var APPEARANCE = ${JSON.stringify(DESIGN_FRAME_APPEARANCE)};\n var ATTRS = ${JSON.stringify(APPEARANCE_ATTRIBUTES)};\n var DOMAINS = ${JSON.stringify(DOMAINS)};\n var MAX = ${DESIGN_FRAME_ERROR_MAX_LENGTH};\n var root = document.documentElement;\n var held = false;\n var readySent = false;\n var listeners = [];\n\n function post(message) { parentWindow.postMessage(message, \"*\"); }\n function text(value) { return String(value).slice(0, MAX); }\n\n function ready() {\n if (readySent) return;\n readySent = true;\n post({ type: ${JSON.stringify(DESIGN_FRAME_READY)} });\n }\n function reportError(message) { post({ type: ${JSON.stringify(DESIGN_FRAME_ERROR)}, message: text(message) }); }\n\n function apply(attribute, value) {\n if (root.getAttribute(\"data-\" + attribute) === value) return;\n root.setAttribute(\"data-motion-suspend\", \"\");\n root.setAttribute(\"data-\" + attribute, value);\n void getComputedStyle(root).backgroundColor;\n root.removeAttribute(\"data-motion-suspend\");\n }\n\n window.addEventListener(\"message\", function (event) {\n var data = event.data;\n if (event.source !== parentWindow || !data || data.type !== APPEARANCE) return;\n var applied = {};\n var fields = Object.keys(ATTRS);\n for (var i = 0; i < fields.length; i++) {\n var value = data[fields[i]];\n if (value === undefined) continue;\n if (typeof value !== \"string\" || DOMAINS[fields[i]].indexOf(value) < 0) return;\n }\n for (var j = 0; j < fields.length; j++) {\n var next = data[fields[j]];\n if (next === undefined) continue;\n apply(ATTRS[fields[j]], next);\n applied[fields[j]] = next;\n }\n listeners.slice().forEach(function (callback) { callback(applied); });\n });\n\n window.addEventListener(\"error\", function (event) {\n reportError(event.message || (event.error && event.error.message) || \"Uncaught error\");\n });\n /* DXUI-6: a null or undefined reason, or one with no message, would otherwise report \"null\" or \"undefined\". */\n function rejectionText(reason) {\n if (typeof reason === \"string\" && reason) return reason;\n if (reason && reason.message) return reason.message;\n return \"Unhandled promise rejection\";\n }\n window.addEventListener(\"unhandledrejection\", function (event) {\n reportError(rejectionText(event.reason));\n });\n\n window.addEventListener(\"load\", function () { if (!held) ready(); });\n\n var lastHeight = -1;\n var lastViewport = -1;\n function reportHeight() {\n var height = Math.ceil(root.getBoundingClientRect().height);\n var viewport = window.innerHeight;\n if (height === lastHeight && viewport === lastViewport) return;\n lastHeight = height;\n lastViewport = viewport;\n post({ type: ${JSON.stringify(DESIGN_FRAME_HEIGHT)}, height: height, viewport: viewport, doc: DOC });\n }\n new ResizeObserver(reportHeight).observe(root);\n window.addEventListener(\"resize\", reportHeight);\n /* DXUI-6: a browser does not render an off-screen sandboxed frame, so ResizeObserver stays silent until the frame is\n scrolled into view; the document still loads, so report once then (the dedupe drops it when nothing changed). */\n window.addEventListener(\"load\", reportHeight);\n\n window.danxMiniApp = {\n holdReady: function () { held = true; },\n ready: ready,\n reportError: reportError,\n onAppearance: function (callback) {\n listeners.push(callback);\n return function () { listeners = listeners.filter(function (entry) { return entry !== callback; }); };\n }\n };\n})();`;\n}\n"],"names":["scriptString","value","DOMAINS","THEMES","CONTRAST","SCALES","MOTION","danxMiniAppScript","docId","DESIGN_FRAME_APPEARANCE","APPEARANCE_ATTRIBUTES","DESIGN_FRAME_ERROR_MAX_LENGTH","DESIGN_FRAME_READY","DESIGN_FRAME_ERROR","DESIGN_FRAME_HEIGHT"],"mappings":";;AAeA,SAASA,EAAaC,GAAuB;AAC3C,SAAO,KAAK,UAAUA,CAAK,EAAE,QAAQ,MAAM,SAAS,EAAE,QAAQ,WAAW,SAAS,EAAE,QAAQ,WAAW,SAAS;AAClH;AAEA,MAAMC,IAAU;AAAA,EACd,OAAOC;AAAA,EACP,UAAUC;AAAA,EACV,SAASC;AAAA,EACT,QAAQC;AACV;AA8BO,SAASC,EAAkBC,GAAuB;AAEvD,SAAO;AAAA,cACKR,EAAaQ,CAAK,CAAC;AAAA;AAAA,qBAEZ,KAAK,UAAUC,CAAuB,CAAC;AAAA,gBAC5C,KAAK,UAAUC,CAAqB,CAAC;AAAA,kBACnC,KAAK,UAAUR,CAAO,CAAC;AAAA,cAC3BS,CAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAYxB,KAAK,UAAUC,CAAkB,CAAC;AAAA;AAAA,iDAEJ,KAAK,UAAUC,CAAkB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAoDhE,KAAK,UAAUC,CAAmB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBtD;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mini-app.js","sources":["../../../src/lib/design-frame/mini-app.ts"],"sourcesContent":["import type { DesignFrameAppearance } from \"./protocol\";\n\n/**\n * DXUI-6: the interface of `window.danxMiniApp`, which `SandboxedFrame` injects into every framed\n * page (`mini-app-script.ts`). A mini app declares it once to call it type-safely; the docs\n * (`content/docs/sandboxed-frame.mdx`) give a declaration to copy. React-free: the interface plus `DANX_MINI_APP_METHODS`.\n */\nexport interface DanxMiniApp {\n /** Call in the page's first script to delay `ready` past `load` until `ready()` is called. */\n holdReady(): void;\n /** Tells the host the page has mounted. Posted once; later calls do nothing. */\n ready(): void;\n /** Shows a failure in the host as text, capped at 500 characters. */\n reportError(message: string): void;\n /** Calls `callback` with what the host just sent, after it is applied; returns the unsubscribe. */\n onAppearance(callback: (appearance: DesignFrameAppearance) => void): () => void;\n}\n\n/* DXUI-8: the members of `DanxMiniApp` at runtime, so a consumer that stands in for the injected client\n outside the frame (danxbot's design screenshot) can pin its stand-in against the library. The record is\n keyed by `keyof DanxMiniApp`, so a member added to the interface and missing here, or listed here and\n missing from the interface, fails the type check; the array is built from its keys. */\nconst MINI_APP_MEMBERS: Record<keyof DanxMiniApp, true> = {\n holdReady: true,\n ready: true,\n reportError: true,\n onAppearance: true,\n};\nexport const DANX_MINI_APP_METHODS: readonly (keyof DanxMiniApp)[] = Object.freeze(\n Object.keys(MINI_APP_MEMBERS) as (keyof DanxMiniApp)[],\n);\n"],"names":["MINI_APP_MEMBERS","DANX_MINI_APP_METHODS"],"mappings":"AAsBA,MAAMA,IAAoD;AAAA,EACxD,WAAW;AAAA,EACX,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAChB,GACaC,IAAwD,OAAO;AAAA,EAC1E,OAAO,KAAKD,CAAgB;AAC9B;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MOTION as u, SCALES as A, CONTRAST as _, THEMES as p } from "../preference-values.js";
|
|
2
|
+
const h = "danx-design:appearance", r = "danx-design:ready", i = "danx-design:error", s = "danx-design:height", m = 500, R = 1e5, E = {
|
|
3
|
+
theme: "theme",
|
|
4
|
+
contrast: "contrast",
|
|
5
|
+
uiScale: "ui-scale",
|
|
6
|
+
motion: "motion"
|
|
7
|
+
}, f = {
|
|
8
|
+
theme: p,
|
|
9
|
+
contrast: _,
|
|
10
|
+
uiScale: A,
|
|
11
|
+
motion: u
|
|
12
|
+
}, g = Object.keys(E);
|
|
13
|
+
function I(e) {
|
|
14
|
+
return typeof e == "object" && e !== null;
|
|
15
|
+
}
|
|
16
|
+
function D(e) {
|
|
17
|
+
const o = {};
|
|
18
|
+
for (const n of g) {
|
|
19
|
+
const t = e.getAttribute(`data-${E[n]}`);
|
|
20
|
+
t !== null && f[n].includes(t) && (o[n] = t);
|
|
21
|
+
}
|
|
22
|
+
return o;
|
|
23
|
+
}
|
|
24
|
+
const S = 64;
|
|
25
|
+
function N(e) {
|
|
26
|
+
return typeof e == "string" && e.length > 0 && e.length <= S;
|
|
27
|
+
}
|
|
28
|
+
function c(e) {
|
|
29
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= R;
|
|
30
|
+
}
|
|
31
|
+
function y(e) {
|
|
32
|
+
return I(e) ? e.type === r ? { type: r } : e.type === i && typeof e.message == "string" ? { type: i, message: e.message } : e.type === s && c(e.height) && c(e.viewport) && N(e.doc) ? { type: s, height: e.height, viewport: e.viewport, doc: e.doc } : null : null;
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
E as APPEARANCE_ATTRIBUTES,
|
|
36
|
+
h as DESIGN_FRAME_APPEARANCE,
|
|
37
|
+
S as DESIGN_FRAME_DOC_ID_MAX_LENGTH,
|
|
38
|
+
i as DESIGN_FRAME_ERROR,
|
|
39
|
+
m as DESIGN_FRAME_ERROR_MAX_LENGTH,
|
|
40
|
+
s as DESIGN_FRAME_HEIGHT,
|
|
41
|
+
R as DESIGN_FRAME_HEIGHT_MAX,
|
|
42
|
+
r as DESIGN_FRAME_READY,
|
|
43
|
+
y as parseInboundMessage,
|
|
44
|
+
D as readAppearance
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protocol.js","sources":["../../../src/lib/design-frame/protocol.ts"],"sourcesContent":["import {\n CONTRAST,\n MOTION,\n SCALES,\n THEMES,\n type ContrastPreference,\n type MotionPreference,\n type Theme,\n type UiScale,\n} from \"../preference-values\";\n\n/**\n * The messages a `SandboxedFrame` host and the document inside it exchange\n * (DX-4075). One definition, imported by both sides, so they cannot drift.\n *\n * REACT-FREE: this module is reachable from `@50arms/ui/pure` (the framed side\n * is a harness of any framework), so nothing here may import React.\n *\n * NO SECRET TRAVELS THIS CHANNEL. The host posts the four appearance values and\n * nothing else, which is why it can post to targetOrigin \"*\": the frame's origin\n * is the string \"null\" and cannot be named anyway.\n */\n\nexport const DESIGN_FRAME_APPEARANCE = \"danx-design:appearance\";\nexport const DESIGN_FRAME_READY = \"danx-design:ready\";\nexport const DESIGN_FRAME_ERROR = \"danx-design:error\";\nexport const DESIGN_FRAME_HEIGHT = \"danx-design:height\";\n\n/** The most characters of a frame's error message the host will accept. */\nexport const DESIGN_FRAME_ERROR_MAX_LENGTH = 500;\n\n/**\n * The host's Appearance. A field is absent when the host document has not set\n * that attribute (a host that never mounted the preference hooks); the frame then\n * leaves its own default alone rather than being told a guess.\n */\nexport interface DesignFrameAppearance {\n theme?: Theme;\n contrast?: ContrastPreference;\n uiScale?: UiScale;\n motion?: MotionPreference;\n}\n\n/** Host -> frame, on every change of the host's Appearance. */\nexport interface DesignFrameAppearanceMessage extends DesignFrameAppearance {\n type: typeof DESIGN_FRAME_APPEARANCE;\n}\n\n/** Frame -> host: the design has mounted and is listening for appearance. */\nexport interface DesignFrameReadyMessage {\n type: typeof DESIGN_FRAME_READY;\n}\n\n/** Frame -> host: the design failed. The host caps and treats `message` as text. */\nexport interface DesignFrameErrorMessage {\n type: typeof DESIGN_FRAME_ERROR;\n message: string;\n}\n\n/**\n * The most pixels of height or viewport the host will accept from a frame (DXUI-6): a sanity bound on\n * untrusted input, not the guard against a page that grows with its frame (`SandboxedFrame` decides that\n * from the reported viewport).\n */\nexport const DESIGN_FRAME_HEIGHT_MAX = 100_000;\n\n/**\n * Frame -> host: the height of the framed document and the height of the frame's own viewport\n * (`window.innerHeight`) when it was measured, in CSS pixels, and the id of the document that sent it (`doc`, the\n * id the host injected into that document's script). Used by `fit=\"content\"`.\n */\nexport interface DesignFrameHeightMessage {\n type: typeof DESIGN_FRAME_HEIGHT;\n height: number;\n viewport: number;\n doc: string;\n}\n\nexport type DesignFrameInboundMessage =\n | DesignFrameReadyMessage\n | DesignFrameErrorMessage\n | DesignFrameHeightMessage;\n\n/**\n * The four `<html data-*>` attributes that carry Appearance, by field. The names\n * and value domains are the library's own (`preference-values.ts`).\n */\nexport const APPEARANCE_ATTRIBUTES = {\n theme: \"theme\",\n contrast: \"contrast\",\n uiScale: \"ui-scale\",\n motion: \"motion\",\n} as const satisfies Record<keyof DesignFrameAppearance, string>;\n\nconst DOMAINS: Record<keyof DesignFrameAppearance, readonly string[]> = {\n theme: THEMES,\n contrast: CONTRAST,\n uiScale: SCALES,\n motion: MOTION,\n};\n\nconst FIELDS = Object.keys(APPEARANCE_ATTRIBUTES) as (keyof DesignFrameAppearance)[];\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === \"object\" && value !== null;\n}\n\n/** Reads the Appearance off an element's `data-*` attributes; an unset or foreign value is left out. */\nexport function readAppearance(root: Element): DesignFrameAppearance {\n const out: Record<string, string> = {};\n for (const field of FIELDS) {\n const value = root.getAttribute(`data-${APPEARANCE_ATTRIBUTES[field]}`);\n if (value !== null && DOMAINS[field].includes(value)) out[field] = value;\n }\n return out as DesignFrameAppearance;\n}\n\n/** The longest document id the host accepts in a height message. */\nexport const DESIGN_FRAME_DOC_ID_MAX_LENGTH = 64;\n\nfunction isDocId(value: unknown): value is string {\n return typeof value === \"string\" && value.length > 0 && value.length <= DESIGN_FRAME_DOC_ID_MAX_LENGTH;\n}\n\nfunction isBoundedPixels(value: unknown): value is number {\n return typeof value === \"number\" && Number.isFinite(value) && value >= 0 && value <= DESIGN_FRAME_HEIGHT_MAX;\n}\n\n/** Narrows an untrusted `event.data` to an appearance message; a value outside its domain is refused. */\nexport function parseAppearanceMessage(data: unknown): DesignFrameAppearanceMessage | null {\n if (!isRecord(data) || data.type !== DESIGN_FRAME_APPEARANCE) return null;\n const out: Record<string, unknown> = { type: DESIGN_FRAME_APPEARANCE };\n for (const field of FIELDS) {\n const value = data[field];\n if (value === undefined) continue;\n if (typeof value !== \"string\" || !DOMAINS[field].includes(value)) return null;\n out[field] = value;\n }\n return out as unknown as DesignFrameAppearanceMessage;\n}\n\n/** Narrows an untrusted `event.data` to a ready, error or height message. */\nexport function parseInboundMessage(data: unknown): DesignFrameInboundMessage | null {\n if (!isRecord(data)) return null;\n if (data.type === DESIGN_FRAME_READY) return { type: DESIGN_FRAME_READY };\n if (data.type === DESIGN_FRAME_ERROR && typeof data.message === \"string\") {\n return { type: DESIGN_FRAME_ERROR, message: data.message };\n }\n if (\n data.type === DESIGN_FRAME_HEIGHT &&\n isBoundedPixels(data.height) &&\n isBoundedPixels(data.viewport) &&\n isDocId(data.doc)\n ) {\n return { type: DESIGN_FRAME_HEIGHT, height: data.height, viewport: data.viewport, doc: data.doc };\n }\n return null;\n}\n"],"names":["DESIGN_FRAME_APPEARANCE","DESIGN_FRAME_READY","DESIGN_FRAME_ERROR","DESIGN_FRAME_HEIGHT","DESIGN_FRAME_ERROR_MAX_LENGTH","DESIGN_FRAME_HEIGHT_MAX","APPEARANCE_ATTRIBUTES","DOMAINS","THEMES","CONTRAST","SCALES","MOTION","FIELDS","isRecord","value","readAppearance","root","out","field","DESIGN_FRAME_DOC_ID_MAX_LENGTH","isDocId","isBoundedPixels","parseInboundMessage","data"],"mappings":";AAuBO,MAAMA,IAA0B,0BAC1BC,IAAqB,qBACrBC,IAAqB,qBACrBC,IAAsB,sBAGtBC,IAAgC,KAmChCC,IAA0B,KAuB1BC,IAAwB;AAAA,EACnC,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AACV,GAEMC,IAAkE;AAAA,EACtE,OAAOC;AAAA,EACP,UAAUC;AAAA,EACV,SAASC;AAAA,EACT,QAAQC;AACV,GAEMC,IAAS,OAAO,KAAKN,CAAqB;AAEhD,SAASO,EAASC,GAAkD;AAClE,SAAO,OAAOA,KAAU,YAAYA,MAAU;AAChD;AAGO,SAASC,EAAeC,GAAsC;AACnE,QAAMC,IAA8B,CAAA;AACpC,aAAWC,KAASN,GAAQ;AAC1B,UAAME,IAAQE,EAAK,aAAa,QAAQV,EAAsBY,CAAK,CAAC,EAAE;AACtE,IAAIJ,MAAU,QAAQP,EAAQW,CAAK,EAAE,SAASJ,CAAK,MAAGG,EAAIC,CAAK,IAAIJ;AAAA,EACrE;AACA,SAAOG;AACT;AAGO,MAAME,IAAiC;AAE9C,SAASC,EAAQN,GAAiC;AAChD,SAAO,OAAOA,KAAU,YAAYA,EAAM,SAAS,KAAKA,EAAM,UAAUK;AAC1E;AAEA,SAASE,EAAgBP,GAAiC;AACxD,SAAO,OAAOA,KAAU,YAAY,OAAO,SAASA,CAAK,KAAKA,KAAS,KAAKA,KAAST;AACvF;AAgBO,SAASiB,EAAoBC,GAAiD;AACnF,SAAKV,EAASU,CAAI,IACdA,EAAK,SAAStB,IAA2B,EAAE,MAAMA,EAAA,IACjDsB,EAAK,SAASrB,KAAsB,OAAOqB,EAAK,WAAY,WACvD,EAAE,MAAMrB,GAAoB,SAASqB,EAAK,QAAA,IAGjDA,EAAK,SAASpB,KACdkB,EAAgBE,EAAK,MAAM,KAC3BF,EAAgBE,EAAK,QAAQ,KAC7BH,EAAQG,EAAK,GAAG,IAET,EAAE,MAAMpB,GAAqB,QAAQoB,EAAK,QAAQ,UAAUA,EAAK,UAAU,KAAKA,EAAK,IAAA,IAEvF,OAbqB;AAc9B;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function s() {
|
|
2
|
+
try {
|
|
3
|
+
return process.env.NODE_ENV === "development";
|
|
4
|
+
} catch {
|
|
5
|
+
return !1;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
const n = /* @__PURE__ */ new Set();
|
|
9
|
+
function a(t, r) {
|
|
10
|
+
if (!s()) return;
|
|
11
|
+
const e = `[@50arms/ui] ${t}: ${r}`;
|
|
12
|
+
n.has(e) || (n.add(e), console.warn(e));
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
a as devWarn
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=dev-warn.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-warn.js","sources":["../../src/lib/dev-warn.ts"],"sourcesContent":["/* ----------------------------------------------------------------------------\n THE DEVELOPMENT WARNING — one implementation, because there will be more.\n\n WHAT THIS IS FOR. A misconfiguration that produces SILENCE is a library\n defect, not a consumer defect. Two of them shipped in this package and both\n look identical to working code from the outside:\n\n - a `Select` whose value matches no item painted the raw key into the\n trigger, so `AT-CW-GH` appeared where a human-readable label belonged;\n - a `DragDropProvider` containing rows and no drag source rendered\n perfectly, announced itself correctly, passed every test, and could not\n be dragged at all.\n\n Neither threw. Neither logged. Both were found by a person looking at a\n screen and knowing what it should have said.\n\n WHY `import.meta.env.DEV` AND NOT A THROW. Throwing turns a cosmetic defect\n into a blank page, and the cases this exists for are exactly the ones where\n the rest of the screen is fine. A warning that names the component and the\n offending value puts the fix in front of whoever is looking, at the moment\n they are looking, and costs a production build nothing: Vite, webpack and\n Rollup all constant-fold `import.meta.env.DEV` (and the `process.env`\n fallback below) and drop the branch entirely.\n\n BOTH CONDITIONS, because neither one alone covers the consumers this package\n has. `import.meta.env` exists in Vite and Rollup and is a SYNTAX ERROR in a\n CommonJS context, so it is reached through a `try` rather than referenced\n directly; `process.env.NODE_ENV` is what webpack, Next and Jest replace and\n is undefined in a plain browser module. Guarding on either being explicitly\n \"development\"/true keeps a production build quiet under all of them, and the\n default when NEITHER is knowable is QUIET — a library that shouts in an\n environment it cannot identify is a library people silence.\n\n ONCE PER MESSAGE. These fire from render, so an unguarded warning is one\n line per render per element — a console nobody can read, which is the same\n as no console at all. The message text is the key, so a second offending\n value still speaks up.\n -------------------------------------------------------------------------- */\n\nfunction isDevelopment(): boolean {\n try {\n /* Vite replaces this at build time in the CONSUMER's build, so a consumer's\n production bundle constant-folds the whole call away. */\n if (import.meta.env?.DEV) return true;\n } catch {\n /* No `import.meta` in this context. Fall through. */\n }\n try {\n return process.env.NODE_ENV === \"development\";\n } catch {\n return false;\n }\n}\n\nconst said = new Set<string>();\n\n/**\n * Say something once, in development, about a misconfiguration that would\n * otherwise be silent.\n *\n * @param component the component that noticed, so the message is greppable\n * @param message what is wrong and what to do about it\n */\nexport function devWarn(component: string, message: string): void {\n if (!isDevelopment()) return;\n const line = `[@50arms/ui] ${component}: ${message}`;\n if (said.has(line)) return;\n said.add(line);\n console.warn(line);\n}\n\n/** Test seam. Nothing in the library calls this. */\nexport function resetDevWarnings(): void {\n said.clear();\n}\n"],"names":["isDevelopment","said","devWarn","component","message","line"],"mappings":"AAuCA,SAASA,IAAyB;AAQhC,MAAI;AACF,WAAO,QAAQ,IAAI,aAAa;AAAA,EAClC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAEA,MAAMC,wBAAW,IAAA;AASV,SAASC,EAAQC,GAAmBC,GAAuB;AAChE,MAAI,CAACJ,IAAiB;AACtB,QAAMK,IAAO,gBAAgBF,CAAS,KAAKC,CAAO;AAClD,EAAIH,EAAK,IAAII,CAAI,MACjBJ,EAAK,IAAII,CAAI,GACb,QAAQ,KAAKA,CAAI;AACnB;"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { useState as y, useRef as u, useEffect as M } from "react";
|
|
3
|
+
import { numberFormat as U } from "../intl-cache.js";
|
|
4
|
+
import { isLaneDrop as A } from "./cross-drop.js";
|
|
5
|
+
import { sameTarget as C } from "./geometry.js";
|
|
6
|
+
import { useUiStrings as E, useUiLocale as P } from "../i18n/provider.js";
|
|
7
|
+
const N = "danxbot-dnd-instructions", j = 150;
|
|
8
|
+
function S(t, e, a) {
|
|
9
|
+
return A(t.crossDropOf(a.container), e.container, a.container);
|
|
10
|
+
}
|
|
11
|
+
function R(t, e, a, i, f, D) {
|
|
12
|
+
const l = t.spokenPosition(i.container, i.index, e), p = U(D, {});
|
|
13
|
+
return {
|
|
14
|
+
id: e,
|
|
15
|
+
label: f.labelOf?.(e) ?? e,
|
|
16
|
+
container: i.container,
|
|
17
|
+
from: a.container,
|
|
18
|
+
containerLabel: f.containerLabelOf?.(i.container) ?? i.container,
|
|
19
|
+
...l,
|
|
20
|
+
positionText: p.format(l.position),
|
|
21
|
+
totalText: p.format(l.total)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
function q(t, e = {}) {
|
|
25
|
+
const [a, i] = y(""), f = u(e);
|
|
26
|
+
f.current = e;
|
|
27
|
+
const D = E().dragDrop, l = u(D);
|
|
28
|
+
l.current = D;
|
|
29
|
+
const p = P(), w = u(p);
|
|
30
|
+
w.current = p;
|
|
31
|
+
const s = u(null), m = u(null), T = u(null), x = u(0);
|
|
32
|
+
return M(() => {
|
|
33
|
+
function I() {
|
|
34
|
+
m.current !== null && (window.clearTimeout(m.current), m.current = null, T.current = null);
|
|
35
|
+
}
|
|
36
|
+
function d(n) {
|
|
37
|
+
I(), x.current = Date.now(), i((r) => r === n ? r : n);
|
|
38
|
+
}
|
|
39
|
+
function _(n) {
|
|
40
|
+
const r = j - (Date.now() - x.current);
|
|
41
|
+
if (r <= 0) {
|
|
42
|
+
d(n);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
T.current = n, m.current === null && (m.current = window.setTimeout(() => {
|
|
46
|
+
m.current = null;
|
|
47
|
+
const o = T.current;
|
|
48
|
+
T.current = null, o !== null && d(o);
|
|
49
|
+
}, r));
|
|
50
|
+
}
|
|
51
|
+
function v() {
|
|
52
|
+
return { opts: f.current, strings: l.current, locale: w.current };
|
|
53
|
+
}
|
|
54
|
+
const k = t.addObserver({
|
|
55
|
+
onDragStart({ id: n, from: r, mode: o }) {
|
|
56
|
+
const { opts: O, strings: b, locale: L } = v(), c = t.getState().over ?? r, g = {
|
|
57
|
+
id: n,
|
|
58
|
+
from: r,
|
|
59
|
+
over: c,
|
|
60
|
+
mode: o,
|
|
61
|
+
target: R(t, n, r, c, O, L),
|
|
62
|
+
laneDrop: S(t, r, c),
|
|
63
|
+
home: R(t, n, r, r, O, L)
|
|
64
|
+
};
|
|
65
|
+
s.current = g, d(b.picked(g.target));
|
|
66
|
+
},
|
|
67
|
+
onDragOver({ id: n, over: r }) {
|
|
68
|
+
const o = s.current;
|
|
69
|
+
if (!o || C(o.over, r)) return;
|
|
70
|
+
const { opts: O, strings: b, locale: L } = v(), c = {
|
|
71
|
+
...o,
|
|
72
|
+
over: r,
|
|
73
|
+
laneDrop: S(t, o.from, r),
|
|
74
|
+
target: R(t, n, o.from, r, O, L)
|
|
75
|
+
};
|
|
76
|
+
s.current = c;
|
|
77
|
+
const g = c.laneDrop ? b.movedToLane(c.target) : b.moved(c.target);
|
|
78
|
+
c.mode === "keyboard" ? d(g) : _(g);
|
|
79
|
+
},
|
|
80
|
+
onDragEnd() {
|
|
81
|
+
const n = s.current;
|
|
82
|
+
if (!n) return;
|
|
83
|
+
s.current = null;
|
|
84
|
+
const { dropped: r, droppedInLane: o } = v().strings;
|
|
85
|
+
d(n.laneDrop ? o(n.target) : r(n.target));
|
|
86
|
+
},
|
|
87
|
+
onDragCancel() {
|
|
88
|
+
const n = s.current;
|
|
89
|
+
n && (s.current = null, d(v().strings.cancelled(n.home)));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
return () => {
|
|
93
|
+
k(), I();
|
|
94
|
+
};
|
|
95
|
+
}, [t]), { message: a, instructionsId: N };
|
|
96
|
+
}
|
|
97
|
+
function J({ session: t, ...e }) {
|
|
98
|
+
const { message: a } = q(t, e);
|
|
99
|
+
return /* @__PURE__ */ h(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
"data-dnd-live-region": "",
|
|
103
|
+
"aria-live": "assertive",
|
|
104
|
+
"aria-atomic": "true",
|
|
105
|
+
className: "sr-only",
|
|
106
|
+
children: a
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
function K({ id: t } = {}) {
|
|
111
|
+
const e = E().dragDrop;
|
|
112
|
+
return /* @__PURE__ */ h("p", { "data-dnd-instructions": "", id: t ?? N, className: "sr-only", children: e.instructions });
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
N as DRAG_INSTRUCTIONS_ID,
|
|
116
|
+
K as DragInstructions,
|
|
117
|
+
J as DragLiveRegion,
|
|
118
|
+
q as useDragAnnouncements
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=announce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announce.js","sources":["../../../src/lib/dnd/announce.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport { useUiLocale, useUiStrings } from \"../i18n\";\nimport { numberFormat } from \"../intl-cache\";\nimport { isLaneDrop } from \"./cross-drop\";\nimport { sameTarget } from \"./geometry\";\nimport type { DragSession } from \"./session\";\nimport type { ContainerId, DragId, DragMode, DropTarget } from \"./types\";\n\n/* ----------------------------------------------------------------------------\n WHAT A SCREEN-READER USER IS TOLD WHILE A CARD IS IN THE AIR.\n\n POSITION IS IN EVERY MESSAGE. \"Moved\" is the message almost every drag\n implementation emits and it is worthless: it confirms that something\n happened and withholds the only fact the user needed. A sighted user reads\n the answer off the screen continuously, so the live region is not a\n notification channel — it is the entire display, and a display that says\n \"moved\" is a blank one.\n\n NO `aria-grabbed`, NO `aria-dropeffect`. They are the attributes whose names\n promise exactly this feature, they are what most tutorials still show, and\n they were deprecated in ARIA 1.1 and REMOVED in 1.2 because assistive-\n technology support never materialised. An implementation built on them\n announces nothing at all, in a way no automated check notices, because the\n attributes are perfectly valid HTML. The working pattern is ordinary focus,\n an `aria-describedby` instruction on the handle, and a live region — this\n file. `dnd-a11y.test.ts` sweeps the package for both attributes, because the\n next contributor to \"fix accessibility\" here will reach for them in good\n faith.\n -------------------------------------------------------------------------- */\n\n/** Everything a message may name. Assembled once per announcement. */\nexport interface DragAnnouncementContext {\n id: DragId;\n /** `labelOf(id)` if supplied, otherwise the id — which is at least speakable. */\n label: string;\n container: ContainerId;\n /**\n * DX-4583: the container the card was picked up from. A message whose\n * `container` differs from it describes a card in another container, which is\n * the case where a consumer may mean \"this lane\" and no position at all.\n */\n from: ContainerId;\n containerLabel: string;\n /** 1-based, as spoken, in the WHOLE container — a windowed container reports its real offset and length (DX-4540). */\n position: number;\n /** `position` written the way the active locale writes numbers (DX-4740): what a message prints. */\n positionText: string;\n /**\n * The list length WITH the carried item counted in it, so `position` is never\n * \"4 of 3\". The session's own indices exclude the carried item — see the\n * `DropTarget.index` contract — and reporting that raw count would tell the\n * user a list is one shorter than the one they are looking at.\n */\n total: number;\n /** `total` written the way the active locale writes numbers (DX-4740): what a message prints. */\n totalText: string;\n}\n\nexport interface DragAnnouncementOptions {\n /** Human name for an item. Falls back to the id. */\n labelOf?: (id: DragId) => string;\n /** Human name for a container. Falls back to the id. */\n containerLabelOf?: (id: ContainerId) => string;\n}\n\n/**\n * One id for the whole page, deliberately not `useId()`.\n *\n * `<DragInstructions>` takes no required props and the hook hands the id to\n * every handle, so the two can only agree on a CONSTANT — a generated id would\n * differ per hook instance and every `aria-describedby` would point at nothing,\n * which reads as \"no instructions\" and is invisible to every automated check.\n * The cost: render `<DragInstructions>` once per page, not once per board.\n */\nexport const DRAG_INSTRUCTIONS_ID = \"danxbot-dnd-instructions\";\n\n/**\n * How long pointer-driven position changes are coalesced for.\n *\n * A pointer crossing a ten-card column emits ten position changes in a few\n * hundred milliseconds. Speaking all ten produces a stutter of half-syllables\n * and the user hears none of them; speaking the last one is the whole message.\n * KEYBOARD MOVES ARE NOT THROTTLED — each arrow press is one deliberate\n * request, and answering nine of ten is a control that has stopped responding.\n * The cost of the throttle is the skipped intermediate positions, which is\n * exactly what a pointer user never had either.\n */\nconst POINTER_MOVE_THROTTLE_MS = 150;\n\n/* ---------------------------------------------------------------- hook ---- */\n\ninterface Carried {\n id: DragId;\n from: DropTarget;\n over: DropTarget;\n mode: DragMode;\n /** DX-4583: it would land in a container that takes it as a whole, so the lane-drop messages speak. */\n laneDrop: boolean;\n /** Where it would land — what a drop reports. */\n target: DragAnnouncementContext;\n /** Where it came from — what a cancel reports. */\n home: DragAnnouncementContext;\n}\n\nfunction isLaneDropOver(session: DragSession, from: DropTarget, over: DropTarget): boolean {\n return isLaneDrop(session.crossDropOf(over.container), from.container, over.container);\n}\n\nfunction describe(\n session: DragSession,\n id: DragId,\n from: DropTarget,\n target: DropTarget,\n options: DragAnnouncementOptions,\n locale: string,\n): DragAnnouncementContext {\n const spoken = session.spokenPosition(target.container, target.index, id);\n const format = numberFormat(locale, {});\n return {\n id,\n label: options.labelOf?.(id) ?? id,\n container: target.container,\n from: from.container,\n containerLabel: options.containerLabelOf?.(target.container) ?? target.container,\n ...spoken,\n positionText: format.format(spoken.position),\n totalText: format.format(spoken.total),\n };\n}\n\nexport interface DragAnnouncements {\n /** The current live-region text. `\"\"` until the first pickup. */\n message: string;\n /** Put this on every handle's `aria-describedby`. */\n instructionsId: string;\n}\n\n/**\n * Subscribe to the session and turn it into speech.\n *\n * AN OBSERVER, NOT A STATE SUBSCRIPTION. The messages are derived from\n * TRANSITIONS, not from state, and the two that matter most are indistinguishable\n * in state: a drop and a cancel both end at the same idle value, so a subscriber\n * sees one identical transition for two endings that need opposite messages — a\n * drop reports where the item LANDED, a cancel where it went BACK to.\n *\n * `session.addObserver` exists for exactly this. It was added after the first\n * version of this file inferred the ending from whichever DOM event was\n * mid-dispatch, because the session's callbacks were a single slot the board\n * already owned. That worked, and was ninety lines, and was defeated once by the\n * microtask checkpoint the HTML spec runs BETWEEN listeners of the same event —\n * so every cancel announced itself as a drop, in a real browser only. Nothing\n * that reads the session should have to guess what the session just did.\n *\n * The context for a message is captured WHILE THE DRAG IS LIVE, never at the\n * end. \"Position 3 of 7\" needs the carried item excluded from its own total, and\n * by the time the drag has ended the session no longer knows which item that\n * was — the number would quietly gain one.\n */\nexport function useDragAnnouncements(\n session: DragSession,\n options: DragAnnouncementOptions = {},\n): DragAnnouncements {\n const [message, setMessage] = useState(\"\");\n\n /* Read through a ref: `labelOf` and the provider's strings are rewritten on\n render by every real consumer, so depending on them directly would tear\n down the subscription on every render — mid-gesture, which is when it\n matters. */\n const optionsRef = useRef(options);\n optionsRef.current = options;\n const strings = useUiStrings().dragDrop;\n const stringsRef = useRef(strings);\n stringsRef.current = strings;\n const locale = useUiLocale();\n const localeRef = useRef(locale);\n localeRef.current = locale;\n\n const carried = useRef<Carried | null>(null);\n const timer = useRef<number | null>(null);\n const queued = useRef<string | null>(null);\n const lastEmit = useRef(0);\n\n useEffect(() => {\n function clearTimer(): void {\n if (timer.current === null) return;\n window.clearTimeout(timer.current);\n timer.current = null;\n queued.current = null;\n }\n\n /* De-duplicated, not just rate-limited. Re-setting a live region to the\n text it already holds is a DOM mutation with no new information, and\n several screen readers speak it again. */\n function emitNow(text: string): void {\n clearTimer();\n lastEmit.current = Date.now();\n setMessage((current) => (current === text ? current : text));\n }\n\n function emitThrottled(text: string): void {\n const wait = POINTER_MOVE_THROTTLE_MS - (Date.now() - lastEmit.current);\n if (wait <= 0) {\n emitNow(text);\n return;\n }\n /* Trailing edge, always. Without it a drag that crosses two items and\n then rests announces the first position and never corrects itself —\n the user is told a position the item no longer occupies, which is\n worse than silence because it is actionable and wrong. */\n queued.current = text;\n if (timer.current !== null) return;\n timer.current = window.setTimeout(() => {\n timer.current = null;\n const pending = queued.current;\n queued.current = null;\n if (pending !== null) emitNow(pending);\n }, wait);\n }\n\n /* Every message needs the same two things: the option bag as it stands\n right now, and the provider's string table. Read through the refs so a\n consumer writing its options inline does not tear the observer down\n mid-gesture. */\n function ctx() {\n return { opts: optionsRef.current, strings: stringsRef.current, locale: localeRef.current };\n }\n\n const detach = session.addObserver({\n onDragStart({ id, from, mode }) {\n const { opts, strings, locale } = ctx();\n /* The pointer may already be over a different slot than the item own\n home by the time the activation constraint is met, so the opening\n position is read from the live session rather than assumed to be\n `from`. Announcing the home position and then immediately correcting\n it is two messages for one event. */\n const over = session.getState().over ?? from;\n const next = {\n id,\n from,\n over,\n mode,\n target: describe(session, id, from, over, opts, locale),\n laneDrop: isLaneDropOver(session, from, over),\n home: describe(session, id, from, from, opts, locale),\n };\n carried.current = next;\n emitNow(strings.picked(next.target));\n },\n\n onDragOver({ id, over }) {\n const previous = carried.current;\n if (!previous || sameTarget(previous.over, over)) return;\n const { opts, strings, locale } = ctx();\n const next = {\n ...previous,\n over,\n laneDrop: isLaneDropOver(session, previous.from, over),\n target: describe(session, id, previous.from, over, opts, locale),\n };\n carried.current = next;\n /* A keyboard press is one deliberate request and gets one answer;\n pointer movement is continuous sampling and is coalesced. Throttling\n the keyboard would drop a position the user explicitly asked for. */\n const text = next.laneDrop ? strings.movedToLane(next.target) : strings.moved(next.target);\n if (next.mode === \"keyboard\") emitNow(text);\n else emitThrottled(text);\n },\n\n onDragEnd() {\n const previous = carried.current;\n if (!previous) return;\n carried.current = null;\n /* `emitNow` discards any queued movement message. A trailing \"moved to\n position 2\" arriving after \"dropped at position 5\" would leave the\n region holding the wrong final answer. */\n const { dropped, droppedInLane } = ctx().strings;\n emitNow(previous.laneDrop ? droppedInLane(previous.target) : dropped(previous.target));\n },\n\n onDragCancel() {\n const previous = carried.current;\n if (!previous) return;\n carried.current = null;\n /* HOME, not target. A cancel puts the item back, and reporting where it\n would have gone describes something that did not happen — to the one\n user who cannot see that it did not. */\n emitNow(ctx().strings.cancelled(previous.home));\n },\n });\n\n return () => {\n detach();\n clearTimer();\n };\n }, [session]);\n\n return { message, instructionsId: DRAG_INSTRUCTIONS_ID };\n}\n\n/* ---------------------------------------------------------- components ---- */\n\nexport type DragLiveRegionProps = { session: DragSession } & DragAnnouncementOptions;\n\n/**\n * The live region. Render it ONCE, unconditionally, for the whole board.\n *\n * UNCONDITIONALLY IS THE LOAD-BEARING WORD. A live region that is inserted and\n * populated in the same frame — `{dragging && <DragLiveRegion/>}` — frequently\n * announces nothing at all: the accessibility tree has to observe the region\n * BEFORE its content changes to know a change happened. It renders empty here\n * and stays mounted, which is also why the message lives in state rather than\n * being derived from `session.getState()` during render.\n *\n * ASSERTIVE, NOT POLITE. Polite queues behind whatever is currently being\n * spoken, and a drag generates positions faster than speech consumes them — so\n * the user hears \"position 2 of 7\" while the card sits at 6, which is a wrong\n * answer rather than a late one. Assertive interrupts, so the newest position\n * always wins. The usual argument against it — that it talks over the user —\n * does not apply to a gesture that is modal by construction: nothing else is\n * happening, and the drag's own output is the only thing being interrupted.\n *\n * `sr-only` — NOT `display:none`, NOT `visibility:hidden`, NOT `hidden`. All\n * three remove the element from the accessibility tree entirely, and a live\n * region outside the accessibility tree is silent while looking exactly right\n * in the markup.\n */\nexport function DragLiveRegion({ session, ...options }: DragLiveRegionProps) {\n const { message } = useDragAnnouncements(session, options);\n return (\n <div\n data-dnd-live-region=\"\"\n aria-live=\"assertive\"\n aria-atomic=\"true\"\n className=\"sr-only\"\n >\n {message}\n </div>\n );\n}\n\nexport interface DragInstructionsProps {\n /**\n * The element id each handle's `aria-describedby` points at.\n *\n * Defaults to the module constant, which is what makes a prop-less\n * `<DragInstructions>` and `useDragAnnouncements` agree without wiring. A\n * component layer that generates its own id with `useId()` — so that two\n * boards on one page do not emit a duplicate id — passes it here. Without\n * this prop that layer has to re-implement the paragraph to change one\n * attribute, which is how the instruction text ends up existing twice and\n * drifting.\n */\n id?: string;\n}\n\n/**\n * The instruction text every handle points at with `aria-describedby`.\n *\n * A keyboard drag is unusable without it: nothing about a focused handle says\n * that Space starts a mode, and a user who does not know that never reaches any\n * of the rest of this file. Visually hidden because the same information is\n * carried for sighted users by the cursor and the moving card.\n */\nexport function DragInstructions({ id }: DragInstructionsProps = {}) {\n const strings = useUiStrings().dragDrop;\n return (\n <p data-dnd-instructions=\"\" id={id ?? DRAG_INSTRUCTIONS_ID} className=\"sr-only\">\n {strings.instructions}\n </p>\n );\n}\n"],"names":["DRAG_INSTRUCTIONS_ID","POINTER_MOVE_THROTTLE_MS","isLaneDropOver","session","from","over","isLaneDrop","describe","id","target","options","locale","spoken","format","numberFormat","useDragAnnouncements","message","setMessage","useState","optionsRef","useRef","strings","useUiStrings","stringsRef","useUiLocale","localeRef","carried","timer","queued","lastEmit","useEffect","clearTimer","emitNow","text","current","emitThrottled","wait","pending","ctx","detach","mode","opts","next","previous","sameTarget","dropped","droppedInLane","DragLiveRegion","jsx","DragInstructions"],"mappings":";;;;;;AA0EO,MAAMA,IAAuB,4BAa9BC,IAA2B;AAiBjC,SAASC,EAAeC,GAAsBC,GAAkBC,GAA2B;AACzF,SAAOC,EAAWH,EAAQ,YAAYE,EAAK,SAAS,GAAGD,EAAK,WAAWC,EAAK,SAAS;AACvF;AAEA,SAASE,EACPJ,GACAK,GACAJ,GACAK,GACAC,GACAC,GACyB;AACzB,QAAMC,IAAST,EAAQ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