@deepseek-ai/dsh-client-ui-primitives 0.2.3-alpha.1 → 0.2.3-alpha.3
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 +14 -14
- package/README.md +20 -19
- package/README.zh.md +20 -19
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_AMS-Regular-34494743736f.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Caligraphic-Bold-5bfa49cac46c.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Caligraphic-Regular-9f8077e0b38a.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Fraktur-Bold-f98f89272eca.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Fraktur-Regular-a5764c6e2784.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-Bold-31050a1b1b12.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-BoldItalic-a4a4905b8b12.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-Italic-c9b2b5ffd2f2.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-Regular-c884086c25ce.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Math-BoldItalic-8fcb9d2de65a.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Math-Italic-db4883d0cff9.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_SansSerif-Bold-886e61797a52.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_SansSerif-Italic-3d5fa3cb309f.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_SansSerif-Regular-e45d5f4f4a7f.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Script-Regular-63b80959f1fc.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size1-Regular-57fa599974a1.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size2-Regular-ee18713634a3.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size3-Regular-19a7caadfb66.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size4-Regular-9bed17fb92f2.woff2 +0 -0
- package/lib/assets/vendor/katex/dist/fonts/KaTeX_Typewriter-Regular-7a08883fffc6.woff2 +0 -0
- package/lib/client.asciidoc.js +3 -0
- package/lib/client.asciidoc.js.map +1 -0
- package/lib/client.bat.js +3 -0
- package/lib/client.bat.js.map +1 -0
- package/lib/client.bibtex.js +3 -0
- package/lib/client.bibtex.js.map +1 -0
- package/lib/client.c.js +3 -0
- package/lib/client.c.js.map +1 -0
- package/lib/client.clojure.js +3 -0
- package/lib/client.clojure.js.map +1 -0
- package/lib/client.cmake.js +3 -0
- package/lib/client.cmake.js.map +1 -0
- package/lib/client.cpp.js +3 -0
- package/lib/client.cpp.js.map +1 -0
- package/lib/client.csharp.js +3 -0
- package/lib/client.csharp.js.map +1 -0
- package/lib/client.css.js +3 -0
- package/lib/client.css.js.map +1 -0
- package/lib/client.csv.js +3 -0
- package/lib/client.csv.js.map +1 -0
- package/lib/client.dart.js +3 -0
- package/lib/client.dart.js.map +1 -0
- package/lib/client.diff.js +3 -0
- package/lib/client.diff.js.map +1 -0
- package/lib/client.dotenv.js +3 -0
- package/lib/client.dotenv.js.map +1 -0
- package/lib/client.elixir.js +3 -0
- package/lib/client.elixir.js.map +1 -0
- package/lib/client.erlang.js +3 -0
- package/lib/client.erlang.js.map +1 -0
- package/lib/client.fish.js +3 -0
- package/lib/client.fish.js.map +1 -0
- package/lib/client.fsharp.js +3 -0
- package/lib/client.fsharp.js.map +1 -0
- package/lib/client.go.js +3 -0
- package/lib/client.go.js.map +1 -0
- package/lib/client.graphql.js +3 -0
- package/lib/client.graphql.js.map +1 -0
- package/lib/client.groovy.js +3 -0
- package/lib/client.groovy.js.map +1 -0
- package/lib/client.haskell.js +3 -0
- package/lib/client.haskell.js.map +1 -0
- package/lib/client.hcl.js +3 -0
- package/lib/client.hcl.js.map +1 -0
- package/lib/client.html-derivative.js +3 -0
- package/lib/client.html-derivative.js.map +1 -0
- package/lib/client.html.js +3 -0
- package/lib/client.html.js.map +1 -0
- package/lib/client.http.js +3 -0
- package/lib/client.http.js.map +1 -0
- package/lib/client.ini.js +3 -0
- package/lib/client.ini.js.map +1 -0
- package/lib/client.java.js +3 -0
- package/lib/client.java.js.map +1 -0
- package/lib/client.javascript.js +3 -0
- package/lib/client.javascript.js.map +1 -0
- package/lib/client.js +489 -0
- package/lib/client.js.map +1 -0
- package/lib/client.julia.js +3 -0
- package/lib/client.julia.js.map +1 -0
- package/lib/client.kotlin.js +3 -0
- package/lib/client.kotlin.js.map +1 -0
- package/lib/client.latex.js +3 -0
- package/lib/client.latex.js.map +1 -0
- package/lib/client.less.js +3 -0
- package/lib/client.less.js.map +1 -0
- package/lib/client.log.js +3 -0
- package/lib/client.log.js.map +1 -0
- package/lib/client.lua.js +3 -0
- package/lib/client.lua.js.map +1 -0
- package/lib/client.make.js +3 -0
- package/lib/client.make.js.map +1 -0
- package/lib/client.markdown.js +3 -0
- package/lib/client.markdown.js.map +1 -0
- package/lib/client.mdx.js +3 -0
- package/lib/client.mdx.js.map +1 -0
- package/lib/client.nix.js +3 -0
- package/lib/client.nix.js.map +1 -0
- package/lib/client.perl.js +3 -0
- package/lib/client.perl.js.map +1 -0
- package/lib/client.php.js +3 -0
- package/lib/client.php.js.map +1 -0
- package/lib/client.powershell.js +3 -0
- package/lib/client.powershell.js.map +1 -0
- package/lib/client.proto.js +3 -0
- package/lib/client.proto.js.map +1 -0
- package/lib/client.python.js +3 -0
- package/lib/client.python.js.map +1 -0
- package/lib/client.r.js +3 -0
- package/lib/client.r.js.map +1 -0
- package/lib/client.rst.js +3 -0
- package/lib/client.rst.js.map +1 -0
- package/lib/client.ruby.js +3 -0
- package/lib/client.ruby.js.map +1 -0
- package/lib/client.rust.js +3 -0
- package/lib/client.rust.js.map +1 -0
- package/lib/client.scala.js +3 -0
- package/lib/client.scala.js.map +1 -0
- package/lib/client.scss.js +3 -0
- package/lib/client.scss.js.map +1 -0
- package/lib/client.sql.js +3 -0
- package/lib/client.sql.js.map +1 -0
- package/lib/client.svelte.js +3 -0
- package/lib/client.svelte.js.map +1 -0
- package/lib/client.swift.js +3 -0
- package/lib/client.swift.js.map +1 -0
- package/lib/client.system-verilog.js +3 -0
- package/lib/client.system-verilog.js.map +1 -0
- package/lib/client.toml.js +3 -0
- package/lib/client.toml.js.map +1 -0
- package/lib/client.vb.js +3 -0
- package/lib/client.vb.js.map +1 -0
- package/lib/client.verilog.js +3 -0
- package/lib/client.verilog.js.map +1 -0
- package/lib/client.vue.js +3 -0
- package/lib/client.vue.js.map +1 -0
- package/lib/client.xml.js +3 -0
- package/lib/client.xml.js.map +1 -0
- package/lib/client.yaml.js +3 -0
- package/lib/client.yaml.js.map +1 -0
- package/lib/index.js +10 -14594
- package/lib/types/client/AnimatedRows.d.ts.map +1 -0
- package/lib/types/client/AnimatedRows.js.map +1 -0
- package/lib/types/client/BrandWordmark.d.ts.map +1 -0
- package/lib/types/client/BrandWordmark.js.map +1 -0
- package/lib/types/client/Button.d.ts.map +1 -0
- package/lib/types/client/Button.js.map +1 -0
- package/lib/types/client/Checkbox.d.ts.map +1 -0
- package/lib/types/client/Checkbox.js.map +1 -0
- package/lib/types/client/CodeFileIcon.d.ts.map +1 -0
- package/lib/types/client/CodeFileIcon.js.map +1 -0
- package/lib/types/client/CodeToolbar.d.ts.map +1 -0
- package/lib/types/client/CodeToolbar.js.map +1 -0
- package/lib/types/client/CommandText.d.ts.map +1 -0
- package/lib/types/client/CommandText.js.map +1 -0
- package/lib/types/client/ConfigField.d.ts.map +1 -0
- package/lib/types/client/ConfigField.js.map +1 -0
- package/lib/types/client/ConnectionIndicator.d.ts.map +1 -0
- package/lib/types/client/ConnectionIndicator.js.map +1 -0
- package/lib/types/client/DetailDocument.d.ts.map +1 -0
- package/lib/types/client/DetailDocument.js.map +1 -0
- package/lib/types/client/DiffBlock.d.ts.map +1 -0
- package/lib/types/client/DiffBlock.js.map +1 -0
- package/lib/types/client/DisclosureRow.d.ts.map +1 -0
- package/lib/types/client/DisclosureRow.js.map +1 -0
- package/lib/types/client/DraggableImage.d.ts.map +1 -0
- package/lib/types/client/DraggableImage.js.map +1 -0
- package/lib/types/client/FileTypeIcon.d.ts.map +1 -0
- package/lib/types/client/FileTypeIcon.js.map +1 -0
- package/lib/types/client/FishLogo.d.ts.map +1 -0
- package/lib/types/client/FishLogo.js.map +1 -0
- package/lib/types/client/FoldToggle.d.ts.map +1 -0
- package/lib/types/client/FoldToggle.js.map +1 -0
- package/lib/types/client/HoverCard.d.ts.map +1 -0
- package/lib/types/client/HoverCard.js.map +1 -0
- package/lib/types/client/HoverCardGroup.d.ts.map +1 -0
- package/lib/types/client/HoverCardGroup.js.map +1 -0
- package/lib/types/client/ImageLightbox.d.ts.map +1 -0
- package/lib/types/client/ImageLightbox.js.map +1 -0
- package/lib/types/client/ImagePreview.d.ts.map +1 -0
- package/lib/types/client/ImagePreview.js.map +1 -0
- package/lib/types/client/InlineEditor.d.ts.map +1 -0
- package/lib/types/client/InlineEditor.js.map +1 -0
- package/lib/types/client/Input.d.ts.map +1 -0
- package/lib/types/client/Input.js.map +1 -0
- package/lib/types/client/InspectButton.d.ts +18 -0
- package/lib/types/client/InspectButton.d.ts.map +1 -0
- package/lib/types/client/InspectButton.js.map +1 -0
- package/lib/types/client/JsonTree.d.ts.map +1 -0
- package/lib/types/client/JsonTree.js.map +1 -0
- package/lib/types/client/LinkIcon.d.ts.map +1 -0
- package/lib/types/client/LinkIcon.js.map +1 -0
- package/lib/types/client/Marquee.d.ts.map +1 -0
- package/lib/types/client/Marquee.js.map +1 -0
- package/lib/types/client/Menu.d.ts.map +1 -0
- package/lib/types/client/Menu.js.map +1 -0
- package/lib/types/client/MenuGroup.d.ts.map +1 -0
- package/lib/types/client/MenuGroup.js.map +1 -0
- package/lib/types/client/MenuRow.d.ts.map +1 -0
- package/lib/types/client/MenuRow.js.map +1 -0
- package/lib/types/client/MenuSurface.d.ts.map +1 -0
- package/lib/types/client/MenuSurface.js.map +1 -0
- package/lib/types/client/Modal.d.ts.map +1 -0
- package/lib/types/client/Modal.js.map +1 -0
- package/lib/types/client/PathLabel.d.ts.map +1 -0
- package/lib/types/client/PathLabel.js.map +1 -0
- package/lib/types/client/PermissionIcon.d.ts.map +1 -0
- package/lib/types/client/PermissionIcon.js.map +1 -0
- package/lib/types/client/Pill.d.ts.map +1 -0
- package/lib/types/client/Pill.js.map +1 -0
- package/lib/types/client/QuotePreview.d.ts +38 -0
- package/lib/types/client/QuotePreview.d.ts.map +1 -0
- package/lib/types/client/QuotePreview.js.map +1 -0
- package/lib/types/client/ReadBlock.d.ts.map +1 -0
- package/lib/types/client/ReadBlock.js.map +1 -0
- package/lib/types/client/ReferenceIcon.d.ts.map +1 -0
- package/lib/types/client/ReferenceIcon.js.map +1 -0
- package/lib/types/client/RiskConfirmation.d.ts.map +1 -0
- package/lib/types/client/RiskConfirmation.js.map +1 -0
- package/lib/types/client/SearchBlock.d.ts.map +1 -0
- package/lib/types/client/SearchBlock.js.map +1 -0
- package/lib/types/client/SearchField.d.ts.map +1 -0
- package/lib/types/client/SearchField.js.map +1 -0
- package/lib/types/client/SegmentedControl.d.ts.map +1 -0
- package/lib/types/client/SegmentedControl.js.map +1 -0
- package/lib/types/client/SegmentedTabs.d.ts.map +1 -0
- package/lib/types/client/SegmentedTabs.js.map +1 -0
- package/lib/types/client/ShortcutKeys.d.ts.map +1 -0
- package/lib/types/client/ShortcutKeys.js.map +1 -0
- package/lib/types/client/SiteGlyph.d.ts.map +1 -0
- package/lib/types/client/SiteGlyph.js.map +1 -0
- package/lib/types/client/StateDot.d.ts.map +1 -0
- package/lib/types/client/StateDot.js.map +1 -0
- package/lib/types/client/SubmenuPanel.d.ts.map +1 -0
- package/lib/types/client/SubmenuPanel.js.map +1 -0
- package/lib/types/client/Switch.d.ts.map +1 -0
- package/lib/types/client/Switch.js.map +1 -0
- package/lib/types/client/Tag.d.ts.map +1 -0
- package/lib/types/client/Tag.js.map +1 -0
- package/lib/types/client/TerminalBlock.d.ts.map +1 -0
- package/lib/types/client/TerminalBlock.js.map +1 -0
- package/lib/types/client/TextShimmer.d.ts.map +1 -0
- package/lib/types/client/TextShimmer.js.map +1 -0
- package/lib/types/client/Toast.d.ts.map +1 -0
- package/lib/types/client/Toast.js.map +1 -0
- package/lib/types/client/Tooltip.d.ts.map +1 -0
- package/lib/types/client/Tooltip.js.map +1 -0
- package/lib/types/client/UserMessageBubble.d.ts.map +1 -0
- package/lib/types/client/UserMessageBubble.js.map +1 -0
- package/lib/types/client/WebBlock.d.ts.map +1 -0
- package/lib/types/client/WebBlock.js.map +1 -0
- package/lib/types/client/ZoomControls.d.ts.map +1 -0
- package/lib/types/client/ZoomControls.js.map +1 -0
- package/lib/types/client/ansi.d.ts.map +1 -0
- package/lib/types/client/ansi.js.map +1 -0
- package/lib/types/client/clipboard.d.ts.map +1 -0
- package/lib/types/client/clipboard.js.map +1 -0
- package/lib/types/client/code-file-icon-artwork.d.ts.map +1 -0
- package/lib/types/client/code-file-icon-artwork.js.map +1 -0
- package/lib/types/client/code-file-types.d.ts.map +1 -0
- package/lib/types/client/code-file-types.js.map +1 -0
- package/lib/types/client/code-highlighting.d.ts.map +1 -0
- package/lib/types/client/code-highlighting.js.map +1 -0
- package/lib/types/client/darwin-desktop.d.ts.map +1 -0
- package/lib/types/client/darwin-desktop.js.map +1 -0
- package/lib/types/client/document-zoom.d.ts.map +1 -0
- package/lib/types/client/document-zoom.js.map +1 -0
- package/lib/types/client/file-drag-actions.d.ts.map +1 -0
- package/lib/types/client/file-drag-actions.js.map +1 -0
- package/lib/types/client/file-size.d.ts.map +1 -0
- package/lib/types/client/file-size.js.map +1 -0
- package/lib/types/client/focus.d.ts.map +1 -0
- package/lib/types/client/focus.js.map +1 -0
- package/lib/types/client/guide-artwork.d.ts.map +1 -0
- package/lib/types/client/guide-artwork.js.map +1 -0
- package/lib/types/client/head-tail-cap.d.ts.map +1 -0
- package/lib/types/client/head-tail-cap.js.map +1 -0
- package/lib/types/client/icons/artwork.d.ts +475 -0
- package/lib/types/client/icons/artwork.d.ts.map +1 -0
- package/lib/types/client/icons/artwork.js.map +1 -0
- package/lib/types/client/icons/index.d.ts +450 -0
- package/lib/types/client/icons/index.d.ts.map +1 -0
- package/lib/types/client/icons/index.js.map +1 -0
- package/lib/types/client/icons/props.d.ts.map +1 -0
- package/lib/types/client/icons/props.js.map +1 -0
- package/lib/types/client/icons/shared-artwork.d.ts.map +1 -0
- package/lib/types/client/icons/shared-artwork.js.map +1 -0
- package/lib/types/client/image-drag.d.ts.map +1 -0
- package/lib/types/client/image-drag.js.map +1 -0
- package/lib/types/client/index.d.ts +128 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/index.js.map +1 -0
- package/lib/types/client/input-modality.d.ts.map +1 -0
- package/lib/types/client/input-modality.js.map +1 -0
- package/lib/types/client/keyboard-composition.d.ts.map +1 -0
- package/lib/types/client/keyboard-composition.js.map +1 -0
- package/lib/types/client/markdown/CodeBlock.d.ts.map +1 -0
- package/lib/types/client/markdown/CodeBlock.js.map +1 -0
- package/lib/types/client/markdown/FenceBlocks.d.ts.map +1 -0
- package/lib/types/client/markdown/FenceBlocks.js.map +1 -0
- package/lib/types/client/markdown/JsonBlock.d.ts.map +1 -0
- package/lib/types/client/markdown/JsonBlock.js.map +1 -0
- package/lib/types/client/markdown/MarkdownDelegate.d.ts.map +1 -0
- package/lib/types/client/markdown/MarkdownDelegate.js.map +1 -0
- package/lib/types/client/markdown/MarkdownText.d.ts.map +1 -0
- package/lib/types/client/markdown/MarkdownText.js.map +1 -0
- package/lib/types/client/markdown/cjkFriendlyStrong.d.ts.map +1 -0
- package/lib/types/client/markdown/cjkFriendlyStrong.js.map +1 -0
- package/lib/types/client/markdown/copy-tex.d.ts.map +1 -0
- package/lib/types/client/markdown/copy-tex.js.map +1 -0
- package/lib/types/client/markdown/diff-fence.d.ts.map +1 -0
- package/lib/types/client/markdown/diff-fence.js.map +1 -0
- package/lib/types/client/markdown/file-link.d.ts.map +1 -0
- package/lib/types/client/markdown/file-link.js.map +1 -0
- package/lib/types/client/markdown/highlight.d.ts.map +1 -0
- package/lib/types/client/markdown/highlight.js.map +1 -0
- package/lib/types/client/markdown/incremental.d.ts.map +1 -0
- package/lib/types/client/markdown/incremental.js.map +1 -0
- package/lib/types/client/markdown/katex.d.ts.map +1 -0
- package/lib/types/client/markdown/katex.js.map +1 -0
- package/lib/types/client/markdown/local-image-syntax.d.ts.map +1 -0
- package/lib/types/client/markdown/local-image-syntax.js.map +1 -0
- package/lib/types/client/markdown/mathCompatibility.d.ts.map +1 -0
- package/lib/types/client/markdown/mathCompatibility.js.map +1 -0
- package/lib/types/client/markdown/parse.d.ts.map +1 -0
- package/lib/types/client/markdown/parse.js.map +1 -0
- package/lib/types/client/markdown/plain-text.d.ts.map +1 -0
- package/lib/types/client/markdown/plain-text.js.map +1 -0
- package/lib/types/client/markdown/quote-text.d.ts.map +1 -0
- package/lib/types/client/markdown/quote-text.js.map +1 -0
- package/lib/types/client/markdown/render.d.ts.map +1 -0
- package/lib/types/client/markdown/render.js.map +1 -0
- package/lib/types/client/markdown/useViewportHighlighting.d.ts +11 -0
- package/lib/types/client/markdown/useViewportHighlighting.d.ts.map +1 -0
- package/lib/types/client/markdown/useViewportHighlighting.js.map +1 -0
- package/lib/types/client/markdown/windows-path-destinations.d.ts.map +1 -0
- package/lib/types/client/markdown/windows-path-destinations.js.map +1 -0
- package/lib/types/client/menu-submenu-position.d.ts.map +1 -0
- package/lib/types/client/menu-submenu-position.js.map +1 -0
- package/lib/types/client/overlay-top-margin.d.ts.map +1 -0
- package/lib/types/client/overlay-top-margin.js.map +1 -0
- package/lib/types/client/plugin-artwork.d.ts.map +1 -0
- package/lib/types/client/plugin-artwork.js.map +1 -0
- package/lib/types/client/pointer-grace.d.ts.map +1 -0
- package/lib/types/client/pointer-grace.js.map +1 -0
- package/lib/types/client/relative-time.d.ts.map +1 -0
- package/lib/types/client/relative-time.js.map +1 -0
- package/lib/types/client/settings-form/SettingsForm.d.ts.map +1 -0
- package/lib/types/client/settings-form/SettingsForm.js.map +1 -0
- package/lib/types/client/settings-form/fields.d.ts.map +1 -0
- package/lib/types/client/settings-form/fields.js.map +1 -0
- package/lib/types/client/settings-form/form-model.d.ts.map +1 -0
- package/lib/types/client/settings-form/form-model.js.map +1 -0
- package/lib/types/client/tooltip-placement.d.ts.map +1 -0
- package/lib/types/client/tooltip-placement.js.map +1 -0
- package/lib/types/client/use-clipboard-copy.d.ts.map +1 -0
- package/lib/types/client/use-clipboard-copy.js.map +1 -0
- package/lib/types/client/useAnchoredMaxHeight.d.ts +14 -0
- package/lib/types/client/useAnchoredMaxHeight.d.ts.map +1 -0
- package/lib/types/client/useAnchoredMaxHeight.js.map +1 -0
- package/lib/types/client/useDismissOnOutsidePointer.d.ts.map +1 -0
- package/lib/types/client/useDismissOnOutsidePointer.js.map +1 -0
- package/lib/types/client/useMenuSubmenu.d.ts +44 -0
- package/lib/types/client/useMenuSubmenu.d.ts.map +1 -0
- package/lib/types/client/useMenuSubmenu.js.map +1 -0
- package/lib/types/client/useModalLayer.d.ts.map +1 -0
- package/lib/types/client/useModalLayer.js.map +1 -0
- package/lib/types/client/useRowDragPreview.d.ts.map +1 -0
- package/lib/types/client/useRowDragPreview.js.map +1 -0
- package/lib/types/client/user-text.d.ts.map +1 -0
- package/lib/types/client/user-text.js.map +1 -0
- package/locale/de.json +6 -0
- package/locale/en.json +5 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +28 -12
- package/src/client/CodeFileIcon.tsx +28 -0
- package/src/client/HoverCard.tsx +360 -0
- package/src/client/InspectButton.module.css +47 -0
- package/src/client/InspectButton.tsx +29 -0
- package/src/client/JsonTree.tsx +850 -0
- package/src/client/Menu.module.css +491 -0
- package/src/client/Menu.tsx +656 -0
- package/src/client/MenuSurface.tsx +54 -0
- package/src/client/QuotePreview.tsx +116 -0
- package/src/client/RiskConfirmation.module.css +54 -0
- package/src/client/TextShimmer.tsx +64 -0
- package/src/client/Tooltip.tsx +282 -0
- package/src/client/icons/artwork.ts +169 -0
- package/src/client/icons/index.tsx +694 -0
- package/src/client/image-drag.ts +84 -0
- package/src/client/index.ts +148 -0
- package/src/client/markdown/MarkdownText.module.css +612 -0
- package/src/client/markdown/useViewportHighlighting.ts +72 -0
- package/src/client/plugin-artwork.tsx +110 -0
- package/src/client/useAnchoredMaxHeight.ts +45 -0
- package/src/client/useMenuSubmenu.ts +185 -0
- package/src/index.js +12 -0
- package/lib/index.js.map +0 -1
- package/lib/types/AnimatedRows.d.ts.map +0 -1
- package/lib/types/AnimatedRows.js.map +0 -1
- package/lib/types/BrandWordmark.d.ts.map +0 -1
- package/lib/types/BrandWordmark.js.map +0 -1
- package/lib/types/Button.d.ts.map +0 -1
- package/lib/types/Button.js.map +0 -1
- package/lib/types/Checkbox.d.ts.map +0 -1
- package/lib/types/Checkbox.js.map +0 -1
- package/lib/types/CodeFileIcon.d.ts.map +0 -1
- package/lib/types/CodeFileIcon.js.map +0 -1
- package/lib/types/CodeToolbar.d.ts.map +0 -1
- package/lib/types/CodeToolbar.js.map +0 -1
- package/lib/types/CommandText.d.ts.map +0 -1
- package/lib/types/CommandText.js.map +0 -1
- package/lib/types/ConfigField.d.ts.map +0 -1
- package/lib/types/ConfigField.js.map +0 -1
- package/lib/types/ConnectionIndicator.d.ts.map +0 -1
- package/lib/types/ConnectionIndicator.js.map +0 -1
- package/lib/types/DetailDocument.d.ts.map +0 -1
- package/lib/types/DetailDocument.js.map +0 -1
- package/lib/types/DiffBlock.d.ts.map +0 -1
- package/lib/types/DiffBlock.js.map +0 -1
- package/lib/types/DisclosureRow.d.ts.map +0 -1
- package/lib/types/DisclosureRow.js.map +0 -1
- package/lib/types/DraggableImage.d.ts.map +0 -1
- package/lib/types/DraggableImage.js.map +0 -1
- package/lib/types/FileTypeIcon.d.ts.map +0 -1
- package/lib/types/FileTypeIcon.js.map +0 -1
- package/lib/types/FishLogo.d.ts.map +0 -1
- package/lib/types/FishLogo.js.map +0 -1
- package/lib/types/FoldToggle.d.ts.map +0 -1
- package/lib/types/FoldToggle.js.map +0 -1
- package/lib/types/HoverCard.d.ts.map +0 -1
- package/lib/types/HoverCard.js.map +0 -1
- package/lib/types/HoverCardGroup.d.ts.map +0 -1
- package/lib/types/HoverCardGroup.js.map +0 -1
- package/lib/types/ImageLightbox.d.ts.map +0 -1
- package/lib/types/ImageLightbox.js.map +0 -1
- package/lib/types/ImagePreview.d.ts.map +0 -1
- package/lib/types/ImagePreview.js.map +0 -1
- package/lib/types/InlineEditor.d.ts.map +0 -1
- package/lib/types/InlineEditor.js.map +0 -1
- package/lib/types/Input.d.ts.map +0 -1
- package/lib/types/Input.js.map +0 -1
- package/lib/types/JsonTree.d.ts.map +0 -1
- package/lib/types/JsonTree.js.map +0 -1
- package/lib/types/LinkIcon.d.ts.map +0 -1
- package/lib/types/LinkIcon.js.map +0 -1
- package/lib/types/Marquee.d.ts.map +0 -1
- package/lib/types/Marquee.js.map +0 -1
- package/lib/types/Menu.d.ts.map +0 -1
- package/lib/types/Menu.js.map +0 -1
- package/lib/types/MenuGroup.d.ts.map +0 -1
- package/lib/types/MenuGroup.js.map +0 -1
- package/lib/types/MenuRow.d.ts.map +0 -1
- package/lib/types/MenuRow.js.map +0 -1
- package/lib/types/MenuSurface.d.ts.map +0 -1
- package/lib/types/MenuSurface.js.map +0 -1
- package/lib/types/Modal.d.ts.map +0 -1
- package/lib/types/Modal.js.map +0 -1
- package/lib/types/PathLabel.d.ts.map +0 -1
- package/lib/types/PathLabel.js.map +0 -1
- package/lib/types/PermissionIcon.d.ts.map +0 -1
- package/lib/types/PermissionIcon.js.map +0 -1
- package/lib/types/Pill.d.ts.map +0 -1
- package/lib/types/Pill.js.map +0 -1
- package/lib/types/QuotePreview.d.ts +0 -37
- package/lib/types/QuotePreview.d.ts.map +0 -1
- package/lib/types/QuotePreview.js.map +0 -1
- package/lib/types/ReadBlock.d.ts.map +0 -1
- package/lib/types/ReadBlock.js.map +0 -1
- package/lib/types/ReferenceIcon.d.ts.map +0 -1
- package/lib/types/ReferenceIcon.js.map +0 -1
- package/lib/types/RiskConfirmation.d.ts.map +0 -1
- package/lib/types/RiskConfirmation.js.map +0 -1
- package/lib/types/SearchBlock.d.ts.map +0 -1
- package/lib/types/SearchBlock.js.map +0 -1
- package/lib/types/SearchField.d.ts.map +0 -1
- package/lib/types/SearchField.js.map +0 -1
- package/lib/types/SegmentedControl.d.ts.map +0 -1
- package/lib/types/SegmentedControl.js.map +0 -1
- package/lib/types/SegmentedTabs.d.ts.map +0 -1
- package/lib/types/SegmentedTabs.js.map +0 -1
- package/lib/types/ShortcutKeys.d.ts.map +0 -1
- package/lib/types/ShortcutKeys.js.map +0 -1
- package/lib/types/SiteGlyph.d.ts.map +0 -1
- package/lib/types/SiteGlyph.js.map +0 -1
- package/lib/types/StateDot.d.ts.map +0 -1
- package/lib/types/StateDot.js.map +0 -1
- package/lib/types/SubmenuPanel.d.ts.map +0 -1
- package/lib/types/SubmenuPanel.js.map +0 -1
- package/lib/types/Switch.d.ts.map +0 -1
- package/lib/types/Switch.js.map +0 -1
- package/lib/types/Tag.d.ts.map +0 -1
- package/lib/types/Tag.js.map +0 -1
- package/lib/types/TerminalBlock.d.ts.map +0 -1
- package/lib/types/TerminalBlock.js.map +0 -1
- package/lib/types/TextShimmer.d.ts.map +0 -1
- package/lib/types/TextShimmer.js.map +0 -1
- package/lib/types/Toast.d.ts.map +0 -1
- package/lib/types/Toast.js.map +0 -1
- package/lib/types/Tooltip.d.ts.map +0 -1
- package/lib/types/Tooltip.js.map +0 -1
- package/lib/types/UserMessageBubble.d.ts.map +0 -1
- package/lib/types/UserMessageBubble.js.map +0 -1
- package/lib/types/WebBlock.d.ts.map +0 -1
- package/lib/types/WebBlock.js.map +0 -1
- package/lib/types/ZoomControls.d.ts.map +0 -1
- package/lib/types/ZoomControls.js.map +0 -1
- package/lib/types/ansi.d.ts.map +0 -1
- package/lib/types/ansi.js.map +0 -1
- package/lib/types/clipboard.d.ts.map +0 -1
- package/lib/types/clipboard.js.map +0 -1
- package/lib/types/code-file-icon-artwork.d.ts.map +0 -1
- package/lib/types/code-file-icon-artwork.js.map +0 -1
- package/lib/types/code-file-types.d.ts.map +0 -1
- package/lib/types/code-file-types.js.map +0 -1
- package/lib/types/code-highlighting.d.ts.map +0 -1
- package/lib/types/code-highlighting.js.map +0 -1
- package/lib/types/darwin-desktop.d.ts.map +0 -1
- package/lib/types/darwin-desktop.js.map +0 -1
- package/lib/types/document-zoom.d.ts.map +0 -1
- package/lib/types/document-zoom.js.map +0 -1
- package/lib/types/file-drag-actions.d.ts.map +0 -1
- package/lib/types/file-drag-actions.js.map +0 -1
- package/lib/types/file-size.d.ts.map +0 -1
- package/lib/types/file-size.js.map +0 -1
- package/lib/types/focus.d.ts.map +0 -1
- package/lib/types/focus.js.map +0 -1
- package/lib/types/guide-artwork.d.ts.map +0 -1
- package/lib/types/guide-artwork.js.map +0 -1
- package/lib/types/head-tail-cap.d.ts.map +0 -1
- package/lib/types/head-tail-cap.js.map +0 -1
- package/lib/types/icons/artwork.d.ts +0 -454
- package/lib/types/icons/artwork.d.ts.map +0 -1
- package/lib/types/icons/artwork.js.map +0 -1
- package/lib/types/icons/index.d.ts +0 -430
- package/lib/types/icons/index.d.ts.map +0 -1
- package/lib/types/icons/index.js.map +0 -1
- package/lib/types/icons/props.d.ts.map +0 -1
- package/lib/types/icons/props.js.map +0 -1
- package/lib/types/icons/shared-artwork.d.ts.map +0 -1
- package/lib/types/icons/shared-artwork.js.map +0 -1
- package/lib/types/image-drag.d.ts.map +0 -1
- package/lib/types/image-drag.js.map +0 -1
- package/lib/types/index.d.ts +0 -124
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/input-modality.d.ts.map +0 -1
- package/lib/types/input-modality.js.map +0 -1
- package/lib/types/keyboard-composition.d.ts.map +0 -1
- package/lib/types/keyboard-composition.js.map +0 -1
- package/lib/types/markdown/CodeBlock.d.ts.map +0 -1
- package/lib/types/markdown/CodeBlock.js.map +0 -1
- package/lib/types/markdown/FenceBlocks.d.ts.map +0 -1
- package/lib/types/markdown/FenceBlocks.js.map +0 -1
- package/lib/types/markdown/JsonBlock.d.ts.map +0 -1
- package/lib/types/markdown/JsonBlock.js.map +0 -1
- package/lib/types/markdown/MarkdownDelegate.d.ts.map +0 -1
- package/lib/types/markdown/MarkdownDelegate.js.map +0 -1
- package/lib/types/markdown/MarkdownText.d.ts.map +0 -1
- package/lib/types/markdown/MarkdownText.js.map +0 -1
- package/lib/types/markdown/cjkFriendlyStrong.d.ts.map +0 -1
- package/lib/types/markdown/cjkFriendlyStrong.js.map +0 -1
- package/lib/types/markdown/copy-tex.d.ts.map +0 -1
- package/lib/types/markdown/copy-tex.js.map +0 -1
- package/lib/types/markdown/diff-fence.d.ts.map +0 -1
- package/lib/types/markdown/diff-fence.js.map +0 -1
- package/lib/types/markdown/file-link.d.ts.map +0 -1
- package/lib/types/markdown/file-link.js.map +0 -1
- package/lib/types/markdown/highlight.d.ts.map +0 -1
- package/lib/types/markdown/highlight.js.map +0 -1
- package/lib/types/markdown/incremental.d.ts.map +0 -1
- package/lib/types/markdown/incremental.js.map +0 -1
- package/lib/types/markdown/katex.d.ts.map +0 -1
- package/lib/types/markdown/katex.js.map +0 -1
- package/lib/types/markdown/local-image-syntax.d.ts.map +0 -1
- package/lib/types/markdown/local-image-syntax.js.map +0 -1
- package/lib/types/markdown/mathCompatibility.d.ts.map +0 -1
- package/lib/types/markdown/mathCompatibility.js.map +0 -1
- package/lib/types/markdown/parse.d.ts.map +0 -1
- package/lib/types/markdown/parse.js.map +0 -1
- package/lib/types/markdown/plain-text.d.ts.map +0 -1
- package/lib/types/markdown/plain-text.js.map +0 -1
- package/lib/types/markdown/quote-text.d.ts.map +0 -1
- package/lib/types/markdown/quote-text.js.map +0 -1
- package/lib/types/markdown/render.d.ts.map +0 -1
- package/lib/types/markdown/render.js.map +0 -1
- package/lib/types/markdown/useViewportHighlighting.d.ts +0 -11
- package/lib/types/markdown/useViewportHighlighting.d.ts.map +0 -1
- package/lib/types/markdown/useViewportHighlighting.js.map +0 -1
- package/lib/types/markdown/windows-path-destinations.d.ts.map +0 -1
- package/lib/types/markdown/windows-path-destinations.js.map +0 -1
- package/lib/types/menu-submenu-position.d.ts.map +0 -1
- package/lib/types/menu-submenu-position.js.map +0 -1
- package/lib/types/overlay-top-margin.d.ts.map +0 -1
- package/lib/types/overlay-top-margin.js.map +0 -1
- package/lib/types/plugin-artwork.d.ts.map +0 -1
- package/lib/types/plugin-artwork.js.map +0 -1
- package/lib/types/pointer-grace.d.ts.map +0 -1
- package/lib/types/pointer-grace.js.map +0 -1
- package/lib/types/relative-time.d.ts.map +0 -1
- package/lib/types/relative-time.js.map +0 -1
- package/lib/types/settings-form/SettingsForm.d.ts.map +0 -1
- package/lib/types/settings-form/SettingsForm.js.map +0 -1
- package/lib/types/settings-form/fields.d.ts.map +0 -1
- package/lib/types/settings-form/fields.js.map +0 -1
- package/lib/types/settings-form/form-model.d.ts.map +0 -1
- package/lib/types/settings-form/form-model.js.map +0 -1
- package/lib/types/tooltip-placement.d.ts.map +0 -1
- package/lib/types/tooltip-placement.js.map +0 -1
- package/lib/types/use-clipboard-copy.d.ts.map +0 -1
- package/lib/types/use-clipboard-copy.js.map +0 -1
- package/lib/types/useAnchoredMaxHeight.d.ts +0 -14
- package/lib/types/useAnchoredMaxHeight.d.ts.map +0 -1
- package/lib/types/useAnchoredMaxHeight.js.map +0 -1
- package/lib/types/useDismissOnOutsidePointer.d.ts.map +0 -1
- package/lib/types/useDismissOnOutsidePointer.js.map +0 -1
- package/lib/types/useMenuSubmenu.d.ts +0 -44
- package/lib/types/useMenuSubmenu.d.ts.map +0 -1
- package/lib/types/useMenuSubmenu.js.map +0 -1
- package/lib/types/useModalLayer.d.ts.map +0 -1
- package/lib/types/useModalLayer.js.map +0 -1
- package/lib/types/useRowDragPreview.d.ts.map +0 -1
- package/lib/types/useRowDragPreview.js.map +0 -1
- package/lib/types/user-text.d.ts.map +0 -1
- package/lib/types/user-text.js.map +0 -1
- package/src/CodeFileIcon.tsx +0 -28
- package/src/HoverCard.tsx +0 -360
- package/src/JsonTree.tsx +0 -850
- package/src/Menu.module.css +0 -473
- package/src/Menu.tsx +0 -656
- package/src/MenuSurface.tsx +0 -54
- package/src/QuotePreview.tsx +0 -133
- package/src/RiskConfirmation.module.css +0 -52
- package/src/TextShimmer.tsx +0 -58
- package/src/Tooltip.tsx +0 -273
- package/src/icons/artwork.ts +0 -161
- package/src/icons/index.tsx +0 -664
- package/src/image-drag.ts +0 -84
- package/src/index.ts +0 -143
- package/src/markdown/MarkdownText.module.css +0 -522
- package/src/markdown/useViewportHighlighting.ts +0 -72
- package/src/plugin-artwork.tsx +0 -110
- package/src/useAnchoredMaxHeight.ts +0 -45
- package/src/useMenuSubmenu.ts +0 -185
- /package/lib/types/{AnimatedRows.d.ts → client/AnimatedRows.d.ts} +0 -0
- /package/lib/types/{BrandWordmark.d.ts → client/BrandWordmark.d.ts} +0 -0
- /package/lib/types/{Button.d.ts → client/Button.d.ts} +0 -0
- /package/lib/types/{Checkbox.d.ts → client/Checkbox.d.ts} +0 -0
- /package/lib/types/{CodeFileIcon.d.ts → client/CodeFileIcon.d.ts} +0 -0
- /package/lib/types/{CodeToolbar.d.ts → client/CodeToolbar.d.ts} +0 -0
- /package/lib/types/{CommandText.d.ts → client/CommandText.d.ts} +0 -0
- /package/lib/types/{ConfigField.d.ts → client/ConfigField.d.ts} +0 -0
- /package/lib/types/{ConnectionIndicator.d.ts → client/ConnectionIndicator.d.ts} +0 -0
- /package/lib/types/{DetailDocument.d.ts → client/DetailDocument.d.ts} +0 -0
- /package/lib/types/{DiffBlock.d.ts → client/DiffBlock.d.ts} +0 -0
- /package/lib/types/{DisclosureRow.d.ts → client/DisclosureRow.d.ts} +0 -0
- /package/lib/types/{DraggableImage.d.ts → client/DraggableImage.d.ts} +0 -0
- /package/lib/types/{FileTypeIcon.d.ts → client/FileTypeIcon.d.ts} +0 -0
- /package/lib/types/{FishLogo.d.ts → client/FishLogo.d.ts} +0 -0
- /package/lib/types/{FoldToggle.d.ts → client/FoldToggle.d.ts} +0 -0
- /package/lib/types/{HoverCard.d.ts → client/HoverCard.d.ts} +0 -0
- /package/lib/types/{HoverCardGroup.d.ts → client/HoverCardGroup.d.ts} +0 -0
- /package/lib/types/{ImageLightbox.d.ts → client/ImageLightbox.d.ts} +0 -0
- /package/lib/types/{ImagePreview.d.ts → client/ImagePreview.d.ts} +0 -0
- /package/lib/types/{InlineEditor.d.ts → client/InlineEditor.d.ts} +0 -0
- /package/lib/types/{Input.d.ts → client/Input.d.ts} +0 -0
- /package/lib/types/{JsonTree.d.ts → client/JsonTree.d.ts} +0 -0
- /package/lib/types/{LinkIcon.d.ts → client/LinkIcon.d.ts} +0 -0
- /package/lib/types/{Marquee.d.ts → client/Marquee.d.ts} +0 -0
- /package/lib/types/{Menu.d.ts → client/Menu.d.ts} +0 -0
- /package/lib/types/{MenuGroup.d.ts → client/MenuGroup.d.ts} +0 -0
- /package/lib/types/{MenuRow.d.ts → client/MenuRow.d.ts} +0 -0
- /package/lib/types/{MenuSurface.d.ts → client/MenuSurface.d.ts} +0 -0
- /package/lib/types/{Modal.d.ts → client/Modal.d.ts} +0 -0
- /package/lib/types/{PathLabel.d.ts → client/PathLabel.d.ts} +0 -0
- /package/lib/types/{PermissionIcon.d.ts → client/PermissionIcon.d.ts} +0 -0
- /package/lib/types/{Pill.d.ts → client/Pill.d.ts} +0 -0
- /package/lib/types/{ReadBlock.d.ts → client/ReadBlock.d.ts} +0 -0
- /package/lib/types/{ReferenceIcon.d.ts → client/ReferenceIcon.d.ts} +0 -0
- /package/lib/types/{RiskConfirmation.d.ts → client/RiskConfirmation.d.ts} +0 -0
- /package/lib/types/{SearchBlock.d.ts → client/SearchBlock.d.ts} +0 -0
- /package/lib/types/{SearchField.d.ts → client/SearchField.d.ts} +0 -0
- /package/lib/types/{SegmentedControl.d.ts → client/SegmentedControl.d.ts} +0 -0
- /package/lib/types/{SegmentedTabs.d.ts → client/SegmentedTabs.d.ts} +0 -0
- /package/lib/types/{ShortcutKeys.d.ts → client/ShortcutKeys.d.ts} +0 -0
- /package/lib/types/{SiteGlyph.d.ts → client/SiteGlyph.d.ts} +0 -0
- /package/lib/types/{StateDot.d.ts → client/StateDot.d.ts} +0 -0
- /package/lib/types/{SubmenuPanel.d.ts → client/SubmenuPanel.d.ts} +0 -0
- /package/lib/types/{Switch.d.ts → client/Switch.d.ts} +0 -0
- /package/lib/types/{Tag.d.ts → client/Tag.d.ts} +0 -0
- /package/lib/types/{TerminalBlock.d.ts → client/TerminalBlock.d.ts} +0 -0
- /package/lib/types/{TextShimmer.d.ts → client/TextShimmer.d.ts} +0 -0
- /package/lib/types/{Toast.d.ts → client/Toast.d.ts} +0 -0
- /package/lib/types/{Tooltip.d.ts → client/Tooltip.d.ts} +0 -0
- /package/lib/types/{UserMessageBubble.d.ts → client/UserMessageBubble.d.ts} +0 -0
- /package/lib/types/{WebBlock.d.ts → client/WebBlock.d.ts} +0 -0
- /package/lib/types/{ZoomControls.d.ts → client/ZoomControls.d.ts} +0 -0
- /package/lib/types/{ansi.d.ts → client/ansi.d.ts} +0 -0
- /package/lib/types/{clipboard.d.ts → client/clipboard.d.ts} +0 -0
- /package/lib/types/{code-file-icon-artwork.d.ts → client/code-file-icon-artwork.d.ts} +0 -0
- /package/lib/types/{code-file-types.d.ts → client/code-file-types.d.ts} +0 -0
- /package/lib/types/{code-highlighting.d.ts → client/code-highlighting.d.ts} +0 -0
- /package/lib/types/{darwin-desktop.d.ts → client/darwin-desktop.d.ts} +0 -0
- /package/lib/types/{document-zoom.d.ts → client/document-zoom.d.ts} +0 -0
- /package/lib/types/{file-drag-actions.d.ts → client/file-drag-actions.d.ts} +0 -0
- /package/lib/types/{file-size.d.ts → client/file-size.d.ts} +0 -0
- /package/lib/types/{focus.d.ts → client/focus.d.ts} +0 -0
- /package/lib/types/{guide-artwork.d.ts → client/guide-artwork.d.ts} +0 -0
- /package/lib/types/{head-tail-cap.d.ts → client/head-tail-cap.d.ts} +0 -0
- /package/lib/types/{icons → client/icons}/props.d.ts +0 -0
- /package/lib/types/{icons → client/icons}/shared-artwork.d.ts +0 -0
- /package/lib/types/{image-drag.d.ts → client/image-drag.d.ts} +0 -0
- /package/lib/types/{input-modality.d.ts → client/input-modality.d.ts} +0 -0
- /package/lib/types/{keyboard-composition.d.ts → client/keyboard-composition.d.ts} +0 -0
- /package/lib/types/{markdown → client/markdown}/CodeBlock.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/FenceBlocks.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/JsonBlock.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/MarkdownDelegate.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/MarkdownText.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/cjkFriendlyStrong.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/copy-tex.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/diff-fence.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/file-link.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/highlight.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/incremental.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/katex.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/local-image-syntax.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/mathCompatibility.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/parse.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/plain-text.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/quote-text.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/render.d.ts +0 -0
- /package/lib/types/{markdown → client/markdown}/windows-path-destinations.d.ts +0 -0
- /package/lib/types/{menu-submenu-position.d.ts → client/menu-submenu-position.d.ts} +0 -0
- /package/lib/types/{overlay-top-margin.d.ts → client/overlay-top-margin.d.ts} +0 -0
- /package/lib/types/{plugin-artwork.d.ts → client/plugin-artwork.d.ts} +0 -0
- /package/lib/types/{pointer-grace.d.ts → client/pointer-grace.d.ts} +0 -0
- /package/lib/types/{relative-time.d.ts → client/relative-time.d.ts} +0 -0
- /package/lib/types/{settings-form → client/settings-form}/SettingsForm.d.ts +0 -0
- /package/lib/types/{settings-form → client/settings-form}/fields.d.ts +0 -0
- /package/lib/types/{settings-form → client/settings-form}/form-model.d.ts +0 -0
- /package/lib/types/{tooltip-placement.d.ts → client/tooltip-placement.d.ts} +0 -0
- /package/lib/types/{use-clipboard-copy.d.ts → client/use-clipboard-copy.d.ts} +0 -0
- /package/lib/types/{useDismissOnOutsidePointer.d.ts → client/useDismissOnOutsidePointer.d.ts} +0 -0
- /package/lib/types/{useModalLayer.d.ts → client/useModalLayer.d.ts} +0 -0
- /package/lib/types/{useRowDragPreview.d.ts → client/useRowDragPreview.d.ts} +0 -0
- /package/lib/types/{user-text.d.ts → client/user-text.d.ts} +0 -0
- /package/src/{AnimatedRows.module.css → client/AnimatedRows.module.css} +0 -0
- /package/src/{AnimatedRows.tsx → client/AnimatedRows.tsx} +0 -0
- /package/src/{BrandWordmark.tsx → client/BrandWordmark.tsx} +0 -0
- /package/src/{Button.module.css → client/Button.module.css} +0 -0
- /package/src/{Button.tsx → client/Button.tsx} +0 -0
- /package/src/{Checkbox.module.css → client/Checkbox.module.css} +0 -0
- /package/src/{Checkbox.tsx → client/Checkbox.tsx} +0 -0
- /package/src/{CodeCard.module.css → client/CodeCard.module.css} +0 -0
- /package/src/{CodeToolbar.tsx → client/CodeToolbar.tsx} +0 -0
- /package/src/{CommandText.module.css → client/CommandText.module.css} +0 -0
- /package/src/{CommandText.tsx → client/CommandText.tsx} +0 -0
- /package/src/{ConfigField.module.css → client/ConfigField.module.css} +0 -0
- /package/src/{ConfigField.tsx → client/ConfigField.tsx} +0 -0
- /package/src/{ConnectionIndicator.module.css → client/ConnectionIndicator.module.css} +0 -0
- /package/src/{ConnectionIndicator.tsx → client/ConnectionIndicator.tsx} +0 -0
- /package/src/{DetailDocument.module.css → client/DetailDocument.module.css} +0 -0
- /package/src/{DetailDocument.tsx → client/DetailDocument.tsx} +0 -0
- /package/src/{DiffBlock.module.css → client/DiffBlock.module.css} +0 -0
- /package/src/{DiffBlock.tsx → client/DiffBlock.tsx} +0 -0
- /package/src/{DisclosureRow.module.css → client/DisclosureRow.module.css} +0 -0
- /package/src/{DisclosureRow.tsx → client/DisclosureRow.tsx} +0 -0
- /package/src/{DraggableImage.tsx → client/DraggableImage.tsx} +0 -0
- /package/src/{FileTypeIcon.module.css → client/FileTypeIcon.module.css} +0 -0
- /package/src/{FileTypeIcon.tsx → client/FileTypeIcon.tsx} +0 -0
- /package/src/{FishLogo.tsx → client/FishLogo.tsx} +0 -0
- /package/src/{FoldToggle.tsx → client/FoldToggle.tsx} +0 -0
- /package/src/{HoverCard.module.css → client/HoverCard.module.css} +0 -0
- /package/src/{HoverCardGroup.tsx → client/HoverCardGroup.tsx} +0 -0
- /package/src/{ImageLightbox.module.css → client/ImageLightbox.module.css} +0 -0
- /package/src/{ImageLightbox.tsx → client/ImageLightbox.tsx} +0 -0
- /package/src/{ImagePreview.module.css → client/ImagePreview.module.css} +0 -0
- /package/src/{ImagePreview.tsx → client/ImagePreview.tsx} +0 -0
- /package/src/{InlineEditor.module.css → client/InlineEditor.module.css} +0 -0
- /package/src/{InlineEditor.tsx → client/InlineEditor.tsx} +0 -0
- /package/src/{Input.module.css → client/Input.module.css} +0 -0
- /package/src/{Input.tsx → client/Input.tsx} +0 -0
- /package/src/{JsonTree.module.css → client/JsonTree.module.css} +0 -0
- /package/src/{LinkIcon.tsx → client/LinkIcon.tsx} +0 -0
- /package/src/{Marquee.module.css → client/Marquee.module.css} +0 -0
- /package/src/{Marquee.tsx → client/Marquee.tsx} +0 -0
- /package/src/{MenuGroup.module.css → client/MenuGroup.module.css} +0 -0
- /package/src/{MenuGroup.tsx → client/MenuGroup.tsx} +0 -0
- /package/src/{MenuRow.tsx → client/MenuRow.tsx} +0 -0
- /package/src/{MenuSurface.module.css → client/MenuSurface.module.css} +0 -0
- /package/src/{Modal.module.css → client/Modal.module.css} +0 -0
- /package/src/{Modal.tsx → client/Modal.tsx} +0 -0
- /package/src/{PathLabel.module.css → client/PathLabel.module.css} +0 -0
- /package/src/{PathLabel.tsx → client/PathLabel.tsx} +0 -0
- /package/src/{PermissionIcon.tsx → client/PermissionIcon.tsx} +0 -0
- /package/src/{Pill.module.css → client/Pill.module.css} +0 -0
- /package/src/{Pill.tsx → client/Pill.tsx} +0 -0
- /package/src/{QuotePreview.module.css → client/QuotePreview.module.css} +0 -0
- /package/src/{ReadBlock.module.css → client/ReadBlock.module.css} +0 -0
- /package/src/{ReadBlock.tsx → client/ReadBlock.tsx} +0 -0
- /package/src/{ReferenceIcon.tsx → client/ReferenceIcon.tsx} +0 -0
- /package/src/{RiskConfirmation.tsx → client/RiskConfirmation.tsx} +0 -0
- /package/src/{RowDragPreview.module.css → client/RowDragPreview.module.css} +0 -0
- /package/src/{SearchBlock.module.css → client/SearchBlock.module.css} +0 -0
- /package/src/{SearchBlock.tsx → client/SearchBlock.tsx} +0 -0
- /package/src/{SearchField.module.css → client/SearchField.module.css} +0 -0
- /package/src/{SearchField.tsx → client/SearchField.tsx} +0 -0
- /package/src/{SegmentedControl.module.css → client/SegmentedControl.module.css} +0 -0
- /package/src/{SegmentedControl.tsx → client/SegmentedControl.tsx} +0 -0
- /package/src/{SegmentedTabs.module.css → client/SegmentedTabs.module.css} +0 -0
- /package/src/{SegmentedTabs.tsx → client/SegmentedTabs.tsx} +0 -0
- /package/src/{ShortcutKeys.module.css → client/ShortcutKeys.module.css} +0 -0
- /package/src/{ShortcutKeys.tsx → client/ShortcutKeys.tsx} +0 -0
- /package/src/{SiteGlyph.tsx → client/SiteGlyph.tsx} +0 -0
- /package/src/{StateDot.module.css → client/StateDot.module.css} +0 -0
- /package/src/{StateDot.tsx → client/StateDot.tsx} +0 -0
- /package/src/{SubmenuPanel.tsx → client/SubmenuPanel.tsx} +0 -0
- /package/src/{Switch.module.css → client/Switch.module.css} +0 -0
- /package/src/{Switch.tsx → client/Switch.tsx} +0 -0
- /package/src/{Tag.module.css → client/Tag.module.css} +0 -0
- /package/src/{Tag.tsx → client/Tag.tsx} +0 -0
- /package/src/{TerminalBlock.module.css → client/TerminalBlock.module.css} +0 -0
- /package/src/{TerminalBlock.tsx → client/TerminalBlock.tsx} +0 -0
- /package/src/{TextShimmer.module.css → client/TextShimmer.module.css} +0 -0
- /package/src/{Toast.module.css → client/Toast.module.css} +0 -0
- /package/src/{Toast.tsx → client/Toast.tsx} +0 -0
- /package/src/{Tooltip.module.css → client/Tooltip.module.css} +0 -0
- /package/src/{UserMessageBubble.module.css → client/UserMessageBubble.module.css} +0 -0
- /package/src/{UserMessageBubble.tsx → client/UserMessageBubble.tsx} +0 -0
- /package/src/{WebBlock.module.css → client/WebBlock.module.css} +0 -0
- /package/src/{WebBlock.tsx → client/WebBlock.tsx} +0 -0
- /package/src/{ZoomControls.module.css → client/ZoomControls.module.css} +0 -0
- /package/src/{ZoomControls.tsx → client/ZoomControls.tsx} +0 -0
- /package/src/{ansi.ts → client/ansi.ts} +0 -0
- /package/src/{clipboard.ts → client/clipboard.ts} +0 -0
- /package/src/{code-file-icon-artwork.manifest.json → client/code-file-icon-artwork.manifest.json} +0 -0
- /package/src/{code-file-icon-artwork.ts → client/code-file-icon-artwork.ts} +0 -0
- /package/src/{code-file-types.ts → client/code-file-types.ts} +0 -0
- /package/src/{code-highlighting.ts → client/code-highlighting.ts} +0 -0
- /package/src/{css-modules.d.ts → client/css-modules.d.ts} +0 -0
- /package/src/{darwin-desktop.ts → client/darwin-desktop.ts} +0 -0
- /package/src/{document-zoom.ts → client/document-zoom.ts} +0 -0
- /package/src/{file-drag-actions.ts → client/file-drag-actions.ts} +0 -0
- /package/src/{file-size.ts → client/file-size.ts} +0 -0
- /package/src/{focus.ts → client/focus.ts} +0 -0
- /package/src/{guide-artwork.tsx → client/guide-artwork.tsx} +0 -0
- /package/src/{head-tail-cap.ts → client/head-tail-cap.ts} +0 -0
- /package/src/{icons → client/icons}/props.ts +0 -0
- /package/src/{icons → client/icons}/shared-artwork.tsx +0 -0
- /package/src/{input-modality.ts → client/input-modality.ts} +0 -0
- /package/src/{keyboard-composition.ts → client/keyboard-composition.ts} +0 -0
- /package/src/{markdown → client/markdown}/CodeBlock.module.css +0 -0
- /package/src/{markdown → client/markdown}/CodeBlock.tsx +0 -0
- /package/src/{markdown → client/markdown}/FenceBlocks.tsx +0 -0
- /package/src/{markdown → client/markdown}/JsonBlock.module.css +0 -0
- /package/src/{markdown → client/markdown}/JsonBlock.tsx +0 -0
- /package/src/{markdown → client/markdown}/MarkdownDelegate.tsx +0 -0
- /package/src/{markdown → client/markdown}/MarkdownText.tsx +0 -0
- /package/src/{markdown → client/markdown}/cjkFriendlyStrong.ts +0 -0
- /package/src/{markdown → client/markdown}/copy-tex.ts +0 -0
- /package/src/{markdown → client/markdown}/diff-fence.ts +0 -0
- /package/src/{markdown → client/markdown}/file-link.ts +0 -0
- /package/src/{markdown → client/markdown}/highlight.ts +0 -0
- /package/src/{markdown → client/markdown}/incremental.ts +0 -0
- /package/src/{markdown → client/markdown}/katex.tsx +0 -0
- /package/src/{markdown → client/markdown}/local-image-syntax.ts +0 -0
- /package/src/{markdown → client/markdown}/mathCompatibility.ts +0 -0
- /package/src/{markdown → client/markdown}/parse.ts +0 -0
- /package/src/{markdown → client/markdown}/plain-text.ts +0 -0
- /package/src/{markdown → client/markdown}/quote-text.ts +0 -0
- /package/src/{markdown → client/markdown}/render.tsx +0 -0
- /package/src/{markdown → client/markdown}/windows-path-destinations.ts +0 -0
- /package/src/{menu-submenu-position.ts → client/menu-submenu-position.ts} +0 -0
- /package/src/{overlay-top-margin.ts → client/overlay-top-margin.ts} +0 -0
- /package/src/{pointer-grace.ts → client/pointer-grace.ts} +0 -0
- /package/src/{relative-time.ts → client/relative-time.ts} +0 -0
- /package/src/{settings-form → client/settings-form}/SettingsForm.module.css +0 -0
- /package/src/{settings-form → client/settings-form}/SettingsForm.tsx +0 -0
- /package/src/{settings-form → client/settings-form}/fields.module.css +0 -0
- /package/src/{settings-form → client/settings-form}/fields.tsx +0 -0
- /package/src/{settings-form → client/settings-form}/form-model.ts +0 -0
- /package/src/{tooltip-placement.ts → client/tooltip-placement.ts} +0 -0
- /package/src/{use-clipboard-copy.ts → client/use-clipboard-copy.ts} +0 -0
- /package/src/{useDismissOnOutsidePointer.ts → client/useDismissOnOutsidePointer.ts} +0 -0
- /package/src/{useModalLayer.ts → client/useModalLayer.ts} +0 -0
- /package/src/{useRowDragPreview.ts → client/useRowDragPreview.ts} +0 -0
- /package/src/{user-text.module.css → client/user-text.module.css} +0 -0
- /package/src/{user-text.tsx → client/user-text.tsx} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Shared menu material and the macOS backing that lets Chromium blur transparent windows. */
|
|
2
|
+
import { forwardRef, useId, useLayoutEffect, useRef, type ComponentPropsWithoutRef, type CSSProperties } from 'react'
|
|
3
|
+
import { createPortal } from 'react-dom'
|
|
4
|
+
import clsx from 'clsx'
|
|
5
|
+
import css from './MenuSurface.module.css'
|
|
6
|
+
|
|
7
|
+
/** Context-menu transition durations in milliseconds, shared with its lifecycle owner. */
|
|
8
|
+
export const MENU_TRANSITION_MS = Object.freeze({ enter: 40, dismiss: 80, replace: 10, prepare: 20 })
|
|
9
|
+
|
|
10
|
+
/** Menu containers preserve native div props and refs. */
|
|
11
|
+
export interface MenuSurfaceProps extends ComponentPropsWithoutRef<'div'> {
|
|
12
|
+
/** Match the shared compact menu's smaller outer radius. */
|
|
13
|
+
compact?: boolean
|
|
14
|
+
/** Fade direct content, material, and native backing without isolating the material's backdrop. */
|
|
15
|
+
phase?: 'enter' | 'dismiss' | 'replace' | undefined
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Paint a menu and, on macOS, an opaque backing behind the page content within its bounds.
|
|
20
|
+
* CSS anchors keep each backing aligned during placement, resizing, and nested-menu movement.
|
|
21
|
+
* @param props - Div content and placement, and compact geometry.
|
|
22
|
+
* @param ref - The visible menu div, excluding the non-interactive backing.
|
|
23
|
+
* @returns Menu content plus a backing portal removed with the menu.
|
|
24
|
+
*/
|
|
25
|
+
export const MenuSurface = forwardRef<HTMLDivElement, MenuSurfaceProps>(function MenuSurface({
|
|
26
|
+
compact = false, phase, className, style, children, ...props
|
|
27
|
+
}, ref) {
|
|
28
|
+
const id = useId()
|
|
29
|
+
const backingRef = useRef<HTMLDivElement>(null)
|
|
30
|
+
useLayoutEffect(() => {
|
|
31
|
+
// Nested React portals can insert the backing before its anchor. CSS anchor
|
|
32
|
+
// positioning requires the anchor to precede the positioned element.
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- The portal ref is attached before layout effects run.
|
|
34
|
+
document.body.appendChild(backingRef.current!)
|
|
35
|
+
}, [])
|
|
36
|
+
const anchorStyle: CSSProperties & Record<`--dsh-menu-${string}`, string> = {
|
|
37
|
+
'--dsh-menu-anchor': `--dsh-menu-${id.replace(/[^\w-]/g, '')}`,
|
|
38
|
+
'--dsh-menu-enter': `${MENU_TRANSITION_MS.enter}ms`,
|
|
39
|
+
'--dsh-menu-dismiss': `${MENU_TRANSITION_MS.dismiss}ms`,
|
|
40
|
+
'--dsh-menu-replace': `${MENU_TRANSITION_MS.replace}ms`,
|
|
41
|
+
}
|
|
42
|
+
return <>
|
|
43
|
+
<div {...props} ref={ref} data-menu-material="translucent" data-menu-phase={phase}
|
|
44
|
+
className={clsx(css.surface, compact && css.compact, className)} style={{ ...style, ...anchorStyle }}>
|
|
45
|
+
<div aria-hidden="true" className={css.material} />
|
|
46
|
+
{children}
|
|
47
|
+
</div>
|
|
48
|
+
{createPortal(
|
|
49
|
+
<div ref={backingRef} aria-hidden="true" data-menu-backing="" data-menu-phase={phase} className={clsx(css.backing, compact && css.compact)}
|
|
50
|
+
style={{ ...anchorStyle, visibility: style?.visibility }} />,
|
|
51
|
+
document.body,
|
|
52
|
+
)}
|
|
53
|
+
</>
|
|
54
|
+
})
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** Shared compact presentation for draft and sent text quotes. */
|
|
2
|
+
|
|
3
|
+
import type { JSX, MouseEvent as ReactMouseEvent } from 'react'
|
|
4
|
+
import { IconCloseOutlineRegular } from './icons/index.tsx'
|
|
5
|
+
import { HoverCard } from './HoverCard.tsx'
|
|
6
|
+
import css from './QuotePreview.module.css'
|
|
7
|
+
|
|
8
|
+
function QuoteMarkIcon({ className }: { readonly className?: string | undefined }) {
|
|
9
|
+
return (
|
|
10
|
+
<svg width={16} height={16} className={className} viewBox="0 0 16 16" fill="none" aria-hidden>
|
|
11
|
+
<g transform="translate(6.8 2.4)">
|
|
12
|
+
<path d="M2.8125 0.583008L3.2002 1.16602C2.43912 1.6713 1.88491 2.41238 1.60547 3.25684H2.98926V6.70605H0V4.52148C1.96593e-05 2.70313 0.9109 1.00575 2.42578 0L2.8125 0.583008Z" fill="currentColor" />
|
|
13
|
+
<path d="M7.50781 0.583008L7.89551 1.16602C7.13443 1.6713 6.58022 2.41238 6.30078 3.25684H7.68457V6.70605H4.69531V4.52148C4.69533 2.70313 5.60621 1.00575 7.12109 0L7.50781 0.583008Z" fill="currentColor" />
|
|
14
|
+
</g>
|
|
15
|
+
</svg>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Optional whole-quote removal control supplied by an editable owner. */
|
|
20
|
+
export interface QuotePreviewRemoval {
|
|
21
|
+
/** Localized accessible name for the removal button. */
|
|
22
|
+
readonly label: string
|
|
23
|
+
/** Remove the complete owning quote node. */
|
|
24
|
+
readonly onRemove: () => void
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Owner-supplied readable form of a quote whose exact text is long structured content. */
|
|
28
|
+
export interface QuoteSummary {
|
|
29
|
+
/** Short inline label shown before `body` in place of the exact text; assistive technology reads `title` and `detail` instead. */
|
|
30
|
+
readonly label: string
|
|
31
|
+
/** First popover line, such as a file path; also the label's accessible text. */
|
|
32
|
+
readonly title: string
|
|
33
|
+
/** Secondary popover line, such as a line range. */
|
|
34
|
+
readonly detail?: string | undefined
|
|
35
|
+
/** Main text, such as a user's comment, shown inline after `label` and in full in the popover. */
|
|
36
|
+
readonly body: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Presentation inputs for one compact quote excerpt. */
|
|
40
|
+
export interface QuotePreviewProps {
|
|
41
|
+
/** Exact selected text rendered inline on one ellipsized line and in full in the popover, unless `summary` replaces it. */
|
|
42
|
+
readonly text: string
|
|
43
|
+
/** Readable replacement for `text`: its label and body render inline and the popover shows its fields. */
|
|
44
|
+
readonly summary?: QuoteSummary | undefined
|
|
45
|
+
/** Composer-only removal action; omit for inert sent quotes. */
|
|
46
|
+
readonly removal?: QuotePreviewRemoval | undefined
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Render one width-capped quote preview shared by editable drafts and sent messages.
|
|
51
|
+
* CSS ellipsizes the single inline line; hovering opens a content-sized, scrollable popover that fits within the viewport.
|
|
52
|
+
* The popover opens whether or not the line is clipped, so mounting a quote reads no layout.
|
|
53
|
+
* @param props - selected text, optional summary, and optional localized removal action.
|
|
54
|
+
* @returns a non-navigating quote preview with a full-text or summary popover.
|
|
55
|
+
*/
|
|
56
|
+
export function QuotePreview({ text, summary, removal }: QuotePreviewProps): JSX.Element {
|
|
57
|
+
const remove = (event: ReactMouseEvent<HTMLButtonElement>): void => {
|
|
58
|
+
event.preventDefault()
|
|
59
|
+
event.stopPropagation()
|
|
60
|
+
removal?.onRemove()
|
|
61
|
+
}
|
|
62
|
+
const preview = (
|
|
63
|
+
<span
|
|
64
|
+
className={css.quote}
|
|
65
|
+
data-quote-preview=""
|
|
66
|
+
data-removable={removal === undefined ? undefined : ''}
|
|
67
|
+
>
|
|
68
|
+
{removal === undefined
|
|
69
|
+
? (
|
|
70
|
+
<span className={css.marker} aria-hidden>
|
|
71
|
+
<QuoteMarkIcon className={css.quoteMark} />
|
|
72
|
+
</span>
|
|
73
|
+
)
|
|
74
|
+
: (
|
|
75
|
+
<button
|
|
76
|
+
type="button"
|
|
77
|
+
className={css.remove}
|
|
78
|
+
aria-label={removal.label}
|
|
79
|
+
onPointerDown={(event) => { event.preventDefault(); event.stopPropagation() }}
|
|
80
|
+
onKeyDown={(event) => { event.stopPropagation() }}
|
|
81
|
+
onClick={remove}
|
|
82
|
+
>
|
|
83
|
+
<QuoteMarkIcon className={css.quoteMark} />
|
|
84
|
+
<IconCloseOutlineRegular size={12} className={css.closeMark} />
|
|
85
|
+
</button>
|
|
86
|
+
)}
|
|
87
|
+
<span className={css.source} data-quote-preview-text="">
|
|
88
|
+
{summary === undefined ? text : (
|
|
89
|
+
<>
|
|
90
|
+
<span aria-hidden="true">{summary.label}</span>
|
|
91
|
+
<span className={css.visuallyHidden}>{summary.detail === undefined ? summary.title : `${summary.title} ${summary.detail}`}</span>
|
|
92
|
+
{' '}<span className={css.inlineBody}>{summary.body}</span>
|
|
93
|
+
</>
|
|
94
|
+
)}
|
|
95
|
+
</span>
|
|
96
|
+
</span>
|
|
97
|
+
)
|
|
98
|
+
return (
|
|
99
|
+
<HoverCard
|
|
100
|
+
inline
|
|
101
|
+
grouped
|
|
102
|
+
fitContent
|
|
103
|
+
openDelayMs={0}
|
|
104
|
+
anchor={preview}
|
|
105
|
+
content={summary === undefined
|
|
106
|
+
? <span className={css.popoverText} data-quote-popover="" aria-hidden="true">{text}</span>
|
|
107
|
+
: (
|
|
108
|
+
<span className={css.summary} data-quote-popover="" aria-hidden="true">
|
|
109
|
+
<span className={css.summaryTitle}>{summary.title}</span>
|
|
110
|
+
{summary.detail !== undefined && <span className={css.summaryDetail}>{summary.detail}</span>}
|
|
111
|
+
<span className={css.summaryBody}>{summary.body}</span>
|
|
112
|
+
</span>
|
|
113
|
+
)}
|
|
114
|
+
/>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.confirmation {
|
|
2
|
+
width: min(440px, 100%);
|
|
3
|
+
max-height: 100%;
|
|
4
|
+
overflow: hidden;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.confirmationContent {
|
|
8
|
+
min-height: 0;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overscroll-behavior: contain;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@supports (height: 100dvh) {
|
|
14
|
+
.confirmation {
|
|
15
|
+
max-height: calc(100dvh - 48px);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.description {
|
|
20
|
+
margin: 0;
|
|
21
|
+
color: var(--dsw-alias-label-secondary);
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
line-height: 22px;
|
|
24
|
+
/* A description may quote a path or command, which has no break opportunity. */
|
|
25
|
+
overflow-wrap: anywhere;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.confirmation .acknowledgement {
|
|
29
|
+
align-items: flex-start;
|
|
30
|
+
gap: 6px;
|
|
31
|
+
margin-top: 16px;
|
|
32
|
+
color: var(--dsw-alias-label-secondary);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
line-height: 20px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.confirmation .acknowledgement > :first-child {
|
|
39
|
+
margin-top: 3px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.confirmation .acknowledgement input {
|
|
43
|
+
width: 14px;
|
|
44
|
+
height: 14px;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.modalAction {
|
|
49
|
+
min-width: 72px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.confirmAction {
|
|
53
|
+
min-width: 136px;
|
|
54
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Text activity animation shared by a row and its nested text fragments. */
|
|
2
|
+
import { createContext, memo, useContext, type ReactNode } from 'react'
|
|
3
|
+
import clsx from 'clsx'
|
|
4
|
+
import css from './TextShimmer.module.css'
|
|
5
|
+
|
|
6
|
+
const DecorativeCopy = createContext<boolean | undefined>(undefined)
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Inert attribute for the decorative copy. React 18 forwards `inert` only as a string, and React 19
|
|
10
|
+
* treats an empty string as false; a non-empty string sets the attribute under both. Typed `object`
|
|
11
|
+
* because React 18's DOM types omit `inert` and React 19's declare it boolean.
|
|
12
|
+
*/
|
|
13
|
+
const INERT: object = { inert: 'inert' }
|
|
14
|
+
|
|
15
|
+
/** Text and activity supplied by the owning row. */
|
|
16
|
+
export interface TextShimmerProps {
|
|
17
|
+
/** Text or presentational children with text in nested TextShimmer instances. No effects or element ids. */
|
|
18
|
+
children: ReactNode
|
|
19
|
+
/** Whether to animate; nested instances share the containing row's activity. */
|
|
20
|
+
active?: boolean | undefined
|
|
21
|
+
className?: string | undefined
|
|
22
|
+
/** Layout class applied equally to the base and decorative content. */
|
|
23
|
+
contentClassName?: string | undefined
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function TextContent({ children, className }: Pick<TextShimmerProps, 'children' | 'className'>) {
|
|
27
|
+
const decorative = useContext(DecorativeCopy)
|
|
28
|
+
const generated = decorative === true && typeof children === 'string'
|
|
29
|
+
return (
|
|
30
|
+
<span className={clsx(css.text, className)} data-shimmer-text={generated ? children : undefined}>
|
|
31
|
+
{generated ? null : children}
|
|
32
|
+
</span>
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Render text with one shared highlight while retaining selectable, accessible content.
|
|
38
|
+
* Nested instances inherit the outer animation. Keep icons outside; mark decorative
|
|
39
|
+
* separators with data-shimmer-decoration so their background follows the highlight.
|
|
40
|
+
* Active children also render in an inert, clipped decoration; supply only presentation.
|
|
41
|
+
* @param props - localized text, running state, and owner styling.
|
|
42
|
+
* @returns retained text and its optional decorative highlight.
|
|
43
|
+
*/
|
|
44
|
+
export const TextShimmer = memo(function TextShimmer({ children, active = false, className, contentClassName }: TextShimmerProps) {
|
|
45
|
+
const decorative = useContext(DecorativeCopy)
|
|
46
|
+
if (decorative !== undefined) return <TextContent className={className}>{children}</TextContent>
|
|
47
|
+
const content = typeof children === 'string' ? <TextContent>{children}</TextContent> : children
|
|
48
|
+
return (
|
|
49
|
+
<span className={clsx(css.root, className)} data-shimmer={active || undefined}>
|
|
50
|
+
<DecorativeCopy.Provider value={false}>
|
|
51
|
+
<span className={clsx(css.content, contentClassName)}>{content}</span>
|
|
52
|
+
</DecorativeCopy.Provider>
|
|
53
|
+
{active && (
|
|
54
|
+
<span className={css.decoration} aria-hidden="true" {...INERT}>
|
|
55
|
+
<span className={css.sweep}>
|
|
56
|
+
<DecorativeCopy.Provider value>
|
|
57
|
+
<span className={clsx(css.content, css.highlight, contentClassName)}>{content}</span>
|
|
58
|
+
</DecorativeCopy.Provider>
|
|
59
|
+
</span>
|
|
60
|
+
</span>
|
|
61
|
+
)}
|
|
62
|
+
</span>
|
|
63
|
+
)
|
|
64
|
+
})
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/** Anchor-preserving tooltips; an optional body portal escapes clipping containers and stacking contexts that cap the bubble's z-index. */
|
|
2
|
+
|
|
3
|
+
import { cloneElement, createContext, useCallback, useContext, useEffect, useId, useRef, useState, version } from 'react'
|
|
4
|
+
import type { FocusEventHandler, MouseEventHandler, PointerEventHandler, ReactElement, Ref } from 'react'
|
|
5
|
+
import { createPortal } from 'react-dom'
|
|
6
|
+
import { ShortcutKeys } from './ShortcutKeys.tsx'
|
|
7
|
+
import { placeTooltip, type TooltipSide } from './tooltip-placement.ts'
|
|
8
|
+
import { useDismissOnOutsidePointer } from './useDismissOnOutsidePointer.ts'
|
|
9
|
+
import css from './Tooltip.module.css'
|
|
10
|
+
// Tooltips take the wide answer — any key returns to the keyboard. Focus rings read the
|
|
11
|
+
// narrower `data-input-modality` attribute the same module publishes.
|
|
12
|
+
import { pointerModality } from './input-modality.ts'
|
|
13
|
+
|
|
14
|
+
export type { TooltipSide } from './tooltip-placement.ts'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Suppression channel for nested tooltips: a visible descendant tooltip
|
|
18
|
+
* withdraws the enclosing tooltip while its bubble is shown.
|
|
19
|
+
*/
|
|
20
|
+
export const TooltipSuppression = createContext<((suppressed: boolean) => void) | null>(null)
|
|
21
|
+
|
|
22
|
+
/** Props Tooltip injects into its anchor child; the child's own handlers are chained ahead of the tooltip's. */
|
|
23
|
+
interface AnchorProps {
|
|
24
|
+
'aria-describedby'?: string | undefined
|
|
25
|
+
ref?: Ref<HTMLElement> | undefined
|
|
26
|
+
onPointerEnter?: PointerEventHandler | undefined
|
|
27
|
+
onPointerLeave?: PointerEventHandler | undefined
|
|
28
|
+
onPointerDown?: PointerEventHandler | undefined
|
|
29
|
+
onClick?: MouseEventHandler | undefined
|
|
30
|
+
onFocus?: FocusEventHandler | undefined
|
|
31
|
+
onBlur?: FocusEventHandler | undefined
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
type TooltipLabel = string | (() => string)
|
|
35
|
+
|
|
36
|
+
/** React 19 keeps an element's ref in props and warns when code reads `element.ref`, where React 18 keeps it. */
|
|
37
|
+
const REF_IN_PROPS = Number.parseInt(version, 10) >= 19
|
|
38
|
+
|
|
39
|
+
/** Read the ref the anchor element was created with. */
|
|
40
|
+
function anchorRef(anchor: ReactElement<AnchorProps>): Ref<HTMLElement> | undefined {
|
|
41
|
+
/* v8 ignore next -- React 18 arm; the unit suite runs against the single installed React major. */
|
|
42
|
+
if (!REF_IN_PROPS) return (anchor as ReactElement<AnchorProps> & { ref?: Ref<HTMLElement> }).ref
|
|
43
|
+
return anchor.props.ref
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function clipped(anchor: HTMLElement): boolean {
|
|
47
|
+
return [anchor, ...anchor.querySelectorAll<HTMLElement>('*')]
|
|
48
|
+
.some(el => el instanceof HTMLElement && el.scrollWidth > el.clientWidth)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Attach a hover/focus tooltip to an anchor element.
|
|
53
|
+
* @param props.label - bubble text, or a resolver evaluated only while visible; an empty string shows only shortcut keys.
|
|
54
|
+
* @param props.shortcutKeys - effective key labels rendered as platform-formatted keycaps after optional text.
|
|
55
|
+
* @param props.side - preferred placement (default 'right'); fitting tries the opposite then perpendicular sides.
|
|
56
|
+
* @param props.align - horizontal anchor-edge alignment for 'bottom'/'top' bubbles: 'end' pins
|
|
57
|
+
* the bubble's right edge to the anchor's (for anchors beside other hover surfaces the centered
|
|
58
|
+
* bubble would overlap); default 'center'. Horizontal placements ignore it.
|
|
59
|
+
* @param props.portal - render the bubble under document.body, so an ancestor's clipping or its
|
|
60
|
+
* stacking context (which confines the bubble's z-index to that context) cannot hide it.
|
|
61
|
+
* @param props.delayMs - hover delay in milliseconds (default 0).
|
|
62
|
+
* @param props.focusDelayMs - keyboard focus delay in milliseconds (default 0); blur, click,
|
|
63
|
+
* mouse leave, disabling, and unmount cancel a pending show.
|
|
64
|
+
* @param props.gap - anchor-to-bubble distance in pixels for 'bottom'/'top' bubbles (default 8);
|
|
65
|
+
* horizontal placements use 10px, including after a flip.
|
|
66
|
+
* @param props.disabled - suppress the bubble while true; the anchor renders identically so
|
|
67
|
+
* toggling never remounts it (which would cut its CSS transitions).
|
|
68
|
+
* @param props.maxWidth - bubble width cap in pixels, for labels long enough that the default
|
|
69
|
+
* half-viewport cap would render a slab wider than the surface the anchor sits on; always bounded by viewport margins.
|
|
70
|
+
* @param props.openOnClick - clicking or tapping also pins the bubble for reading; another click, Escape,
|
|
71
|
+
* Tab, or an outside pointerdown dismisses it. Defaults to false for ordinary action tooltips.
|
|
72
|
+
* @param props.onlyWhenClipped - show the bubble only when the anchor or an HTML element inside it
|
|
73
|
+
* overflows horizontally, measured when the bubble is about to show; for labels that repeat
|
|
74
|
+
* text an ellipsis may cut off. Defaults to false.
|
|
75
|
+
* @param props.children - a single anchor element; its own ref (callback or object) is forwarded alongside the tooltip's.
|
|
76
|
+
* @returns the cloned anchor plus a fixed-position bubble, optionally portaled to the body.
|
|
77
|
+
* The bubble stays hidden until ResizeObserver supplies its size for viewport fitting; clicking the
|
|
78
|
+
* anchor dismisses the bubble unless openOnClick is enabled, and focus arriving after a pointer
|
|
79
|
+
* interaction (a closing menu refocusing its trigger) never raises it. Touch cannot trigger hover
|
|
80
|
+
* tooltips; tapping still invokes the child's action and can open an openOnClick explanation.
|
|
81
|
+
* When no side fits, the viewport-bounded fallback may overlap the anchor; oversized content is scrollable when pinned.
|
|
82
|
+
*/
|
|
83
|
+
export function Tooltip({ label, shortcutKeys, side = 'right', align = 'center', delayMs = 0, focusDelayMs = 0, gap = 8, disabled = false, portal = false, maxWidth, openOnClick = false, onlyWhenClipped = false, children }: { label: TooltipLabel; shortcutKeys?: readonly string[] | undefined; side?: TooltipSide; align?: 'center' | 'end'; delayMs?: number; focusDelayMs?: number; gap?: number; disabled?: boolean; portal?: boolean; maxWidth?: number; openOnClick?: boolean; onlyWhenClipped?: boolean; children: ReactElement<AnchorProps> }) {
|
|
84
|
+
const id = useId()
|
|
85
|
+
const [pinned, setPinned] = useState(false)
|
|
86
|
+
const anchor = useRef<HTMLElement | null>(null)
|
|
87
|
+
// Forward the anchor's own ref so wrapping it in Tooltip never silently severs the owner's ref.
|
|
88
|
+
const childRef = anchorRef(children)
|
|
89
|
+
const mergedRef = useCallback((el: HTMLElement | null) => {
|
|
90
|
+
anchor.current = el
|
|
91
|
+
if (typeof childRef === 'function') childRef(el)
|
|
92
|
+
else if (childRef != null) childRef.current = el
|
|
93
|
+
}, [childRef])
|
|
94
|
+
const [pos, setPos] = useState<DOMRect | null>(null)
|
|
95
|
+
const bubble = useRef<HTMLSpanElement | null>(null)
|
|
96
|
+
const resolvedLabel = pos === null
|
|
97
|
+
? null
|
|
98
|
+
: typeof label === 'function' ? label() : label
|
|
99
|
+
const showTimer = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
100
|
+
// Hover and focus are independent triggers: the bubble hides only after
|
|
101
|
+
// BOTH clear (hovering away from a focused anchor must not drop it).
|
|
102
|
+
const triggers = useRef({ hover: false, focus: false })
|
|
103
|
+
|
|
104
|
+
// A nested tooltip's bubble owns the pointer position, so this tooltip
|
|
105
|
+
// withdraws its own while a descendant shows one; the state below is set by
|
|
106
|
+
// the descendants this tooltip wraps. Announcing on every visibility change
|
|
107
|
+
// covers hide, disable, and unmount; show() also announces synchronously so
|
|
108
|
+
// a nested pair shown in one commit never paints both bubbles.
|
|
109
|
+
const suppressAncestors = useContext(TooltipSuppression)
|
|
110
|
+
const [suppressed, setSuppressed] = useState(false)
|
|
111
|
+
const announce = useCallback((active: boolean) => { suppressAncestors?.(active) }, [suppressAncestors])
|
|
112
|
+
const visible = pos !== null && !disabled
|
|
113
|
+
// ResizeObserver supplies the laid-out border box; fitting never reads
|
|
114
|
+
// geometry after a position write or needs a React commit to flip sides.
|
|
115
|
+
useEffect(() => {
|
|
116
|
+
const el = bubble.current
|
|
117
|
+
if (pos === null || !visible || suppressed || el === null) return
|
|
118
|
+
let size: ResizeObserverSize | undefined
|
|
119
|
+
let anchorRect = pos
|
|
120
|
+
const fit = () => {
|
|
121
|
+
if (size === undefined) return
|
|
122
|
+
const placement = placeTooltip({
|
|
123
|
+
anchor: anchorRect, width: size.inlineSize, height: size.blockSize,
|
|
124
|
+
viewportWidth: window.innerWidth, viewportHeight: window.innerHeight, side, align, gap,
|
|
125
|
+
})
|
|
126
|
+
const horizontal = placement.side === 'right' || placement.side === 'left'
|
|
127
|
+
const offsetX = horizontal ? 0 : align === 'end' ? placement.width : placement.width / 2
|
|
128
|
+
const offsetY = horizontal ? placement.height / 2 : placement.side === 'top' ? placement.height : 0
|
|
129
|
+
el.style.left = `${placement.left + offsetX}px`
|
|
130
|
+
el.style.top = `${placement.top + offsetY}px`
|
|
131
|
+
el.dataset.side = placement.side
|
|
132
|
+
el.style.visibility = 'visible'
|
|
133
|
+
}
|
|
134
|
+
const onResize = () => {
|
|
135
|
+
if (anchor.current !== null) anchorRect = anchor.current.getBoundingClientRect()
|
|
136
|
+
fit()
|
|
137
|
+
}
|
|
138
|
+
const observer = new ResizeObserver((entries) => {
|
|
139
|
+
size = entries[0]?.borderBoxSize[0]
|
|
140
|
+
fit()
|
|
141
|
+
})
|
|
142
|
+
observer.observe(el, { box: 'border-box' })
|
|
143
|
+
window.addEventListener('resize', onResize)
|
|
144
|
+
return () => {
|
|
145
|
+
observer.disconnect()
|
|
146
|
+
window.removeEventListener('resize', onResize)
|
|
147
|
+
}
|
|
148
|
+
}, [align, gap, pos, side, suppressed, visible])
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
announce(visible)
|
|
151
|
+
return () => { announce(false) }
|
|
152
|
+
}, [announce, visible])
|
|
153
|
+
|
|
154
|
+
// Disabling mid-hover (e.g. clicking a rail control expands the sidebar)
|
|
155
|
+
// must drop an already-visible bubble: no mouseleave fires.
|
|
156
|
+
const cancelShow = useCallback(() => {
|
|
157
|
+
if (showTimer.current === null) return
|
|
158
|
+
clearTimeout(showTimer.current)
|
|
159
|
+
showTimer.current = null
|
|
160
|
+
}, [])
|
|
161
|
+
useEffect(() => {
|
|
162
|
+
if (pinned && (disabled || !openOnClick)) setPinned(false)
|
|
163
|
+
if (disabled) {
|
|
164
|
+
cancelShow()
|
|
165
|
+
triggers.current = { hover: false, focus: false }
|
|
166
|
+
setPos(null)
|
|
167
|
+
}
|
|
168
|
+
return cancelShow
|
|
169
|
+
}, [cancelShow, disabled, openOnClick, pinned])
|
|
170
|
+
|
|
171
|
+
const show = () => {
|
|
172
|
+
if (disabled) return
|
|
173
|
+
const el = anchor.current
|
|
174
|
+
/* v8 ignore next -- the ref is attached by event time: events fire on the cloned anchor. */
|
|
175
|
+
if (el === null) return
|
|
176
|
+
if (onlyWhenClipped && !clipped(el)) return
|
|
177
|
+
setPos(el.getBoundingClientRect())
|
|
178
|
+
announce(true)
|
|
179
|
+
}
|
|
180
|
+
const showAfterDelay = (delay: number) => {
|
|
181
|
+
cancelShow()
|
|
182
|
+
if (delay <= 0) {
|
|
183
|
+
show()
|
|
184
|
+
return
|
|
185
|
+
}
|
|
186
|
+
showTimer.current = setTimeout(() => {
|
|
187
|
+
showTimer.current = null
|
|
188
|
+
show()
|
|
189
|
+
}, delay)
|
|
190
|
+
}
|
|
191
|
+
const withdraw = useCallback(() => {
|
|
192
|
+
setPinned(false)
|
|
193
|
+
setPos(null)
|
|
194
|
+
announce(false)
|
|
195
|
+
}, [announce])
|
|
196
|
+
const hide = () => {
|
|
197
|
+
cancelShow()
|
|
198
|
+
if (!triggers.current.hover && !triggers.current.focus && !pinned) withdraw()
|
|
199
|
+
}
|
|
200
|
+
const dismiss = useCallback(() => {
|
|
201
|
+
cancelShow()
|
|
202
|
+
triggers.current = { hover: false, focus: false }
|
|
203
|
+
withdraw()
|
|
204
|
+
}, [cancelShow, withdraw])
|
|
205
|
+
useDismissOnOutsidePointer(anchor, openOnClick && visible, dismiss, bubble)
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
if (!openOnClick || !visible) return
|
|
208
|
+
const onKeyDown = (event: KeyboardEvent) => {
|
|
209
|
+
if (event.key !== 'Escape' && event.key !== 'Tab') return
|
|
210
|
+
if (event.key === 'Escape') { event.preventDefault(); event.stopPropagation() }
|
|
211
|
+
dismiss()
|
|
212
|
+
}
|
|
213
|
+
document.addEventListener('keydown', onKeyDown, true)
|
|
214
|
+
return () => { document.removeEventListener('keydown', onKeyDown, true) }
|
|
215
|
+
}, [dismiss, openOnClick, visible])
|
|
216
|
+
|
|
217
|
+
const content = visible && !suppressed && (
|
|
218
|
+
<span
|
|
219
|
+
ref={bubble}
|
|
220
|
+
id={openOnClick ? id : undefined}
|
|
221
|
+
className={css.bubble}
|
|
222
|
+
data-side={side}
|
|
223
|
+
data-portal={portal || undefined}
|
|
224
|
+
data-pinned={pinned || undefined}
|
|
225
|
+
data-align={align}
|
|
226
|
+
data-has-shortcut={shortcutKeys?.length ? true : undefined}
|
|
227
|
+
style={{ left: pos.left, top: pos.top, visibility: 'hidden', ...maxWidth === undefined ? {} : { maxWidth: `min(${maxWidth}px, calc(100vw - 24px))` } }}
|
|
228
|
+
role="tooltip"
|
|
229
|
+
aria-label={shortcutKeys?.length ? [resolvedLabel, shortcutKeys.join(' ')].filter(Boolean).join(' ') : undefined}
|
|
230
|
+
>
|
|
231
|
+
{resolvedLabel && <span className={css.label}>{resolvedLabel}</span>}
|
|
232
|
+
{shortcutKeys !== undefined && shortcutKeys.length > 0 && <ShortcutKeys keys={shortcutKeys} variant="tooltip" />}
|
|
233
|
+
</span>
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
return (
|
|
237
|
+
<TooltipSuppression.Provider value={setSuppressed}>
|
|
238
|
+
{cloneElement(children, {
|
|
239
|
+
ref: mergedRef,
|
|
240
|
+
'aria-describedby': openOnClick && visible
|
|
241
|
+
? [children.props['aria-describedby'], id].filter(Boolean).join(' ')
|
|
242
|
+
: children.props['aria-describedby'],
|
|
243
|
+
onPointerEnter: (e) => {
|
|
244
|
+
children.props.onPointerEnter?.(e)
|
|
245
|
+
if (e.pointerType === 'touch') return
|
|
246
|
+
// iOS can emit mouse entry when a tapped control replaces its icon.
|
|
247
|
+
if (e.pointerType === 'mouse' && !window.matchMedia('(any-hover: hover)').matches) return
|
|
248
|
+
triggers.current.hover = true
|
|
249
|
+
showAfterDelay(delayMs)
|
|
250
|
+
},
|
|
251
|
+
onPointerLeave: (e) => {
|
|
252
|
+
children.props.onPointerLeave?.(e)
|
|
253
|
+
triggers.current.hover = false
|
|
254
|
+
cancelShow()
|
|
255
|
+
if (!pinned) withdraw()
|
|
256
|
+
},
|
|
257
|
+
onPointerDown: (e) => {
|
|
258
|
+
children.props.onPointerDown?.(e)
|
|
259
|
+
if (e.pointerType === 'touch' && !pinned) dismiss()
|
|
260
|
+
},
|
|
261
|
+
// Activating an ordinary action dismisses the bubble: it often changes
|
|
262
|
+
// what the anchor now does (pin → unpin), and the click leaves the
|
|
263
|
+
// anchor focused, which would otherwise pin the relabelled bubble up.
|
|
264
|
+
onClick: (e) => {
|
|
265
|
+
children.props.onClick?.(e)
|
|
266
|
+
triggers.current.focus = false
|
|
267
|
+
cancelShow()
|
|
268
|
+
if (openOnClick && !disabled && !pinned) { setPinned(true); show() }
|
|
269
|
+
else withdraw()
|
|
270
|
+
},
|
|
271
|
+
onFocus: (e) => {
|
|
272
|
+
children.props.onFocus?.(e)
|
|
273
|
+
if (pointerModality()) return
|
|
274
|
+
triggers.current.focus = true
|
|
275
|
+
showAfterDelay(focusDelayMs)
|
|
276
|
+
},
|
|
277
|
+
onBlur: (e) => { children.props.onBlur?.(e); triggers.current.focus = false; hide() },
|
|
278
|
+
})}
|
|
279
|
+
{portal ? (content !== false && createPortal(content, document.body)) : content}
|
|
280
|
+
</TooltipSuppression.Provider>
|
|
281
|
+
)
|
|
282
|
+
}
|