@marimo-team/frontend 0.15.5 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-Cn5-l2X1.js → ConnectedDataExplorerComponent-BErMbWvG.js} +1 -1
  2. package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-fTHv1Ih0.js} +1 -1
  3. package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-Bdi-TyfY.js} +6 -6
  4. package/dist/assets/_baseEach-CNBxBxvS.js +1 -0
  5. package/dist/assets/_baseMap-D1WHjKrd.js +1 -0
  6. package/dist/assets/_baseUniq-CCgDNtZb.js +1 -0
  7. package/dist/assets/_createAggregator-DcD0kTA5.js +1 -0
  8. package/dist/assets/agent-panel-Crv430aI.js +268 -0
  9. package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
  10. package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-CQh552Wu.js} +1 -1
  11. package/dist/assets/architectureDiagram-W76B3OCA-BAJeBxzt.js +36 -0
  12. package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-Boxgxbt_.js} +1 -1
  13. package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-CL-1svEK.js} +1 -1
  14. package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-BbEqbCTl.js} +5 -5
  15. package/dist/assets/channel-_2eNSz0n.js +1 -0
  16. package/dist/assets/chat-panel-CXh5Wl6C.js +3 -0
  17. package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-C--8TXeE.js} +1 -1
  18. package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-Bj00HDqq.js} +1 -1
  19. package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-C-lhB6hN.js} +1 -1
  20. package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-B-pGTXPt.js} +1 -1
  21. package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-DqUzGhvm.js} +1 -1
  22. package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-TntJHfSk.js} +1 -1
  23. package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-HUJb1psV.js} +1 -1
  24. package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BK3C__t3.js} +1 -1
  25. package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-DBLOv1Yu.js} +1 -1
  26. package/dist/assets/classDiagram-KNZD7YFC-BGmh9POF.js +1 -0
  27. package/dist/assets/classDiagram-v2-RKCZMP56-BGmh9POF.js +1 -0
  28. package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-BeoFbEKH.js} +1 -1
  29. package/dist/assets/clone-BFDSPAj3.js +1 -0
  30. package/dist/assets/command-palette-CXZiSv0I.js +1 -0
  31. package/dist/assets/common-C7oJcmCT.js +1 -0
  32. package/dist/assets/{compile-Ct_jzdKr.js → compile-7L0MwhyI.js} +1 -1
  33. package/dist/assets/cose-bilkent-S5V4N54A-BMkGLcVC.js +1 -0
  34. package/dist/assets/dagre-5GWH7T2D-BJtRienS.js +4 -0
  35. package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-DBkmGtNs.js} +1 -1
  36. package/dist/assets/datasources-panel-B7FbYLiy.js +1 -0
  37. package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-DEdOxp2X.js} +4 -4
  38. package/dist/assets/diagram-N5W7TBWH-CmECY3nb.js +24 -0
  39. package/dist/assets/diagram-QEK2KX5R-DMOVSNKD.js +43 -0
  40. package/dist/assets/diagram-S2PKOQOG-BiJ96PNQ.js +24 -0
  41. package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-xULhaEv3.js} +1 -1
  42. package/dist/assets/edit-page-BrYda9VE.js +129 -0
  43. package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-BBqXIlc2.js} +1 -1
  44. package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-B3dA3G5P.js} +1 -1
  45. package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-MP1DiFRo.js} +1 -1
  46. package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Cc1sv-Ag.js} +1 -1
  47. package/dist/assets/file-explorer-panel-Bw59Kva1.js +1 -0
  48. package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-BX7caPp7.js} +1 -1
  49. package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-B462g4Yf.js} +3 -3
  50. package/dist/assets/gitGraphDiagram-NY62KEGX-CGgvZ9-9.js +65 -0
  51. package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-C0gUFZON.js} +4 -4
  52. package/dist/assets/graph-CHRVBzY5.js +1 -0
  53. package/dist/assets/{home-page-9eW6qida.js → home-page-Fb2osjys.js} +3 -3
  54. package/dist/assets/{index-DMomwMcN.js → index-BVgAenPd.js} +1 -1
  55. package/dist/assets/{index-B8llrTSo.js → index-BY93Ejhl.js} +1 -1
  56. package/dist/assets/{index-BFSnz7iM.js → index-C-8WADat.js} +1 -1
  57. package/dist/assets/{index-CPN7TRA1.js → index-C-GhZ7ti.js} +1 -1
  58. package/dist/assets/{index-DyLSuOH1.js → index-C1v_Z9et.js} +1 -1
  59. package/dist/assets/{index-VPWqq2Pg.js → index-C4Tn5NvJ.js} +1 -1
  60. package/dist/assets/{index-BAH034Ue.js → index-C77h_TXN.js} +1 -1
  61. package/dist/assets/{index-Dt9UWeWn.js → index-CQDrxQ0j.js} +1 -1
  62. package/dist/assets/{index-DWOaniGT.js → index-CWMgowgL.js} +1 -1
  63. package/dist/assets/{index-B1_GXGaP.js → index-Clbi_Yaq.js} +1 -1
  64. package/dist/assets/{index-B7yXbrLa.js → index-CpTPJo4k.js} +1 -1
  65. package/dist/assets/{index-CknhX2Vy.css → index-Cx0bsY1w.css} +1 -1
  66. package/dist/assets/{index-DqzMPAC8.js → index-D1vmG6DS.js} +2 -2
  67. package/dist/assets/{index-c6If577Q.js → index-D9UKkrr2.js} +1 -1
  68. package/dist/assets/{index-CB2pnVQG.js → index-DEQvTChO.js} +1 -1
  69. package/dist/assets/{index-OC46250R.js → index-DKEudB02.js} +205 -197
  70. package/dist/assets/{index-CSgxTUzD.js → index-DRMm6SNo.js} +1 -1
  71. package/dist/assets/{index-Bq516OmX.js → index-DoRmcrKM.js} +1 -1
  72. package/dist/assets/{index-DSU75csX.js → index-lYa_leQE.js} +1 -1
  73. package/dist/assets/{index-BLu5CX6z.js → index-vmICa5KN.js} +1 -1
  74. package/dist/assets/{index-uacyUula.js → index-z9bohSQJ.js} +1 -1
  75. package/dist/assets/infoDiagram-STP46IZ2-CVyrdLc8.js +2 -0
  76. package/dist/assets/isEmpty-DU_ogP_D.js +1 -0
  77. package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-C6EgLP_Q.js} +1 -1
  78. package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-BXzYO1yj.js} +4 -4
  79. package/dist/assets/layout-jihVw5-i.js +1 -0
  80. package/dist/assets/linear-C4blANlC.js +1 -0
  81. package/dist/assets/{links-CbvGxbsJ.js → links-D59GIweI.js} +3 -3
  82. package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-D401qzZh.js} +1 -1
  83. package/dist/assets/markdown-renderer-Cd9eYyaL.js +263 -0
  84. package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
  85. package/dist/assets/mermaid-BEVuRz_O.js +1 -0
  86. package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-CaSnaLH0.js} +41 -41
  87. package/dist/assets/min-DUMu_zeK.js +1 -0
  88. package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-BXUM5MT2.js} +2 -2
  89. package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-4uWXGlPG.js} +1 -1
  90. package/dist/assets/{outline-panel-uvsS-YEQ.js → outline-panel-DIzkvm2I.js} +1 -1
  91. package/dist/assets/packages-panel-CJL0MVlj.js +1 -0
  92. package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-Dxt5PVNo.js} +3 -3
  93. package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-D4pUaA31.js} +1 -1
  94. package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-cJZ0VWBq.js} +1 -1
  95. package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-DVRTjgas.js} +1 -1
  96. package/dist/assets/run-page-BUEnMC9w.js +1 -0
  97. package/dist/assets/sankeyDiagram-GR3RE2ED-CVFnD9C-.js +10 -0
  98. package/dist/assets/scratchpad-panel-BIgRENkI.js +1 -0
  99. package/dist/assets/secrets-panel-xY5-V_BD.js +1 -0
  100. package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-_lY4ZN_S.js} +4 -4
  101. package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-Xjymwj7X.js} +1 -1
  102. package/dist/assets/snippets-panel-CTPYW41n.js +1 -0
  103. package/dist/assets/sortBy-BNZKwiq_.js +1 -0
  104. package/dist/assets/state-C4NiC9tO.js +1 -0
  105. package/dist/assets/stateDiagram-KXAO66HF-Da0JQWCn.js +1 -0
  106. package/dist/assets/stateDiagram-v2-UMBNRL4Z-D5lYZOOt.js +1 -0
  107. package/dist/assets/storage-CMdLzB_c.js +26 -0
  108. package/dist/assets/terminal-BPwTkXae.js +10 -0
  109. package/dist/assets/time-Dv5_Ouz_.js +1 -0
  110. package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-Dxh5Zu2e.js} +1 -1
  111. package/dist/assets/tracing-BCIurUfa.js +2 -0
  112. package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DAzrzNmm.js} +2 -2
  113. package/dist/assets/{trash-UBqfK4mR.js → trash-Dc6DSjz_.js} +1 -1
  114. package/dist/assets/{tree-XiEycetl.js → tree-jheoerAX.js} +1 -1
  115. package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-IgpxeGaf.js} +21 -21
  116. package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
  117. package/dist/assets/variable-panel-DYAiLBmF.js +1 -0
  118. package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-BpfpiPKI.js} +1 -1
  119. package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-CmNigJ31.js} +1 -1
  120. package/dist/index.html +2 -2
  121. package/package.json +8 -4
  122. package/src/__tests__/mocks.ts +43 -0
  123. package/src/components/app-config/user-config-form.tsx +32 -0
  124. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +55 -23
  125. package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
  126. package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
  127. package/src/components/chat/acp/__tests__/state.test.ts +2 -6
  128. package/src/components/chat/acp/agent-docs.tsx +33 -6
  129. package/src/components/chat/acp/agent-panel.css +0 -18
  130. package/src/components/chat/acp/agent-panel.tsx +397 -72
  131. package/src/components/chat/acp/agent-selector.tsx +7 -1
  132. package/src/components/chat/acp/blocks.tsx +40 -10
  133. package/src/components/chat/acp/common.tsx +10 -2
  134. package/src/components/chat/acp/context-utils.ts +127 -0
  135. package/src/components/chat/acp/prompt.ts +34 -10
  136. package/src/components/chat/acp/state.ts +1 -1
  137. package/src/components/chat/acp/types.ts +8 -0
  138. package/src/components/chat/chat-panel.tsx +23 -88
  139. package/src/components/chat/chat-utils.ts +127 -1
  140. package/src/components/chat/markdown-renderer.css +39 -0
  141. package/src/components/chat/markdown-renderer.tsx +7 -38
  142. package/src/components/chat/tool-call-accordion.tsx +113 -23
  143. package/src/components/editor/Cell.tsx +6 -0
  144. package/src/components/editor/actions/name-cell-input.tsx +6 -1
  145. package/src/components/editor/actions/useCellActionButton.tsx +3 -1
  146. package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
  147. package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
  148. package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
  149. package/src/components/editor/ai/completion-handlers.tsx +44 -6
  150. package/src/components/editor/ai/completion-utils.ts +92 -0
  151. package/src/components/editor/ai/transport/chat-transport.tsx +36 -0
  152. package/src/components/editor/cell/StagedAICell.tsx +51 -0
  153. package/src/components/editor/cell/cell-actions.tsx +2 -1
  154. package/src/components/terminal/__tests__/state.test.ts +207 -0
  155. package/src/components/terminal/hooks.ts +41 -0
  156. package/src/components/terminal/state.ts +75 -0
  157. package/src/components/terminal/terminal.tsx +334 -13
  158. package/src/components/terminal/theme.tsx +56 -0
  159. package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
  160. package/src/core/ai/staged-cells.ts +208 -0
  161. package/src/core/cells/cells.ts +1 -1
  162. package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
  163. package/src/core/islands/main.ts +2 -2
  164. package/src/core/kernel/messages.ts +8 -12
  165. package/src/core/saving/__tests__/filename.test.ts +37 -0
  166. package/src/core/static/__tests__/download-html.test.ts +43 -1
  167. package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
  168. package/src/css/app/Cell.css +11 -0
  169. package/src/plugins/core/RenderHTML.tsx +36 -2
  170. package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
  171. package/src/plugins/core/registerReactComponent.tsx +28 -0
  172. package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
  173. package/src/stories/cell.stories.tsx +1 -1
  174. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  175. package/src/utils/__tests__/cell-urls.test.ts +29 -0
  176. package/src/utils/__tests__/filenames.test.ts +18 -0
  177. package/src/utils/__tests__/path.test.ts +38 -0
  178. package/src/utils/__tests__/urls.test.ts +56 -1
  179. package/src/utils/errors.ts +9 -0
  180. package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
  181. package/dist/assets/_baseMap-DBVArUYD.js +0 -1
  182. package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
  183. package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
  184. package/dist/assets/agent-panel-COUYnuIK.js +0 -475
  185. package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
  186. package/dist/assets/channel-CjhbjOv4.js +0 -1
  187. package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
  188. package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
  189. package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
  190. package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
  191. package/dist/assets/clone-DM1YNjEn.js +0 -1
  192. package/dist/assets/command-palette-S0bzQp7v.js +0 -1
  193. package/dist/assets/common-B8U9k2Ly.js +0 -1
  194. package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
  195. package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
  196. package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
  197. package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
  198. package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
  199. package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
  200. package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
  201. package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
  202. package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
  203. package/dist/assets/graph-CssCVWIq.js +0 -1
  204. package/dist/assets/index-DcCIe7np.js +0 -28
  205. package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
  206. package/dist/assets/layout-DpQrxGW-.js +0 -1
  207. package/dist/assets/linear-NsreOeBF.js +0 -1
  208. package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
  209. package/dist/assets/min-D259kI3t.js +0 -1
  210. package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
  211. package/dist/assets/run-page-Bb68qdhQ.js +0 -1
  212. package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
  213. package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
  214. package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
  215. package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
  216. package/dist/assets/sortBy-aLGA-PGK.js +0 -1
  217. package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
  218. package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
  219. package/dist/assets/storage-CGlP4lCF.js +0 -26
  220. package/dist/assets/terminal-CxkHubcu.js +0 -9
  221. package/dist/assets/time-D2nr1UgQ.js +0 -1
  222. package/dist/assets/tracing-kTqHxa7q.js +0 -2
  223. package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
@@ -1 +1 @@
1
- import e from"./typescript-C6YI4KwS.js";import s from"./css-l46fsARh.js";import t from"./javascript-CY0YvwoL.js";import n from"./glsl-BDbjGBhJ.js";import i from"./html-ReiWYoHo.js";import c from"./sql-BhJCBb_s.js";import m from"./xml-BsgRw6d1.js";import"./c-BmJt9k-y.js";import"./java-DtRXFtDl.js";const r=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-css","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)css)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)css))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)css) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.css"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-css","embeddedLangs":["typescript","css","javascript"]}')),l=[...e,...s,...t,r],a=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-glsl","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)glsl)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)glsl))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)glsl) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-glsl","embeddedLangs":["typescript","glsl","javascript"]}')),o=[...e,...n,...t,a],u=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-html","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(html|template|inline-html|inline-template)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*(html|template|inline-html|inline-template))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(html|template|inline-html|inline-template) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]},{"begin":"(\\\\$\\\\(`)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(`\\\\))","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-html","embeddedLangs":["typescript","html","javascript"]}')),p=[...e,...i,...t,u],g=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-sql","patterns":[{"begin":"(?i)\\\\b(\\\\w+\\\\.sql)\\\\s*(`)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(\\\\s?/?\\\\*?\\\\s?((?:|inline-)sql)\\\\s?\\\\*?/?\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)sql) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`)","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]}],"scopeName":"inline.es6-sql","embeddedLangs":["typescript","sql"]}')),d=[...e,...c,g],b=[...m,Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-xml","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(xml|svg|inline-svg|inline-xml)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(\\\\s*((?:|inline-)xml))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(xml|svg|inline-svg|inline-xml) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"text.xml"}]}],"scopeName":"inline.es6-xml","embeddedLangs":["xml"]}'))],j=Object.freeze(JSON.parse('{"displayName":"TypeScript with Tags","name":"ts-tags","patterns":[{"include":"source.ts"}],"scopeName":"source.ts.tags","embeddedLangs":["typescript","es-tag-css","es-tag-glsl","es-tag-html","es-tag-sql","es-tag-xml"],"aliases":["lit"]}')),x=[...e,...l,...o,...p,...d,...b,j];export{x as default};
1
+ import e from"./typescript-C6YI4KwS.js";import s from"./css-l46fsARh.js";import t from"./javascript-CY0YvwoL.js";import n from"./glsl-BDbjGBhJ.js";import i from"./html-ReiWYoHo.js";import c from"./sql-BhJCBb_s.js";import m from"./xml-BsgRw6d1.js";import"./c-BmJt9k-y.js";import"./java-DtRXFtDl.js";const r=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-css","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)css)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)css))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)css) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.css"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-css","embeddedLangs":["typescript","css","javascript"]}')),l=[...e,...s,...t,r],a=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-glsl","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)glsl)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)glsl))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)glsl) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-glsl","embeddedLangs":["typescript","glsl","javascript"]}')),o=[...e,...n,...t,a],u=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-html","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(html|template|inline-html|inline-template)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*(html|template|inline-html|inline-template))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(html|template|inline-html|inline-template) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]},{"begin":"(\\\\$\\\\(`)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(`\\\\))","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-html","embeddedLangs":["typescript","html","javascript"]}')),p=[...e,...i,...t,u],g=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-sql","patterns":[{"begin":"(?i)\\\\b(\\\\w+\\\\.sql)\\\\s*(`)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(\\\\s?/?\\\\*?\\\\s?((?:|inline-)sql)\\\\s?\\\\*?/?\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)sql) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`)","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]}],"scopeName":"inline.es6-sql","embeddedLangs":["typescript","sql"]}')),d=[...e,...c,g],b=[...m,Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-xml","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(xml|svg|inline-svg|inline-xml)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(\\\\s*((?:|inline-)xml))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(xml|svg|inline-svg|inline-xml) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"text.xml"}]}],"scopeName":"inline.es6-xml","embeddedLangs":["xml"]}'))],j=Object.freeze(JSON.parse('{"displayName":"TypeScript with Tags","name":"ts-tags","patterns":[{"include":"source.ts"}],"scopeName":"source.ts.tags","embeddedLangs":["typescript","es-tag-css","es-tag-glsl","es-tag-html","es-tag-sql","es-tag-xml"],"aliases":["lit"]}')),h=[...e,...l,...o,...p,...d,...b,j];export{h as default};
@@ -0,0 +1 @@
1
+ import{c as V,r as u,d as N,bS as T,bT as O,bU as D,bV as G,bW as R,j as e,az as q,a5 as P,T as U,a3 as $,Y as _,a4 as z,bX as F,a6 as Y,Z,bY as E,bZ as h,V as k,b5 as H,b6 as W,a as X,b_ as A,ak as J,b$ as K,__tla as L}from"./index-DKEudB02.js";import{V as Q,C as ee}from"./common-C7oJcmCT.js";import{s as b}from"./sortBy-BNZKwiq_.js";import{a as re,__tla as te}from"./edit-page-BrYda9VE.js";import{P as ae}from"./empty-state-B3dA3G5P.js";import"./_baseEach-CNBxBxvS.js";import"./_baseMap-D1WHjKrd.js";import"./links-D59GIweI.js";import{__tla as oe}from"./storage-CMdLzB_c.js";import"./index-CQDrxQ0j.js";import"./index-C77h_TXN.js";import"./index-D1vmG6DS.js";import"./index-lYa_leQE.js";import"./index-DRMm6SNo.js";import"./index-vmICa5KN.js";import"./index-BY93Ejhl.js";import"./index-C-GhZ7ti.js";import"./index-C-8WADat.js";import"./index-DoRmcrKM.js";import"./index-DEQvTChO.js";import"./index-CWMgowgL.js";import"./index-D9UKkrr2.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asn1-DWPaVWf6.js";import"./brainfuck-CtZaYBKt.js";import"./cobol-stawOqaz.js";import"./clike-BgBwzOhw.js";import"./clojure-DiuoqK-z.js";import"./css-ZjFoif2m.js";import"./cmake-DXn5xaP-.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./cypher-gJDei3ni.js";import"./python-DD-Q2bae.js";import"./crystal-CRzZ78HM.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./simple-mode-C3vEBAcb.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./mllike-3c2dg9RT.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./idl-pcmmZuaN.js";import"./javascript-BpzJj0-u.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mirc-DkvFAiy5.js";import"./mathematica-IIbmv7SK.js";import"./modelica-DSrSSXCg.js";import"./mumps-zvxmGV4l.js";import"./mbox-z_N2Mo3d.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./pug-BTvK5tSS.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./rpm-DI_rRufH.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./sparql-BRLJFz69.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./verilog-B4LBqg_1.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./ttcn-cfg-CKJxb-l2.js";import"./turtle-BkSuIpt-.js";import"./webidl-CGwyPRYs.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./vhdl-CWWH2SUo.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./mscgen-B2igx18G.js";import"./index-BVgAenPd.js";import"./trash-Dc6DSjz_.js";import"./_createAggregator-DcD0kTA5.js";import{__tla as se}from"./loro_wasm_bg-C1ks32Vm.js";let C,ie=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return se}catch{}})()]).then(async()=>{const S=V("square-equal",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]]),g="name",f="type-value",x="defs-refs",B=[{id:g,accessorFn:r=>[r.name,r.declaredBy],enableSorting:!0,sortingFn:"alphanumeric",header:({column:r})=>e.jsx(h,{header:"Name",column:r}),cell:({getValue:r})=>{const[t,s]=r();return e.jsx(Q,{name:t,declaredBy:s})}},{id:f,accessorFn:r=>[r.dataType,r.value],enableSorting:!0,sortingFn:"alphanumeric",header:({column:r})=>e.jsx(h,{header:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{children:"Type"}),e.jsx("span",{children:"Value"})]}),column:r}),cell:({getValue:r})=>{const[t,s]=r();return e.jsxs("div",{className:"max-w-[150px]",children:[e.jsx("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap text-muted-foreground font-mono text-xs",children:t}),e.jsx("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap",title:s??"",children:s})]})}},{id:x,accessorFn:r=>[r.declaredBy,r.usedBy,r.name,r.declaredByNames,r.usedByNames],enableSorting:!0,sortingFn:"basic",header:({column:r})=>e.jsx(h,{header:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{children:"Declared By"}),e.jsx("span",{children:"Used By"})]}),column:r}),cell:({getValue:r})=>{const[t,s,i]=r(),l=m=>{const n=H(m);n&&W(n,i)};return e.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[e.jsxs("div",{className:"flex flex-row overflow-auto gap-2 items-center",children:[e.jsx("span",{title:"Declared by",children:e.jsx(S,{className:"w-3.5 h-3.5 text-muted-foreground"})}),t.length===1?e.jsx(k,{variant:"focus",cellId:t[0],skipScroll:!0,onClick:()=>l(t[0])}):e.jsx("div",{className:"text-destructive flex flex-row gap-2",children:t.slice(0,3).map((m,n)=>e.jsxs("span",{className:"flex",children:[e.jsx(k,{variant:"focus",cellId:m,skipScroll:!0,className:"whitespace-nowrap text-destructive",onClick:()=>l(m)},m),n<t.length-1&&", "]},m))})]}),e.jsxs("div",{className:"flex flex-row overflow-auto gap-2 items-baseline",children:[e.jsx("span",{title:"Used by",children:e.jsx(re,{className:"w-3.5 h-3.5 text-muted-foreground"})}),e.jsx(ee,{maxCount:3,cellIds:s,skipScroll:!0,onClick:l})]})]})}}],j=u.memo(({className:r,cellIds:t,variables:s})=>{const[i,l]=N.useState([]),[m,n]=N.useState(""),y=T(),w=u.useMemo(()=>{const o=a=>{const p=y[a];return E(p)?`cell-${t.indexOf(a)}`:p??`cell-${t.indexOf(a)}`};return Object.values(s).map(a=>({...a,declaredByNames:a.declaredBy.map(o),usedByNames:a.usedBy.map(o)}))},[s,y,t]),I=u.useMemo(()=>{const o=new Map;return t.forEach((a,p)=>o.set(a,p)),(function({variables:a,sort:p,cellIdToIndex:M}){p||(p={id:x,desc:!1});let c=[];switch(p.id){case g:c=b(a,d=>d.name);break;case f:c=b(a,d=>d.dataType);break;case x:c=b(a,d=>M.get(d.declaredBy[0]))}return p.desc?c.reverse():c})({variables:w,sort:i[0],cellIdToIndex:o})},[w,i,t]),v=O({data:I,columns:B,getCoreRowModel:R(),onGlobalFilterChange:n,getFilteredRowModel:G(),enableFilters:!0,enableGlobalFilter:!0,enableColumnPinning:!1,getColumnCanGlobalFilter:o=>o.columnDef.enableGlobalFilter??!0,globalFilterFn:"auto",manualSorting:!0,onSortingChange:l,getSortedRowModel:D(),state:{sorting:i,globalFilter:m}});return e.jsxs(e.Fragment,{children:[e.jsx(q,{className:"w-full",placeholder:"Search",value:m,onChange:o=>n(o.target.value)}),e.jsxs(P,{className:U("w-full text-sm flex-1 border-separate border-spacing-0",r),children:[e.jsx($,{children:e.jsx(_,{className:"whitespace-nowrap text-xs",children:v.getFlatHeaders().map(o=>e.jsx(z,{className:"sticky top-0 bg-background border-b",children:F(o.column.columnDef.header,o.getContext())},o.id))})}),e.jsx(Y,{children:v.getRowModel().rows.map(o=>e.jsx(_,{className:"hover:bg-accent",children:o.getVisibleCells().map(a=>e.jsx(Z,{className:"border-b",children:F(a.column.columnDef.cell,a.getContext())},a.id))},o.id))})]})]})});j.displayName="VariableTable",C=()=>{const r=X.c(4),t=A(),s=J();if(Object.keys(t).length===0){let l;return r[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(ae,{title:"No variables",description:"Global variables will appear here.",icon:e.jsx(K,{})}),r[0]=l):l=r[0],l}let i;return r[1]!==s.inOrderIds||r[2]!==t?(i=e.jsx(j,{className:"flex-1",cellIds:s.inOrderIds,variables:t}),r[1]=s.inOrderIds,r[2]=t,r[3]=i):i=r[3],i}});export{ie as __tla,C as default};
@@ -1 +1 @@
1
- import{cI as K,cJ as E,a as F,b as D,cK as G,cL as W,j as g,E as $,u as C,r as S,cM as V,cA as N,cN as q,L as _,ch as z,cO as J,cP as Q,aw as R,cQ as B,ap as U,ar as X}from"./index-OC46250R.js";import{M as y}from"./compile-Ct_jzdKr.js";import{a as Y}from"./VegaLite-Bt14Ds9k.js";import"./time-D2nr1UgQ.js";import"./timer-Bqd5yn_a.js";import"./linear-NsreOeBF.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./zoom-COrs4lFh.js";import"./ordinal-DDUp3AbE.js";import"./colors-bszWmPJw.js";import"./step-BwsUM5iJ.js";import"./arc-Cuwikxov.js";import"./index-BEQfoZiP.js";import"./index-VPWqq2Pg.js";const A=new Set(["boxplot","errorband","errorbar"]),j={getMarkType(t){const e=typeof t=="string"?t:t.type;if(A.has(e))throw new Error("Not supported");return e},isInteractive(t){const e=typeof t=="string"?t:t.type;return!A.has(e)},makeClickable(t){const e=typeof t=="string"?t:t.type;return e in y?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:e,cursor:"pointer",tooltip:!0}:t},getOpacity:t=>typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null},tt=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function et(t,e,r,i){const u={and:r.map(d=>({param:d}))};if(t==="opacity"){const d=j.getOpacity(i)||1;return{...e,opacity:{condition:{test:u,value:d},value:d/5}}}return e}const w={point:t=>t==null?"select_point":`select_point_${t}`,interval:t=>t==null?"select_interval":`select_interval_${t}`,legendSelection:t=>`legend_selection_${t}`,HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint:t=>t.some(e=>e.startsWith("select_point")),hasInterval:t=>t.some(e=>e.startsWith("select_interval")),hasLegend:t=>t.some(e=>e.startsWith("legend_selection")),hasPanZoom:t=>t.some(e=>e.startsWith("pan_zoom"))},P={highlight:()=>({name:w.HIGHLIGHT,select:{type:"point",on:"mouseover"}}),interval:(t,e)=>({name:w.interval(e),select:{type:"interval",encodings:L(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}),point:(t,e)=>({name:w.point(e),select:{type:"point",encodings:L(t),on:"click[!event.metaKey]"}}),legend:t=>({name:w.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}),panZoom:()=>({name:w.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}})};function L(t){switch(j.getMarkType(t.mark)){case y.image:case y.trail:return;case y.area:case y.arc:return["color"];case y.bar:{const e=(function(r){var d,l;if(!r||!("mark"in r))return;const i=(d=r.encoding)==null?void 0:d.x,u=(l=r.encoding)==null?void 0:l.y;if(i&&"type"in i&&i.type==="nominal")return"vertical";if(u&&"type"in u&&u.type==="nominal"||i&&"aggregate"in i)return"horizontal";if(u&&"aggregate"in u)return"vertical"})(t);return e==="horizontal"?["y"]:e==="vertical"?["x"]:void 0}case y.circle:case y.geoshape:case y.line:case y.point:case y.rect:case y.rule:case y.square:case y.text:case y.tick:return["x","y"]}}function Z(t){return"params"in t&&t.params&&t.params.length>0?t.params.filter(e=>e!=null&&"select"in e&&e.select!==void 0).map(e=>e.name):"layer"in t?[...new Set(t.layer.flatMap(Z))]:[]}function at(t,e){var f,v;let{chartSelection:r=!0,fieldSelection:i=!0}=e;if(!r&&!i)return t;if(((f=t.params)==null?void 0:f.some(c=>c.bind==="legend"))&&(i=!1),((v=t.params)==null?void 0:v.some(c=>!c.bind))&&(r=!1),"vconcat"in t){const c=t.vconcat.map(o=>"mark"in o?O(o):o);return{...t,vconcat:c}}if("hconcat"in t){const c=t.hconcat.map(o=>"mark"in o?O(o):o);return{...t,hconcat:c}}if("layer"in t){const c=t.layer.map((o,p)=>{if(!("mark"in o))return o;let s=o;return s=T(s,r,p),s=O(s),p===0&&(s=H(s)),s});return{...t,layer:c}}if(!("mark"in t)||!j.isInteractive(t.mark))return t;let l=t;return l=(function(c,o){if(o===!1)return c;let p=(function(h){if(!h||!("encoding"in h))return[];const{encoding:b}=h;return b?Object.entries(b).flatMap(a=>{const[n,m]=a;return m&&tt.has(n)?"field"in m&&typeof m.field=="string"?[m.field]:"condition"in m&&m.condition&&typeof m.condition=="object"&&"field"in m.condition&&m.condition.field&&typeof m.condition.field=="string"?[m.condition.field]:[]:[]}):[]})(c);Array.isArray(o)&&(p=p.filter(h=>o.includes(h)));const s=p.map(h=>P.legend(h)),x=[...c.params||[],...s];return{...c,params:x}})(l,i),l=T(l,r,void 0),l=O(l),l=H(l),l}function T(t,e,r){if(e===!1)return t;let i;try{i=j.getMarkType(t.mark)}catch{return t}if(i==="geoshape")return t;const u=e===!0?(function(f){switch(f){case"arc":case"area":return["point"];case"text":case"bar":default:return["point","interval"];case"line":return}})(i):[e];if(!u)return t;const d=u.map(f=>f==="interval"?P.interval(t,r):P.point(t,r)),l=[...t.params||[],...d];return{...t,params:l}}function H(t){let e;try{e=j.getMarkType(t.mark)}catch{}if(e==="geoshape")return t;const r=t.params||[];return r.some(i=>i.bind==="scales")?t:{...t,params:[...r,P.panZoom()]}}function O(t){const e="encoding"in t?t.encoding:void 0,r=t.params||[],i=r.map(u=>u.name);return r.length===0?t:j.isInteractive(t.mark)?{...t,mark:j.makeClickable(t.mark),encoding:et("opacity",e||{},i,t.mark)}:t}G("arrow",W);const nt=t=>{const e=F.c(11),{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:l}=t;let f,v;e[0]!==l?(f=async()=>(async function(s){if(!s)return s;const x="datasets"in s?{...s.datasets}:{},h=async a=>{if(!a)return a;if("layer"in a){const k=await Promise.all(a.layer.map(h));a={...a,layer:k}}if("hconcat"in a){const k=await Promise.all(a.hconcat.map(h));a={...a,hconcat:k}}if("vconcat"in a){const k=await Promise.all(a.vconcat.map(h));a={...a,vconcat:k}}if("spec"in a&&(a={...a,spec:await h(a.spec)}),!a.data||!("url"in a.data))return a;let n;try{n=K(a.data.url)}catch{return a}const m=await E(n.href,a.data.format);return x[n.pathname]=m,{...a,data:{name:n.pathname}}},b=await h(s);return Object.keys(x).length===0?b:{...b,datasets:x}})(l),v=[l],e[0]=l,e[1]=f,e[2]=v):(f=e[1],v=e[2]);const{data:c,error:o}=D(f,v);if(o){let s;return e[3]!==o?(s=g.jsx($,{error:o}),e[3]=o,e[4]=s):s=e[4],s}if(!c)return null;let p;return e[5]!==u||e[6]!==d||e[7]!==c||e[8]!==i||e[9]!==r?(p=g.jsx(rt,{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:c}),e[5]=u,e[6]=d,e[7]=c,e[8]=i,e[9]=r,e[10]=p):p=e[10],p},rt=({value:t,setValue:e,chartSelection:r,fieldSelection:i,spec:u})=>{const{theme:d}=C(),l=S.useRef(void 0),[f,v]=S.useState(),c=V(u),o=S.useMemo(()=>at((function(n){return n.data&&"url"in n.data&&(n.data.url=K(n.data.url).href),n})(c),{chartSelection:r,fieldSelection:i}),[c,r,i]),p=S.useMemo(()=>Z(o),[o]),s=N(n=>{e({...t,...n})}),x=V(p),h=S.useMemo(()=>x.reduce((n,m)=>(w.PAN_ZOOM===m||(n[m]=q((k,I)=>{_.debug("[Vega signal]",k,I);let M=z.mapValues(I,st);M=z.mapValues(M,ot),s({[k]:M})},100)),n),{}),[x,s]),b=N(n=>{_.error(n),_.debug(o),v(n)}),a=N(n=>{_.debug("[Vega view] created",n),l.current=n,v(void 0)});return g.jsxs(g.Fragment,{children:[f&&g.jsxs(J,{variant:"destructive",children:[g.jsx(Q,{children:f.message}),g.jsx("div",{className:"text-md",children:f.stack})]}),g.jsxs("div",{className:"relative",onPointerDown:R.stopPropagation(),children:[g.jsx(Y,{spec:o,theme:d==="dark"?"dark":void 0,actions:it,signalListeners:h,onError:b,onNewView:a}),(()=>{const n=[];return w.hasPoint(p)&&n.push(["Point selection","click to select a point; hold shift for multi-select"]),w.hasInterval(p)&&n.push(["Interval selection","click and drag to select an interval"]),w.hasLegend(p)&&n.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),w.hasPanZoom(p)&&n.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),n.length===0?null:g.jsx(U,{delayDuration:300,side:"left",content:g.jsx("div",{className:"text-xs flex flex-col",children:n.map((m,k)=>g.jsxs("div",{children:[g.jsxs("span",{className:"font-bold tracking-wide",children:[m[0],":"]})," ",m[1]]},k))}),children:g.jsx(X,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})})()]})]})},it={source:!1,compiled:!1};function ot(t){return t instanceof Set?[...t]:t}function st(t){return Array.isArray(t)?t.map(e=>e instanceof Date&&B(e)?new Date(e).getTime():e):t}export{nt as default};
1
+ import{dI as K,dJ as H,a as E,b as D,dK as G,dL as W,j as g,E as $,u as C,r as S,dM as L,cI as I,dN as q,L as _,cp as z,dO as J,dP as Q,aF as R,dQ as B,ay as U,aA as X}from"./index-DKEudB02.js";import{M as y}from"./compile-7L0MwhyI.js";import{a as Y}from"./VegaLite-Bdi-TyfY.js";import"./time-Dv5_Ouz_.js";import"./timer-Bqd5yn_a.js";import"./linear-C4blANlC.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./zoom-COrs4lFh.js";import"./ordinal-DDUp3AbE.js";import"./colors-bszWmPJw.js";import"./step-BwsUM5iJ.js";import"./arc-Cuwikxov.js";import"./index-BEQfoZiP.js";import"./index-C4Tn5NvJ.js";const A=new Set(["boxplot","errorband","errorbar"]),j={getMarkType(t){const e=typeof t=="string"?t:t.type;if(A.has(e))throw new Error("Not supported");return e},isInteractive(t){const e=typeof t=="string"?t:t.type;return!A.has(e)},makeClickable(t){const e=typeof t=="string"?t:t.type;return e in y?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:e,cursor:"pointer",tooltip:!0}:t},getOpacity:t=>typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null},tt=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function et(t,e,r,i){const u={and:r.map(d=>({param:d}))};if(t==="opacity"){const d=j.getOpacity(i)||1;return{...e,opacity:{condition:{test:u,value:d},value:d/5}}}return e}const w={point:t=>t==null?"select_point":`select_point_${t}`,interval:t=>t==null?"select_interval":`select_interval_${t}`,legendSelection:t=>`legend_selection_${t}`,HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint:t=>t.some(e=>e.startsWith("select_point")),hasInterval:t=>t.some(e=>e.startsWith("select_interval")),hasLegend:t=>t.some(e=>e.startsWith("legend_selection")),hasPanZoom:t=>t.some(e=>e.startsWith("pan_zoom"))},P={highlight:()=>({name:w.HIGHLIGHT,select:{type:"point",on:"mouseover"}}),interval:(t,e)=>({name:w.interval(e),select:{type:"interval",encodings:V(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}),point:(t,e)=>({name:w.point(e),select:{type:"point",encodings:V(t),on:"click[!event.metaKey]"}}),legend:t=>({name:w.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}),panZoom:()=>({name:w.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}})};function V(t){switch(j.getMarkType(t.mark)){case y.image:case y.trail:return;case y.area:case y.arc:return["color"];case y.bar:{const e=(function(r){var d,l;if(!r||!("mark"in r))return;const i=(d=r.encoding)==null?void 0:d.x,u=(l=r.encoding)==null?void 0:l.y;if(i&&"type"in i&&i.type==="nominal")return"vertical";if(u&&"type"in u&&u.type==="nominal"||i&&"aggregate"in i)return"horizontal";if(u&&"aggregate"in u)return"vertical"})(t);return e==="horizontal"?["y"]:e==="vertical"?["x"]:void 0}case y.circle:case y.geoshape:case y.line:case y.point:case y.rect:case y.rule:case y.square:case y.text:case y.tick:return["x","y"]}}function Z(t){return"params"in t&&t.params&&t.params.length>0?t.params.filter(e=>e!=null&&"select"in e&&e.select!==void 0).map(e=>e.name):"layer"in t?[...new Set(t.layer.flatMap(Z))]:[]}function at(t,e){var f,v;let{chartSelection:r=!0,fieldSelection:i=!0}=e;if(!r&&!i)return t;if(((f=t.params)==null?void 0:f.some(c=>c.bind==="legend"))&&(i=!1),((v=t.params)==null?void 0:v.some(c=>!c.bind))&&(r=!1),"vconcat"in t){const c=t.vconcat.map(o=>"mark"in o?O(o):o);return{...t,vconcat:c}}if("hconcat"in t){const c=t.hconcat.map(o=>"mark"in o?O(o):o);return{...t,hconcat:c}}if("layer"in t){const c=t.layer.map((o,p)=>{if(!("mark"in o))return o;let s=o;return s=T(s,r,p),s=O(s),p===0&&(s=F(s)),s});return{...t,layer:c}}if(!("mark"in t)||!j.isInteractive(t.mark))return t;let l=t;return l=(function(c,o){if(o===!1)return c;let p=(function(h){if(!h||!("encoding"in h))return[];const{encoding:b}=h;return b?Object.entries(b).flatMap(a=>{const[n,m]=a;return m&&tt.has(n)?"field"in m&&typeof m.field=="string"?[m.field]:"condition"in m&&m.condition&&typeof m.condition=="object"&&"field"in m.condition&&m.condition.field&&typeof m.condition.field=="string"?[m.condition.field]:[]:[]}):[]})(c);Array.isArray(o)&&(p=p.filter(h=>o.includes(h)));const s=p.map(h=>P.legend(h)),x=[...c.params||[],...s];return{...c,params:x}})(l,i),l=T(l,r,void 0),l=O(l),l=F(l),l}function T(t,e,r){if(e===!1)return t;let i;try{i=j.getMarkType(t.mark)}catch{return t}if(i==="geoshape")return t;const u=e===!0?(function(f){switch(f){case"arc":case"area":return["point"];case"text":case"bar":default:return["point","interval"];case"line":return}})(i):[e];if(!u)return t;const d=u.map(f=>f==="interval"?P.interval(t,r):P.point(t,r)),l=[...t.params||[],...d];return{...t,params:l}}function F(t){let e;try{e=j.getMarkType(t.mark)}catch{}if(e==="geoshape")return t;const r=t.params||[];return r.some(i=>i.bind==="scales")?t:{...t,params:[...r,P.panZoom()]}}function O(t){const e="encoding"in t?t.encoding:void 0,r=t.params||[],i=r.map(u=>u.name);return r.length===0?t:j.isInteractive(t.mark)?{...t,mark:j.makeClickable(t.mark),encoding:et("opacity",e||{},i,t.mark)}:t}G("arrow",W);const nt=t=>{const e=E.c(11),{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:l}=t;let f,v;e[0]!==l?(f=async()=>(async function(s){if(!s)return s;const x="datasets"in s?{...s.datasets}:{},h=async a=>{if(!a)return a;if("layer"in a){const k=await Promise.all(a.layer.map(h));a={...a,layer:k}}if("hconcat"in a){const k=await Promise.all(a.hconcat.map(h));a={...a,hconcat:k}}if("vconcat"in a){const k=await Promise.all(a.vconcat.map(h));a={...a,vconcat:k}}if("spec"in a&&(a={...a,spec:await h(a.spec)}),!a.data||!("url"in a.data))return a;let n;try{n=K(a.data.url)}catch{return a}const m=await H(n.href,a.data.format);return x[n.pathname]=m,{...a,data:{name:n.pathname}}},b=await h(s);return Object.keys(x).length===0?b:{...b,datasets:x}})(l),v=[l],e[0]=l,e[1]=f,e[2]=v):(f=e[1],v=e[2]);const{data:c,error:o}=D(f,v);if(o){let s;return e[3]!==o?(s=g.jsx($,{error:o}),e[3]=o,e[4]=s):s=e[4],s}if(!c)return null;let p;return e[5]!==u||e[6]!==d||e[7]!==c||e[8]!==i||e[9]!==r?(p=g.jsx(rt,{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:c}),e[5]=u,e[6]=d,e[7]=c,e[8]=i,e[9]=r,e[10]=p):p=e[10],p},rt=({value:t,setValue:e,chartSelection:r,fieldSelection:i,spec:u})=>{const{theme:d}=C(),l=S.useRef(void 0),[f,v]=S.useState(),c=L(u),o=S.useMemo(()=>at((function(n){return n.data&&"url"in n.data&&(n.data.url=K(n.data.url).href),n})(c),{chartSelection:r,fieldSelection:i}),[c,r,i]),p=S.useMemo(()=>Z(o),[o]),s=I(n=>{e({...t,...n})}),x=L(p),h=S.useMemo(()=>x.reduce((n,m)=>(w.PAN_ZOOM===m||(n[m]=q((k,N)=>{_.debug("[Vega signal]",k,N);let M=z.mapValues(N,st);M=z.mapValues(M,ot),s({[k]:M})},100)),n),{}),[x,s]),b=I(n=>{_.error(n),_.debug(o),v(n)}),a=I(n=>{_.debug("[Vega view] created",n),l.current=n,v(void 0)});return g.jsxs(g.Fragment,{children:[f&&g.jsxs(J,{variant:"destructive",children:[g.jsx(Q,{children:f.message}),g.jsx("div",{className:"text-md",children:f.stack})]}),g.jsxs("div",{className:"relative",onPointerDown:R.stopPropagation(),children:[g.jsx(Y,{spec:o,theme:d==="dark"?"dark":void 0,actions:it,signalListeners:h,onError:b,onNewView:a}),(()=>{const n=[];return w.hasPoint(p)&&n.push(["Point selection","click to select a point; hold shift for multi-select"]),w.hasInterval(p)&&n.push(["Interval selection","click and drag to select an interval"]),w.hasLegend(p)&&n.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),w.hasPanZoom(p)&&n.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),n.length===0?null:g.jsx(U,{delayDuration:300,side:"left",content:g.jsx("div",{className:"text-xs flex flex-col",children:n.map((m,k)=>g.jsxs("div",{children:[g.jsxs("span",{className:"font-bold tracking-wide",children:[m[0],":"]})," ",m[1]]},k))}),children:g.jsx(X,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})})()]})]})},it={source:!1,compiled:!1};function ot(t){return t instanceof Set?[...t]:t}function st(t){return Array.isArray(t)?t.map(e=>e instanceof Date&&B(e)?new Date(e).getTime():e):t}export{nt as default};
@@ -1,4 +1,4 @@
1
- var G,j,Q,K,q,Z,J,tt,it,et;import{_ as a,s as hi,g as oi,t as It,q as ri,a as li,b as ci,l as $t,K as gi,d as ui,z as xi,G as ft,F as Bt,H as di,M as pi,h as fi,ac as mi}from"./mermaid.core-4nVOEVX3.js";import"./transform-D9VCJYws.js";import{i as yi}from"./init-DLRA0X12.js";import{o as bi}from"./ordinal-DDUp3AbE.js";import{r as Ai}from"./range-CtcPcB_L.js";import{l as zt}from"./linear-NsreOeBF.js";import{l as Ot}from"./step-BwsUM5iJ.js";import"./index-OC46250R.js";import"./timer-Bqd5yn_a.js";function mt(){var e,t,i=bi().unknown(void 0),s=i.domain,n=i.range,c=0,g=1,p=!1,d=0,_=0,L=.5;function S(){var y=s().length,E=g<c,D=E?g:c,P=E?c:g;e=(P-D)/Math.max(1,y-d+2*_),p&&(e=Math.floor(e)),D+=(P-D-e*(y-d))*L,t=e*(1-d),p&&(D=Math.round(D),t=Math.round(t));var M=Ai(y).map(function(f){return D+e*f});return n(E?M.reverse():M)}return delete i.unknown,i.domain=function(y){return arguments.length?(s(y),S()):s()},i.range=function(y){return arguments.length?([c,g]=y,c=+c,g=+g,S()):[c,g]},i.rangeRound=function(y){return[c,g]=y,c=+c,g=+g,p=!0,S()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(y){return arguments.length?(p=!!y,S()):p},i.padding=function(y){return arguments.length?(d=Math.min(1,_=+y),S()):d},i.paddingInner=function(y){return arguments.length?(d=Math.min(1,y),S()):d},i.paddingOuter=function(y){return arguments.length?(_=+y,S()):_},i.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),S()):L},i.copy=function(){return mt(s(),[c,g]).round(p).paddingInner(d).paddingOuter(_).align(L)},yi.apply(S(),arguments)}var yt=(function(){var e=a(function(h,b,u,x){for(u=u||{},x=h.length;x--;u[h[x]]=b);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],c=[1,6],g=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],_=[1,26],L=[1,28],S=[1,29],y=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],f=[1,35],k=[1,36],l=[1,37],z=[1,43],O=[1,42],Y=[1,47],F=[1,50],r=[1,10,12,14,16,18,19,21,23,34,35,36],v=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],st={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,b,u,x,w,o,nt){var m=o.length-1;switch(w){case 5:x.setOrientation(o[m]);break;case 9:x.setDiagramTitle(o[m].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[m]);break;case 13:x.setLineData(o[m-1],o[m]);break;case 14:x.setBarData({text:"",type:"text"},o[m]);break;case 15:x.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),x.setAccDescription(this.$);break;case 19:case 27:this.$=o[m-1];break;case 20:this.$=[Number(o[m-2]),...o[m]];break;case 21:this.$=[Number(o[m])];break;case 22:x.setXAxisTitle(o[m]);break;case 23:x.setXAxisTitle(o[m-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[m]);break;case 26:x.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 28:this.$=[o[m-2],...o[m]];break;case 29:this.$=[o[m]];break;case 30:x.setYAxisTitle(o[m]);break;case 31:x.setYAxisTitle(o[m-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 37:case 38:this.$={text:o[m],type:"text"};break;case 39:this.$={text:o[m],type:"markdown"};break;case 40:this.$=o[m];break;case 41:this.$=o[m-1]+""+o[m]}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:c,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:c,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:c,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:c,36:g}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:c,36:g}),{11:23,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:39,13:38,24:z,27:O,29:40,30:41,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:45,15:44,27:Y,33:46,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:49,17:48,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:52,17:51,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{20:[1,53]},{22:[1,54]},e(r,[2,18]),{1:[2,2]},e(r,[2,8]),e(r,[2,9]),e(v,[2,37],{40:55,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l}),e(v,[2,38]),e(v,[2,39]),e(C,[2,40]),e(C,[2,42]),e(C,[2,43]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(r,[2,10]),e(r,[2,22],{30:41,29:56,24:z,27:O}),e(r,[2,24]),e(r,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,11]),e(r,[2,30],{33:60,27:Y}),e(r,[2,32]),{31:[1,61]},e(r,[2,12]),{17:62,24:F},{25:63,27:T},e(r,[2,14]),{17:65,24:F},e(r,[2,16]),e(r,[2,17]),e(C,[2,41]),e(r,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(r,[2,31]),{27:[1,69]},e(r,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(r,[2,15]),e(r,[2,26]),e(r,[2,27]),{11:59,32:72,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,33]),e(r,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,b){if(!b.recoverable){var u=new Error(h);throw u.hash=b,u}this.trace(h)},"parseError"),parse:a(function(h){var b=this,u=[0],x=[],w=[null],o=[],nt=this.table,m="",rt=0,Lt=0,ni=o.slice.call(arguments,1),R=Object.create(this.lexer),N={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(N.yy[dt]=this.yy[dt]);R.setInput(h,N.yy),N.yy.lexer=R,N.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var pt=R.yylloc;o.push(pt);var ai=R.options&&R.options.ranges;function Pt(){var B;return typeof(B=x.pop()||R.lex()||1)!="number"&&(B instanceof Array&&(B=(x=B).pop()),B=b.symbols_[B]||B),B}typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(B){u.length=u.length-2*B,w.length=w.length-B,o.length=o.length-B},"popStack"),a(Pt,"lex");for(var I,V,$,vt,lt,W,Et,ct,H={};;){if(V=u[u.length-1],this.defaultActions[V]?$=this.defaultActions[V]:(I==null&&(I=Pt()),$=nt[V]&&nt[V][I]),$===void 0||!$.length||!$[0]){var Mt="";for(lt in ct=[],nt[V])this.terminals_[lt]&&lt>2&&ct.push("'"+this.terminals_[lt]+"'");Mt=R.showPosition?"Parse error on line "+(rt+1)+`:
1
+ var G,j,Q,K,q,Z,J,tt,it,et;import{_ as a,s as hi,g as oi,t as It,q as ri,a as li,b as ci,l as $t,K as gi,d as ui,z as xi,G as ft,F as Bt,H as di,M as pi,h as fi,ac as mi}from"./mermaid.core-CaSnaLH0.js";import"./transform-D9VCJYws.js";import{i as yi}from"./init-DLRA0X12.js";import{o as bi}from"./ordinal-DDUp3AbE.js";import{r as Ai}from"./range-CtcPcB_L.js";import{l as zt}from"./linear-C4blANlC.js";import{l as Ot}from"./step-BwsUM5iJ.js";import"./index-DKEudB02.js";import"./isEmpty-DU_ogP_D.js";import"./timer-Bqd5yn_a.js";function mt(){var e,t,i=bi().unknown(void 0),s=i.domain,n=i.range,c=0,g=1,p=!1,d=0,_=0,L=.5;function S(){var y=s().length,E=g<c,D=E?g:c,P=E?c:g;e=(P-D)/Math.max(1,y-d+2*_),p&&(e=Math.floor(e)),D+=(P-D-e*(y-d))*L,t=e*(1-d),p&&(D=Math.round(D),t=Math.round(t));var M=Ai(y).map(function(f){return D+e*f});return n(E?M.reverse():M)}return delete i.unknown,i.domain=function(y){return arguments.length?(s(y),S()):s()},i.range=function(y){return arguments.length?([c,g]=y,c=+c,g=+g,S()):[c,g]},i.rangeRound=function(y){return[c,g]=y,c=+c,g=+g,p=!0,S()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(y){return arguments.length?(p=!!y,S()):p},i.padding=function(y){return arguments.length?(d=Math.min(1,_=+y),S()):d},i.paddingInner=function(y){return arguments.length?(d=Math.min(1,y),S()):d},i.paddingOuter=function(y){return arguments.length?(_=+y,S()):_},i.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),S()):L},i.copy=function(){return mt(s(),[c,g]).round(p).paddingInner(d).paddingOuter(_).align(L)},yi.apply(S(),arguments)}var yt=(function(){var e=a(function(h,b,u,x){for(u=u||{},x=h.length;x--;u[h[x]]=b);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],c=[1,6],g=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],_=[1,26],L=[1,28],S=[1,29],y=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],f=[1,35],k=[1,36],l=[1,37],z=[1,43],O=[1,42],Y=[1,47],F=[1,50],r=[1,10,12,14,16,18,19,21,23,34,35,36],v=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],st={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,b,u,x,w,o,nt){var m=o.length-1;switch(w){case 5:x.setOrientation(o[m]);break;case 9:x.setDiagramTitle(o[m].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[m]);break;case 13:x.setLineData(o[m-1],o[m]);break;case 14:x.setBarData({text:"",type:"text"},o[m]);break;case 15:x.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),x.setAccDescription(this.$);break;case 19:case 27:this.$=o[m-1];break;case 20:this.$=[Number(o[m-2]),...o[m]];break;case 21:this.$=[Number(o[m])];break;case 22:x.setXAxisTitle(o[m]);break;case 23:x.setXAxisTitle(o[m-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[m]);break;case 26:x.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 28:this.$=[o[m-2],...o[m]];break;case 29:this.$=[o[m]];break;case 30:x.setYAxisTitle(o[m]);break;case 31:x.setYAxisTitle(o[m-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 37:case 38:this.$={text:o[m],type:"text"};break;case 39:this.$={text:o[m],type:"markdown"};break;case 40:this.$=o[m];break;case 41:this.$=o[m-1]+""+o[m]}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:c,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:c,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:c,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:c,36:g}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:c,36:g}),{11:23,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:39,13:38,24:z,27:O,29:40,30:41,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:45,15:44,27:Y,33:46,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:49,17:48,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:52,17:51,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{20:[1,53]},{22:[1,54]},e(r,[2,18]),{1:[2,2]},e(r,[2,8]),e(r,[2,9]),e(v,[2,37],{40:55,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l}),e(v,[2,38]),e(v,[2,39]),e(C,[2,40]),e(C,[2,42]),e(C,[2,43]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(r,[2,10]),e(r,[2,22],{30:41,29:56,24:z,27:O}),e(r,[2,24]),e(r,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,11]),e(r,[2,30],{33:60,27:Y}),e(r,[2,32]),{31:[1,61]},e(r,[2,12]),{17:62,24:F},{25:63,27:T},e(r,[2,14]),{17:65,24:F},e(r,[2,16]),e(r,[2,17]),e(C,[2,41]),e(r,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(r,[2,31]),{27:[1,69]},e(r,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(r,[2,15]),e(r,[2,26]),e(r,[2,27]),{11:59,32:72,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,33]),e(r,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,b){if(!b.recoverable){var u=new Error(h);throw u.hash=b,u}this.trace(h)},"parseError"),parse:a(function(h){var b=this,u=[0],x=[],w=[null],o=[],nt=this.table,m="",rt=0,Lt=0,ni=o.slice.call(arguments,1),R=Object.create(this.lexer),N={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(N.yy[dt]=this.yy[dt]);R.setInput(h,N.yy),N.yy.lexer=R,N.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var pt=R.yylloc;o.push(pt);var ai=R.options&&R.options.ranges;function Pt(){var B;return typeof(B=x.pop()||R.lex()||1)!="number"&&(B instanceof Array&&(B=(x=B).pop()),B=b.symbols_[B]||B),B}typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(B){u.length=u.length-2*B,w.length=w.length-B,o.length=o.length-B},"popStack"),a(Pt,"lex");for(var I,V,$,vt,lt,W,Et,ct,H={};;){if(V=u[u.length-1],this.defaultActions[V]?$=this.defaultActions[V]:(I==null&&(I=Pt()),$=nt[V]&&nt[V][I]),$===void 0||!$.length||!$[0]){var Mt="";for(lt in ct=[],nt[V])this.terminals_[lt]&&lt>2&&ct.push("'"+this.terminals_[lt]+"'");Mt=R.showPosition?"Parse error on line "+(rt+1)+`:
2
2
  `+R.showPosition()+`
3
3
  Expecting `+ct.join(", ")+", got '"+(this.terminals_[I]||I)+"'":"Parse error on line "+(rt+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Mt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:pt,expected:ct})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+I);switch($[0]){case 1:u.push(I),w.push(R.yytext),o.push(R.yylloc),u.push($[1]),I=null,Lt=R.yyleng,m=R.yytext,rt=R.yylineno,pt=R.yylloc;break;case 2:if(W=this.productions_[$[1]][1],H.$=w[w.length-W],H._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},ai&&(H._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),(vt=this.performAction.apply(H,[m,Lt,rt,N.yy,$[1],w,o].concat(ni)))!==void 0)return vt;W&&(u=u.slice(0,-1*W*2),w=w.slice(0,-1*W),o=o.slice(0,-1*W)),u.push(this.productions_[$[1]][0]),w.push(H.$),o.push(H._$),Et=nt[u[u.length-2]][u[u.length-1]],u.push(Et);break;case 3:return!0}}return!0},"parse")},ot=(function(){return{EOF:1,parseError:a(function(h,b){if(!this.yy.parser)throw new Error(h);this.yy.parser.parseError(h,b)},"parseError"),setInput:a(function(h,b){return this.yy=b||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];return this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h,h.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var b=h.length,u=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),b=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
package/dist/index.html CHANGED
@@ -59,8 +59,8 @@
59
59
  <marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
60
60
  <!-- /TODO -->
61
61
  <title>{{ title }}</title>
62
- <script type="module" crossorigin src="./assets/index-OC46250R.js"></script>
63
- <link rel="stylesheet" crossorigin href="./assets/index-CknhX2Vy.css">
62
+ <script type="module" crossorigin src="./assets/index-DKEudB02.js"></script>
63
+ <link rel="stylesheet" crossorigin href="./assets/index-Cx0bsY1w.css">
64
64
  </head>
65
65
  <body>
66
66
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/frontend",
3
- "version": "0.15.5",
3
+ "version": "0.16.0",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -100,9 +100,13 @@
100
100
  "@uwdata/flechette": "^1.1.2",
101
101
  "@valtown/codemirror-codeium": "^1.1.1",
102
102
  "@xterm/addon-attach": "^0.11.0",
103
+ "@xterm/addon-canvas": "^0.7.0",
103
104
  "@xterm/addon-fit": "^0.10.0",
105
+ "@xterm/addon-search": "^0.15.0",
106
+ "@xterm/addon-unicode11": "^0.8.0",
107
+ "@xterm/addon-web-links": "^0.11.0",
104
108
  "@xterm/xterm": "^5.5.0",
105
- "@zed-industries/agent-client-protocol": "^0.1.2",
109
+ "@zed-industries/agent-client-protocol": "^0.3.1",
106
110
  "ai": "^5.0.30",
107
111
  "ansi_up": "^6.0.6",
108
112
  "class-variance-authority": "^0.7.1",
@@ -151,7 +155,7 @@
151
155
  "remark-gfm": "^4.0.1",
152
156
  "rpc-anywhere": "^1.7.0",
153
157
  "sql-formatter": "^15.6.6",
154
- "streamdown": "^1.2.0",
158
+ "streamdown": "^1.3.0",
155
159
  "string-dedent": "^3.0.2",
156
160
  "swiper": "^11.2.10",
157
161
  "tailwind-merge": "^2.6.0",
@@ -159,7 +163,7 @@
159
163
  "thememirror": "^2.0.1",
160
164
  "timestring": "^7.0.0",
161
165
  "typescript-memoize": "^1.1.1",
162
- "use-acp": "^0.1.5",
166
+ "use-acp": "^0.2.3",
163
167
  "use-resize-observer": "^9.1.0",
164
168
  "vega-lite": "^5.23.0",
165
169
  "vega-loader": "^4.5.3",
@@ -0,0 +1,43 @@
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
+
3
+ // Edge case filenames for testing unicode, spaces, and special characters
4
+ export const EDGE_CASE_FILENAMES = [
5
+ // Unicode
6
+ "tést.py",
7
+ "café.py",
8
+ "测试.py",
9
+ // Emojis
10
+ "🚀notebook.py",
11
+ // Spaces
12
+ "test file.py",
13
+ "file with spaces.py",
14
+ // Multiple
15
+ "café & 测试.py",
16
+ "café notebook.py",
17
+ // URL characters
18
+ "test-file.py",
19
+ "test_file.py",
20
+ "test_file.backup.py",
21
+ "file&with&ampersands.py",
22
+ "file=with=equals.py",
23
+ "file?with?questions.py",
24
+ ];
25
+
26
+ // Cell names with unicode and special characters for frontend tests
27
+ export const EDGE_CASE_CELL_NAMES = [
28
+ "tést_cell",
29
+ "café_notebook",
30
+ "测试_cell",
31
+ "🚀_my_cell",
32
+ "cell with spaces",
33
+ "café notebook cell",
34
+ ];
35
+
36
+ // URL test cases with special characters that could break query parameters
37
+ export const URL_SPECIAL_CHAR_FILENAMES = [
38
+ "file with spaces.py",
39
+ "file&with&ampersands.py",
40
+ "file=with=equals.py",
41
+ "file?with?questions.py",
42
+ "café & 测试.py",
43
+ ];
@@ -1283,6 +1283,38 @@ export const UserConfigForm: React.FC = () => {
1283
1283
  </div>
1284
1284
  )}
1285
1285
  />
1286
+ <FormField
1287
+ control={form.control}
1288
+ name="experimental.external_agents"
1289
+ render={({ field }) => (
1290
+ <div className="flex flex-col gap-y-1">
1291
+ <FormItem className={formItemClasses}>
1292
+ <FormLabel className="font-normal">
1293
+ External Agents
1294
+ </FormLabel>
1295
+ <FormControl>
1296
+ <Checkbox
1297
+ data-testid="external-agents-checkbox"
1298
+ checked={field.value === true}
1299
+ onCheckedChange={field.onChange}
1300
+ />
1301
+ </FormControl>
1302
+ </FormItem>
1303
+ <IsOverridden
1304
+ userConfig={config}
1305
+ name="experimental.external_agents"
1306
+ />
1307
+ <FormDescription>
1308
+ Enable experimental external agents such as Claude Code and
1309
+ Gemini CLI. Learn more in the{" "}
1310
+ <ExternalLink href="https://docs.marimo.io/guides/editor_features/agents/">
1311
+ docs
1312
+ </ExternalLink>
1313
+ .
1314
+ </FormDescription>
1315
+ </div>
1316
+ )}
1317
+ />
1286
1318
  </SettingGroup>
1287
1319
  );
1288
1320
  }
@@ -3,7 +3,7 @@
3
3
  exports[`getAgentPrompt > should generate complete agent prompt with default filename 1`] = `
4
4
  "
5
5
  I am currently editing a marimo notebook.
6
- You can read or write to the notebook at @test-notebook.py
6
+ You can read or write to the notebook at test-notebook.py
7
7
 
8
8
  If you make edits to the notebook, only edit the contents inside the function decorator with @app.cell.
9
9
  marimo will automatically handle adding the parameters and return statement of the function. For example,
@@ -11,7 +11,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
11
11
 
12
12
  \`\`\`
13
13
  @app.cell
14
- def __():
14
+ def _():
15
15
  <your code here>
16
16
  return
17
17
  \`\`\`
@@ -37,6 +37,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
37
37
  7. The last expression in a cell is automatically displayed, just like in Jupyter notebooks.
38
38
  8. Don't include comments in markdown cells
39
39
  9. Don't include comments in SQL cells
40
+ 10. Never define anything using \`global\`.
40
41
 
41
42
  ## Reactivity
42
43
 
@@ -46,6 +47,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
46
47
  - UI elements trigger updates when their values change without explicit callbacks
47
48
  - UI element values are accessed through \`.value\` attribute
48
49
  - You cannot access a UI element's value in the same cell where it's defined
50
+ - Cells prefixed with an underscore (e.g. _my_var) are local to the cell and cannot be accessed by other cells
49
51
 
50
52
  ## Best Practices
51
53
 
@@ -115,34 +117,50 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
115
117
 
116
118
  - \`mo.md(text)\` - display markdown
117
119
  - \`mo.stop(predicate, output=None)\` - stop execution conditionally
120
+ - \`mo.output.append(value)\` - append to the output when it is not the last expression
121
+ - \`mo.output.replace(value)\` - replace the output when it is not the last expression
118
122
  - \`mo.Html(html)\` - display HTML
119
123
  - \`mo.image(image)\` - display an image
120
124
  - \`mo.hstack(elements)\` - stack elements horizontally
121
125
  - \`mo.vstack(elements)\` - stack elements vertically
122
126
  - \`mo.tabs(elements)\` - create a tabbed interface
123
127
 
128
+
129
+
124
130
  ## Examples
125
131
 
132
+ <example title="Markdown ccell">
133
+
134
+ @app.cell
135
+ def _():
136
+ mo.md("""
137
+ # Hello world
138
+ This is a _markdown_ **cell**.
139
+ """)
140
+ return
141
+
142
+ </example>
143
+
126
144
  <example title="Basic UI with reactivity">
127
145
 
128
146
  @app.cell
129
- def __():
147
+ def _():
130
148
  import marimo as mo
131
149
  import matplotlib.pyplot as plt
132
150
  import numpy as np
133
151
  return
134
152
 
135
153
  @app.cell
136
- def __():
154
+ def _():
137
155
  n_points = mo.ui.slider(10, 100, value=50, label="Number of points")
138
156
  n_points
139
157
  return
140
158
 
141
159
  @app.cell
142
- def __():
160
+ def _():
143
161
  x = np.random.rand(n_points.value)
144
162
  y = np.random.rand(n_points.value)
145
-
163
+
146
164
  plt.figure(figsize=(8, 6))
147
165
  plt.scatter(x, y, alpha=0.7)
148
166
  plt.title(f"Scatter plot with {n_points.value} points")
@@ -156,14 +174,14 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
156
174
  <example title="Data explorer">
157
175
 
158
176
  @app.cell
159
- def __():
177
+ def _():
160
178
  import marimo as mo
161
179
  import pandas as pd
162
180
  from vega_datasets import data
163
181
  return
164
182
 
165
183
  @app.cell
166
- def __():
184
+ def _():
167
185
  cars_df = data.cars()
168
186
  mo.ui.data_explorer(cars_df)
169
187
  return
@@ -173,7 +191,7 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
173
191
  <example title="Multiple UI elements">
174
192
 
175
193
  @app.cell
176
- def __():
194
+ def _():
177
195
  import marimo as mo
178
196
  import pandas as pd
179
197
  import matplotlib.pyplot as plt
@@ -181,12 +199,12 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
181
199
  return
182
200
 
183
201
  @app.cell
184
- def __():
202
+ def _():
185
203
  iris = sns.load_dataset('iris')
186
204
  return
187
205
 
188
206
  @app.cell
189
- def __():
207
+ def _():
190
208
  species_selector = mo.ui.dropdown(
191
209
  options=["All"] + iris["species"].unique().tolist(),
192
210
  value="All",
@@ -206,9 +224,9 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
206
224
  return
207
225
 
208
226
  @app.cell
209
- def __():
227
+ def _():
210
228
  filtered_data = iris if species_selector.value == "All" else iris[iris["species"] == species_selector.value]
211
-
229
+
212
230
  plt.figure(figsize=(10, 6))
213
231
  sns.scatterplot(
214
232
  data=filtered_data,
@@ -222,17 +240,31 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
222
240
 
223
241
  </example>
224
242
 
243
+ <example title="Conditional Outputs">
244
+
245
+ @app.cell
246
+ def _():
247
+ mo.stop(not data.value, mo.md("No data to display"))
248
+
249
+ if mode.value == "scatter":
250
+ mo.output.replace(render_scatter(data.value))
251
+ else:
252
+ mo.output.replace(render_bar_chart(data.value))
253
+ return
254
+
255
+ </example>
256
+
225
257
  <example title="Interactive chart with Altair">
226
258
 
227
259
  @app.cell
228
- def __():
260
+ def _():
229
261
  import marimo as mo
230
262
  import altair as alt
231
263
  import pandas as pd
232
264
  return
233
265
 
234
266
  @app.cell
235
- def __():
267
+ def _():
236
268
  # Load dataset
237
269
  cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')
238
270
  _chart = alt.Chart(cars_df).mark_point().encode(
@@ -243,13 +275,13 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
243
275
  return
244
276
 
245
277
  @app.cell
246
- def __():
278
+ def _():
247
279
  chart = mo.ui.altair_chart(_chart)
248
280
  chart
249
281
  return
250
282
 
251
283
  @app.cell
252
- def __():
284
+ def _():
253
285
  # Display the selection
254
286
  chart.value
255
287
  return
@@ -259,19 +291,19 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
259
291
  <example title="Run Button Example">
260
292
 
261
293
  @app.cell
262
- def __():
294
+ def _():
263
295
  import marimo as mo
264
296
  return
265
297
 
266
298
  @app.cell
267
- def __():
299
+ def _():
268
300
  first_button = mo.ui.run_button(label="Option 1")
269
301
  second_button = mo.ui.run_button(label="Option 2")
270
302
  [first_button, second_button]
271
303
  return
272
304
 
273
305
  @app.cell
274
- def __():
306
+ def _():
275
307
  if first_button.value:
276
308
  print("You chose option 1!")
277
309
  elif second_button.value:
@@ -285,18 +317,18 @@ exports[`getAgentPrompt > should generate complete agent prompt with default fil
285
317
  <example title="SQL with duckdb">
286
318
 
287
319
  @app.cell
288
- def __():
320
+ def _():
289
321
  import marimo as mo
290
322
  import pandas as pd
291
323
  return
292
324
 
293
325
  @app.cell
294
- def __():
326
+ def _():
295
327
  cars_df = pd.read_csv('<https://raw.githubusercontent.com/vega/vega-datasets/master/data/cars.json>')
296
328
  return
297
329
 
298
330
  @app.cell
299
- def __():
331
+ def _():
300
332
  _df = mo.sql("SELECT * from cars_df WHERE Miles_per_Gallon > 20")
301
333
  return
302
334