@50arms/ui 0.0.0-stage → 35.1.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 +167 -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 +331 -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 +20 -0
- package/dist/types/components/rbac/ApiKeysPanel.d.ts +26 -0
- package/dist/types/components/rbac/ApiKeysTable.d.ts +63 -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 +633 -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,111 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useId as y } from "react";
|
|
3
|
+
import { Icon as N } from "../Icon.js";
|
|
4
|
+
import { Popover as g } from "../Popover.js";
|
|
5
|
+
import { cn as m } from "../../lib/cn.js";
|
|
6
|
+
import { ProvenanceBadge as P } from "./ProvenanceBadge.js";
|
|
7
|
+
import { ProvenanceDetail as k } from "./ProvenanceDetail.js";
|
|
8
|
+
import { shownValue as D } from "./absence.js";
|
|
9
|
+
import { useUiStrings as I } from "../../lib/i18n/provider.js";
|
|
10
|
+
function B({
|
|
11
|
+
record: o,
|
|
12
|
+
actions: p,
|
|
13
|
+
emptyLabel: r,
|
|
14
|
+
redactedLabel: t,
|
|
15
|
+
ratingLabel: u,
|
|
16
|
+
triggerBadge: s = "word",
|
|
17
|
+
valueWrap: n = !1,
|
|
18
|
+
triggerContent: i,
|
|
19
|
+
valueContent: d,
|
|
20
|
+
stateContent: f,
|
|
21
|
+
onOpenChange: h,
|
|
22
|
+
className: b,
|
|
23
|
+
width: v = "30rem"
|
|
24
|
+
}) {
|
|
25
|
+
const a = I(), x = D(o, { emptyLabel: r, redactedLabel: t }, a.provenanceAbsence), c = `provenance-${y()}`, w = /* @__PURE__ */ l(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
type: "button",
|
|
29
|
+
className: m(
|
|
30
|
+
"dx-tap group inline-flex max-w-full gap-1.5 rounded-sm text-left",
|
|
31
|
+
/* A wrapping value is several lines tall; centring the badge against
|
|
32
|
+
the block would float it beside the middle line. Aligned to the top
|
|
33
|
+
it sits on the first line, where the value starts. */
|
|
34
|
+
n ? "items-start" : "items-center",
|
|
35
|
+
/* The dotted rule is the affordance on a bare value. Custom content
|
|
36
|
+
brings its own edges, and a chip inside a second underline reads as
|
|
37
|
+
two controls. */
|
|
38
|
+
!i && "underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border",
|
|
39
|
+
"transition-colors duration-(--dur-fast)",
|
|
40
|
+
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-border",
|
|
41
|
+
b
|
|
42
|
+
),
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ l("span", { className: "sr-only", children: [
|
|
45
|
+
o.label,
|
|
46
|
+
":"
|
|
47
|
+
] }),
|
|
48
|
+
i ?? /* @__PURE__ */ e(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
className: m(
|
|
52
|
+
"min-w-0 text-sm text-primary",
|
|
53
|
+
/* `truncate` sets `overflow-hidden` and `white-space: nowrap`
|
|
54
|
+
together, so wrapping is not "drop truncate" — the wrap case
|
|
55
|
+
names both halves explicitly, and `break-words` covers the
|
|
56
|
+
single unbroken token that would otherwise push the column. */
|
|
57
|
+
n ? "whitespace-normal break-words" : "truncate"
|
|
58
|
+
),
|
|
59
|
+
children: x
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
s !== "none" && /* @__PURE__ */ e(
|
|
63
|
+
P,
|
|
64
|
+
{
|
|
65
|
+
state: o.state,
|
|
66
|
+
appearance: s === "icon" ? "icon" : "word",
|
|
67
|
+
className: "shrink-0"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
N,
|
|
72
|
+
{
|
|
73
|
+
name: "search",
|
|
74
|
+
size: "xs",
|
|
75
|
+
className: "shrink-0 text-tertiary opacity-0 transition-[var(--tx-colors),opacity] duration-(--dur-fast) group-hover:opacity-100"
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: a.provenanceDisclosure.showWhereFrom })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
return /* @__PURE__ */ e(
|
|
83
|
+
g,
|
|
84
|
+
{
|
|
85
|
+
trigger: w,
|
|
86
|
+
side: "bottom",
|
|
87
|
+
align: "start",
|
|
88
|
+
width: v,
|
|
89
|
+
className: "p-0",
|
|
90
|
+
onOpenChange: h,
|
|
91
|
+
"aria-labelledby": c,
|
|
92
|
+
children: /* @__PURE__ */ e(
|
|
93
|
+
k,
|
|
94
|
+
{
|
|
95
|
+
record: o,
|
|
96
|
+
actions: p,
|
|
97
|
+
emptyLabel: r,
|
|
98
|
+
redactedLabel: t,
|
|
99
|
+
ratingLabel: u,
|
|
100
|
+
valueContent: d,
|
|
101
|
+
stateContent: f,
|
|
102
|
+
titleId: c
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
B as ProvenanceDisclosure
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=ProvenanceDisclosure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProvenanceDisclosure.js","sources":["../../../src/components/provenance/ProvenanceDisclosure.tsx"],"sourcesContent":["import { useId, type ReactNode } from \"react\";\nimport { Icon } from \"../Icon\";\nimport { Popover } from \"../Popover\";\nimport { cn } from \"../../lib/cn\";\nimport { useUiStrings } from \"../../lib/i18n\";\nimport { ProvenanceBadge } from \"./ProvenanceBadge\";\nimport { ProvenanceDetail } from \"./ProvenanceDetail\";\nimport { shownValue } from \"./absence\";\nimport type { ProvenanceRecord } from \"./types\";\n\n/* ----------------------------------------------------------------------------\n ONE CLICK FROM A VALUE TO EVERYTHING BEHIND IT.\n\n The value, where it came from, the exact text at that place, why the model\n concluded it, the verdict of whatever check ran, what the call cost, and who\n has signed or corrected it since.\n\n THE RESTING STATE IS ALMOST SILENT, and that is the whole design. A page of\n four hundred extracted values where every one wears a badge and a bar is a\n page where nothing stands out — so a verified value renders as the value with\n a hairline affordance, and only the exceptions carry weight. Somebody\n scanning a page should see what is WRONG with it, not be asked to read four\n hundred confirmations that things are fine.\n\n A POPOVER, not a dialog. A dialog takes the whole screen for one field, which\n is the wrong trade when the interesting thing is usually the row NEXT to the\n one you opened. This is a surface people open, glance at, and close.\n\n THIS COMPONENT IS THE TRIGGER AND THE POPOVER. The contents are\n `ProvenanceDetail`, which it RENDERS rather than duplicates — see that file\n for why the two were split and what the body owes nobody. A copy of the body\n here would be a second vocabulary for the same record, drifting on the first\n fix that only one caller reported. There is one, and it is imported.\n\n The consumer-facing slots are passed straight through: `actions`,\n `valueContent`, `emptyLabel` and `redactedLabel` are documented on\n `ProvenanceDetailProps` and mean exactly the same thing here. What stays with\n this component is everything about the TRIGGER, plus `onOpenChange`, which is\n about the popover and could not be about anything else.\n\n THE TRIGGER IS CONFIGURABLE; THE CONTROL IS NOT. `triggerBadge`, `valueWrap`\n and `triggerContent` change what the trigger DRAWS. None of them hands over\n the `<button>` itself, and that is deliberate — the accessible name, the\n focus ring and the coarse-pointer tap target are the three things a consumer\n loses first when a component lets its trigger be replaced wholesale, and they\n are exactly the three this component exists to guarantee. See the note above\n `triggerContent`.\n\n THE PANEL IS THE OTHER WAY ROUND, and `valueContent` is where the two rules\n part company. The trigger's slot must be presentational because it lives\n inside a `<button>`; the panel's slot may be INTERACTIVE, because an editor\n is an ordinary control in reading order and correcting a value in the surface\n you opened to judge it is the whole point of opening it. A consumer that had\n to put its editor in `actions` instead was left showing the value once at the\n top and a form about some value at the bottom.\n\n OPENING IS AN EVENT, AND IT HAD NO LISTENER. `onOpenChange` is the one thing\n here that is not about drawing: it says WHEN the panel opened and when it\n shut, and it is the only moment at which a consumer can afford to go and\n fetch what the panel is about to show.\n\n The component's own design is what creates the need. Ninety of these on one\n screen is the intended density — the resting state is nearly silent\n precisely so that many can sit side by side — and a panel's contents are\n frequently the expensive part: the citation sources behind a value, the\n pages a quote was drawn from, an audit trail. Fetching those on mount is\n ninety requests to answer the one question somebody actually asks. Fetching\n them never is a panel that opens onto a blank.\n\n The first consumer to hit this had no third option, so it invented one: a\n button INSIDE the panel whose whole job was to trigger the fetch. That\n buried the real content two clicks deep and made the panel's first paint a\n piece of scaffolding rather than the evidence. The moment it wanted was\n always \"the panel opened\"; there was simply no way to be told.\n\n THE SIGNAL IS THIS COMPONENT'S, NOT THE BODY'S, and the split is what makes\n that obvious. A consumer rendering `ProvenanceDetail` inline has no opening\n to hear about and needs none: the body is on screen from mount, so the fetch\n is the mount. `onOpenChange` exists because a POPOVER defers the moment, and\n it stays here with the popover.\n\n OBSERVED, NOT CONTROLLED. There is deliberately no `open` prop beside it.\n Base UI still owns the state — dismissal, focus return, escape, the outside\n click — and taking it over would make a consumer responsible for all four to\n get a fetch. `onOpenChange` is a wire out, not a wire in, which is also why\n it is safe to add to a component whose panel already works.\n\n IT IS SILENT ON MOUNT, and that is the whole point rather than a detail. A\n callback that fired once per mounted disclosure would return the consumer to\n ninety requests with extra steps, so it fires only on a CHANGE — a closed\n panel that nobody has touched emits nothing, ever. Pinned by test.\n -------------------------------------------------------------------------- */\n\n/** How much of the verification state the trigger draws. */\nexport type ProvenanceTriggerBadge = \"icon\" | \"word\" | \"none\";\n\nexport interface ProvenanceDisclosureProps {\n record: ProvenanceRecord;\n /** Rendered at the foot of the panel. {@link ProvenanceDetailProps.actions} */\n actions?: ReactNode;\n /** Shown in place of the value when there is none and it did not fail. Absent means the provider's own words. */\n emptyLabel?: string;\n /** Shown in place of the value when the viewer may not see it. */\n redactedLabel?: string;\n /** Your word for what a discrete rating is OF. {@link ProvenanceDetailProps.ratingLabel} */\n ratingLabel?: string;\n /**\n * How the state reads ON THE TRIGGER. The panel always shows icon + word.\n *\n * - `\"word\"` (default) — today's behaviour exactly, quiet rule included: the\n * exceptions wear a worded badge and `verified` wears nothing.\n * - `\"icon\"` — the glyph alone, in the same coloured box, for ALL FOUR states\n * including `verified`. A dense table of values wants a legend, not four\n * hundred sentences; the word is still announced (see below).\n * - `\"none\"` — no badge at all, for a consumer drawing the state itself in an\n * adjacent column. The state then leaves the accessible name too, because\n * the name says what the trigger says and nothing more.\n */\n triggerBadge?: ProvenanceTriggerBadge;\n /**\n * Let a long value wrap onto more lines instead of truncating.\n *\n * Off by default because the component's home is a dense table where a\n * ragged row height is worse than an ellipsis. On by default would be wrong;\n * unavailable was also wrong — a value clipped at `No — typed notes only, at\n * gu…` in a 900px column is not a value, and there was no way in.\n */\n valueWrap?: boolean;\n /**\n * Draw something else in place of the value — an id chip, an avatar, a\n * sparkline — and anchor the panel to THAT.\n *\n * NOT a whole-trigger slot, and the difference matters. This node becomes the\n * CONTENT of the disclosure's own button; the button, its focus ring, its tap\n * target and its accessible name stay with the component. A prop that took\n * the control itself would hand a consumer all four obligations at once, and\n * the observed result of consumers owning this one is a chip that announces a\n * bare id (\"FM-002\") with no field, no value and no state — which is the\n * exact defect this library has now shipped three times.\n *\n * Pass presentational markup. An interactive element here nests a control\n * inside a control, which is invalid and unfocusable.\n *\n * The field, the state and the \"show where this came from\" affordance are\n * still composed around it, so the announced name is the same as any other\n * disclosure's. The dotted underline is dropped — a chip carries its own\n * edges and does not want a second one.\n */\n triggerContent?: ReactNode;\n /**\n * Draw the PANEL HEADER'S VALUE yourself — an editor, most usefully.\n * {@link ProvenanceDetailProps.valueContent}\n *\n * It does not touch the trigger — the value on the page is still drawn from\n * `record`, still truncated or wrapped per `valueWrap`, still announced as\n * part of the trigger's own name. The closed page does not change because a\n * consumer supplied this.\n */\n valueContent?: ReactNode;\n /**\n * Draw the PANEL HEADER'S top-right corner yourself, in place of the\n * built-in `ProvenanceBadge`. {@link ProvenanceDetailProps.stateContent}\n *\n * Like `valueContent`, this reaches only the panel — the trigger's own\n * `triggerBadge` is a separate, independent choice about what the CLOSED\n * page shows, and passing this does not change it or the trigger's\n * accessible name (see \"THE NAME IS COMPUTED FROM THE CONTENT\" above).\n */\n stateContent?: ReactNode;\n /**\n * Called with `true` when the panel opens and `false` when it closes.\n *\n * The signature `Collapsible`, `Dialog`, `Menu` and `Popover` all use, for\n * the reason a fourth spelling would be worse than a familiar one: a\n * consumer already knows what `onOpenChange` does everywhere else here.\n *\n * Purely an observation. The popover stays uncontrolled, so this does not\n * make the caller responsible for closing it, for returning focus, or for\n * escape — pass the callback and nothing else about the component moves.\n *\n * The reason it exists is the fetch: a value's citations, its source pages,\n * its audit trail are usually a request, and this is the only moment at\n * which a consumer knows that request is now worth making. It does NOT fire\n * on mount — see the note at the top of this file for why that is the load-\n * bearing half of the guarantee, not a footnote to it.\n */\n onOpenChange?: (open: boolean) => void;\n className?: string;\n /**\n * Override the panel's design width. See the `width` note at the `<Popover>`\n * call site below for what 30rem was arithmetic on and why going wider used\n * to read as a mistake — this exists because a real consumer's content\n * (a dense multi-column table, not prose) outgrew that arithmetic. Unset,\n * the panel keeps the library default of `30rem`, still clamped to\n * `Popover`'s own viewport ceiling either way.\n */\n width?: string;\n}\n\nexport function ProvenanceDisclosure({\n record,\n actions,\n emptyLabel,\n redactedLabel,\n ratingLabel,\n triggerBadge = \"word\",\n valueWrap = false,\n triggerContent,\n valueContent,\n stateContent,\n onOpenChange,\n className,\n width = \"30rem\",\n}: ProvenanceDisclosureProps) {\n /* What the trigger reads — the value, or the absence standing in for it. The\n SAME function the body calls for its own header, so the two can never\n disagree about whether a record is withheld, empty or disproved. */\n const strings = useUiStrings();\n const shown = shownValue(record, { emptyLabel, redactedLabel }, strings.provenanceAbsence);\n\n /* THE NAME IS COMPUTED FROM THE CONTENT, AND THERE IS NO `aria-label`.\n\n `aria-label` REPLACES a control's content rather than extending it, and\n this library has shipped that defect three times: forty-eight disclosure\n triggers announcing field names and no values, a refusal folded into a\n control's name and lost, a fact chip announcing a bare id. The first\n version of THIS component was the first of those three.\n\n Composing a string is what keeps reintroducing it, because the string and\n the markup are written in two places and only one of them gets updated —\n an icon-only badge, a `ReactNode` value, a consumer's own trigger content:\n each is a fresh chance for the name to drift away from what is on screen.\n\n So the name is not composed at all. The field and the affordance are\n rendered as visually-hidden text INSIDE the button, in reading order, and\n the browser computes the name from the button's own subtree. Whatever is\n drawn is announced, necessarily — a `ReactNode` value that used to fall\n back to the field name alone now announces its own text, and the state\n word is carried by the badge (as its label under `\"word\"`, as `sr-only`\n text under `\"icon\"`) so BOTH APPEARANCES PRODUCE THE SAME NAME.\n\n `\"none\"` draws no badge and so announces no state: the name says exactly\n what the trigger says. That is also why the default is unchanged — under\n `\"word\"` a verified record still renders no badge, so its name is the\n `{label}: {value} — show where this came from` it has always been. */\n const titleId = `provenance-${useId()}`;\n\n const trigger = (\n <button\n type=\"button\"\n className={cn(\n \"dx-tap group inline-flex max-w-full gap-1.5 rounded-sm text-left\",\n /* A wrapping value is several lines tall; centring the badge against\n the block would float it beside the middle line. Aligned to the top\n it sits on the first line, where the value starts. */\n valueWrap ? \"items-start\" : \"items-center\",\n /* The dotted rule is the affordance on a bare value. Custom content\n brings its own edges, and a chip inside a second underline reads as\n two controls. */\n !triggerContent &&\n \"underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border\",\n \"transition-colors duration-(--dur-fast)\",\n \"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-border\",\n className,\n )}\n >\n {/* THE FIELD, first and in reading order. Visually hidden because the\n consumer's own table already has a column header saying it; announced\n because a screen-reader user has no column header to look up at. */}\n <span className=\"sr-only\">{record.label}:</span>\n {triggerContent ?? (\n <span\n className={cn(\n \"min-w-0 text-sm text-primary\",\n /* `truncate` sets `overflow-hidden` and `white-space: nowrap`\n together, so wrapping is not \"drop truncate\" — the wrap case\n names both halves explicitly, and `break-words` covers the\n single unbroken token that would otherwise push the column. */\n valueWrap ? \"whitespace-normal break-words\" : \"truncate\",\n )}\n >\n {shown}\n </span>\n )}\n {triggerBadge !== \"none\" && (\n <ProvenanceBadge\n state={record.state}\n appearance={triggerBadge === \"icon\" ? \"icon\" : \"word\"}\n className=\"shrink-0\"\n />\n )}\n <Icon\n name=\"search\"\n size=\"xs\"\n /* `transition-[…]` REPLACES the global colour transition rather than\n extending it, so naming only `opacity` here left this icon as the one\n element on the row that cut between themes instead of fading with\n everything around it. Caught by `audit:motion`, which was not run when\n this shipped. */\n className=\"shrink-0 text-tertiary opacity-0 transition-[var(--tx-colors),opacity] duration-(--dur-fast) group-hover:opacity-100\"\n />\n <span className=\"sr-only\">{strings.provenanceDisclosure.showWhereFrom}</span>\n </button>\n );\n\n return (\n <Popover\n trigger={trigger}\n side=\"bottom\"\n align=\"start\"\n /* 480px, and the number is arithmetic on the contents rather than a\n preference.\n\n IT IS A `width` PROP RATHER THAN A `w-…`/`max-w-…` IN `className`, and\n that is not a style choice. `className` is merged LAST by `twMerge`, so\n a max-width passed there replaces the one `Popover` sets — and the one\n `Popover` sets is now the clamp that keeps the panel on screen. The\n prop writes `--dx-popover-w`, which sits INSIDE that clamp: the design\n size is still 480px and it still cannot render wider than 90vw or than\n the room the positioner found beside the anchor.\n\n WHAT THE PANEL CARRIES. A source is no longer a line and a quote.\n It is a document title over a STACK of cited pages, each setting a\n thumbnail beside citation text that wraps. The horizontal budget is\n spent before the text starts: `p-4` takes 32px of the panel, and a\n thumbnail with its gap takes roughly 76 more. Whatever survives that\n is the measure the citation is actually read at — and at `w-96` it was\n about 276px, near forty characters, which sets a quotation as a column\n of broken phrases. At 480px the same subtraction leaves about 372px,\n sixty-odd characters, inside the 45–75 band prose stays legible in.\n\n AND WHY NOT WIDER, BY DEFAULT. At the DEFAULT this is a popover\n hanging off one cell of a dense table — past roughly a third of a\n laptop's width it stops reading as a detail attached to a value and\n starts reading as a panel that happens to be floating near one, and\n `align=\"start\"` can no longer place it beside its anchor without the\n collision logic dragging it back off the row it belongs to. That is\n an argument for the DEFAULT staying narrow, not for the width being\n fixed — a caller whose panel content is not prose beside a table row\n (a dense multi-column layout with its own reason to spread out) can\n override it via the `width` prop above, still clamped to `Popover`'s\n own viewport ceiling either way.\n\n THE SMALL-VIEWPORT GUARD USED TO LIVE HERE, as `max-w-[92vw]`: 384px\n already fit a 375px phone, 480px does not, so on that viewport the cap\n — not the width — was what rendered. It is gone rather than kept\n beside the new one. `Popover` now clamps every panel to the smaller of\n its design size, 90vw/80vh, and `--available-*`, so a second local cap\n would only ever be the looser of the two and would read as the rule\n while the primitive did the work. */\n width={width}\n className=\"p-0\"\n onOpenChange={onOpenChange}\n /* The popup takes `role=\"dialog\"`, and an unlabelled dialog announces\n itself as nothing. The body puts this id on its own heading. */\n aria-labelledby={titleId}\n >\n {/* THE PANEL SCROLLS ITSELF NOW, one element above this one. The cap and\n the overflow used to be here — `max-h-[80vh] overflow-y-auto` — and\n moving them into `Popover` is the whole point of that change: 80% of\n the VIEWPORT is the wrong bound for a panel that is hanging off the\n TOP of it, and a panel already off screen cannot be scrolled back by\n a scroller living inside it. Keeping this one as well would nest two\n scrollers around the same content, the outer one capped against the\n wrong thing — which is the miss, re-introduced one level down. */}\n <ProvenanceDetail\n record={record}\n actions={actions}\n emptyLabel={emptyLabel}\n redactedLabel={redactedLabel}\n ratingLabel={ratingLabel}\n valueContent={valueContent}\n stateContent={stateContent}\n titleId={titleId}\n />\n </Popover>\n );\n}\n"],"names":["ProvenanceDisclosure","record","actions","emptyLabel","redactedLabel","ratingLabel","triggerBadge","valueWrap","triggerContent","valueContent","stateContent","onOpenChange","className","width","strings","useUiStrings","shown","shownValue","titleId","useId","trigger","jsxs","cn","jsx","ProvenanceBadge","Icon","Popover","ProvenanceDetail"],"mappings":";;;;;;;;;AAuMO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,WAAAC,IAAY;AAAA,EACZ,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC,IAAQ;AACV,GAA8B;AAI5B,QAAMC,IAAUC,EAAA,GACVC,IAAQC,EAAWhB,GAAQ,EAAE,YAAAE,GAAY,eAAAC,EAAA,GAAiBU,EAAQ,iBAAiB,GA2BnFI,IAAU,cAAcC,EAAA,CAAO,IAE/BC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAWC;AAAA,QACT;AAAA;AAAA;AAAA;AAAA,QAIAf,IAAY,gBAAgB;AAAA;AAAA;AAAA;AAAA,QAI5B,CAACC,KACC;AAAA,QACF;AAAA,QACA;AAAA,QACAI;AAAA,MAAA;AAAA,MAMF,UAAA;AAAA,QAAA,gBAAAS,EAAC,QAAA,EAAK,WAAU,WAAW,UAAA;AAAA,UAAApB,EAAO;AAAA,UAAM;AAAA,QAAA,GAAC;AAAA,QACxCO,KACC,gBAAAe;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWD;AAAA,cACT;AAAA;AAAA;AAAA;AAAA;AAAA,cAKAf,IAAY,kCAAkC;AAAA,YAAA;AAAA,YAG/C,UAAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAGJV,MAAiB,UAChB,gBAAAiB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAOvB,EAAO;AAAA,YACd,YAAYK,MAAiB,SAAS,SAAS;AAAA,YAC/C,WAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAGd,gBAAAiB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,MAAK;AAAA,YAML,WAAU;AAAA,UAAA;AAAA,QAAA;AAAA,0BAEX,QAAA,EAAK,WAAU,WAAW,UAAAX,EAAQ,qBAAqB,cAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAI1E,SACE,gBAAAS;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,SAAAN;AAAA,MACA,MAAK;AAAA,MACL,OAAM;AAAA,MAyCN,OAAAP;AAAA,MACA,WAAU;AAAA,MACV,cAAAF;AAAA,MAGA,mBAAiBO;AAAA,MAUjB,UAAA,gBAAAK;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,QAAA1B;AAAA,UACA,SAAAC;AAAA,UACA,YAAAC;AAAA,UACA,eAAAC;AAAA,UACA,aAAAC;AAAA,UACA,cAAAI;AAAA,UACA,cAAAC;AAAA,UACA,SAAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as n, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as s } from "../Icon.js";
|
|
3
|
+
import { cn as d } from "../../lib/cn.js";
|
|
4
|
+
const u = {
|
|
5
|
+
redacted: { icon: "eye-off", className: "italic text-tertiary" },
|
|
6
|
+
empty: { icon: "minus", className: "italic text-tertiary" },
|
|
7
|
+
failed: { icon: "triangle-alert", className: "text-danger-text" }
|
|
8
|
+
};
|
|
9
|
+
function r({ kind: e, children: i }) {
|
|
10
|
+
const t = u[e];
|
|
11
|
+
return /* @__PURE__ */ c("span", { "data-absence": e, className: d("inline-flex items-center gap-1.5", t.className), children: [
|
|
12
|
+
/* @__PURE__ */ n(s, { name: t.icon, size: "xs" }),
|
|
13
|
+
i
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
function l(e) {
|
|
17
|
+
return e.redacted === !0;
|
|
18
|
+
}
|
|
19
|
+
function o(e) {
|
|
20
|
+
return !l(e) && e.state === "failed";
|
|
21
|
+
}
|
|
22
|
+
function p(e, { emptyLabel: i, redactedLabel: t }, a) {
|
|
23
|
+
return l(e) ? /* @__PURE__ */ n(r, { kind: "redacted", children: t ?? a.redacted }) : o(e) ? /* @__PURE__ */ n(r, { kind: "failed", children: a.heldNull }) : e.value === null ? /* @__PURE__ */ n(r, { kind: "empty", children: i ?? a.noValue }) : e.value;
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
r as Absence,
|
|
27
|
+
o as isFailed,
|
|
28
|
+
l as isRedacted,
|
|
29
|
+
p as shownValue
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=absence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"absence.js","sources":["../../../src/components/provenance/absence.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Icon, type IconName } from \"../Icon\";\nimport { cn } from \"../../lib/cn\";\nimport type { UiStrings } from \"../../lib/i18n\";\nimport type { ProvenanceRecord } from \"./types\";\n\n/* ----------------------------------------------------------------------------\n THE THREE ABSENCES, AND WHY THEY EACH GET A SHAPE.\n\n Withheld from you, never extracted, and extracted-then-disproved call for\n completely different next actions: ask for a grant, go and extract it, go and\n look at why the check failed. Rendering all three as an empty cell would make\n them indistinguishable — and once the state badge can be a bare glyph, an\n icon-only treatment is the easiest possible way to collapse them back onto\n one mark.\n\n So each carries BOTH a word and a distinct SHAPE: a struck-through eye, a\n bare dash, a triangle. Not three colours — two of the three are deliberately\n the same tertiary grey, so nothing here can be told apart by hue and a reader\n with a colour deficiency loses nothing.\n\n None of the three is a circle, which is what every state badge glyph is\n (`circle-check`, `shield-check`, `circle-dashed`, `circle-x`) — so the mark\n that says WHAT IS MISSING never reads as the mark that says HOW IT WAS\n CHECKED, even when they sit beside each other on a failed record.\n\n WHY THIS SITS IN ITS OWN FILE. The trigger and the body are two components\n now — `ProvenanceDisclosure` draws the value on the page, `ProvenanceDetail`\n draws it again at the head of the panel — and BOTH have to spell an absence\n the same way. A second copy in either file is a second vocabulary waiting to\n drift, which is the exact failure the three shapes exist to prevent. It is\n deliberately NOT re-exported from `./index`: it is shared implementation, not\n API.\n -------------------------------------------------------------------------- */\nconst ABSENCE: Record<\"redacted\" | \"empty\" | \"failed\", { icon: IconName; className: string }> = {\n redacted: { icon: \"eye-off\", className: \"italic text-tertiary\" },\n empty: { icon: \"minus\", className: \"italic text-tertiary\" },\n failed: { icon: \"triangle-alert\", className: \"text-danger-text\" },\n};\n\nexport function Absence({ kind, children }: { kind: keyof typeof ABSENCE; children: ReactNode }) {\n const detail = ABSENCE[kind];\n return (\n <span data-absence={kind} className={cn(\"inline-flex items-center gap-1.5\", detail.className)}>\n <Icon name={detail.icon} size=\"xs\" />\n {children}\n </span>\n );\n}\n\n/** Whether the record is withheld from this viewer. The first gate, everywhere. */\nexport function isRedacted(record: ProvenanceRecord): boolean {\n return record.redacted === true;\n}\n\n/**\n * Whether the record's own check disproved it.\n *\n * Precedence matters and is asserted: a record that is BOTH withheld and failed\n * reads as withheld, because that is the fact about this viewer. The failure is\n * still true, but it is not theirs to act on — and showing them a failure reason\n * drawn from a value they may not see is the leak the panel is supposed to\n * close.\n */\nexport function isFailed(record: ProvenanceRecord): boolean {\n return !isRedacted(record) && record.state === \"failed\";\n}\n\n/**\n * What a reader is shown IN PLACE OF the value — or the value itself.\n *\n * Each of the three absences says which one it is: withheld from you, never\n * extracted, or extracted and disproved. Rendering all three as an empty cell\n * would make them indistinguishable, and they call for completely different\n * next actions.\n */\nexport function shownValue(\n record: ProvenanceRecord,\n { emptyLabel, redactedLabel }: { emptyLabel?: string; redactedLabel?: string },\n absence: UiStrings[\"provenanceAbsence\"],\n): ReactNode {\n if (isRedacted(record)) return <Absence kind=\"redacted\">{redactedLabel ?? absence.redacted}</Absence>;\n if (isFailed(record)) return <Absence kind=\"failed\">{absence.heldNull}</Absence>;\n /* Only null. An extracted empty string IS a value — coercing it to \"No value\"\n is the component collapsing an absence it was built to keep apart, one\n level down. */\n if (record.value === null) return <Absence kind=\"empty\">{emptyLabel ?? absence.noValue}</Absence>;\n return record.value;\n}\n"],"names":["ABSENCE","Absence","kind","children","detail","jsxs","cn","jsx","Icon","isRedacted","record","isFailed","shownValue","emptyLabel","redactedLabel","absence"],"mappings":";;;AAkCA,MAAMA,IAA0F;AAAA,EAC9F,UAAU,EAAE,MAAM,WAAW,WAAW,uBAAA;AAAA,EACxC,OAAO,EAAE,MAAM,SAAS,WAAW,uBAAA;AAAA,EACnC,QAAQ,EAAE,MAAM,kBAAkB,WAAW,mBAAA;AAC/C;AAEO,SAASC,EAAQ,EAAE,MAAAC,GAAM,UAAAC,KAAiE;AAC/F,QAAMC,IAASJ,EAAQE,CAAI;AAC3B,SACE,gBAAAG,EAAC,UAAK,gBAAcH,GAAM,WAAWI,EAAG,oCAAoCF,EAAO,SAAS,GAC1F,UAAA;AAAA,IAAA,gBAAAG,EAACC,GAAA,EAAK,MAAMJ,EAAO,MAAM,MAAK,MAAK;AAAA,IAClCD;AAAA,EAAA,GACH;AAEJ;AAGO,SAASM,EAAWC,GAAmC;AAC5D,SAAOA,EAAO,aAAa;AAC7B;AAWO,SAASC,EAASD,GAAmC;AAC1D,SAAO,CAACD,EAAWC,CAAM,KAAKA,EAAO,UAAU;AACjD;AAUO,SAASE,EACdF,GACA,EAAE,YAAAG,GAAY,eAAAC,EAAA,GACdC,GACW;AACX,SAAIN,EAAWC,CAAM,IAAU,gBAAAH,EAACN,KAAQ,MAAK,YAAY,UAAAa,KAAiBC,EAAQ,SAAA,CAAS,IACvFJ,EAASD,CAAM,sBAAWT,GAAA,EAAQ,MAAK,UAAU,UAAAc,EAAQ,SAAA,CAAS,IAIlEL,EAAO,UAAU,OAAa,gBAAAH,EAACN,KAAQ,MAAK,SAAS,UAAAY,KAAcE,EAAQ,QAAA,CAAQ,IAChFL,EAAO;AAChB;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { devWarn as e } from "../../lib/dev-warn.js";
|
|
2
|
+
function t(n) {
|
|
3
|
+
return (!Number.isFinite(n) || n < 0 || n > 1) && e(
|
|
4
|
+
"confidenceScore",
|
|
5
|
+
`received ${String(n)}, which is not a 0–1 score. If this is a rating on a small integer scale (say 4 out of 5), use ratedConfidence(rating, scale) — dividing it down into 0–1 makes it render as a percentage the scale cannot produce.`
|
|
6
|
+
), Number.isFinite(n) ? Math.max(0, Math.min(1, n)) : 0;
|
|
7
|
+
}
|
|
8
|
+
function o(n) {
|
|
9
|
+
return { kind: "score", score: t(n) };
|
|
10
|
+
}
|
|
11
|
+
function a(n, i) {
|
|
12
|
+
return !Number.isFinite(n) || !Number.isFinite(i) || i < 1 ? (e(
|
|
13
|
+
"ratedConfidence",
|
|
14
|
+
`received ${String(n)} out of ${String(i)}, which is not a rating on a whole scale. Pass null instead of a rating you do not have — a bar at zero and a bar with nothing to show look identical and mean opposite things.`
|
|
15
|
+
), { kind: "rating", rating: 0, scale: 0 }) : {
|
|
16
|
+
kind: "rating",
|
|
17
|
+
rating: Math.round(Math.max(0, Math.min(i, n))),
|
|
18
|
+
scale: Math.round(i)
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function d(n) {
|
|
22
|
+
return n >= 0.9 ? "high" : n >= 0.7 ? "moderate" : "low";
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
d as confidenceBand,
|
|
26
|
+
t as confidenceScore,
|
|
27
|
+
a as ratedConfidence,
|
|
28
|
+
o as scoredConfidence
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/components/provenance/types.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { devWarn } from \"../../lib/dev-warn\";\n\n/* ============================================================================\n PROVENANCE — an extracted value, and everything needed to defend it.\n\n ANY product that surfaces a machine-extracted value needs this shape: the\n value, where it came from, the exact text at that place, why the model\n concluded it, whether a check confirmed it, what the call cost, and whether a\n person has since signed or corrected it. The vocabulary here is deliberately\n domain-free — `source.label` is a document to one consumer, a URL to another,\n a row id to a third — because the consumer's own words belong in the\n consumer's own mapping layer, not in this library.\n\n The one opinion the library does hold: NULL IS A RENDERED STATE. A value that\n failed its check comes through as `value: null` with `state: \"failed\"`, and\n renders as a marked failure carrying its reason — never as an empty cell, and\n never as a plausible-looking value. A component that quietly drew nothing for\n a failure would make the failure invisible, which is the one outcome a\n provenance surface exists to prevent.\n ========================================================================= */\n\nexport type ProvenanceState =\n /** Machine-extracted, and the check passed. */\n | \"verified\"\n /** A person signed it — on top of the machine's verdict, never instead. */\n | \"human\"\n /** Extracted, but nothing confirmed it. The value stands, flagged. */\n | \"unverified\"\n /** The check actively failed. There is no value. */\n | \"failed\";\n\n/** Where a value came from, precisely enough to go and look. */\nexport interface ProvenanceSource {\n /** The thing it came from — a document title, a URL, a table name. */\n label: string;\n /** Where inside it: \"page 4\", \"line 82\", \"§3.1\". Null when there is no locus. */\n locus: string | null;\n /** The exact text at that locus. */\n quote: string | null;\n}\n\n/**\n * The verdict of whatever check the consumer ran.\n *\n * `passed` is a tri-state on purpose: `true`, `false`, and `null` for \"no check\n * was run\" — which is a different claim from \"a check ran and failed\", and\n * collapsing the two would let an unchecked value read as a passing one.\n */\nexport interface ProvenanceCheck {\n passed: boolean | null;\n /** How it was checked, or why it could not be. */\n detail: string;\n}\n\n/** The model call that produced the value. */\nexport interface ProvenanceCall {\n model: string;\n tokensIn: number;\n tokensOut: number;\n latencyMs: number;\n}\n\n/** A person's signature over the value. */\nexport interface ProvenanceSignoff {\n by: string;\n at: string;\n note: string | null;\n /**\n * What the value was before they changed it.\n *\n * Null when they signed without correcting. Present means the value was\n * replaced — and the original is kept, because a correction whose previous\n * value is gone is an assertion rather than a record.\n */\n replaced: string | null;\n}\n\nexport interface ProvenanceRecord {\n /** What this value IS. Always shown, even when the value is hidden. */\n label: string;\n /** Null when it failed, or when the viewer may not see it. */\n value: ReactNode | null;\n state: ProvenanceState;\n /**\n * How sure the author was, on whichever scale they said it — `scoredConfidence`\n * for a continuous 0–1 figure, `ratedConfidence` for \"4 out of 5\". Null when\n * nothing scored it, which is a different claim from a score of zero.\n */\n confidence: ProvenanceConfidence | null;\n source: ProvenanceSource | null;\n reasoning: string | null;\n check: ProvenanceCheck | null;\n call: ProvenanceCall | null;\n signoff: ProvenanceSignoff | null;\n /**\n * Withheld from this viewer.\n *\n * Distinct from a null value: the label and the verification state still\n * render, so a reader can see that a value EXISTS and was checked without\n * seeing it. Hiding the row entirely would make the record look thinner than\n * it is to the person least able to tell.\n */\n redacted?: boolean;\n}\n\n/* ============================================================================\n CONFIDENCE ARRIVES ON TWO DIFFERENT KINDS OF SCALE, AND THEY MUST NOT MIX.\n\n A SCORE is CONTINUOUS on 0–1 and can take any value in between: a\n probability, a similarity, a model's own certainty. Every figure in the range\n is reachable, so drawing one as a percentage reports something real.\n\n A RATING is a small integer out of a small maximum — \"4 out of 5\". A\n percentage is NOT a fair way to draw one: on a five-point scale only\n 20/40/60/80/100 can ever be printed, so the two digits of apparent precision\n are digits the number does not have, and a reader seeing `100%` concludes\n something was MEASURED that was in fact SELF-REPORTED as \"top marks\".\n\n THIS IS NOT HYPOTHETICAL, AND IT IS WHY THE TYPE CHANGED. `confidence` was a\n bare `number | null` documented as 0–1. A consumer whose extractor self-rates\n 1–5 divided by five on the way in — the only conversion available to it — and\n every top rating rendered as `100%`. Nothing was wrong in the library's own\n terms; the wrong SHAPE fitted the prop, silently, and the documentation that\n said \"0..1\" was the only thing standing in the way of it.\n\n Documentation is no longer the thing standing in the way. A bare number does\n not type-check any more: a `ProvenanceConfidence` can only come out of\n `scoredConfidence` or `ratedConfidence`, and the two renderers dispatch on\n which one it is. A five-point rating CANNOT reach the percentage renderer,\n because the only value `ConfidenceMeter` accepts is a `ConfidenceScore` and\n the only thing that mints one is `confidenceScore`, whose entire job is the\n range check.\n ========================================================================= */\n\n/* The brand. DECLARED AND NEVER DEFINED — it exists only in the type system, is\n not exported, and has no runtime value, so there is no object literal a\n consumer can write that satisfies `ConfidenceScore`. That is the whole\n mechanism: the constructor is not the recommended way in, it is the only\n way in. */\ndeclare const CONFIDENCE_SCORE: unique symbol;\n\n/**\n * A confidence on the CONTINUOUS 0–1 scale — the one thing that may be drawn as\n * a percentage.\n *\n * Nominal on purpose. It IS a number at runtime and arithmetic on it behaves\n * exactly as it reads, but a raw `0.94` is not assignable to it. `confidenceScore`\n * is the only way in, and is therefore the one place a range can be checked.\n */\nexport type ConfidenceScore = number & { readonly [CONFIDENCE_SCORE]: \"score\" };\n\n/**\n * Mint a 0–1 score.\n *\n * Out of range is CLAMPED and warned about rather than thrown: the caller most\n * likely to be out of range is one holding a rating on some other scale, and a\n * blank page is a worse outcome than a bar at one end with a line in the console\n * naming the function that fixes it.\n */\nexport function confidenceScore(value: number): ConfidenceScore {\n if (!Number.isFinite(value) || value < 0 || value > 1) {\n devWarn(\n \"confidenceScore\",\n `received ${String(value)}, which is not a 0–1 score. If this is a rating on a small ` +\n `integer scale (say 4 out of 5), use ratedConfidence(rating, scale) — dividing it down ` +\n `into 0–1 makes it render as a percentage the scale cannot produce.`,\n );\n }\n const clamped = Number.isFinite(value) ? Math.max(0, Math.min(1, value)) : 0;\n return clamped as ConfidenceScore;\n}\n\n/**\n * HOW SURE THE AUTHOR WAS, carrying WHICH KIND OF SCALE it was said on.\n *\n * Never written as a literal — see the brand above. `scoredConfidence` and\n * `ratedConfidence` are the two doors, and which door a value came through is\n * what the renderer dispatches on.\n */\nexport type ProvenanceConfidence =\n /** Continuous 0–1. Drawn as a banded meter with its percentage. */\n | { readonly kind: \"score\"; readonly score: ConfidenceScore }\n /**\n * `rating` out of `scale`, both whole numbers. Drawn as one bar — one colour per\n * step of five — because a percentage of a small scale prints precision it\n * does not have.\n */\n | { readonly kind: \"rating\"; readonly rating: number; readonly scale: number };\n\n/** A continuous 0–1 confidence, for a record. */\nexport function scoredConfidence(value: number): ProvenanceConfidence {\n return { kind: \"score\", score: confidenceScore(value) };\n}\n\n/**\n * A discrete `rating` out of `scale`, for a record.\n *\n * The denominator travels WITH the number, because \"4\" means nothing on its own\n * and every consumer that has had to pass a rating around without one has ended\n * up hard-coding the scale at the far end.\n */\nexport function ratedConfidence(rating: number, scale: number): ProvenanceConfidence {\n if (!Number.isFinite(rating) || !Number.isFinite(scale) || scale < 1) {\n devWarn(\n \"ratedConfidence\",\n `received ${String(rating)} out of ${String(scale)}, which is not a rating on a whole ` +\n `scale. Pass null instead of a rating you do not have — a bar at zero and a bar with ` +\n `nothing to show look identical and mean opposite things.`,\n );\n return { kind: \"rating\", rating: 0, scale: 0 };\n }\n return {\n kind: \"rating\",\n rating: Math.round(Math.max(0, Math.min(scale, rating))),\n scale: Math.round(scale),\n };\n}\n\n/** 0..1 to a band. A bare percentage invites false precision. */\nexport type ConfidenceBand = \"high\" | \"moderate\" | \"low\";\n\nexport function confidenceBand(confidence: ConfidenceScore): ConfidenceBand {\n if (confidence >= 0.9) return \"high\";\n if (confidence >= 0.7) return \"moderate\";\n return \"low\";\n}\n"],"names":["confidenceScore","value","devWarn","scoredConfidence","ratedConfidence","rating","scale","confidenceBand","confidence"],"mappings":";AAgKO,SAASA,EAAgBC,GAAgC;AAC9D,UAAI,CAAC,OAAO,SAASA,CAAK,KAAKA,IAAQ,KAAKA,IAAQ,MAClDC;AAAA,IACE;AAAA,IACA,YAAY,OAAOD,CAAK,CAAC;AAAA,EAAA,GAKb,OAAO,SAASA,CAAK,IAAI,KAAK,IAAI,GAAG,KAAK,IAAI,GAAGA,CAAK,CAAC,IAAI;AAE7E;AAoBO,SAASE,EAAiBF,GAAqC;AACpE,SAAO,EAAE,MAAM,SAAS,OAAOD,EAAgBC,CAAK,EAAA;AACtD;AASO,SAASG,EAAgBC,GAAgBC,GAAqC;AACnF,SAAI,CAAC,OAAO,SAASD,CAAM,KAAK,CAAC,OAAO,SAASC,CAAK,KAAKA,IAAQ,KACjEJ;AAAA,IACE;AAAA,IACA,YAAY,OAAOG,CAAM,CAAC,WAAW,OAAOC,CAAK,CAAC;AAAA,EAAA,GAI7C,EAAE,MAAM,UAAU,QAAQ,GAAG,OAAO,EAAA,KAEtC;AAAA,IACL,MAAM;AAAA,IACN,QAAQ,KAAK,MAAM,KAAK,IAAI,GAAG,KAAK,IAAIA,GAAOD,CAAM,CAAC,CAAC;AAAA,IACvD,OAAO,KAAK,MAAMC,CAAK;AAAA,EAAA;AAE3B;AAKO,SAASC,EAAeC,GAA6C;AAC1E,SAAIA,KAAc,MAAY,SAC1BA,KAAc,MAAY,aACvB;AACT;"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { jsxs as m, jsx as o, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { Button as C } from "../Button.js";
|
|
4
|
+
import { Callout as u } from "../Callout.js";
|
|
5
|
+
import { Dialog as _ } from "../Dialog.js";
|
|
6
|
+
import { DescriptionList as U } from "../DescriptionList.js";
|
|
7
|
+
import { cn as W } from "../../lib/cn.js";
|
|
8
|
+
import { DateTimeText as I, useDateTimeText as z } from "../DateTimeText.js";
|
|
9
|
+
import { RelativeTime as J } from "../RelativeTime.js";
|
|
10
|
+
import { isRoleSelectable as K, leastPrivilegeRoleId as Q, RoleKeyPicker as X } from "./RoleKeyPicker.js";
|
|
11
|
+
import { confirmCodeMatches as Y, useApprovalActions as Z, ApprovalHeader as $, ConfirmCodeEntry as q, ConfirmCodeCallout as ee, ApprovalError as ne, ApprovalButtons as oe, ExpiredNotice as ie, TerminalCallout as A } from "./approvalPanelParts.js";
|
|
12
|
+
import { useUiStrings as k } from "../../lib/i18n/provider.js";
|
|
13
|
+
function M(n) {
|
|
14
|
+
return n.request.kind === "machine";
|
|
15
|
+
}
|
|
16
|
+
const re = {
|
|
17
|
+
session: (n) => n.kindSession,
|
|
18
|
+
worker: (n) => n.kindWorker,
|
|
19
|
+
machine: (n) => n.kindMachine
|
|
20
|
+
}, te = {
|
|
21
|
+
session: (n) => n.session,
|
|
22
|
+
worker: (n) => n.worker,
|
|
23
|
+
machine: (n) => n.machine
|
|
24
|
+
};
|
|
25
|
+
function le(n, e, r) {
|
|
26
|
+
const { accessRequest: i, approval: t } = n;
|
|
27
|
+
return [
|
|
28
|
+
{ key: "kind", term: i.kind, value: re[e.kind](i) },
|
|
29
|
+
{
|
|
30
|
+
key: "label",
|
|
31
|
+
term: te[e.kind](i),
|
|
32
|
+
value: e.label,
|
|
33
|
+
mono: e.kind !== "session"
|
|
34
|
+
},
|
|
35
|
+
e.repo ? { key: "repo", term: i.repository, value: e.repo } : null,
|
|
36
|
+
// DXUI-15: a machine request's label row already names the machine, so its host is not shown a second time.
|
|
37
|
+
e.machine && e.kind !== "machine" ? { key: "machine", term: i.machine, value: e.machine } : null,
|
|
38
|
+
e.requesterIp ? { key: "ip", term: i.address, value: e.requesterIp, mono: !0 } : null,
|
|
39
|
+
e.clientVersion ? { key: "version", term: i.clientVersion, value: e.clientVersion } : null,
|
|
40
|
+
{
|
|
41
|
+
key: "requested",
|
|
42
|
+
term: t.requested,
|
|
43
|
+
value: /* @__PURE__ */ m(f, { children: [
|
|
44
|
+
/* @__PURE__ */ o(I, { at: e.requestedAt }),
|
|
45
|
+
" (",
|
|
46
|
+
/* @__PURE__ */ o(J, { at: e.requestedAt, tooltip: !1 }),
|
|
47
|
+
")"
|
|
48
|
+
] })
|
|
49
|
+
},
|
|
50
|
+
r && e.expiresAt ? { key: "expires", term: t.expires, value: /* @__PURE__ */ o(I, { at: e.expiresAt }) } : null
|
|
51
|
+
].filter((s) => s !== null);
|
|
52
|
+
}
|
|
53
|
+
function se({ onRevoke: n }) {
|
|
54
|
+
const e = k().accessRequest, [r, i] = p(!1), [t, l] = p(!1), [s, c] = p(null);
|
|
55
|
+
async function h() {
|
|
56
|
+
l(!0), c(null);
|
|
57
|
+
try {
|
|
58
|
+
await n();
|
|
59
|
+
} catch (d) {
|
|
60
|
+
c(d instanceof Error ? d.message : e.revokeFailedMessage);
|
|
61
|
+
} finally {
|
|
62
|
+
l(!1), i(!1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return /* @__PURE__ */ m("div", { className: "flex flex-col gap-3", children: [
|
|
66
|
+
s !== null && /* @__PURE__ */ o(u, { tone: "danger", live: !0, title: e.revokeFailedTitle, children: s }),
|
|
67
|
+
/* @__PURE__ */ o("div", { className: "flex sm:justify-end", children: /* @__PURE__ */ o(C, { variant: "danger", onClick: () => i(!0), className: "w-full sm:w-auto", children: e.revokeKey }) }),
|
|
68
|
+
/* @__PURE__ */ o(
|
|
69
|
+
_,
|
|
70
|
+
{
|
|
71
|
+
open: r,
|
|
72
|
+
onOpenChange: (d) => {
|
|
73
|
+
t || i(d);
|
|
74
|
+
},
|
|
75
|
+
title: e.revokeTitle,
|
|
76
|
+
description: e.revokeBody,
|
|
77
|
+
actions: /* @__PURE__ */ m(f, { children: [
|
|
78
|
+
/* @__PURE__ */ o(C, { variant: "outline", onClick: () => i(!1), disabled: t, children: e.revokeCancel }),
|
|
79
|
+
/* @__PURE__ */ o(C, { variant: "danger", onClick: () => {
|
|
80
|
+
h();
|
|
81
|
+
}, loading: t, children: e.revokeKey })
|
|
82
|
+
] })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] });
|
|
86
|
+
}
|
|
87
|
+
function ae({ revokedAt: n, revokedBy: e }) {
|
|
88
|
+
const r = k().accessRequest;
|
|
89
|
+
return /* @__PURE__ */ o(f, { children: r.revokedBody(z(n), e) });
|
|
90
|
+
}
|
|
91
|
+
function ce({
|
|
92
|
+
state: n,
|
|
93
|
+
request: e,
|
|
94
|
+
expiredNote: r,
|
|
95
|
+
issuedKey: i,
|
|
96
|
+
revokedKey: t
|
|
97
|
+
}) {
|
|
98
|
+
const l = k().accessRequest;
|
|
99
|
+
if (t?.revokedAt)
|
|
100
|
+
return /* @__PURE__ */ o(u, { tone: "danger", title: l.revoked, children: /* @__PURE__ */ o(ae, { revokedAt: t.revokedAt, revokedBy: t.revokedBy }) });
|
|
101
|
+
switch (n) {
|
|
102
|
+
case "approved":
|
|
103
|
+
return /* @__PURE__ */ o(A, { state: n, children: l.approved(e.roleLabel) });
|
|
104
|
+
case "claimed":
|
|
105
|
+
return /* @__PURE__ */ m("div", { className: "flex flex-col gap-4", children: [
|
|
106
|
+
/* @__PURE__ */ o(A, { state: n, children: l.claimed(e.roleLabel) }),
|
|
107
|
+
i?.onRevoke && /* @__PURE__ */ o(se, { onRevoke: i.onRevoke })
|
|
108
|
+
] });
|
|
109
|
+
case "denied":
|
|
110
|
+
return /* @__PURE__ */ o(A, { state: n, children: l.denied });
|
|
111
|
+
case "expired":
|
|
112
|
+
return /* @__PURE__ */ o(ie, { note: r, fallback: l.expiredFallback });
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function Ae(n) {
|
|
116
|
+
const { request: e, state: r, defaultRoleId: i, onDeny: t, expiredNote: l, confirmCodeEntry: s = !1, issuedKey: c, aboveActions: h, className: d } = n, R = M(n), v = n.roles ?? [], S = n.permissions ?? [], b = n.ownPermissionKeys ?? [], T = r === "claimed" && c?.revokedAt ? c : void 0, y = k(), a = y.accessRequest, g = new Set(b), w = i !== void 0 && K(i, v, g), B = w ? i : Q(v, g), N = v.find((H) => H.id === B), [E, V] = p(""), x = K(E, v, g) ? E : B, [D, F] = p(""), O = !s || Y(D, e.confirmCode), { busy: L, error: j, run: G } = Z(), P = r === "pending";
|
|
117
|
+
return /* @__PURE__ */ m("div", { className: W("flex flex-col gap-5", d), children: [
|
|
118
|
+
/* @__PURE__ */ o($, { title: a.title, state: r, revokedLabel: T ? a.revoked : void 0 }),
|
|
119
|
+
/* @__PURE__ */ o(U, { entries: le(y, e, P), className: "divide-y divide-border-subtle" }),
|
|
120
|
+
P ? /* @__PURE__ */ m(f, { children: [
|
|
121
|
+
s ? /* @__PURE__ */ o(q, { expected: e.confirmCode, value: D, onValueChange: F }) : /* @__PURE__ */ o(ee, { code: e.confirmCode }),
|
|
122
|
+
/* @__PURE__ */ o(u, { tone: "warning", title: y.approval.approveOnlyTitle, children: a.approveBody(e.kind, s) }),
|
|
123
|
+
/* @__PURE__ */ o(ne, { error: j }),
|
|
124
|
+
R ? /* @__PURE__ */ o(u, { tone: "info", title: a.machineGrantTitle, children: a.machineGrant }) : N === void 0 ? /* @__PURE__ */ o(u, { tone: "danger", title: a.noRoleTitle, children: a.noRoleBody }) : /* @__PURE__ */ o(
|
|
125
|
+
X,
|
|
126
|
+
{
|
|
127
|
+
roles: v,
|
|
128
|
+
permissions: S,
|
|
129
|
+
ownPermissionKeys: b,
|
|
130
|
+
value: x,
|
|
131
|
+
onValueChange: V,
|
|
132
|
+
description: a.roleHint(N.label, w),
|
|
133
|
+
disabled: L !== null
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
h,
|
|
137
|
+
/* @__PURE__ */ o(
|
|
138
|
+
oe,
|
|
139
|
+
{
|
|
140
|
+
busy: L,
|
|
141
|
+
run: G,
|
|
142
|
+
onApprove: () => M(n) ? n.onApprove() : n.onApprove(x),
|
|
143
|
+
onDeny: t,
|
|
144
|
+
approveDisabled: !O || !R && x === ""
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] }) : /* @__PURE__ */ o(ce, { state: r, request: e, expiredNote: l, issuedKey: c, revokedKey: T })
|
|
148
|
+
] });
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
Ae as AccessRequestPanel
|
|
152
|
+
};
|
|
153
|
+
//# sourceMappingURL=AccessRequestPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccessRequestPanel.js","sources":["../../../src/components/rbac/AccessRequestPanel.tsx"],"sourcesContent":["import { useState, type ReactNode } from \"react\";\nimport { Button } from \"../Button\";\nimport { Callout } from \"../Callout\";\nimport { Dialog } from \"../Dialog\";\nimport { DescriptionList, type DescriptionListEntry } from \"../DescriptionList\";\nimport { cn } from \"../../lib/cn\";\nimport { DateTimeText, useDateTimeText } from \"../DateTimeText\";\nimport { RelativeTime } from \"../RelativeTime\";\nimport { useUiStrings } from \"../../lib/i18n\";\nimport type { UiStrings } from \"../../lib/i18n\";\nimport type { AccessRequestKind } from \"../../lib/i18n/areas/rbac\";\nimport { isRoleSelectable, leastPrivilegeRoleId, RoleKeyPicker } from \"./RoleKeyPicker\";\nimport {\n ApprovalButtons,\n ApprovalError,\n ApprovalHeader,\n ConfirmCodeCallout,\n ConfirmCodeEntry,\n confirmCodeMatches,\n ExpiredNotice,\n TerminalCallout,\n type ExpiredNote,\n useApprovalActions,\n type AccessRequestState,\n} from \"./approvalPanelParts\";\nimport type { Permission, Role } from \"./types\";\n\n/* ----------------------------------------------------------------------------\n ACCESS REQUEST PANEL\n\n THE SCREEN A PERSON SEES WHEN SOMETHING ELSE ASKS TO ACT AS THEM. An agent\n session or a worker holds no credential until a signed-in person approves its\n request; approving mints a key under that person with a role they choose.\n This panel is the whole decision: who is asking, the code to compare, the\n role to grant, approve or deny.\n\n PRESENTATIONAL. It fetches nothing and knows no endpoint. `state` is whatever\n the consumer's server derived: it is never computed here, and never assumed\n to follow a click. After `onApprove` resolves the panel stays \"pending\" until\n the consumer hands it `state=\"approved\"`. `onApprove` / `onDeny` return\n promises; a rejection shows its message in the panel and re-enables the\n buttons.\n\n THE CONFIRM CODE IS FOR COMPARING, NOT COPYING. The requester displays the\n same code in its own terminal and the person checks the two match. That is\n the defence against being sent a link to someone else's request, so the code\n is deliberately plain large text, with no copy control (which would invite\n pasting it somewhere instead of reading it against the requester's screen).\n The panel never authenticates anything with it.\n\n `confirmCodeEntry` TURNS COMPARING INTO TYPING (DX-4467). For a screen where a request may be junk someone\n addressed to the approver, a mis-click on the wrong request must not approve it: the code is then never shown,\n a field takes the code the requester displays, and Approve stays disabled until it matches (case and spaces\n ignored). Deny is always available, and every fact stays visible so the approver can refuse what they do not\n recognise. The match is a client-side gate, not authentication.\n\n THE ROLE STARTS AT THE NARROWEST ONE ALLOWED. Approval is a grant, so the\n default is the selectable role with the fewest permissions, never the\n approver's own role (which would make \"just click Approve\" the broadest\n choice). Roles holding a permission the approver lacks are disabled with the\n missing permissions named (`RoleKeyPicker`, shared with `ApiKeysPanel`).\n Approve stays disabled until a role is chosen, which only matters when no\n role is allowed at all; the panel then says so.\n\n Only a pending request has controls. Approved, denied, expired and claimed\n are terminal readouts: a `Callout` for what it means for the requester, a\n `Badge` for the state at a glance.\n ---------------------------------------------------------------------------- */\n\n/** DXUI-15: `machine` is a dev machine's unattended maintenance: a fixed read-only grant, so no role is chosen. */\nexport type { AccessRequestKind };\n\nexport type { AccessRequestState, ExpiredNote };\n\nexport interface AccessRequest {\n kind: AccessRequestKind;\n /** The session title or the worker id: what the requester calls itself. */\n label: string;\n repo?: string;\n machine?: string;\n /** The address the request came from. */\n requesterIp?: string;\n clientVersion?: string;\n /** ISO instant. */\n requestedAt: string;\n /** ISO instant. Shown while the request is pending. */\n expiresAt?: string;\n /** The short code the requester also displays. Compared by eye, or typed back when `confirmCodeEntry` is set. */\n confirmCode: string;\n /** The label of the role granted. Shown once the request is approved or claimed. */\n roleLabel?: string;\n}\n\n/**\n * DX-4856: the key a claim minted, and what a person may do with it. Pass it once the requester holds a key; omit it before that.\n * `revokedAt` set means the key was revoked: the panel reads Revoked and offers nothing. Otherwise `onRevoke` (pass it only for a\n * person allowed to revoke this key) adds a Revoke key button behind a confirmation dialog.\n */\nexport interface IssuedKey {\n /** ISO instant the key was revoked. */\n revokedAt?: string;\n /** Who revoked it, when a person did. */\n revokedBy?: string;\n /** Revokes the key. A rejection shows its message in the panel; a resolution leaves the panel as it was until the consumer hands it `revokedAt`. */\n onRevoke?: () => Promise<void>;\n}\n\ninterface AccessRequestPanelCommonProps {\n state: AccessRequestState;\n onDeny: () => Promise<void>;\n /**\n * Why an expired request expired and what its requester does next. Used only in the `expired` state; without it the readout says only\n * that nothing was granted.\n */\n expiredNote?: ExpiredNote;\n /**\n * Opt in to typing the confirm code instead of comparing it by eye: the code is not rendered, a field takes it, and Approve is\n * disabled until what was typed matches `request.confirmCode`, ignoring case and spaces. Deny stays available.\n */\n confirmCodeEntry?: boolean;\n /** DX-4856: the key this request minted, with its revoke. Used only in the `claimed` state. */\n issuedKey?: IssuedKey;\n /**\n * DXUI-95: the consumer's own control, drawn just above the Approve and Deny buttons while `state` is `pending`, on role and\n * machine requests alike (for example a switch for machine auto-approve). Never rendered in a terminal state. The panel\n * knows nothing of what it holds.\n */\n aboveActions?: ReactNode;\n className?: string;\n}\n\n/** A session or worker request: the approver chooses the role the key gets. */\nexport interface RoleAccessRequestPanelProps extends AccessRequestPanelCommonProps {\n request: AccessRequest & { kind: \"session\" | \"worker\" };\n /** The roles the approver may grant. */\n roles: Role[];\n /** The permission catalog, used to name the permissions that make a role unavailable. */\n permissions: Permission[];\n /** What the approver holds. A role holding anything outside this set cannot be chosen. */\n ownPermissionKeys: string[];\n /**\n * The role to start on instead of the narrowest allowed one (DX-4431: an agent session starts on the team's\n * default agent role). Used only while it is selectable; otherwise the narrowest allowed role applies.\n */\n defaultRoleId?: string;\n onApprove: (roleId: string) => Promise<void>;\n}\n\n/** DXUI-15: a machine request has a fixed read-only grant, so there is no role to choose and the role props are never read. */\nexport interface MachineAccessRequestPanelProps extends AccessRequestPanelCommonProps {\n request: AccessRequest & { kind: \"machine\" };\n roles?: Role[];\n permissions?: Permission[];\n ownPermissionKeys?: string[];\n defaultRoleId?: string;\n onApprove: () => Promise<void>;\n}\n\nexport type AccessRequestPanelProps = RoleAccessRequestPanelProps | MachineAccessRequestPanelProps;\n\nfunction isMachineProps(props: AccessRequestPanelProps): props is MachineAccessRequestPanelProps {\n return props.request.kind === \"machine\";\n}\n\ntype Strings = UiStrings[\"accessRequest\"];\nconst KIND_LABEL: Record<AccessRequestKind, (s: Strings) => string> = {\n session: (s) => s.kindSession,\n worker: (s) => s.kindWorker,\n machine: (s) => s.kindMachine,\n};\nconst LABEL_TERM: Record<AccessRequestKind, (s: Strings) => string> = {\n session: (s) => s.session,\n worker: (s) => s.worker,\n machine: (s) => s.machine,\n};\n\nfunction factEntries(strings: UiStrings, request: AccessRequest, pending: boolean): DescriptionListEntry[] {\n const { accessRequest, approval } = strings;\n const entries: (DescriptionListEntry | null)[] = [\n { key: \"kind\", term: accessRequest.kind, value: KIND_LABEL[request.kind](accessRequest) },\n {\n key: \"label\",\n term: LABEL_TERM[request.kind](accessRequest),\n value: request.label,\n mono: request.kind !== \"session\",\n },\n request.repo ? { key: \"repo\", term: accessRequest.repository, value: request.repo } : null,\n // DXUI-15: a machine request's label row already names the machine, so its host is not shown a second time.\n request.machine && request.kind !== \"machine\" ? { key: \"machine\", term: accessRequest.machine, value: request.machine } : null,\n request.requesterIp ? { key: \"ip\", term: accessRequest.address, value: request.requesterIp, mono: true } : null,\n request.clientVersion ? { key: \"version\", term: accessRequest.clientVersion, value: request.clientVersion } : null,\n {\n key: \"requested\",\n term: approval.requested,\n value: (\n <>\n <DateTimeText at={request.requestedAt} /> (<RelativeTime at={request.requestedAt} tooltip={false} />)\n </>\n ),\n },\n pending && request.expiresAt\n ? { key: \"expires\", term: approval.expires, value: <DateTimeText at={request.expiresAt} /> }\n : null,\n ];\n return entries.filter((entry): entry is DescriptionListEntry => entry !== null);\n}\n\n/** The Revoke key button, its confirmation and the error a failed revoke leaves (DX-4856). */\nfunction RevokeKey({ onRevoke }: { onRevoke: () => Promise<void> }) {\n const strings = useUiStrings().accessRequest;\n const [open, setOpen] = useState(false);\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n async function confirm() {\n setBusy(true);\n setError(null);\n try {\n await onRevoke();\n } catch (cause) {\n setError(cause instanceof Error ? cause.message : strings.revokeFailedMessage);\n } finally {\n setBusy(false);\n setOpen(false);\n }\n }\n\n return (\n <div className=\"flex flex-col gap-3\">\n {error !== null && (\n <Callout tone=\"danger\" live title={strings.revokeFailedTitle}>\n {error}\n </Callout>\n )}\n <div className=\"flex sm:justify-end\">\n <Button variant=\"danger\" onClick={() => setOpen(true)} className=\"w-full sm:w-auto\">\n {strings.revokeKey}\n </Button>\n </div>\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!busy) setOpen(next);\n }}\n title={strings.revokeTitle}\n description={strings.revokeBody}\n actions={\n <>\n <Button variant=\"outline\" onClick={() => setOpen(false)} disabled={busy}>\n {strings.revokeCancel}\n </Button>\n <Button variant=\"danger\" onClick={() => void confirm()} loading={busy}>\n {strings.revokeKey}\n </Button>\n </>\n }\n />\n </div>\n );\n}\n\n/** The revoked callout's sentence: its time is a hook's text, so it lives in a component of its own. */\nfunction RevokedBody({ revokedAt, revokedBy }: { revokedAt: string; revokedBy: string | undefined }) {\n const strings = useUiStrings().accessRequest;\n return <>{strings.revokedBody(useDateTimeText(revokedAt), revokedBy)}</>;\n}\n\nfunction TerminalNotice({\n state,\n request,\n expiredNote,\n issuedKey,\n revokedKey,\n}: {\n state: Exclude<AccessRequestState, \"pending\">;\n request: AccessRequest;\n expiredNote: ExpiredNote | undefined;\n issuedKey: IssuedKey | undefined;\n /** The key when it was revoked (`issuedKey` in the `claimed` state with `revokedAt` set), else undefined. */\n revokedKey: IssuedKey | undefined;\n}) {\n const strings = useUiStrings().accessRequest;\n if (revokedKey?.revokedAt) {\n return (\n <Callout tone=\"danger\" title={strings.revoked}>\n <RevokedBody revokedAt={revokedKey.revokedAt} revokedBy={revokedKey.revokedBy} />\n </Callout>\n );\n }\n switch (state) {\n case \"approved\":\n return <TerminalCallout state={state}>{strings.approved(request.roleLabel)}</TerminalCallout>;\n case \"claimed\":\n return (\n <div className=\"flex flex-col gap-4\">\n <TerminalCallout state={state}>{strings.claimed(request.roleLabel)}</TerminalCallout>\n {issuedKey?.onRevoke && <RevokeKey onRevoke={issuedKey.onRevoke} />}\n </div>\n );\n case \"denied\":\n return (\n <TerminalCallout state={state}>\n {strings.denied}\n </TerminalCallout>\n );\n case \"expired\":\n return <ExpiredNotice note={expiredNote} fallback={strings.expiredFallback} />;\n }\n}\n\nexport function AccessRequestPanel(props: AccessRequestPanelProps) {\n const { request, state, defaultRoleId, onDeny, expiredNote, confirmCodeEntry = false, issuedKey, aboveActions, className } = props;\n const isMachine = isMachineProps(props);\n const roles = props.roles ?? [];\n const permissions = props.permissions ?? [];\n const ownPermissionKeys = props.ownPermissionKeys ?? [];\n // DX-4856: a revoked key outranks the request's own state, which stays `claimed` for good.\n const revokedKey = state === \"claimed\" && issuedKey?.revokedAt ? issuedKey : undefined;\n const allStrings = useUiStrings();\n const strings = allStrings.accessRequest;\n const own = new Set(ownPermissionKeys);\n const usesDefault = defaultRoleId !== undefined && isRoleSelectable(defaultRoleId, roles, own);\n const narrowest = usesDefault ? defaultRoleId : leastPrivilegeRoleId(roles, own);\n // The hint names the role that is actually preselected: the consumer's default when it is selectable, else the narrowest allowed one (DX-4445).\n const preselected = roles.find((role) => role.id === narrowest);\n // \"\" until the person chooses. The effective role is derived, not stored: a pick that stops being selectable\n // (the approver's permissions narrowed, `roles` reloaded) falls back to the narrowest allowed role, so Approve\n // can never submit a role the picker shows as unavailable, and roles arriving after mount still preselect.\n const [picked, setPicked] = useState(\"\");\n const roleId = isRoleSelectable(picked, roles, own) ? picked : narrowest;\n const [typedCode, setTypedCode] = useState(\"\");\n const codeOk = !confirmCodeEntry || confirmCodeMatches(typedCode, request.confirmCode);\n const { busy, error, run } = useApprovalActions();\n\n const pending = state === \"pending\";\n\n return (\n <div className={cn(\"flex flex-col gap-5\", className)}>\n <ApprovalHeader title={strings.title} state={state} revokedLabel={revokedKey ? strings.revoked : undefined} />\n\n <DescriptionList entries={factEntries(allStrings, request, pending)} className=\"divide-y divide-border-subtle\" />\n\n {pending ? (\n <>\n {confirmCodeEntry ? (\n <ConfirmCodeEntry expected={request.confirmCode} value={typedCode} onValueChange={setTypedCode} />\n ) : (\n <ConfirmCodeCallout code={request.confirmCode} />\n )}\n\n <Callout tone=\"warning\" title={allStrings.approval.approveOnlyTitle}>\n {strings.approveBody(request.kind, confirmCodeEntry)}\n </Callout>\n\n <ApprovalError error={error} />\n\n {isMachine ? (\n <Callout tone=\"info\" title={strings.machineGrantTitle}>\n {strings.machineGrant}\n </Callout>\n ) : preselected === undefined ? (\n <Callout tone=\"danger\" title={strings.noRoleTitle}>\n {strings.noRoleBody}\n </Callout>\n ) : (\n <RoleKeyPicker\n roles={roles}\n permissions={permissions}\n ownPermissionKeys={ownPermissionKeys}\n value={roleId}\n onValueChange={setPicked}\n description={strings.roleHint(preselected.label, usesDefault)}\n disabled={busy !== null}\n />\n )}\n\n {aboveActions}\n\n <ApprovalButtons\n busy={busy}\n run={run}\n // The union does not narrow through `isMachine`, so the guard is repeated for the type system.\n onApprove={() => (isMachineProps(props) ? props.onApprove() : props.onApprove(roleId))}\n onDeny={onDeny}\n approveDisabled={!codeOk || (!isMachine && roleId === \"\")}\n />\n </>\n ) : (\n <TerminalNotice state={state} request={request} expiredNote={expiredNote} issuedKey={issuedKey} revokedKey={revokedKey} />\n )}\n </div>\n );\n}\n"],"names":["isMachineProps","props","KIND_LABEL","s","LABEL_TERM","factEntries","strings","request","pending","accessRequest","approval","jsxs","Fragment","jsx","DateTimeText","RelativeTime","entry","RevokeKey","onRevoke","useUiStrings","open","setOpen","useState","busy","setBusy","error","setError","confirm","cause","Callout","Button","Dialog","next","RevokedBody","revokedAt","revokedBy","useDateTimeText","TerminalNotice","state","expiredNote","issuedKey","revokedKey","TerminalCallout","ExpiredNotice","AccessRequestPanel","defaultRoleId","onDeny","confirmCodeEntry","aboveActions","className","isMachine","roles","permissions","ownPermissionKeys","allStrings","own","usesDefault","isRoleSelectable","narrowest","leastPrivilegeRoleId","preselected","role","picked","setPicked","roleId","typedCode","setTypedCode","codeOk","confirmCodeMatches","run","useApprovalActions","cn","ApprovalHeader","DescriptionList","ConfirmCodeEntry","ConfirmCodeCallout","ApprovalError","RoleKeyPicker","ApprovalButtons"],"mappings":";;;;;;;;;;;;AAgKA,SAASA,EAAeC,GAAyE;AAC/F,SAAOA,EAAM,QAAQ,SAAS;AAChC;AAGA,MAAMC,KAAgE;AAAA,EACpE,SAAS,CAACC,MAAMA,EAAE;AAAA,EAClB,QAAQ,CAACA,MAAMA,EAAE;AAAA,EACjB,SAAS,CAACA,MAAMA,EAAE;AACpB,GACMC,KAAgE;AAAA,EACpE,SAAS,CAACD,MAAMA,EAAE;AAAA,EAClB,QAAQ,CAACA,MAAMA,EAAE;AAAA,EACjB,SAAS,CAACA,MAAMA,EAAE;AACpB;AAEA,SAASE,GAAYC,GAAoBC,GAAwBC,GAA0C;AACzG,QAAM,EAAE,eAAAC,GAAe,UAAAC,EAAA,IAAaJ;AA2BpC,SA1BiD;AAAA,IAC/C,EAAE,KAAK,QAAQ,MAAMG,EAAc,MAAM,OAAOP,GAAWK,EAAQ,IAAI,EAAEE,CAAa,EAAA;AAAA,IACtF;AAAA,MACE,KAAK;AAAA,MACL,MAAML,GAAWG,EAAQ,IAAI,EAAEE,CAAa;AAAA,MAC5C,OAAOF,EAAQ;AAAA,MACf,MAAMA,EAAQ,SAAS;AAAA,IAAA;AAAA,IAEzBA,EAAQ,OAAO,EAAE,KAAK,QAAQ,MAAME,EAAc,YAAY,OAAOF,EAAQ,KAAA,IAAS;AAAA;AAAA,IAEtFA,EAAQ,WAAWA,EAAQ,SAAS,YAAY,EAAE,KAAK,WAAW,MAAME,EAAc,SAAS,OAAOF,EAAQ,YAAY;AAAA,IAC1HA,EAAQ,cAAc,EAAE,KAAK,MAAM,MAAME,EAAc,SAAS,OAAOF,EAAQ,aAAa,MAAM,OAAS;AAAA,IAC3GA,EAAQ,gBAAgB,EAAE,KAAK,WAAW,MAAME,EAAc,eAAe,OAAOF,EAAQ,cAAA,IAAkB;AAAA,IAC9G;AAAA,MACE,KAAK;AAAA,MACL,MAAMG,EAAS;AAAA,MACf,OACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAA,EAAa,IAAIP,EAAQ,YAAA,CAAa;AAAA,QAAE;AAAA,0BAAGQ,GAAA,EAAa,IAAIR,EAAQ,aAAa,SAAS,IAAO;AAAA,QAAE;AAAA,MAAA,EAAA,CACtG;AAAA,IAAA;AAAA,IAGJC,KAAWD,EAAQ,YACf,EAAE,KAAK,WAAW,MAAMG,EAAS,SAAS,yBAAQI,GAAA,EAAa,IAAIP,EAAQ,UAAA,CAAW,MACtF;AAAA,EAAA,EAES,OAAO,CAACS,MAAyCA,MAAU,IAAI;AAChF;AAGA,SAASC,GAAU,EAAE,UAAAC,KAA+C;AAClE,QAAMZ,IAAUa,IAAe,eACzB,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAChC,CAACC,GAAMC,CAAO,IAAIF,EAAS,EAAK,GAChC,CAACG,GAAOC,CAAQ,IAAIJ,EAAwB,IAAI;AAEtD,iBAAeK,IAAU;AACvB,IAAAH,EAAQ,EAAI,GACZE,EAAS,IAAI;AACb,QAAI;AACF,YAAMR,EAAA;AAAA,IACR,SAASU,GAAO;AACd,MAAAF,EAASE,aAAiB,QAAQA,EAAM,UAAUtB,EAAQ,mBAAmB;AAAA,IAC/E,UAAA;AACE,MAAAkB,EAAQ,EAAK,GACbH,EAAQ,EAAK;AAAA,IACf;AAAA,EACF;AAEA,SACE,gBAAAV,EAAC,OAAA,EAAI,WAAU,uBACZ,UAAA;AAAA,IAAAc,MAAU,QACT,gBAAAZ,EAACgB,GAAA,EAAQ,MAAK,UAAS,MAAI,IAAC,OAAOvB,EAAQ,mBACxC,UAAAmB,EAAA,CACH;AAAA,sBAED,OAAA,EAAI,WAAU,uBACb,UAAA,gBAAAZ,EAACiB,KAAO,SAAQ,UAAS,SAAS,MAAMT,EAAQ,EAAI,GAAG,WAAU,oBAC9D,UAAAf,EAAQ,WACX,GACF;AAAA,IACA,gBAAAO;AAAA,MAACkB;AAAA,MAAA;AAAA,QACC,MAAAX;AAAA,QACA,cAAc,CAACY,MAAS;AACtB,UAAKT,KAAMF,EAAQW,CAAI;AAAA,QACzB;AAAA,QACA,OAAO1B,EAAQ;AAAA,QACf,aAAaA,EAAQ;AAAA,QACrB,SACE,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,UAAA,gBAAAC,EAACiB,GAAA,EAAO,SAAQ,WAAU,SAAS,MAAMT,EAAQ,EAAK,GAAG,UAAUE,GAChE,UAAAjB,EAAQ,aAAA,CACX;AAAA,UACA,gBAAAO,EAACiB,GAAA,EAAO,SAAQ,UAAS,SAAS,MAAA;AAAM,YAAKH,EAAA;AAAA,aAAW,SAASJ,GAC9D,UAAAjB,EAAQ,UAAA,CACX;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;AAGA,SAAS2B,GAAY,EAAE,WAAAC,GAAW,WAAAC,KAAmE;AACnG,QAAM7B,IAAUa,IAAe;AAC/B,gCAAU,UAAAb,EAAQ,YAAY8B,EAAgBF,CAAS,GAAGC,CAAS,GAAE;AACvE;AAEA,SAASE,GAAe;AAAA,EACtB,OAAAC;AAAA,EACA,SAAA/B;AAAA,EACA,aAAAgC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,GAOG;AACD,QAAMnC,IAAUa,IAAe;AAC/B,MAAIsB,GAAY;AACd,WACE,gBAAA5B,EAACgB,GAAA,EAAQ,MAAK,UAAS,OAAOvB,EAAQ,SACpC,UAAA,gBAAAO,EAACoB,IAAA,EAAY,WAAWQ,EAAW,WAAW,WAAWA,EAAW,WAAW,GACjF;AAGJ,UAAQH,GAAA;AAAA,IACN,KAAK;AACH,+BAAQI,GAAA,EAAgB,OAAAJ,GAAe,YAAQ,SAAS/B,EAAQ,SAAS,GAAE;AAAA,IAC7E,KAAK;AACH,aACE,gBAAAI,EAAC,OAAA,EAAI,WAAU,uBACb,UAAA;AAAA,QAAA,gBAAAE,EAAC6B,KAAgB,OAAAJ,GAAe,UAAAhC,EAAQ,QAAQC,EAAQ,SAAS,GAAE;AAAA,QAClEiC,GAAW,YAAY,gBAAA3B,EAACI,IAAA,EAAU,UAAUuB,EAAU,SAAA,CAAU;AAAA,MAAA,GACnE;AAAA,IAEJ,KAAK;AACH,aACE,gBAAA3B,EAAC6B,GAAA,EAAgB,OAAAJ,GACd,UAAAhC,EAAQ,QACX;AAAA,IAEJ,KAAK;AACH,+BAAQqC,IAAA,EAAc,MAAMJ,GAAa,UAAUjC,EAAQ,iBAAiB;AAAA,EAAA;AAElF;AAEO,SAASsC,GAAmB3C,GAAgC;AACjE,QAAM,EAAE,SAAAM,GAAS,OAAA+B,GAAO,eAAAO,GAAe,QAAAC,GAAQ,aAAAP,GAAa,kBAAAQ,IAAmB,IAAO,WAAAP,GAAW,cAAAQ,GAAc,WAAAC,EAAA,IAAchD,GACvHiD,IAAYlD,EAAeC,CAAK,GAChCkD,IAAQlD,EAAM,SAAS,CAAA,GACvBmD,IAAcnD,EAAM,eAAe,CAAA,GACnCoD,IAAoBpD,EAAM,qBAAqB,CAAA,GAE/CwC,IAAaH,MAAU,aAAaE,GAAW,YAAYA,IAAY,QACvEc,IAAanC,EAAA,GACbb,IAAUgD,EAAW,eACrBC,IAAM,IAAI,IAAIF,CAAiB,GAC/BG,IAAcX,MAAkB,UAAaY,EAAiBZ,GAAeM,GAAOI,CAAG,GACvFG,IAAYF,IAAcX,IAAgBc,EAAqBR,GAAOI,CAAG,GAEzEK,IAAcT,EAAM,KAAK,CAACU,MAASA,EAAK,OAAOH,CAAS,GAIxD,CAACI,GAAQC,CAAS,IAAIzC,EAAS,EAAE,GACjC0C,IAASP,EAAiBK,GAAQX,GAAOI,CAAG,IAAIO,IAASJ,GACzD,CAACO,GAAWC,CAAY,IAAI5C,EAAS,EAAE,GACvC6C,IAAS,CAACpB,KAAoBqB,EAAmBH,GAAW1D,EAAQ,WAAW,GAC/E,EAAE,MAAAgB,GAAM,OAAAE,GAAO,KAAA4C,EAAA,IAAQC,EAAA,GAEvB9D,IAAU8B,MAAU;AAE1B,2BACG,OAAA,EAAI,WAAWiC,EAAG,uBAAuBtB,CAAS,GACjD,UAAA;AAAA,IAAA,gBAAApC,EAAC2D,GAAA,EAAe,OAAOlE,EAAQ,OAAO,OAAAgC,GAAc,cAAcG,IAAanC,EAAQ,UAAU,OAAA,CAAW;AAAA,IAE5G,gBAAAO,EAAC4D,KAAgB,SAASpE,GAAYiD,GAAY/C,GAASC,CAAO,GAAG,WAAU,iCAAgC;AAAA,IAE9GA,IACC,gBAAAG,EAAAC,GAAA,EACG,UAAA;AAAA,MAAAmC,IACC,gBAAAlC,EAAC6D,GAAA,EAAiB,UAAUnE,EAAQ,aAAa,OAAO0D,GAAW,eAAeC,EAAA,CAAc,IAEhG,gBAAArD,EAAC8D,IAAA,EAAmB,MAAMpE,EAAQ,aAAa;AAAA,MAGjD,gBAAAM,EAACgB,GAAA,EAAQ,MAAK,WAAU,OAAOyB,EAAW,SAAS,kBAChD,UAAAhD,EAAQ,YAAYC,EAAQ,MAAMwC,CAAgB,GACrD;AAAA,MAEA,gBAAAlC,EAAC+D,MAAc,OAAAnD,GAAc;AAAA,MAE5ByB,sBACErB,GAAA,EAAQ,MAAK,QAAO,OAAOvB,EAAQ,mBACjC,UAAAA,EAAQ,aAAA,CACX,IACEsD,MAAgB,SAClB,gBAAA/C,EAACgB,KAAQ,MAAK,UAAS,OAAOvB,EAAQ,aACnC,UAAAA,EAAQ,WAAA,CACX,IAEA,gBAAAO;AAAA,QAACgE;AAAA,QAAA;AAAA,UACC,OAAA1B;AAAA,UACA,aAAAC;AAAA,UACA,mBAAAC;AAAA,UACA,OAAOW;AAAA,UACP,eAAeD;AAAA,UACf,aAAazD,EAAQ,SAASsD,EAAY,OAAOJ,CAAW;AAAA,UAC5D,UAAUjC,MAAS;AAAA,QAAA;AAAA,MAAA;AAAA,MAItByB;AAAA,MAED,gBAAAnC;AAAA,QAACiE;AAAA,QAAA;AAAA,UACC,MAAAvD;AAAA,UACA,KAAA8C;AAAA,UAEA,WAAW,MAAOrE,EAAeC,CAAK,IAAIA,EAAM,cAAcA,EAAM,UAAU+D,CAAM;AAAA,UACpF,QAAAlB;AAAA,UACA,iBAAiB,CAACqB,KAAW,CAACjB,KAAac,MAAW;AAAA,QAAA;AAAA,MAAA;AAAA,IACxD,GACF,IAEA,gBAAAnD,EAACwB,IAAA,EAAe,OAAAC,GAAc,SAAA/B,GAAkB,aAAAgC,GAA0B,WAAAC,GAAsB,YAAAC,EAAA,CAAwB;AAAA,EAAA,GAE5H;AAEJ;"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { Avatar as N } from "../Avatar.js";
|
|
3
|
+
import { Badge as C } from "../Badge.js";
|
|
4
|
+
import { Icon as i } from "../Icon.js";
|
|
5
|
+
import { Popover as z, PopoverClose as a } from "../Popover.js";
|
|
6
|
+
import { cn as n } from "../../lib/cn.js";
|
|
7
|
+
import { useRBAC as A } from "./RBACProvider.js";
|
|
8
|
+
import { useUiStrings as _ } from "../../lib/i18n/provider.js";
|
|
9
|
+
import { emphasis as y } from "../../lib/i18n/emphasis.js";
|
|
10
|
+
const c = [
|
|
11
|
+
"dx-tap flex w-full items-center gap-2.5 rounded-md px-2.5 py-2",
|
|
12
|
+
"text-left text-sm text-secondary outline-none",
|
|
13
|
+
"transition-[var(--tx-colors)] duration-(--dur-instant)",
|
|
14
|
+
"hover:bg-surface-hover hover:text-primary",
|
|
15
|
+
"focus-visible:bg-surface-hover focus-visible:text-primary"
|
|
16
|
+
], p = "text-2xs font-semibold tracking-widest text-tertiary uppercase";
|
|
17
|
+
function T({ title: o, children: d }) {
|
|
18
|
+
return /* @__PURE__ */ r("div", { className: "flex flex-col gap-1.5 border-t border-border-subtle px-1 py-3", children: [
|
|
19
|
+
/* @__PURE__ */ e("span", { className: p, children: o }),
|
|
20
|
+
d
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
function O({
|
|
24
|
+
actions: o,
|
|
25
|
+
nameBadge: d,
|
|
26
|
+
sections: k,
|
|
27
|
+
footer: x,
|
|
28
|
+
onNavigateProfile: m,
|
|
29
|
+
onNavigateRoles: u,
|
|
30
|
+
onNavigateAccess: h,
|
|
31
|
+
onSwitchTeam: f,
|
|
32
|
+
onSignOut: g,
|
|
33
|
+
className: w
|
|
34
|
+
}) {
|
|
35
|
+
const l = _().accountMenu, { actualUser: s, effectiveRole: b, teams: v } = A();
|
|
36
|
+
return /* @__PURE__ */ e(
|
|
37
|
+
z,
|
|
38
|
+
{
|
|
39
|
+
align: "end",
|
|
40
|
+
width: "calc(20rem*var(--ui-scale))",
|
|
41
|
+
className: w,
|
|
42
|
+
trigger: /* @__PURE__ */ e(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
"aria-label": l.triggerLabel(s.name),
|
|
47
|
+
className: "dx-tap shrink-0 rounded-full transition-[var(--tx-colors),box-shadow] duration-(--dur-fast) ease-hover focus-visible:shadow-[0_0_0_3px_var(--focus-halo)]",
|
|
48
|
+
children: /* @__PURE__ */ e(N, { name: s.name, src: s.avatarUrl, size: "sm" })
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
children: /* @__PURE__ */ r("div", { "data-account-menu-panel": "", className: "flex w-full min-w-0 flex-col gap-1", children: [
|
|
52
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3 px-1 pb-3", children: [
|
|
53
|
+
/* @__PURE__ */ e(N, { name: s.name, src: s.avatarUrl, size: "md" }),
|
|
54
|
+
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-col", children: [
|
|
55
|
+
/* @__PURE__ */ r("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
56
|
+
/* @__PURE__ */ e("span", { className: "truncate text-sm font-semibold text-primary", children: s.name }),
|
|
57
|
+
d
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ e("span", { className: "truncate text-xs text-tertiary", children: s.email })
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
o && o.length > 0 && /* @__PURE__ */ e("div", { "data-account-menu-actions": "", className: "flex flex-col gap-0.5 border-t border-border-subtle pt-2 pb-2", children: o.map((t) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ r("button", { type: "button", "data-action-id": t.id, className: n(c), onClick: t.onSelect, children: [
|
|
63
|
+
/* @__PURE__ */ e(i, { name: t.icon, size: "sm" }),
|
|
64
|
+
t.label,
|
|
65
|
+
t.badge && t.badge.value > 0 && /* @__PURE__ */ e(C, { size: "sm", tone: "info", className: "ml-auto", "aria-label": t.badge.label, "data-action-badge": "", children: t.badge.value })
|
|
66
|
+
] }) }, t.id)) }),
|
|
67
|
+
(m || u) && /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 border-t border-border-subtle pt-2", children: [
|
|
68
|
+
m && /* @__PURE__ */ e(a, { children: /* @__PURE__ */ r("button", { type: "button", className: n(c), onClick: m, children: [
|
|
69
|
+
/* @__PURE__ */ e(i, { name: "user", size: "sm" }),
|
|
70
|
+
l.profile
|
|
71
|
+
] }) }),
|
|
72
|
+
u && /* @__PURE__ */ e(a, { children: /* @__PURE__ */ r("button", { type: "button", className: n(c), onClick: u, children: [
|
|
73
|
+
/* @__PURE__ */ e(i, { name: "shield-check", size: "sm" }),
|
|
74
|
+
l.roles
|
|
75
|
+
] }) })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-1.5 border-t border-border-subtle px-1 py-3", children: [
|
|
78
|
+
/* @__PURE__ */ e("span", { className: p, children: l.yourAccess }),
|
|
79
|
+
b ? h ? /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
type: "button",
|
|
83
|
+
className: "text-left text-xs text-secondary underline-offset-2 outline-none hover:underline focus-visible:underline",
|
|
84
|
+
onClick: h,
|
|
85
|
+
children: l.hasRole(b.label, y)
|
|
86
|
+
}
|
|
87
|
+
) }) : /* @__PURE__ */ e("p", { className: "text-xs text-secondary", children: l.hasRole(b.label, y) }) : /* @__PURE__ */ e("p", { className: "text-xs text-tertiary", children: l.noRole })
|
|
88
|
+
] }),
|
|
89
|
+
k,
|
|
90
|
+
v.length > 1 && f && /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 border-t border-border-subtle pt-2", children: [
|
|
91
|
+
/* @__PURE__ */ e("span", { className: n(p, "px-1 pb-1"), children: l.switchTeam }),
|
|
92
|
+
v.map((t) => /* @__PURE__ */ e(a, { children: /* @__PURE__ */ r("button", { type: "button", className: n(c), onClick: () => f(t.id), children: [
|
|
93
|
+
/* @__PURE__ */ e(i, { name: "users", size: "sm" }),
|
|
94
|
+
t.name
|
|
95
|
+
] }) }, t.id))
|
|
96
|
+
] }),
|
|
97
|
+
g && /* @__PURE__ */ e("div", { className: "flex flex-col gap-0.5 border-t border-border-subtle pt-2", children: /* @__PURE__ */ e(a, { children: /* @__PURE__ */ r(
|
|
98
|
+
"button",
|
|
99
|
+
{
|
|
100
|
+
type: "button",
|
|
101
|
+
className: n(c, "text-danger-text hover:bg-danger-subtle hover:text-danger-text focus-visible:bg-danger-subtle focus-visible:text-danger-text"),
|
|
102
|
+
onClick: g,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ e(i, { name: "log-out", size: "sm" }),
|
|
105
|
+
l.signOut
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
) }) }),
|
|
109
|
+
x && /* @__PURE__ */ e("div", { className: "border-t border-border-subtle px-1 pt-2 text-2xs text-tertiary", children: x })
|
|
110
|
+
] })
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
O as AccountMenu,
|
|
116
|
+
T as AccountMenuSection
|
|
117
|
+
};
|
|
118
|
+
//# sourceMappingURL=AccountMenu.js.map
|