@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,232 @@
|
|
|
1
|
+
import { jsxs as W, jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import { useId as tt, useRef as a, useState as P, useLayoutEffect as g } from "react";
|
|
3
|
+
import { tv as et } from "tailwind-variants";
|
|
4
|
+
import { cn as nt } from "../lib/cn.js";
|
|
5
|
+
import { useControllable as ot } from "../lib/use-controllable.js";
|
|
6
|
+
import { Button as rt } from "./Button.js";
|
|
7
|
+
import { Icon as ct } from "./Icon.js";
|
|
8
|
+
import { useUiStrings as it } from "../lib/i18n/provider.js";
|
|
9
|
+
const st = et({
|
|
10
|
+
slots: {
|
|
11
|
+
root: "flex min-w-0 flex-col gap-1.5",
|
|
12
|
+
/* `overflow: hidden` is NOT in this list — the max-height writer below
|
|
13
|
+
sets it exactly while `max-height` is a pixel figure: clamped, and
|
|
14
|
+
every numeric frame of an expand or collapse transition. While clamped
|
|
15
|
+
it keeps the fade strip's `absolute inset-x-0 bottom-0` contained
|
|
16
|
+
inside this box; mid-transition it keeps the content still being
|
|
17
|
+
revealed from spilling over whatever sits below (DX-6416: a card's
|
|
18
|
+
description overflowed its box while Read more opened).
|
|
19
|
+
Left on at `none` it would clip a focus ring or a shadow on content
|
|
20
|
+
sitting near an EXPANDED block's own edge, so it goes with the cap. */
|
|
21
|
+
viewport: [
|
|
22
|
+
"relative min-w-0",
|
|
23
|
+
"transition-[var(--tx-colors),max-height] duration-[calc(var(--dur-base)*var(--motion-travel))] ease-standard"
|
|
24
|
+
],
|
|
25
|
+
/* `flow-root` gives this element its own block-formatting context, so its
|
|
26
|
+
children's margins never collapse through it regardless of whether the
|
|
27
|
+
viewport around it is currently clamping — see the module comment on
|
|
28
|
+
why a shifting top edge would throw off every measured line boundary.
|
|
29
|
+
Zeroing the first/last child's own margin removes the other half of the
|
|
30
|
+
same class of drift — the author's own opening/closing margin. */
|
|
31
|
+
content: "flow-root min-w-0 [&>:first-child]:mt-0 [&>:last-child]:mb-0",
|
|
32
|
+
/* The gradient runs top-to-bottom (transparent -> the fade colour), NOT
|
|
33
|
+
the reverse — a `to-b` gradient is transparent at ITS OWN top edge and
|
|
34
|
+
opaque at its own bottom edge, which is what leaves the visible line(s)
|
|
35
|
+
above it untouched and only darkens toward the boundary the toggle sits
|
|
36
|
+
under. The reverse (`to-t`) paints solid at the strip's top and fades
|
|
37
|
+
going down — right on top of the last visible line rather than below
|
|
38
|
+
it. The colour is a CSS custom property with a fallback, not a raw
|
|
39
|
+
utility, so a consumer can retint it — see `content/docs/read-more.mdx`
|
|
40
|
+
for the override. */
|
|
41
|
+
bar: "pointer-events-none absolute inset-x-0 bottom-0 bg-linear-to-b from-transparent to-[var(--read-more-fade,var(--color-surface))]",
|
|
42
|
+
toggle: "self-start"
|
|
43
|
+
}
|
|
44
|
+
}), b = 0.5, at = /* @__PURE__ */ new Set(["img", "svg", "video", "canvas", "iframe", "hr"]);
|
|
45
|
+
function ut(i) {
|
|
46
|
+
const l = [], u = document.createTreeWalker(i, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
|
|
47
|
+
acceptNode(e) {
|
|
48
|
+
return e.nodeType === Node.ELEMENT_NODE ? at.has(e.localName) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
for (let e = u.nextNode(); e; e = u.nextNode()) {
|
|
52
|
+
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
53
|
+
const o = e.getBoundingClientRect();
|
|
54
|
+
l.push({ top: o.top, bottom: o.bottom, width: o.width, height: o.height });
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const s = document.createRange();
|
|
58
|
+
s.selectNodeContents(e);
|
|
59
|
+
for (const o of Array.from(s.getClientRects()))
|
|
60
|
+
l.push({ top: o.top, bottom: o.bottom, width: o.width, height: o.height });
|
|
61
|
+
}
|
|
62
|
+
return l.filter((e) => !(e.height <= b));
|
|
63
|
+
}
|
|
64
|
+
function lt(i) {
|
|
65
|
+
const l = i.slice().sort((e, s) => e.top - s.top), u = [];
|
|
66
|
+
for (const e of l) {
|
|
67
|
+
const s = (e.top + e.bottom) / 2, o = u[u.length - 1];
|
|
68
|
+
o && s >= o.bandTop - b && s <= o.bandBottom + b ? (o.top = Math.min(o.top, e.top), o.bottom = Math.max(o.bottom, e.bottom)) : u.push({ bandTop: e.top, bandBottom: e.bottom, top: e.top, bottom: e.bottom });
|
|
69
|
+
}
|
|
70
|
+
return u.map((e) => ({ top: e.top, bottom: e.bottom }));
|
|
71
|
+
}
|
|
72
|
+
function dt(i, l) {
|
|
73
|
+
const u = i.getBoundingClientRect().top, e = ut(i), s = lt(e);
|
|
74
|
+
return (s.length > l + 1 ? s.slice(0, l + 1) : s).map((v) => ({ top: v.top - u, bottom: v.bottom - u }));
|
|
75
|
+
}
|
|
76
|
+
function $() {
|
|
77
|
+
return typeof window > "u" ? !1 : window.getComputedStyle(document.documentElement).getPropertyValue("--motion-travel").trim() === "1";
|
|
78
|
+
}
|
|
79
|
+
function wt({
|
|
80
|
+
lines: i,
|
|
81
|
+
children: l,
|
|
82
|
+
expanded: u,
|
|
83
|
+
defaultExpanded: e = !1,
|
|
84
|
+
onExpandedChange: s,
|
|
85
|
+
moreLabel: o,
|
|
86
|
+
lessLabel: v,
|
|
87
|
+
className: j,
|
|
88
|
+
ref: q
|
|
89
|
+
}) {
|
|
90
|
+
if (!Number.isInteger(i) || i < 0)
|
|
91
|
+
throw new Error(`ReadMore: \`lines\` must be a non-negative integer, got ${i}.`);
|
|
92
|
+
const f = st(), y = it().readMore, F = tt(), [d, L] = ot(u, e, s), R = a(d);
|
|
93
|
+
R.current = d;
|
|
94
|
+
const B = a(i);
|
|
95
|
+
B.current = i;
|
|
96
|
+
const [x, V] = P(!1), [N, G] = P(null), [I, K] = P(0), A = a(x), T = a(N), p = a(null), C = a(null), O = a(null), w = a(void 0), h = a([]);
|
|
97
|
+
function S() {
|
|
98
|
+
const n = p.current;
|
|
99
|
+
if (!n) throw new Error("ReadMore: content element is not mounted.");
|
|
100
|
+
return n.getBoundingClientRect();
|
|
101
|
+
}
|
|
102
|
+
function _() {
|
|
103
|
+
return S().height;
|
|
104
|
+
}
|
|
105
|
+
const H = a(() => {
|
|
106
|
+
h.current.forEach((r) => cancelAnimationFrame(r)), h.current = [];
|
|
107
|
+
const n = C.current;
|
|
108
|
+
if (!n) return;
|
|
109
|
+
function t(r) {
|
|
110
|
+
w.current = r, n.style.maxHeight = r === void 0 ? "" : r === "none" ? "none" : `${r}px`, n.style.overflow = typeof r == "number" ? "hidden" : "";
|
|
111
|
+
}
|
|
112
|
+
if (!A.current) {
|
|
113
|
+
t(void 0);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (R.current) {
|
|
117
|
+
if (!$()) {
|
|
118
|
+
t("none");
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const r = _(), m = n.getBoundingClientRect().height;
|
|
122
|
+
if (!(Math.abs(m - r) > b)) {
|
|
123
|
+
t("none");
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
t(r);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (T.current === null)
|
|
130
|
+
throw new Error("ReadMore: collapsing while overflowing but clampPx is null — measurement invariant violated.");
|
|
131
|
+
const c = T.current;
|
|
132
|
+
if ($() && w.current === "none") {
|
|
133
|
+
t(_());
|
|
134
|
+
const r = requestAnimationFrame(() => {
|
|
135
|
+
const m = requestAnimationFrame(() => t(c));
|
|
136
|
+
h.current.push(m);
|
|
137
|
+
});
|
|
138
|
+
h.current.push(r);
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
t(c);
|
|
142
|
+
}).current;
|
|
143
|
+
g(() => {
|
|
144
|
+
const n = C.current;
|
|
145
|
+
if (!n) return;
|
|
146
|
+
function t(c) {
|
|
147
|
+
c.target !== n || c.propertyName !== "max-height" || !R.current || w.current === "none" || (w.current = "none", n.style.maxHeight = "none", n.style.overflow = "");
|
|
148
|
+
}
|
|
149
|
+
return n.addEventListener("transitionend", t), () => n.removeEventListener("transitionend", t);
|
|
150
|
+
}, []);
|
|
151
|
+
const M = a(() => {
|
|
152
|
+
const n = p.current;
|
|
153
|
+
if (!n) return;
|
|
154
|
+
const t = B.current, c = dt(n, t), r = c.length > t, m = r ? t === 0 ? 0 : Math.min(c[t - 1].bottom, c[t].top) : null, D = c[t - 1] ? c[t - 1].bottom - c[t - 1].top : 0, Q = t >= 2 && c[t - 2] ? c[t - 2].bottom : 0, Y = r ? Math.max(0, m - Q) : 0, Z = r && t > 0 ? Math.min(D * Math.min(1, (t - 1) / 2), Y) : 0;
|
|
155
|
+
A.current = r, T.current = m, V(r), G(m), K(Z), H();
|
|
156
|
+
}).current;
|
|
157
|
+
g(() => {
|
|
158
|
+
const n = p.current;
|
|
159
|
+
if (!n) return;
|
|
160
|
+
M();
|
|
161
|
+
const t = new ResizeObserver(() => M());
|
|
162
|
+
return t.observe(n), () => t.disconnect();
|
|
163
|
+
}, []);
|
|
164
|
+
const k = a(!1);
|
|
165
|
+
g(() => {
|
|
166
|
+
if (!k.current) {
|
|
167
|
+
k.current = !0;
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
M();
|
|
171
|
+
}, [i]);
|
|
172
|
+
const z = a(!1);
|
|
173
|
+
g(() => {
|
|
174
|
+
if (!z.current) {
|
|
175
|
+
z.current = !0;
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
!d && p.current?.contains(document.activeElement) && O.current?.focus(), H();
|
|
179
|
+
}, [d]), g(() => () => h.current.forEach((n) => cancelAnimationFrame(n)), []);
|
|
180
|
+
function U() {
|
|
181
|
+
L(!d);
|
|
182
|
+
}
|
|
183
|
+
function X(n) {
|
|
184
|
+
if (!x || d || N === null) return;
|
|
185
|
+
const t = S().top;
|
|
186
|
+
n.target.getBoundingClientRect().bottom - t > N + b && L(!0);
|
|
187
|
+
}
|
|
188
|
+
const J = x && !d;
|
|
189
|
+
return /* @__PURE__ */ W("div", { ref: q, className: nt(f.root(), j), children: [
|
|
190
|
+
/* @__PURE__ */ W("div", { ref: C, className: f.viewport(), children: [
|
|
191
|
+
/* @__PURE__ */ E(
|
|
192
|
+
"div",
|
|
193
|
+
{
|
|
194
|
+
ref: p,
|
|
195
|
+
id: F,
|
|
196
|
+
"data-slot": "read-more-content",
|
|
197
|
+
className: f.content(),
|
|
198
|
+
onFocus: X,
|
|
199
|
+
children: l
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
J && I > 0 && /* @__PURE__ */ E(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
"aria-hidden": "true",
|
|
206
|
+
"data-slot": "read-more-bar",
|
|
207
|
+
className: f.bar(),
|
|
208
|
+
style: { height: `${I}px` }
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
] }),
|
|
212
|
+
x && /* @__PURE__ */ E(
|
|
213
|
+
rt,
|
|
214
|
+
{
|
|
215
|
+
ref: O,
|
|
216
|
+
type: "button",
|
|
217
|
+
variant: "link",
|
|
218
|
+
size: "sm",
|
|
219
|
+
"aria-expanded": d,
|
|
220
|
+
"aria-controls": F,
|
|
221
|
+
trailingIcon: /* @__PURE__ */ E(ct, { name: d ? "chevron-up" : "chevron-down", size: "xs" }),
|
|
222
|
+
onClick: U,
|
|
223
|
+
className: f.toggle(),
|
|
224
|
+
children: d ? v ?? y.less : o ?? y.more
|
|
225
|
+
}
|
|
226
|
+
)
|
|
227
|
+
] });
|
|
228
|
+
}
|
|
229
|
+
export {
|
|
230
|
+
wt as ReadMore
|
|
231
|
+
};
|
|
232
|
+
//# sourceMappingURL=ReadMore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReadMore.js","sources":["../../src/components/ReadMore.tsx"],"sourcesContent":["import { useLayoutEffect, useId, useRef, useState, type ReactNode, type Ref } from \"react\";\r\nimport { tv } from \"tailwind-variants\";\r\nimport { cn } from \"../lib/cn\";\r\nimport { useUiStrings } from \"../lib/i18n\";\r\nimport { useControllable } from \"../lib/use-controllable\";\r\nimport { Button } from \"./Button\";\r\nimport { Icon } from \"./Icon\";\r\n\r\n/* ============================================================================\r\n READ MORE — clamp block content to N *rendered lines*, behind a fade strip\r\n and a single toggle.\r\n\r\n THE CLAMP IS `min(bottom of line N, top of line N+1)` — MEASURED, not\r\n computed from `line-height`. A wrapper's own `line-height` is not the\r\n content's: Markdown sets its own leading, headings set their own size, code\r\n blocks set their own monospace metrics. So this walks the content in DOM\r\n order — its text nodes via a `Range` per node, and `img`/`svg`/`video`/\r\n `canvas`/`iframe`/`hr` via their own `getBoundingClientRect()` — reads the\r\n boxes the browser already laid out, and GROUPS them into lines. A rect\r\n joins the CURRENT line only when its vertical midpoint falls inside that\r\n line's FIRST rect's own `[top, bottom]` band — a FIXED band, never widened\r\n as more rects join. Chaining overlap instead (each new rect testing against\r\n the line's growing max) was tried and is wrong: it merges a tight-leading\r\n heading's own line into the paragraph below it, because the growing band\r\n eventually overlaps the next thing down. Capping the clamp at\r\n `min(line N's bottom, line N+1's top)` rather than just line N's bottom is\r\n the other half of the same fix — an ascender on line N+1 can sit visually\r\n ABOVE where line N's own rect ends, and without the cap it would poke\r\n through the clamp.\r\n\r\n TWO BOXES, NOT ONE. `viewport` is the element the clamp is APPLIED to —\r\n `max-height`, written imperatively (see below) — and `overflow: hidden`\r\n only while actually clamped, so a real CSS transition has something to\r\n animate between two concrete states. `content` (`data-slot=\r\n \"read-more-content\"`) is the element that is MEASURED and watched by\r\n `ResizeObserver`, and it never itself carries a height cap, so its line\r\n boxes are always the true ones regardless of whether `viewport` is\r\n currently clamping.\r\n\r\n EXPANDED ENDS AT `max-height: none`, NEVER A MEASURED NUMBER — so content\r\n that grows after expanding (streamed Markdown, an image finishing layout)\r\n is never clipped. Getting there needs a REAL number to transition from\r\n first: the viewport is set to the content's current measured height (a\r\n genuine CSS transition, so `transitionend` fires), and only once that\r\n transition completes does the viewport move to `\"none\"`. With no motion\r\n allowed (`readMotionAllowed()` below), there is no transition to wait on,\r\n so `\"none\"` is written immediately. Collapsing back FROM `\"none\"` cannot\r\n itself be animated — a browser does not tween out of `none` — so it is\r\n frozen at the current measured height first (same rendered size, so no\r\n visible jump), then moved to the clamp on the next two animation frames,\r\n which is what actually gives the browser something numeric to transition\r\n between.\r\n\r\n ONE BUTTON, ONE TREE POSITION, below the clamp in both states — never\r\n inside the fade strip, never swapped for a second element once expanded.\r\n Clicking it can never itself move focus, because the element under the\r\n pointer never unmounts.\r\n\r\n THE FADE STRIP ONLY EXISTS WHILE ACTUALLY CLAMPED (`overflowing &&\r\n !expanded`) — once expanded there is nothing left to fade into, and\r\n nothing here pretends otherwise. Its height is `min(h(N) x min(1,\r\n (N-1)/2), clamp - bottom of line N-1)`: zero at `lines={1}` (nothing\r\n renders — the toggle below is the only affordance a single-line clamp\r\n needs), otherwise up to half a line at `lines={2}` and up to one full\r\n line from `lines={3}` up, SECOND-capped so it can never reach up into\r\n line N-1's own box — a tightly-leaded pair of lines can leave less room\r\n between them than the formula's first half alone would claim, and\r\n without the second cap the strip would paint over line N-1's own tail.\r\n\r\n A TABBED-TO ELEMENT INSIDE THE CLAMP EXPANDS IT — but only when that\r\n element's own rect actually extends past the clamp boundary. A focusable\r\n element that happens to sit entirely within the visible, un-clipped part of\r\n a collapsed block does not need to force an expand.\r\n ========================================================================= */\r\n\r\nconst readMore = tv({\r\n slots: {\r\n root: \"flex min-w-0 flex-col gap-1.5\",\r\n /* `overflow: hidden` is NOT in this list — the max-height writer below\r\n sets it exactly while `max-height` is a pixel figure: clamped, and\r\n every numeric frame of an expand or collapse transition. While clamped\r\n it keeps the fade strip's `absolute inset-x-0 bottom-0` contained\r\n inside this box; mid-transition it keeps the content still being\r\n revealed from spilling over whatever sits below (DX-6416: a card's\r\n description overflowed its box while Read more opened).\r\n Left on at `none` it would clip a focus ring or a shadow on content\r\n sitting near an EXPANDED block's own edge, so it goes with the cap. */\r\n viewport: [\r\n \"relative min-w-0\",\r\n \"transition-[var(--tx-colors),max-height] duration-[calc(var(--dur-base)*var(--motion-travel))] ease-standard\",\r\n ],\r\n /* `flow-root` gives this element its own block-formatting context, so its\r\n children's margins never collapse through it regardless of whether the\r\n viewport around it is currently clamping — see the module comment on\r\n why a shifting top edge would throw off every measured line boundary.\r\n Zeroing the first/last child's own margin removes the other half of the\r\n same class of drift — the author's own opening/closing margin. */\r\n content: \"flow-root min-w-0 [&>:first-child]:mt-0 [&>:last-child]:mb-0\",\r\n /* The gradient runs top-to-bottom (transparent -> the fade colour), NOT\r\n the reverse — a `to-b` gradient is transparent at ITS OWN top edge and\r\n opaque at its own bottom edge, which is what leaves the visible line(s)\r\n above it untouched and only darkens toward the boundary the toggle sits\r\n under. The reverse (`to-t`) paints solid at the strip's top and fades\r\n going down — right on top of the last visible line rather than below\r\n it. The colour is a CSS custom property with a fallback, not a raw\r\n utility, so a consumer can retint it — see `content/docs/read-more.mdx`\r\n for the override. */\r\n bar: \"pointer-events-none absolute inset-x-0 bottom-0 bg-linear-to-b from-transparent to-[var(--read-more-fade,var(--color-surface))]\",\r\n toggle: \"self-start\",\r\n },\r\n});\r\n\r\n/** Ignore a rect degenerate enough to be a layout artefact rather than a real glyph or a real blank line. */\r\nconst RECT_EPSILON = 0.5;\r\n\r\n/** Walked as one line box each, via their own `getBoundingClientRect()` rather than a text `Range`.\r\n * Matched against `localName`, NEVER `tagName` — `tagName` uppercases for\r\n * ordinary HTML elements but NOT for SVG (a foreign, case-sensitive XML\r\n * namespace): an `<svg>` written lower-case, as every author writes it,\r\n * reports `tagName === \"svg\"`, which never matched an upper-case set and\r\n * silently walked past every SVG body unmeasured. `localName` is lower-case\r\n * for both namespaces uniformly. */\r\nconst REPLACED_TAGS = new Set([\"img\", \"svg\", \"video\", \"canvas\", \"iframe\", \"hr\"]);\r\n\r\ninterface RawRect {\r\n top: number;\r\n bottom: number;\r\n width: number;\r\n height: number;\r\n}\r\n\r\ninterface LineBox {\r\n top: number;\r\n bottom: number;\r\n}\r\n\r\n/** Every rect this component will consider, walked in DOM order, relative to nothing yet (viewport coordinates). */\r\nfunction collectRects(root: HTMLElement): RawRect[] {\r\n const rects: RawRect[] = [];\r\n\r\n const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {\r\n acceptNode(node) {\r\n if (node.nodeType === Node.ELEMENT_NODE) {\r\n return REPLACED_TAGS.has((node as Element).localName) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\r\n }\r\n // Every text node is accepted, INCLUDING whitespace-only ones — a run of\r\n // whitespace between two `<br>`s is a genuine blank line, and rejecting\r\n // it here would make it unmeasurable no matter what the rect says.\r\n // What actually filters noise is the rect-level check below.\r\n return NodeFilter.FILTER_ACCEPT;\r\n },\r\n });\r\n\r\n for (let node = walker.nextNode(); node; node = walker.nextNode()) {\r\n if (node.nodeType === Node.ELEMENT_NODE) {\r\n const rect = (node as Element).getBoundingClientRect();\r\n rects.push({ top: rect.top, bottom: rect.bottom, width: rect.width, height: rect.height });\r\n continue;\r\n }\r\n const range = document.createRange();\r\n range.selectNodeContents(node);\r\n for (const rect of Array.from(range.getClientRects())) {\r\n rects.push({ top: rect.top, bottom: rect.bottom, width: rect.width, height: rect.height });\r\n }\r\n }\r\n\r\n return rects.filter((rect) => {\r\n // A rect with NO height contributes nothing to any line, regardless of\r\n // width — reject it outright. A rect with real height but zero WIDTH is\r\n // kept: that is exactly the shape a blank line's whitespace produces.\r\n if (rect.height <= RECT_EPSILON) return false;\r\n return true;\r\n });\r\n}\r\n\r\n/**\r\n * Group rects into lines. A rect joins the line currently being built only\r\n * when its vertical MIDPOINT falls inside that line's FIRST rect's own\r\n * `[top, bottom]` — a band fixed at the moment the line started, never\r\n * widened by later members. See the module comment for why a growing band\r\n * (this function's previous shape) merges lines that should stay separate.\r\n */\r\nfunction groupIntoLines(rects: RawRect[]): LineBox[] {\r\n const sorted = rects.slice().sort((a, b) => a.top - b.top);\r\n\r\n const lines: { bandTop: number; bandBottom: number; top: number; bottom: number }[] = [];\r\n for (const rect of sorted) {\r\n const mid = (rect.top + rect.bottom) / 2;\r\n const current = lines[lines.length - 1];\r\n if (current && mid >= current.bandTop - RECT_EPSILON && mid <= current.bandBottom + RECT_EPSILON) {\r\n current.top = Math.min(current.top, rect.top);\r\n current.bottom = Math.max(current.bottom, rect.bottom);\r\n } else {\r\n lines.push({ bandTop: rect.top, bandBottom: rect.bottom, top: rect.top, bottom: rect.bottom });\r\n }\r\n }\r\n\r\n return lines.map((line) => ({ top: line.top, bottom: line.bottom }));\r\n}\r\n\r\n/**\r\n * Every rendered line inside `root`, relative to `root`'s own top, TRIMMED\r\n * to at most `maxLines + 1` entries — nothing past line N+1 changes either\r\n * the overflow decision or the clamp height. This is a RESULT trim, not an\r\n * early exit: `collectRects` walks the whole subtree and `groupIntoLines`\r\n * groups every rect it found before this function ever slices the output,\r\n * so there is no bounded-cost walk or bounded-cost grouping pass anywhere\r\n * in this file — both run to completion regardless of `maxLines`. Bounding\r\n * either of those would trade correctness for a saving this component has\r\n * no evidence it needs: `groupIntoLines` sorts by top BEFORE grouping\r\n * specifically so content whose DOM order and visual top order disagree (a\r\n * node later in the tree rendered visually higher) still groups correctly,\r\n * and a walk that stopped early on DOM order could not make that guarantee.\r\n */\r\nfunction computeLineBoxes(root: HTMLElement, maxLines: number): LineBox[] {\r\n const rootTop = root.getBoundingClientRect().top;\r\n const rects = collectRects(root);\r\n const lines = groupIntoLines(rects);\r\n\r\n const bounded = lines.length > maxLines + 1 ? lines.slice(0, maxLines + 1) : lines;\r\n return bounded.map((line) => ({ top: line.top - rootTop, bottom: line.bottom - rootTop }));\r\n}\r\n\r\n/**\r\n * The single reduced-motion answer this component acts on, read fresh every\r\n * time — `--motion-travel` is 0 under both the OS query and the in-app\r\n * override, 1 otherwise (`styles/motion.css`). Anything other than exactly\r\n * `\"1\"` — including an empty string, which is what an environment with no CSS\r\n * engine reports (this component's own tests, for instance) — is treated as\r\n * \"do not animate\": the safer default for an unreadable answer is no motion,\r\n * never assumed motion.\r\n */\r\nfunction readMotionAllowed(): boolean {\r\n if (typeof window === \"undefined\") return false;\r\n return (\r\n window.getComputedStyle(document.documentElement).getPropertyValue(\"--motion-travel\").trim() === \"1\"\r\n );\r\n}\r\n\r\nexport interface ReadMoreProps {\r\n /** Collapsed line count — how many rendered lines show before the fade strip. Must be a non-negative integer; anything else throws. `0` hides the content entirely behind the toggle (no fade strip). */\r\n lines: number;\r\n /** Typically rendered Markdown — paragraphs, headings, lists, code, images. See the module comment on why the clamp is a measured line boundary rather than a computed height. */\r\n children: ReactNode;\r\n /** Controlled expanded state. Omit to let the component hold its own (seeded by `defaultExpanded`). */\r\n expanded?: boolean;\r\n /** Uncontrolled initial state. Ignored once `expanded` is supplied. @default false */\r\n defaultExpanded?: boolean;\r\n /** Fires on every toggle, controlled or not. */\r\n onExpandedChange?: (expanded: boolean) => void;\r\n /** Absent, the built-in \"Read more\" word of the active `UiLocaleProvider`. */\r\n moreLabel?: string;\r\n /** Absent, the built-in \"Show less\" word of the active `UiLocaleProvider`. */\r\n lessLabel?: string;\r\n className?: string;\r\n ref?: Ref<HTMLDivElement>;\r\n}\r\n\r\n/**\r\n * Clamp block content to `lines` rendered lines behind a fade strip and a\r\n * single \"Read more\" / \"Show less\" toggle. Renders neither the strip nor the\r\n * toggle when the content already fits — see the module comment for how that\r\n * is decided.\r\n */\r\nexport function ReadMore({\r\n lines,\r\n children,\r\n expanded: expandedProp,\r\n defaultExpanded = false,\r\n onExpandedChange,\r\n moreLabel,\r\n lessLabel,\r\n className,\r\n ref,\r\n}: ReadMoreProps) {\r\n if (!Number.isInteger(lines) || lines < 0) {\r\n throw new Error(`ReadMore: \\`lines\\` must be a non-negative integer, got ${lines}.`);\r\n }\r\n\r\n const s = readMore();\r\n const strings = useUiStrings().readMore;\r\n const contentId = useId();\r\n\r\n const [expanded, setExpanded] = useControllable(expandedProp, defaultExpanded, onExpandedChange);\r\n const expandedRef = useRef(expanded);\r\n expandedRef.current = expanded;\r\n\r\n const linesRef = useRef(lines);\r\n linesRef.current = lines;\r\n\r\n const [overflowing, setOverflowing] = useState(false);\r\n const [clampPx, setClampPx] = useState<number | null>(null);\r\n const [fadePx, setFadePx] = useState(0);\r\n const overflowingRef = useRef(overflowing);\r\n const clampPxRef = useRef(clampPx);\r\n\r\n const contentRef = useRef<HTMLDivElement>(null);\r\n const viewportRef = useRef<HTMLDivElement>(null);\r\n const buttonRef = useRef<HTMLButtonElement>(null);\r\n /* Mirrors the viewport's CURRENT `max-height`, so the writer below can tell\r\n \"was this already sitting at none\" synchronously. */\r\n const viewportMaxHeightRef = useRef<number | \"none\" | undefined>(undefined);\r\n const rafIds = useRef<number[]>([]);\r\n\r\n /** The content element's own rect, or a loud failure — never a silent `0`. */\r\n function contentRectOrThrow(): DOMRect {\r\n const el = contentRef.current;\r\n if (!el) throw new Error(\"ReadMore: content element is not mounted.\");\r\n return el.getBoundingClientRect();\r\n }\r\n\r\n function measureNaturalPx(): number {\r\n return contentRectOrThrow().height;\r\n }\r\n\r\n /* -------------------------------------------------------------------------\r\n VIEWPORT MAX-HEIGHT WRITER — a stable function (created once via the\r\n lazy `useRef` initialiser) that reads only refs, so it is always safe to\r\n call from inside an effect, a `ResizeObserver` callback, or the\r\n `transitionend` listener below, whichever captured an earlier render's\r\n closure. Written as a direct DOM mutation rather than React state: both\r\n the expand-then-none swap and the collapse freeze-then-shrink pair have\r\n to land in the exact frame they were computed in, and routing them\r\n through `setState` would let React coalesce a step away before the\r\n browser ever painted it. */\r\n const applyViewportMaxHeight = useRef(() => {\r\n rafIds.current.forEach((id) => cancelAnimationFrame(id));\r\n rafIds.current = [];\r\n\r\n const el = viewportRef.current;\r\n if (!el) return;\r\n\r\n function write(next: number | \"none\" | undefined) {\r\n viewportMaxHeightRef.current = next;\r\n el!.style.maxHeight = next === undefined ? \"\" : next === \"none\" ? \"none\" : `${next}px`;\r\n el!.style.overflow = typeof next === \"number\" ? \"hidden\" : \"\"; // with the cap only — see the `viewport` slot\r\n }\r\n\r\n if (!overflowingRef.current) {\r\n write(undefined);\r\n return;\r\n }\r\n\r\n if (expandedRef.current) {\r\n if (!readMotionAllowed()) {\r\n write(\"none\"); // nothing will transition, so there is nothing to wait on\r\n return;\r\n }\r\n\r\n /* Comparing against the viewport's OWN LIVE rendered height (not the\r\n stale target this function last wrote) is what makes this correct\r\n mid-transition too: content growing WHILE a 40->212 transition is\r\n still in flight is read here at wherever the animation currently\r\n sits, not at 40 or 212, so a second growth spurt restarts smoothly\r\n from there rather than from a stale number. */\r\n const naturalPx = measureNaturalPx();\r\n const currentRenderedPx = el.getBoundingClientRect().height;\r\n const isRealChange = Math.abs(currentRenderedPx - naturalPx) > RECT_EPSILON;\r\n if (!isRealChange) {\r\n /* The measured height already matches what is on screen — writing\r\n it again is not an animatable change either (same value in, same\r\n value out), so it would never fire `transitionend`. This is\r\n exactly the FIRST-EVER-MEASUREMENT case (nothing painted yet, so\r\n the viewport's natural un-clamped height already equals the\r\n content's own height) along with any other redundant remeasure\r\n that found no real growth — both go straight to \"none\". */\r\n write(\"none\");\r\n return;\r\n }\r\n write(naturalPx); // a real, animatable change — triggers the transition; `transitionend` below lands on \"none\"\r\n return;\r\n }\r\n\r\n // Collapsing.\r\n if (clampPxRef.current === null) {\r\n throw new Error(\"ReadMore: collapsing while overflowing but clampPx is null — measurement invariant violated.\");\r\n }\r\n const target = clampPxRef.current;\r\n\r\n if (readMotionAllowed() && viewportMaxHeightRef.current === \"none\") {\r\n write(measureNaturalPx()); // freeze — same rendered height as \"none\", no visible change\r\n const first = requestAnimationFrame(() => {\r\n const second = requestAnimationFrame(() => write(target));\r\n rafIds.current.push(second);\r\n });\r\n rafIds.current.push(first);\r\n return;\r\n }\r\n write(target);\r\n }).current;\r\n\r\n /* Only `transitionend` for `max-height`, only while still expanded (a\r\n transition that completed AFTER a fast re-toggle back to collapsed would\r\n otherwise stomp the freeze/shrink this same writer just started), and\r\n only when the viewport is not already at \"none\" (nothing to do). */\r\n useLayoutEffect(() => {\r\n const el = viewportRef.current;\r\n if (!el) return;\r\n function onTransitionEnd(event: TransitionEvent) {\r\n if (event.target !== el || event.propertyName !== \"max-height\") return;\r\n if (!expandedRef.current || viewportMaxHeightRef.current === \"none\") return;\r\n viewportMaxHeightRef.current = \"none\";\r\n el!.style.maxHeight = \"none\";\r\n el!.style.overflow = \"\";\r\n }\r\n el.addEventListener(\"transitionend\", onTransitionEnd);\r\n return () => el.removeEventListener(\"transitionend\", onTransitionEnd);\r\n }, []);\r\n\r\n /* -------------------------------------------------------------------------\r\n MEASUREMENT — also a stable function, so both effects below can share it\r\n without either recreating the other's closure. */\r\n const applyMeasurement = useRef(() => {\r\n const el = contentRef.current;\r\n if (!el) return;\r\n const n = linesRef.current;\r\n const boxes = computeLineBoxes(el, n);\r\n const nextOverflowing = boxes.length > n;\r\n // `n === 0` clamps to nothing: the whole content sits behind the toggle.\r\n const nextClampPx = nextOverflowing ? (n === 0 ? 0 : Math.min(boxes[n - 1]!.bottom, boxes[n]!.top)) : null;\r\n const nthLineHeight = boxes[n - 1] ? boxes[n - 1]!.bottom - boxes[n - 1]!.top : 0;\r\n /* Capped so the strip can never reach UP into line N-1's own box — its\r\n formula height (h(N) x a factor up to 1 full line) is otherwise only\r\n bounded by line N's OWN height, which says nothing about how much\r\n room actually exists between line N-1's bottom and the clamp point.\r\n A tightly-leaded pair of lines can leave less room than a full line's\r\n worth between them, and without this cap the strip would paint over\r\n the tail of line N-1's own text. */\r\n const prevLineBottom = n >= 2 && boxes[n - 2] ? boxes[n - 2]!.bottom : 0;\r\n const maxFadePx = nextOverflowing ? Math.max(0, nextClampPx! - prevLineBottom) : 0;\r\n const nextFadePx = nextOverflowing && n > 0 ? Math.min(nthLineHeight * Math.min(1, (n - 1) / 2), maxFadePx) : 0;\r\n\r\n overflowingRef.current = nextOverflowing;\r\n clampPxRef.current = nextClampPx;\r\n setOverflowing(nextOverflowing);\r\n setClampPx(nextClampPx);\r\n setFadePx(nextFadePx);\r\n applyViewportMaxHeight();\r\n }).current;\r\n\r\n /* Mounted ONCE — never rebuilt on a `children` change, and measures ONCE on\r\n mount (the sibling effects below both skip their own first run, since\r\n this one already covers it). Content changes are still caught with no\r\n resize event needed — `ResizeObserver` fires on its own whenever the box\r\n it watches changes size, which is exactly what new children do to\r\n `content`. */\r\n useLayoutEffect(() => {\r\n const el = contentRef.current;\r\n if (!el) return;\r\n applyMeasurement();\r\n const observer = new ResizeObserver(() => applyMeasurement());\r\n observer.observe(el);\r\n return () => observer.disconnect();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, []);\r\n\r\n const mountedLinesEffect = useRef(false);\r\n /* `lines` changing needs a full re-measure (a different N clamps at a\r\n different line entirely) but never needs the observer rebuilt — this\r\n effect re-runs the SAME measurement function the observer already owns.\r\n Skips its own first run: the mount effect above already measured once. */\r\n useLayoutEffect(() => {\r\n if (!mountedLinesEffect.current) {\r\n mountedLinesEffect.current = true;\r\n return;\r\n }\r\n applyMeasurement();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [lines]);\r\n\r\n const mountedExpandedEffect = useRef(false);\r\n /* The toggle path: re-apply the viewport's max-height whenever `expanded`\r\n moves, without re-measuring (nothing about the content changed). Skips\r\n its own first run for the same reason as above.\r\n\r\n On the EXPANDED -> COLLAPSED transition only (this effect runs once per\r\n change, skipping mount, so `!expanded` here means \"just collapsed\" —\r\n never \"still collapsed\" or \"just expanded\"), a focused element sitting\r\n inside the content is about to be clipped behind `overflow: hidden` —\r\n invisible but still focused, same class of problem `handleContentFocus`\r\n rescues on the way IN. Moving focus to the toggle keeps it on a visible,\r\n interactive element instead of leaving it stranded off-screen. */\r\n useLayoutEffect(() => {\r\n if (!mountedExpandedEffect.current) {\r\n mountedExpandedEffect.current = true;\r\n return;\r\n }\r\n if (!expanded && contentRef.current?.contains(document.activeElement)) {\r\n buttonRef.current?.focus();\r\n }\r\n applyViewportMaxHeight();\r\n // eslint-disable-next-line react-hooks/exhaustive-deps\r\n }, [expanded]);\r\n\r\n /* Cancels any in-flight animation-frame chain on unmount — a re-toggle\r\n mid-chain is already handled inside `applyViewportMaxHeight` itself\r\n (it cancels its own previous frames before scheduling new ones). */\r\n useLayoutEffect(() => {\r\n return () => rafIds.current.forEach((id) => cancelAnimationFrame(id));\r\n }, []);\r\n\r\n function handleToggle() {\r\n setExpanded(!expanded);\r\n }\r\n\r\n /* A tabbed-to element inside collapsed, clipped content is invisible and,\r\n inside a scrolling ancestor, impossible for the browser to bring into\r\n view correctly — so focus arriving on a descendant whose OWN rect\r\n extends past the clamp boundary expands it immediately. An element that\r\n sits entirely within the visible part of a collapsed block does not need\r\n to force an expand. */\r\n function handleContentFocus(event: React.FocusEvent<HTMLDivElement>) {\r\n if (!overflowing || expanded || clampPx === null) return;\r\n const contentTop = contentRectOrThrow().top;\r\n const targetBottom = event.target.getBoundingClientRect().bottom - contentTop;\r\n if (targetBottom > clampPx + RECT_EPSILON) setExpanded(true);\r\n }\r\n\r\n const clamped = overflowing && !expanded;\r\n\r\n return (\r\n <div ref={ref} className={cn(s.root(), className)}>\r\n <div ref={viewportRef} className={s.viewport()}>\r\n <div\r\n ref={contentRef}\r\n id={contentId}\r\n data-slot=\"read-more-content\"\r\n className={s.content()}\r\n onFocus={handleContentFocus}\r\n >\r\n {children}\r\n </div>\r\n {clamped && fadePx > 0 && (\r\n <div\r\n aria-hidden=\"true\"\r\n data-slot=\"read-more-bar\"\r\n className={s.bar()}\r\n style={{ height: `${fadePx}px` }}\r\n />\r\n )}\r\n </div>\r\n\r\n {overflowing && (\r\n <Button\r\n ref={buttonRef}\r\n type=\"button\"\r\n variant=\"link\"\r\n size=\"sm\"\r\n aria-expanded={expanded}\r\n aria-controls={contentId}\r\n trailingIcon={<Icon name={expanded ? \"chevron-up\" : \"chevron-down\"} size=\"xs\" />}\r\n onClick={handleToggle}\r\n className={s.toggle()}\r\n >\r\n {expanded ? (lessLabel ?? strings.less) : (moreLabel ?? strings.more)}\r\n </Button>\r\n )}\r\n </div>\r\n );\r\n}\r\n"],"names":["readMore","tv","RECT_EPSILON","REPLACED_TAGS","collectRects","root","rects","walker","node","rect","range","groupIntoLines","sorted","a","b","lines","mid","current","line","computeLineBoxes","maxLines","rootTop","readMotionAllowed","ReadMore","children","expandedProp","defaultExpanded","onExpandedChange","moreLabel","lessLabel","className","ref","s","strings","useUiStrings","contentId","useId","expanded","setExpanded","useControllable","expandedRef","useRef","linesRef","overflowing","setOverflowing","useState","clampPx","setClampPx","fadePx","setFadePx","overflowingRef","clampPxRef","contentRef","viewportRef","buttonRef","viewportMaxHeightRef","rafIds","contentRectOrThrow","el","measureNaturalPx","applyViewportMaxHeight","id","write","next","naturalPx","currentRenderedPx","target","first","second","useLayoutEffect","onTransitionEnd","event","applyMeasurement","n","boxes","nextOverflowing","nextClampPx","nthLineHeight","prevLineBottom","maxFadePx","nextFadePx","observer","mountedLinesEffect","mountedExpandedEffect","handleToggle","handleContentFocus","contentTop","clamped","jsxs","cn","jsx","Button","Icon"],"mappings":";;;;;;;;AA2EA,MAAMA,KAAWC,GAAG;AAAA,EAClB,OAAO;AAAA,IACL,MAAM;AAAA;AAAA;AAAA;AAAA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ACb,OAAO,EAAE,QAAQ,GAAGgB,CAAM,KAAA;AAAA,QAAK;AAAA,MAAA;AAAA,IACjC,GAEJ;AAAA,IAECL,KACC,gBAAA+C;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,KAAKrC;AAAA,QACL,MAAK;AAAA,QACL,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,iBAAejB;AAAA,QACf,iBAAeF;AAAA,QACf,gCAAeyD,IAAA,EAAK,MAAMvD,IAAW,eAAe,gBAAgB,MAAK,MAAK;AAAA,QAC9E,SAAS+C;AAAA,QACT,WAAWpD,EAAE,OAAA;AAAA,QAEZ,UAAAK,IAAYR,KAAaI,EAAQ,OAASL,KAAaK,EAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAClE,GAEJ;AAEJ;"}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { jsxs as u, Fragment as V, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRender as z } from "@base-ui/react/use-render";
|
|
3
|
+
import { tv as f } from "tailwind-variants";
|
|
4
|
+
import { cn as n } from "../lib/cn.js";
|
|
5
|
+
const v = [
|
|
6
|
+
"flex min-w-0 max-w-full flex-wrap items-center gap-1.5",
|
|
7
|
+
"[&>*]:min-w-0 [&>*]:max-w-full [&>*]:overflow-hidden"
|
|
8
|
+
], T = f({
|
|
9
|
+
slots: {
|
|
10
|
+
root: [
|
|
11
|
+
/* DX-4794: the tile's corner is `md` (10px); `Card`'s `radius="md"` draws the same one. */
|
|
12
|
+
"flex min-w-0 flex-col gap-2.5 rounded-md border bg-surface p-3 text-left",
|
|
13
|
+
"[--radius-outer:var(--radius-md)]",
|
|
14
|
+
"transition-[var(--tx-colors),box-shadow,translate] duration-(--dur-fast) ease-hover"
|
|
15
|
+
],
|
|
16
|
+
top: "flex min-w-0 flex-wrap items-start gap-2",
|
|
17
|
+
identifier: "font-mono text-2xs text-tertiary",
|
|
18
|
+
title: "text-sm font-medium text-primary text-pretty",
|
|
19
|
+
subtitle: "text-2xs text-tertiary text-pretty",
|
|
20
|
+
/* Contained, for the reasons written out over `recordCard.badges` below.
|
|
21
|
+
Both rows are the same row in two arrangements, and a defect fixed in one
|
|
22
|
+
of them is a defect waiting in the other. */
|
|
23
|
+
badges: v,
|
|
24
|
+
/* Auto-fit rather than a fixed column count: three metrics on a 286px lane
|
|
25
|
+
and six on a full-width row are the same component. */
|
|
26
|
+
metrics: "grid grid-cols-[repeat(auto-fit,minmax(4.5rem,1fr))] gap-x-3 gap-y-1.5",
|
|
27
|
+
metricLabel: "text-2xs text-tertiary",
|
|
28
|
+
/* `tabular-nums` because these sit in a column and are compared down it —
|
|
29
|
+
proportional digits make equal-length numbers different widths. */
|
|
30
|
+
metricValue: "tabular-nums text-sm text-primary",
|
|
31
|
+
footer: "flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-t border-border-subtle pt-2 text-2xs text-tertiary"
|
|
32
|
+
},
|
|
33
|
+
variants: {
|
|
34
|
+
emphasis: {
|
|
35
|
+
none: { root: "border-border" },
|
|
36
|
+
accent: { root: "border-accent-border" },
|
|
37
|
+
warning: { root: "border-warning-border" },
|
|
38
|
+
danger: { root: "border-danger-border" }
|
|
39
|
+
},
|
|
40
|
+
interactive: {
|
|
41
|
+
true: {
|
|
42
|
+
root: [
|
|
43
|
+
"cursor-pointer",
|
|
44
|
+
"hover:border-border-interactive hover:bg-surface-hover hover:shadow-md",
|
|
45
|
+
"hover:-translate-y-px active:translate-y-0 active:shadow-sm",
|
|
46
|
+
"focus-visible:border-accent"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
false: {}
|
|
50
|
+
},
|
|
51
|
+
selected: { true: { root: "border-accent bg-surface-selected" }, false: {} }
|
|
52
|
+
},
|
|
53
|
+
compoundVariants: [
|
|
54
|
+
/* Same reasoning as `Card`: pointing at a chosen record must DEEPEN it, not
|
|
55
|
+
repaint it with the unselected hover fill, which reads as no longer
|
|
56
|
+
chosen. Exactly one of these applies. */
|
|
57
|
+
{ interactive: !0, selected: !0, class: { root: "hover:bg-surface-selected-hover" } },
|
|
58
|
+
/* An emphasised border must survive hover. Without this the hover rule's
|
|
59
|
+
`border-border-interactive` replaces the danger hairline at equal
|
|
60
|
+
specificity, so the one card in the column that needed to stay marked
|
|
61
|
+
stops being marked at exactly the moment somebody points at it. */
|
|
62
|
+
{ interactive: !0, emphasis: "accent", class: { root: "hover:border-accent" } },
|
|
63
|
+
{ interactive: !0, emphasis: "warning", class: { root: "hover:border-warning" } },
|
|
64
|
+
{ interactive: !0, emphasis: "danger", class: { root: "hover:border-danger" } }
|
|
65
|
+
],
|
|
66
|
+
defaultVariants: { emphasis: "none", interactive: !1, selected: !1 }
|
|
67
|
+
}), l = f({
|
|
68
|
+
slots: {
|
|
69
|
+
handle: "inline-flex shrink-0 items-center self-stretch text-tertiary",
|
|
70
|
+
eyebrow: "block truncate font-mono text-2xs tracking-wide text-tertiary uppercase",
|
|
71
|
+
title: "block text-pretty font-display font-semibold text-primary",
|
|
72
|
+
/* See BADGE_ROW. A card is a fixed-width box in a column of them, so a row
|
|
73
|
+
that can be wider than its card is not a styling nit — on a phone it puts
|
|
74
|
+
ink outside the border people are using to tell one record from the next. */
|
|
75
|
+
badges: v,
|
|
76
|
+
media: "shrink-0 overflow-hidden rounded-md bg-surface-inset",
|
|
77
|
+
meta: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-tertiary"
|
|
78
|
+
},
|
|
79
|
+
variants: {
|
|
80
|
+
/**
|
|
81
|
+
* Layout, not content. `corner` is the assignee-avatar shape (small,
|
|
82
|
+
* square, sits beside the title); `cover` is the banner-image shape (full
|
|
83
|
+
* width, wide aspect). Same slot, same DOM position — only the geometry
|
|
84
|
+
* changes, which is the whole argument for not splitting this into two
|
|
85
|
+
* props.
|
|
86
|
+
*/
|
|
87
|
+
placement: {
|
|
88
|
+
corner: { media: "size-9" },
|
|
89
|
+
cover: { media: "aspect-video w-full" }
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* DX-3621 — `RecordCardTitle`'s own text size, independent of `as` (the
|
|
93
|
+
* heading LEVEL). Before this variant the title carried no explicit
|
|
94
|
+
* `text-*` class at all, so its rendered size was whatever the browser's
|
|
95
|
+
* UA default for the chosen heading level happened to be — a kanban board
|
|
96
|
+
* lane of `h4` titles rendering at UA default size, not a deliberate one.
|
|
97
|
+
* `md` (default) pins that same visual size explicitly rather than
|
|
98
|
+
* changing it out from under existing consumers; `sm` is for a dense
|
|
99
|
+
* listing (a kanban lane, a compact picker row) where several of these
|
|
100
|
+
* stack in view together.
|
|
101
|
+
*/
|
|
102
|
+
size: {
|
|
103
|
+
sm: { title: "text-sm" },
|
|
104
|
+
md: { title: "text-base" }
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* DX-4031 — whether `RecordCardTitle` is held to two lines. A variant on the slot rather than a conditional
|
|
108
|
+
* class, so the default output keeps `line-clamp-2` and `clamp={false}` swaps it for `line-clamp-none`.
|
|
109
|
+
*/
|
|
110
|
+
clamp: {
|
|
111
|
+
true: { title: "line-clamp-2" },
|
|
112
|
+
false: { title: "line-clamp-none" }
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
defaultVariants: { placement: "corner", size: "md", clamp: !0 }
|
|
116
|
+
});
|
|
117
|
+
function M({
|
|
118
|
+
identifier: e,
|
|
119
|
+
title: r,
|
|
120
|
+
subtitle: t,
|
|
121
|
+
badges: a,
|
|
122
|
+
metrics: i,
|
|
123
|
+
media: m,
|
|
124
|
+
action: c,
|
|
125
|
+
footer: p,
|
|
126
|
+
emphasis: h,
|
|
127
|
+
interactive: x,
|
|
128
|
+
selected: b,
|
|
129
|
+
render: g,
|
|
130
|
+
className: w,
|
|
131
|
+
children: y,
|
|
132
|
+
ref: N,
|
|
133
|
+
...R
|
|
134
|
+
}) {
|
|
135
|
+
const o = T({ emphasis: h, interactive: x, selected: b }), C = [m, e, r, t, c].some(
|
|
136
|
+
(d) => d != null
|
|
137
|
+
);
|
|
138
|
+
return z({
|
|
139
|
+
render: g,
|
|
140
|
+
ref: N,
|
|
141
|
+
/* Same rule as `Card`: an interactive record card is a real button, so it
|
|
142
|
+
is focusable, activates on Enter and Space, and announces as actionable.
|
|
143
|
+
A `render` prop overrides it for the link case. */
|
|
144
|
+
defaultTagName: x ? "button" : "div",
|
|
145
|
+
props: {
|
|
146
|
+
className: n(o.root(), w),
|
|
147
|
+
...R,
|
|
148
|
+
children: /* @__PURE__ */ u(V, { children: [
|
|
149
|
+
C && /* @__PURE__ */ u("div", { className: o.top(), children: [
|
|
150
|
+
m,
|
|
151
|
+
/* @__PURE__ */ u("div", { className: n("flex flex-1 flex-col gap-0.5", c ? void 0 : "min-w-0"), children: [
|
|
152
|
+
e != null && /* @__PURE__ */ s("span", { className: o.identifier(), children: e }),
|
|
153
|
+
r != null && /* @__PURE__ */ s("span", { className: o.title(), children: r }),
|
|
154
|
+
t != null && /* @__PURE__ */ s("span", { className: o.subtitle(), children: t })
|
|
155
|
+
] }),
|
|
156
|
+
c
|
|
157
|
+
] }),
|
|
158
|
+
a && /* @__PURE__ */ s("div", { className: o.badges(), children: a }),
|
|
159
|
+
i && i.length > 0 && /* @__PURE__ */ s("div", { className: o.metrics(), children: i.map((d, k) => /* @__PURE__ */ u("div", { className: "flex min-w-0 flex-col", children: [
|
|
160
|
+
/* @__PURE__ */ s("span", { className: o.metricLabel(), children: d.label }),
|
|
161
|
+
/* @__PURE__ */ s("span", { className: o.metricValue(), children: d.value })
|
|
162
|
+
] }, k)) }),
|
|
163
|
+
y,
|
|
164
|
+
p && /* @__PURE__ */ s("div", { className: o.footer(), children: p })
|
|
165
|
+
] })
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function A({ className: e, children: r, ref: t }) {
|
|
170
|
+
const a = l();
|
|
171
|
+
return /* @__PURE__ */ s("span", { ref: t, className: n(a.handle(), e), children: r });
|
|
172
|
+
}
|
|
173
|
+
function D({ className: e, children: r, ref: t }) {
|
|
174
|
+
const a = l();
|
|
175
|
+
return /* @__PURE__ */ s("span", { ref: t, className: n(a.eyebrow(), e), children: r });
|
|
176
|
+
}
|
|
177
|
+
function F({ as: e = "h3", size: r = "md", clamp: t = !0, className: a, children: i, ref: m }) {
|
|
178
|
+
const c = l({ size: r, clamp: t });
|
|
179
|
+
return /* @__PURE__ */ s(e, { ref: m, className: n(c.title(), a), children: i });
|
|
180
|
+
}
|
|
181
|
+
function G({ className: e, children: r, ref: t }) {
|
|
182
|
+
const a = l();
|
|
183
|
+
return /* @__PURE__ */ s("div", { ref: t, className: n(a.badges(), e), children: r });
|
|
184
|
+
}
|
|
185
|
+
function H({ placement: e, className: r, children: t, ref: a }) {
|
|
186
|
+
const i = l({ placement: e });
|
|
187
|
+
return /* @__PURE__ */ s("div", { ref: a, className: n(i.media(), r), children: t });
|
|
188
|
+
}
|
|
189
|
+
function O({ className: e, children: r, ref: t }) {
|
|
190
|
+
const a = l();
|
|
191
|
+
return /* @__PURE__ */ s("div", { ref: t, className: n(a.meta(), e), children: r });
|
|
192
|
+
}
|
|
193
|
+
export {
|
|
194
|
+
M as RecordCard,
|
|
195
|
+
G as RecordCardBadges,
|
|
196
|
+
D as RecordCardEyebrow,
|
|
197
|
+
A as RecordCardHandle,
|
|
198
|
+
H as RecordCardMedia,
|
|
199
|
+
O as RecordCardMeta,
|
|
200
|
+
F as RecordCardTitle
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=RecordCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecordCard.js","sources":["../../src/components/RecordCard.tsx"],"sourcesContent":["import type { ReactNode, Ref } from \"react\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn\";\n\n/* ----------------------------------------------------------------------------\n RECORD CARD — one row of a system of record, wherever it is shown.\n\n A queue, a board lane, a search result and a picker all render the same four\n things about a record: what it is called, what identifies it, what state it\n is in, and two or three numbers worth seeing without opening it. `Card` gives\n the box; this gives that arrangement, so the fifth surface to need it does\n not invent a fifth spacing.\n\n WHY THIS IS NOT `CardHeader` WITH MORE SLOTS. `CardHeader` describes a\n SECTION — a title and a description over some content. A record card has no\n content: it IS the summary, and its parts are in a fixed reading order\n because the reader is scanning a column of them rather than reading one.\n Bolting an identifier and a metric strip onto `CardHeader` would make every\n ordinary card carry the vocabulary of a record it usually is not.\n\n EMPHASIS IS A STATE OF THE RECORD, NOT A COLOUR CHOICE. `emphasis` exists\n because a record in trouble has to be visible in a column of forty at a\n glance, and the honest way to say so is the border — the fill is the\n selection channel and the badges are already carrying the specific reason.\n Passing `danger` because red looks urgent, on a record that is fine, spends\n the one signal the column has.\n\n THE BADGES ARE A SLOT, NOT AN ARRAY. Their tones, their order and whether one\n is a button belong to the surface: the board's deadline chip opens nothing,\n and the queue's status chip filters. A `badges: {label, tone}[]` prop would\n have to grow every one of those, and each addition would be a library release\n for a decision the consumer already knew how to make.\n\n TWO WAYS TO BUILD ONE, AND THE SECOND IS NOT A CONVENIENCE. The props above\n are the published contract and a real application ships on them, so their\n arrangement does not move. The PARTS at the bottom of this file exist for the\n two things props structurally cannot express:\n\n - ORDER. The props render in one fixed reading order, deliberately, because\n the reader is scanning a column rather than reading one card. A surface\n that genuinely needs the handle after the title, or the media split across\n two rows, cannot get there by adding a prop — and every such prop would be\n a library release for a layout decision the consumer already knew how to\n make.\n - A REAL HEADING. `title` renders a `<span>`. `RecordCardTitle` renders an\n `h2`–`h6` the caller picks, because the correct level is a property of\n what sits above the card in the page outline. These cannot be collapsed\n into one element: silently promoting the prop would add a heading to every\n existing consumer's accessibility outline, which is the exact\n `heading-order` defect `Card.tsx` already records having shipped once.\n\n Composing parts is opt-in and additive. A caller passing props gets byte-for-\n byte what they got before; a caller passing children gets them in the body\n slot with no arrangement imposed. Mixing is legal and occasionally right —\n props for the record's own data, a part for the board-owned handle.\n -------------------------------------------------------------------------- */\n\n/* ----------------------------------------------------------------------------\n THE BADGES ROW, AND WHY IT TAKES FOUR RULES TO STAY INSIDE A CARD\n\n MEASURED, then fixed — against a real consumer Tailwind build of `dist/`, at\n the exact DOM the consuming queue card produces, at a 375px viewport. Two\n independent overflows, one on top of the other:\n\n THE ROW COULD EXCEED THE CARD. It was `min-w-0 flex-wrap`, which is enough\n only for a row that is allowed to shrink. A caller who writes\n `className=\"shrink-0\"` — an entirely reasonable thing to write on a status\n row that should not be squeezed by the title beside it — pins the row at\n max-content, and a `flex-wrap` row that is never squeezed never wraps. A\n stage badge plus the activity mark \"Extraction failed — 1 error\" put the\n mark 20.2px past the card's content edge. `max-w-full` clamps the row\n against its container whatever the caller says about shrinking, and because\n the row already wraps, clamping IS the fix: the same fixture went from one\n 24px line hanging off the card to two lines inside it.\n\n A SINGLE CHILD COULD EXCEED THE ROW. A `Badge` is `whitespace-nowrap`, so\n its automatic minimum size is its entire label — no amount of room on the\n row shrinks it. One badge long enough to beat the card by itself still\n leaked 40.1px with the row clamped. `[&>*]:min-w-0` lets it shrink,\n `[&>*]:max-w-full` caps it at the row, and `[&>*]:overflow-hidden` is what\n stops the glyphs painting on past the badge's own border once the box is\n capped. That last one cannot be seen in geometry — a capped box with\n visible overflow measures identically to a clipped one, because a text\n range's rect is a LAYOUT rect and clipping is a paint operation. It was\n confirmed by sampling the pixel strip beside the badge's border instead:\n flat with the clip, carrying glyphs without it.\n\n IT CLIPS, IT DOES NOT ELLIPSIZE, and that is a limitation rather than a\n choice. `text-overflow` applies to block containers; a `Badge` is a flex\n container, so adding `text-ellipsis` changed nothing — measured, not assumed.\n Getting a real ellipsis would mean wrapping every badge's children in a\n truncating block, which changes the DOM of a component whose children are the\n consumer's, and removes the `gap` between two of them. A clean cut at the\n pill's own border is the cheaper honest answer, and the common case — several\n badges, one of them long — is fixed by wrapping rather than by cutting\n anything at all.\n\n THE ONE COST, stated because `[&>*]` is a blunt instrument: a child's own\n DESCENDANTS are now clipped at that child's padding edge. The child itself is\n unaffected — an element's own outline and box-shadow are not clipped by its\n own `overflow` — so the focus ring on a badge-shaped control still draws.\n Inside a `Badge`, both things that reach outward were checked against the\n geometry rather than waved at:\n\n - the dismiss button's 2px focus halo. `pr-1` (4px) less the button's own\n `-mr-0.5` (2px) puts its right edge 2px inside the pill's padding edge,\n and the halo's 2px spread lands exactly ON that edge. It survives, with\n nothing to spare.\n - `pulse`'s ring. `dx-ping` scales a 6px dot to 2.4×, so it reaches 4.2px\n past the dot — inside the 8px (`md`) or 6px (`sm`) padding either way,\n and fully transparent by the time it gets there.\n\n A future child that deliberately overhangs its own box would be clipped, and\n that is the trade this row makes on purpose. */\nconst BADGE_ROW = [\n \"flex min-w-0 max-w-full flex-wrap items-center gap-1.5\",\n \"[&>*]:min-w-0 [&>*]:max-w-full [&>*]:overflow-hidden\",\n];\n\nconst record = tv({\n slots: {\n root: [\n /* DX-4794: the tile's corner is `md` (10px); `Card`'s `radius=\"md\"` draws the same one. */\n \"flex min-w-0 flex-col gap-2.5 rounded-md border bg-surface p-3 text-left\",\n \"[--radius-outer:var(--radius-md)]\",\n \"transition-[var(--tx-colors),box-shadow,translate] duration-(--dur-fast) ease-hover\",\n ],\n top: \"flex min-w-0 flex-wrap items-start gap-2\",\n identifier: \"font-mono text-2xs text-tertiary\",\n title: \"text-sm font-medium text-primary text-pretty\",\n subtitle: \"text-2xs text-tertiary text-pretty\",\n /* Contained, for the reasons written out over `recordCard.badges` below.\n Both rows are the same row in two arrangements, and a defect fixed in one\n of them is a defect waiting in the other. */\n badges: BADGE_ROW,\n /* Auto-fit rather than a fixed column count: three metrics on a 286px lane\n and six on a full-width row are the same component. */\n metrics: \"grid grid-cols-[repeat(auto-fit,minmax(4.5rem,1fr))] gap-x-3 gap-y-1.5\",\n metricLabel: \"text-2xs text-tertiary\",\n /* `tabular-nums` because these sit in a column and are compared down it —\n proportional digits make equal-length numbers different widths. */\n metricValue: \"tabular-nums text-sm text-primary\",\n footer:\n \"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1 border-t border-border-subtle pt-2 text-2xs text-tertiary\",\n },\n variants: {\n emphasis: {\n none: { root: \"border-border\" },\n accent: { root: \"border-accent-border\" },\n warning: { root: \"border-warning-border\" },\n danger: { root: \"border-danger-border\" },\n },\n interactive: {\n true: {\n root: [\n \"cursor-pointer\",\n \"hover:border-border-interactive hover:bg-surface-hover hover:shadow-md\",\n \"hover:-translate-y-px active:translate-y-0 active:shadow-sm\",\n \"focus-visible:border-accent\",\n ],\n },\n false: {},\n },\n selected: { true: { root: \"border-accent bg-surface-selected\" }, false: {} },\n },\n compoundVariants: [\n /* Same reasoning as `Card`: pointing at a chosen record must DEEPEN it, not\n repaint it with the unselected hover fill, which reads as no longer\n chosen. Exactly one of these applies. */\n { interactive: true, selected: true, class: { root: \"hover:bg-surface-selected-hover\" } },\n /* An emphasised border must survive hover. Without this the hover rule's\n `border-border-interactive` replaces the danger hairline at equal\n specificity, so the one card in the column that needed to stay marked\n stops being marked at exactly the moment somebody points at it. */\n { interactive: true, emphasis: \"accent\", class: { root: \"hover:border-accent\" } },\n { interactive: true, emphasis: \"warning\", class: { root: \"hover:border-warning\" } },\n { interactive: true, emphasis: \"danger\", class: { root: \"hover:border-danger\" } },\n ],\n defaultVariants: { emphasis: \"none\", interactive: false, selected: false },\n});\n\n/* The parts' recipe, separate from `record` above because the two describe\n different jobs: `record` lays out the fixed arrangement; `recordCard` gives\n each composable part its own typography and shape and imposes no arrangement\n at all. One shared recipe would force the parts to inherit the grid they\n exist to escape. */\nconst recordCard = tv({\n slots: {\n handle: \"inline-flex shrink-0 items-center self-stretch text-tertiary\",\n eyebrow: \"block truncate font-mono text-2xs tracking-wide text-tertiary uppercase\",\n title: \"block text-pretty font-display font-semibold text-primary\",\n /* See BADGE_ROW. A card is a fixed-width box in a column of them, so a row\n that can be wider than its card is not a styling nit — on a phone it puts\n ink outside the border people are using to tell one record from the next. */\n badges: BADGE_ROW,\n media: \"shrink-0 overflow-hidden rounded-md bg-surface-inset\",\n meta: \"flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1 text-xs text-tertiary\",\n },\n variants: {\n /**\n * Layout, not content. `corner` is the assignee-avatar shape (small,\n * square, sits beside the title); `cover` is the banner-image shape (full\n * width, wide aspect). Same slot, same DOM position — only the geometry\n * changes, which is the whole argument for not splitting this into two\n * props.\n */\n placement: {\n corner: { media: \"size-9\" },\n cover: { media: \"aspect-video w-full\" },\n },\n /**\n * DX-3621 — `RecordCardTitle`'s own text size, independent of `as` (the\n * heading LEVEL). Before this variant the title carried no explicit\n * `text-*` class at all, so its rendered size was whatever the browser's\n * UA default for the chosen heading level happened to be — a kanban board\n * lane of `h4` titles rendering at UA default size, not a deliberate one.\n * `md` (default) pins that same visual size explicitly rather than\n * changing it out from under existing consumers; `sm` is for a dense\n * listing (a kanban lane, a compact picker row) where several of these\n * stack in view together.\n */\n size: {\n sm: { title: \"text-sm\" },\n md: { title: \"text-base\" },\n },\n /**\n * DX-4031 — whether `RecordCardTitle` is held to two lines. A variant on the slot rather than a conditional\n * class, so the default output keeps `line-clamp-2` and `clamp={false}` swaps it for `line-clamp-none`.\n */\n clamp: {\n true: { title: \"line-clamp-2\" },\n false: { title: \"line-clamp-none\" },\n },\n },\n defaultVariants: { placement: \"corner\", size: \"md\", clamp: true },\n});\n\nexport interface RecordCardMetric {\n label: ReactNode;\n value: ReactNode;\n}\n\nexport interface RecordCardProps extends VariantProps<typeof record> {\n /** The record's own id — rendered mono, above the title. */\n identifier?: ReactNode;\n /**\n * Optional ONLY so a caller can compose the parts instead (see the header).\n * For prop-driven use it is effectively required — a record card with no\n * title is not a record card — and omitting it drops the whole top row\n * rather than rendering an empty one.\n */\n title?: ReactNode;\n /** What kind of record this is, or who it belongs to. One line. */\n subtitle?: ReactNode;\n /** State chips. A slot, so their tones and behaviour stay the consumer's. */\n badges?: ReactNode;\n /** The numbers worth seeing without opening the record. */\n metrics?: readonly RecordCardMetric[];\n /** Leading — an icon, an avatar, or a drag handle. */\n media?: ReactNode;\n /** Trailing, top-aligned — a menu. */\n action?: ReactNode;\n /** A last line under a rule: an assignee, a timestamp, a count. */\n footer?: ReactNode;\n /**\n * Render as something else — an `<a>` for a card that navigates.\n *\n * Prefer this over `onClick` when the card leads somewhere: a link can be\n * opened in a new tab, copied, and read out as a link, and a button that\n * calls `navigate` can do none of those.\n */\n render?: useRender.RenderProp;\n className?: string;\n children?: ReactNode;\n ref?: Ref<HTMLElement>;\n onClick?: (event: React.MouseEvent) => void;\n}\n\nexport function RecordCard({\n identifier,\n title,\n subtitle,\n badges,\n metrics,\n media,\n action,\n footer,\n emphasis,\n interactive,\n selected,\n render,\n className,\n children,\n ref,\n ...props\n}: RecordCardProps) {\n const s = record({ emphasis, interactive, selected });\n /* An empty top row is not free: it still contributes its own gap to the\n column, so a parts-composed card would carry a phantom 10px band above its\n content with nothing in it. */\n const hasTop = [media, identifier, title, subtitle, action].some(\n (slot) => slot !== undefined && slot !== null,\n );\n\n return useRender({\n render,\n ref,\n /* Same rule as `Card`: an interactive record card is a real button, so it\n is focusable, activates on Enter and Space, and announces as actionable.\n A `render` prop overrides it for the link case. */\n defaultTagName: interactive ? \"button\" : \"div\",\n props: {\n className: cn(s.root(), className),\n ...props,\n children: (\n <>\n {hasTop && (\n <div className={s.top()}>\n {media}\n {/* The same pairing `CardHeader` had, and found by sweeping for the\n shape rather than by a second report: a shrinkable text column\n beside an `action` the consumer supplies and this component\n cannot size. `min-w-0` here let a wide action take the whole row\n and leave the title at zero. The row wraps and this column\n floors at its min-content instead. */}\n <div className={cn(\"flex flex-1 flex-col gap-0.5\", action ? undefined : \"min-w-0\")}>\n {identifier !== undefined && identifier !== null && (\n <span className={s.identifier()}>{identifier}</span>\n )}\n {title !== undefined && title !== null && (\n <span className={s.title()}>{title}</span>\n )}\n {subtitle !== undefined && subtitle !== null && (\n <span className={s.subtitle()}>{subtitle}</span>\n )}\n </div>\n {action}\n </div>\n )}\n\n {badges && <div className={s.badges()}>{badges}</div>}\n\n {metrics && metrics.length > 0 && (\n <div className={s.metrics()}>\n {metrics.map((metric, index) => (\n <div key={index} className=\"flex min-w-0 flex-col\">\n <span className={s.metricLabel()}>{metric.label}</span>\n <span className={s.metricValue()}>{metric.value}</span>\n </div>\n ))}\n </div>\n )}\n\n {children}\n\n {footer && <div className={s.footer()}>{footer}</div>}\n </>\n ),\n },\n });\n}\n\nexport interface RecordCardHandleProps {\n className?: string;\n /** Whatever the board wants reachable here — a drag handle, a menu trigger,\n * a dual-purpose control combining both. This component owns none of that\n * behaviour; it only reserves the shape (shrink-resistant, stretches to\n * match a flex-row sibling) so the board's control does not have to fight\n * the record's own layout for space. */\n children: ReactNode;\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** The region a board can slot a drag handle into. Absent entirely when a\n * card is rendered outside any board — nothing here assumes one exists. */\nexport function RecordCardHandle({ className, children, ref }: RecordCardHandleProps) {\n const s = recordCard();\n return (\n <span ref={ref} className={cn(s.handle(), className)}>\n {children}\n </span>\n );\n}\n\nexport interface RecordCardEyebrowProps {\n className?: string;\n children: ReactNode;\n ref?: Ref<HTMLSpanElement>;\n}\n\n/** The identifier line — an id, a code, a short kicker. Answers WHICH record\n * this is, which is a different question from the one `Title` answers. */\nexport function RecordCardEyebrow({ className, children, ref }: RecordCardEyebrowProps) {\n const s = recordCard();\n return (\n <span ref={ref} className={cn(s.eyebrow(), className)}>\n {children}\n </span>\n );\n}\n\nexport interface RecordCardTitleProps {\n /**\n * The heading level this title renders as.\n *\n * See `CardHeader.titleAs` — the reasoning is identical and does not bear\n * repeating differently: only the caller knows what sits above this card in\n * the page outline.\n *\n * @default \"h3\"\n */\n as?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n /**\n * The title's own text size — independent of `as` (the heading LEVEL, an\n * accessibility/outline concern). `sm` is for a dense listing where several\n * record cards stack in view together (a kanban lane, a compact picker\n * row); `md` is the ordinary size for a single card or a short list.\n *\n * @default \"md\"\n */\n size?: \"sm\" | \"md\";\n /**\n * DX-4031 — `true` (default) clamps the title to two lines; `false` shows it in full, for a card whose title\n * (up to 250 characters) is the thing being read.\n *\n * @default true\n */\n clamp?: boolean;\n className?: string;\n children: ReactNode;\n ref?: Ref<HTMLHeadingElement>;\n}\n\n/** Clamped to two lines by default — a collapsed record has a fixed budget of\n * vertical space, and a title that runs on pushes the meta row an\n * unpredictable distance down the column instead of wrapping in place. */\nexport function RecordCardTitle({ as: Title = \"h3\", size = \"md\", clamp = true, className, children, ref }: RecordCardTitleProps) {\n const s = recordCard({ size, clamp });\n return (\n <Title ref={ref} className={cn(s.title(), className)}>\n {children}\n </Title>\n );\n}\n\nexport interface RecordCardBadgesProps {\n className?: string;\n children: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** A wrapping row for a SMALL set of status/priority badges — `Badge` from\n * this same library, composed by the consumer. This component supplies only\n * the row layout; it has no opinion on how many badges is too many.\n *\n * IT DOES HAVE AN OPINION ON HOW WIDE. The row can never exceed its card, and\n * a single badge can never exceed the row — the containment is the row's job\n * because the consumer's badge cannot do it from inside. `BADGE_ROW` above\n * carries the measurements and the one limitation (it clips; it does not\n * ellipsize). A caller's `className` still wins over everything here, including\n * `shrink-0`, which is exactly the class that made the reported card leak. */\nexport function RecordCardBadges({ className, children, ref }: RecordCardBadgesProps) {\n const s = recordCard();\n return (\n <div ref={ref} className={cn(s.badges(), className)}>\n {children}\n </div>\n );\n}\n\nexport interface RecordCardMediaProps extends VariantProps<typeof recordCard> {\n className?: string;\n children: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** The media/cover region — an assignee avatar (`placement=\"corner\"`, the\n * default) or a banner image (`placement=\"cover\"`). See the file header for\n * why these are one slot rather than two. */\nexport function RecordCardMedia({ placement, className, children, ref }: RecordCardMediaProps) {\n const s = recordCard({ placement });\n return (\n <div ref={ref} className={cn(s.media(), className)}>\n {children}\n </div>\n );\n}\n\nexport interface RecordCardMetaProps {\n className?: string;\n children: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\n/** The one compact secondary-metadata row — comment count, dependency count,\n * a due date. Full description, comment threads and history are explicitly\n * not this component's problem; they live behind a click, on whatever detail\n * surface the consumer opens from here. */\nexport function RecordCardMeta({ className, children, ref }: RecordCardMetaProps) {\n const s = recordCard();\n return (\n <div ref={ref} className={cn(s.meta(), className)}>\n {children}\n </div>\n );\n}\n"],"names":["BADGE_ROW","record","tv","recordCard","RecordCard","identifier","title","subtitle","badges","metrics","media","action","footer","emphasis","interactive","selected","render","className","children","ref","props","s","hasTop","slot","useRender","cn","jsxs","Fragment","jsx","metric","index","RecordCardHandle","RecordCardEyebrow","RecordCardTitle","Title","size","clamp","RecordCardBadges","RecordCardMedia","placement","RecordCardMeta"],"mappings":";;;;AAmHA,MAAMA,IAAY;AAAA,EAChB;AAAA,EACA;AACF,GAEMC,IAASC,EAAG;AAAA,EAChB,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,MAEJ;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,IAEF,KAAK;AAAA,IACL,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,UAAU;AAAA;AAAA;AAAA;AAAA,IAIV,QAAQF;AAAA;AAAA;AAAA,IAGR,SAAS;AAAA,IACT,aAAa;AAAA;AAAA;AAAA,IAGb,aAAa;AAAA,IACb,QACE;AAAA,EAAA;AAAA,EAEJ,UAAU;AAAA,IACR,UAAU;AAAA,MACR,MAAM,EAAE,MAAM,gBAAA;AAAA,MACd,QAAQ,EAAE,MAAM,uBAAA;AAAA,MAChB,SAAS,EAAE,MAAM,wBAAA;AAAA,MACjB,QAAQ,EAAE,MAAM,uBAAA;AAAA,IAAuB;AAAA,IAEzC,aAAa;AAAA,MACX,MAAM;AAAA,QACJ,MAAM;AAAA,UACJ;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,OAAO,CAAA;AAAA,IAAC;AAAA,IAEV,UAAU,EAAE,MAAM,EAAE,MAAM,oCAAA,GAAuC,OAAO,CAAA,EAAC;AAAA,E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EAAGJ,EAAE,MAAA,GAASJ,CAAS,GAChD,UAAAC,EAAA,CACH;AAEJ;AAkBO,SAASmB,EAAiB,EAAE,WAAApB,GAAW,UAAAC,GAAU,KAAAC,KAA8B;AACpF,QAAME,IAAIlB,EAAA;AACV,SACE,gBAAAyB,EAAC,OAAA,EAAI,KAAAT,GAAU,WAAWM,EAAGJ,EAAE,OAAA,GAAUJ,CAAS,GAC/C,UAAAC,EAAA,CACH;AAEJ;AAWO,SAASoB,EAAgB,EAAE,WAAAC,GAAW,WAAAtB,GAAW,UAAAC,GAAU,KAAAC,KAA6B;AAC7F,QAAME,IAAIlB,EAAW,EAAE,WAAAoC,GAAW;AAClC,SACE,gBAAAX,EAAC,OAAA,EAAI,KAAAT,GAAU,WAAWM,EAAGJ,EAAE,MAAA,GAASJ,CAAS,GAC9C,UAAAC,EAAA,CACH;AAEJ;AAYO,SAASsB,EAAe,EAAE,WAAAvB,GAAW,UAAAC,GAAU,KAAAC,KAA4B;AAChF,QAAME,IAAIlB,EAAA;AACV,SACE,gBAAAyB,EAAC,OAAA,EAAI,KAAAT,GAAU,WAAWM,EAAGJ,EAAE,KAAA,GAAQJ,CAAS,GAC7C,UAAAC,EAAA,CACH;AAEJ;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as u, useSyncExternalStore as p, useMemo as f } from "react";
|
|
3
|
+
import { DateTimeText as v } from "./DateTimeText.js";
|
|
4
|
+
import { toEpochMs as l } from "../lib/time/instant.js";
|
|
5
|
+
import { relativeAge as d } from "../lib/time/relativeAge.js";
|
|
6
|
+
import { subscribeRelativeClock as b } from "../lib/time/relativeClock.js";
|
|
7
|
+
import { Tooltip as g } from "./Popover.js";
|
|
8
|
+
import { useUiStrings as x, useUiLocale as N } from "../lib/i18n/provider.js";
|
|
9
|
+
function T() {
|
|
10
|
+
const t = x().relativeAge, r = N();
|
|
11
|
+
return f(() => (n, e) => d(n, t, r, e), [t, r]);
|
|
12
|
+
}
|
|
13
|
+
function S(t, r) {
|
|
14
|
+
const n = T(), e = r ?? n, o = l(t), i = !Number.isNaN(o), s = u(
|
|
15
|
+
(c) => i ? b(o, e, c) : () => {
|
|
16
|
+
},
|
|
17
|
+
[o, i, e]
|
|
18
|
+
);
|
|
19
|
+
return p(s, () => e(o), () => e(o));
|
|
20
|
+
}
|
|
21
|
+
function E({ at: t, format: r, tooltip: n, className: e }) {
|
|
22
|
+
const o = S(t, r), i = l(t), s = !Number.isNaN(i), c = n === !1 ? null : n ?? (s ? /* @__PURE__ */ m(v, { at: i }) : null), a = /* @__PURE__ */ m("time", { dateTime: s ? new Date(i).toISOString() : void 0, className: e, suppressHydrationWarning: !0, children: o });
|
|
23
|
+
return c === null ? a : /* @__PURE__ */ m(g, { content: c, children: a });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
E as RelativeTime,
|
|
27
|
+
S as useRelativeText
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=RelativeTime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RelativeTime.js","sources":["../../src/components/RelativeTime.tsx"],"sourcesContent":["import { useCallback, useMemo, useSyncExternalStore, type ReactNode } from \"react\";\nimport { useUiLocale, useUiStrings } from \"../lib/i18n\";\nimport { DateTimeText } from \"./DateTimeText\";\nimport { toEpochMs } from \"../lib/time/instant\";\nimport { relativeAge } from \"../lib/time/relativeAge\";\nimport { subscribeRelativeClock, type RelativeFormat } from \"../lib/time/relativeClock\";\nimport { Tooltip } from \"./Popover\";\n\n/* ----------------------------------------------------------------------------\n RELATIVE TIME. DX-4797.\n\n A moment as words (\"1 second ago\", then \"2 seconds ago\", ... \"1 minute ago\",\n ... \"1 hour ago\") that keeps counting while it is on screen. The text is the\n `format` function's (default: `relativeAge` in the provider's words and\n locale); this component only decides WHEN to re-read it, on the one shared\n timer in `lib/time/relativeClock.ts`. Nothing is fetched: the clock is the\n browser's. Use it anywhere a relative time is RENDERED; call the format\n function directly only for text that is not (a title string, a test).\n\n A semantic `<time dateTime>`, with the absolute moment as its themed Tooltip\n (never a native `title`) unless the caller supplies the content (`tooltip`)\n or already has a tooltip around it (`false`). The tooltip is hover-only: the\n `<time>` is not focusable, so a keyboard or touch user reads the moment from\n the page's own detail. An unparseable `at` renders the format's own answer\n and never arms a timer.\n -------------------------------------------------------------------------- */\n\nexport interface RelativeTimeProps {\n /** The moment: an ISO string, epoch millis or a `Date`. */\n at: string | number | Date;\n /** Words for the moment as of `now`. Default: `relativeAge` in the provider's words and locale. A pure function of `(at, now)`, and a STABLE one (memoize it; a new `format` re-reads when the text next changes). */\n format?: RelativeFormat;\n /** The tooltip content. Default: the absolute moment, in the provider's locale. `false` for none (the caller wraps its own). */\n tooltip?: ReactNode | false;\n className?: string;\n}\n\n/** `relativeAge` in the provider's words and locale, memoized: the shared clock needs a format whose identity holds. */\nfunction useProviderFormat(): RelativeFormat {\n const strings = useUiStrings().relativeAge;\n const locale = useUiLocale();\n return useMemo<RelativeFormat>(() => (at, now) => relativeAge(at, strings, locale, now), [strings, locale]);\n}\n\n/**\n * The text of a moment, re-read whenever it changes: what `RelativeTime` draws, for a caller that needs the words themselves\n * (a sentence built around them, a layout key that must move when the shown age does). Same `format` rules as `RelativeTimeProps`.\n */\nexport function useRelativeText(at: string | number | Date, format?: RelativeFormat): string {\n const providerFormat = useProviderFormat();\n const chosen = format ?? providerFormat;\n const atMs = toEpochMs(at);\n const valid = !Number.isNaN(atMs);\n const subscribe = useCallback(\n (onChange: () => void) => (valid ? subscribeRelativeClock(atMs, chosen, onChange) : () => {}),\n [atMs, valid, chosen],\n );\n /* DX-5411: the server snapshot is the same read. A server has no ticking clock, so it draws the age as of the render, and a\n hydrating client re-reads it (`RelativeTime` marks its `<time>` so React accepts the newer words). */\n return useSyncExternalStore(subscribe, () => chosen(atMs), () => chosen(atMs));\n}\n\nexport function RelativeTime({ at, format, tooltip, className }: RelativeTimeProps) {\n const text = useRelativeText(at, format);\n const atMs = toEpochMs(at);\n const valid = !Number.isNaN(atMs);\n const content = tooltip === false ? null : (tooltip ?? (valid ? <DateTimeText at={atMs} /> : null));\n const element = (\n <time dateTime={valid ? new Date(atMs).toISOString() : undefined} className={className} suppressHydrationWarning>\n {text}\n </time>\n );\n return content === null ? element : <Tooltip content={content}>{element}</Tooltip>;\n}\n"],"names":["useProviderFormat","strings","useUiStrings","locale","useUiLocale","useMemo","at","now","relativeAge","useRelativeText","format","providerFormat","chosen","atMs","toEpochMs","valid","subscribe","useCallback","onChange","subscribeRelativeClock","useSyncExternalStore","RelativeTime","tooltip","className","text","content","jsx","DateTimeText","element","Tooltip"],"mappings":";;;;;;;;AAsCA,SAASA,IAAoC;AAC3C,QAAMC,IAAUC,IAAe,aACzBC,IAASC,EAAA;AACf,SAAOC,EAAwB,MAAM,CAACC,GAAIC,MAAQC,EAAYF,GAAIL,GAASE,GAAQI,CAAG,GAAG,CAACN,GAASE,CAAM,CAAC;AAC5G;AAMO,SAASM,EAAgBH,GAA4BI,GAAiC;AAC3F,QAAMC,IAAiBX,EAAA,GACjBY,IAASF,KAAUC,GACnBE,IAAOC,EAAUR,CAAE,GACnBS,IAAQ,CAAC,OAAO,MAAMF,CAAI,GAC1BG,IAAYC;AAAA,IAChB,CAACC,MAA0BH,IAAQI,EAAuBN,GAAMD,GAAQM,CAAQ,IAAI,MAAM;AAAA,IAAC;AAAA,IAC3F,CAACL,GAAME,GAAOH,CAAM;AAAA,EAAA;AAItB,SAAOQ,EAAqBJ,GAAW,MAAMJ,EAAOC,CAAI,GAAG,MAAMD,EAAOC,CAAI,CAAC;AAC/E;AAEO,SAASQ,EAAa,EAAE,IAAAf,GAAI,QAAAI,GAAQ,SAAAY,GAAS,WAAAC,KAAgC;AAClF,QAAMC,IAAOf,EAAgBH,GAAII,CAAM,GACjCG,IAAOC,EAAUR,CAAE,GACnBS,IAAQ,CAAC,OAAO,MAAMF,CAAI,GAC1BY,IAAUH,MAAY,KAAQ,OAAQA,MAAYP,IAAQ,gBAAAW,EAACC,GAAA,EAAa,IAAId,EAAA,CAAM,IAAK,OACvFe,IACJ,gBAAAF,EAAC,QAAA,EAAK,UAAUX,IAAQ,IAAI,KAAKF,CAAI,EAAE,gBAAgB,QAAW,WAAAU,GAAsB,0BAAwB,IAC7G,UAAAC,GACH;AAEF,SAAOC,MAAY,OAAOG,IAAU,gBAAAF,EAACG,GAAA,EAAQ,SAAAJ,GAAmB,UAAAG,GAAQ;AAC1E;"}
|