@deepseek-ai/dsh-client-ui-primitives 0.2.2-alpha.3 → 0.2.2-rc.2
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/README.i18n.yaml +16 -16
- package/README.md +21 -14
- package/README.zh.md +21 -14
- package/lib/HoverCard.module.css +8 -3
- package/lib/JsonTree.module.css +7 -17
- package/lib/Menu.module.css +157 -37
- package/lib/Modal.module.css +16 -0
- package/lib/QuotePreview.module.css +37 -0
- package/lib/RiskConfirmation.module.css +11 -37
- package/lib/Toast.module.css +2 -3
- package/lib/Tooltip.module.css +2 -1
- package/lib/index.js +1447 -776
- package/lib/index.js.map +1 -0
- package/lib/markdown/CodeBlock.module.css +64 -0
- package/lib/markdown/MarkdownText.module.css +20 -1
- package/lib/types/AnimatedRows.d.ts +3 -0
- package/lib/types/AnimatedRows.d.ts.map +1 -0
- package/lib/types/AnimatedRows.js.map +1 -0
- package/lib/types/BrandWordmark.d.ts.map +1 -0
- package/lib/types/BrandWordmark.js.map +1 -0
- package/lib/types/Button.d.ts.map +1 -0
- package/lib/types/Button.js.map +1 -0
- package/lib/types/Checkbox.d.ts +3 -1
- package/lib/types/Checkbox.d.ts.map +1 -0
- package/lib/types/Checkbox.js.map +1 -0
- package/lib/types/CodeFileIcon.d.ts.map +1 -0
- package/lib/types/CodeFileIcon.js.map +1 -0
- package/lib/types/CodeToolbar.d.ts.map +1 -0
- package/lib/types/CodeToolbar.js.map +1 -0
- package/lib/types/CommandText.d.ts.map +1 -0
- package/lib/types/CommandText.js.map +1 -0
- package/lib/types/ConfigField.d.ts.map +1 -0
- package/lib/types/ConfigField.js.map +1 -0
- package/lib/types/ConnectionIndicator.d.ts.map +1 -0
- package/lib/types/ConnectionIndicator.js.map +1 -0
- package/lib/types/DetailDocument.d.ts.map +1 -0
- package/lib/types/DetailDocument.js.map +1 -0
- package/lib/types/DiffBlock.d.ts.map +1 -0
- package/lib/types/DiffBlock.js.map +1 -0
- package/lib/types/DisclosureRow.d.ts.map +1 -0
- package/lib/types/DisclosureRow.js.map +1 -0
- package/lib/types/DraggableImage.d.ts.map +1 -0
- package/lib/types/DraggableImage.js.map +1 -0
- package/lib/types/FileTypeIcon.d.ts.map +1 -0
- package/lib/types/FileTypeIcon.js.map +1 -0
- package/lib/types/FishLogo.d.ts.map +1 -0
- package/lib/types/FishLogo.js.map +1 -0
- package/lib/types/FoldToggle.d.ts.map +1 -0
- package/lib/types/FoldToggle.js.map +1 -0
- package/lib/types/HoverCard.d.ts.map +1 -0
- package/lib/types/HoverCard.js.map +1 -0
- package/lib/types/HoverCardGroup.d.ts.map +1 -0
- package/lib/types/HoverCardGroup.js.map +1 -0
- package/lib/types/ImageLightbox.d.ts.map +1 -0
- package/lib/types/ImageLightbox.js.map +1 -0
- package/lib/types/ImagePreview.d.ts.map +1 -0
- package/lib/types/ImagePreview.js.map +1 -0
- package/lib/types/InlineEditor.d.ts.map +1 -0
- package/lib/types/InlineEditor.js.map +1 -0
- package/lib/types/Input.d.ts.map +1 -0
- package/lib/types/Input.js.map +1 -0
- package/lib/types/JsonTree.d.ts.map +1 -0
- package/lib/types/JsonTree.js.map +1 -0
- package/lib/types/LinkIcon.d.ts.map +1 -0
- package/lib/types/LinkIcon.js.map +1 -0
- package/lib/types/Menu.d.ts +26 -14
- package/lib/types/Menu.d.ts.map +1 -0
- package/lib/types/Menu.js.map +1 -0
- package/lib/types/MenuGroup.d.ts.map +1 -0
- package/lib/types/MenuGroup.js.map +1 -0
- package/lib/types/MenuRow.d.ts +37 -0
- package/lib/types/MenuRow.d.ts.map +1 -0
- package/lib/types/MenuRow.js.map +1 -0
- package/lib/types/MenuSurface.d.ts.map +1 -0
- package/lib/types/MenuSurface.js.map +1 -0
- package/lib/types/Modal.d.ts +3 -1
- package/lib/types/Modal.d.ts.map +1 -0
- package/lib/types/Modal.js.map +1 -0
- package/lib/types/PathLabel.d.ts.map +1 -0
- package/lib/types/PathLabel.js.map +1 -0
- package/lib/types/PermissionIcon.d.ts.map +1 -0
- package/lib/types/PermissionIcon.js.map +1 -0
- package/lib/types/Pill.d.ts.map +1 -0
- package/lib/types/Pill.js.map +1 -0
- package/lib/types/QuotePreview.d.ts +17 -4
- package/lib/types/QuotePreview.d.ts.map +1 -0
- package/lib/types/QuotePreview.js.map +1 -0
- package/lib/types/ReadBlock.d.ts.map +1 -0
- package/lib/types/ReadBlock.js.map +1 -0
- package/lib/types/ReferenceIcon.d.ts.map +1 -0
- package/lib/types/ReferenceIcon.js.map +1 -0
- package/lib/types/RiskConfirmation.d.ts.map +1 -0
- package/lib/types/RiskConfirmation.js.map +1 -0
- package/lib/types/SearchBlock.d.ts.map +1 -0
- package/lib/types/SearchBlock.js.map +1 -0
- package/lib/types/SegmentedControl.d.ts.map +1 -0
- package/lib/types/SegmentedControl.js.map +1 -0
- package/lib/types/SegmentedTabs.d.ts.map +1 -0
- package/lib/types/SegmentedTabs.js.map +1 -0
- package/lib/types/ShortcutKeys.d.ts.map +1 -0
- package/lib/types/ShortcutKeys.js.map +1 -0
- package/lib/types/SiteGlyph.d.ts.map +1 -0
- package/lib/types/SiteGlyph.js.map +1 -0
- package/lib/types/StateDot.d.ts.map +1 -0
- package/lib/types/StateDot.js.map +1 -0
- package/lib/types/SubmenuPanel.d.ts +19 -0
- package/lib/types/SubmenuPanel.d.ts.map +1 -0
- package/lib/types/SubmenuPanel.js.map +1 -0
- package/lib/types/Switch.d.ts.map +1 -0
- package/lib/types/Switch.js.map +1 -0
- package/lib/types/Tag.d.ts.map +1 -0
- package/lib/types/Tag.js.map +1 -0
- package/lib/types/TerminalBlock.d.ts.map +1 -0
- package/lib/types/TerminalBlock.js.map +1 -0
- package/lib/types/TextShimmer.d.ts.map +1 -0
- package/lib/types/TextShimmer.js.map +1 -0
- package/lib/types/Toast.d.ts.map +1 -0
- package/lib/types/Toast.js.map +1 -0
- package/lib/types/Tooltip.d.ts.map +1 -0
- package/lib/types/Tooltip.js.map +1 -0
- package/lib/types/UserMessageBubble.d.ts.map +1 -0
- package/lib/types/UserMessageBubble.js.map +1 -0
- package/lib/types/WebBlock.d.ts.map +1 -0
- package/lib/types/WebBlock.js.map +1 -0
- package/lib/types/ZoomControls.d.ts.map +1 -0
- package/lib/types/ZoomControls.js.map +1 -0
- package/lib/types/ansi.d.ts.map +1 -0
- package/lib/types/ansi.js.map +1 -0
- package/lib/types/clipboard.d.ts.map +1 -0
- package/lib/types/clipboard.js.map +1 -0
- package/lib/types/code-file-icon-artwork.d.ts.map +1 -0
- package/lib/types/code-file-icon-artwork.js.map +1 -0
- package/lib/types/code-file-types.d.ts.map +1 -0
- package/lib/types/code-file-types.js.map +1 -0
- package/lib/types/code-highlighting.d.ts.map +1 -0
- package/lib/types/code-highlighting.js.map +1 -0
- package/lib/types/darwin-desktop.d.ts.map +1 -0
- package/lib/types/darwin-desktop.js.map +1 -0
- package/lib/types/document-zoom.d.ts.map +1 -0
- package/lib/types/document-zoom.js.map +1 -0
- package/lib/types/file-drag-actions.d.ts.map +1 -0
- package/lib/types/file-drag-actions.js.map +1 -0
- package/lib/types/file-size.d.ts.map +1 -0
- package/lib/types/file-size.js.map +1 -0
- package/lib/types/focus.d.ts.map +1 -0
- package/lib/types/focus.js.map +1 -0
- package/lib/types/guide-artwork.d.ts.map +1 -0
- package/lib/types/guide-artwork.js.map +1 -0
- package/lib/types/head-tail-cap.d.ts.map +1 -0
- package/lib/types/head-tail-cap.js.map +1 -0
- package/lib/types/icons/artwork.d.ts +12 -0
- package/lib/types/icons/artwork.d.ts.map +1 -0
- package/lib/types/icons/artwork.js.map +1 -0
- package/lib/types/icons/index.d.ts +12 -0
- package/lib/types/icons/index.d.ts.map +1 -0
- package/lib/types/icons/index.js.map +1 -0
- package/lib/types/icons/props.d.ts.map +1 -0
- package/lib/types/icons/props.js.map +1 -0
- package/lib/types/icons/shared-artwork.d.ts.map +1 -0
- package/lib/types/icons/shared-artwork.js.map +1 -0
- package/lib/types/image-drag.d.ts.map +1 -0
- package/lib/types/image-drag.js.map +1 -0
- package/lib/types/index.d.ts +5 -4
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/input-modality.d.ts.map +1 -0
- package/lib/types/input-modality.js.map +1 -0
- package/lib/types/keyboard-composition.d.ts.map +1 -0
- package/lib/types/keyboard-composition.js.map +1 -0
- package/lib/types/markdown/CodeBlock.d.ts +8 -1
- package/lib/types/markdown/CodeBlock.d.ts.map +1 -0
- package/lib/types/markdown/CodeBlock.js.map +1 -0
- package/lib/types/markdown/FenceBlocks.d.ts +31 -0
- package/lib/types/markdown/FenceBlocks.d.ts.map +1 -0
- package/lib/types/markdown/FenceBlocks.js.map +1 -0
- package/lib/types/markdown/JsonBlock.d.ts.map +1 -0
- package/lib/types/markdown/JsonBlock.js.map +1 -0
- package/lib/types/markdown/MarkdownDelegate.d.ts +23 -1
- package/lib/types/markdown/MarkdownDelegate.d.ts.map +1 -0
- package/lib/types/markdown/MarkdownDelegate.js.map +1 -0
- package/lib/types/markdown/MarkdownText.d.ts +2 -0
- package/lib/types/markdown/MarkdownText.d.ts.map +1 -0
- package/lib/types/markdown/MarkdownText.js.map +1 -0
- package/lib/types/markdown/cjkFriendlyStrong.d.ts.map +1 -0
- package/lib/types/markdown/cjkFriendlyStrong.js.map +1 -0
- package/lib/types/markdown/copy-tex.d.ts +14 -0
- package/lib/types/markdown/copy-tex.d.ts.map +1 -0
- package/lib/types/markdown/copy-tex.js.map +1 -0
- package/lib/types/markdown/diff-fence.d.ts +58 -0
- package/lib/types/markdown/diff-fence.d.ts.map +1 -0
- package/lib/types/markdown/diff-fence.js.map +1 -0
- package/lib/types/markdown/file-link.d.ts.map +1 -0
- package/lib/types/markdown/file-link.js.map +1 -0
- package/lib/types/markdown/highlight.d.ts +18 -0
- package/lib/types/markdown/highlight.d.ts.map +1 -0
- package/lib/types/markdown/highlight.js.map +1 -0
- package/lib/types/markdown/incremental.d.ts.map +1 -0
- package/lib/types/markdown/incremental.js.map +1 -0
- package/lib/types/markdown/katex.d.ts.map +1 -0
- package/lib/types/markdown/katex.js.map +1 -0
- package/lib/types/markdown/local-image-syntax.d.ts.map +1 -0
- package/lib/types/markdown/local-image-syntax.js.map +1 -0
- package/lib/types/markdown/mathCompatibility.d.ts.map +1 -0
- package/lib/types/markdown/mathCompatibility.js.map +1 -0
- package/lib/types/markdown/parse.d.ts.map +1 -0
- package/lib/types/markdown/parse.js.map +1 -0
- package/lib/types/markdown/plain-text.d.ts.map +1 -0
- package/lib/types/markdown/plain-text.js.map +1 -0
- package/lib/types/markdown/quote-text.d.ts.map +1 -0
- package/lib/types/markdown/quote-text.js.map +1 -0
- package/lib/types/markdown/render.d.ts.map +1 -0
- package/lib/types/markdown/render.js.map +1 -0
- package/lib/types/markdown/useViewportHighlighting.d.ts.map +1 -0
- package/lib/types/markdown/useViewportHighlighting.js.map +1 -0
- package/lib/types/markdown/windows-path-destinations.d.ts.map +1 -0
- package/lib/types/markdown/windows-path-destinations.js.map +1 -0
- package/lib/types/menu-submenu-position.d.ts +15 -0
- package/lib/types/menu-submenu-position.d.ts.map +1 -0
- package/lib/types/menu-submenu-position.js.map +1 -0
- package/lib/types/overlay-top-margin.d.ts.map +1 -0
- package/lib/types/overlay-top-margin.js.map +1 -0
- package/lib/types/plugin-artwork.d.ts.map +1 -0
- package/lib/types/plugin-artwork.js.map +1 -0
- package/lib/types/pointer-grace.d.ts.map +1 -0
- package/lib/types/pointer-grace.js.map +1 -0
- package/lib/types/rank-by-name.d.ts.map +1 -0
- package/lib/types/rank-by-name.js.map +1 -0
- package/lib/types/relative-time.d.ts.map +1 -0
- package/lib/types/relative-time.js.map +1 -0
- package/lib/types/settings-form/SettingsForm.d.ts.map +1 -0
- package/lib/types/settings-form/SettingsForm.js.map +1 -0
- package/lib/types/settings-form/fields.d.ts.map +1 -0
- package/lib/types/settings-form/fields.js.map +1 -0
- package/lib/types/settings-form/form-model.d.ts.map +1 -0
- package/lib/types/settings-form/form-model.js.map +1 -0
- package/lib/types/tooltip-placement.d.ts.map +1 -0
- package/lib/types/tooltip-placement.js.map +1 -0
- package/lib/types/use-clipboard-copy.d.ts.map +1 -0
- package/lib/types/use-clipboard-copy.js.map +1 -0
- package/lib/types/useAnchoredMaxHeight.d.ts.map +1 -0
- package/lib/types/useAnchoredMaxHeight.js.map +1 -0
- package/lib/types/useDismissOnOutsidePointer.d.ts.map +1 -0
- package/lib/types/useDismissOnOutsidePointer.js.map +1 -0
- package/lib/types/useMenuSubmenu.d.ts +43 -0
- package/lib/types/useMenuSubmenu.d.ts.map +1 -0
- package/lib/types/useMenuSubmenu.js.map +1 -0
- package/lib/types/useModalLayer.d.ts.map +1 -0
- package/lib/types/useModalLayer.js.map +1 -0
- package/lib/types/useRowDragPreview.d.ts.map +1 -0
- package/lib/types/useRowDragPreview.js.map +1 -0
- package/lib/types/user-text.d.ts.map +1 -0
- package/lib/types/user-text.js.map +1 -0
- package/package.json +11 -8
- package/src/AnimatedRows.module.css +7 -0
- package/src/AnimatedRows.tsx +195 -0
- package/src/BrandWordmark.tsx +59 -0
- package/src/Button.module.css +84 -0
- package/src/Button.tsx +36 -0
- package/src/Checkbox.module.css +28 -0
- package/src/Checkbox.tsx +34 -0
- package/src/CodeCard.module.css +85 -0
- package/src/CodeFileIcon.tsx +28 -0
- package/src/CodeToolbar.tsx +62 -0
- package/src/CommandText.module.css +12 -0
- package/src/CommandText.tsx +46 -0
- package/src/ConfigField.module.css +12 -0
- package/src/ConfigField.tsx +53 -0
- package/src/ConnectionIndicator.module.css +120 -0
- package/src/ConnectionIndicator.tsx +103 -0
- package/src/DetailDocument.module.css +67 -0
- package/src/DetailDocument.tsx +120 -0
- package/src/DiffBlock.module.css +82 -0
- package/src/DiffBlock.tsx +221 -0
- package/src/DisclosureRow.module.css +115 -0
- package/src/DisclosureRow.tsx +124 -0
- package/src/DraggableImage.tsx +26 -0
- package/src/FileTypeIcon.module.css +50 -0
- package/src/FileTypeIcon.tsx +285 -0
- package/src/FishLogo.tsx +28 -0
- package/src/FoldToggle.tsx +33 -0
- package/src/HoverCard.module.css +108 -0
- package/src/HoverCard.tsx +356 -0
- package/src/HoverCardGroup.tsx +77 -0
- package/src/ImageLightbox.module.css +54 -0
- package/src/ImageLightbox.tsx +72 -0
- package/src/ImagePreview.module.css +24 -0
- package/src/ImagePreview.tsx +36 -0
- package/src/InlineEditor.module.css +23 -0
- package/src/InlineEditor.tsx +69 -0
- package/src/Input.module.css +38 -0
- package/src/Input.tsx +24 -0
- package/src/JsonTree.module.css +371 -0
- package/src/JsonTree.tsx +850 -0
- package/src/LinkIcon.tsx +118 -0
- package/src/Menu.module.css +443 -0
- package/src/Menu.tsx +553 -0
- package/src/MenuGroup.module.css +37 -0
- package/src/MenuGroup.tsx +103 -0
- package/src/MenuRow.tsx +89 -0
- package/src/MenuSurface.module.css +65 -0
- package/src/MenuSurface.tsx +54 -0
- package/src/Modal.module.css +147 -0
- package/src/Modal.tsx +96 -0
- package/src/PathLabel.module.css +28 -0
- package/src/PathLabel.tsx +41 -0
- package/src/PermissionIcon.tsx +119 -0
- package/src/Pill.module.css +30 -0
- package/src/Pill.tsx +36 -0
- package/src/QuotePreview.module.css +138 -0
- package/src/QuotePreview.tsx +133 -0
- package/src/ReadBlock.module.css +45 -0
- package/src/ReadBlock.tsx +151 -0
- package/src/ReferenceIcon.tsx +49 -0
- package/src/RiskConfirmation.module.css +47 -0
- package/src/RiskConfirmation.tsx +79 -0
- package/src/RowDragPreview.module.css +12 -0
- package/src/SearchBlock.module.css +114 -0
- package/src/SearchBlock.tsx +281 -0
- package/src/SegmentedControl.module.css +81 -0
- package/src/SegmentedControl.tsx +140 -0
- package/src/SegmentedTabs.module.css +77 -0
- package/src/SegmentedTabs.tsx +84 -0
- package/src/ShortcutKeys.module.css +33 -0
- package/src/ShortcutKeys.tsx +12 -0
- package/src/SiteGlyph.tsx +149 -0
- package/src/StateDot.module.css +100 -0
- package/src/StateDot.tsx +77 -0
- package/src/SubmenuPanel.tsx +51 -0
- package/src/Switch.module.css +49 -0
- package/src/Switch.tsx +42 -0
- package/src/Tag.module.css +57 -0
- package/src/Tag.tsx +42 -0
- package/src/TerminalBlock.module.css +207 -0
- package/src/TerminalBlock.tsx +294 -0
- package/src/TextShimmer.module.css +88 -0
- package/src/TextShimmer.tsx +58 -0
- package/src/Toast.module.css +102 -0
- package/src/Toast.tsx +101 -0
- package/src/Tooltip.module.css +68 -0
- package/src/Tooltip.tsx +273 -0
- package/src/UserMessageBubble.module.css +11 -0
- package/src/UserMessageBubble.tsx +16 -0
- package/src/WebBlock.module.css +153 -0
- package/src/WebBlock.tsx +196 -0
- package/src/ZoomControls.module.css +54 -0
- package/src/ZoomControls.tsx +92 -0
- package/src/ansi.ts +447 -0
- package/src/clipboard.ts +47 -0
- package/src/code-file-icon-artwork.manifest.json +71 -0
- package/src/code-file-icon-artwork.ts +60 -0
- package/src/code-file-types.ts +340 -0
- package/src/code-highlighting.ts +25 -0
- package/src/css-modules.d.ts +6 -0
- package/src/darwin-desktop.ts +11 -0
- package/src/document-zoom.ts +12 -0
- package/src/file-drag-actions.ts +29 -0
- package/src/file-size.ts +16 -0
- package/src/focus.ts +44 -0
- package/src/guide-artwork.tsx +32 -0
- package/src/head-tail-cap.ts +27 -0
- package/src/icons/artwork.ts +156 -0
- package/src/icons/index.tsx +634 -0
- package/src/icons/props.ts +8 -0
- package/src/icons/shared-artwork.tsx +71 -0
- package/src/image-drag.ts +84 -0
- package/src/index.ts +142 -0
- package/src/input-modality.ts +59 -0
- package/src/keyboard-composition.ts +36 -0
- package/src/markdown/CodeBlock.module.css +209 -0
- package/src/markdown/CodeBlock.tsx +268 -0
- package/src/markdown/FenceBlocks.tsx +51 -0
- package/src/markdown/JsonBlock.module.css +34 -0
- package/src/markdown/JsonBlock.tsx +36 -0
- package/src/markdown/MarkdownDelegate.tsx +102 -0
- package/src/markdown/MarkdownText.module.css +511 -0
- package/src/markdown/MarkdownText.tsx +218 -0
- package/src/markdown/cjkFriendlyStrong.ts +83 -0
- package/src/markdown/copy-tex.ts +53 -0
- package/src/markdown/diff-fence.ts +212 -0
- package/src/markdown/file-link.ts +45 -0
- package/src/markdown/highlight.ts +689 -0
- package/src/markdown/incremental.ts +360 -0
- package/src/markdown/katex.tsx +90 -0
- package/src/markdown/local-image-syntax.ts +29 -0
- package/src/markdown/mathCompatibility.ts +349 -0
- package/src/markdown/parse.ts +49 -0
- package/src/markdown/plain-text.ts +121 -0
- package/src/markdown/quote-text.ts +10 -0
- package/src/markdown/render.tsx +834 -0
- package/src/markdown/useViewportHighlighting.ts +72 -0
- package/src/markdown/windows-path-destinations.ts +34 -0
- package/src/menu-submenu-position.ts +20 -0
- package/src/overlay-top-margin.ts +18 -0
- package/src/plugin-artwork.tsx +110 -0
- package/src/pointer-grace.ts +47 -0
- package/src/rank-by-name.ts +93 -0
- package/src/relative-time.ts +36 -0
- package/src/settings-form/SettingsForm.module.css +53 -0
- package/src/settings-form/SettingsForm.tsx +74 -0
- package/src/settings-form/fields.module.css +153 -0
- package/src/settings-form/fields.tsx +151 -0
- package/src/settings-form/form-model.ts +393 -0
- package/src/tooltip-placement.ts +60 -0
- package/src/use-clipboard-copy.ts +44 -0
- package/src/useAnchoredMaxHeight.ts +45 -0
- package/src/useDismissOnOutsidePointer.ts +34 -0
- package/src/useMenuSubmenu.ts +182 -0
- package/src/useModalLayer.ts +108 -0
- package/src/useRowDragPreview.ts +76 -0
- package/src/user-text.module.css +46 -0
- package/src/user-text.tsx +67 -0
- package/lib/types/useAnchoredPosition.d.ts +0 -36
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Passive, contained image preview for Markdown image links. */
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import { IconLoadingOutlineRegular } from './icons/index.tsx'
|
|
4
|
+
import css from './ImagePreview.module.css'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Render an image without introducing a second activation target.
|
|
8
|
+
* @param props - Source, accessible description, localized status.
|
|
9
|
+
* @returns A contained preview with loading or failure status.
|
|
10
|
+
*/
|
|
11
|
+
export function ImagePreview({ src, alt, loadingLabel, failedLabel }: {
|
|
12
|
+
src: string
|
|
13
|
+
alt: string
|
|
14
|
+
loadingLabel: string
|
|
15
|
+
failedLabel: string
|
|
16
|
+
}) {
|
|
17
|
+
return <Preview key={src} src={src} alt={alt} loadingLabel={loadingLabel} failedLabel={failedLabel} />
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function Preview({ src, alt, loadingLabel, failedLabel }: {
|
|
21
|
+
src: string
|
|
22
|
+
alt: string
|
|
23
|
+
loadingLabel: string
|
|
24
|
+
failedLabel: string
|
|
25
|
+
}) {
|
|
26
|
+
const [state, setState] = useState<'loading' | 'ready' | 'failed'>('loading')
|
|
27
|
+
return <span className={css.frame}>
|
|
28
|
+
{state !== 'failed' && <img src={src} alt={alt} loading="lazy" decoding="async" referrerPolicy="no-referrer"
|
|
29
|
+
className={css.image} data-ready={state === 'ready' || undefined}
|
|
30
|
+
onLoad={() => { setState('ready') }} onError={() => { setState('failed') }} />}
|
|
31
|
+
{state !== 'ready' && <span className={css.status} role="status">
|
|
32
|
+
{state === 'loading' && <IconLoadingOutlineRegular size={16} />}
|
|
33
|
+
<span>{state === 'loading' ? loadingLabel : failedLabel}</span>
|
|
34
|
+
</span>}
|
|
35
|
+
</span>
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.editor {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
flex: 1 1 auto;
|
|
4
|
+
min-width: 0;
|
|
5
|
+
min-height: 28px;
|
|
6
|
+
/* Six 20px text lines plus padding and border, then the editor scrolls. */
|
|
7
|
+
max-height: 127px;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 3px 8px;
|
|
10
|
+
border: 0.5px solid var(--dsw-alias-border-l4);
|
|
11
|
+
border-radius: var(--dsw-radius-sm);
|
|
12
|
+
outline: none;
|
|
13
|
+
background: var(--dsw-alias-bg-base);
|
|
14
|
+
color: var(--dsw-alias-label-primary);
|
|
15
|
+
font: var(--dsw-font-xs-13);
|
|
16
|
+
font-family: Inter, var(--dsw-font-family);
|
|
17
|
+
overflow-y: auto;
|
|
18
|
+
resize: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.editor:focus {
|
|
22
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
23
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** Multi-line inline editor for short saved-on-Enter drafts such as queued messages and goals. */
|
|
2
|
+
|
|
3
|
+
import { useLayoutEffect, useRef, type KeyboardEvent } from 'react'
|
|
4
|
+
import clsx from 'clsx'
|
|
5
|
+
import css from './InlineEditor.module.css'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Render an autofocused textarea that grows with its text up to six lines, then scrolls.
|
|
9
|
+
* A textarea rather than an input: HTML strips newlines from single-line input values.
|
|
10
|
+
* Enter saves, Shift+Enter breaks the line, Enter during IME composition does nothing,
|
|
11
|
+
* and Escape cancels.
|
|
12
|
+
* @param props.value - current draft text.
|
|
13
|
+
* @param props.label - localized accessible name.
|
|
14
|
+
* @param props.onChange - receives the edited text.
|
|
15
|
+
* @param props.onSave - called for a plain Enter.
|
|
16
|
+
* @param props.onCancel - called for Escape.
|
|
17
|
+
* @param props.className - extra class for the editor's placement.
|
|
18
|
+
* @returns the textarea.
|
|
19
|
+
*/
|
|
20
|
+
export function InlineEditor({ value, label, onChange, onSave, onCancel, className }: {
|
|
21
|
+
value: string
|
|
22
|
+
label: string
|
|
23
|
+
onChange: (value: string) => void
|
|
24
|
+
onSave: () => void
|
|
25
|
+
onCancel: () => void
|
|
26
|
+
className?: string
|
|
27
|
+
}) {
|
|
28
|
+
const ref = useRef<HTMLTextAreaElement>(null)
|
|
29
|
+
|
|
30
|
+
useLayoutEffect(() => {
|
|
31
|
+
// The textarea mounts before layout effects run.
|
|
32
|
+
const node = ref.current as HTMLTextAreaElement
|
|
33
|
+
const fit = (): void => {
|
|
34
|
+
node.style.height = 'auto'
|
|
35
|
+
// scrollHeight excludes the border that the border-box height includes.
|
|
36
|
+
node.style.height = `${node.scrollHeight + node.offsetHeight - node.clientHeight}px`
|
|
37
|
+
}
|
|
38
|
+
fit()
|
|
39
|
+
// A width change rewraps the text; the refit height leaves the width unchanged.
|
|
40
|
+
const observer = new ResizeObserver(fit)
|
|
41
|
+
observer.observe(node)
|
|
42
|
+
return () => { observer.disconnect() }
|
|
43
|
+
}, [value])
|
|
44
|
+
|
|
45
|
+
const onKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>): void => {
|
|
46
|
+
if (event.key === 'Escape') {
|
|
47
|
+
onCancel()
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
// keyCode 229 is the legacy IME-composition signal engines emit without isComposing.
|
|
51
|
+
const composing = event.nativeEvent.isComposing || Reflect.get(event.nativeEvent, 'keyCode') === 229
|
|
52
|
+
if (event.key !== 'Enter' || event.shiftKey || composing) return
|
|
53
|
+
event.preventDefault()
|
|
54
|
+
onSave()
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<textarea
|
|
59
|
+
ref={ref}
|
|
60
|
+
autoFocus
|
|
61
|
+
rows={1}
|
|
62
|
+
className={clsx(css.editor, className)}
|
|
63
|
+
aria-label={label}
|
|
64
|
+
value={value}
|
|
65
|
+
onChange={(event) => { onChange(event.currentTarget.value) }}
|
|
66
|
+
onKeyDown={onKeyDown}
|
|
67
|
+
/>
|
|
68
|
+
)
|
|
69
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
.wrap {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 6px;
|
|
5
|
+
height: 32px;
|
|
6
|
+
padding: 0 8px;
|
|
7
|
+
border: 0.5px solid var(--dsw-alias-border-l4);
|
|
8
|
+
border-radius: var(--dsw-radius-md);
|
|
9
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.wrap:focus-within {
|
|
13
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
width: 16px;
|
|
19
|
+
height: 16px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
color: var(--dsw-alias-label-tertiary);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.input {
|
|
26
|
+
flex: 1;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
border: none;
|
|
29
|
+
outline: none;
|
|
30
|
+
background: transparent;
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
line-height: 22px;
|
|
33
|
+
color: var(--dsw-alias-label-primary);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.input::placeholder {
|
|
37
|
+
color: var(--dsw-alias-label-dimmed);
|
|
38
|
+
}
|
package/src/Input.tsx
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Input: single-line text input atom (search boxes, inline forms). Multi-line
|
|
2
|
+
// inline edits use InlineEditor; the composer is owned by the conversation package.
|
|
3
|
+
|
|
4
|
+
import { forwardRef, type InputHTMLAttributes, type ReactNode } from 'react'
|
|
5
|
+
import clsx from 'clsx'
|
|
6
|
+
import css from './Input.module.css'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Render a text input with an optional leading icon.
|
|
10
|
+
* @param props.icon - optional 16px leading icon node.
|
|
11
|
+
* @param ref - the native input, cleared when it unmounts.
|
|
12
|
+
* @returns wrapper span containing the native input; input attributes pass through.
|
|
13
|
+
*/
|
|
14
|
+
export const Input = forwardRef<HTMLInputElement, {
|
|
15
|
+
icon?: ReactNode
|
|
16
|
+
className?: string
|
|
17
|
+
} & InputHTMLAttributes<HTMLInputElement>>(function Input({ icon, className, ...rest }, ref) {
|
|
18
|
+
return (
|
|
19
|
+
<span className={clsx(css.wrap, className)}>
|
|
20
|
+
{icon != null && <span className={css.icon}>{icon}</span>}
|
|
21
|
+
<input ref={ref} className={css.input} {...rest} />
|
|
22
|
+
</span>
|
|
23
|
+
)
|
|
24
|
+
})
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
.root {
|
|
2
|
+
--json-tree-property: var(--dsw-alias-json-tree-property);
|
|
3
|
+
--json-tree-string: var(--dsw-alias-json-tree-string);
|
|
4
|
+
--json-tree-number: var(--dsw-alias-json-tree-number);
|
|
5
|
+
--json-tree-keyword: var(--dsw-alias-json-tree-keyword);
|
|
6
|
+
--json-tree-punctuation: var(--dsw-alias-json-tree-punctuation);
|
|
7
|
+
--json-tree-icon: var(--dsw-alias-json-tree-icon);
|
|
8
|
+
--json-tree-hover: var(--dsw-alias-json-tree-hover);
|
|
9
|
+
|
|
10
|
+
min-width: 0;
|
|
11
|
+
overflow: auto;
|
|
12
|
+
position: relative;
|
|
13
|
+
color: var(--dsw-alias-label-primary);
|
|
14
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
15
|
+
font: 12px/16px var(--ds-font-family-code);
|
|
16
|
+
overscroll-behavior-x: contain;
|
|
17
|
+
overscroll-behavior-y: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.container {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
width: 100%;
|
|
23
|
+
min-width: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 6px 8px 8px 8px;
|
|
26
|
+
white-space: pre;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.expandedTopLevel {
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
width: 100%;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
padding: 6px 8px 8px 14px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.expandedTopLevel:has(> .topLevelBracket[data-json-root-row][data-json-copy-active]) {
|
|
37
|
+
background: var(--json-tree-hover);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (hover: hover) {
|
|
41
|
+
.expandedTopLevel:has(> .topLevelBracket[data-json-root-row]:hover) {
|
|
42
|
+
background: var(--json-tree-hover);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.expandedTopLevelContainer {
|
|
47
|
+
padding: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.row.topLevelBracket {
|
|
51
|
+
margin-left: 0;
|
|
52
|
+
padding-left: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.children {
|
|
56
|
+
margin: 0;
|
|
57
|
+
padding: 0;
|
|
58
|
+
list-style: none;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.row {
|
|
62
|
+
position: relative;
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
min-width: 0;
|
|
65
|
+
min-height: 16px;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0 0 0 10px;
|
|
68
|
+
list-style: none;
|
|
69
|
+
overflow-wrap: anywhere;
|
|
70
|
+
white-space: pre-wrap;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.row:not(.topLevelBracket)[data-json-copy-active]::after,
|
|
74
|
+
.row:has(> .expander:focus-visible)::after {
|
|
75
|
+
position: absolute;
|
|
76
|
+
z-index: 0;
|
|
77
|
+
top: 0;
|
|
78
|
+
right: 0;
|
|
79
|
+
left: 0;
|
|
80
|
+
height: var(--json-tree-row-height, 16px);
|
|
81
|
+
background: var(--json-tree-hover);
|
|
82
|
+
content: '';
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media (hover: hover) {
|
|
87
|
+
.row:not(.topLevelBracket):hover:not(:has(.row:hover))::after {
|
|
88
|
+
position: absolute;
|
|
89
|
+
z-index: 0;
|
|
90
|
+
top: 0;
|
|
91
|
+
right: 0;
|
|
92
|
+
left: 0;
|
|
93
|
+
height: var(--json-tree-row-height, 16px);
|
|
94
|
+
background: var(--json-tree-hover);
|
|
95
|
+
content: '';
|
|
96
|
+
pointer-events: none;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.row > span:not(.expander, .copySlot) {
|
|
101
|
+
position: relative;
|
|
102
|
+
z-index: 1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.label {
|
|
106
|
+
margin-right: 3px;
|
|
107
|
+
color: var(--json-tree-property);
|
|
108
|
+
font-weight: 400;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.clickableLabel {
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.stringValue {
|
|
116
|
+
color: var(--json-tree-string);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.stringField {
|
|
120
|
+
position: relative;
|
|
121
|
+
z-index: 1;
|
|
122
|
+
display: flow-root;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.stringText {
|
|
126
|
+
display: block;
|
|
127
|
+
max-height: calc(var(--json-tree-collapsed-lines) * 16px);
|
|
128
|
+
padding-left: 12px;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
text-indent: -12px;
|
|
131
|
+
word-break: break-all;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.stringRaw {
|
|
135
|
+
margin: 4px 0 0 12px;
|
|
136
|
+
overflow: auto;
|
|
137
|
+
color: var(--dsw-alias-label-primary);
|
|
138
|
+
font: inherit;
|
|
139
|
+
overflow-wrap: normal;
|
|
140
|
+
white-space: pre;
|
|
141
|
+
word-break: normal;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.stringActions {
|
|
145
|
+
position: absolute;
|
|
146
|
+
top: 1px;
|
|
147
|
+
right: 4px;
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
justify-content: flex-end;
|
|
151
|
+
gap: 4px;
|
|
152
|
+
width: fit-content;
|
|
153
|
+
height: 16px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.stringRaw[data-wrap='true'] {
|
|
157
|
+
overflow-wrap: anywhere;
|
|
158
|
+
white-space: pre-wrap;
|
|
159
|
+
word-break: break-all;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.stringActions > .copySlot {
|
|
163
|
+
opacity: 1;
|
|
164
|
+
pointer-events: auto;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.stringToggleSlot {
|
|
168
|
+
display: flex;
|
|
169
|
+
float: right;
|
|
170
|
+
align-items: flex-end;
|
|
171
|
+
height: calc(var(--json-tree-collapsed-lines) * 16px);
|
|
172
|
+
margin-left: 2px;
|
|
173
|
+
shape-outside: inset(calc((var(--json-tree-collapsed-lines) - 1) * 16px) 0 0);
|
|
174
|
+
pointer-events: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.stringToggle {
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
align-items: baseline;
|
|
180
|
+
gap: 2px;
|
|
181
|
+
margin: 0;
|
|
182
|
+
padding: 0;
|
|
183
|
+
border: 0;
|
|
184
|
+
color: var(--dsw-alias-label-secondary);
|
|
185
|
+
background: transparent;
|
|
186
|
+
font: inherit;
|
|
187
|
+
text-indent: 0;
|
|
188
|
+
white-space: nowrap;
|
|
189
|
+
cursor: pointer;
|
|
190
|
+
pointer-events: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@media (hover: hover) {
|
|
194
|
+
.stringToggle:hover {
|
|
195
|
+
color: var(--dsw-alias-label-primary);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.stringToggle:focus-visible {
|
|
200
|
+
outline: 1px solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
201
|
+
outline-offset: 1px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.row:has(> .stringField) {
|
|
205
|
+
--json-tree-row-height: 100%;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.summary {
|
|
209
|
+
display: block;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
text-overflow: ellipsis;
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.numberValue {
|
|
216
|
+
color: var(--json-tree-number);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.keywordValue {
|
|
220
|
+
color: var(--json-tree-keyword);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.otherValue {
|
|
224
|
+
color: var(--dsw-alias-label-secondary);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.punctuation {
|
|
228
|
+
color: var(--json-tree-punctuation);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.preview {
|
|
232
|
+
color: var(--json-tree-punctuation);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.previewProperty {
|
|
236
|
+
color: var(--json-tree-punctuation);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.previewEllipsis {
|
|
240
|
+
color: var(--dsw-alias-label-tertiary);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.copySlot {
|
|
244
|
+
display: inline-flex;
|
|
245
|
+
width: 20px;
|
|
246
|
+
height: 16px;
|
|
247
|
+
opacity: 0;
|
|
248
|
+
pointer-events: none;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.row > .copySlot {
|
|
252
|
+
position: absolute;
|
|
253
|
+
z-index: 2;
|
|
254
|
+
top: 0;
|
|
255
|
+
right: 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.row:has(> .stringField) > .copySlot {
|
|
259
|
+
top: auto;
|
|
260
|
+
bottom: 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.row:has(> .copySlot) > .stringField .stringToggleSlot {
|
|
264
|
+
padding-right: 24px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.row[data-json-copy-active] > .copySlot,
|
|
268
|
+
.copySlot:focus-within {
|
|
269
|
+
opacity: 1;
|
|
270
|
+
pointer-events: auto;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
@media (hover: hover) {
|
|
274
|
+
.row:hover:not(:has(.row:hover)) > .copySlot {
|
|
275
|
+
opacity: 1;
|
|
276
|
+
pointer-events: auto;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.actionButton {
|
|
281
|
+
box-sizing: border-box;
|
|
282
|
+
display: inline-flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
justify-content: center;
|
|
285
|
+
width: 20px;
|
|
286
|
+
height: 16px;
|
|
287
|
+
margin: 0;
|
|
288
|
+
padding: 0;
|
|
289
|
+
border: 0;
|
|
290
|
+
border-radius: var(--dsw-radius-xs);
|
|
291
|
+
color: var(--dsw-alias-label-secondary);
|
|
292
|
+
background: transparent;
|
|
293
|
+
cursor: pointer;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
@media (hover: hover) {
|
|
297
|
+
.actionButton:hover {
|
|
298
|
+
color: var(--dsw-alias-label-primary);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.actionButton[aria-pressed='true'] {
|
|
303
|
+
color: var(--dsw-alias-state-business-primary);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.actionButton:focus-visible {
|
|
307
|
+
outline: 1px solid var(--dsw-focus-ring-color, var(--dsw-alias-state-business-primary));
|
|
308
|
+
outline-offset: -1px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.actionButton[data-state='failed'] {
|
|
312
|
+
color: var(--dsw-alias-state-error-primary);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.expander {
|
|
316
|
+
position: absolute;
|
|
317
|
+
z-index: 2;
|
|
318
|
+
top: 0;
|
|
319
|
+
left: 0;
|
|
320
|
+
display: inline-flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
justify-content: flex-start;
|
|
323
|
+
box-sizing: border-box;
|
|
324
|
+
width: 8px;
|
|
325
|
+
height: 16px;
|
|
326
|
+
margin: 0;
|
|
327
|
+
color: var(--json-tree-icon);
|
|
328
|
+
cursor: pointer;
|
|
329
|
+
user-select: none;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.expander::before {
|
|
333
|
+
width: 0;
|
|
334
|
+
height: 0;
|
|
335
|
+
border-top: 4px solid transparent;
|
|
336
|
+
border-bottom: 4px solid transparent;
|
|
337
|
+
border-left: 6px solid currentColor;
|
|
338
|
+
content: '';
|
|
339
|
+
transform: scale(0.75);
|
|
340
|
+
transform-origin: 33.333% center;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.collapseIcon::before {
|
|
344
|
+
transform: rotate(90deg) scale(0.75);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
@media (hover: hover) {
|
|
348
|
+
.expander:hover {
|
|
349
|
+
color: var(--dsw-alias-label-primary);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.expander:focus-visible {
|
|
354
|
+
outline: none;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.collapsedContent {
|
|
358
|
+
margin: 0 1px;
|
|
359
|
+
color: var(--json-tree-punctuation);
|
|
360
|
+
cursor: pointer;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
.collapsedContent::after {
|
|
364
|
+
content: '…';
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@media (hover: none) {
|
|
368
|
+
.copySlot { opacity: 1; pointer-events: auto; }
|
|
369
|
+
|
|
370
|
+
.row:has(> .copySlot) { padding-right: 24px; }
|
|
371
|
+
}
|