@marimo-team/islands 0.25.1-dev90 → 0.25.2-dev0

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 (294) hide show
  1. package/dist/{ConnectedDataExplorerComponent-KVhjDMSe.js → ConnectedDataExplorerComponent-C2d9ysUI.js} +8 -9
  2. package/dist/{ErrorBoundary-D7_peFI9.js → ErrorBoundary-2usl042r.js} +1 -1
  3. package/dist/{ImageComparisonComponent-Dlm5aWnH.js → ImageComparisonComponent-Cpfz30OZ.js} +51 -52
  4. package/dist/{abnfDiagram-VCTEODGH-CpN0FRda.js → abnfDiagram-VCTEODGH-AFhOQTt8.js} +3 -3
  5. package/dist/{architectureDiagram-5GKGNRK7-DDyj5SRB.js → architectureDiagram-5GKGNRK7-BngksAAQ.js} +5 -5
  6. package/dist/{blockDiagram-I7D4REHJ-BbXEXJRu.js → blockDiagram-I7D4REHJ-CvBmppdy.js} +9 -9
  7. package/dist/{c4Diagram-7LVT6UL2-DcLsbQmR.js → c4Diagram-7LVT6UL2-EceL4_jH.js} +7 -7
  8. package/dist/{cells-DYIkSxs6.js → cells-Cv93oav_.js} +4124 -4151
  9. package/dist/{channel-B5XnTarr.js → channel-z7HZXHwv.js} +1 -1
  10. package/dist/{chat-ui-BXj3uYjy.js → chat-ui-fVyVOhYN.js} +47 -47
  11. package/dist/{chunk-4HAMMTFA-D2qv8E0X.js → chunk-4HAMMTFA-BPTTOOC5.js} +5 -5
  12. package/dist/{chunk-75Z2AOVW-5_HsvXwr.js → chunk-75Z2AOVW-C4AOleKf.js} +1 -1
  13. package/dist/{chunk-DU6HZSFF-BUgAHvnM.js → chunk-DU6HZSFF-1TwWR6gh.js} +1 -1
  14. package/dist/{chunk-F27PBJKO-DHmYWZXr.js → chunk-F27PBJKO-DMI1PBe4.js} +1 -1
  15. package/dist/{chunk-GMAD6QVW-Czynz8aA.js → chunk-GMAD6QVW-vStrMz2P.js} +3 -3
  16. package/dist/{chunk-GVQU2GXP-yQEdulRS.js → chunk-GVQU2GXP-2HwWgs4u.js} +2 -2
  17. package/dist/{chunk-IMKFNOWR-BfwTebD0.js → chunk-IMKFNOWR-UOVZuZVn.js} +5 -5
  18. package/dist/{chunk-L3NEJ4N5-DwRWnDDK.js → chunk-L3NEJ4N5-RhC7i0I2.js} +5 -5
  19. package/dist/{chunk-OSK3NFVY-BBKU_Ign.js → chunk-OSK3NFVY-CZV09N-U.js} +6 -6
  20. package/dist/{chunk-P2QGCYS3-C0iGU29N.js → chunk-P2QGCYS3-0TAWai9C.js} +1 -1
  21. package/dist/{chunk-POPQ4Y6H-BCbS3Ozc.js → chunk-POPQ4Y6H-Cc3_56GX.js} +1 -1
  22. package/dist/{chunk-PWAF6VOD-CTFCL0jI.js → chunk-PWAF6VOD-lNxB9k8z.js} +1 -1
  23. package/dist/{chunk-SHT3W25Y-BspJEJ5H.js → chunk-SHT3W25Y-CrEPyWy1.js} +7 -7
  24. package/dist/{chunk-SVP7TREG-DX3rFNTe.js → chunk-SVP7TREG-uIyyySp6.js} +2 -2
  25. package/dist/{chunk-TICWLB2K-fVF7Uujg.js → chunk-TICWLB2K-DdXM3eg6.js} +5 -5
  26. package/dist/classDiagram-ZZMXUADV-BiATbBE4.js +30 -0
  27. package/dist/classDiagram-v2-VYDZK3BY-JnH97GYw.js +30 -0
  28. package/dist/{code-visibility-Cv2cG11L.js → code-visibility-rUDTB2Ce.js} +17 -17
  29. package/dist/{common-DVOYsne0.js → common-BVErJKjc.js} +6726 -6430
  30. package/dist/{cynefinDiagram-5FMLGOSQ-CFQrqzSX.js → cynefinDiagram-5FMLGOSQ-zknaAsGy.js} +3 -3
  31. package/dist/{dagre-GXQ25YYZ-xHNAUTyG.js → dagre-GXQ25YYZ-BhMOoMGJ.js} +10 -10
  32. package/dist/{data-grid-overlay-editor--Egdzm1k.js → data-grid-overlay-editor-7ANmo9c-.js} +1 -1
  33. package/dist/{diagram-S7CK7UJ4-Bt1rPbAx.js → diagram-S7CK7UJ4-V5-Z-EDY.js} +4 -4
  34. package/dist/{diagram-UQ7AKVKN-D1sq5FoZ.js → diagram-UQ7AKVKN-qw8AjDal.js} +3 -3
  35. package/dist/{diagram-VSXAHHWV-BKpmG23x.js → diagram-VSXAHHWV-CR7BJygZ.js} +2 -2
  36. package/dist/{diagram-VX7I27RA-BMwGFVD6.js → diagram-VX7I27RA-DfuqFb1E.js} +5 -5
  37. package/dist/{diagram-Z3DM3KII--KLDR9Pl.js → diagram-Z3DM3KII-DpWwlYZB.js} +3 -3
  38. package/dist/{dist-BaHjhkpZ.js → dist-CcyKTBTF.js} +1 -1
  39. package/dist/{dropdown-menu-CZgjYSAh.js → dropdown-menu-CZy06LAq.js} +12 -12
  40. package/dist/{ebnfDiagram-PWID7BFC-WnG4cvSQ.js → ebnfDiagram-PWID7BFC-C20OnNMZ.js} +3 -3
  41. package/dist/{erDiagram-RLTQ6QDP-DhzKiYHc.js → erDiagram-RLTQ6QDP-DBXLWO9v.js} +12 -12
  42. package/dist/{error-entries-C0NsUqXl.js → error-entries-DLl0XqoW.js} +18 -18
  43. package/dist/{feedback-button-WVepiUsI.js → feedback-button-K1inEVfd.js} +19 -19
  44. package/dist/flowDiagram-HODETNUW-DL52nMkt.js +16 -0
  45. package/dist/{formats-BR5iGb4s.js → formats-Cl_67ghI.js} +2 -2
  46. package/dist/{ganttDiagram-EL5Y4UJY-DbzEBLbl.js → ganttDiagram-EL5Y4UJY-cRRaDt88.js} +2 -2
  47. package/dist/{gitGraphDiagram-WWUBYQGX-BMf0iKi1.js → gitGraphDiagram-WWUBYQGX-Pox5k9-Y.js} +2 -2
  48. package/dist/{glide-data-editor-S0WTUxUP.js → glide-data-editor-D2fDO5aG.js} +5 -5
  49. package/dist/{globals-B0NGznoE.js → globals-NylFP0CX.js} +1 -1
  50. package/dist/{html-to-image-CeYYvQNb.js → html-to-image-CmkwfNkf.js} +32 -31
  51. package/dist/{infoDiagram-27XIBGKW-BagtCX_5.js → infoDiagram-27XIBGKW-ntpxMfrq.js} +2 -2
  52. package/dist/{ishikawaDiagram-5VMMS53U-DByDehYy.js → ishikawaDiagram-5VMMS53U-BllIlHE5.js} +3 -3
  53. package/dist/{journeyDiagram-3NMN7TZE-D2LcKDUO.js → journeyDiagram-3NMN7TZE-EPJDPlt0.js} +2 -2
  54. package/dist/{kanban-definition-UXKFOSKX-BxwkbBI_.js → kanban-definition-UXKFOSKX-GYtNMjtS.js} +9 -9
  55. package/dist/{katex-C6D4cX_N.js → katex-BNCmKUol.js} +983 -1120
  56. package/dist/{useNumberFormatter-BfDpa21j.js → label-BslhXqL6.js} +108 -81
  57. package/dist/{loader-D2W4oM-3.js → loader-DEZSzvma.js} +253 -248
  58. package/dist/main.js +670 -661
  59. package/dist/{mermaid-DPNuhemn.js → mermaid-Dnzoxjt1.js} +49 -49
  60. package/dist/{mhchem-DWCF06w9.js → mhchem-BEc7A1or.js} +1 -1
  61. package/dist/{mindmap-definition-YA3MSWOX-Cgvojw3y.js → mindmap-definition-YA3MSWOX-Cth76xgH.js} +11 -11
  62. package/dist/{number-overlay-editor-5uyVnQ6u.js → number-overlay-editor-B4XyCoMu.js} +1 -1
  63. package/dist/{pegDiagram-XKGWAZYB-DahHhYyN.js → pegDiagram-XKGWAZYB-Cu4uOXii.js} +3 -3
  64. package/dist/{pieDiagram-E7YTZNPT-CCtX0oCK.js → pieDiagram-E7YTZNPT-Bh3eDa9s.js} +3 -3
  65. package/dist/{process-output-BCTjlyuH.js → process-output-CYN5E-iO.js} +2 -2
  66. package/dist/{quadrantDiagram-AXDQQJYC-DftINo6g.js → quadrantDiagram-AXDQQJYC--kqzFC3w.js} +1 -1
  67. package/dist/{railroadDiagram-O6MQD6OU-Du5NsPUb.js → railroadDiagram-O6MQD6OU-DG-M6Rnc.js} +3 -3
  68. package/dist/{react-vega-5AcMW8gG.js → react-vega-ewj7q_U5.js} +1 -1
  69. package/dist/{requirementDiagram-BXWQKSXE-0pmmxL6_.js → requirementDiagram-BXWQKSXE-DCwsThh0.js} +11 -11
  70. package/dist/{reveal-component-CKpvbtfe.js → reveal-component-Dtm5GH3p.js} +744 -743
  71. package/dist/{sankeyDiagram-P5KCCOFB-CDKR5TJH.js → sankeyDiagram-P5KCCOFB-BdzhT0BM.js} +1 -1
  72. package/dist/{sequenceDiagram-WJ2MYXX4-DB-ChWwU.js → sequenceDiagram-WJ2MYXX4-CbXB1_PU.js} +4 -4
  73. package/dist/{spec-CAYwFeV6.js → spec-DQBRQSba.js} +123 -102
  74. package/dist/{stateDiagram-D77RDMKH-orN6AwMx.js → stateDiagram-D77RDMKH-A-Zf3Sb2.js} +13 -13
  75. package/dist/stateDiagram-v2-MP3YSRHH-D9YMnUGx.js +30 -0
  76. package/dist/style.css +1 -1
  77. package/dist/{swimlanes-42K2YHIH-BkSDcqDT.js → swimlanes-42K2YHIH-B_pMf0J4.js} +10 -10
  78. package/dist/swimlanesDiagram-VR7AAH4N-Ctgy-yGP.js +30 -0
  79. package/dist/{timeline-definition-24CTP7MA-BuqJUIRZ.js → timeline-definition-24CTP7MA-DTXFjTTM.js} +3 -3
  80. package/dist/{toDate-WXg1yLcI.js → toDate-C67bxMWn.js} +139 -111
  81. package/dist/{useDateFormatter-BRTPsUK7.js → useDateFormatter-BXQGu86d.js} +28 -49
  82. package/dist/{vega-component-D0QXopU8.js → vega-component-tFOzgarw.js} +12 -12
  83. package/dist/{vega-embed-container-CbnTccZi.js → vega-embed-container-sSR5hAsy.js} +2 -2
  84. package/dist/{vega-loader.browser-D95WfUcj.js → vega-loader.browser-DNST6uVf.js} +2 -2
  85. package/dist/{vennDiagram-4TSXK5OY-CTUlJ2PK.js → vennDiagram-4TSXK5OY-BPHjZo0R.js} +3 -3
  86. package/dist/{wardleyDiagram-VM6X3IG4-3evLUb0M.js → wardleyDiagram-VM6X3IG4-6fTLYBuD.js} +3 -3
  87. package/dist/{xychartDiagram-S5SC5T6Z-DL2E3K8-.js → xychartDiagram-S5SC5T6Z-BYjwjrzE.js} +5 -5
  88. package/package.json +1 -2
  89. package/src/__mocks__/common.ts +3 -3
  90. package/src/__tests__/CellStatus.test.tsx +1 -1
  91. package/src/__tests__/setup.ts +7 -7
  92. package/src/components/app-config/ai-config.tsx +2 -0
  93. package/src/components/app-config/optional-features.tsx +1 -1
  94. package/src/components/chat/chat-panel.tsx +19 -8
  95. package/src/components/data-table/TableTopBar.tsx +2 -2
  96. package/src/components/data-table/__tests__/export-actions.test.tsx +662 -0
  97. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +286 -0
  98. package/src/components/data-table/charts/charts.tsx +26 -13
  99. package/src/components/data-table/column-summary/chart-spec-model.tsx +4 -4
  100. package/src/components/data-table/data-table.tsx +1 -1
  101. package/src/components/data-table/export-actions.tsx +642 -176
  102. package/src/components/data-table/schemas.ts +25 -3
  103. package/src/components/dependency-graph/elements.ts +2 -2
  104. package/src/components/editor/__tests__/package-alert.test.tsx +140 -0
  105. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +107 -0
  106. package/src/components/editor/actions/pair-with-agent.tsx +119 -0
  107. package/src/components/editor/actions/useNotebookActions.tsx +2 -1
  108. package/src/components/editor/ai/add-cell-with-ai.tsx +2 -0
  109. package/src/components/editor/ai/staged-cell-submission.ts +2 -2
  110. package/src/components/editor/ai/transport/chat-transport.tsx +1 -1
  111. package/src/components/editor/chrome/components/contribute-snippet-button.tsx +6 -1
  112. package/src/components/editor/connections/database/as-code.ts +44 -44
  113. package/src/components/editor/connections/storage/as-code.ts +3 -3
  114. package/src/components/editor/file-tree/requesting-tree.tsx +16 -13
  115. package/src/components/editor/navigation/clipboard.ts +2 -2
  116. package/src/components/editor/notebook-cell.tsx +2 -2
  117. package/src/components/editor/output/MarimoTracebackOutput.tsx +1 -1
  118. package/src/components/editor/output/VideoOutput.tsx +1 -1
  119. package/src/components/editor/output/ansi-reduce.ts +21 -17
  120. package/src/components/editor/output/console/ConsoleOutput.tsx +3 -3
  121. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +59 -0
  122. package/src/components/editor/output/console/text-rendering.tsx +3 -1
  123. package/src/components/editor/package-alert.tsx +20 -7
  124. package/src/components/home/components.tsx +1 -0
  125. package/src/components/markdown/markdown-renderer.css +1 -1
  126. package/src/components/pages/run-page.tsx +1 -0
  127. package/src/components/slides/__tests__/minimap-actions.test.tsx +7 -7
  128. package/src/components/slides/__tests__/minimap.test.ts +12 -12
  129. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +8 -8
  130. package/src/components/static-html/__tests__/share-modal.test.tsx +154 -0
  131. package/src/components/static-html/__tests__/stage-for-publish.test.ts +111 -0
  132. package/src/components/static-html/share-modal.tsx +114 -144
  133. package/src/components/static-html/stage-for-publish.ts +56 -0
  134. package/src/components/static-html/static-banner.tsx +2 -2
  135. package/src/components/ui/links.tsx +6 -1
  136. package/src/components/ui/typography.tsx +16 -8
  137. package/src/core/ai/context/__tests__/registry.test.ts +31 -28
  138. package/src/core/ai/context/providers/cell-output.ts +8 -8
  139. package/src/core/ai/context/providers/datasource.ts +10 -7
  140. package/src/core/ai/context/providers/error.ts +7 -7
  141. package/src/core/ai/context/providers/file.ts +8 -8
  142. package/src/core/ai/context/providers/tables.ts +7 -7
  143. package/src/core/ai/context/providers/variable.ts +7 -7
  144. package/src/core/ai/context/registry.ts +18 -18
  145. package/src/core/ai/ids/ids.ts +5 -5
  146. package/src/core/ai/model-registry.ts +12 -9
  147. package/src/core/ai/staged-cells.ts +6 -6
  148. package/src/core/ai/tools/base.ts +6 -6
  149. package/src/core/ai/tools/edit-notebook-tool.ts +6 -6
  150. package/src/core/ai/tools/registry.ts +4 -4
  151. package/src/core/ai/tools/run-cells-tool.ts +7 -7
  152. package/src/core/ai/tools/sample-tool.ts +6 -6
  153. package/src/core/cells/__tests__/cells.test.ts +27 -0
  154. package/src/core/cells/cells.ts +2 -1
  155. package/src/core/codemirror/cells/debugger-decorations.ts +13 -7
  156. package/src/core/codemirror/cells/line-timing-decorations.ts +9 -9
  157. package/src/core/codemirror/cells/traceback-decorations.ts +7 -4
  158. package/src/core/codemirror/code-lens/extension.ts +13 -13
  159. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +6 -6
  160. package/src/core/codemirror/copilot/__tests__/transport.test.ts +12 -12
  161. package/src/core/codemirror/copilot/language-server.ts +13 -13
  162. package/src/core/codemirror/copilot/transport.ts +1 -1
  163. package/src/core/codemirror/find-replace/search-highlight.ts +5 -5
  164. package/src/core/codemirror/go-to-definition/underline.ts +3 -3
  165. package/src/core/codemirror/keymaps/vim.ts +3 -3
  166. package/src/core/codemirror/language/languages/markdown.ts +8 -8
  167. package/src/core/codemirror/language/languages/python.ts +7 -7
  168. package/src/core/codemirror/language/languages/sql/completion-builder.ts +5 -5
  169. package/src/core/codemirror/language/languages/sql/completion-store.ts +4 -4
  170. package/src/core/codemirror/language/languages/sql/sql.ts +21 -21
  171. package/src/core/codemirror/lsp/__tests__/transports.test.ts +10 -10
  172. package/src/core/codemirror/lsp/federated-lsp.ts +29 -27
  173. package/src/core/codemirror/lsp/notebook-lsp.ts +21 -21
  174. package/src/core/codemirror/misc/__tests__/dnd.test.ts +10 -10
  175. package/src/core/codemirror/misc/__tests__/paste.test.ts +7 -4
  176. package/src/core/codemirror/reactive-references/extension.ts +3 -3
  177. package/src/core/codemirror/rtc/loro/awareness.ts +12 -12
  178. package/src/core/codemirror/rtc/loro/sync.ts +5 -5
  179. package/src/core/codemirror/vim/cursor-visibility.ts +3 -3
  180. package/src/core/dom/ui-element.ts +5 -5
  181. package/src/core/dom/uiregistry.ts +10 -10
  182. package/src/core/hotkeys/hotkeys.ts +9 -9
  183. package/src/core/islands/__tests__/bridge.test.ts +4 -4
  184. package/src/core/islands/__tests__/test-utils.tsx +4 -4
  185. package/src/core/islands/bridge.ts +85 -82
  186. package/src/core/islands/components/web-components.tsx +7 -7
  187. package/src/core/islands/worker/__tests__/controller.test.ts +1 -1
  188. package/src/core/islands/worker/controller.ts +6 -3
  189. package/src/core/islands/worker-factory.ts +2 -2
  190. package/src/core/kernel/RuntimeState.ts +4 -4
  191. package/src/core/kernel/__tests__/session.test.ts +110 -1
  192. package/src/core/kernel/session.ts +46 -15
  193. package/src/core/lsp/__tests__/transport.test.ts +19 -19
  194. package/src/core/lsp/transport.ts +5 -5
  195. package/src/core/network/CachingRequestRegistry.ts +2 -2
  196. package/src/core/network/DeferredRequestRegistry.ts +4 -4
  197. package/src/core/network/__tests__/export-asset-url.test.ts +45 -0
  198. package/src/core/network/export-asset-url.ts +19 -0
  199. package/src/core/network/requests-network.ts +2 -7
  200. package/src/core/runtime/runtime.ts +25 -20
  201. package/src/core/static/virtual-file-tracker.ts +5 -5
  202. package/src/core/wasm/__tests__/bridge.test.ts +2 -2
  203. package/src/core/wasm/bridge.ts +132 -133
  204. package/src/core/wasm/router.ts +5 -5
  205. package/src/core/wasm/store.ts +4 -4
  206. package/src/core/wasm/worker/bootstrap.ts +8 -5
  207. package/src/core/wasm/worker/message-buffer.ts +3 -3
  208. package/src/core/websocket/transports/__tests__/ws.test.ts +8 -8
  209. package/src/core/websocket/transports/basic.ts +15 -8
  210. package/src/core/websocket/transports/sse.ts +7 -7
  211. package/src/core/websocket/transports/transport.ts +3 -3
  212. package/src/core/websocket/transports/ws.ts +9 -7
  213. package/src/css/globals.css +18 -21
  214. package/src/css/katex.min.css +260 -241
  215. package/src/hooks/__tests__/useOverflowDetection.test.tsx +5 -5
  216. package/src/hooks/__tests__/useResizeObserver.test.tsx +12 -12
  217. package/src/plugins/core/registerReactComponent.tsx +5 -5
  218. package/src/plugins/core/sidebar-element.tsx +2 -2
  219. package/src/plugins/impl/ButtonPlugin.tsx +3 -3
  220. package/src/plugins/impl/CheckboxPlugin.tsx +3 -3
  221. package/src/plugins/impl/CodeEditorPlugin.tsx +3 -3
  222. package/src/plugins/impl/DatePickerPlugin.tsx +3 -3
  223. package/src/plugins/impl/DateRangePlugin.tsx +3 -3
  224. package/src/plugins/impl/DateTimePickerPlugin.tsx +3 -3
  225. package/src/plugins/impl/DictPlugin.tsx +3 -3
  226. package/src/plugins/impl/DropdownPlugin.tsx +3 -3
  227. package/src/plugins/impl/FileUploadPlugin.tsx +3 -3
  228. package/src/plugins/impl/MatrixPlugin.tsx +4 -4
  229. package/src/plugins/impl/MicrophonePlugin.tsx +3 -3
  230. package/src/plugins/impl/MultiselectPlugin.tsx +3 -3
  231. package/src/plugins/impl/NumberPlugin.tsx +3 -3
  232. package/src/plugins/impl/RadioPlugin.tsx +9 -5
  233. package/src/plugins/impl/RangeSliderPlugin.tsx +3 -3
  234. package/src/plugins/impl/RefreshPlugin.tsx +3 -3
  235. package/src/plugins/impl/SliderPlugin.tsx +3 -3
  236. package/src/plugins/impl/SwitchPlugin.tsx +3 -3
  237. package/src/plugins/impl/TabsPlugin.tsx +3 -3
  238. package/src/plugins/impl/TextAreaPlugin.tsx +3 -3
  239. package/src/plugins/impl/TextInputPlugin.tsx +3 -3
  240. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +2 -2
  241. package/src/plugins/impl/anywidget/model.ts +10 -10
  242. package/src/plugins/impl/anywidget/registry.ts +12 -9
  243. package/src/plugins/impl/anywidget/runtime.ts +11 -9
  244. package/src/plugins/impl/anywidget/widget-binding.ts +6 -6
  245. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +7 -6
  246. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +3 -3
  247. package/src/plugins/impl/matplotlib/__tests__/matplotlib-renderer.test.ts +2 -2
  248. package/src/plugins/impl/matplotlib/matplotlib-renderer.ts +2 -2
  249. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +10 -10
  250. package/src/plugins/impl/panel/utils.ts +5 -5
  251. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +3 -3
  252. package/src/plugins/impl/vega/VegaPlugin.tsx +3 -3
  253. package/src/plugins/impl/vega/__tests__/use-vega-container-remeasure.test.ts +7 -7
  254. package/src/plugins/impl/vega/__tests__/utils.test.ts +16 -1
  255. package/src/plugins/impl/vega/__tests__/vega.test.ts +37 -0
  256. package/src/plugins/impl/vega/loader.ts +23 -1
  257. package/src/plugins/impl/vega/utils.ts +5 -4
  258. package/src/plugins/layout/AccordionPlugin.tsx +3 -3
  259. package/src/plugins/layout/CalloutPlugin.tsx +3 -3
  260. package/src/plugins/layout/ImageComparisonPlugin.tsx +5 -3
  261. package/src/plugins/layout/JsonOutputPlugin.tsx +3 -3
  262. package/src/plugins/layout/MimeRenderPlugin.tsx +3 -3
  263. package/src/plugins/layout/NavigationMenuPlugin.tsx +3 -3
  264. package/src/plugins/layout/OutlinePlugin.tsx +3 -3
  265. package/src/plugins/layout/ProgressPlugin.tsx +3 -3
  266. package/src/plugins/layout/RoutesPlugin.tsx +6 -8
  267. package/src/plugins/layout/StatPlugin.tsx +3 -3
  268. package/src/plugins/layout/TexPlugin.tsx +3 -3
  269. package/src/plugins/layout/carousel/CarouselPlugin.tsx +4 -4
  270. package/src/plugins/layout/mermaid/MermaidPlugin.tsx +3 -3
  271. package/src/utils/Deferred.ts +6 -6
  272. package/src/utils/async-capture-tracker.ts +10 -7
  273. package/src/utils/errors.ts +5 -5
  274. package/src/utils/id-tree.tsx +83 -80
  275. package/src/utils/lru.ts +1 -1
  276. package/src/utils/multi-map.ts +14 -12
  277. package/src/utils/paths.ts +6 -6
  278. package/src/utils/pluralize.ts +3 -3
  279. package/src/utils/progress.ts +6 -6
  280. package/src/utils/python-poet/poet.ts +14 -14
  281. package/src/utils/routes.ts +4 -2
  282. package/src/utils/semaphore.ts +6 -6
  283. package/src/utils/storage/storage.ts +6 -6
  284. package/src/utils/storage/typed.ts +16 -12
  285. package/src/utils/time.ts +9 -9
  286. package/src/utils/timed-cache.ts +4 -4
  287. package/src/utils/tracer.ts +9 -6
  288. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +0 -30
  289. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +0 -30
  290. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +0 -16
  291. package/dist/katex-DFBiSucW.js +0 -21840
  292. package/dist/label-BJ49YTvk.js +0 -30
  293. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +0 -30
  294. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +0 -30
@@ -1,15 +1,15 @@
1
- import "./chunk-75Z2AOVW-5_HsvXwr.js";
1
+ import "./chunk-75Z2AOVW-C4AOleKf.js";
2
2
  import { n as e } from "./src-CA_m4ONl.js";
3
3
  import { n as t } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
- import "./chunk-DU6HZSFF-BUgAHvnM.js";
5
- import "./chunk-P2QGCYS3-C0iGU29N.js";
6
- import "./chunk-PWAF6VOD-CTFCL0jI.js";
7
- import "./chunk-GMAD6QVW-Czynz8aA.js";
8
- import "./chunk-4HAMMTFA-D2qv8E0X.js";
9
- import "./chunk-GVQU2GXP-yQEdulRS.js";
10
- import "./chunk-L3NEJ4N5-DwRWnDDK.js";
11
- import { o as n } from "./chunk-OSK3NFVY-BBKU_Ign.js";
12
- import { c as r } from "./mermaid-DPNuhemn.js";
4
+ import "./chunk-DU6HZSFF-1TwWR6gh.js";
5
+ import "./chunk-P2QGCYS3-0TAWai9C.js";
6
+ import "./chunk-PWAF6VOD-lNxB9k8z.js";
7
+ import "./chunk-GMAD6QVW-vStrMz2P.js";
8
+ import "./chunk-4HAMMTFA-BPTTOOC5.js";
9
+ import "./chunk-GVQU2GXP-2HwWgs4u.js";
10
+ import "./chunk-L3NEJ4N5-RhC7i0I2.js";
11
+ import { o as n } from "./chunk-OSK3NFVY-CZV09N-U.js";
12
+ import { c as r } from "./mermaid-Dnzoxjt1.js";
13
13
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanes-42K2YHIH.mjs
14
14
  var i = 5, a = 1e-5, o = 1e-6;
15
15
  function s(e) {
@@ -0,0 +1,30 @@
1
+ import "./chunk-75Z2AOVW-C4AOleKf.js";
2
+ import "./src-CA_m4ONl.js";
3
+ import { n as e } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
4
+ import "./chunk-DU6HZSFF-1TwWR6gh.js";
5
+ import "./chunk-P2QGCYS3-0TAWai9C.js";
6
+ import "./chunk-PWAF6VOD-lNxB9k8z.js";
7
+ import "./chunk-GMAD6QVW-vStrMz2P.js";
8
+ import "./chunk-4HAMMTFA-BPTTOOC5.js";
9
+ import "./chunk-GVQU2GXP-2HwWgs4u.js";
10
+ import "./chunk-L3NEJ4N5-RhC7i0I2.js";
11
+ import "./chunk-OSK3NFVY-CZV09N-U.js";
12
+ import "./mermaid-Dnzoxjt1.js";
13
+ import "./chunk-F27PBJKO-DMI1PBe4.js";
14
+ import "./chunk-XXDRQBXY-Dnl5VBqG.js";
15
+ import "./chunk-POPQ4Y6H-Cc3_56GX.js";
16
+ import { r as t, t as n } from "./chunk-SHT3W25Y-CrEPyWy1.js";
17
+ //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-VR7AAH4N.mjs
18
+ var r = n({
19
+ defaultLayout: "swimlane",
20
+ styles: /* @__PURE__ */ e((e) => `${t(e)}
21
+ .swimlane.cluster rect {
22
+ stroke: ${e.clusterBorder} !important;
23
+ }
24
+ [data-look="neo"].cluster rect {
25
+ filter: none;
26
+ }
27
+ `, "getStyles")
28
+ });
29
+ //#endregion
30
+ export { r as diagram };
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "./arc-7ra3iNdN.js";
2
- import { p as t } from "./chunk-75Z2AOVW-5_HsvXwr.js";
2
+ import { p as t } from "./chunk-75Z2AOVW-C4AOleKf.js";
3
3
  import { n, t as r } from "./src-CA_m4ONl.js";
4
4
  import { n as i, t as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
5
- import { $ as o, J as s, a as c, b as l, et as u, nt as d, o as f, x as p } from "./chunk-DU6HZSFF-BUgAHvnM.js";
6
- import { p as m } from "./mermaid-DPNuhemn.js";
5
+ import { $ as o, J as s, a as c, b as l, et as u, nt as d, o as f, x as p } from "./chunk-DU6HZSFF-1TwWR6gh.js";
6
+ import { p as m } from "./mermaid-Dnzoxjt1.js";
7
7
  //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-24CTP7MA.mjs
8
8
  var h = (function() {
9
9
  var e = /* @__PURE__ */ i(function(e, t, n, r) {
@@ -2,9 +2,9 @@ import { t as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { g as t } from "./button-DdXAm8iz.js";
3
3
  import { t as n } from "./compiler-runtime-Cj8ZWiNS.js";
4
4
  import { g as r } from "./tooltip-qB8NlSqV.js";
5
- import { E as i, _ as a, a as o, b as s } from "./useTheme-DzXmYZ5V.js";
6
- import { t as c } from "./invariant-DLmrl-hA.js";
7
- var l = r("circle-question-mark", [
5
+ import { C as i, E as a, _ as o, a as s, b as c } from "./useTheme-DzXmYZ5V.js";
6
+ import { t as l } from "./invariant-DLmrl-hA.js";
7
+ var u = r("circle-question-mark", [
8
8
  ["circle", {
9
9
  cx: "12",
10
10
  cy: "12",
@@ -19,14 +19,18 @@ var l = r("circle-question-mark", [
19
19
  d: "M12 17h.01",
20
20
  key: "p32p05"
21
21
  }]
22
- ]);
23
- n();
24
- function u() {
22
+ ]), d = n();
23
+ function f(e, t) {
24
+ if (e == null) throw Error(t || `Expected value but got ${e}`);
25
+ }
26
+ //#endregion
27
+ //#region src/core/wasm/utils.ts
28
+ function p() {
25
29
  return typeof document < "u" && document.querySelector("marimo-wasm") !== null;
26
30
  }
27
31
  //#endregion
28
32
  //#region src/utils/Deferred.ts
29
- var d = class {
33
+ var m = class {
30
34
  promise;
31
35
  resolve;
32
36
  reject;
@@ -37,17 +41,36 @@ var d = class {
37
41
  this.reject = (e) => {
38
42
  this.status = "rejected", t(e);
39
43
  }, this.resolve = (t) => {
40
- this.status = "resolved", f(t) || (this.value = t), e(t);
44
+ this.status = "resolved", h(t) || (this.value = t), e(t);
41
45
  };
42
46
  });
43
47
  }
44
48
  };
45
- function f(e) {
49
+ function h(e) {
46
50
  return typeof e == "object" && !!e && "then" in e && typeof e.then == "function";
47
51
  }
48
52
  //#endregion
53
+ //#region src/core/mode.ts
54
+ function g() {
55
+ let e = o.get(v);
56
+ return f(e, "internal-error: initial mode not found"), l(e !== "present", "internal-error: initial mode cannot be 'present'"), e;
57
+ }
58
+ var _ = a({
59
+ mode: c() ? "read" : "not-set",
60
+ cellAnchor: null
61
+ }), v = a(void 0);
62
+ function y() {
63
+ let e = o.get(v);
64
+ return e !== "home" && e !== "gallery";
65
+ }
66
+ var b = a(!1);
67
+ function x() {
68
+ let e = (0, d.c)(1), { mode: t } = i(_), n = i(b), r;
69
+ return e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = new URLSearchParams(window.location.search).get(s.kiosk), e[0] = r) : r = e[0], t !== "read" && !n && r !== "true";
70
+ }
71
+ //#endregion
49
72
  //#region ../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js
50
- var p = /* @__PURE__ */ e(((e) => {
73
+ var S = /* @__PURE__ */ e(((e) => {
51
74
  Object.defineProperty(e, "__esModule", { value: !0 }), e.toBig = e.shrSL = e.shrSH = e.rotrSL = e.rotrSH = e.rotrBL = e.rotrBH = e.rotr32L = e.rotr32H = e.rotlSL = e.rotlSH = e.rotlBL = e.rotlBH = e.add5L = e.add5H = e.add4L = e.add4H = e.add3L = e.add3H = void 0, e.add = v, e.fromBig = r, e.split = i;
52
75
  var t = /* @__PURE__ */ BigInt(2 ** 32 - 1), n = /* @__PURE__ */ BigInt(32);
53
76
  function r(e, r = !1) {
@@ -135,11 +158,11 @@ var p = /* @__PURE__ */ e(((e) => {
135
158
  add5H: w,
136
159
  add5L: C
137
160
  };
138
- })), m = /* @__PURE__ */ e(((e) => {
161
+ })), C = /* @__PURE__ */ e(((e) => {
139
162
  Object.defineProperty(e, "__esModule", { value: !0 }), e.crypto = void 0, e.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
140
- })), h = /* @__PURE__ */ e(((e) => {
141
- Object.defineProperty(e, "__esModule", { value: !0 }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = n, e.anumber = r, e.abytes = i, e.ahash = a, e.aexists = o, e.aoutput = s, e.u8 = c, e.u32 = l, e.clean = u, e.createView = d, e.rotr = f, e.rotl = p, e.byteSwap = h, e.byteSwap32 = g, e.bytesToHex = y, e.hexToBytes = S, e.asyncLoop = C, e.utf8ToBytes = w, e.bytesToUtf8 = T, e.toBytes = E, e.kdfInputToBytes = D, e.concatBytes = O, e.checkOpts = k, e.createHasher = A, e.createOptHasher = j, e.createXOFer = M, e.randomBytes = N;
142
- var t = m();
163
+ })), w = /* @__PURE__ */ e(((e) => {
164
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.wrapXOFConstructorWithOpts = e.wrapConstructorWithOpts = e.wrapConstructor = e.Hash = e.nextTick = e.swap32IfBE = e.byteSwapIfBE = e.swap8IfBE = e.isLE = void 0, e.isBytes = n, e.anumber = r, e.abytes = i, e.ahash = a, e.aexists = o, e.aoutput = s, e.u8 = c, e.u32 = l, e.clean = u, e.createView = d, e.rotr = f, e.rotl = p, e.byteSwap = m, e.byteSwap32 = h, e.bytesToHex = v, e.hexToBytes = x, e.asyncLoop = S, e.utf8ToBytes = w, e.bytesToUtf8 = T, e.toBytes = E, e.kdfInputToBytes = D, e.concatBytes = O, e.checkOpts = k, e.createHasher = A, e.createOptHasher = j, e.createXOFer = M, e.randomBytes = N;
165
+ var t = C();
143
166
  function n(e) {
144
167
  return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
145
168
  }
@@ -182,23 +205,23 @@ var p = /* @__PURE__ */ e(((e) => {
182
205
  return e << t | e >>> 32 - t >>> 0;
183
206
  }
184
207
  e.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
185
- function h(e) {
208
+ function m(e) {
186
209
  return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
187
210
  }
188
- e.swap8IfBE = e.isLE ? (e) => e : (e) => h(e), e.byteSwapIfBE = e.swap8IfBE;
189
- function g(e) {
190
- for (let t = 0; t < e.length; t++) e[t] = h(e[t]);
211
+ e.swap8IfBE = e.isLE ? (e) => e : (e) => m(e), e.byteSwapIfBE = e.swap8IfBE;
212
+ function h(e) {
213
+ for (let t = 0; t < e.length; t++) e[t] = m(e[t]);
191
214
  return e;
192
215
  }
193
- e.swap32IfBE = e.isLE ? (e) => e : g;
194
- var _ = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", v = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
195
- function y(e) {
196
- if (i(e), _) return e.toHex();
216
+ e.swap32IfBE = e.isLE ? (e) => e : h;
217
+ var g = typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", _ = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
218
+ function v(e) {
219
+ if (i(e), g) return e.toHex();
197
220
  let t = "";
198
- for (let n = 0; n < e.length; n++) t += v[e[n]];
221
+ for (let n = 0; n < e.length; n++) t += _[e[n]];
199
222
  return t;
200
223
  }
201
- var b = {
224
+ var y = {
202
225
  _0: 48,
203
226
  _9: 57,
204
227
  A: 65,
@@ -206,19 +229,19 @@ var p = /* @__PURE__ */ e(((e) => {
206
229
  a: 97,
207
230
  f: 102
208
231
  };
209
- function x(e) {
210
- if (e >= b._0 && e <= b._9) return e - b._0;
211
- if (e >= b.A && e <= b.F) return e - (b.A - 10);
212
- if (e >= b.a && e <= b.f) return e - (b.a - 10);
232
+ function b(e) {
233
+ if (e >= y._0 && e <= y._9) return e - y._0;
234
+ if (e >= y.A && e <= y.F) return e - (y.A - 10);
235
+ if (e >= y.a && e <= y.f) return e - (y.a - 10);
213
236
  }
214
- function S(e) {
237
+ function x(e) {
215
238
  if (typeof e != "string") throw Error("hex string expected, got " + typeof e);
216
- if (_) return Uint8Array.fromHex(e);
239
+ if (g) return Uint8Array.fromHex(e);
217
240
  let t = e.length, n = t / 2;
218
241
  if (t % 2) throw Error("hex string expected, got unpadded hex of length " + t);
219
242
  let r = new Uint8Array(n);
220
243
  for (let t = 0, i = 0; t < n; t++, i += 2) {
221
- let n = x(e.charCodeAt(i)), a = x(e.charCodeAt(i + 1));
244
+ let n = b(e.charCodeAt(i)), a = b(e.charCodeAt(i + 1));
222
245
  if (n === void 0 || a === void 0) {
223
246
  let t = e[i] + e[i + 1];
224
247
  throw Error("hex string expected, got non-hex character \"" + t + "\" at index " + i);
@@ -228,7 +251,7 @@ var p = /* @__PURE__ */ e(((e) => {
228
251
  return r;
229
252
  }
230
253
  e.nextTick = async () => {};
231
- async function C(t, n, r) {
254
+ async function S(t, n, r) {
232
255
  let i = Date.now();
233
256
  for (let a = 0; a < t; a++) {
234
257
  r(a);
@@ -285,38 +308,38 @@ var p = /* @__PURE__ */ e(((e) => {
285
308
  if (t.crypto && typeof t.crypto.randomBytes == "function") return Uint8Array.from(t.crypto.randomBytes(e));
286
309
  throw Error("crypto.getRandomValues must be defined");
287
310
  }
288
- })), g = /* @__PURE__ */ e(((e) => {
289
- Object.defineProperty(e, "__esModule", { value: !0 }), e.shake256 = e.shake128 = e.keccak_512 = e.keccak_384 = e.keccak_256 = e.keccak_224 = e.sha3_512 = e.sha3_384 = e.sha3_256 = e.sha3_224 = e.Keccak = void 0, e.keccakP = y;
290
- var t = p(), n = h(), r = BigInt(0), i = BigInt(1), a = BigInt(2), o = BigInt(7), s = BigInt(256), c = BigInt(113), l = [], u = [], d = [];
311
+ })), T = /* @__PURE__ */ e(((e) => {
312
+ Object.defineProperty(e, "__esModule", { value: !0 }), e.shake256 = e.shake128 = e.keccak_512 = e.keccak_384 = e.keccak_256 = e.keccak_224 = e.sha3_512 = e.sha3_384 = e.sha3_256 = e.sha3_224 = e.Keccak = void 0, e.keccakP = _;
313
+ var t = S(), n = w(), r = BigInt(0), i = BigInt(1), a = BigInt(2), o = BigInt(7), s = BigInt(256), c = BigInt(113), l = [], u = [], d = [];
291
314
  for (let e = 0, t = i, n = 1, f = 0; e < 24; e++) {
292
315
  [n, f] = [f, (2 * n + 3 * f) % 5], l.push(2 * (5 * f + n)), u.push((e + 1) * (e + 2) / 2 % 64);
293
316
  let p = r;
294
317
  for (let e = 0; e < 7; e++) t = (t << i ^ (t >> o) * c) % s, t & a && (p ^= i << (i << /* @__PURE__ */ BigInt(e)) - i);
295
318
  d.push(p);
296
319
  }
297
- var f = (0, t.split)(d, !0), m = f[0], g = f[1], _ = (e, n, r) => r > 32 ? (0, t.rotlBH)(e, n, r) : (0, t.rotlSH)(e, n, r), v = (e, n, r) => r > 32 ? (0, t.rotlBL)(e, n, r) : (0, t.rotlSL)(e, n, r);
298
- function y(e, t = 24) {
320
+ var f = (0, t.split)(d, !0), p = f[0], m = f[1], h = (e, n, r) => r > 32 ? (0, t.rotlBH)(e, n, r) : (0, t.rotlSH)(e, n, r), g = (e, n, r) => r > 32 ? (0, t.rotlBL)(e, n, r) : (0, t.rotlSL)(e, n, r);
321
+ function _(e, t = 24) {
299
322
  let r = /* @__PURE__ */ new Uint32Array(10);
300
323
  for (let n = 24 - t; n < 24; n++) {
301
324
  for (let t = 0; t < 10; t++) r[t] = e[t] ^ e[t + 10] ^ e[t + 20] ^ e[t + 30] ^ e[t + 40];
302
325
  for (let t = 0; t < 10; t += 2) {
303
- let n = (t + 8) % 10, i = (t + 2) % 10, a = r[i], o = r[i + 1], s = _(a, o, 1) ^ r[n], c = v(a, o, 1) ^ r[n + 1];
326
+ let n = (t + 8) % 10, i = (t + 2) % 10, a = r[i], o = r[i + 1], s = h(a, o, 1) ^ r[n], c = g(a, o, 1) ^ r[n + 1];
304
327
  for (let n = 0; n < 50; n += 10) e[t + n] ^= s, e[t + n + 1] ^= c;
305
328
  }
306
329
  let t = e[2], i = e[3];
307
330
  for (let n = 0; n < 24; n++) {
308
- let r = u[n], a = _(t, i, r), o = v(t, i, r), s = l[n];
331
+ let r = u[n], a = h(t, i, r), o = g(t, i, r), s = l[n];
309
332
  t = e[s], i = e[s + 1], e[s] = a, e[s + 1] = o;
310
333
  }
311
334
  for (let t = 0; t < 50; t += 10) {
312
335
  for (let n = 0; n < 10; n++) r[n] = e[t + n];
313
336
  for (let n = 0; n < 10; n++) e[t + n] ^= ~r[(n + 2) % 10] & r[(n + 4) % 10];
314
337
  }
315
- e[0] ^= m[n], e[1] ^= g[n];
338
+ e[0] ^= p[n], e[1] ^= m[n];
316
339
  }
317
340
  (0, n.clean)(r);
318
341
  }
319
- var b = class e extends n.Hash {
342
+ var v = class e extends n.Hash {
320
343
  constructor(e, t, r, i = !1, a = 24) {
321
344
  if (super(), this.pos = 0, this.posOut = 0, this.finished = !1, this.destroyed = !1, this.enableXOF = !1, this.blockLen = e, this.suffix = t, this.outputLen = r, this.enableXOF = i, this.rounds = a, (0, n.anumber)(r), !(0 < e && e < 200)) throw Error("only keccak-f1600 function is supported");
322
345
  this.state = /* @__PURE__ */ new Uint8Array(200), this.state32 = (0, n.u32)(this.state);
@@ -325,7 +348,7 @@ var p = /* @__PURE__ */ e(((e) => {
325
348
  return this._cloneInto();
326
349
  }
327
350
  keccak() {
328
- (0, n.swap32IfBE)(this.state32), y(this.state32, this.rounds), (0, n.swap32IfBE)(this.state32), this.posOut = 0, this.pos = 0;
351
+ (0, n.swap32IfBE)(this.state32), _(this.state32, this.rounds), (0, n.swap32IfBE)(this.state32), this.posOut = 0, this.pos = 0;
329
352
  }
330
353
  update(e) {
331
354
  (0, n.aexists)(this), e = (0, n.toBytes)(e), (0, n.abytes)(e);
@@ -375,13 +398,13 @@ var p = /* @__PURE__ */ e(((e) => {
375
398
  return t ||= new e(n, r, i, o, a), t.state32.set(this.state32), t.pos = this.pos, t.posOut = this.posOut, t.finished = this.finished, t.rounds = a, t.suffix = r, t.outputLen = i, t.enableXOF = o, t.destroyed = this.destroyed, t;
376
399
  }
377
400
  };
378
- e.Keccak = b;
379
- var x = (e, t, r) => (0, n.createHasher)(() => new b(t, e, r));
380
- e.sha3_224 = x(6, 144, 28), e.sha3_256 = x(6, 136, 32), e.sha3_384 = x(6, 104, 48), e.sha3_512 = x(6, 72, 64), e.keccak_224 = x(1, 144, 28), e.keccak_256 = x(1, 136, 32), e.keccak_384 = x(1, 104, 48), e.keccak_512 = x(1, 72, 64);
381
- var S = (e, t, r) => (0, n.createXOFer)((n = {}) => new b(t, e, n.dkLen === void 0 ? r : n.dkLen, !0));
382
- e.shake128 = S(31, 168, 16), e.shake256 = S(31, 136, 32);
383
- })), _ = /* @__PURE__ */ e(((e, t) => {
384
- var { sha3_512: n } = g(), r = 24, i = 32, a = (e = 4, t = Math.random) => {
401
+ e.Keccak = v;
402
+ var y = (e, t, r) => (0, n.createHasher)(() => new v(t, e, r));
403
+ e.sha3_224 = y(6, 144, 28), e.sha3_256 = y(6, 136, 32), e.sha3_384 = y(6, 104, 48), e.sha3_512 = y(6, 72, 64), e.keccak_224 = y(1, 144, 28), e.keccak_256 = y(1, 136, 32), e.keccak_384 = y(1, 104, 48), e.keccak_512 = y(1, 72, 64);
404
+ var b = (e, t, r) => (0, n.createXOFer)((n = {}) => new v(t, e, n.dkLen === void 0 ? r : n.dkLen, !0));
405
+ e.shake128 = b(31, 168, 16), e.shake256 = b(31, 136, 32);
406
+ })), E = /* @__PURE__ */ e(((e, t) => {
407
+ var { sha3_512: n } = T(), r = 24, i = 32, a = (e = 4, t = Math.random) => {
385
408
  let n = "";
386
409
  for (; n.length < e;) n += Math.floor(t() * 36).toString(36);
387
410
  return n;
@@ -411,19 +434,19 @@ var p = /* @__PURE__ */ e(((e) => {
411
434
  defaultLength: r,
412
435
  bigLength: i
413
436
  }), t.exports.init = p, t.exports.createId = m, t.exports.bufToBigInt = o, t.exports.createCounter = d, t.exports.createFingerprint = u, t.exports.isCuid = h;
414
- })), v = /* @__PURE__ */ e(((e, t) => {
415
- var { createId: n, init: r, getConstants: i, isCuid: a } = _();
437
+ })), D = /* @__PURE__ */ e(((e, t) => {
438
+ var { createId: n, init: r, getConstants: i, isCuid: a } = E();
416
439
  t.exports.createId = n, t.exports.init = r, t.exports.getConstants = i, t.exports.isCuid = a;
417
- })), y = v();
418
- function b(e) {
440
+ })), O = D();
441
+ function k(e) {
419
442
  let t = new URL(window.location.href);
420
443
  e(t.searchParams), window.history.replaceState({}, "", t.toString());
421
444
  }
422
- var x = /^(https?:\/\/\S+)$/;
423
- function S(e) {
424
- return typeof e == "string" && x.test(e);
445
+ var A = /^(https?:\/\/\S+)$/;
446
+ function j(e) {
447
+ return typeof e == "string" && A.test(e);
425
448
  }
426
- function C({ href: e, queryParams: t, keys: n }) {
449
+ function M({ href: e, queryParams: t, keys: n }) {
427
450
  let r = typeof t == "string" ? new URLSearchParams(t) : t;
428
451
  if (r.size === 0 || e.startsWith("http://") || e.startsWith("https://")) return e;
429
452
  let i = e.startsWith("#"), a = i && e.includes("?");
@@ -444,49 +467,54 @@ function C({ href: e, queryParams: t, keys: n }) {
444
467
  }
445
468
  //#endregion
446
469
  //#region src/core/kernel/session.ts
447
- var w = (0, y.init)({ length: 6 });
448
- function T() {
449
- return `s_${w()}`;
470
+ var N = (0, O.init)({ length: 6 });
471
+ function P() {
472
+ return `s_${N()}`;
450
473
  }
451
- function E(e) {
474
+ function F(e) {
452
475
  return e ? /^s_[\da-z]{6}$/.test(e) : !1;
453
476
  }
454
- var D = (() => {
455
- let e = new URL(window.location.href).searchParams.get(o.sessionId);
456
- return E(e) ? (b((e) => {
457
- e.has(o.kiosk) || e.delete(o.sessionId);
458
- }), t.debug("Connecting to existing session", { sessionId: e }), e) : (t.debug("Starting a new session", { sessionId: e }), T());
459
- })();
460
- function O() {
461
- return D;
477
+ var I = null;
478
+ function L() {
479
+ let e = o.get(v) === "edit", n = new URL(window.location.href).searchParams.get(s.sessionId), r = F(n) ? n : null;
480
+ return k((t) => {
481
+ if (!e) {
482
+ t.delete(s.sessionId), t.delete(s.kiosk);
483
+ return;
484
+ }
485
+ t.has(s.kiosk) || t.delete(s.sessionId);
486
+ }), r === null ? (t.debug("Starting a new session", { sessionId: n }), P()) : e ? (t.debug("Connecting to existing session", { sessionId: r }), r) : (t.debug("Ignoring session_id from URL outside the editor", { sessionId: r }), P());
487
+ }
488
+ function R() {
489
+ return I === null && (I = L()), I;
462
490
  }
463
491
  //#endregion
464
492
  //#region src/core/static/static-state.ts
465
- function k(e) {
493
+ function z(e) {
466
494
  if (typeof e != "object" || !e || Array.isArray(e)) return !1;
467
495
  for (let t of Object.values(e)) if (typeof t != "string") return !1;
468
496
  return !0;
469
497
  }
470
- function A(e) {
498
+ function B(e) {
471
499
  if (typeof e != "object" || !e || Array.isArray(e)) return !1;
472
500
  let t = e;
473
- return !(!k(t.files) || t.modelNotifications !== void 0 && !Array.isArray(t.modelNotifications));
501
+ return !(!z(t.files) || t.modelNotifications !== void 0 && !Array.isArray(t.modelNotifications));
474
502
  }
475
- function j() {
503
+ function V() {
476
504
  let e = typeof window > "u" ? void 0 : window.__MARIMO_STATIC__;
477
- return A(e) ? e : void 0;
505
+ return B(e) ? e : void 0;
478
506
  }
479
- function M() {
480
- return j() !== void 0;
507
+ function H() {
508
+ return V() !== void 0;
481
509
  }
482
- function N() {
483
- let e = j();
484
- return c(e !== void 0, "Not a static notebook"), e.files;
510
+ function U() {
511
+ let e = V();
512
+ return l(e !== void 0, "Not a static notebook"), e.files;
485
513
  }
486
514
  //#endregion
487
515
  //#region src/core/runtime/runtime.ts
488
- var P = class {
489
- initialHealthyCheck = new d();
516
+ var W = class {
517
+ initialHealthyCheck = new m();
490
518
  config;
491
519
  lazy;
492
520
  constructor(e, t = !1) {
@@ -508,23 +536,23 @@ var P = class {
508
536
  return this.httpURL.origin === window.location.origin;
509
537
  }
510
538
  get isServerless() {
511
- return u() || s() || M();
539
+ return p() || c() || H();
512
540
  }
513
541
  formatHttpURL({ path: e = "", searchParams: t, restrictToKnownQueryParams: n = !0 }) {
514
542
  let r = this.httpURL, i = new URLSearchParams(window.location.search);
515
543
  if (t) for (let [e, n] of t.entries()) r.searchParams.set(e, n);
516
- for (let [e, t] of i.entries()) n && !Object.values(o).includes(e) || r.searchParams.set(e, t);
544
+ for (let [e, t] of i.entries()) n && !Object.values(s).includes(e) || r.searchParams.set(e, t);
517
545
  return r.pathname = `${r.pathname.replace(/\/$/, "")}/${e.replace(/^\//, "")}`, r.hash = "", r;
518
546
  }
519
547
  appendCrossOriginAuth(e) {
520
- return !this.isSameOrigin && this.config.authToken && e.searchParams.set(o.accessToken, this.config.authToken), e;
548
+ return !this.isSameOrigin && this.config.authToken && e.searchParams.set(s.accessToken, this.config.authToken), e;
521
549
  }
522
550
  formatNavigableHttpURL(e, t) {
523
551
  let n = this.formatHttpURL({
524
552
  path: e,
525
553
  searchParams: t
526
554
  });
527
- return n.searchParams.delete(o.accessToken), this.appendCrossOriginAuth(n);
555
+ return n.searchParams.delete(s.accessToken), this.appendCrossOriginAuth(n);
528
556
  }
529
557
  formatWsURL(e, t) {
530
558
  let n = this.formatHttpURL({
@@ -532,13 +560,13 @@ var P = class {
532
560
  searchParams: t,
533
561
  restrictToKnownQueryParams: !1
534
562
  });
535
- return F(this.appendCrossOriginAuth(n).toString());
563
+ return G(this.appendCrossOriginAuth(n).toString());
536
564
  }
537
565
  getSessionSearchParams(e) {
538
566
  let t = new URL(this.config.url), n = new URLSearchParams(t.search);
539
567
  return new URLSearchParams(window.location.search).forEach((e, t) => {
540
568
  n.has(t) || n.set(t, e);
541
- }), n.set(o.sessionId, e), n;
569
+ }), n.set(s.sessionId, e), n;
542
570
  }
543
571
  getWsURL(e) {
544
572
  return this.formatWsURL("/ws", this.getSessionSearchParams(e));
@@ -549,7 +577,7 @@ var P = class {
549
577
  searchParams: this.getSessionSearchParams(e),
550
578
  restrictToKnownQueryParams: !1
551
579
  });
552
- return t.searchParams.delete(o.accessToken), t;
580
+ return t.searchParams.delete(s.accessToken), t;
553
581
  }
554
582
  getWsSyncURL(e) {
555
583
  return this.formatWsURL("/ws_sync", this.getSessionSearchParams(e));
@@ -560,8 +588,8 @@ var P = class {
560
588
  }
561
589
  getLSPURL(e) {
562
590
  if (e === "copilot") {
563
- let t = this.formatWsURL(`/lsp/${e}`), n = t.searchParams.get(o.accessToken);
564
- return t.search = "", n && t.searchParams.set(o.accessToken, n), t;
591
+ let t = this.formatWsURL(`/lsp/${e}`), n = t.searchParams.get(s.accessToken);
592
+ return t.search = "", n && t.searchParams.set(s.accessToken, n), t;
565
593
  }
566
594
  return this.formatWsURL(`/lsp/${e}`);
567
595
  }
@@ -618,17 +646,17 @@ var P = class {
618
646
  }
619
647
  headers() {
620
648
  let e = {
621
- "Marimo-Session-Id": O(),
649
+ "Marimo-Session-Id": R(),
622
650
  "Marimo-Server-Token": this.config.serverToken ?? "",
623
651
  "x-runtime-url": this.httpURL.toString()
624
652
  };
625
653
  return this.config.authToken && (e.Authorization = `Bearer ${this.config.authToken}`), e;
626
654
  }
627
655
  sessionHeaders() {
628
- return { "Marimo-Session-Id": O() };
656
+ return { "Marimo-Session-Id": R() };
629
657
  }
630
658
  };
631
- function F(e) {
659
+ function G(e) {
632
660
  if (!e.startsWith("http")) {
633
661
  t.warn(`URL must start with http: ${e}`);
634
662
  let n = new URL(e);
@@ -638,39 +666,39 @@ function F(e) {
638
666
  }
639
667
  //#endregion
640
668
  //#region src/core/runtime/config.ts
641
- function I() {
669
+ function K() {
642
670
  let e = new URL(document.baseURI);
643
671
  return e.search = "", e.hash = "", e.toString();
644
672
  }
645
- var L = {
673
+ var q = {
646
674
  lazy: !0,
647
- url: I()
648
- }, R = i(L), z = i((e) => {
649
- let t = e(R);
650
- return new P(t, t.lazy);
675
+ url: K()
676
+ }, J = a(q), Y = a((e) => {
677
+ let t = e(J);
678
+ return new W(t, t.lazy);
651
679
  });
652
- function B() {
653
- return a.get(z);
680
+ function X() {
681
+ return o.get(Y);
654
682
  }
655
- function V(e) {
683
+ function ee(e) {
656
684
  if (e.startsWith("http")) return new URL(e);
657
- let t = B().httpURL.toString();
685
+ let t = X().httpURL.toString();
658
686
  return t.startsWith("blob:") && (t = t.replace("blob:", "")), new URL(e, t);
659
687
  }
660
688
  //#endregion
661
689
  //#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constants.js
662
- var H = 365.2425, U = 6048e5, W = 864e5, G = 6e4, K = 36e5, q = 1e3, J = 86400;
663
- J * 7, J * H / 12 * 3;
664
- var Y = Symbol.for("constructDateFrom");
690
+ var te = 365.2425, ne = 6048e5, re = 864e5, ie = 6e4, ae = 36e5, oe = 1e3, Z = 86400;
691
+ Z * 7, Z * te / 12 * 3;
692
+ var Q = Symbol.for("constructDateFrom");
665
693
  //#endregion
666
694
  //#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/constructFrom.js
667
- function X(e, t) {
668
- return typeof e == "function" ? e(t) : e && typeof e == "object" && Y in e ? e[Y](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
695
+ function $(e, t) {
696
+ return typeof e == "function" ? e(t) : e && typeof e == "object" && Q in e ? e[Q](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
669
697
  }
670
698
  //#endregion
671
699
  //#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/toDate.js
672
- function Z(e, t) {
673
- return X(t || e, e);
700
+ function se(e, t) {
701
+ return $(t || e, e);
674
702
  }
675
703
  //#endregion
676
- export { u as _, G as a, V as c, M as d, C as f, d as g, v as h, K as i, B as l, b as m, X as n, q as o, S as p, W as r, U as s, Z as t, N as u, l as v };
704
+ export { p as C, m as S, u as T, v as _, ie as a, x as b, ee as c, H as d, M as f, g, D as h, ae as i, X as l, k as m, $ as n, oe as o, j as p, re as r, ne as s, se as t, U as u, y as v, f as w, _ as x, b as y };