@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,215 @@
|
|
|
1
|
+
import { devWarn as H } from "../dev-warn.js";
|
|
2
|
+
import { subscribeToKey as R, retainKeys as v, readState as O, isBaseTombstoned as M } from "../records/store.js";
|
|
3
|
+
import { subscriptionKey as j, subscribeToRealtimeEvents as z } from "../realtime/registry.js";
|
|
4
|
+
const y = Object.freeze({
|
|
5
|
+
items: Object.freeze([]),
|
|
6
|
+
pending: Object.freeze([]),
|
|
7
|
+
pendingCount: 0,
|
|
8
|
+
meta: void 0,
|
|
9
|
+
keys: Object.freeze([])
|
|
10
|
+
});
|
|
11
|
+
function W() {
|
|
12
|
+
return y;
|
|
13
|
+
}
|
|
14
|
+
const c = /* @__PURE__ */ new Map();
|
|
15
|
+
let h = 0;
|
|
16
|
+
function Y() {
|
|
17
|
+
return h;
|
|
18
|
+
}
|
|
19
|
+
const u = /* @__PURE__ */ new Map();
|
|
20
|
+
let f = null;
|
|
21
|
+
function C() {
|
|
22
|
+
f || (f = z((t) => {
|
|
23
|
+
t.isCreate && P(t);
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
function B() {
|
|
27
|
+
c.size > 0 || !f || (f(), f = null);
|
|
28
|
+
}
|
|
29
|
+
function _(t, e) {
|
|
30
|
+
const n = x(e.type, e.createdScope);
|
|
31
|
+
let s = c.get(t);
|
|
32
|
+
s || (s = {
|
|
33
|
+
id: t,
|
|
34
|
+
type: e.type,
|
|
35
|
+
tag: e.tag,
|
|
36
|
+
created: n,
|
|
37
|
+
keys: [],
|
|
38
|
+
pending: [],
|
|
39
|
+
optimisticHead: [],
|
|
40
|
+
optimisticTail: [],
|
|
41
|
+
awaitingSettle: [],
|
|
42
|
+
held: /* @__PURE__ */ new Set(),
|
|
43
|
+
answered: /* @__PURE__ */ new Map(),
|
|
44
|
+
meta: void 0,
|
|
45
|
+
refs: 0,
|
|
46
|
+
memberReleases: [],
|
|
47
|
+
retainRelease: null,
|
|
48
|
+
snapshot: null,
|
|
49
|
+
dirty: !0
|
|
50
|
+
}, c.set(t, s)), s.type = e.type, s.tag = e.tag, s.created = n, s.refs += 1, C();
|
|
51
|
+
let a = !1;
|
|
52
|
+
return () => {
|
|
53
|
+
if (a) return;
|
|
54
|
+
a = !0;
|
|
55
|
+
const i = c.get(t);
|
|
56
|
+
if (i && (i.refs -= 1, !(i.refs > 0))) {
|
|
57
|
+
for (const r of i.memberReleases) r();
|
|
58
|
+
i.memberReleases = [], i.retainRelease?.(), i.retainRelease = null, c.delete(t), B();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function D(t, e, n, s = [], a = h) {
|
|
63
|
+
const i = c.get(t);
|
|
64
|
+
if (!i) return;
|
|
65
|
+
const r = new Set(e), o = /* @__PURE__ */ new Set();
|
|
66
|
+
if (i.optimisticHead.length > 0 || i.optimisticTail.length > 0) {
|
|
67
|
+
const l = new Set(i.keys.filter((d) => !i.held.has(d)));
|
|
68
|
+
for (const d of r) !l.has(d) && !i.pending.includes(d) && o.add(d);
|
|
69
|
+
}
|
|
70
|
+
const m = [], b = [];
|
|
71
|
+
for (const [l, d] of i.answered)
|
|
72
|
+
r.has(l) || (d.at > a ? (d.head ? m : b).push(l) : i.answered.delete(l));
|
|
73
|
+
i.keys = [...m.reverse(), ...e, ...b], i.held = o;
|
|
74
|
+
const S = /* @__PURE__ */ new Set([...i.keys, ...s]);
|
|
75
|
+
i.pending = i.pending.filter((l) => !S.has(l)), i.awaitingSettle = i.awaitingSettle.filter((l) => !S.has(l)), i.meta = n, g(i), p(i);
|
|
76
|
+
}
|
|
77
|
+
function F(t) {
|
|
78
|
+
const e = c.get(t);
|
|
79
|
+
!e || e.meta === void 0 || (e.meta = void 0, p(e));
|
|
80
|
+
}
|
|
81
|
+
function G(t) {
|
|
82
|
+
return c.get(t)?.pending ?? y.keys;
|
|
83
|
+
}
|
|
84
|
+
function P(t) {
|
|
85
|
+
const e = t.key;
|
|
86
|
+
if (e) {
|
|
87
|
+
for (const n of c.values())
|
|
88
|
+
if (!(n.type !== t.type || !$(n, t)) && !(n.keys.includes(e) || n.pending.includes(e) || n.awaitingSettle.includes(e))) {
|
|
89
|
+
if (n.optimisticHead.length > 0 || n.optimisticTail.length > 0) {
|
|
90
|
+
n.awaitingSettle = [...n.awaitingSettle, e];
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
n.pending = [...n.pending, e], g(n), p(n);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function $(t, e) {
|
|
98
|
+
const n = t.created;
|
|
99
|
+
return n ? n.scope.kind === "all" ? !0 : n.scope.kind === "ids" ? n.scope.ids.includes(String(e.payload.id)) : e.subscriptions === void 0 ? (H(
|
|
100
|
+
"realtime",
|
|
101
|
+
`a "${e.event}" for ${e.type} carried no subscription attribution, so a list filtered by ${n.key} cannot tell which subscription it was sent for, and does not count it. The transport needs \`subscriptionsOf\`, and the server has to name the subscriptions an event satisfied.`
|
|
102
|
+
), !1) : e.subscriptions.includes(n.key) : !1;
|
|
103
|
+
}
|
|
104
|
+
function x(t, e) {
|
|
105
|
+
return e === void 0 ? null : { scope: e, key: j(t, e) };
|
|
106
|
+
}
|
|
107
|
+
function g(t) {
|
|
108
|
+
for (const n of t.memberReleases) n();
|
|
109
|
+
const e = w(t);
|
|
110
|
+
t.memberReleases = e.map((n) => R(n, () => A(t))), t.retainRelease?.(), t.retainRelease = v(e);
|
|
111
|
+
}
|
|
112
|
+
function A(t) {
|
|
113
|
+
c.has(t.id) && (E(t), p(t));
|
|
114
|
+
}
|
|
115
|
+
function E(t) {
|
|
116
|
+
const e = (o) => M(o), n = t.keys.filter((o) => !e(o)), s = t.pending.filter((o) => !e(o)), a = t.awaitingSettle.filter((o) => !e(o)), i = [...t.held].filter((o) => !e(o)), r = [...t.answered].filter(([o]) => !e(o));
|
|
117
|
+
n.length === t.keys.length && s.length === t.pending.length && a.length === t.awaitingSettle.length || (t.keys = n, t.pending = s, t.awaitingSettle = a, t.held = new Set(i), t.answered = new Map(r), g(t));
|
|
118
|
+
}
|
|
119
|
+
function p(t) {
|
|
120
|
+
t.dirty = !0;
|
|
121
|
+
const e = u.get(t.id);
|
|
122
|
+
if (e)
|
|
123
|
+
for (const n of [...e]) n();
|
|
124
|
+
}
|
|
125
|
+
function J(t, e, n, s) {
|
|
126
|
+
const a = [];
|
|
127
|
+
for (const i of c.values()) {
|
|
128
|
+
if (i.type !== e) continue;
|
|
129
|
+
const r = { id: i.id, type: i.type, tag: i.tag };
|
|
130
|
+
n && !n(r) || (s === "start" ? i.optimisticHead = [t, ...i.optimisticHead] : i.optimisticTail = [...i.optimisticTail, t], g(i), p(i), a.push(r));
|
|
131
|
+
}
|
|
132
|
+
return a;
|
|
133
|
+
}
|
|
134
|
+
function Q(t, e) {
|
|
135
|
+
for (const n of c.values()) {
|
|
136
|
+
const s = n.optimisticHead.includes(t), a = n.optimisticTail.includes(t);
|
|
137
|
+
if (!(!s && !a)) {
|
|
138
|
+
if (n.optimisticHead = n.optimisticHead.filter((i) => i !== t), n.optimisticTail = n.optimisticTail.filter((i) => i !== t), e !== null && (n.pending = n.pending.filter((i) => i !== e), n.awaitingSettle = n.awaitingSettle.filter((i) => i !== e), n.held.delete(e), n.keys.includes(e) || (n.keys = s ? [e, ...n.keys] : [...n.keys, e]), h += 1, n.answered.set(e, { at: h, head: s })), n.optimisticHead.length === 0 && n.optimisticTail.length === 0) {
|
|
139
|
+
n.held = /* @__PURE__ */ new Set();
|
|
140
|
+
const i = n.awaitingSettle;
|
|
141
|
+
n.awaitingSettle = [];
|
|
142
|
+
for (const r of i)
|
|
143
|
+
!n.keys.includes(r) && !n.pending.includes(r) && (n.pending = [...n.pending, r]);
|
|
144
|
+
}
|
|
145
|
+
g(n), p(n);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function w(t) {
|
|
150
|
+
return [...t.optimisticHead, ...t.keys, ...t.optimisticTail, ...t.pending, ...t.awaitingSettle];
|
|
151
|
+
}
|
|
152
|
+
function U(t, e) {
|
|
153
|
+
let n = u.get(t);
|
|
154
|
+
return n || (n = /* @__PURE__ */ new Set(), u.set(t, n)), n.add(e), () => {
|
|
155
|
+
const s = u.get(t);
|
|
156
|
+
s && (s.delete(e), s.size === 0 && u.delete(t));
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function V(t) {
|
|
160
|
+
const e = c.get(t);
|
|
161
|
+
return e ? w(e) : y.keys;
|
|
162
|
+
}
|
|
163
|
+
function X(t) {
|
|
164
|
+
const e = c.get(t);
|
|
165
|
+
if (!e) return y;
|
|
166
|
+
if (!e.dirty && e.snapshot) return e.snapshot;
|
|
167
|
+
const n = e.keys.filter((m) => !e.held.has(m)), s = k([...e.optimisticHead, ...n, ...e.optimisticTail], e.tag), a = k(e.pending, e.tag), i = w(e), r = e.snapshot;
|
|
168
|
+
if (e.dirty = !1, r && T(r.items, s) && T(r.pending, a) && r.pendingCount === e.pending.length && r.meta === e.meta && I(r.keys, i))
|
|
169
|
+
return r;
|
|
170
|
+
const o = Object.freeze({
|
|
171
|
+
items: Object.freeze(s),
|
|
172
|
+
pending: Object.freeze(a),
|
|
173
|
+
pendingCount: e.pending.length,
|
|
174
|
+
meta: e.meta,
|
|
175
|
+
keys: Object.freeze(i)
|
|
176
|
+
});
|
|
177
|
+
return e.snapshot = o, o;
|
|
178
|
+
}
|
|
179
|
+
function k(t, e) {
|
|
180
|
+
const n = [];
|
|
181
|
+
for (const s of t) {
|
|
182
|
+
const a = O(s, e);
|
|
183
|
+
a.status === "present" && n.push(a.record);
|
|
184
|
+
}
|
|
185
|
+
return n;
|
|
186
|
+
}
|
|
187
|
+
function T(t, e) {
|
|
188
|
+
return t.length === e.length && t.every((n, s) => n === e[s]);
|
|
189
|
+
}
|
|
190
|
+
function I(t, e) {
|
|
191
|
+
return t.length === e.length && t.every((n, s) => n === e[s]);
|
|
192
|
+
}
|
|
193
|
+
function Z() {
|
|
194
|
+
for (const t of c.values()) {
|
|
195
|
+
for (const e of t.memberReleases) e();
|
|
196
|
+
t.retainRelease?.();
|
|
197
|
+
}
|
|
198
|
+
c.clear(), u.clear(), f?.(), f = null;
|
|
199
|
+
}
|
|
200
|
+
export {
|
|
201
|
+
_ as acquireSlot,
|
|
202
|
+
J as addOptimisticMember,
|
|
203
|
+
P as appendCreated,
|
|
204
|
+
F as clearSlotMeta,
|
|
205
|
+
W as emptySlotSnapshot,
|
|
206
|
+
X as readSlot,
|
|
207
|
+
Z as resetSlots,
|
|
208
|
+
Q as settleOptimisticMember,
|
|
209
|
+
Y as slotAnswerMark,
|
|
210
|
+
V as slotKeys,
|
|
211
|
+
G as slotPendingKeys,
|
|
212
|
+
U as subscribeToSlot,
|
|
213
|
+
D as writeSlot
|
|
214
|
+
};
|
|
215
|
+
//# sourceMappingURL=slots.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots.js","sources":["../../../src/lib/reads/slots.ts"],"sourcesContent":["import { devWarn } from \"../dev-warn\";\nimport { readState, retainKeys, subscribeToKey } from \"../records\";\nimport { isBaseTombstoned } from \"../records/store\";\nimport { subscribeToRealtimeEvents, subscriptionKey } from \"../realtime\";\nimport type { RealtimeEvent, RealtimeScope } from \"../realtime\";\n\n/* ============================================================================\n LIST SLOTS — the root-query cache a normalized store cannot do without.\n\n THE OMISSION THIS CLOSES. Normalization gives an identity map; every design\n this one is modelled on ALSO keeps a record of which keys answered which\n query, and leaving that out is how a `created` broadcast writes a record into\n the store where it is INVISIBLE, because no list holds its key. A slot is\n that record: `{keys, meta, tag}`, keyed by the query's serialized form.\n\n WRITTEN ONLY BY A FETCH. Sort position and page boundary are the server's to\n decide, so the ordered key list can only come from an answer the server gave.\n\n IT IS ALSO WHERE `meta` LIVES — totals, per-page, cursors. Those carry no\n `__type` and no `id`, so they can never be records, and a store with nowhere\n to put them leaves a screen unable to render its own page count.\n\n AND IT IS AN EVICTION ROOT. A key is retained if it is REACHABLE from a root,\n and a live slot is the root most easily missed: miss it and the sweep evicts\n the twenty-five records the list is rendering right now.\n\n TWO EVENTS CHANGE MEMBERSHIP WITHOUT A FETCH, and only two (an optimistic create's answer is\n the reader's own write, covered under `settleOptimisticMember`):\n\n - A TOMBSTONE removes the key from EVERY slot, immediately. That is\n mechanically what \"the row is gone everywhere\" means, and it is the one\n case where a broadcast is authoritative about membership.\n - A `created` event APPENDS with position unknown. It never guesses a\n position, because guessing is the lie the rule exists to prevent. And it\n appends only to a slot that DECLARED the scope the record entered\n (`createdScope`), because the channel is per type per tenant: an event\n arrives whenever ANY subscription on the tenant matched, so arrival\n alone says nothing about which list the record belongs to.\n\n A FETCH SETTLES WHAT WAS PENDING WHEN IT WAS ISSUED. A key it placed on this\n page stops being pending because the page holds it; a key it did NOT place\n stops too, because the server has answered for it — it sorted onto another\n page, or no longer matches. Only a key that arrived after the request went\n out stays pending, because that answer may predate it.\n\n A FETCH CANNOT TELL THE READER'S OWN ROW FROM ANOTHER'S WHILE A CREATE IS OUT (DXUI-82). An\n optimistic create shows a pending row under a temporary key; the server's copy of it carries a\n real key sharing nothing with that one. So while a create in this slot is unanswered, a page\n row the slot was not already showing is HELD: kept in `keys`, at the position the server gave\n it, but not rendered, until the create settles. The other way round, a read issued before a\n create's answer may land after it, without the row: the answer is remembered in `answered`\n under a rising counter, and only a read issued after it can remove the row.\n ========================================================================= */\n\nexport interface SlotSnapshot<T = unknown, TMeta = unknown> {\n readonly items: readonly T[];\n readonly pending: readonly T[];\n readonly pendingCount: number;\n readonly meta: TMeta | undefined;\n /** Every key the slot holds, fetched and pending. The refetch roots. */\n readonly keys: readonly string[];\n}\n\nconst EMPTY_SNAPSHOT: SlotSnapshot = Object.freeze({\n items: Object.freeze([]),\n pending: Object.freeze([]),\n pendingCount: 0,\n meta: undefined,\n keys: Object.freeze([]),\n});\n\n/** `getServerSnapshot`, and the answer for a slot nothing has written yet. */\nexport function emptySlotSnapshot(): SlotSnapshot {\n return EMPTY_SNAPSHOT;\n}\n\n/** The scope whose `created` events enter a slot, and its registry key. */\ninterface CreatedMembership {\n readonly scope: RealtimeScope;\n /** `subscriptionKey(type, scope)` — what `RealtimeEvent.subscriptions` names. */\n readonly key: string;\n}\n\ninterface Slot {\n readonly id: string;\n type: string;\n tag: string;\n /** `null` — the slot never takes a `created` event. */\n created: CreatedMembership | null;\n /** The fetched page, in the server's order. */\n keys: string[];\n /** Appended by a `created` event. Position unknown, deliberately. */\n pending: string[];\n /** Optimistic creates shown ABOVE the fetched page — see `addOptimisticMember`. */\n optimisticHead: string[];\n /** Optimistic creates shown BELOW the fetched page. */\n optimisticTail: string[];\n /**\n * Page keys held out of `items` while a create is unanswered (DXUI-82). Always members of\n * `keys`: they keep the server's position and stay retained, subscribed and refetch roots.\n */\n held: Set<string>;\n /**\n * Real keys of optimistic creates answered in this slot: the answer's place in the module-level\n * counter, and whether the row was shown at the head. A read issued before `at` may not remove\n * the row; one issued at or after it is the server's word.\n */\n answered: Map<string, { at: number; head: boolean }>;\n /**\n * `created` events held back because an optimistic create of this slot's type was still\n * outstanding when they arrived — see `appendCreated`'s own docblock (SG-982).\n */\n awaitingSettle: string[];\n meta: unknown;\n refs: number;\n memberReleases: (() => void)[];\n retainRelease: (() => void) | null;\n snapshot: SlotSnapshot | null;\n dirty: boolean;\n}\n\nconst slots = new Map<string, Slot>();\n\n/**\n * Orders answers against reads. Module-level, never per slot: StrictMode drops and re-creates a\n * slot while a read is out, and that read's mark must still compare against later answers.\n */\nlet answerCounter = 0;\n\n/** The mark a read takes BEFORE its request goes out; `writeSlot` receives it with the page. */\nexport function slotAnswerMark(): number {\n return answerCounter;\n}\n\n/**\n * Listeners live OUTSIDE the slot, keyed by id.\n *\n * Because `useSyncExternalStore` subscribes at its own hook position, which can\n * be before the effect that claims the slot: a listener set that only existed\n * once the slot did would silently drop that subscription, and the list would\n * render once and then never again. Nothing about that failure is visible.\n */\nconst slotListeners = new Map<string, Set<() => void>>();\n\n/* --- The created-event bridge ---------------------------------------------- */\n\nlet createdBridge: (() => void) | null = null;\n\n/**\n * Listen for `created` broadcasts, lazily.\n *\n * INSTALLED ON THE FIRST SLOT, NOT ON IMPORT, and removed with the last one. A\n * module that wires itself up because somebody imported it does so in every\n * consumer, including the ones that never render a list.\n */\nfunction ensureCreatedBridge(): void {\n if (createdBridge) return;\n createdBridge = subscribeToRealtimeEvents((event) => {\n if (!event.isCreate) return;\n appendCreated(event);\n });\n}\n\nfunction releaseCreatedBridgeIfIdle(): void {\n if (slots.size > 0 || !createdBridge) return;\n createdBridge();\n createdBridge = null;\n}\n\n/* --- Lifecycle -------------------------------------------------------------- */\n\n/**\n * Claim a slot for the duration of the returned release.\n *\n * REFCOUNTED AND IDEMPOTENT, which is what makes StrictMode's mount / unmount /\n * mount leave the slot — and its retained keys — exactly as it found them.\n */\nexport function acquireSlot(\n id: string,\n options: { type: string; tag: string; createdScope?: RealtimeScope },\n): () => void {\n const created = membershipOf(options.type, options.createdScope);\n let slot = slots.get(id);\n if (!slot) {\n slot = {\n id,\n type: options.type,\n tag: options.tag,\n created,\n keys: [],\n pending: [],\n optimisticHead: [],\n optimisticTail: [],\n awaitingSettle: [],\n held: new Set(),\n answered: new Map(),\n meta: undefined,\n refs: 0,\n memberReleases: [],\n retainRelease: null,\n snapshot: null,\n dirty: true,\n };\n slots.set(id, slot);\n }\n slot.type = options.type;\n slot.tag = options.tag;\n slot.created = created;\n slot.refs += 1;\n ensureCreatedBridge();\n\n let released = false;\n return () => {\n if (released) return;\n released = true;\n const current = slots.get(id);\n if (!current) return;\n current.refs -= 1;\n if (current.refs > 0) return;\n for (const release of current.memberReleases) release();\n current.memberReleases = [];\n current.retainRelease?.();\n current.retainRelease = null;\n slots.delete(id);\n releaseCreatedBridgeIfIdle();\n };\n}\n\n/* --- Writing ---------------------------------------------------------------- */\n\n/**\n * Replace a slot's membership with a fetch's answer.\n *\n * A key that arrived through a `created` event and is now in the fetched page\n * stops being pending — the fetch has placed it, which is the only thing that\n * ever could.\n *\n * @param settled the keys that were pending when this fetch was ISSUED\n * (`slotPendingKeys`, read before the request). The answer covers them even\n * when it does not hold them: a row that sorted onto another page is not\n * \"new\" any more, it is placed — elsewhere. Without this a counted row that\n * lands on page 2 stays \"1 new\" after Show, forever. A key appended after\n * the request went out is not in this list, and stays pending.\n * @param mark `slotAnswerMark()` read before the request went out. An optimistic create answered\n * after it keeps its row though this page lacks it; a call without a mark counts as current.\n */\nexport function writeSlot(\n id: string,\n keys: readonly string[],\n meta: unknown,\n settled: readonly string[] = [],\n mark: number = answerCounter,\n): void {\n const slot = slots.get(id);\n if (!slot) return;\n\n const page = new Set(keys);\n /* HELD (DXUI-82): while a create here is unanswered, a page row the slot was not already showing\n may be the reader's own, under a key the slot cannot match to the pending row. It keeps the\n server's place in `keys` and stays out of `items` until the create settles. */\n const held = new Set<string>();\n if (slot.optimisticHead.length > 0 || slot.optimisticTail.length > 0) {\n const showing = new Set(slot.keys.filter((key) => !slot.held.has(key)));\n for (const key of page) if (!showing.has(key) && !slot.pending.includes(key)) held.add(key);\n }\n\n /* ANSWERED CREATES: a read issued before an answer may not remove its row; one issued at or after\n it is the server's word, and a row it leaves out leaves the slot for good. */\n const restoredHead: string[] = [];\n const restoredTail: string[] = [];\n for (const [key, entry] of slot.answered) {\n if (page.has(key)) continue;\n if (entry.at > mark) (entry.head ? restoredHead : restoredTail).push(key);\n else slot.answered.delete(key);\n }\n\n slot.keys = [...restoredHead.reverse(), ...keys, ...restoredTail];\n slot.held = held;\n const answered = new Set([...slot.keys, ...settled]);\n slot.pending = slot.pending.filter((key) => !answered.has(key));\n // A key a fetch just placed leaves the queue (SG-982): the page holds its place now. While a\n // create is unanswered it may be that create's own row, so `held` above keeps it out of the render.\n slot.awaitingSettle = slot.awaitingSettle.filter((key) => !answered.has(key));\n slot.meta = meta;\n resubscribeMembers(slot);\n invalidate(slot);\n}\n\n/**\n * Forget what a slot's last answer said about the set (DXUI-87): its `meta`. A team switch empties\n * the store but not the slot, and a reader that takes `meta` as \"this query was answered\" would\n * otherwise draw the old team's totals, or an empty state, over a new team whose read failed.\n */\nexport function clearSlotMeta(id: string): void {\n const slot = slots.get(id);\n if (!slot || slot.meta === undefined) return;\n slot.meta = undefined;\n invalidate(slot);\n}\n\n/** The keys a slot is holding as pending right now — what a fetch issued now will settle. */\nexport function slotPendingKeys(id: string): readonly string[] {\n return slots.get(id)?.pending ?? EMPTY_SNAPSHOT.keys;\n}\n\n/**\n * Append a record that entered the set elsewhere, to every slot it belongs to.\n *\n * WITH NO POSITION. The server owns sort order and page boundary; a client that\n * inserts at a guessed index renders a list that is subtly, confidently wrong.\n *\n * AND ONLY WHERE IT BELONGS — see `belongsTo`.\n *\n * ==== HELD BACK WHILE AN OPTIMISTIC CREATE OF THIS TYPE IS OUTSTANDING (SG-982) ====\n *\n * A row the reader just created optimistically has a TEMPORARY key here — the request that will\n * tell this slot the real one is still in flight. If the server's own `created` broadcast for\n * that same row reaches this client before that request answers (observed: the broadcast can\n * easily win the race against the reader's own round trip), it names the REAL key, which this\n * function cannot recognise as \"the row already shown\" — the two keys share no characters. Adding\n * it to `pending` right away would render it as a second row beside the optimistic one for\n * however long the request takes to settle, which is exactly the transient duplicate this guards\n * against.\n *\n * So while ANY optimistic create for this slot's type is outstanding (`optimisticHead` /\n * `optimisticTail` non-empty), an incoming `created` key is parked in `awaitingSettle` instead —\n * neither rendered nor counted — and `settleOptimisticMember` flushes it into `pending` the\n * instant the slot has no outstanding optimistic create left. If the parked key turns out to BE\n * the reader's own row, `settleOptimisticMember` already removes it before the flush ever runs\n * (see its own doc); if it turns out to be someone else's genuinely new row, it reaches `pending`\n * moments later, no worse than it would have anyway.\n *\n * This never suppresses a `created` broadcast outright, and it applies only during a real,\n * in-progress race — not a guess about which rows might collide, and not a fixed delay.\n */\nexport function appendCreated(event: RealtimeEvent): void {\n const key = event.key;\n if (!key) return;\n for (const slot of slots.values()) {\n if (slot.type !== event.type || !belongsTo(slot, event)) continue;\n if (slot.keys.includes(key) || slot.pending.includes(key) || slot.awaitingSettle.includes(key)) continue;\n if (slot.optimisticHead.length > 0 || slot.optimisticTail.length > 0) {\n slot.awaitingSettle = [...slot.awaitingSettle, key];\n continue;\n }\n slot.pending = [...slot.pending, key];\n resubscribeMembers(slot);\n invalidate(slot);\n }\n}\n\n/**\n * Did this `created` record enter the set this slot lists?\n *\n * VERIFIED HERE WHEREVER THE CLIENT CAN, and taken from the server's\n * attribution only where it cannot:\n *\n * - `all` — every record of the type is in the set, by definition.\n * - `ids` — the record's id is in the list, or it is not.\n * - `filter` — a predicate only the server evaluates. The CHANNEL cannot\n * answer it: an event arrives when ANY subscription on the tenant matched,\n * so a queue filtered to schema A hears schema B's demands whenever a\n * teammate has an unfiltered list open (observed). Only\n * `event.subscriptions` naming THIS scope answers it.\n *\n * An unattributed event on a filtered slot is NOT appended — the library cannot\n * verify membership, and a count it cannot verify is the defect this exists to\n * remove — and the development build says why, once.\n */\nfunction belongsTo(slot: Slot, event: RealtimeEvent): boolean {\n const created = slot.created;\n if (!created) return false;\n if (created.scope.kind === \"all\") return true;\n if (created.scope.kind === \"ids\") return created.scope.ids.includes(String(event.payload.id));\n if (event.subscriptions === undefined) {\n devWarn(\n \"realtime\",\n `a \"${event.event}\" for ${event.type} carried no subscription attribution, so a list filtered by ` +\n `${created.key} cannot tell which subscription it was sent for, and does not count it. ` +\n \"The transport needs `subscriptionsOf`, and the server has to name the subscriptions an event satisfied.\",\n );\n return false;\n }\n return event.subscriptions.includes(created.key);\n}\n\nfunction membershipOf(type: string, scope: RealtimeScope | undefined): CreatedMembership | null {\n if (scope === undefined) return null;\n return { scope, key: subscriptionKey(type, scope) };\n}\n\n/**\n * Every member key gets a subscription, and every member key is retained.\n *\n * THE SUBSCRIPTION IS HOW A TOMBSTONE REACHES THE SLOT — nothing else tells a\n * list that one of its rows is gone. It also covers the reverse case, which is\n * the one that fails silently: a key the slot holds but the store has NOT got a\n * record for yet still gets a listener, so the row appears the moment it\n * arrives rather than at the next unrelated re-render.\n */\nfunction resubscribeMembers(slot: Slot): void {\n for (const release of slot.memberReleases) release();\n const all = allKeys(slot);\n slot.memberReleases = all.map((key) => subscribeToKey(key, () => onMemberChanged(slot)));\n slot.retainRelease?.();\n slot.retainRelease = retainKeys(all);\n}\n\nfunction onMemberChanged(slot: Slot): void {\n if (!slots.has(slot.id)) return;\n pruneTombstoned(slot);\n invalidate(slot);\n}\n\n/** A tombstone removes the key from the slot itself, not only from the render. */\nfunction pruneTombstoned(slot: Slot): void {\n /* The BASE tombstone, never an optimistic one: an optimistic delete hides the row through the\n projection below, and must leave the key here so a rollback has a list to come back into. */\n const gone = (key: string) => isBaseTombstoned(key);\n const keys = slot.keys.filter((key) => !gone(key));\n const pending = slot.pending.filter((key) => !gone(key));\n const awaitingSettle = slot.awaitingSettle.filter((key) => !gone(key));\n const held = [...slot.held].filter((key) => !gone(key));\n const answered = [...slot.answered].filter(([key]) => !gone(key));\n if (\n keys.length === slot.keys.length &&\n pending.length === slot.pending.length &&\n awaitingSettle.length === slot.awaitingSettle.length\n )\n return;\n slot.keys = keys;\n slot.pending = pending;\n slot.awaitingSettle = awaitingSettle;\n slot.held = new Set(held);\n slot.answered = new Map(answered);\n resubscribeMembers(slot);\n}\n\nfunction invalidate(slot: Slot): void {\n slot.dirty = true;\n const listeners = slotListeners.get(slot.id);\n if (!listeners) return;\n for (const listener of [...listeners]) listener();\n}\n\n/* --- Optimistic creates ------------------------------------------------------- */\n\n/** What a create's `lists` predicate is shown about each live slot. */\nexport interface SlotDescriptor {\n /** The list read's own `key`. */\n readonly id: string;\n readonly type: string;\n readonly tag: string;\n}\n\n/**\n * Show an optimistic create in every slot that should list it, before the server has answered.\n *\n * AN OPTIMISTIC CREATE IS NOT A `created` EVENT, and it does not go into `pending`. `pending` is\n * the server telling a list \"this entered your set, position unknown\" and a screen may render it\n * as a \"1 new\" affordance; a create is the reader's OWN action, shown inline as a row the moment\n * it is made. It sits beside the fetched page — above it by default, where a new row is looked\n * for — in its own list, so a fetch landing while the create is in flight rewrites the page and\n * leaves the pending row standing. A page row the slot was not already showing is held out of the\n * render until the create settles (`writeSlot`), since it may be this create's own row.\n *\n * WHICH SLOTS is the caller's to say when it can: the library cannot evaluate a server-side\n * filter, so the default is every live slot of the record's type, and `lists` narrows it.\n *\n * @returns the slots the key joined — their tags are what the server's answer must satisfy for\n * the real row to render in them.\n */\nexport function addOptimisticMember(\n key: string,\n type: string,\n lists: ((slot: SlotDescriptor) => boolean) | undefined,\n position: \"start\" | \"end\",\n): SlotDescriptor[] {\n const joined: SlotDescriptor[] = [];\n for (const slot of slots.values()) {\n if (slot.type !== type) continue;\n const descriptor: SlotDescriptor = { id: slot.id, type: slot.type, tag: slot.tag };\n if (lists && !lists(descriptor)) continue;\n if (position === \"start\") slot.optimisticHead = [key, ...slot.optimisticHead];\n else slot.optimisticTail = [...slot.optimisticTail, key];\n resubscribeMembers(slot);\n invalidate(slot);\n joined.push(descriptor);\n }\n return joined;\n}\n\n/**\n * An optimistic create has settled. With `realKey` (the server answered), the real row takes\n * the pending row's place — in the fetched page, so it stays put until the server next orders\n * the list. With `null` (the create failed), the pending row simply goes.\n *\n * THE ANSWER IS REMEMBERED (DXUI-82): `answered` keeps `realKey`, so a read issued before this\n * answer and landing after it cannot take the row away; and `held` page rows show once no create\n * here is unanswered, whether this one succeeded or failed.\n *\n * ALSO THE FLUSH POINT FOR `awaitingSettle` (SG-982): once this slot has no outstanding\n * optimistic create left, any `created` broadcasts `appendCreated` held back while this one was\n * in flight are released into `pending` — the race they were parked for is over. `realKey` itself\n * is removed from that queue first: if it is the reader's own echo, it has just been folded\n * straight into `keys` above and must never also reach `pending` as a second copy.\n */\nexport function settleOptimisticMember(tempKey: string, realKey: string | null): void {\n for (const slot of slots.values()) {\n const inHead = slot.optimisticHead.includes(tempKey);\n const inTail = slot.optimisticTail.includes(tempKey);\n if (!inHead && !inTail) continue;\n slot.optimisticHead = slot.optimisticHead.filter((key) => key !== tempKey);\n slot.optimisticTail = slot.optimisticTail.filter((key) => key !== tempKey);\n if (realKey !== null) {\n /* A `created` broadcast may have got here first and parked the row in `pending`; the\n reader's own create answers for it now, so it moves into the page. */\n slot.pending = slot.pending.filter((key) => key !== realKey);\n slot.awaitingSettle = slot.awaitingSettle.filter((key) => key !== realKey);\n slot.held.delete(realKey);\n if (!slot.keys.includes(realKey)) slot.keys = inHead ? [realKey, ...slot.keys] : [...slot.keys, realKey];\n /* Recorded also when a read already placed the row: an older read can still land without it. */\n answerCounter += 1;\n slot.answered.set(realKey, { at: answerCounter, head: inHead });\n }\n if (slot.optimisticHead.length === 0 && slot.optimisticTail.length === 0) {\n /* The race is over: everything a page held back shows, after a failed create too. */\n slot.held = new Set();\n const deferred = slot.awaitingSettle;\n slot.awaitingSettle = [];\n for (const key of deferred) {\n if (!slot.keys.includes(key) && !slot.pending.includes(key)) slot.pending = [...slot.pending, key];\n }\n }\n resubscribeMembers(slot);\n invalidate(slot);\n }\n}\n\nfunction allKeys(slot: Slot): string[] {\n return [...slot.optimisticHead, ...slot.keys, ...slot.optimisticTail, ...slot.pending, ...slot.awaitingSettle];\n}\n\n/* --- Reading ---------------------------------------------------------------- */\n\nexport function subscribeToSlot(id: string, listener: () => void): () => void {\n let listeners = slotListeners.get(id);\n if (!listeners) {\n listeners = new Set();\n slotListeners.set(id, listeners);\n }\n listeners.add(listener);\n return () => {\n const current = slotListeners.get(id);\n if (!current) return;\n current.delete(listener);\n if (current.size === 0) slotListeners.delete(id);\n };\n}\n\n/** The keys a slot holds right now — the roots a targeted refetch matches on. */\nexport function slotKeys(id: string): readonly string[] {\n const slot = slots.get(id);\n if (!slot) return EMPTY_SNAPSHOT.keys;\n return allKeys(slot);\n}\n\n/**\n * The slot's projection, memoized to a stable reference.\n *\n * IT RECOMPUTES AND THEN COMPARES rather than trusting its dirty flag, because\n * a member notification does not always change what this slot renders — a\n * record whose field-set tag is still unsatisfied moves nothing here — and\n * handing back a fresh array for an unchanged list re-renders every consumer\n * for nothing. The elements themselves are the store's own reference-stable\n * snapshots, so comparing them is one identity check each.\n */\nexport function readSlot(id: string): SlotSnapshot {\n const slot = slots.get(id);\n if (!slot) return EMPTY_SNAPSHOT;\n if (!slot.dirty && slot.snapshot) return slot.snapshot;\n\n const shown = slot.keys.filter((key) => !slot.held.has(key));\n const items = project([...slot.optimisticHead, ...shown, ...slot.optimisticTail], slot.tag);\n const pending = project(slot.pending, slot.tag);\n const keys = allKeys(slot);\n const previous = slot.snapshot;\n slot.dirty = false;\n\n if (\n previous &&\n sameRefs(previous.items, items) &&\n sameRefs(previous.pending, pending) &&\n previous.pendingCount === slot.pending.length &&\n previous.meta === slot.meta &&\n sameStrings(previous.keys, keys)\n ) {\n return previous;\n }\n\n const next: SlotSnapshot = Object.freeze({\n items: Object.freeze(items),\n pending: Object.freeze(pending),\n pendingCount: slot.pending.length,\n meta: slot.meta,\n keys: Object.freeze(keys),\n });\n slot.snapshot = next;\n return next;\n}\n\n/**\n * Hydrate the members that are actually renderable.\n *\n * A KEY WITHOUT A SATISFIED TAG IS HELD BUT NOT RENDERED, and both halves\n * matter: dropping the key would lose a row the server told us about, while\n * rendering an unsatisfied record would hand a projection function a partial it\n * would misread as empty.\n */\nfunction project(keys: readonly string[], tag: string): unknown[] {\n const out: unknown[] = [];\n for (const key of keys) {\n const state = readState(key, tag);\n if (state.status === \"present\") out.push(state.record);\n }\n return out;\n}\n\nfunction sameRefs(a: readonly unknown[], b: readonly unknown[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\nfunction sameStrings(a: readonly string[], b: readonly string[]): boolean {\n return a.length === b.length && a.every((value, index) => value === b[index]);\n}\n\n/** Test seam. Nothing in the library calls this. */\nexport function resetSlots(): void {\n for (const slot of slots.values()) {\n for (const release of slot.memberReleases) release();\n slot.retainRelease?.();\n }\n slots.clear();\n slotListeners.clear();\n createdBridge?.();\n createdBridge = null;\n}\n"],"names":["EMPTY_SNAPSHOT","emptySlotSnapshot","slots","answerCounter","slotAnswerMark","slotListeners","createdBridge","ensureCreatedBridge","subscribeToRealtimeEvents","event","appendCreated","releaseCreatedBridgeIfIdle","acquireSlot","id","options","created","membershipOf","slot","released","current","release","writeSlot","keys","meta","settled","mark","page","held","showing","key","restoredHead","restoredTail","entry","answered","resubscribeMembers","invalidate","clearSlotMeta","slotPendingKeys","belongsTo","devWarn","type","scope","subscriptionKey","all","allKeys","subscribeToKey","onMemberChanged","retainKeys","pruneTombstoned","gone","isBaseTombstoned","pending","awaitingSettle","listeners","listener","addOptimisticMember","lists","position","joined","descriptor","settleOptimisticMember","tempKey","realKey","inHead","inTail","deferred","subscribeToSlot","slotKeys","readSlot","shown","items","project","previous","sameRefs","sameStrings","next","tag","out","state","readState","a","b","value","index","resetSlots"],"mappings":";;;AA+DA,MAAMA,IAA+B,OAAO,OAAO;AAAA,EACjD,OAAO,OAAO,OAAO,EAAE;AAAA,EACvB,SAAS,OAAO,OAAO,EAAE;AAAA,EACzB,cAAc;AAAA,EACd,MAAM;AAAA,EACN,MAAM,OAAO,OAAO,CAAA,CAAE;AACxB,CAAC;AAGM,SAASC,IAAkC;AAChD,SAAOD;AACT;AA+CA,MAAME,wBAAY,IAAA;AAMlB,IAAIC,IAAgB;AAGb,SAASC,IAAyB;AACvC,SAAOD;AACT;AAUA,MAAME,wBA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,MAAM,CAACE,GAAOC,MAAUD,MAAUD,EAAEE,CAAK,CAAC;AAC9E;AAEA,SAAST,EAAYM,GAAsBC,GAA+B;AACxE,SAAOD,EAAE,WAAWC,EAAE,UAAUD,EAAE,MAAM,CAACE,GAAOC,MAAUD,MAAUD,EAAEE,CAAK,CAAC;AAC9E;AAGO,SAASC,IAAmB;AACjC,aAAWnE,KAAQf,EAAM,UAAU;AACjC,eAAWkB,KAAWH,EAAK,eAAgB,CAAAG,EAAA;AAC3C,IAAAH,EAAK,gBAAA;AAAA,EACP;AACA,EAAAf,EAAM,MAAA,GACNG,EAAc,MAAA,GACdC,IAAA,GACAA,IAAgB;AAClB;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useRef as f, useEffect as m, useSyncExternalStore as a, useCallback as i } from "react";
|
|
2
|
+
import { useRealtimeRegistry as p } from "./provider.js";
|
|
3
|
+
import { scopeKey as h, normalizeScope as b, subscribeToRealtimeEpoch as l, readRealtimeEpoch as E } from "./registry.js";
|
|
4
|
+
function y(e, t, r) {
|
|
5
|
+
const o = p(), s = h(b(t)), c = [...r].sort().join(","), n = f({ scope: t, events: r });
|
|
6
|
+
n.current = { scope: t, events: r }, m(() => {
|
|
7
|
+
if (o)
|
|
8
|
+
return o.acquire(e.type, n.current.scope, n.current.events);
|
|
9
|
+
}, [o, e.type, s, c]);
|
|
10
|
+
}
|
|
11
|
+
const u = Object.freeze({
|
|
12
|
+
status: "unconfigured",
|
|
13
|
+
connection: "disconnected",
|
|
14
|
+
subscriptions: Object.freeze([]),
|
|
15
|
+
epoch: 0,
|
|
16
|
+
lastError: void 0
|
|
17
|
+
});
|
|
18
|
+
function d() {
|
|
19
|
+
const e = p(), t = i(
|
|
20
|
+
(s) => {
|
|
21
|
+
if (!e) return () => {
|
|
22
|
+
};
|
|
23
|
+
const c = e.subscribeToHealth(s), n = l(s);
|
|
24
|
+
return () => {
|
|
25
|
+
c(), n();
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
[e]
|
|
29
|
+
), r = i(() => e ? e.readHealth() : u, [e]), o = i(() => u, []);
|
|
30
|
+
return a(t, r, o);
|
|
31
|
+
}
|
|
32
|
+
function H() {
|
|
33
|
+
return a(l, E, () => 0);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
y as useRealtime,
|
|
37
|
+
H as useRealtimeEpoch,
|
|
38
|
+
d as useRealtimeHealth
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":["../../../src/lib/realtime/hooks.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useSyncExternalStore } from \"react\";\nimport type { RecordTypeToken } from \"../records\";\nimport { useRealtimeRegistry } from \"./provider\";\nimport { normalizeScope, readRealtimeEpoch, scopeKey, subscribeToRealtimeEpoch } from \"./registry\";\nimport type { RealtimeHealth, RealtimeScopeInput } from \"./types\";\n\n/* ============================================================================\n THE REALTIME HOOKS.\n\n ONE SIGNATURE — `useRealtime(Token, scope, events)`. It took three attempts\n to get here and each rejected version had the same shape of defect:\n\n - `useChannel(channel, id, events)` conflated the socket channel with the\n subscription. The channel is per type per tenant, so an `id` there is a\n component joining another tenant's channel.\n - a per-COMPONENT subscription would have a list of twenty-five rows\n declaring twenty-five of them. Subscription belongs to the record SET,\n not to the component, so the registry coalesces by (type, scope).\n - the `events` axis was dropped from the signature while the very next\n sentence required binding the union of them.\n\n THE TOKEN RATHER THAN A STRING, so the type name and the tenancy both come\n from registration and cannot drift from the record store's own key.\n ========================================================================= */\n\n/**\n * Declare that this component is looking at these records and wants these\n * events.\n *\n * COALESCED. Twenty-five components asking for the same scope produce ONE\n * server-side registration, and the union of everyone's event names is bound —\n * never the first caller's only, which is the live defect this module was\n * written against.\n *\n * NO-OP WITHOUT A PROVIDER. An application with realtime switched off keeps\n * fetching and keeps rendering; nothing here throws.\n *\n * @param token the record type, from `defineRecordType`\n * @param scope `\"all\"`, an id list, or `{filter}` the server evaluates\n * @param events event names to bind, e.g. `[\"created\", \"updated\", \"deleted\"]`\n */\nexport function useRealtime<T>(\n token: RecordTypeToken<T>,\n scope: RealtimeScopeInput,\n events: readonly string[],\n): void {\n const registry = useRealtimeRegistry();\n\n /* Both are derived to STRINGS rather than depended on by identity, because\n the natural call site builds a fresh array on every render — `ids.map(…)`,\n `[\"created\",\"updated\"]` — and depending on identity would tear the\n subscription down and rebuild it on every render, which for a subscription\n whose teardown is deliberately a no-op means a resubscribe storm. */\n const scopeSignature = scopeKey(normalizeScope(scope));\n const eventSignature = [...events].sort().join(\",\");\n\n /* The effect closes over the CURRENT `scope` and `events` while depending on\n their signatures, which is the point: an equal-but-fresh array re-renders\n and changes nothing here. */\n const latest = useRef({ scope, events });\n latest.current = { scope, events };\n\n useEffect(() => {\n if (!registry) return;\n return registry.acquire(token.type, latest.current.scope, latest.current.events);\n }, [registry, token.type, scopeSignature, eventSignature]);\n}\n\nconst IDLE_HEALTH: RealtimeHealth = Object.freeze({\n status: \"unconfigured\" as const,\n connection: \"disconnected\" as const,\n subscriptions: Object.freeze([]),\n epoch: 0,\n lastError: undefined,\n});\n\n/**\n * The renderable liveness state.\n *\n * IT IS RENDERABLE ON PURPOSE. A dead subscription is indistinguishable from a\n * quiet one, and the prior art's answer — a console panel behind a keyboard\n * shortcut — is why two real bugs in it went unnoticed for years. This is the\n * equivalent of `refreshing`: a word the reader can see, not a log line.\n */\nexport function useRealtimeHealth(): RealtimeHealth {\n const registry = useRealtimeRegistry();\n\n const subscribe = useCallback(\n (listener: () => void) => {\n if (!registry) return () => {};\n const stopHealth = registry.subscribeToHealth(listener);\n /* The epoch lives module-side so the read binding can consume it without\n a provider; health renders it, so it has to hear about both. */\n const stopEpoch = subscribeToRealtimeEpoch(listener);\n return () => {\n stopHealth();\n stopEpoch();\n };\n },\n [registry],\n );\n\n const getSnapshot = useCallback(() => (registry ? registry.readHealth() : IDLE_HEALTH), [registry]);\n const getServerSnapshot = useCallback(() => IDLE_HEALTH, []);\n\n return useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n}\n\n/**\n * The \"you may have missed events\" counter, for a consumer that wants to fold\n * it into its own invalidation rather than use the read binding.\n *\n * IT IS A REVISION, NEVER A READ KEY. A key change blanks the screen to a\n * skeleton; a revision keeps the answer on screen and marks it refreshing. This\n * signal exists because a subscription went dead and came back — recovering\n * from that by blanking the screen is a worse experience than the staleness.\n */\nexport function useRealtimeEpoch(): number {\n return useSyncExternalStore(subscribeToRealtimeEpoch, readRealtimeEpoch, () => 0);\n}\n"],"names":["useRealtime","token","scope","events","registry","useRealtimeRegistry","scopeSignature","scopeKey","normalizeScope","eventSignature","latest","useRef","useEffect","IDLE_HEALTH","useRealtimeHealth","subscribe","useCallback","listener","stopHealth","stopEpoch","subscribeToRealtimeEpoch","getSnapshot","getServerSnapshot","useSyncExternalStore","useRealtimeEpoch","readRealtimeEpoch"],"mappings":";;;AAyCO,SAASA,EACdC,GACAC,GACAC,GACM;AACN,QAAMC,IAAWC,EAAA,GAOXC,IAAiBC,EAASC,EAAeN,CAAK,CAAC,GAC/CO,IAAiB,CAAC,GAAGN,CAAM,EAAE,KAAA,EAAO,KAAK,GAAG,GAK5CO,IAASC,EAAO,EAAE,OAAAT,GAAO,QAAAC,GAAQ;AACvC,EAAAO,EAAO,UAAU,EAAE,OAAAR,GAAO,QAAAC,EAAA,GAE1BS,EAAU,MAAM;AACd,QAAKR;AACL,aAAOA,EAAS,QAAQH,EAAM,MAAMS,EAAO,QAAQ,OAAOA,EAAO,QAAQ,MAAM;AAAA,EACjF,GAAG,CAACN,GAAUH,EAAM,MAAMK,GAAgBG,CAAc,CAAC;AAC3D;AAEA,MAAMI,IAA8B,OAAO,OAAO;AAAA,EAChD,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,eAAe,OAAO,OAAO,EAAE;AAAA,EAC/B,OAAO;AAAA,EACP,WAAW;AACb,CAAC;AAUM,SAASC,IAAoC;AAClD,QAAMV,IAAWC,EAAA,GAEXU,IAAYC;AAAA,IAChB,CAACC,MAAyB;AACxB,UAAI,CAACb,EAAU,QAAO,MAAM;AAAA,MAAC;AAC7B,YAAMc,IAAad,EAAS,kBAAkBa,CAAQ,GAGhDE,IAAYC,EAAyBH,CAAQ;AACnD,aAAO,MAAM;AACX,QAAAC,EAAA,GACAC,EAAA;AAAA,MACF;AAAA,IACF;AAAA,IACA,CAACf,CAAQ;AAAA,EAAA,GAGLiB,IAAcL,EAAY,MAAOZ,IAAWA,EAAS,eAAeS,GAAc,CAACT,CAAQ,CAAC,GAC5FkB,IAAoBN,EAAY,MAAMH,GAAa,CAAA,CAAE;AAE3D,SAAOU,EAAqBR,GAAWM,GAAaC,CAAiB;AACvE;AAWO,SAASE,IAA2B;AACzC,SAAOD,EAAqBH,GAA0BK,GAAmB,MAAM,CAAC;AAClF;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useState as n, useRef as p, useEffect as i, useContext as l, createContext as R } from "react";
|
|
3
|
+
import { SubscriptionRegistry as x } from "./registry.js";
|
|
4
|
+
import { setRecordStoreTenant as a } from "../records/store.js";
|
|
5
|
+
const s = R(null);
|
|
6
|
+
function C({
|
|
7
|
+
transport: u,
|
|
8
|
+
tenant: e,
|
|
9
|
+
ownsStoreTenant: t = !0,
|
|
10
|
+
children: c,
|
|
11
|
+
...f
|
|
12
|
+
}) {
|
|
13
|
+
const [r] = n(() => new x({ transport: u, tenant: e, ...f })), o = p(e);
|
|
14
|
+
return i(() => (r.start(), () => r.stop()), [r]), i(() => {
|
|
15
|
+
o.current !== e && (o.current = e, r.setTenant(e)), t && a(e);
|
|
16
|
+
}, [r, e, t]), /* @__PURE__ */ m(s.Provider, { value: r, children: c });
|
|
17
|
+
}
|
|
18
|
+
function P() {
|
|
19
|
+
return l(s);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
C as RealtimeProvider,
|
|
23
|
+
P as useRealtimeRegistry
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sources":["../../../src/lib/realtime/provider.tsx"],"sourcesContent":["import { createContext, useContext, useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { setRecordStoreTenant } from \"../records\";\nimport { SubscriptionRegistry, type RegistryOptions } from \"./registry\";\n\n/* ============================================================================\n THE PROVIDER — where the injected transport and the tenant enter.\n\n TENANCY IS THE PROVIDER'S, NEVER THE CALLER'S. The socket channel is\n `Type.{tenant}` and is authorized as a tenant, so a component passing an id\n of its own would join another tenant's channel — a hook signature that lets a\n caller supply the wrong id is a tenancy bug with a convenient API. Here the\n caller names a TYPE and a SCOPE; the tenant comes from one place.\n\n THE STORE'S TENANT IS SET HERE TOO, because the two must move together. The\n store keys records `Type:id` with no tenant in them, so team B's demand #7\n would merge onto team A's — clearing the store handles what is already\n written, and the `tenant` stamped on each write handles what is still in the\n air. Setting one without the other leaves exactly half the guard.\n ========================================================================= */\n\nconst RealtimeContext = createContext<SubscriptionRegistry | null>(null);\n\nexport interface RealtimeProviderProps\n extends Omit<RegistryOptions, \"transport\" | \"tenant\" | \"now\"> {\n /**\n * Everything environment-specific in one object: socket, endpoints,\n * connection observer. INJECTED, never imported — see `types.ts` for why, and\n * for the one constraint on its implementation that a type cannot express.\n */\n readonly transport: RegistryOptions[\"transport\"];\n\n /**\n * The team, org or account these records belong to.\n *\n * CHANGING IT IS A REAL EVENT, not a re-render: every server-side\n * registration is dropped, every channel is left, the record store is\n * cleared, and everything still mounted re-subscribes under the new tenant.\n */\n readonly tenant?: string | number;\n\n /**\n * Whether this provider owns the record store's tenant. Default `true`.\n *\n * Set it false only when something else already calls\n * `setRecordStoreTenant` — two writers of one value is how they disagree.\n */\n readonly ownsStoreTenant?: boolean;\n\n readonly children: ReactNode;\n}\n\nexport function RealtimeProvider({\n transport,\n tenant,\n ownsStoreTenant = true,\n children,\n ...options\n}: RealtimeProviderProps) {\n const [registry] = useState(() => new SubscriptionRegistry({ transport, tenant, ...options }));\n const appliedTenant = useRef<string | number | undefined>(tenant);\n\n useEffect(() => {\n registry.start();\n /* `stop`, deliberately, NOT `dispose`: StrictMode's mount / unmount / mount\n must leave exactly one subscription, and disposing here would drop live\n registrations and re-issue them on the remount. */\n return () => registry.stop();\n }, [registry]);\n\n useEffect(() => {\n /* ORDER IS LOAD-BEARING. Tear the old registrations down first, then clear\n the store: clearing first would leave a window where the old channel's\n payloads write into a store that already claims to be the new tenant.\n\n NOT DURING RENDER, and not in a layout effect either — both would run\n before a child's own mount effect on the very first commit, but neither\n is needed for correctness: a fetch stamps the tenant it read at REQUEST\n time and resolves asynchronously, long after this has run. Mutating a\n module store during render is the thing that reliably breaks later. */\n if (appliedTenant.current !== tenant) {\n appliedTenant.current = tenant;\n registry.setTenant(tenant);\n }\n if (ownsStoreTenant) setRecordStoreTenant(tenant);\n }, [registry, tenant, ownsStoreTenant]);\n\n return <RealtimeContext.Provider value={registry}>{children}</RealtimeContext.Provider>;\n}\n\n/**\n * The registry, or `null` when no provider is mounted.\n *\n * THIS PACKAGE'S USUAL CONVENTION IS INVERTED HERE, DELIBERATELY. Every other\n * provider in this library throws when its hook is used outside it, and that is\n * right for a capability a component cannot work without. Realtime is not one:\n * an application with no transport configured must degrade to plain fetching,\n * never crash. A design system that hard-fails because an OPTIONAL capability\n * is absent is not offering an optional capability.\n */\nexport function useRealtimeRegistry(): SubscriptionRegistry | null {\n return useContext(RealtimeContext);\n}\n"],"names":["RealtimeContext","createContext","RealtimeProvider","transport","tenant","ownsStoreTenant","children","options","registry","useState","SubscriptionRegistry","appliedTenant","useRef","useEffect","useRealtimeRegistry","useContext"],"mappings":";;;;AAoBA,MAAMA,IAAkBC,EAA2C,IAAI;AA+BhE,SAASC,EAAiB;AAAA,EAC/B,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,UAAAC;AAAA,EACA,GAAGC;AACL,GAA0B;AACxB,QAAM,CAACC,CAAQ,IAAIC,EAAS,MAAM,IAAIC,EAAqB,EAAE,WAAAP,GAAW,QAAAC,GAAQ,GAAGG,EAAA,CAAS,CAAC,GACvFI,IAAgBC,EAAoCR,CAAM;AAEhE,SAAAS,EAAU,OACRL,EAAS,MAAA,GAIF,MAAMA,EAAS,KAAA,IACrB,CAACA,CAAQ,CAAC,GAEbK,EAAU,MAAM;AAUd,IAAIF,EAAc,YAAYP,MAC5BO,EAAc,UAAUP,GACxBI,EAAS,UAAUJ,CAAM,IAEvBC,OAAsCD,CAAM;AAAA,EAClD,GAAG,CAACI,GAAUJ,GAAQC,CAAe,CAAC,qBAE9BL,EAAgB,UAAhB,EAAyB,OAAOQ,GAAW,UAAAF,GAAS;AAC9D;AAYO,SAASQ,IAAmD;AACjE,SAAOC,EAAWf,CAAe;AACnC;"}
|