@deepseek-ai/dsh-client-ui-primitives 0.2.3-alpha.2 → 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.
Files changed (897) hide show
  1. package/README.i18n.yaml +14 -14
  2. package/README.md +20 -19
  3. package/README.zh.md +20 -19
  4. package/lib/assets/vendor/katex/dist/fonts/KaTeX_AMS-Regular-34494743736f.woff2 +0 -0
  5. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Caligraphic-Bold-5bfa49cac46c.woff2 +0 -0
  6. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Caligraphic-Regular-9f8077e0b38a.woff2 +0 -0
  7. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Fraktur-Bold-f98f89272eca.woff2 +0 -0
  8. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Fraktur-Regular-a5764c6e2784.woff2 +0 -0
  9. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-Bold-31050a1b1b12.woff2 +0 -0
  10. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-BoldItalic-a4a4905b8b12.woff2 +0 -0
  11. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-Italic-c9b2b5ffd2f2.woff2 +0 -0
  12. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Main-Regular-c884086c25ce.woff2 +0 -0
  13. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Math-BoldItalic-8fcb9d2de65a.woff2 +0 -0
  14. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Math-Italic-db4883d0cff9.woff2 +0 -0
  15. package/lib/assets/vendor/katex/dist/fonts/KaTeX_SansSerif-Bold-886e61797a52.woff2 +0 -0
  16. package/lib/assets/vendor/katex/dist/fonts/KaTeX_SansSerif-Italic-3d5fa3cb309f.woff2 +0 -0
  17. package/lib/assets/vendor/katex/dist/fonts/KaTeX_SansSerif-Regular-e45d5f4f4a7f.woff2 +0 -0
  18. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Script-Regular-63b80959f1fc.woff2 +0 -0
  19. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size1-Regular-57fa599974a1.woff2 +0 -0
  20. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size2-Regular-ee18713634a3.woff2 +0 -0
  21. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size3-Regular-19a7caadfb66.woff2 +0 -0
  22. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Size4-Regular-9bed17fb92f2.woff2 +0 -0
  23. package/lib/assets/vendor/katex/dist/fonts/KaTeX_Typewriter-Regular-7a08883fffc6.woff2 +0 -0
  24. package/lib/client.asciidoc.js +3 -0
  25. package/lib/client.asciidoc.js.map +1 -0
  26. package/lib/client.bat.js +3 -0
  27. package/lib/client.bat.js.map +1 -0
  28. package/lib/client.bibtex.js +3 -0
  29. package/lib/client.bibtex.js.map +1 -0
  30. package/lib/client.c.js +3 -0
  31. package/lib/client.c.js.map +1 -0
  32. package/lib/client.clojure.js +3 -0
  33. package/lib/client.clojure.js.map +1 -0
  34. package/lib/client.cmake.js +3 -0
  35. package/lib/client.cmake.js.map +1 -0
  36. package/lib/client.cpp.js +3 -0
  37. package/lib/client.cpp.js.map +1 -0
  38. package/lib/client.csharp.js +3 -0
  39. package/lib/client.csharp.js.map +1 -0
  40. package/lib/client.css.js +3 -0
  41. package/lib/client.css.js.map +1 -0
  42. package/lib/client.csv.js +3 -0
  43. package/lib/client.csv.js.map +1 -0
  44. package/lib/client.dart.js +3 -0
  45. package/lib/client.dart.js.map +1 -0
  46. package/lib/client.diff.js +3 -0
  47. package/lib/client.diff.js.map +1 -0
  48. package/lib/client.dotenv.js +3 -0
  49. package/lib/client.dotenv.js.map +1 -0
  50. package/lib/client.elixir.js +3 -0
  51. package/lib/client.elixir.js.map +1 -0
  52. package/lib/client.erlang.js +3 -0
  53. package/lib/client.erlang.js.map +1 -0
  54. package/lib/client.fish.js +3 -0
  55. package/lib/client.fish.js.map +1 -0
  56. package/lib/client.fsharp.js +3 -0
  57. package/lib/client.fsharp.js.map +1 -0
  58. package/lib/client.go.js +3 -0
  59. package/lib/client.go.js.map +1 -0
  60. package/lib/client.graphql.js +3 -0
  61. package/lib/client.graphql.js.map +1 -0
  62. package/lib/client.groovy.js +3 -0
  63. package/lib/client.groovy.js.map +1 -0
  64. package/lib/client.haskell.js +3 -0
  65. package/lib/client.haskell.js.map +1 -0
  66. package/lib/client.hcl.js +3 -0
  67. package/lib/client.hcl.js.map +1 -0
  68. package/lib/client.html-derivative.js +3 -0
  69. package/lib/client.html-derivative.js.map +1 -0
  70. package/lib/client.html.js +3 -0
  71. package/lib/client.html.js.map +1 -0
  72. package/lib/client.http.js +3 -0
  73. package/lib/client.http.js.map +1 -0
  74. package/lib/client.ini.js +3 -0
  75. package/lib/client.ini.js.map +1 -0
  76. package/lib/client.java.js +3 -0
  77. package/lib/client.java.js.map +1 -0
  78. package/lib/client.javascript.js +3 -0
  79. package/lib/client.javascript.js.map +1 -0
  80. package/lib/client.js +489 -0
  81. package/lib/client.js.map +1 -0
  82. package/lib/client.julia.js +3 -0
  83. package/lib/client.julia.js.map +1 -0
  84. package/lib/client.kotlin.js +3 -0
  85. package/lib/client.kotlin.js.map +1 -0
  86. package/lib/client.latex.js +3 -0
  87. package/lib/client.latex.js.map +1 -0
  88. package/lib/client.less.js +3 -0
  89. package/lib/client.less.js.map +1 -0
  90. package/lib/client.log.js +3 -0
  91. package/lib/client.log.js.map +1 -0
  92. package/lib/client.lua.js +3 -0
  93. package/lib/client.lua.js.map +1 -0
  94. package/lib/client.make.js +3 -0
  95. package/lib/client.make.js.map +1 -0
  96. package/lib/client.markdown.js +3 -0
  97. package/lib/client.markdown.js.map +1 -0
  98. package/lib/client.mdx.js +3 -0
  99. package/lib/client.mdx.js.map +1 -0
  100. package/lib/client.nix.js +3 -0
  101. package/lib/client.nix.js.map +1 -0
  102. package/lib/client.perl.js +3 -0
  103. package/lib/client.perl.js.map +1 -0
  104. package/lib/client.php.js +3 -0
  105. package/lib/client.php.js.map +1 -0
  106. package/lib/client.powershell.js +3 -0
  107. package/lib/client.powershell.js.map +1 -0
  108. package/lib/client.proto.js +3 -0
  109. package/lib/client.proto.js.map +1 -0
  110. package/lib/client.python.js +3 -0
  111. package/lib/client.python.js.map +1 -0
  112. package/lib/client.r.js +3 -0
  113. package/lib/client.r.js.map +1 -0
  114. package/lib/client.rst.js +3 -0
  115. package/lib/client.rst.js.map +1 -0
  116. package/lib/client.ruby.js +3 -0
  117. package/lib/client.ruby.js.map +1 -0
  118. package/lib/client.rust.js +3 -0
  119. package/lib/client.rust.js.map +1 -0
  120. package/lib/client.scala.js +3 -0
  121. package/lib/client.scala.js.map +1 -0
  122. package/lib/client.scss.js +3 -0
  123. package/lib/client.scss.js.map +1 -0
  124. package/lib/client.sql.js +3 -0
  125. package/lib/client.sql.js.map +1 -0
  126. package/lib/client.svelte.js +3 -0
  127. package/lib/client.svelte.js.map +1 -0
  128. package/lib/client.swift.js +3 -0
  129. package/lib/client.swift.js.map +1 -0
  130. package/lib/client.system-verilog.js +3 -0
  131. package/lib/client.system-verilog.js.map +1 -0
  132. package/lib/client.toml.js +3 -0
  133. package/lib/client.toml.js.map +1 -0
  134. package/lib/client.vb.js +3 -0
  135. package/lib/client.vb.js.map +1 -0
  136. package/lib/client.verilog.js +3 -0
  137. package/lib/client.verilog.js.map +1 -0
  138. package/lib/client.vue.js +3 -0
  139. package/lib/client.vue.js.map +1 -0
  140. package/lib/client.xml.js +3 -0
  141. package/lib/client.xml.js.map +1 -0
  142. package/lib/client.yaml.js +3 -0
  143. package/lib/client.yaml.js.map +1 -0
  144. package/lib/index.js +10 -14594
  145. package/lib/types/client/AnimatedRows.d.ts.map +1 -0
  146. package/lib/types/client/AnimatedRows.js.map +1 -0
  147. package/lib/types/client/BrandWordmark.d.ts.map +1 -0
  148. package/lib/types/client/BrandWordmark.js.map +1 -0
  149. package/lib/types/client/Button.d.ts.map +1 -0
  150. package/lib/types/client/Button.js.map +1 -0
  151. package/lib/types/client/Checkbox.d.ts.map +1 -0
  152. package/lib/types/client/Checkbox.js.map +1 -0
  153. package/lib/types/client/CodeFileIcon.d.ts.map +1 -0
  154. package/lib/types/client/CodeFileIcon.js.map +1 -0
  155. package/lib/types/client/CodeToolbar.d.ts.map +1 -0
  156. package/lib/types/client/CodeToolbar.js.map +1 -0
  157. package/lib/types/client/CommandText.d.ts.map +1 -0
  158. package/lib/types/client/CommandText.js.map +1 -0
  159. package/lib/types/client/ConfigField.d.ts.map +1 -0
  160. package/lib/types/client/ConfigField.js.map +1 -0
  161. package/lib/types/client/ConnectionIndicator.d.ts.map +1 -0
  162. package/lib/types/client/ConnectionIndicator.js.map +1 -0
  163. package/lib/types/client/DetailDocument.d.ts.map +1 -0
  164. package/lib/types/client/DetailDocument.js.map +1 -0
  165. package/lib/types/client/DiffBlock.d.ts.map +1 -0
  166. package/lib/types/client/DiffBlock.js.map +1 -0
  167. package/lib/types/client/DisclosureRow.d.ts.map +1 -0
  168. package/lib/types/client/DisclosureRow.js.map +1 -0
  169. package/lib/types/client/DraggableImage.d.ts.map +1 -0
  170. package/lib/types/client/DraggableImage.js.map +1 -0
  171. package/lib/types/client/FileTypeIcon.d.ts.map +1 -0
  172. package/lib/types/client/FileTypeIcon.js.map +1 -0
  173. package/lib/types/client/FishLogo.d.ts.map +1 -0
  174. package/lib/types/client/FishLogo.js.map +1 -0
  175. package/lib/types/client/FoldToggle.d.ts.map +1 -0
  176. package/lib/types/client/FoldToggle.js.map +1 -0
  177. package/lib/types/client/HoverCard.d.ts.map +1 -0
  178. package/lib/types/client/HoverCard.js.map +1 -0
  179. package/lib/types/client/HoverCardGroup.d.ts.map +1 -0
  180. package/lib/types/client/HoverCardGroup.js.map +1 -0
  181. package/lib/types/client/ImageLightbox.d.ts.map +1 -0
  182. package/lib/types/client/ImageLightbox.js.map +1 -0
  183. package/lib/types/client/ImagePreview.d.ts.map +1 -0
  184. package/lib/types/client/ImagePreview.js.map +1 -0
  185. package/lib/types/client/InlineEditor.d.ts.map +1 -0
  186. package/lib/types/client/InlineEditor.js.map +1 -0
  187. package/lib/types/client/Input.d.ts.map +1 -0
  188. package/lib/types/client/Input.js.map +1 -0
  189. package/lib/types/client/InspectButton.d.ts +18 -0
  190. package/lib/types/client/InspectButton.d.ts.map +1 -0
  191. package/lib/types/client/InspectButton.js.map +1 -0
  192. package/lib/types/client/JsonTree.d.ts.map +1 -0
  193. package/lib/types/client/JsonTree.js.map +1 -0
  194. package/lib/types/client/LinkIcon.d.ts.map +1 -0
  195. package/lib/types/client/LinkIcon.js.map +1 -0
  196. package/lib/types/client/Marquee.d.ts.map +1 -0
  197. package/lib/types/client/Marquee.js.map +1 -0
  198. package/lib/types/client/Menu.d.ts.map +1 -0
  199. package/lib/types/client/Menu.js.map +1 -0
  200. package/lib/types/client/MenuGroup.d.ts.map +1 -0
  201. package/lib/types/client/MenuGroup.js.map +1 -0
  202. package/lib/types/client/MenuRow.d.ts.map +1 -0
  203. package/lib/types/client/MenuRow.js.map +1 -0
  204. package/lib/types/client/MenuSurface.d.ts.map +1 -0
  205. package/lib/types/client/MenuSurface.js.map +1 -0
  206. package/lib/types/client/Modal.d.ts.map +1 -0
  207. package/lib/types/client/Modal.js.map +1 -0
  208. package/lib/types/client/PathLabel.d.ts.map +1 -0
  209. package/lib/types/client/PathLabel.js.map +1 -0
  210. package/lib/types/client/PermissionIcon.d.ts.map +1 -0
  211. package/lib/types/client/PermissionIcon.js.map +1 -0
  212. package/lib/types/client/Pill.d.ts.map +1 -0
  213. package/lib/types/client/Pill.js.map +1 -0
  214. package/lib/types/client/QuotePreview.d.ts +38 -0
  215. package/lib/types/client/QuotePreview.d.ts.map +1 -0
  216. package/lib/types/client/QuotePreview.js.map +1 -0
  217. package/lib/types/client/ReadBlock.d.ts.map +1 -0
  218. package/lib/types/client/ReadBlock.js.map +1 -0
  219. package/lib/types/client/ReferenceIcon.d.ts.map +1 -0
  220. package/lib/types/client/ReferenceIcon.js.map +1 -0
  221. package/lib/types/client/RiskConfirmation.d.ts.map +1 -0
  222. package/lib/types/client/RiskConfirmation.js.map +1 -0
  223. package/lib/types/client/SearchBlock.d.ts.map +1 -0
  224. package/lib/types/client/SearchBlock.js.map +1 -0
  225. package/lib/types/client/SearchField.d.ts.map +1 -0
  226. package/lib/types/client/SearchField.js.map +1 -0
  227. package/lib/types/client/SegmentedControl.d.ts.map +1 -0
  228. package/lib/types/client/SegmentedControl.js.map +1 -0
  229. package/lib/types/client/SegmentedTabs.d.ts.map +1 -0
  230. package/lib/types/client/SegmentedTabs.js.map +1 -0
  231. package/lib/types/client/ShortcutKeys.d.ts.map +1 -0
  232. package/lib/types/client/ShortcutKeys.js.map +1 -0
  233. package/lib/types/client/SiteGlyph.d.ts.map +1 -0
  234. package/lib/types/client/SiteGlyph.js.map +1 -0
  235. package/lib/types/client/StateDot.d.ts.map +1 -0
  236. package/lib/types/client/StateDot.js.map +1 -0
  237. package/lib/types/client/SubmenuPanel.d.ts.map +1 -0
  238. package/lib/types/client/SubmenuPanel.js.map +1 -0
  239. package/lib/types/client/Switch.d.ts.map +1 -0
  240. package/lib/types/client/Switch.js.map +1 -0
  241. package/lib/types/client/Tag.d.ts.map +1 -0
  242. package/lib/types/client/Tag.js.map +1 -0
  243. package/lib/types/client/TerminalBlock.d.ts.map +1 -0
  244. package/lib/types/client/TerminalBlock.js.map +1 -0
  245. package/lib/types/client/TextShimmer.d.ts.map +1 -0
  246. package/lib/types/client/TextShimmer.js.map +1 -0
  247. package/lib/types/client/Toast.d.ts.map +1 -0
  248. package/lib/types/client/Toast.js.map +1 -0
  249. package/lib/types/client/Tooltip.d.ts.map +1 -0
  250. package/lib/types/client/Tooltip.js.map +1 -0
  251. package/lib/types/client/UserMessageBubble.d.ts.map +1 -0
  252. package/lib/types/client/UserMessageBubble.js.map +1 -0
  253. package/lib/types/client/WebBlock.d.ts.map +1 -0
  254. package/lib/types/client/WebBlock.js.map +1 -0
  255. package/lib/types/client/ZoomControls.d.ts.map +1 -0
  256. package/lib/types/client/ZoomControls.js.map +1 -0
  257. package/lib/types/client/ansi.d.ts.map +1 -0
  258. package/lib/types/client/ansi.js.map +1 -0
  259. package/lib/types/client/clipboard.d.ts.map +1 -0
  260. package/lib/types/client/clipboard.js.map +1 -0
  261. package/lib/types/client/code-file-icon-artwork.d.ts.map +1 -0
  262. package/lib/types/client/code-file-icon-artwork.js.map +1 -0
  263. package/lib/types/client/code-file-types.d.ts.map +1 -0
  264. package/lib/types/client/code-file-types.js.map +1 -0
  265. package/lib/types/client/code-highlighting.d.ts.map +1 -0
  266. package/lib/types/client/code-highlighting.js.map +1 -0
  267. package/lib/types/client/darwin-desktop.d.ts.map +1 -0
  268. package/lib/types/client/darwin-desktop.js.map +1 -0
  269. package/lib/types/client/document-zoom.d.ts.map +1 -0
  270. package/lib/types/client/document-zoom.js.map +1 -0
  271. package/lib/types/client/file-drag-actions.d.ts.map +1 -0
  272. package/lib/types/client/file-drag-actions.js.map +1 -0
  273. package/lib/types/client/file-size.d.ts.map +1 -0
  274. package/lib/types/client/file-size.js.map +1 -0
  275. package/lib/types/client/focus.d.ts.map +1 -0
  276. package/lib/types/client/focus.js.map +1 -0
  277. package/lib/types/client/guide-artwork.d.ts.map +1 -0
  278. package/lib/types/client/guide-artwork.js.map +1 -0
  279. package/lib/types/client/head-tail-cap.d.ts.map +1 -0
  280. package/lib/types/client/head-tail-cap.js.map +1 -0
  281. package/lib/types/client/icons/artwork.d.ts +475 -0
  282. package/lib/types/client/icons/artwork.d.ts.map +1 -0
  283. package/lib/types/client/icons/artwork.js.map +1 -0
  284. package/lib/types/client/icons/index.d.ts +450 -0
  285. package/lib/types/client/icons/index.d.ts.map +1 -0
  286. package/lib/types/client/icons/index.js.map +1 -0
  287. package/lib/types/client/icons/props.d.ts.map +1 -0
  288. package/lib/types/client/icons/props.js.map +1 -0
  289. package/lib/types/client/icons/shared-artwork.d.ts.map +1 -0
  290. package/lib/types/client/icons/shared-artwork.js.map +1 -0
  291. package/lib/types/client/image-drag.d.ts.map +1 -0
  292. package/lib/types/client/image-drag.js.map +1 -0
  293. package/lib/types/client/index.d.ts +128 -0
  294. package/lib/types/client/index.d.ts.map +1 -0
  295. package/lib/types/client/index.js.map +1 -0
  296. package/lib/types/client/input-modality.d.ts.map +1 -0
  297. package/lib/types/client/input-modality.js.map +1 -0
  298. package/lib/types/client/keyboard-composition.d.ts.map +1 -0
  299. package/lib/types/client/keyboard-composition.js.map +1 -0
  300. package/lib/types/client/markdown/CodeBlock.d.ts.map +1 -0
  301. package/lib/types/client/markdown/CodeBlock.js.map +1 -0
  302. package/lib/types/client/markdown/FenceBlocks.d.ts.map +1 -0
  303. package/lib/types/client/markdown/FenceBlocks.js.map +1 -0
  304. package/lib/types/client/markdown/JsonBlock.d.ts.map +1 -0
  305. package/lib/types/client/markdown/JsonBlock.js.map +1 -0
  306. package/lib/types/client/markdown/MarkdownDelegate.d.ts.map +1 -0
  307. package/lib/types/client/markdown/MarkdownDelegate.js.map +1 -0
  308. package/lib/types/client/markdown/MarkdownText.d.ts.map +1 -0
  309. package/lib/types/client/markdown/MarkdownText.js.map +1 -0
  310. package/lib/types/client/markdown/cjkFriendlyStrong.d.ts.map +1 -0
  311. package/lib/types/client/markdown/cjkFriendlyStrong.js.map +1 -0
  312. package/lib/types/client/markdown/copy-tex.d.ts.map +1 -0
  313. package/lib/types/client/markdown/copy-tex.js.map +1 -0
  314. package/lib/types/client/markdown/diff-fence.d.ts.map +1 -0
  315. package/lib/types/client/markdown/diff-fence.js.map +1 -0
  316. package/lib/types/client/markdown/file-link.d.ts.map +1 -0
  317. package/lib/types/client/markdown/file-link.js.map +1 -0
  318. package/lib/types/client/markdown/highlight.d.ts.map +1 -0
  319. package/lib/types/client/markdown/highlight.js.map +1 -0
  320. package/lib/types/client/markdown/incremental.d.ts.map +1 -0
  321. package/lib/types/client/markdown/incremental.js.map +1 -0
  322. package/lib/types/client/markdown/katex.d.ts.map +1 -0
  323. package/lib/types/client/markdown/katex.js.map +1 -0
  324. package/lib/types/client/markdown/local-image-syntax.d.ts.map +1 -0
  325. package/lib/types/client/markdown/local-image-syntax.js.map +1 -0
  326. package/lib/types/client/markdown/mathCompatibility.d.ts.map +1 -0
  327. package/lib/types/client/markdown/mathCompatibility.js.map +1 -0
  328. package/lib/types/client/markdown/parse.d.ts.map +1 -0
  329. package/lib/types/client/markdown/parse.js.map +1 -0
  330. package/lib/types/client/markdown/plain-text.d.ts.map +1 -0
  331. package/lib/types/client/markdown/plain-text.js.map +1 -0
  332. package/lib/types/client/markdown/quote-text.d.ts.map +1 -0
  333. package/lib/types/client/markdown/quote-text.js.map +1 -0
  334. package/lib/types/client/markdown/render.d.ts.map +1 -0
  335. package/lib/types/client/markdown/render.js.map +1 -0
  336. package/lib/types/client/markdown/useViewportHighlighting.d.ts +11 -0
  337. package/lib/types/client/markdown/useViewportHighlighting.d.ts.map +1 -0
  338. package/lib/types/client/markdown/useViewportHighlighting.js.map +1 -0
  339. package/lib/types/client/markdown/windows-path-destinations.d.ts.map +1 -0
  340. package/lib/types/client/markdown/windows-path-destinations.js.map +1 -0
  341. package/lib/types/client/menu-submenu-position.d.ts.map +1 -0
  342. package/lib/types/client/menu-submenu-position.js.map +1 -0
  343. package/lib/types/client/overlay-top-margin.d.ts.map +1 -0
  344. package/lib/types/client/overlay-top-margin.js.map +1 -0
  345. package/lib/types/client/plugin-artwork.d.ts.map +1 -0
  346. package/lib/types/client/plugin-artwork.js.map +1 -0
  347. package/lib/types/client/pointer-grace.d.ts.map +1 -0
  348. package/lib/types/client/pointer-grace.js.map +1 -0
  349. package/lib/types/client/relative-time.d.ts.map +1 -0
  350. package/lib/types/client/relative-time.js.map +1 -0
  351. package/lib/types/client/settings-form/SettingsForm.d.ts.map +1 -0
  352. package/lib/types/client/settings-form/SettingsForm.js.map +1 -0
  353. package/lib/types/client/settings-form/fields.d.ts.map +1 -0
  354. package/lib/types/client/settings-form/fields.js.map +1 -0
  355. package/lib/types/client/settings-form/form-model.d.ts.map +1 -0
  356. package/lib/types/client/settings-form/form-model.js.map +1 -0
  357. package/lib/types/client/tooltip-placement.d.ts.map +1 -0
  358. package/lib/types/client/tooltip-placement.js.map +1 -0
  359. package/lib/types/client/use-clipboard-copy.d.ts.map +1 -0
  360. package/lib/types/client/use-clipboard-copy.js.map +1 -0
  361. package/lib/types/client/useAnchoredMaxHeight.d.ts +14 -0
  362. package/lib/types/client/useAnchoredMaxHeight.d.ts.map +1 -0
  363. package/lib/types/client/useAnchoredMaxHeight.js.map +1 -0
  364. package/lib/types/client/useDismissOnOutsidePointer.d.ts.map +1 -0
  365. package/lib/types/client/useDismissOnOutsidePointer.js.map +1 -0
  366. package/lib/types/client/useMenuSubmenu.d.ts +44 -0
  367. package/lib/types/client/useMenuSubmenu.d.ts.map +1 -0
  368. package/lib/types/client/useMenuSubmenu.js.map +1 -0
  369. package/lib/types/client/useModalLayer.d.ts.map +1 -0
  370. package/lib/types/client/useModalLayer.js.map +1 -0
  371. package/lib/types/client/useRowDragPreview.d.ts.map +1 -0
  372. package/lib/types/client/useRowDragPreview.js.map +1 -0
  373. package/lib/types/client/user-text.d.ts.map +1 -0
  374. package/lib/types/client/user-text.js.map +1 -0
  375. package/locale/de.json +6 -0
  376. package/locale/en.json +5 -0
  377. package/locale/es.json +6 -0
  378. package/locale/fr.json +6 -0
  379. package/locale/ja.json +6 -0
  380. package/locale/pt.json +6 -0
  381. package/locale/ru.json +6 -0
  382. package/locale/zh.json +6 -0
  383. package/package.json +28 -12
  384. package/src/client/CodeFileIcon.tsx +28 -0
  385. package/src/client/HoverCard.tsx +360 -0
  386. package/src/client/InspectButton.module.css +47 -0
  387. package/src/client/InspectButton.tsx +29 -0
  388. package/src/client/JsonTree.tsx +850 -0
  389. package/src/client/Menu.module.css +491 -0
  390. package/src/client/Menu.tsx +656 -0
  391. package/src/client/MenuSurface.tsx +54 -0
  392. package/src/client/QuotePreview.tsx +116 -0
  393. package/src/client/RiskConfirmation.module.css +54 -0
  394. package/src/client/TextShimmer.tsx +64 -0
  395. package/src/client/Tooltip.tsx +282 -0
  396. package/src/client/icons/artwork.ts +169 -0
  397. package/src/client/icons/index.tsx +694 -0
  398. package/src/client/image-drag.ts +84 -0
  399. package/src/client/index.ts +148 -0
  400. package/src/client/markdown/MarkdownText.module.css +612 -0
  401. package/src/client/markdown/useViewportHighlighting.ts +72 -0
  402. package/src/client/plugin-artwork.tsx +110 -0
  403. package/src/client/useAnchoredMaxHeight.ts +45 -0
  404. package/src/client/useMenuSubmenu.ts +185 -0
  405. package/src/index.js +12 -0
  406. package/lib/index.js.map +0 -1
  407. package/lib/types/AnimatedRows.d.ts.map +0 -1
  408. package/lib/types/AnimatedRows.js.map +0 -1
  409. package/lib/types/BrandWordmark.d.ts.map +0 -1
  410. package/lib/types/BrandWordmark.js.map +0 -1
  411. package/lib/types/Button.d.ts.map +0 -1
  412. package/lib/types/Button.js.map +0 -1
  413. package/lib/types/Checkbox.d.ts.map +0 -1
  414. package/lib/types/Checkbox.js.map +0 -1
  415. package/lib/types/CodeFileIcon.d.ts.map +0 -1
  416. package/lib/types/CodeFileIcon.js.map +0 -1
  417. package/lib/types/CodeToolbar.d.ts.map +0 -1
  418. package/lib/types/CodeToolbar.js.map +0 -1
  419. package/lib/types/CommandText.d.ts.map +0 -1
  420. package/lib/types/CommandText.js.map +0 -1
  421. package/lib/types/ConfigField.d.ts.map +0 -1
  422. package/lib/types/ConfigField.js.map +0 -1
  423. package/lib/types/ConnectionIndicator.d.ts.map +0 -1
  424. package/lib/types/ConnectionIndicator.js.map +0 -1
  425. package/lib/types/DetailDocument.d.ts.map +0 -1
  426. package/lib/types/DetailDocument.js.map +0 -1
  427. package/lib/types/DiffBlock.d.ts.map +0 -1
  428. package/lib/types/DiffBlock.js.map +0 -1
  429. package/lib/types/DisclosureRow.d.ts.map +0 -1
  430. package/lib/types/DisclosureRow.js.map +0 -1
  431. package/lib/types/DraggableImage.d.ts.map +0 -1
  432. package/lib/types/DraggableImage.js.map +0 -1
  433. package/lib/types/FileTypeIcon.d.ts.map +0 -1
  434. package/lib/types/FileTypeIcon.js.map +0 -1
  435. package/lib/types/FishLogo.d.ts.map +0 -1
  436. package/lib/types/FishLogo.js.map +0 -1
  437. package/lib/types/FoldToggle.d.ts.map +0 -1
  438. package/lib/types/FoldToggle.js.map +0 -1
  439. package/lib/types/HoverCard.d.ts.map +0 -1
  440. package/lib/types/HoverCard.js.map +0 -1
  441. package/lib/types/HoverCardGroup.d.ts.map +0 -1
  442. package/lib/types/HoverCardGroup.js.map +0 -1
  443. package/lib/types/ImageLightbox.d.ts.map +0 -1
  444. package/lib/types/ImageLightbox.js.map +0 -1
  445. package/lib/types/ImagePreview.d.ts.map +0 -1
  446. package/lib/types/ImagePreview.js.map +0 -1
  447. package/lib/types/InlineEditor.d.ts.map +0 -1
  448. package/lib/types/InlineEditor.js.map +0 -1
  449. package/lib/types/Input.d.ts.map +0 -1
  450. package/lib/types/Input.js.map +0 -1
  451. package/lib/types/JsonTree.d.ts.map +0 -1
  452. package/lib/types/JsonTree.js.map +0 -1
  453. package/lib/types/LinkIcon.d.ts.map +0 -1
  454. package/lib/types/LinkIcon.js.map +0 -1
  455. package/lib/types/Marquee.d.ts.map +0 -1
  456. package/lib/types/Marquee.js.map +0 -1
  457. package/lib/types/Menu.d.ts.map +0 -1
  458. package/lib/types/Menu.js.map +0 -1
  459. package/lib/types/MenuGroup.d.ts.map +0 -1
  460. package/lib/types/MenuGroup.js.map +0 -1
  461. package/lib/types/MenuRow.d.ts.map +0 -1
  462. package/lib/types/MenuRow.js.map +0 -1
  463. package/lib/types/MenuSurface.d.ts.map +0 -1
  464. package/lib/types/MenuSurface.js.map +0 -1
  465. package/lib/types/Modal.d.ts.map +0 -1
  466. package/lib/types/Modal.js.map +0 -1
  467. package/lib/types/PathLabel.d.ts.map +0 -1
  468. package/lib/types/PathLabel.js.map +0 -1
  469. package/lib/types/PermissionIcon.d.ts.map +0 -1
  470. package/lib/types/PermissionIcon.js.map +0 -1
  471. package/lib/types/Pill.d.ts.map +0 -1
  472. package/lib/types/Pill.js.map +0 -1
  473. package/lib/types/QuotePreview.d.ts +0 -37
  474. package/lib/types/QuotePreview.d.ts.map +0 -1
  475. package/lib/types/QuotePreview.js.map +0 -1
  476. package/lib/types/ReadBlock.d.ts.map +0 -1
  477. package/lib/types/ReadBlock.js.map +0 -1
  478. package/lib/types/ReferenceIcon.d.ts.map +0 -1
  479. package/lib/types/ReferenceIcon.js.map +0 -1
  480. package/lib/types/RiskConfirmation.d.ts.map +0 -1
  481. package/lib/types/RiskConfirmation.js.map +0 -1
  482. package/lib/types/SearchBlock.d.ts.map +0 -1
  483. package/lib/types/SearchBlock.js.map +0 -1
  484. package/lib/types/SearchField.d.ts.map +0 -1
  485. package/lib/types/SearchField.js.map +0 -1
  486. package/lib/types/SegmentedControl.d.ts.map +0 -1
  487. package/lib/types/SegmentedControl.js.map +0 -1
  488. package/lib/types/SegmentedTabs.d.ts.map +0 -1
  489. package/lib/types/SegmentedTabs.js.map +0 -1
  490. package/lib/types/ShortcutKeys.d.ts.map +0 -1
  491. package/lib/types/ShortcutKeys.js.map +0 -1
  492. package/lib/types/SiteGlyph.d.ts.map +0 -1
  493. package/lib/types/SiteGlyph.js.map +0 -1
  494. package/lib/types/StateDot.d.ts.map +0 -1
  495. package/lib/types/StateDot.js.map +0 -1
  496. package/lib/types/SubmenuPanel.d.ts.map +0 -1
  497. package/lib/types/SubmenuPanel.js.map +0 -1
  498. package/lib/types/Switch.d.ts.map +0 -1
  499. package/lib/types/Switch.js.map +0 -1
  500. package/lib/types/Tag.d.ts.map +0 -1
  501. package/lib/types/Tag.js.map +0 -1
  502. package/lib/types/TerminalBlock.d.ts.map +0 -1
  503. package/lib/types/TerminalBlock.js.map +0 -1
  504. package/lib/types/TextShimmer.d.ts.map +0 -1
  505. package/lib/types/TextShimmer.js.map +0 -1
  506. package/lib/types/Toast.d.ts.map +0 -1
  507. package/lib/types/Toast.js.map +0 -1
  508. package/lib/types/Tooltip.d.ts.map +0 -1
  509. package/lib/types/Tooltip.js.map +0 -1
  510. package/lib/types/UserMessageBubble.d.ts.map +0 -1
  511. package/lib/types/UserMessageBubble.js.map +0 -1
  512. package/lib/types/WebBlock.d.ts.map +0 -1
  513. package/lib/types/WebBlock.js.map +0 -1
  514. package/lib/types/ZoomControls.d.ts.map +0 -1
  515. package/lib/types/ZoomControls.js.map +0 -1
  516. package/lib/types/ansi.d.ts.map +0 -1
  517. package/lib/types/ansi.js.map +0 -1
  518. package/lib/types/clipboard.d.ts.map +0 -1
  519. package/lib/types/clipboard.js.map +0 -1
  520. package/lib/types/code-file-icon-artwork.d.ts.map +0 -1
  521. package/lib/types/code-file-icon-artwork.js.map +0 -1
  522. package/lib/types/code-file-types.d.ts.map +0 -1
  523. package/lib/types/code-file-types.js.map +0 -1
  524. package/lib/types/code-highlighting.d.ts.map +0 -1
  525. package/lib/types/code-highlighting.js.map +0 -1
  526. package/lib/types/darwin-desktop.d.ts.map +0 -1
  527. package/lib/types/darwin-desktop.js.map +0 -1
  528. package/lib/types/document-zoom.d.ts.map +0 -1
  529. package/lib/types/document-zoom.js.map +0 -1
  530. package/lib/types/file-drag-actions.d.ts.map +0 -1
  531. package/lib/types/file-drag-actions.js.map +0 -1
  532. package/lib/types/file-size.d.ts.map +0 -1
  533. package/lib/types/file-size.js.map +0 -1
  534. package/lib/types/focus.d.ts.map +0 -1
  535. package/lib/types/focus.js.map +0 -1
  536. package/lib/types/guide-artwork.d.ts.map +0 -1
  537. package/lib/types/guide-artwork.js.map +0 -1
  538. package/lib/types/head-tail-cap.d.ts.map +0 -1
  539. package/lib/types/head-tail-cap.js.map +0 -1
  540. package/lib/types/icons/artwork.d.ts +0 -454
  541. package/lib/types/icons/artwork.d.ts.map +0 -1
  542. package/lib/types/icons/artwork.js.map +0 -1
  543. package/lib/types/icons/index.d.ts +0 -430
  544. package/lib/types/icons/index.d.ts.map +0 -1
  545. package/lib/types/icons/index.js.map +0 -1
  546. package/lib/types/icons/props.d.ts.map +0 -1
  547. package/lib/types/icons/props.js.map +0 -1
  548. package/lib/types/icons/shared-artwork.d.ts.map +0 -1
  549. package/lib/types/icons/shared-artwork.js.map +0 -1
  550. package/lib/types/image-drag.d.ts.map +0 -1
  551. package/lib/types/image-drag.js.map +0 -1
  552. package/lib/types/index.d.ts +0 -124
  553. package/lib/types/index.d.ts.map +0 -1
  554. package/lib/types/index.js.map +0 -1
  555. package/lib/types/input-modality.d.ts.map +0 -1
  556. package/lib/types/input-modality.js.map +0 -1
  557. package/lib/types/keyboard-composition.d.ts.map +0 -1
  558. package/lib/types/keyboard-composition.js.map +0 -1
  559. package/lib/types/markdown/CodeBlock.d.ts.map +0 -1
  560. package/lib/types/markdown/CodeBlock.js.map +0 -1
  561. package/lib/types/markdown/FenceBlocks.d.ts.map +0 -1
  562. package/lib/types/markdown/FenceBlocks.js.map +0 -1
  563. package/lib/types/markdown/JsonBlock.d.ts.map +0 -1
  564. package/lib/types/markdown/JsonBlock.js.map +0 -1
  565. package/lib/types/markdown/MarkdownDelegate.d.ts.map +0 -1
  566. package/lib/types/markdown/MarkdownDelegate.js.map +0 -1
  567. package/lib/types/markdown/MarkdownText.d.ts.map +0 -1
  568. package/lib/types/markdown/MarkdownText.js.map +0 -1
  569. package/lib/types/markdown/cjkFriendlyStrong.d.ts.map +0 -1
  570. package/lib/types/markdown/cjkFriendlyStrong.js.map +0 -1
  571. package/lib/types/markdown/copy-tex.d.ts.map +0 -1
  572. package/lib/types/markdown/copy-tex.js.map +0 -1
  573. package/lib/types/markdown/diff-fence.d.ts.map +0 -1
  574. package/lib/types/markdown/diff-fence.js.map +0 -1
  575. package/lib/types/markdown/file-link.d.ts.map +0 -1
  576. package/lib/types/markdown/file-link.js.map +0 -1
  577. package/lib/types/markdown/highlight.d.ts.map +0 -1
  578. package/lib/types/markdown/highlight.js.map +0 -1
  579. package/lib/types/markdown/incremental.d.ts.map +0 -1
  580. package/lib/types/markdown/incremental.js.map +0 -1
  581. package/lib/types/markdown/katex.d.ts.map +0 -1
  582. package/lib/types/markdown/katex.js.map +0 -1
  583. package/lib/types/markdown/local-image-syntax.d.ts.map +0 -1
  584. package/lib/types/markdown/local-image-syntax.js.map +0 -1
  585. package/lib/types/markdown/mathCompatibility.d.ts.map +0 -1
  586. package/lib/types/markdown/mathCompatibility.js.map +0 -1
  587. package/lib/types/markdown/parse.d.ts.map +0 -1
  588. package/lib/types/markdown/parse.js.map +0 -1
  589. package/lib/types/markdown/plain-text.d.ts.map +0 -1
  590. package/lib/types/markdown/plain-text.js.map +0 -1
  591. package/lib/types/markdown/quote-text.d.ts.map +0 -1
  592. package/lib/types/markdown/quote-text.js.map +0 -1
  593. package/lib/types/markdown/render.d.ts.map +0 -1
  594. package/lib/types/markdown/render.js.map +0 -1
  595. package/lib/types/markdown/useViewportHighlighting.d.ts +0 -11
  596. package/lib/types/markdown/useViewportHighlighting.d.ts.map +0 -1
  597. package/lib/types/markdown/useViewportHighlighting.js.map +0 -1
  598. package/lib/types/markdown/windows-path-destinations.d.ts.map +0 -1
  599. package/lib/types/markdown/windows-path-destinations.js.map +0 -1
  600. package/lib/types/menu-submenu-position.d.ts.map +0 -1
  601. package/lib/types/menu-submenu-position.js.map +0 -1
  602. package/lib/types/overlay-top-margin.d.ts.map +0 -1
  603. package/lib/types/overlay-top-margin.js.map +0 -1
  604. package/lib/types/plugin-artwork.d.ts.map +0 -1
  605. package/lib/types/plugin-artwork.js.map +0 -1
  606. package/lib/types/pointer-grace.d.ts.map +0 -1
  607. package/lib/types/pointer-grace.js.map +0 -1
  608. package/lib/types/relative-time.d.ts.map +0 -1
  609. package/lib/types/relative-time.js.map +0 -1
  610. package/lib/types/settings-form/SettingsForm.d.ts.map +0 -1
  611. package/lib/types/settings-form/SettingsForm.js.map +0 -1
  612. package/lib/types/settings-form/fields.d.ts.map +0 -1
  613. package/lib/types/settings-form/fields.js.map +0 -1
  614. package/lib/types/settings-form/form-model.d.ts.map +0 -1
  615. package/lib/types/settings-form/form-model.js.map +0 -1
  616. package/lib/types/tooltip-placement.d.ts.map +0 -1
  617. package/lib/types/tooltip-placement.js.map +0 -1
  618. package/lib/types/use-clipboard-copy.d.ts.map +0 -1
  619. package/lib/types/use-clipboard-copy.js.map +0 -1
  620. package/lib/types/useAnchoredMaxHeight.d.ts +0 -14
  621. package/lib/types/useAnchoredMaxHeight.d.ts.map +0 -1
  622. package/lib/types/useAnchoredMaxHeight.js.map +0 -1
  623. package/lib/types/useDismissOnOutsidePointer.d.ts.map +0 -1
  624. package/lib/types/useDismissOnOutsidePointer.js.map +0 -1
  625. package/lib/types/useMenuSubmenu.d.ts +0 -44
  626. package/lib/types/useMenuSubmenu.d.ts.map +0 -1
  627. package/lib/types/useMenuSubmenu.js.map +0 -1
  628. package/lib/types/useModalLayer.d.ts.map +0 -1
  629. package/lib/types/useModalLayer.js.map +0 -1
  630. package/lib/types/useRowDragPreview.d.ts.map +0 -1
  631. package/lib/types/useRowDragPreview.js.map +0 -1
  632. package/lib/types/user-text.d.ts.map +0 -1
  633. package/lib/types/user-text.js.map +0 -1
  634. package/src/CodeFileIcon.tsx +0 -28
  635. package/src/HoverCard.tsx +0 -360
  636. package/src/JsonTree.tsx +0 -850
  637. package/src/Menu.module.css +0 -473
  638. package/src/Menu.tsx +0 -656
  639. package/src/MenuSurface.tsx +0 -54
  640. package/src/QuotePreview.tsx +0 -133
  641. package/src/RiskConfirmation.module.css +0 -52
  642. package/src/TextShimmer.tsx +0 -58
  643. package/src/Tooltip.tsx +0 -273
  644. package/src/icons/artwork.ts +0 -161
  645. package/src/icons/index.tsx +0 -664
  646. package/src/image-drag.ts +0 -84
  647. package/src/index.ts +0 -143
  648. package/src/markdown/MarkdownText.module.css +0 -522
  649. package/src/markdown/useViewportHighlighting.ts +0 -72
  650. package/src/plugin-artwork.tsx +0 -110
  651. package/src/useAnchoredMaxHeight.ts +0 -45
  652. package/src/useMenuSubmenu.ts +0 -185
  653. /package/lib/types/{AnimatedRows.d.ts → client/AnimatedRows.d.ts} +0 -0
  654. /package/lib/types/{BrandWordmark.d.ts → client/BrandWordmark.d.ts} +0 -0
  655. /package/lib/types/{Button.d.ts → client/Button.d.ts} +0 -0
  656. /package/lib/types/{Checkbox.d.ts → client/Checkbox.d.ts} +0 -0
  657. /package/lib/types/{CodeFileIcon.d.ts → client/CodeFileIcon.d.ts} +0 -0
  658. /package/lib/types/{CodeToolbar.d.ts → client/CodeToolbar.d.ts} +0 -0
  659. /package/lib/types/{CommandText.d.ts → client/CommandText.d.ts} +0 -0
  660. /package/lib/types/{ConfigField.d.ts → client/ConfigField.d.ts} +0 -0
  661. /package/lib/types/{ConnectionIndicator.d.ts → client/ConnectionIndicator.d.ts} +0 -0
  662. /package/lib/types/{DetailDocument.d.ts → client/DetailDocument.d.ts} +0 -0
  663. /package/lib/types/{DiffBlock.d.ts → client/DiffBlock.d.ts} +0 -0
  664. /package/lib/types/{DisclosureRow.d.ts → client/DisclosureRow.d.ts} +0 -0
  665. /package/lib/types/{DraggableImage.d.ts → client/DraggableImage.d.ts} +0 -0
  666. /package/lib/types/{FileTypeIcon.d.ts → client/FileTypeIcon.d.ts} +0 -0
  667. /package/lib/types/{FishLogo.d.ts → client/FishLogo.d.ts} +0 -0
  668. /package/lib/types/{FoldToggle.d.ts → client/FoldToggle.d.ts} +0 -0
  669. /package/lib/types/{HoverCard.d.ts → client/HoverCard.d.ts} +0 -0
  670. /package/lib/types/{HoverCardGroup.d.ts → client/HoverCardGroup.d.ts} +0 -0
  671. /package/lib/types/{ImageLightbox.d.ts → client/ImageLightbox.d.ts} +0 -0
  672. /package/lib/types/{ImagePreview.d.ts → client/ImagePreview.d.ts} +0 -0
  673. /package/lib/types/{InlineEditor.d.ts → client/InlineEditor.d.ts} +0 -0
  674. /package/lib/types/{Input.d.ts → client/Input.d.ts} +0 -0
  675. /package/lib/types/{JsonTree.d.ts → client/JsonTree.d.ts} +0 -0
  676. /package/lib/types/{LinkIcon.d.ts → client/LinkIcon.d.ts} +0 -0
  677. /package/lib/types/{Marquee.d.ts → client/Marquee.d.ts} +0 -0
  678. /package/lib/types/{Menu.d.ts → client/Menu.d.ts} +0 -0
  679. /package/lib/types/{MenuGroup.d.ts → client/MenuGroup.d.ts} +0 -0
  680. /package/lib/types/{MenuRow.d.ts → client/MenuRow.d.ts} +0 -0
  681. /package/lib/types/{MenuSurface.d.ts → client/MenuSurface.d.ts} +0 -0
  682. /package/lib/types/{Modal.d.ts → client/Modal.d.ts} +0 -0
  683. /package/lib/types/{PathLabel.d.ts → client/PathLabel.d.ts} +0 -0
  684. /package/lib/types/{PermissionIcon.d.ts → client/PermissionIcon.d.ts} +0 -0
  685. /package/lib/types/{Pill.d.ts → client/Pill.d.ts} +0 -0
  686. /package/lib/types/{ReadBlock.d.ts → client/ReadBlock.d.ts} +0 -0
  687. /package/lib/types/{ReferenceIcon.d.ts → client/ReferenceIcon.d.ts} +0 -0
  688. /package/lib/types/{RiskConfirmation.d.ts → client/RiskConfirmation.d.ts} +0 -0
  689. /package/lib/types/{SearchBlock.d.ts → client/SearchBlock.d.ts} +0 -0
  690. /package/lib/types/{SearchField.d.ts → client/SearchField.d.ts} +0 -0
  691. /package/lib/types/{SegmentedControl.d.ts → client/SegmentedControl.d.ts} +0 -0
  692. /package/lib/types/{SegmentedTabs.d.ts → client/SegmentedTabs.d.ts} +0 -0
  693. /package/lib/types/{ShortcutKeys.d.ts → client/ShortcutKeys.d.ts} +0 -0
  694. /package/lib/types/{SiteGlyph.d.ts → client/SiteGlyph.d.ts} +0 -0
  695. /package/lib/types/{StateDot.d.ts → client/StateDot.d.ts} +0 -0
  696. /package/lib/types/{SubmenuPanel.d.ts → client/SubmenuPanel.d.ts} +0 -0
  697. /package/lib/types/{Switch.d.ts → client/Switch.d.ts} +0 -0
  698. /package/lib/types/{Tag.d.ts → client/Tag.d.ts} +0 -0
  699. /package/lib/types/{TerminalBlock.d.ts → client/TerminalBlock.d.ts} +0 -0
  700. /package/lib/types/{TextShimmer.d.ts → client/TextShimmer.d.ts} +0 -0
  701. /package/lib/types/{Toast.d.ts → client/Toast.d.ts} +0 -0
  702. /package/lib/types/{Tooltip.d.ts → client/Tooltip.d.ts} +0 -0
  703. /package/lib/types/{UserMessageBubble.d.ts → client/UserMessageBubble.d.ts} +0 -0
  704. /package/lib/types/{WebBlock.d.ts → client/WebBlock.d.ts} +0 -0
  705. /package/lib/types/{ZoomControls.d.ts → client/ZoomControls.d.ts} +0 -0
  706. /package/lib/types/{ansi.d.ts → client/ansi.d.ts} +0 -0
  707. /package/lib/types/{clipboard.d.ts → client/clipboard.d.ts} +0 -0
  708. /package/lib/types/{code-file-icon-artwork.d.ts → client/code-file-icon-artwork.d.ts} +0 -0
  709. /package/lib/types/{code-file-types.d.ts → client/code-file-types.d.ts} +0 -0
  710. /package/lib/types/{code-highlighting.d.ts → client/code-highlighting.d.ts} +0 -0
  711. /package/lib/types/{darwin-desktop.d.ts → client/darwin-desktop.d.ts} +0 -0
  712. /package/lib/types/{document-zoom.d.ts → client/document-zoom.d.ts} +0 -0
  713. /package/lib/types/{file-drag-actions.d.ts → client/file-drag-actions.d.ts} +0 -0
  714. /package/lib/types/{file-size.d.ts → client/file-size.d.ts} +0 -0
  715. /package/lib/types/{focus.d.ts → client/focus.d.ts} +0 -0
  716. /package/lib/types/{guide-artwork.d.ts → client/guide-artwork.d.ts} +0 -0
  717. /package/lib/types/{head-tail-cap.d.ts → client/head-tail-cap.d.ts} +0 -0
  718. /package/lib/types/{icons → client/icons}/props.d.ts +0 -0
  719. /package/lib/types/{icons → client/icons}/shared-artwork.d.ts +0 -0
  720. /package/lib/types/{image-drag.d.ts → client/image-drag.d.ts} +0 -0
  721. /package/lib/types/{input-modality.d.ts → client/input-modality.d.ts} +0 -0
  722. /package/lib/types/{keyboard-composition.d.ts → client/keyboard-composition.d.ts} +0 -0
  723. /package/lib/types/{markdown → client/markdown}/CodeBlock.d.ts +0 -0
  724. /package/lib/types/{markdown → client/markdown}/FenceBlocks.d.ts +0 -0
  725. /package/lib/types/{markdown → client/markdown}/JsonBlock.d.ts +0 -0
  726. /package/lib/types/{markdown → client/markdown}/MarkdownDelegate.d.ts +0 -0
  727. /package/lib/types/{markdown → client/markdown}/MarkdownText.d.ts +0 -0
  728. /package/lib/types/{markdown → client/markdown}/cjkFriendlyStrong.d.ts +0 -0
  729. /package/lib/types/{markdown → client/markdown}/copy-tex.d.ts +0 -0
  730. /package/lib/types/{markdown → client/markdown}/diff-fence.d.ts +0 -0
  731. /package/lib/types/{markdown → client/markdown}/file-link.d.ts +0 -0
  732. /package/lib/types/{markdown → client/markdown}/highlight.d.ts +0 -0
  733. /package/lib/types/{markdown → client/markdown}/incremental.d.ts +0 -0
  734. /package/lib/types/{markdown → client/markdown}/katex.d.ts +0 -0
  735. /package/lib/types/{markdown → client/markdown}/local-image-syntax.d.ts +0 -0
  736. /package/lib/types/{markdown → client/markdown}/mathCompatibility.d.ts +0 -0
  737. /package/lib/types/{markdown → client/markdown}/parse.d.ts +0 -0
  738. /package/lib/types/{markdown → client/markdown}/plain-text.d.ts +0 -0
  739. /package/lib/types/{markdown → client/markdown}/quote-text.d.ts +0 -0
  740. /package/lib/types/{markdown → client/markdown}/render.d.ts +0 -0
  741. /package/lib/types/{markdown → client/markdown}/windows-path-destinations.d.ts +0 -0
  742. /package/lib/types/{menu-submenu-position.d.ts → client/menu-submenu-position.d.ts} +0 -0
  743. /package/lib/types/{overlay-top-margin.d.ts → client/overlay-top-margin.d.ts} +0 -0
  744. /package/lib/types/{plugin-artwork.d.ts → client/plugin-artwork.d.ts} +0 -0
  745. /package/lib/types/{pointer-grace.d.ts → client/pointer-grace.d.ts} +0 -0
  746. /package/lib/types/{relative-time.d.ts → client/relative-time.d.ts} +0 -0
  747. /package/lib/types/{settings-form → client/settings-form}/SettingsForm.d.ts +0 -0
  748. /package/lib/types/{settings-form → client/settings-form}/fields.d.ts +0 -0
  749. /package/lib/types/{settings-form → client/settings-form}/form-model.d.ts +0 -0
  750. /package/lib/types/{tooltip-placement.d.ts → client/tooltip-placement.d.ts} +0 -0
  751. /package/lib/types/{use-clipboard-copy.d.ts → client/use-clipboard-copy.d.ts} +0 -0
  752. /package/lib/types/{useDismissOnOutsidePointer.d.ts → client/useDismissOnOutsidePointer.d.ts} +0 -0
  753. /package/lib/types/{useModalLayer.d.ts → client/useModalLayer.d.ts} +0 -0
  754. /package/lib/types/{useRowDragPreview.d.ts → client/useRowDragPreview.d.ts} +0 -0
  755. /package/lib/types/{user-text.d.ts → client/user-text.d.ts} +0 -0
  756. /package/src/{AnimatedRows.module.css → client/AnimatedRows.module.css} +0 -0
  757. /package/src/{AnimatedRows.tsx → client/AnimatedRows.tsx} +0 -0
  758. /package/src/{BrandWordmark.tsx → client/BrandWordmark.tsx} +0 -0
  759. /package/src/{Button.module.css → client/Button.module.css} +0 -0
  760. /package/src/{Button.tsx → client/Button.tsx} +0 -0
  761. /package/src/{Checkbox.module.css → client/Checkbox.module.css} +0 -0
  762. /package/src/{Checkbox.tsx → client/Checkbox.tsx} +0 -0
  763. /package/src/{CodeCard.module.css → client/CodeCard.module.css} +0 -0
  764. /package/src/{CodeToolbar.tsx → client/CodeToolbar.tsx} +0 -0
  765. /package/src/{CommandText.module.css → client/CommandText.module.css} +0 -0
  766. /package/src/{CommandText.tsx → client/CommandText.tsx} +0 -0
  767. /package/src/{ConfigField.module.css → client/ConfigField.module.css} +0 -0
  768. /package/src/{ConfigField.tsx → client/ConfigField.tsx} +0 -0
  769. /package/src/{ConnectionIndicator.module.css → client/ConnectionIndicator.module.css} +0 -0
  770. /package/src/{ConnectionIndicator.tsx → client/ConnectionIndicator.tsx} +0 -0
  771. /package/src/{DetailDocument.module.css → client/DetailDocument.module.css} +0 -0
  772. /package/src/{DetailDocument.tsx → client/DetailDocument.tsx} +0 -0
  773. /package/src/{DiffBlock.module.css → client/DiffBlock.module.css} +0 -0
  774. /package/src/{DiffBlock.tsx → client/DiffBlock.tsx} +0 -0
  775. /package/src/{DisclosureRow.module.css → client/DisclosureRow.module.css} +0 -0
  776. /package/src/{DisclosureRow.tsx → client/DisclosureRow.tsx} +0 -0
  777. /package/src/{DraggableImage.tsx → client/DraggableImage.tsx} +0 -0
  778. /package/src/{FileTypeIcon.module.css → client/FileTypeIcon.module.css} +0 -0
  779. /package/src/{FileTypeIcon.tsx → client/FileTypeIcon.tsx} +0 -0
  780. /package/src/{FishLogo.tsx → client/FishLogo.tsx} +0 -0
  781. /package/src/{FoldToggle.tsx → client/FoldToggle.tsx} +0 -0
  782. /package/src/{HoverCard.module.css → client/HoverCard.module.css} +0 -0
  783. /package/src/{HoverCardGroup.tsx → client/HoverCardGroup.tsx} +0 -0
  784. /package/src/{ImageLightbox.module.css → client/ImageLightbox.module.css} +0 -0
  785. /package/src/{ImageLightbox.tsx → client/ImageLightbox.tsx} +0 -0
  786. /package/src/{ImagePreview.module.css → client/ImagePreview.module.css} +0 -0
  787. /package/src/{ImagePreview.tsx → client/ImagePreview.tsx} +0 -0
  788. /package/src/{InlineEditor.module.css → client/InlineEditor.module.css} +0 -0
  789. /package/src/{InlineEditor.tsx → client/InlineEditor.tsx} +0 -0
  790. /package/src/{Input.module.css → client/Input.module.css} +0 -0
  791. /package/src/{Input.tsx → client/Input.tsx} +0 -0
  792. /package/src/{JsonTree.module.css → client/JsonTree.module.css} +0 -0
  793. /package/src/{LinkIcon.tsx → client/LinkIcon.tsx} +0 -0
  794. /package/src/{Marquee.module.css → client/Marquee.module.css} +0 -0
  795. /package/src/{Marquee.tsx → client/Marquee.tsx} +0 -0
  796. /package/src/{MenuGroup.module.css → client/MenuGroup.module.css} +0 -0
  797. /package/src/{MenuGroup.tsx → client/MenuGroup.tsx} +0 -0
  798. /package/src/{MenuRow.tsx → client/MenuRow.tsx} +0 -0
  799. /package/src/{MenuSurface.module.css → client/MenuSurface.module.css} +0 -0
  800. /package/src/{Modal.module.css → client/Modal.module.css} +0 -0
  801. /package/src/{Modal.tsx → client/Modal.tsx} +0 -0
  802. /package/src/{PathLabel.module.css → client/PathLabel.module.css} +0 -0
  803. /package/src/{PathLabel.tsx → client/PathLabel.tsx} +0 -0
  804. /package/src/{PermissionIcon.tsx → client/PermissionIcon.tsx} +0 -0
  805. /package/src/{Pill.module.css → client/Pill.module.css} +0 -0
  806. /package/src/{Pill.tsx → client/Pill.tsx} +0 -0
  807. /package/src/{QuotePreview.module.css → client/QuotePreview.module.css} +0 -0
  808. /package/src/{ReadBlock.module.css → client/ReadBlock.module.css} +0 -0
  809. /package/src/{ReadBlock.tsx → client/ReadBlock.tsx} +0 -0
  810. /package/src/{ReferenceIcon.tsx → client/ReferenceIcon.tsx} +0 -0
  811. /package/src/{RiskConfirmation.tsx → client/RiskConfirmation.tsx} +0 -0
  812. /package/src/{RowDragPreview.module.css → client/RowDragPreview.module.css} +0 -0
  813. /package/src/{SearchBlock.module.css → client/SearchBlock.module.css} +0 -0
  814. /package/src/{SearchBlock.tsx → client/SearchBlock.tsx} +0 -0
  815. /package/src/{SearchField.module.css → client/SearchField.module.css} +0 -0
  816. /package/src/{SearchField.tsx → client/SearchField.tsx} +0 -0
  817. /package/src/{SegmentedControl.module.css → client/SegmentedControl.module.css} +0 -0
  818. /package/src/{SegmentedControl.tsx → client/SegmentedControl.tsx} +0 -0
  819. /package/src/{SegmentedTabs.module.css → client/SegmentedTabs.module.css} +0 -0
  820. /package/src/{SegmentedTabs.tsx → client/SegmentedTabs.tsx} +0 -0
  821. /package/src/{ShortcutKeys.module.css → client/ShortcutKeys.module.css} +0 -0
  822. /package/src/{ShortcutKeys.tsx → client/ShortcutKeys.tsx} +0 -0
  823. /package/src/{SiteGlyph.tsx → client/SiteGlyph.tsx} +0 -0
  824. /package/src/{StateDot.module.css → client/StateDot.module.css} +0 -0
  825. /package/src/{StateDot.tsx → client/StateDot.tsx} +0 -0
  826. /package/src/{SubmenuPanel.tsx → client/SubmenuPanel.tsx} +0 -0
  827. /package/src/{Switch.module.css → client/Switch.module.css} +0 -0
  828. /package/src/{Switch.tsx → client/Switch.tsx} +0 -0
  829. /package/src/{Tag.module.css → client/Tag.module.css} +0 -0
  830. /package/src/{Tag.tsx → client/Tag.tsx} +0 -0
  831. /package/src/{TerminalBlock.module.css → client/TerminalBlock.module.css} +0 -0
  832. /package/src/{TerminalBlock.tsx → client/TerminalBlock.tsx} +0 -0
  833. /package/src/{TextShimmer.module.css → client/TextShimmer.module.css} +0 -0
  834. /package/src/{Toast.module.css → client/Toast.module.css} +0 -0
  835. /package/src/{Toast.tsx → client/Toast.tsx} +0 -0
  836. /package/src/{Tooltip.module.css → client/Tooltip.module.css} +0 -0
  837. /package/src/{UserMessageBubble.module.css → client/UserMessageBubble.module.css} +0 -0
  838. /package/src/{UserMessageBubble.tsx → client/UserMessageBubble.tsx} +0 -0
  839. /package/src/{WebBlock.module.css → client/WebBlock.module.css} +0 -0
  840. /package/src/{WebBlock.tsx → client/WebBlock.tsx} +0 -0
  841. /package/src/{ZoomControls.module.css → client/ZoomControls.module.css} +0 -0
  842. /package/src/{ZoomControls.tsx → client/ZoomControls.tsx} +0 -0
  843. /package/src/{ansi.ts → client/ansi.ts} +0 -0
  844. /package/src/{clipboard.ts → client/clipboard.ts} +0 -0
  845. /package/src/{code-file-icon-artwork.manifest.json → client/code-file-icon-artwork.manifest.json} +0 -0
  846. /package/src/{code-file-icon-artwork.ts → client/code-file-icon-artwork.ts} +0 -0
  847. /package/src/{code-file-types.ts → client/code-file-types.ts} +0 -0
  848. /package/src/{code-highlighting.ts → client/code-highlighting.ts} +0 -0
  849. /package/src/{css-modules.d.ts → client/css-modules.d.ts} +0 -0
  850. /package/src/{darwin-desktop.ts → client/darwin-desktop.ts} +0 -0
  851. /package/src/{document-zoom.ts → client/document-zoom.ts} +0 -0
  852. /package/src/{file-drag-actions.ts → client/file-drag-actions.ts} +0 -0
  853. /package/src/{file-size.ts → client/file-size.ts} +0 -0
  854. /package/src/{focus.ts → client/focus.ts} +0 -0
  855. /package/src/{guide-artwork.tsx → client/guide-artwork.tsx} +0 -0
  856. /package/src/{head-tail-cap.ts → client/head-tail-cap.ts} +0 -0
  857. /package/src/{icons → client/icons}/props.ts +0 -0
  858. /package/src/{icons → client/icons}/shared-artwork.tsx +0 -0
  859. /package/src/{input-modality.ts → client/input-modality.ts} +0 -0
  860. /package/src/{keyboard-composition.ts → client/keyboard-composition.ts} +0 -0
  861. /package/src/{markdown → client/markdown}/CodeBlock.module.css +0 -0
  862. /package/src/{markdown → client/markdown}/CodeBlock.tsx +0 -0
  863. /package/src/{markdown → client/markdown}/FenceBlocks.tsx +0 -0
  864. /package/src/{markdown → client/markdown}/JsonBlock.module.css +0 -0
  865. /package/src/{markdown → client/markdown}/JsonBlock.tsx +0 -0
  866. /package/src/{markdown → client/markdown}/MarkdownDelegate.tsx +0 -0
  867. /package/src/{markdown → client/markdown}/MarkdownText.tsx +0 -0
  868. /package/src/{markdown → client/markdown}/cjkFriendlyStrong.ts +0 -0
  869. /package/src/{markdown → client/markdown}/copy-tex.ts +0 -0
  870. /package/src/{markdown → client/markdown}/diff-fence.ts +0 -0
  871. /package/src/{markdown → client/markdown}/file-link.ts +0 -0
  872. /package/src/{markdown → client/markdown}/highlight.ts +0 -0
  873. /package/src/{markdown → client/markdown}/incremental.ts +0 -0
  874. /package/src/{markdown → client/markdown}/katex.tsx +0 -0
  875. /package/src/{markdown → client/markdown}/local-image-syntax.ts +0 -0
  876. /package/src/{markdown → client/markdown}/mathCompatibility.ts +0 -0
  877. /package/src/{markdown → client/markdown}/parse.ts +0 -0
  878. /package/src/{markdown → client/markdown}/plain-text.ts +0 -0
  879. /package/src/{markdown → client/markdown}/quote-text.ts +0 -0
  880. /package/src/{markdown → client/markdown}/render.tsx +0 -0
  881. /package/src/{markdown → client/markdown}/windows-path-destinations.ts +0 -0
  882. /package/src/{menu-submenu-position.ts → client/menu-submenu-position.ts} +0 -0
  883. /package/src/{overlay-top-margin.ts → client/overlay-top-margin.ts} +0 -0
  884. /package/src/{pointer-grace.ts → client/pointer-grace.ts} +0 -0
  885. /package/src/{relative-time.ts → client/relative-time.ts} +0 -0
  886. /package/src/{settings-form → client/settings-form}/SettingsForm.module.css +0 -0
  887. /package/src/{settings-form → client/settings-form}/SettingsForm.tsx +0 -0
  888. /package/src/{settings-form → client/settings-form}/fields.module.css +0 -0
  889. /package/src/{settings-form → client/settings-form}/fields.tsx +0 -0
  890. /package/src/{settings-form → client/settings-form}/form-model.ts +0 -0
  891. /package/src/{tooltip-placement.ts → client/tooltip-placement.ts} +0 -0
  892. /package/src/{use-clipboard-copy.ts → client/use-clipboard-copy.ts} +0 -0
  893. /package/src/{useDismissOnOutsidePointer.ts → client/useDismissOnOutsidePointer.ts} +0 -0
  894. /package/src/{useModalLayer.ts → client/useModalLayer.ts} +0 -0
  895. /package/src/{useRowDragPreview.ts → client/useRowDragPreview.ts} +0 -0
  896. /package/src/{user-text.module.css → client/user-text.module.css} +0 -0
  897. /package/src/{user-text.tsx → client/user-text.tsx} +0 -0
package/src/JsonTree.tsx DELETED
@@ -1,850 +0,0 @@
1
- import clsx from 'clsx'
2
- import { useCallback, useEffect, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from 'react'
3
- import type {
4
- CSSProperties,
5
- KeyboardEvent as ReactKeyboardEvent,
6
- MouseEvent as ReactMouseEvent,
7
- ReactNode,
8
- } from 'react'
9
- import { IconCheckOutlineRegular, IconCopyOutlineRegular, IconWrapLinesOutlineRegular } from './icons/index.tsx'
10
- import { Menu } from './Menu.tsx'
11
- import type { MenuEntry } from './Menu.tsx'
12
- import css from './JsonTree.module.css'
13
-
14
- const OBJECT_PREVIEW_LIMIT = 4
15
- const ARRAY_PREVIEW_LIMIT = 5
16
- const PREVIEW_DEPTH_LIMIT = 2
17
-
18
- /**
19
- * Display copy for the tree's copy affordance; the owner passes localized
20
- * labels (this package is cordis-free, so copy arrives via props).
21
- */
22
- export interface JsonTreeLabels {
23
- /** Menu item: copy the raw primitive value. */
24
- copyValue: string
25
- /** Menu item: copy the value as compact JSON (primitive rows). */
26
- copyJson: string
27
- /** Menu item: copy the property path. */
28
- copyPath: string
29
- /** Menu item: copy the value as pretty-printed JSON. */
30
- copyPrettyJson: string
31
- /** Menu item: copy the value as compact JSON (object rows). */
32
- copyCompactJson: string
33
- /** Copy-button state label after a successful copy. */
34
- copied: string
35
- /** Copy-button state label after a failed copy. */
36
- copyFailed: string
37
- /** Expander aria label while expanded. */
38
- collapseNode: string
39
- /** Expander aria label while collapsed. */
40
- expandNode: string
41
- /** Copy-button tooltip, given the current action label. */
42
- copyButtonTitle: (action: string) => string
43
- }
44
-
45
- function valueCopyMenuItems(labels: JsonTreeLabels): readonly MenuEntry[] {
46
- return [
47
- { id: 'value', label: labels.copyValue },
48
- { id: 'json', label: labels.copyJson },
49
- { id: 'path', label: labels.copyPath },
50
- ]
51
- }
52
-
53
- function objectCopyMenuItems(labels: JsonTreeLabels): readonly MenuEntry[] {
54
- return [
55
- { id: 'prettyJson', label: labels.copyPrettyJson },
56
- { id: 'json', label: labels.copyCompactJson },
57
- { id: 'path', label: labels.copyPath },
58
- ]
59
- }
60
-
61
- type JsonPath = readonly (number | string)[]
62
-
63
- interface RowTarget {
64
- path: JsonPath
65
- value: unknown
66
- }
67
-
68
- type CopyMode = 'json' | 'path' | 'prettyJson' | 'value'
69
-
70
- interface CopySnapshot {
71
- id: string
72
- target: RowTarget
73
- state: 'idle' | 'copied' | 'failed'
74
- menuOpen: boolean
75
- }
76
-
77
- /** Notify only the old and new row actions; JSON values do not subscribe to hover state. */
78
- function createCopyStore() {
79
- let current: CopySnapshot | undefined
80
- const listeners = new Map<string, Set<() => void>>()
81
- return {
82
- get: () => current,
83
- set(next: CopySnapshot | undefined) {
84
- const previous = current?.id
85
- current = next
86
- for (const id of new Set([previous, next?.id])) {
87
- if (id === undefined) continue
88
- for (const listener of listeners.get(id) ?? []) listener()
89
- }
90
- },
91
- subscribe(id: string, listener: () => void) {
92
- let row = listeners.get(id)
93
- if (row === undefined) listeners.set(id, row = new Set())
94
- row.add(listener)
95
- return () => {
96
- row.delete(listener)
97
- if (row.size === 0) listeners.delete(id)
98
- }
99
- },
100
- }
101
- }
102
-
103
- function JsonCopyAction({ store, target, persistent, labels, onCopy, onClose }: {
104
- store: ReturnType<typeof createCopyStore>
105
- target: RowTarget
106
- persistent: boolean
107
- labels: JsonTreeLabels
108
- onCopy: (target: RowTarget, mode: CopyMode) => Promise<void>
109
- onClose: () => void
110
- }) {
111
- const id = pathId(target.path)
112
- const subscribe = useCallback((listener: () => void) => store.subscribe(id, listener), [id, store])
113
- const getSnapshot = () => {
114
- const current = store.get()
115
- return current?.id === id ? current : undefined
116
- }
117
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot)
118
- const buttonRef = useRef<HTMLButtonElement>(null)
119
- const state = snapshot?.state ?? 'idle'
120
- const object = typeof target.value === 'object' && target.value !== null
121
- const copyTitle = state === 'copied'
122
- ? labels.copied
123
- : state === 'failed'
124
- ? labels.copyFailed
125
- : object ? labels.copyPrettyJson : labels.copyValue
126
- return (
127
- <span className={css.copySlot}>
128
- {(persistent || snapshot !== undefined) && (
129
- <Menu
130
- open={snapshot?.menuOpen === true}
131
- compact
132
- portal
133
- align="end"
134
- anchor={(
135
- <button
136
- ref={buttonRef}
137
- type="button"
138
- className={css.actionButton}
139
- data-json-copy-button
140
- data-state={state}
141
- aria-label={copyTitle}
142
- title={labels.copyButtonTitle(copyTitle)}
143
- onClick={() => void onCopy(target, object ? 'prettyJson' : 'value')}
144
- onContextMenu={(event) => {
145
- event.preventDefault()
146
- event.stopPropagation()
147
- store.set({ id, target, state, menuOpen: true })
148
- }}
149
- >
150
- {state === 'copied'
151
- ? <IconCheckOutlineRegular size={12} />
152
- : <IconCopyOutlineRegular size={12} />}
153
- </button>
154
- )}
155
- items={object ? objectCopyMenuItems(labels) : valueCopyMenuItems(labels)}
156
- onSelect={(mode) => {
157
- void onCopy(target, mode as CopyMode)
158
- }}
159
- onClose={onClose}
160
- anchorRef={buttonRef}
161
- />
162
- )}
163
- </span>
164
- )
165
- }
166
-
167
- function isExpandableValue(value: unknown): value is object | unknown[] {
168
- return typeof value === 'object' && value !== null && !(value instanceof Date)
169
- }
170
-
171
- function entriesOf(value: object | unknown[]): readonly (readonly [string, unknown])[] {
172
- if (Array.isArray(value)) {
173
- return value.map((item, index) => [String(index), item] as const)
174
- }
175
- return Object.keys(value).map(key => [
176
- key,
177
- (value as Record<string, unknown>)[key],
178
- ] as const)
179
- }
180
-
181
- function bracketOf(value: object | unknown[]): readonly [string, string] {
182
- return Array.isArray(value) ? ['[', ']'] : ['{', '}']
183
- }
184
-
185
- function previewPrimitive(value: unknown): ReactNode {
186
- if (value === null) return <span className={css.keywordValue}>null</span>
187
- if (typeof value === 'string') {
188
- return <span className={css.stringValue}>{JSON.stringify(value)}</span>
189
- }
190
- if (typeof value === 'number') {
191
- return <span className={css.numberValue}>{String(value)}</span>
192
- }
193
- if (typeof value === 'boolean') {
194
- return <span className={css.keywordValue}>{String(value)}</span>
195
- }
196
- if (typeof value === 'bigint') {
197
- return <span className={css.otherValue}>{value.toString()}</span>
198
- }
199
- if (typeof value === 'undefined') {
200
- return <span className={css.otherValue}>undefined</span>
201
- }
202
- if (typeof value === 'symbol') {
203
- return <span className={css.otherValue}>{value.description ?? 'Symbol'}</span>
204
- }
205
- if (typeof value === 'function') {
206
- return <span className={css.otherValue}>{value.name || 'Function'}</span>
207
- }
208
- return null
209
- }
210
-
211
- function previewValue(value: unknown, depth: number): ReactNode {
212
- if (!isExpandableValue(value)) return previewPrimitive(value)
213
-
214
- const array = Array.isArray(value)
215
- const entries = entriesOf(value)
216
- const limit = array ? ARRAY_PREVIEW_LIMIT : OBJECT_PREVIEW_LIMIT
217
- const visible = entries.slice(0, limit)
218
- const [open, close] = bracketOf(value)
219
-
220
- return (
221
- <>
222
- <span className={css.punctuation}>{open}</span>
223
- {depth >= PREVIEW_DEPTH_LIMIT
224
- ? <span className={css.previewEllipsis}>…</span>
225
- : visible.map(([key, item], index) => (
226
- <span key={key}>
227
- {index > 0 && <span className={css.punctuation}>, </span>}
228
- {!array && (
229
- <>
230
- <span className={css.previewProperty}>{key}</span>
231
- <span className={css.punctuation}>: </span>
232
- </>
233
- )}
234
- {previewValue(item, depth + 1)}
235
- </span>
236
- ))}
237
- {depth < PREVIEW_DEPTH_LIMIT && entries.length > limit && (
238
- <span className={css.previewEllipsis}>, …</span>
239
- )}
240
- <span className={css.punctuation}>{close}</span>
241
- </>
242
- )
243
- }
244
-
245
- function primitiveValue(value: unknown): ReactNode {
246
- if (value === null) return <span className={css.keywordValue}>null</span>
247
- if (typeof value === 'string') {
248
- return <span className={css.stringValue}>{JSON.stringify(value)}</span>
249
- }
250
- if (typeof value === 'boolean') {
251
- return <span className={css.keywordValue}>{String(value)}</span>
252
- }
253
- if (typeof value === 'number') {
254
- return <span className={css.numberValue}>{String(value)}</span>
255
- }
256
- if (typeof value === 'bigint') {
257
- return <span className={css.numberValue}>{`${value.toString()}n`}</span>
258
- }
259
- if (value instanceof Date) {
260
- return <span className={css.otherValue}>{value.toISOString()}</span>
261
- }
262
- if (typeof value === 'function') {
263
- return <span className={css.otherValue}>function() {'{ }'}</span>
264
- }
265
- if (typeof value === 'undefined') {
266
- return <span className={css.otherValue}>undefined</span>
267
- }
268
- return <span className={css.otherValue}>{(value as symbol).toString()}</span>
269
- }
270
-
271
- function fieldText(field: string): string {
272
- return field === '' ? '""' : field
273
- }
274
-
275
- function pathId(path: JsonPath): string {
276
- return path.map(part => (
277
- typeof part === 'number' ? `n${String(part)}` : `s${String(part.length)}:${part}`
278
- )).join('/')
279
- }
280
-
281
- function claimFocus(button: HTMLElement): void {
282
- button.focus()
283
- }
284
-
285
- function moveFocus(button: HTMLElement, direction: -1 | 1): void {
286
- const tree = button.closest<HTMLElement>('[role="tree"]')
287
- /* v8 ignore next -- JsonTree attaches expander handlers only beneath its owning role=tree. */
288
- if (tree === null) return
289
- const expanders = Array.from(tree.querySelectorAll<HTMLElement>('[data-json-expander]'))
290
- const current = expanders.indexOf(button)
291
- /* v8 ignore next -- the current expander is a member of the queried non-empty set. */
292
- if (current < 0 || expanders.length === 0) return
293
- const next = (current + direction + expanders.length) % expanders.length
294
- const nextExpander = expanders[next]
295
- /* v8 ignore next -- modulo over the non-empty expander set always resolves a member. */
296
- if (nextExpander !== undefined) claimFocus(nextExpander)
297
- }
298
-
299
- function NodeField({
300
- field,
301
- expandable,
302
- onToggle,
303
- }: {
304
- field: string | undefined
305
- expandable: boolean
306
- onToggle: () => void
307
- }) {
308
- if (field === undefined) return null
309
- return (
310
- <span
311
- className={clsx(css.label, expandable && css.clickableLabel)}
312
- onClick={expandable ? onToggle : undefined}
313
- >
314
- {fieldText(field)}:
315
- </span>
316
- )
317
- }
318
-
319
- interface JsonTreeNodeProps {
320
- collapsedStringLines: number
321
- stringWrapping: JsonTreeProps['stringWrapping']
322
- field?: string
323
- initialExpanded: boolean
324
- labels: JsonTreeLabels
325
- lastElement: boolean
326
- onClaimTabStop: (id: string) => void
327
- onRowHover: (row: HTMLElement, target: RowTarget) => void
328
- path: JsonPath
329
- renderCopy: ((target: RowTarget, persistent?: boolean) => ReactNode) | undefined
330
- tabStopId: string | null
331
- value: unknown
332
- }
333
-
334
- function JsonString({
335
- collapsedStringLines,
336
- stringWrapping,
337
- field,
338
- labels,
339
- lastElement,
340
- renderCopy,
341
- value,
342
- }: {
343
- collapsedStringLines: number
344
- stringWrapping: JsonTreeProps['stringWrapping']
345
- field: string | undefined
346
- labels: JsonTreeLabels
347
- lastElement: boolean
348
- renderCopy: ((persistent?: boolean) => ReactNode) | undefined
349
- value: string
350
- }) {
351
- const contentsId = useId()
352
- const contentRef = useRef<HTMLSpanElement>(null)
353
- const rawRef = useRef<HTMLPreElement>(null)
354
- const [expanded, setExpanded] = useState(false)
355
- const [wrapped, setWrapped] = useState(false)
356
- const [truncated, setTruncated] = useState(false)
357
-
358
- useLayoutEffect(() => {
359
- if (expanded) return
360
- const content = contentRef.current as HTMLSpanElement
361
- const measure = () => {
362
- const lineHeight = Number.parseFloat(getComputedStyle(content).lineHeight)
363
- setTruncated(content.scrollHeight > lineHeight * collapsedStringLines)
364
- }
365
- measure()
366
- if (typeof ResizeObserver === 'undefined') return
367
- const observer = new ResizeObserver(measure)
368
- observer.observe(content)
369
- return () => { observer.disconnect() }
370
- }, [collapsedStringLines, expanded, field, lastElement, value])
371
-
372
- useLayoutEffect(() => {
373
- if (!expanded) return
374
- const raw = rawRef.current as HTMLPreElement
375
- // Keep raw text within the window and clipping ancestors outside the tree.
376
- // Capture scrolling because an ancestor can move the string without resizing it.
377
- const clips: HTMLElement[] = []
378
- const tree = raw.closest<HTMLElement>(`.${css.root}`) as HTMLElement
379
- for (let parent = tree.parentElement; parent !== null; parent = parent.parentElement) {
380
- if (/auto|scroll|hidden|clip/.test(getComputedStyle(parent).overflowY)) clips.push(parent)
381
- }
382
- const measure = () => {
383
- let top = 0
384
- let bottom = window.innerHeight
385
- for (const clip of clips) {
386
- const rect = clip.getBoundingClientRect()
387
- const style = getComputedStyle(clip)
388
- top = Math.max(top, rect.top + clip.clientTop)
389
- bottom = Math.min(bottom, rect.top + clip.clientTop + clip.clientHeight
390
- - Number.parseFloat(style.paddingBottom))
391
- }
392
- const available = bottom - Math.max(top, raw.getBoundingClientRect().top)
393
- raw.style.maxHeight = `${Math.max(16, available - 4)}px`
394
- }
395
- measure()
396
- const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(measure)
397
- observer?.observe(raw)
398
- for (const clip of clips) observer?.observe(clip)
399
- window.addEventListener('resize', measure)
400
- window.addEventListener('scroll', measure, true)
401
- return () => {
402
- observer?.disconnect()
403
- window.removeEventListener('resize', measure)
404
- window.removeEventListener('scroll', measure, true)
405
- }
406
- }, [expanded, value])
407
-
408
- if (expanded) {
409
- const fieldId = `${contentsId}-field`
410
- return (
411
- <div className={css.stringField} data-expanded>
412
- {field !== undefined && <span id={fieldId} className={css.label}>{fieldText(field)}:</span>}
413
- <pre
414
- ref={rawRef}
415
- id={contentsId}
416
- className={css.stringRaw}
417
- data-wrap={wrapped}
418
- tabIndex={0}
419
- aria-labelledby={field === undefined ? undefined : fieldId}
420
- >
421
- {value}
422
- </pre>
423
- {!lastElement && <span className={css.punctuation}>,</span>}
424
- <div className={css.stringActions}>
425
- {stringWrapping !== undefined && (
426
- <button
427
- type="button"
428
- className={css.actionButton}
429
- aria-label={stringWrapping.label}
430
- title={stringWrapping.label}
431
- aria-pressed={wrapped}
432
- aria-controls={contentsId}
433
- onClick={() => {
434
- const next = !wrapped
435
- setWrapped(next)
436
- stringWrapping.setDefault(next)
437
- }}
438
- >
439
- <IconWrapLinesOutlineRegular size={12} />
440
- </button>
441
- )}
442
- <button
443
- type="button"
444
- className={css.actionButton}
445
- aria-label={labels.collapseNode}
446
- title={labels.collapseNode}
447
- aria-expanded
448
- aria-controls={contentsId}
449
- onClick={() => { setExpanded(false) }}
450
- >
451
- <svg
452
- width="12"
453
- height="12"
454
- viewBox="0 0 16 16"
455
- fill="none"
456
- stroke="currentColor"
457
- aria-hidden="true"
458
- >
459
- <path d="M9.5 1.5V6.5H14.5M1.5 9.5H6.5V14.5" />
460
- </svg>
461
- </button>
462
- {renderCopy?.(true)}
463
- </div>
464
- </div>
465
- )
466
- }
467
-
468
- return (
469
- <>
470
- {renderCopy?.()}
471
- <span className={css.stringField} data-expanded={expanded}>
472
- <span ref={contentRef} id={contentsId} className={css.stringText}>
473
- {truncated && (
474
- <span className={css.stringToggleSlot}>
475
- <button
476
- type="button"
477
- className={css.stringToggle}
478
- aria-label={labels.expandNode}
479
- aria-expanded={false}
480
- aria-controls={contentsId}
481
- onClick={() => {
482
- setWrapped(stringWrapping?.getDefault() ?? false)
483
- setExpanded(true)
484
- }}
485
- >
486
- <span aria-hidden="true">…</span>{labels.expandNode}
487
- </button>
488
- </span>
489
- )}
490
- {field !== undefined && <span className={css.label}>{fieldText(field)}:</span>}
491
- {primitiveValue(value)}
492
- {!lastElement && <span className={css.punctuation}>,</span>}
493
- </span>
494
- </span>
495
- </>
496
- )
497
- }
498
-
499
- function JsonTreeNode({
500
- collapsedStringLines,
501
- stringWrapping,
502
- field,
503
- initialExpanded,
504
- labels,
505
- lastElement,
506
- onClaimTabStop,
507
- onRowHover,
508
- path,
509
- renderCopy,
510
- tabStopId,
511
- value,
512
- }: JsonTreeNodeProps) {
513
- const contentsId = useId()
514
- const expanderRef = useRef<HTMLSpanElement>(null)
515
- const [expanded, setExpanded] = useState(initialExpanded)
516
- const nodeId = pathId(path)
517
- const container = isExpandableValue(value)
518
- const entries = container ? entriesOf(value) : []
519
- const expandable = entries.length > 0
520
-
521
- const toggle = () => {
522
- setExpanded(current => !current)
523
- claimFocus(expanderRef.current as HTMLSpanElement)
524
- }
525
-
526
- const onExpanderKeyDown = (event: ReactKeyboardEvent<HTMLSpanElement>) => {
527
- if (event.key === 'ArrowRight' || event.key === 'ArrowLeft') {
528
- event.preventDefault()
529
- setExpanded(event.key === 'ArrowRight')
530
- return
531
- }
532
- if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
533
- event.preventDefault()
534
- moveFocus(event.currentTarget, event.key === 'ArrowUp' ? -1 : 1)
535
- }
536
- }
537
-
538
- const row = (children: ReactNode, ariaExpanded?: boolean) => (
539
- <div
540
- className={css.row}
541
- role="treeitem"
542
- aria-expanded={ariaExpanded}
543
- onMouseOver={(event) => {
544
- event.stopPropagation()
545
- onRowHover(event.currentTarget, { path, value })
546
- }}
547
- >
548
- {typeof value !== 'string' && renderCopy?.({ path, value })}
549
- {children}
550
- </div>
551
- )
552
-
553
- if (typeof value === 'string') {
554
- return row(
555
- <JsonString
556
- collapsedStringLines={collapsedStringLines}
557
- stringWrapping={stringWrapping}
558
- field={field}
559
- value={value}
560
- labels={labels}
561
- lastElement={lastElement}
562
- renderCopy={renderCopy === undefined ? undefined : persistent => renderCopy({ path, value }, persistent)}
563
- />,
564
- )
565
- }
566
-
567
- if (!container) {
568
- return row((
569
- <>
570
- <NodeField field={field} expandable={false} onToggle={toggle} />
571
- {primitiveValue(value)}
572
- {!lastElement && <span className={css.punctuation}>,</span>}
573
- </>
574
- ))
575
- }
576
-
577
- const [open, close] = bracketOf(value)
578
- if (!expandable) {
579
- return row((
580
- <>
581
- <NodeField field={field} expandable={false} onToggle={toggle} />
582
- <span className={css.punctuation}>{open}</span>
583
- <span className={css.punctuation}>{close}</span>
584
- {!lastElement && <span className={css.punctuation}>,</span>}
585
- </>
586
- ))
587
- }
588
-
589
- return row((
590
- <>
591
- <span
592
- ref={expanderRef}
593
- className={clsx(css.expander, expanded ? css.collapseIcon : css.expandIcon)}
594
- data-json-expander
595
- role="button"
596
- aria-label={expanded ? labels.collapseNode : labels.expandNode}
597
- aria-expanded={expanded}
598
- aria-controls={expanded ? contentsId : undefined}
599
- tabIndex={tabStopId === nodeId ? 0 : -1}
600
- onFocus={() => { onClaimTabStop(nodeId) }}
601
- onClick={toggle}
602
- onKeyDown={onExpanderKeyDown}
603
- />
604
- <span className={css.summary}>
605
- <NodeField field={field} expandable onToggle={toggle} />
606
- <span className={css.preview}>{previewValue(value, 0)}</span>
607
- {!lastElement && <span className={css.punctuation}>,</span>}
608
- </span>
609
- {expanded && (
610
- <ul id={contentsId} role="group" className={css.children}>
611
- {entries.map(([key, item], index) => (
612
- <JsonTreeNode
613
- key={key}
614
- collapsedStringLines={collapsedStringLines}
615
- stringWrapping={stringWrapping}
616
- field={key}
617
- value={item}
618
- path={[...path, Array.isArray(value) ? index : key]}
619
- labels={labels}
620
- lastElement={index === entries.length - 1}
621
- initialExpanded={false}
622
- tabStopId={tabStopId}
623
- onClaimTabStop={onClaimTabStop}
624
- onRowHover={onRowHover}
625
- renderCopy={renderCopy}
626
- />
627
- ))}
628
- </ul>
629
- )}
630
- </>
631
- ), expanded)
632
- }
633
-
634
- function formattedPath(path: JsonPath): string {
635
- return path.reduce<string>((result, part) => {
636
- if (typeof part === 'number') return `${result}[${String(part)}]`
637
- return /^[A-Za-z_$][\w$]*$/.test(part)
638
- ? `${result}.${part}`
639
- : `${result}[${JSON.stringify(part)}]`
640
- }, '$')
641
- }
642
-
643
- function copyText(target: RowTarget, mode: CopyMode): string {
644
- if (mode === 'path') return formattedPath(target.path)
645
- if (mode === 'prettyJson') return JSON.stringify(target.value, null, 2)
646
- if (mode === 'json') return JSON.stringify(target.value)
647
- if (typeof target.value === 'string') return target.value
648
- if (typeof target.value === 'undefined') return 'undefined'
649
- if (typeof target.value === 'bigint') return target.value.toString()
650
- if (typeof target.value === 'symbol') return target.value.description ?? 'Symbol'
651
- if (typeof target.value === 'function') return target.value.name || 'Function'
652
- return JSON.stringify(target.value)
653
- }
654
-
655
- /** Props for the read-only, token-themed JSON tree. */
656
- export interface JsonTreeProps {
657
- /** Parsed JSON object or array. */
658
- data: object | unknown[]
659
- /** Accessible label for the tree. */
660
- label: string
661
- /** Optional positioning class owned by the caller. */
662
- className?: string | undefined
663
- /** Maximum visible lines per collapsed string; defaults to 3. */
664
- collapsedStringLines?: number
665
- /** Optional wrap toggle; each expansion reads the shared default without changing other open strings. */
666
- stringWrapping?: {
667
- /** Localized label for the wrapping toggle. */
668
- label: string
669
- /** Read the wrapping preference when a string is expanded. @returns Whether to wrap long lines. */
670
- getDefault: () => boolean
671
- /** Remember a user toggle for future expansions. @param wrapped - Whether to wrap long lines. */
672
- setDefault: (wrapped: boolean) => void
673
- } | undefined
674
- /** Whether JSON rows expose copy actions. */
675
- copyable?: boolean
676
- /** Whether the top-level object or array is always expanded. */
677
- expandTopLevel?: boolean
678
- /** Localized display copy supplied by the owning render site. */
679
- labels: JsonTreeLabels
680
- }
681
-
682
- /**
683
- * Render parsed JSON as a compact, keyboard-accessible inspector tree.
684
- * @param props - Parsed data, accessible label, and display options.
685
- * @returns A read-only JSON tree with an optionally fixed-open top level.
686
- */
687
- export function JsonTree({
688
- data,
689
- label,
690
- className,
691
- collapsedStringLines = 3,
692
- stringWrapping,
693
- copyable = true,
694
- expandTopLevel = true,
695
- labels,
696
- }: JsonTreeProps) {
697
- const rootEntries = entriesOf(data)
698
- const firstExpandableIndex = rootEntries.findIndex(([, value]) => (
699
- isExpandableValue(value) && entriesOf(value).length > 0
700
- ))
701
- const firstExpandableEntry = rootEntries[firstExpandableIndex]
702
- const initialTabStopId = expandTopLevel
703
- ? firstExpandableEntry === undefined
704
- ? null
705
- : pathId([Array.isArray(data) ? firstExpandableIndex : firstExpandableEntry[0]])
706
- : isExpandableValue(data) && rootEntries.length > 0 ? pathId([]) : null
707
- const activeRowRef = useRef<HTMLElement>()
708
- const resetTimer = useRef<ReturnType<typeof setTimeout>>()
709
- const copySequence = useRef(0)
710
- const [copyStore] = useState(createCopyStore)
711
- const [tabStopId, setTabStopId] = useState<string | null>(initialTabStopId)
712
-
713
- const setActiveRow = (row: HTMLElement | undefined) => {
714
- activeRowRef.current?.removeAttribute('data-json-copy-active')
715
- activeRowRef.current = row
716
- row?.setAttribute('data-json-copy-active', '')
717
- }
718
-
719
- const clearCopyTarget = () => {
720
- copySequence.current += 1
721
- if (resetTimer.current !== undefined) clearTimeout(resetTimer.current)
722
- setActiveRow(undefined)
723
- copyStore.set(undefined)
724
- }
725
-
726
- useEffect(() => () => {
727
- copySequence.current += 1
728
- if (resetTimer.current !== undefined) clearTimeout(resetTimer.current)
729
- activeRowRef.current?.removeAttribute('data-json-copy-active')
730
- }, [])
731
-
732
- useEffect(() => {
733
- clearCopyTarget()
734
- setTabStopId(initialTabStopId)
735
- }, [data, expandTopLevel, initialTabStopId])
736
-
737
- const handleRowHover = (row: HTMLElement, target: RowTarget) => {
738
- if (!copyable || copyStore.get()?.menuOpen) return
739
- if (activeRowRef.current === row) return
740
- setActiveRow(row)
741
- copyStore.set({ id: pathId(target.path), target, state: 'idle', menuOpen: false })
742
- }
743
-
744
- const handleRootMouseOver = (event: ReactMouseEvent<HTMLDivElement>) => {
745
- if (!copyable || copyStore.get()?.menuOpen) return
746
- /* v8 ignore next -- browser mouse events delivered through React target an Element. */
747
- if (!(event.target instanceof Element)) return
748
- if (event.target.closest('[data-json-copy-button]') === null) clearCopyTarget()
749
- }
750
-
751
- const copy = async (target: RowTarget, mode: CopyMode) => {
752
- const sequence = ++copySequence.current
753
- const snapshot: CopySnapshot = {
754
- id: pathId(target.path), target, state: 'idle', menuOpen: false,
755
- }
756
- copyStore.set(snapshot)
757
- let state: CopySnapshot['state']
758
- try {
759
- await navigator.clipboard.writeText(copyText(target, mode))
760
- state = 'copied'
761
- } catch {
762
- state = 'failed'
763
- }
764
- const current = copyStore.get()
765
- if (sequence !== copySequence.current || current?.target !== target) return
766
- copyStore.set({ ...current, state })
767
- if (resetTimer.current !== undefined) clearTimeout(resetTimer.current)
768
- resetTimer.current = setTimeout(() => {
769
- const current = copyStore.get()
770
- if (current?.target === target) copyStore.set({ ...current, state: 'idle' })
771
- }, 1_500)
772
- }
773
-
774
- const [rootOpen, rootClose] = bracketOf(data)
775
- const renderCopy = copyable ? (target: RowTarget, persistent = false) => (
776
- <JsonCopyAction store={copyStore} target={target} persistent={persistent} labels={labels}
777
- onCopy={copy} onClose={clearCopyTarget} />
778
- ) : undefined
779
-
780
- return (
781
- <div
782
- className={clsx(css.root, className)}
783
- style={{ '--json-tree-collapsed-lines': collapsedStringLines } as CSSProperties}
784
- onMouseOver={handleRootMouseOver}
785
- onMouseLeave={() => {
786
- if (!copyStore.get()?.menuOpen) clearCopyTarget()
787
- }}
788
- >
789
- {expandTopLevel
790
- ? (
791
- <div className={css.expandedTopLevel}>
792
- <div
793
- className={clsx(css.row, css.topLevelBracket)}
794
- data-json-root-row
795
- onMouseOver={(event) => {
796
- event.stopPropagation()
797
- handleRowHover(event.currentTarget, { path: [], value: data })
798
- }}
799
- >
800
- {renderCopy?.({ path: [], value: data })}
801
- <span className={css.punctuation}>{rootOpen}</span>
802
- </div>
803
- <div
804
- aria-label={label}
805
- className={clsx(css.container, css.expandedTopLevelContainer)}
806
- role="tree"
807
- >
808
- {rootEntries.map(([key, value], index) => (
809
- <JsonTreeNode
810
- key={key}
811
- collapsedStringLines={collapsedStringLines}
812
- stringWrapping={stringWrapping}
813
- field={key}
814
- value={value}
815
- path={[Array.isArray(data) ? index : key]}
816
- labels={labels}
817
- lastElement={index === rootEntries.length - 1}
818
- initialExpanded={false}
819
- tabStopId={tabStopId}
820
- onClaimTabStop={setTabStopId}
821
- onRowHover={handleRowHover}
822
- renderCopy={renderCopy}
823
- />
824
- ))}
825
- </div>
826
- <div className={clsx(css.row, css.topLevelBracket)}>
827
- <span className={css.punctuation}>{rootClose}</span>
828
- </div>
829
- </div>
830
- )
831
- : (
832
- <div aria-label={label} className={css.container} role="tree">
833
- <JsonTreeNode
834
- collapsedStringLines={collapsedStringLines}
835
- stringWrapping={stringWrapping}
836
- value={data}
837
- path={[]}
838
- labels={labels}
839
- lastElement
840
- initialExpanded
841
- tabStopId={tabStopId}
842
- onClaimTabStop={setTabStopId}
843
- onRowHover={handleRowHover}
844
- renderCopy={renderCopy}
845
- />
846
- </div>
847
- )}
848
- </div>
849
- )
850
- }