@datalayer/agent-runtimes 1.5.20 → 1.5.21

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 (277) hide show
  1. package/dist-embed/chunks/{AgentDetails-DZyyuD5F.js → AgentDetails-C7tCazwB.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-DaQyQxlm.js → AgentDetailsDialog-Cwps4GeH.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-CBNiiRtv.js → AgentInspector-Gk7jbg8t.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-BxMOAc7K.js → AgentInspectorDialog-BSSDOFrT.js} +1 -1
  5. package/dist-embed/chunks/{CellSidebarExtension-Dwe7PfXi.js → CellSidebarExtension-p2BAkwis.js} +9 -9
  6. package/dist-embed/chunks/ChatView-fHb_i4kH.js +32 -0
  7. package/dist-embed/chunks/{ContextPie-n1y886z-.js → ContextPie-bd_YOjzP.js} +1 -1
  8. package/dist-embed/chunks/{DeckComponent-BSeEBNHt.js → DeckComponent-4gxuEH4A.js} +2 -2
  9. package/dist-embed/chunks/{DocumentView-OIdQEk_n.js → DocumentView-BZSYqTh_.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralDocument-C-uLD1W7.js → EphemeralDocument-Cevnk5OF.js} +1 -1
  11. package/dist-embed/chunks/{EphemeralNotebook-C_peDfqf.js → EphemeralNotebook-JvALIbK2.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawComponent-DHSxnPc9.js → ExcalidrawComponent-CbghNk-F.js} +1 -1
  13. package/dist-embed/chunks/{ExcalidrawModal-BpsfNG-u.js → ExcalidrawModal-BOVvWzYQ.js} +1 -1
  14. package/dist-embed/chunks/{JupyterLexicalExtension-BUSLnJVL.js → JupyterLexicalExtension-CRccZ2h7.js} +29 -29
  15. package/dist-embed/chunks/{KernelVariables-Cu7UeFhT.js → KernelVariables-ompObBEM.js} +1 -1
  16. package/dist-embed/chunks/{LexicalToolRegistry-CNg1T5sQ.js → LexicalToolRegistry-BlBEZPP4.js} +4 -4
  17. package/dist-embed/chunks/{NotebookToolSurfaces-Cm6-oE_W.js → NotebookToolSurfaces-DP8sWqVy.js} +1 -1
  18. package/dist-embed/chunks/{NotebookView-Be2lNZjS.js → NotebookView-DC6BDVEp.js} +1 -1
  19. package/dist-embed/chunks/{Output-OIgTyxpD.js → Output-C4hBhZ5k.js} +1 -1
  20. package/dist-embed/chunks/{SandboxDetailsDialog-BMq0tlcE.js → SandboxDetailsDialog-CX8wvCLJ.js} +1 -1
  21. package/dist-embed/chunks/{SchemaForm-D3mmq2C1.js → SchemaForm-BuhXDyz6.js} +1 -1
  22. package/dist-embed/chunks/{WidgetVariableView-DnuwkCHl.js → WidgetVariableView-C2X5Ehcg.js} +1 -1
  23. package/dist-embed/chunks/{YouTubePlugin-Bum16ua6.js → YouTubePlugin-CjgOnMCz.js} +1 -1
  24. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BMkFygW4.js → abnfDiagram-VCTEODGH-kzVu7pzT.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Dac38D-P.js → abnfDiagram-VCTEODGH-wvUaPpVC.js} +1 -1
  26. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-JDFjD_Dk.js → ar-SA-G6X2FPQ2-ArgZTGSp.js} +1 -1
  27. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DXJTBh9S.js → architectureDiagram-5GKGNRK7-CwbfxDHw.js} +1 -1
  28. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-D7VBU0uf.js → architectureDiagram-5GKGNRK7-DVZUrWEx.js} +1 -1
  29. package/dist-embed/chunks/{az-AZ-76LH7QW2-AbN1w5Zy.js → az-AZ-76LH7QW2-DQgz6n32.js} +1 -1
  30. package/dist-embed/chunks/{bg-BG-XCXSNQG7-BULkJsTf.js → bg-BG-XCXSNQG7-Cx0dPt6-.js} +1 -1
  31. package/dist-embed/chunks/{blockDiagram-868be97b-Bk9MNjmt.js → blockDiagram-868be97b-DEQh5CUO.js} +1 -1
  32. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CKjKQ6Dq.js → blockDiagram-I7D4REHJ-C6gbEBfg.js} +1 -1
  33. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BwenaP7n.js → blockDiagram-I7D4REHJ-DUIcpkIN.js} +1 -1
  34. package/dist-embed/chunks/{bn-BD-2XOGV67Q-B6EtUyIk.js → bn-BD-2XOGV67Q-BkekmuYO.js} +1 -1
  35. package/dist-embed/chunks/{c4Diagram-3f4bdde3-BGoSdP5p.js → c4Diagram-3f4bdde3-CUcRctJE.js} +1 -1
  36. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DlkcVfDa.js → c4Diagram-7LVT6UL2-DSQiEaxC.js} +1 -1
  37. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BZRokUDB.js → c4Diagram-7LVT6UL2-f7UaZWVg.js} +1 -1
  38. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BZ0wzUck.js → ca-ES-6MX7JW3Y-Yr14RtMP.js} +1 -1
  39. package/dist-embed/chunks/{celltoolbartracker-CCRqu43G.js → celltoolbartracker-Bx9x9aeh.js} +1 -1
  40. package/dist-embed/chunks/{chunk-2Q5K7J3B-CfYiHpfd.js → chunk-2Q5K7J3B-BBPiCQqO.js} +1 -1
  41. package/dist-embed/chunks/{chunk-2Q5K7J3B-DLu9zZx0.js → chunk-2Q5K7J3B-DbzMjK_L.js} +1 -1
  42. package/dist-embed/chunks/{chunk-5VM5RSS4-yHAygNq4.js → chunk-5VM5RSS4-CcNPo9qP.js} +1 -1
  43. package/dist-embed/chunks/{chunk-5VM5RSS4-dV5IUPYK.js → chunk-5VM5RSS4-rEZEdbpi.js} +1 -1
  44. package/dist-embed/chunks/{chunk-F27PBJKO-BeY8iI19.js → chunk-F27PBJKO-BH7lDumP.js} +1 -1
  45. package/dist-embed/chunks/{chunk-F27PBJKO-BArvzx7H.js → chunk-F27PBJKO-DTgjd0wN.js} +1 -1
  46. package/dist-embed/chunks/{chunk-IMKFNOWR-iUeFNxCU.js → chunk-IMKFNOWR-BA-vmq_V.js} +1 -1
  47. package/dist-embed/chunks/{chunk-IMKFNOWR-BJRUyuXy.js → chunk-IMKFNOWR-DuzpuE1w.js} +1 -1
  48. package/dist-embed/chunks/{chunk-JWPE2WC7-BDUBU4vN.js → chunk-JWPE2WC7-BfRI4eJ2.js} +1 -1
  49. package/dist-embed/chunks/{chunk-JWPE2WC7-Djk-1JPJ.js → chunk-JWPE2WC7-CAdvd3EQ.js} +1 -1
  50. package/dist-embed/chunks/{chunk-POPQ4Y6H-E4731IOt.js → chunk-POPQ4Y6H-B7pT6rUf.js} +1 -1
  51. package/dist-embed/chunks/{chunk-POPQ4Y6H-CibXbz_c.js → chunk-POPQ4Y6H-Dw1h_9lT.js} +1 -1
  52. package/dist-embed/chunks/{chunk-SVP7TREG-DeRyA6Ek.js → chunk-SVP7TREG-BxpYXJab.js} +1 -1
  53. package/dist-embed/chunks/{chunk-SVP7TREG-o7JviCXQ.js → chunk-SVP7TREG-VsO48dck.js} +1 -1
  54. package/dist-embed/chunks/{chunk-TICWLB2K-BIhZcpwn.js → chunk-TICWLB2K-CU2oQRJ9.js} +1 -1
  55. package/dist-embed/chunks/{chunk-TICWLB2K-Zk_gUXIu.js → chunk-TICWLB2K-LCiyX33a.js} +1 -1
  56. package/dist-embed/chunks/{chunk-XXDRQBXY-DATpHkZD.js → chunk-XXDRQBXY-CL1cUI4w.js} +1 -1
  57. package/dist-embed/chunks/{chunk-XXDRQBXY-Cp6f69YK.js → chunk-XXDRQBXY-islJGiCO.js} +1 -1
  58. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DcutslOq.js → classDiagram-ZZMXUADV-C7-Ca_nP.js} +1 -1
  59. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BfpWJKcC.js → classDiagram-ZZMXUADV-Ctw7VU-m.js} +1 -1
  60. package/dist-embed/chunks/{classDiagram-f62afe4f-BVLyWZwA.js → classDiagram-f62afe4f-BaJUb6H9.js} +1 -1
  61. package/dist-embed/chunks/{classDiagram-v2-604399ef-CgcAzr_L.js → classDiagram-v2-604399ef-s6LKeK41.js} +1 -1
  62. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DcutslOq.js → classDiagram-v2-VYDZK3BY-C7-Ca_nP.js} +1 -1
  63. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BfpWJKcC.js → classDiagram-v2-VYDZK3BY-Ctw7VU-m.js} +1 -1
  64. package/dist-embed/chunks/{code-block-IT6T5CEO-D5_yhrdD.js → code-block-IT6T5CEO-BieLU8ls.js} +1 -1
  65. package/dist-embed/chunks/{component-DoyMsR16.js → component-p2xkjXeh.js} +3 -3
  66. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B-LvsoyE.js → cose-bilkent-JH36ORCC-BkezndW_.js} +1 -1
  67. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DhPsWJev.js → cose-bilkent-JH36ORCC-DrOmRWVI.js} +1 -1
  68. package/dist-embed/chunks/{createText-aed3d8b3-CnP7VdTn.js → createText-aed3d8b3-Dw8k7JC8.js} +1 -1
  69. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CHIiQJ-9.js → cs-CZ-2BRQDIVT-DYR-S6bD.js} +1 -1
  70. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D4zzGd7W.js → cynefinDiagram-5FMLGOSQ-DqoI6t3s.js} +1 -1
  71. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B4k-OykO.js → cynefinDiagram-5FMLGOSQ-qZ6StjuY.js} +1 -1
  72. package/dist-embed/chunks/{da-DK-5WZEPLOC-dfN2SAKQ.js → da-DK-5WZEPLOC-DhaHIgKI.js} +1 -1
  73. package/dist-embed/chunks/{dagre-GXQ25YYZ-DUrWhbsC.js → dagre-GXQ25YYZ-Bb0_WA3x.js} +1 -1
  74. package/dist-embed/chunks/{dagre-GXQ25YYZ-BlWkzzlo.js → dagre-GXQ25YYZ-pcAHu_bK.js} +1 -1
  75. package/dist-embed/chunks/{de-DE-XR44H4JA-BKsKfmfo.js → de-DE-XR44H4JA-CJpRH2Fy.js} +1 -1
  76. package/dist-embed/chunks/{diagram-S7CK7UJ4-FxHXDIYr.js → diagram-S7CK7UJ4-CwINt91M.js} +1 -1
  77. package/dist-embed/chunks/{diagram-S7CK7UJ4-BuRBzTwI.js → diagram-S7CK7UJ4-W17wgXHY.js} +1 -1
  78. package/dist-embed/chunks/{diagram-UQ7AKVKN-FxYHrvzF.js → diagram-UQ7AKVKN-CXRpfLBt.js} +1 -1
  79. package/dist-embed/chunks/{diagram-UQ7AKVKN-CeDT8Vz4.js → diagram-UQ7AKVKN-mH7QBO8y.js} +1 -1
  80. package/dist-embed/chunks/{diagram-VSXAHHWV-Cv0WAiv8.js → diagram-VSXAHHWV-Bg68Bv82.js} +1 -1
  81. package/dist-embed/chunks/{diagram-VSXAHHWV-C2icUdkA.js → diagram-VSXAHHWV-CFHqpDaB.js} +1 -1
  82. package/dist-embed/chunks/{diagram-VX7I27RA-D6VPVMhu.js → diagram-VX7I27RA-BEO0D7jE.js} +1 -1
  83. package/dist-embed/chunks/{diagram-VX7I27RA-AoxkG7BW.js → diagram-VX7I27RA-DQ6XlKLw.js} +1 -1
  84. package/dist-embed/chunks/{diagram-Z3DM3KII-DxunLDOr.js → diagram-Z3DM3KII-BLJQK61P.js} +1 -1
  85. package/dist-embed/chunks/{diagram-Z3DM3KII-CHxtPQ6F.js → diagram-Z3DM3KII-Cenqf76m.js} +1 -1
  86. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CfsTBJc5.js → ebnfDiagram-PWID7BFC-6H6OSebp.js} +1 -1
  87. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CmJlfM6d.js → ebnfDiagram-PWID7BFC-Cqmnghct.js} +1 -1
  88. package/dist-embed/chunks/{edges-b2856ca0-Cl5rq6T8.js → edges-b2856ca0-ChO7JKaP.js} +1 -1
  89. package/dist-embed/chunks/{el-GR-BZB4AONW-Cs0zPSU1.js → el-GR-BZB4AONW-DPGB1p8K.js} +1 -1
  90. package/dist-embed/chunks/{erDiagram-5d81789a-C0jmz-br.js → erDiagram-5d81789a-jzhAXdZi.js} +1 -1
  91. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-Dyljy6tN.js → erDiagram-RLTQ6QDP-DEAWMrMT.js} +1 -1
  92. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-FFD_URlX.js → erDiagram-RLTQ6QDP-hAbP0vV0.js} +1 -1
  93. package/dist-embed/chunks/{es-ES-U4NZUMDT-fGOqRf0o.js → es-ES-U4NZUMDT-CLztgM3g.js} +1 -1
  94. package/dist-embed/chunks/{eu-ES-A7QVB2H4-CLZ09rVe.js → eu-ES-A7QVB2H4--ffZf65_.js} +1 -1
  95. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Cjimbc8n.js → fa-IR-HGAKTJCU-Cwwej6FC.js} +1 -1
  96. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-ZXNEW916.js → fi-FI-Z5N7JZ37-Tw-dUSxy.js} +1 -1
  97. package/dist-embed/chunks/{flowDb-185abca5-Cden9aoH.js → flowDb-185abca5-DDUaXZ_Q.js} +1 -1
  98. package/dist-embed/chunks/{flowDiagram-1629c991-Bar9YxSW.js → flowDiagram-1629c991-DpvDtFPK.js} +1 -1
  99. package/dist-embed/chunks/{flowDiagram-HODETNUW-bg09n0_F.js → flowDiagram-HODETNUW-DENY4Bvt.js} +1 -1
  100. package/dist-embed/chunks/{flowDiagram-HODETNUW-02Xo2-6n.js → flowDiagram-HODETNUW-Hr-elwWq.js} +1 -1
  101. package/dist-embed/chunks/{flowDiagram-v2-1d953310-C6FnOAb2.js → flowDiagram-v2-1d953310-TxFSXMN7.js} +1 -1
  102. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-DcmMV2Wi.js → flowchart-elk-definition-6df44142-BGFxwidp.js} +1 -1
  103. package/dist-embed/chunks/{fr-FR-RHASNOE6-DQaq_g67.js → fr-FR-RHASNOE6-CT1NyjSV.js} +1 -1
  104. package/dist-embed/chunks/{ganttDiagram-3b0b3873-BN61xNrz.js → ganttDiagram-3b0b3873-DJqKtGUz.js} +1 -1
  105. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BCLyiaOJ.js → ganttDiagram-EL5Y4UJY-3bErrKpg.js} +1 -1
  106. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-JviVPOnF.js → ganttDiagram-EL5Y4UJY-Ddh9hVkO.js} +1 -1
  107. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CzBMuAvA.js → gitGraphDiagram-WWUBYQGX-B3BVHs36.js} +1 -1
  108. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CNc3l-2t.js → gitGraphDiagram-WWUBYQGX-BiEolUQH.js} +1 -1
  109. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-7ecaKDp7.js → gitGraphDiagram-f01e8bc2-vOvP_sU8.js} +1 -1
  110. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BlrLF7Sk.js → gl-ES-HMX3MZ6V-BKTaXj_2.js} +1 -1
  111. package/dist-embed/chunks/{he-IL-6SHJWFNN-DLfo2nov.js → he-IL-6SHJWFNN-BJ5SwTG5.js} +1 -1
  112. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-BcbS0I1h.js → hi-IN-IWLTKZ5I-D5ZQxogx.js} +1 -1
  113. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-B_-3TehM.js → hu-HU-A5ZG7DT2-CoAAAzpy.js} +1 -1
  114. package/dist-embed/chunks/{id-ID-SAP4L64H-C920eBs5.js → id-ID-SAP4L64H-DFWbGjYj.js} +1 -1
  115. package/dist-embed/chunks/{index-D_-7qr4x.js → index-1MXuxaax.js} +1 -1
  116. package/dist-embed/chunks/{index-CGhVy6OJ.js → index-6feFd5AZ.js} +1 -1
  117. package/dist-embed/chunks/{index-MNZ1LVAM.js → index-8Jy3Vws8.js} +6 -6
  118. package/dist-embed/chunks/{index-9bae90f3-_mZDJyzh.js → index-9bae90f3-YA-Pbv-C.js} +1 -1
  119. package/dist-embed/chunks/{index-C2UmIEOV.js → index-B0MhQWhs.js} +1 -1
  120. package/dist-embed/chunks/{index-DcbXB4Ou.js → index-B0omKuYl.js} +1 -1
  121. package/dist-embed/chunks/{index-CLojGXLe.js → index-B8y71UkT.js} +1 -1
  122. package/dist-embed/chunks/{index-DmKOrT_f.js → index-B9vBhR-p.js} +1 -1
  123. package/dist-embed/chunks/{index-B3qU5V3s.js → index-BL4KuFQP.js} +1 -1
  124. package/dist-embed/chunks/{index-BMqDh5WU.js → index-BNFZYAJT.js} +1 -1
  125. package/dist-embed/chunks/{index-BVkaRzYN.js → index-BTeNnRc_.js} +1 -1
  126. package/dist-embed/chunks/{index-W-qUA31l.js → index-BVzIb3Wy.js} +1 -1
  127. package/dist-embed/chunks/{index-D1CRwrf9.js → index-BfMo5nXi.js} +2 -2
  128. package/dist-embed/chunks/{index-C3p2Hbbg.js → index-BgWf1G8H.js} +1 -1
  129. package/dist-embed/chunks/{index-C3zGthUI.js → index-BuyZwxeT.js} +1 -1
  130. package/dist-embed/chunks/{index-7V4MgoX0.js → index-BzQxauhZ.js} +1 -1
  131. package/dist-embed/chunks/{index-Dyv67BU9.js → index-C7os26P7.js} +2 -2
  132. package/dist-embed/chunks/{index-BbtA7ppb.js → index-CCA_V9Td.js} +1 -1
  133. package/dist-embed/chunks/{index-oJ3M8HYJ.js → index-CIDdX0nc.js} +1 -1
  134. package/dist-embed/chunks/{index-C8N5z7FZ.js → index-CkOZcvYl.js} +1 -1
  135. package/dist-embed/chunks/{index-DV2fNvY7.js → index-CxIZHPCc.js} +1 -1
  136. package/dist-embed/chunks/{index-BST3vALX.js → index-D62kZnWZ.js} +3 -3
  137. package/dist-embed/chunks/{index-CuqMWXgT.js → index-DMf0f7ny.js} +3 -3
  138. package/dist-embed/chunks/{index-OZDJ7kli.js → index-DPzPvDBn.js} +1 -1
  139. package/dist-embed/chunks/{index-B0VC_nl2.js → index-DSgHh0-i.js} +1 -1
  140. package/dist-embed/chunks/{index-DmYrjwOw.js → index-DTCcg1ap.js} +1 -1
  141. package/dist-embed/chunks/{index-D95mZTII.js → index-DTbF6Y7O.js} +1 -1
  142. package/dist-embed/chunks/{index-DbHMJ-IM.js → index-Db1qHC1a.js} +1 -1
  143. package/dist-embed/chunks/{index--rbc1jdS.js → index-DiBcWu6d.js} +1 -1
  144. package/dist-embed/chunks/{index-DSts8s_N.js → index-DpJpQnPn.js} +1 -1
  145. package/dist-embed/chunks/{index-DqwL86GY.js → index-Dw1P-H6s.js} +12 -12
  146. package/dist-embed/chunks/{index-k3ISgWrJ.js → index-FbZJIbu_.js} +1 -1
  147. package/dist-embed/chunks/{index-DMTXHmrU.js → index-JhvHCMRQ.js} +1 -1
  148. package/dist-embed/chunks/{index-BVdp0AG7.js → index-TDpnbl90.js} +4 -4
  149. package/dist-embed/chunks/{index-CW0DxnfF.js → index-fQxrRXLD.js} +1 -1
  150. package/dist-embed/chunks/{index.esm-Dy7cyZyH.js → index.esm-B6P80s3J.js} +1 -1
  151. package/dist-embed/chunks/{index.esm-jFa95d0B.js → index.esm-z-R1Ypx2.js} +1 -1
  152. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CuQ0a02I.js → infoDiagram-27XIBGKW-8DlnjSdf.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CDc0DV-6.js → infoDiagram-27XIBGKW-CZPNcDbH.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-a29d40f1-BKWmVk4B.js → infoDiagram-a29d40f1-Di_kmyTC.js} +1 -1
  155. package/dist-embed/chunks/{isEqual-SWNqZJZT.js → isEqual-D0eOPSLC.js} +1 -1
  156. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BY7eKNmA.js → ishikawaDiagram-5VMMS53U-DD5TaPvH.js} +1 -1
  157. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CPu6wHAG.js → ishikawaDiagram-5VMMS53U-ri4cvaWs.js} +1 -1
  158. package/dist-embed/chunks/{it-IT-JPQ66NNP-CsJELR-H.js → it-IT-JPQ66NNP-C7p9bCWQ.js} +1 -1
  159. package/dist-embed/chunks/{ja-JP-DBVTYXUO-Bh4bW0cv.js → ja-JP-DBVTYXUO-DupAM7Cv.js} +1 -1
  160. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-6CRYfcQL.js → journeyDiagram-3NMN7TZE-1NqbTyL4.js} +1 -1
  161. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Cv_KZqY3.js → journeyDiagram-3NMN7TZE-BpYgEBLO.js} +1 -1
  162. package/dist-embed/chunks/{journeyDiagram-95396277-yJruA0Fm.js → journeyDiagram-95396277-xr9Xk_mL.js} +1 -1
  163. package/dist-embed/chunks/{kaa-6HZHGXH3-BmDtc0g0.js → kaa-6HZHGXH3-DrthOcPY.js} +1 -1
  164. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Bluox3dD.js → kab-KAB-ZGHBKWFO-C4hr0kbU.js} +1 -1
  165. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Dps45ZlJ.js → kanban-definition-UXKFOSKX-B5nUu45Q.js} +1 -1
  166. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Biauy1A4.js → kanban-definition-UXKFOSKX-DlSwjr3b.js} +1 -1
  167. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-EZjFhsK8.js → kk-KZ-P5N5QNE5-CrjDkh9r.js} +1 -1
  168. package/dist-embed/chunks/{km-KH-HSX4SM5Z-BpZu76AC.js → km-KH-HSX4SM5Z-JHWf7VZ6.js} +1 -1
  169. package/dist-embed/chunks/{ko-KR-MTYHY66A-C5JZPTHd.js → ko-KR-MTYHY66A-CJ4JxKMG.js} +1 -1
  170. package/dist-embed/chunks/{ku-TR-6OUDTVRD-BUaf6TOB.js → ku-TR-6OUDTVRD-YSlLPag_.js} +1 -1
  171. package/dist-embed/chunks/{layout-C8INuwYa.js → layout-5FOjTADt.js} +1 -1
  172. package/dist-embed/chunks/{layout-CEbgEIwd.js → layout-Bdtul_rg.js} +1 -1
  173. package/dist-embed/chunks/{lexicalHooks-DFMSPigW.js → lexicalHooks-eqXJbnX9.js} +1 -1
  174. package/dist-embed/chunks/{lt-LT-XHIRWOB4-CuGmKRQr.js → lt-LT-XHIRWOB4-2v6r2YYq.js} +1 -1
  175. package/dist-embed/chunks/{lv-LV-5QDEKY6T-EYERw_NP.js → lv-LV-5QDEKY6T-DVGd68q4.js} +1 -1
  176. package/dist-embed/chunks/{mermaid.core-hzdTpjmh.js → mermaid.core-BU1Nkb56.js} +5 -5
  177. package/dist-embed/chunks/{mermaid.core-BeAq5EQp.js → mermaid.core-DY5DKOtx.js} +3 -3
  178. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX--O06aygF.js → mindmap-definition-YA3MSWOX-CEuIjXO2.js} +1 -1
  179. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-iB7eW5x9.js → mindmap-definition-YA3MSWOX-sSfUfKt8.js} +1 -1
  180. package/dist-embed/chunks/{mindmap-definition-e4c1d938-DCwgMhNw.js → mindmap-definition-e4c1d938-btrk6STt.js} +1 -1
  181. package/dist-embed/chunks/{mr-IN-CRQNXWMA-SKx4bMeU.js → mr-IN-CRQNXWMA-D1q8zjMr.js} +1 -1
  182. package/dist-embed/chunks/{my-MM-5M5IBNSE-BG-vgEXz.js → my-MM-5M5IBNSE-CCWuEpIN.js} +1 -1
  183. package/dist-embed/chunks/{nb-NO-T6EIAALU-BbW-11AI.js → nb-NO-T6EIAALU-eJ92wx2h.js} +1 -1
  184. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-CSKGpuSJ.js → nl-NL-IS3SIHDZ-DmkMgsvp.js} +1 -1
  185. package/dist-embed/chunks/{nn-NO-6E72VCQL-P1tnp9TQ.js → nn-NO-6E72VCQL-CWYEaXBn.js} +1 -1
  186. package/dist-embed/chunks/{oc-FR-POXYY2M6-vpu8tuQT.js → oc-FR-POXYY2M6-CayriaEZ.js} +1 -1
  187. package/dist-embed/chunks/{pa-IN-N4M65BXN-CIpdGll2.js → pa-IN-N4M65BXN-CydiKcR8.js} +1 -1
  188. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-ZPizxhEX.js → pegDiagram-XKGWAZYB--dcG-x2B.js} +1 -1
  189. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Bon6jQ3L.js → pegDiagram-XKGWAZYB-CqRRvKft.js} +1 -1
  190. package/dist-embed/chunks/{percentages-BXMCSKIN-hVEpOtFm.js → percentages-BXMCSKIN-fzYCDL7m.js} +5 -5
  191. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C0Pc9GUi.js → pieDiagram-E7YTZNPT-CkHpKSua.js} +1 -1
  192. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Di8dEHt9.js → pieDiagram-E7YTZNPT-D-uncTun.js} +1 -1
  193. package/dist-embed/chunks/{pieDiagram-c941bede-C--hwbRv.js → pieDiagram-c941bede-BoVaJIdw.js} +1 -1
  194. package/dist-embed/chunks/{pl-PL-T2D74RX3-Ckyj0Mzv.js → pl-PL-T2D74RX3-DhiK4YSC.js} +1 -1
  195. package/dist-embed/chunks/{pt-BR-5N22H2LF-3jDc9_Aa.js → pt-BR-5N22H2LF-CwSVxIqs.js} +1 -1
  196. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-lhLbXf7Q.js → pt-PT-UZXXM6DQ-BnxquNJT.js} +1 -1
  197. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-Ffo3hgR0.js → quadrantDiagram-AXDQQJYC-ClE_bWPS.js} +1 -1
  198. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-D0QYtpIp.js → quadrantDiagram-AXDQQJYC-nOA8Q9nG.js} +1 -1
  199. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Bqmed-0s.js → quadrantDiagram-cf8b8fe0-V_e2KgDu.js} +1 -1
  200. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BMC9Ldnh.js → railroadDiagram-O6MQD6OU-CkhmY0tS.js} +1 -1
  201. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-aTc7bF4I.js → railroadDiagram-O6MQD6OU-D-SNyKIn.js} +1 -1
  202. package/dist-embed/chunks/{renderer-CR6Lxa3d.js → renderer-BwlsmtXF.js} +1 -1
  203. package/dist-embed/chunks/{requirementDiagram-53bda41b-DExdw0ey.js → requirementDiagram-53bda41b-BZw7Ipej.js} +1 -1
  204. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-mBFLHcqA.js → requirementDiagram-BXWQKSXE-1A97ivzl.js} +1 -1
  205. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DBj1iVv5.js → requirementDiagram-BXWQKSXE-BXwXUXrr.js} +1 -1
  206. package/dist-embed/chunks/{ro-RO-JPDTUUEW-Dy9oeW3b.js → ro-RO-JPDTUUEW-D3G2f_fQ.js} +1 -1
  207. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CK16-wfD.js → ru-RU-B4JR7IUQ-SnVfNwaW.js} +1 -1
  208. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DzaadHXz.js → sankeyDiagram-P5KCCOFB-0B_Kvjm2.js} +1 -1
  209. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-9W9X5V7a.js → sankeyDiagram-P5KCCOFB-ktT6v9aY.js} +1 -1
  210. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-B6u8wnkU.js → sankeyDiagram-c3ef121a-e1QLivkZ.js} +1 -1
  211. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Bq8bvLh8.js → sequenceDiagram-82a5b84f-N-16oABv.js} +1 -1
  212. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BNfJw8_y.js → sequenceDiagram-WJ2MYXX4-CtbkJYCv.js} +1 -1
  213. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-B76NTf4c.js → sequenceDiagram-WJ2MYXX4-DYY-dZgX.js} +1 -1
  214. package/dist-embed/chunks/{sessions-XxjScqnJ.js → sessions-C9DBCyZI.js} +1 -1
  215. package/dist-embed/chunks/{si-LK-N5RQ5JYF-AJdaUbzl.js → si-LK-N5RQ5JYF-Da7Bfexz.js} +1 -1
  216. package/dist-embed/chunks/{sizeCapture-INFHLROL-KZBUxNmb.js → sizeCapture-INFHLROL-B3xt8UaI.js} +1 -1
  217. package/dist-embed/chunks/{sizeCapture-INFHLROL-DQ5s0TIW.js → sizeCapture-INFHLROL-DJOph387.js} +1 -1
  218. package/dist-embed/chunks/{sk-SK-C5VTKIMK-Bk82hIVU.js → sk-SK-C5VTKIMK-BB-Ks1b-.js} +1 -1
  219. package/dist-embed/chunks/{sl-SI-NN7IZMDC-DSFcvf6W.js → sl-SI-NN7IZMDC-DF3fUKHX.js} +1 -1
  220. package/dist-embed/chunks/{stateDiagram-43e79a5f-BiTTNI1Z.js → stateDiagram-43e79a5f-BJcJNr41.js} +1 -1
  221. package/dist-embed/chunks/{stateDiagram-D77RDMKH-D4hQpdZ2.js → stateDiagram-D77RDMKH-DVd0MOrg.js} +1 -1
  222. package/dist-embed/chunks/{stateDiagram-D77RDMKH-lndPMO3D.js → stateDiagram-D77RDMKH-LjWP-fRB.js} +1 -1
  223. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-BbFiQEfG.js → stateDiagram-v2-2041ed4f-DTEruWg2.js} +1 -1
  224. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-pqcRT12A.js → stateDiagram-v2-MP3YSRHH-CJD5_Eji.js} +1 -1
  225. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-C-kIBdBJ.js → stateDiagram-v2-MP3YSRHH-_xCQcvgo.js} +1 -1
  226. package/dist-embed/chunks/{styles-455b33cd-U9lx7mAf.js → styles-455b33cd-OIhmfs6N.js} +1 -1
  227. package/dist-embed/chunks/{styles-f932cba9-S-lYZYdK.js → styles-f932cba9-CwLjreIv.js} +1 -1
  228. package/dist-embed/chunks/{styles-fcc2142b-DfudfB3j.js → styles-fcc2142b-DP74dQpR.js} +1 -1
  229. package/dist-embed/chunks/{subset-shared.chunk-f2gmZjeG.js → subset-shared.chunk-Cf9zgTA9.js} +1 -1
  230. package/dist-embed/chunks/{subset-worker.chunk-De1CPIQ6.js → subset-worker.chunk-WYW3AHku.js} +1 -1
  231. package/dist-embed/chunks/{sv-SE-XGPEYMSR-BbGfLHIi.js → sv-SE-XGPEYMSR-CeR-pJHy.js} +1 -1
  232. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-ClgHG0vb.js → svgDrawCommon-148a3cd9-CgE5QJIv.js} +1 -1
  233. package/dist-embed/chunks/{swimlanes-42K2YHIH-OqZ4t-07.js → swimlanes-42K2YHIH-CZyflHYJ.js} +1 -1
  234. package/dist-embed/chunks/{swimlanes-42K2YHIH-CjV1bdPk.js → swimlanes-42K2YHIH-Cj4fdAYa.js} +1 -1
  235. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9twpvQtj.js → swimlanesDiagram-VR7AAH4N-B2gk37ys.js} +1 -1
  236. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BdS4NGOx.js → swimlanesDiagram-VR7AAH4N-Bmr6N4fj.js} +1 -1
  237. package/dist-embed/chunks/{ta-IN-2NMHFXQM-BWMJgnI2.js → ta-IN-2NMHFXQM-lmsodGuU.js} +1 -1
  238. package/dist-embed/chunks/{th-TH-HPSO5L25-DiP_CZXl.js → th-TH-HPSO5L25-DQCWr96I.js} +1 -1
  239. package/dist-embed/chunks/{timeline-definition-24CTP7MA-Cs4Bwobu.js → timeline-definition-24CTP7MA-D5dMAy5U.js} +1 -1
  240. package/dist-embed/chunks/{timeline-definition-24CTP7MA-B7uSaXDu.js → timeline-definition-24CTP7MA-DqY5EM6p.js} +1 -1
  241. package/dist-embed/chunks/{timeline-definition-7545f45a-CHrBluu1.js → timeline-definition-7545f45a-B8wMEyZY.js} +1 -1
  242. package/dist-embed/chunks/{tr-TR-DEFEU3FU-CKMBvOkr.js → tr-TR-DEFEU3FU-CqnvlGZW.js} +1 -1
  243. package/dist-embed/chunks/{uk-UA-QMV73CPH-CQL0E0jU.js → uk-UA-QMV73CPH-DdWFjbHe.js} +1 -1
  244. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-uwWpr4uC.js → vennDiagram-4TSXK5OY-63-O_xI8.js} +1 -1
  245. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CHSyRZN_.js → vennDiagram-4TSXK5OY-BMg6wc5A.js} +1 -1
  246. package/dist-embed/chunks/{vi-VN-M7AON7JQ-BpvEBNJo.js → vi-VN-M7AON7JQ-CydTT0Fi.js} +1 -1
  247. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-0UuvD-IO.js → wardleyDiagram-VM6X3IG4-C5wMQ_qe.js} +1 -1
  248. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-zIfOyYBf.js → wardleyDiagram-VM6X3IG4-C9vLUvHf.js} +1 -1
  249. package/dist-embed/chunks/{xychartDiagram-3f383b91-ChbRPzo8.js → xychartDiagram-3f383b91-BfoQg8n9.js} +1 -1
  250. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-hCGgyjir.js → xychartDiagram-S5SC5T6Z-BZr3T3n_.js} +1 -1
  251. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-q9gcUSF1.js → xychartDiagram-S5SC5T6Z-DthHDnAV.js} +1 -1
  252. package/dist-embed/chunks/{zh-CN-LNUGB5OW-DWmzAIjK.js → zh-CN-LNUGB5OW-DEn1TFfK.js} +1 -1
  253. package/dist-embed/chunks/{zh-HK-E62DVLB3-CQ-xPzHX.js → zh-HK-E62DVLB3-DJQRmOHH.js} +1 -1
  254. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DvlSTykD.js → zh-TW-RAJ6MFWO-B7s9vmSf.js} +1 -1
  255. package/dist-embed/datalayer-app-main.js +52 -52
  256. package/lib/apps/embed/visitorApp.d.ts +1 -1
  257. package/lib/apps/embed/visitorApp.js +1 -1
  258. package/lib/apps/plugins/chat/ChatView.js +13 -2
  259. package/lib/chat/ChatFloating.js +4 -1
  260. package/lib/chat/base/ChatBase.js +11 -3
  261. package/lib/chat/prompt/InputPrompt.d.ts +6 -1
  262. package/lib/chat/prompt/InputPrompt.js +12 -2
  263. package/lib/voice/ComposerVoice.d.ts +15 -2
  264. package/lib/voice/ComposerVoice.js +23 -17
  265. package/lib/voice/VoiceMenu.d.ts +27 -0
  266. package/lib/voice/VoiceMenu.js +32 -0
  267. package/lib/voice/chatVoice.js +2 -2
  268. package/lib/voice/choices.d.ts +33 -0
  269. package/lib/voice/choices.js +70 -0
  270. package/lib/voice/index.d.ts +4 -0
  271. package/lib/voice/index.js +3 -0
  272. package/lib/voice/settings.d.ts +17 -1
  273. package/lib/voice/settings.js +64 -1
  274. package/lib/voice/useVoiceSettings.d.ts +6 -0
  275. package/lib/voice/useVoiceSettings.js +25 -0
  276. package/package.json +1 -1
  277. package/dist-embed/chunks/ChatView-C2La9033.js +0 -32
@@ -1,3 +1,3 @@
1
- import{w as b,x as E,E as v,r as I,j as i,B as c,T as N,bk as j,bl as T,bm as U}from"../datalayer-app-main.js";import{EphemeralDocument as O}from"./EphemeralDocument-C-uLD1W7.js";import{O as _,b as P,u as w}from"./openingNotebook-CjjarT8V.js";import{P as d}from"./PrismCss-CcU1ChRk.js";import"./lexicalHooks-DFMSPigW.js";import"./LexicalToolRegistry-CNg1T5sQ.js";import"./useProgressTask-UPro-gwc.js";import"./JupyterLexicalExtension-BUSLnJVL.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./Output-OIgTyxpD.js";import"./index-CuqMWXgT.js";import"./hoverbox-CStlKQWE.js";import"./index-Dyv67BU9.js";import"./index-DSts8s_N.js";import"./color-CG7_7V2-.js";import"./isEqual-SWNqZJZT.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";const D="Quarterly revenue by region",M="Six rows of revenue, two quarters, three regions. The cell below loads them and shows the frame; run it, change it, or ask an agent to take it further — the code and its output live in this document, beside the words about them.",l="opening-document-input",S="opening-document-output",g=e=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1}),u=(e,o,t={})=>({children:o,direction:"ltr",format:"",indent:0,type:e,version:1,...t}),h={type:"linebreak",version:1},s=(e,o)=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"jupyter-input-highlight",version:1,highlightType:o}),f=e=>e.flatMap(o=>{if(typeof o=="string")return o.split(`
1
+ import{w as b,x as E,E as v,r as I,j as i,B as c,T as N,bk as j,bl as T,bm as U}from"../datalayer-app-main.js";import{EphemeralDocument as O}from"./EphemeralDocument-Cevnk5OF.js";import{O as _,b as P,u as w}from"./openingNotebook-CjjarT8V.js";import{P as d}from"./PrismCss-CcU1ChRk.js";import"./lexicalHooks-eqXJbnX9.js";import"./LexicalToolRegistry-BlBEZPP4.js";import"./useProgressTask-UPro-gwc.js";import"./JupyterLexicalExtension-CRccZ2h7.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./Output-C4hBhZ5k.js";import"./index-DMf0f7ny.js";import"./hoverbox-CStlKQWE.js";import"./index-C7os26P7.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";const D="Quarterly revenue by region",M="Six rows of revenue, two quarters, three regions. The cell below loads them and shows the frame; run it, change it, or ask an agent to take it further — the code and its output live in this document, beside the words about them.",l="opening-document-input",S="opening-document-output",g=e=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1}),u=(e,o,t={})=>({children:o,direction:"ltr",format:"",indent:0,type:e,version:1,...t}),h={type:"linebreak",version:1},s=(e,o)=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"jupyter-input-highlight",version:1,highlightType:o}),f=e=>e.flatMap(o=>{if(typeof o=="string")return o.split(`
2
2
  `).flatMap((n,m)=>[...m>0?[h]:[],...n.length>0?[s(n)]:[]]);const{content:t,type:r}=o;return typeof t=="string"?[s(t,r)]:Array.isArray(t)?t.length===1&&typeof t[0]=="string"?[s(t[0],r)]:f(t):[]}),k=e=>{const o=d.languages.python;return o?f(d.tokenize(e,o)):e.split(`
3
3
  `).flatMap((t,r)=>[...r>0?[h]:[],...t.length>0?[s(t)]:[]])};function A(){const e=_.join("");return{root:{children:[u("heading",[g(D)],{tag:"h1"}),u("paragraph",[g(M)],{textFormat:0,textStyle:""}),u("jupyter-input",k(e),{language:"python",jupyterInputNodeUuid:l}),{type:"jupyter-output",version:1,format:"",source:e,outputs:[{output_type:"execute_result",execution_count:1,data:{"text/plain":P},metadata:{}}],jupyterInputNodeUuid:l,jupyterOutputNodeUuid:S}],direction:"ltr",format:"",indent:0,type:"root",version:1}}}function lt({workspace:e}){const o=b(),t=E(o.snapshot),r=e.surfaceId,n=w(T,j,{workspace:e,editorId:r}),a=v(U)[0]?.value,y=I.useMemo(()=>JSON.stringify((a?.document??A)()),[a]),x=a?.autoFocus??!0;if(t.state!=="running")return i.jsx(c,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:4,textAlign:"center",children:i.jsx(N,{children:"The document needs a running sandbox for its code blocks. Open the Sandbox view to see what it is doing."})});const p=o.getServiceManager()??void 0;return i.jsx(c,{height:"100%",minHeight:0,children:i.jsx(O,{inheritTheme:!0,documentId:r,content:y,autoFocus:x,serviceManager:p,showToolbar:n.present,toolbarExtraItems:n.items,kernelId:p?t.kernelId:void 0,runtimeOverride:!p&&t.jupyterUrl?{baseUrl:t.jupyterUrl,token:t.jupyterToken}:void 0})})}export{lt as default};
@@ -1 +1 @@
1
- import{r,ap as ke,aq as Se,ar as je,as as we,at as ve,j as e,B as M,au as Ce,av as Ee,aw as be,ax as Re,ay as V,l as q,az as Me,aA as Te,aB as Pe,K as T,aC as De,aD as K,aE as $,aF as Ne,aG as Ue}from"../datalayer-app-main.js";import{useLexicalTools as Be}from"./lexicalHooks-DFMSPigW.js";import{u as He}from"./useProgressTask-UPro-gwc.js";import{L as Ae,j as Ie,T as Le,k as We,l as Fe,m as _e,D as G,n as ze,o as Je,p as Ve,q as qe,J as Ke,s as $e,F as Ge,t as Ye,u as Qe,v as Xe,w as Ze}from"./JupyterLexicalExtension-BUSLnJVL.js";import"./LexicalToolRegistry-CNg1T5sQ.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-OIgTyxpD.js";import"./index-CuqMWXgT.js";import"./hoverbox-CStlKQWE.js";import"./index-Dyv67BU9.js";import"./index-DSts8s_N.js";import"./color-CG7_7V2-.js";import"./isEqual-SWNqZJZT.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";function Oe({content:o}){const[s]=T(),l=r.useRef(!0);return r.useEffect(()=>{if(l.current){if(l.current=!1,!o){s.update(()=>{const t=K();t.getChildrenSize()===0&&t.append($())},{tag:"history-merge"});return}try{const t=JSON.parse(o);if(t&&typeof t=="object"&&t.root){const d=s.parseEditorState(o);s.setEditorState(d,{tag:"history-merge"})}else throw new Error("Invalid Lexical editor state format")}catch{s.update(()=>{const t=K();t.clear(),t.append($())},{tag:"history-merge"})}}},[o,s]),null}function et({disabled:o}){const[s]=T();return r.useEffect(()=>{De(s,Ne).output.disabled.value=o},[s,o]),null}function tt({setIsLinkEditMode:o,extraItems:s}){const[l]=T(),[t,d]=r.useState(l);return e.jsx(Ze,{editor:l,activeEditor:t,setActiveEditor:d,setIsLinkEditMode:o,extraItems:s})}function Y({inherit:o,colorMode:s,themeConfig:l,children:t}){return o?e.jsx(e.Fragment,{children:t}):e.jsx(Te,{colorMode:s,theme:l.primerTheme,themeStyles:l.themeStyles,children:t})}function Ut({documentId:o,runtimeName:s,runtimeOverride:l,serviceManager:t,kernelId:d,themeVariant:Q,colorMode:X,content:P,onContentChange:w,onToolsReady:D,onKernelChange:v,collaboration:n,toolbarExtraItems:Z,showToolbar:O=!0,inheritTheme:N=!1,autoFocus:U=!0}){const h=!!(n?.websocketUrl&&n?.roomId),ee=n?.identity?.displayName||n?.identity?.handle||n?.identity?.userId,te=n?.identity?.color,ne=r.useMemo(()=>({user:{id:n?.identity?.userId,username:n?.identity?.userId||n?.identity?.handle||n?.identity?.displayName,name:n?.identity?.handle||n?.identity?.displayName,display_name:n?.identity?.displayName||n?.identity?.handle,initials:n?.identity?.initials,color:n?.identity?.color,avatar_url:n?.identity?.avatarUrl,handle:n?.identity?.handle}}),[n?.identity]),B=r.useRef(P),H=r.useRef(o);H.current!==o&&(H.current=o,B.current=P);const A=B.current,I=r.useRef(A??""),L=Be(o);r.useEffect(()=>{D?.(L)},[L,D]);const{runtimes:W,refetchRuntimes:C}=ke(),m=r.useMemo(()=>{const i=String(l?.baseUrl||"").trim();if(i)return{url:i,wsUrl:String(l?.wsUrl||"").trim()||void 0,token:String(l?.token||"").trim(),runtime_name:String(l?.runtimeName||"").trim()||"agent-node-proxy"};const a=String(s||"").trim();if(a)return W.find(j=>String(j?.runtime_name||"")===a)},[l,s,W]),F=!!(!l?.baseUrl&&String(s||"").trim()&&!m);r.useEffect(()=>{if(!F)return;C();const i=window.setInterval(()=>{C()},1e3);return()=>{window.clearInterval(i)}},[F,C]);const[re,g]=r.useState(null),[p,f]=r.useState(void 0);r.useEffect(()=>{let i=!1,a=null,j=null;return(async()=>{if(t){try{await t.ready;const u=d?t.kernels.connectTo({model:{id:d,name:"python"}}):await t.kernels.startNew();i||(g(t),f(new V({kernelName:u.model.name,kernelSpecName:u.model.name,kernelModel:u.model,kernelManager:t.kernels,kernelspecsManager:t.kernelspecs,sessionManager:t.sessions})))}catch(u){console.error("[agent-runtimes] The document could not reach the kernel of the sandbox it was given.",u),i||(g(null),f(void 0))}return}const b=String(m?.url||"").trim();if(!b){i||(g(null),f(void 0));return}try{const u=String(m?.token||"").trim(),pe=String(m?.wsUrl||"").trim()||b.replace(/^http/,"ws"),xe=q.ServerConnection.makeSettings({baseUrl:b,wsUrl:pe,token:u,appendToken:!0});a=new q.ServiceManager({serverSettings:xe}),j=Me(String(m?.runtime_name||""),a),await a.ready;const R=await a.kernels.startNew();if(!i){const ye=new V({kernelName:R.model.name,kernelSpecName:R.model.name,kernelModel:R.model,kernelManager:a.kernels,kernelspecsManager:a.kernelspecs,sessionManager:a.sessions});g(a),f(ye)}}catch{i||(g(null),f(void 0))}})(),()=>{i=!0,j?.(),a&&Ue(a)}},[t,d,m?.runtime_name,m?.url,m?.token]),r.useEffect(()=>(v?.(p?.connection??null),()=>{v?.(null)}),[p,v]);const E=re,_=!!((String(s||"").trim()||String(l?.baseUrl||"").trim()||t)&&!E);He(`ephemeral-document-start-${o}`,_);const oe=r.useMemo(()=>Se({name:"@datalayer/agent-runtimes/EphemeralDocument",namespace:`ephemeral-document-${o}`,theme:Xe,dependencies:[Qe,...U?[Pe]:[]],onError(i){console.error("[EphemeralDocument]",i)}}),[o,U]),ie=r.useCallback(i=>{if(!w)return;const a=JSON.stringify(i.toJSON());a!==I.current&&(I.current=a,w(a))},[w]),[x,se]=r.useState(null),[,z]=r.useState(!1),y=h?n?.roomId:void 0,[ae,le]=r.useState(),ce=y===void 0||ae===y,me=r.useCallback(i=>le(i?y:void 0),[y]),de=i=>{i!==null&&se(i)},{colorMode:ue,theme:he}=je(),k=X??ue,ge=Q??he,fe=we(),S=ve(ge),J=k==="auto"?fe:k,c=(J==="dark"?S.themeStyles.dark:S.themeStyles.light).backgroundColor??"";return e.jsx(M,{flex:1,minHeight:0,height:"100%",position:"relative",overflow:"hidden",bg:"canvas.default",children:E?e.jsx(Y,{inherit:N,colorMode:k,themeConfig:S,children:e.jsx(Ce,{colormode:J,backgroundColor:c,children:e.jsx(M,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",overscrollBehaviorY:"contain",padding:2,backgroundColor:c,"--bgColor-default":c,"& .editor-shell":{backgroundColor:c,borderRadius:2,display:"flex",flexDirection:"column",minHeight:0,flex:1,maxWidth:"none",width:"100%",margin:0},"& .editor-container":{backgroundColor:c,display:"flex",flexDirection:"column",minHeight:0,flex:1,width:"100%",maxWidth:"none",margin:0},"& .editor-inner":{backgroundColor:c,display:"flex",flexDirection:"column",minHeight:0,flex:1,width:"100%",maxWidth:"none"},"& .editor-scroller":{minHeight:0,flex:1,overflow:"auto",width:"100%",maxWidth:"none"},"& .editor":{minHeight:"100%",width:"100%",maxWidth:"none",margin:0},"& .editor-input":{backgroundColor:c,width:"100%",maxWidth:"none",margin:0},"& .ContentEditable__root":{width:"100%",maxWidth:"none",margin:0},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:c}},children:e.jsx(Ae,{lexicalId:o,serviceManager:E,children:e.jsx(Ee,{extension:oe,contentEditable:null,children:e.jsx(Ie,{children:e.jsx(Le,{children:e.jsxs("div",{className:"editor-shell",children:[O?e.jsx(tt,{setIsLinkEditMode:z,extraItems:Z}):null,e.jsx("div",{className:"editor-container",children:e.jsxs("div",{className:"editor-inner",children:[h&&n?e.jsx(We,{id:n.roomId,providerFactory:Fe,websocketUrl:n.websocketUrl,shouldBootstrap:!0,showCollaborators:!0,username:ee,cursorColor:te,awarenessData:ne,onInitialization:me}):null,e.jsx(_e,{}),ce?e.jsx("div",{className:"editor-scroller",children:e.jsx("div",{className:"editor",ref:de,children:e.jsx(be,{className:"editor-input","aria-label":"Ephemeral document editor"})})}):e.jsx(G,{maxWidth:"100%"}),!h&&e.jsx(Re,{onChange:ie}),e.jsx(et,{disabled:h}),!h&&e.jsx(Oe,{content:A}),e.jsx(ze,{}),e.jsx(Je,{}),e.jsx(Ve,{}),e.jsx(qe,{kernel:p}),e.jsx(Ke,{kernel:p}),x&&e.jsxs(e.Fragment,{children:[e.jsx($e,{anchorElem:x}),e.jsx(Ge,{anchorElem:x,setIsLinkEditMode:z}),e.jsx(Ye,{anchorElem:x})]})]})})]})})})})})})})}):_?e.jsx(Y,{inherit:N,colorMode:k,themeConfig:S,children:e.jsx(M,{position:"absolute",inset:0,display:"flex",flexDirection:"column",padding:2,backgroundColor:c,children:e.jsx(G,{label:"Starting the document",maxWidth:"100%"})})}):null})}export{Ut as EphemeralDocument,Ut as default};
1
+ import{r,ap as ke,aq as Se,ar as je,as as we,at as ve,j as e,B as M,au as Ce,av as Ee,aw as be,ax as Re,ay as V,l as q,az as Me,aA as Te,aB as Pe,K as T,aC as De,aD as K,aE as $,aF as Ne,aG as Ue}from"../datalayer-app-main.js";import{useLexicalTools as Be}from"./lexicalHooks-eqXJbnX9.js";import{u as He}from"./useProgressTask-UPro-gwc.js";import{L as Ae,j as Ie,T as Le,k as We,l as Fe,m as _e,D as G,n as ze,o as Je,p as Ve,q as qe,J as Ke,s as $e,F as Ge,t as Ye,u as Qe,v as Xe,w as Ze}from"./JupyterLexicalExtension-CRccZ2h7.js";import"./LexicalToolRegistry-BlBEZPP4.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-C4hBhZ5k.js";import"./index-DMf0f7ny.js";import"./hoverbox-CStlKQWE.js";import"./index-C7os26P7.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";function Oe({content:o}){const[s]=T(),l=r.useRef(!0);return r.useEffect(()=>{if(l.current){if(l.current=!1,!o){s.update(()=>{const t=K();t.getChildrenSize()===0&&t.append($())},{tag:"history-merge"});return}try{const t=JSON.parse(o);if(t&&typeof t=="object"&&t.root){const d=s.parseEditorState(o);s.setEditorState(d,{tag:"history-merge"})}else throw new Error("Invalid Lexical editor state format")}catch{s.update(()=>{const t=K();t.clear(),t.append($())},{tag:"history-merge"})}}},[o,s]),null}function et({disabled:o}){const[s]=T();return r.useEffect(()=>{De(s,Ne).output.disabled.value=o},[s,o]),null}function tt({setIsLinkEditMode:o,extraItems:s}){const[l]=T(),[t,d]=r.useState(l);return e.jsx(Ze,{editor:l,activeEditor:t,setActiveEditor:d,setIsLinkEditMode:o,extraItems:s})}function Y({inherit:o,colorMode:s,themeConfig:l,children:t}){return o?e.jsx(e.Fragment,{children:t}):e.jsx(Te,{colorMode:s,theme:l.primerTheme,themeStyles:l.themeStyles,children:t})}function Ut({documentId:o,runtimeName:s,runtimeOverride:l,serviceManager:t,kernelId:d,themeVariant:Q,colorMode:X,content:P,onContentChange:w,onToolsReady:D,onKernelChange:v,collaboration:n,toolbarExtraItems:Z,showToolbar:O=!0,inheritTheme:N=!1,autoFocus:U=!0}){const h=!!(n?.websocketUrl&&n?.roomId),ee=n?.identity?.displayName||n?.identity?.handle||n?.identity?.userId,te=n?.identity?.color,ne=r.useMemo(()=>({user:{id:n?.identity?.userId,username:n?.identity?.userId||n?.identity?.handle||n?.identity?.displayName,name:n?.identity?.handle||n?.identity?.displayName,display_name:n?.identity?.displayName||n?.identity?.handle,initials:n?.identity?.initials,color:n?.identity?.color,avatar_url:n?.identity?.avatarUrl,handle:n?.identity?.handle}}),[n?.identity]),B=r.useRef(P),H=r.useRef(o);H.current!==o&&(H.current=o,B.current=P);const A=B.current,I=r.useRef(A??""),L=Be(o);r.useEffect(()=>{D?.(L)},[L,D]);const{runtimes:W,refetchRuntimes:C}=ke(),m=r.useMemo(()=>{const i=String(l?.baseUrl||"").trim();if(i)return{url:i,wsUrl:String(l?.wsUrl||"").trim()||void 0,token:String(l?.token||"").trim(),runtime_name:String(l?.runtimeName||"").trim()||"agent-node-proxy"};const a=String(s||"").trim();if(a)return W.find(j=>String(j?.runtime_name||"")===a)},[l,s,W]),F=!!(!l?.baseUrl&&String(s||"").trim()&&!m);r.useEffect(()=>{if(!F)return;C();const i=window.setInterval(()=>{C()},1e3);return()=>{window.clearInterval(i)}},[F,C]);const[re,g]=r.useState(null),[p,f]=r.useState(void 0);r.useEffect(()=>{let i=!1,a=null,j=null;return(async()=>{if(t){try{await t.ready;const u=d?t.kernels.connectTo({model:{id:d,name:"python"}}):await t.kernels.startNew();i||(g(t),f(new V({kernelName:u.model.name,kernelSpecName:u.model.name,kernelModel:u.model,kernelManager:t.kernels,kernelspecsManager:t.kernelspecs,sessionManager:t.sessions})))}catch(u){console.error("[agent-runtimes] The document could not reach the kernel of the sandbox it was given.",u),i||(g(null),f(void 0))}return}const b=String(m?.url||"").trim();if(!b){i||(g(null),f(void 0));return}try{const u=String(m?.token||"").trim(),pe=String(m?.wsUrl||"").trim()||b.replace(/^http/,"ws"),xe=q.ServerConnection.makeSettings({baseUrl:b,wsUrl:pe,token:u,appendToken:!0});a=new q.ServiceManager({serverSettings:xe}),j=Me(String(m?.runtime_name||""),a),await a.ready;const R=await a.kernels.startNew();if(!i){const ye=new V({kernelName:R.model.name,kernelSpecName:R.model.name,kernelModel:R.model,kernelManager:a.kernels,kernelspecsManager:a.kernelspecs,sessionManager:a.sessions});g(a),f(ye)}}catch{i||(g(null),f(void 0))}})(),()=>{i=!0,j?.(),a&&Ue(a)}},[t,d,m?.runtime_name,m?.url,m?.token]),r.useEffect(()=>(v?.(p?.connection??null),()=>{v?.(null)}),[p,v]);const E=re,_=!!((String(s||"").trim()||String(l?.baseUrl||"").trim()||t)&&!E);He(`ephemeral-document-start-${o}`,_);const oe=r.useMemo(()=>Se({name:"@datalayer/agent-runtimes/EphemeralDocument",namespace:`ephemeral-document-${o}`,theme:Xe,dependencies:[Qe,...U?[Pe]:[]],onError(i){console.error("[EphemeralDocument]",i)}}),[o,U]),ie=r.useCallback(i=>{if(!w)return;const a=JSON.stringify(i.toJSON());a!==I.current&&(I.current=a,w(a))},[w]),[x,se]=r.useState(null),[,z]=r.useState(!1),y=h?n?.roomId:void 0,[ae,le]=r.useState(),ce=y===void 0||ae===y,me=r.useCallback(i=>le(i?y:void 0),[y]),de=i=>{i!==null&&se(i)},{colorMode:ue,theme:he}=je(),k=X??ue,ge=Q??he,fe=we(),S=ve(ge),J=k==="auto"?fe:k,c=(J==="dark"?S.themeStyles.dark:S.themeStyles.light).backgroundColor??"";return e.jsx(M,{flex:1,minHeight:0,height:"100%",position:"relative",overflow:"hidden",bg:"canvas.default",children:E?e.jsx(Y,{inherit:N,colorMode:k,themeConfig:S,children:e.jsx(Ce,{colormode:J,backgroundColor:c,children:e.jsx(M,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",overscrollBehaviorY:"contain",padding:2,backgroundColor:c,"--bgColor-default":c,"& .editor-shell":{backgroundColor:c,borderRadius:2,display:"flex",flexDirection:"column",minHeight:0,flex:1,maxWidth:"none",width:"100%",margin:0},"& .editor-container":{backgroundColor:c,display:"flex",flexDirection:"column",minHeight:0,flex:1,width:"100%",maxWidth:"none",margin:0},"& .editor-inner":{backgroundColor:c,display:"flex",flexDirection:"column",minHeight:0,flex:1,width:"100%",maxWidth:"none"},"& .editor-scroller":{minHeight:0,flex:1,overflow:"auto",width:"100%",maxWidth:"none"},"& .editor":{minHeight:"100%",width:"100%",maxWidth:"none",margin:0},"& .editor-input":{backgroundColor:c,width:"100%",maxWidth:"none",margin:0},"& .ContentEditable__root":{width:"100%",maxWidth:"none",margin:0},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:c}},children:e.jsx(Ae,{lexicalId:o,serviceManager:E,children:e.jsx(Ee,{extension:oe,contentEditable:null,children:e.jsx(Ie,{children:e.jsx(Le,{children:e.jsxs("div",{className:"editor-shell",children:[O?e.jsx(tt,{setIsLinkEditMode:z,extraItems:Z}):null,e.jsx("div",{className:"editor-container",children:e.jsxs("div",{className:"editor-inner",children:[h&&n?e.jsx(We,{id:n.roomId,providerFactory:Fe,websocketUrl:n.websocketUrl,shouldBootstrap:!0,showCollaborators:!0,username:ee,cursorColor:te,awarenessData:ne,onInitialization:me}):null,e.jsx(_e,{}),ce?e.jsx("div",{className:"editor-scroller",children:e.jsx("div",{className:"editor",ref:de,children:e.jsx(be,{className:"editor-input","aria-label":"Ephemeral document editor"})})}):e.jsx(G,{maxWidth:"100%"}),!h&&e.jsx(Re,{onChange:ie}),e.jsx(et,{disabled:h}),!h&&e.jsx(Oe,{content:A}),e.jsx(ze,{}),e.jsx(Je,{}),e.jsx(Ve,{}),e.jsx(qe,{kernel:p}),e.jsx(Ke,{kernel:p}),x&&e.jsxs(e.Fragment,{children:[e.jsx($e,{anchorElem:x}),e.jsx(Ge,{anchorElem:x,setIsLinkEditMode:z}),e.jsx(Ye,{anchorElem:x})]})]})})]})})})})})})})}):_?e.jsx(Y,{inherit:N,colorMode:k,themeConfig:S,children:e.jsx(M,{position:"absolute",inset:0,display:"flex",flexDirection:"column",padding:2,backgroundColor:c,children:e.jsx(G,{label:"Starting the document",maxWidth:"100%"})})}):null})}export{Ut as EphemeralDocument,Ut as default};
@@ -1,2 +1,2 @@
1
- import{c1 as O,aW as Ee,l as x,b_ as I,aV as be,d$ as _e,e0 as Re,e1 as Ce,r as f,o as ne,ap as Me,e2 as Ue,j as v,ar as je,as as qe,at as Te,B as Q,au as Ae,az as Ne,aA as Ie,aG as Oe}from"../datalayer-app-main.js";import{u as Le}from"./useProgressTask-UPro-gwc.js";import{a as De}from"./NotebookToolbar-rtMQZWHQ.js";import{C as Je,a as $e,N as Be}from"./CellSidebarExtension-Dwe7PfXi.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./index-Dyv67BU9.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./index-DSts8s_N.js";import"./color-CG7_7V2-.js";import"./isEqual-SWNqZJZT.js";import"./defaultLocale-5voVPcsN.js";import"./renderer-CR6Lxa3d.js";import"./SquareIcon-e3ygcjpv.js";const H="jupyter_server_nbmodel",Pe=new WeakSet;function We(e){return Pe.has(e)}function re(e){const n=e.model.getMetadata(H);return n?.kernelId&&n.requestId&&n.requestUrl?n:void 0}function oe(e,n){e.model.setMetadata(H,n)}function Z(e){e.model.deleteMetadata(H)}function se(e){return(typeof e=="string"?JSON.parse(e):e).reduce((r,t)=>{const o=r[r.length-1];if(t.output_type==="stream"&&o?.output_type==="stream"&&o.name===t.name){const s=Array.isArray(o.text)?o.text.join(""):o.text??"",a=Array.isArray(t.text)?t.text.join(""):t.text??"";o.text=s+a}else r.push(t);return r},[])}function j(e){return Array.isArray(e.text)?e.text.join(""):e.text??""}function Ke(e,n){return e?.output_type==="stream"&&n?.output_type==="stream"&&e.name===n.name&&j(n).startsWith(j(e))}function He(e,n){return e.length>n.length?!1:e.every((r,t)=>O.deepEqual(r,n[t])||t===e.length-1&&Ke(r,n[t]))}function Fe(e,n){const r=Math.min(e.length,n.length);for(let t=0;t<r;t+=1){const o=e[t],s=n[t];if(O.deepEqual(o,s))continue;if(!(o?.output_type==="stream"&&s?.output_type==="stream"&&o.name===s.name))return-1;const i=j(o),u=j(s);if(!u.startsWith(i)&&!i.startsWith(u)||t<r-1)return-1}return r}function Ge(e,n,r){let t=n.length;if(n.length>0&&r.length>=n.length){const o=n.length-1,s=n[o],a=r[o];if(!O.deepEqual(s,a)){const i=j(a).slice(j(s).length);i&&e.outputArea.model.add({...a,text:i})}}for(;t<r.length;)e.outputArea.model.add(r[t]),t+=1}function ae(e,n,r){const t=e.model.sharedModel,o=t.getOutputs();if(O.deepEqual(o,n))return;if(n.length===0){r?.length&&o.length&&e.outputArea.model.clear();return}if(He(n,o))return;console.debug("[jupyter-server-nbmodel] Applying pending output snapshot",{cellId:t.getId(),outputCount:n.length});const s=Fe(o,n);s>=0?Ge(e,o.slice(0,s),n):t.setOutputs(n)}const Ve=1e3;async function ze(e,n,r){let t;try{t=await n.json()}catch{return}if(t.request_id&&t.kernel_id){const a=n.headers.get("Location")??t.request_url;a&&(r.requestUrl=a),a&&r.recoverOutputs&&oe(e,{kernelId:t.kernel_id,requestId:t.request_id,requestUrl:a}),r.accepted||(r.accepted=!0,r.onAccepted?.())}if(t.outputs===void 0||!r.recoverOutputs)return;const o=se(t.outputs),s=r.serverOutputs;r.serverOutputs=o,ae(e,o,s)}async function K(e,n,r,t,o,s=100,a={}){const i=new Ee;return x.ServerConnection.makeRequest(n,r,t).then(async u=>{if(u.ok)if(u.status===202){await ze(e,u,a);let c=u.headers.get("Location")||a.requestUrl||n;c.startsWith(t.baseUrl)||(c=I.URLExt.join(t.baseUrl,c)),setTimeout(async(_,w,m,M,k,U,p)=>{try{const h=await K(_,w,m,M,k,U,p);i.resolve(h)}catch(h){i.reject(h)}},s,e,c,{method:"GET"},t,o,Math.min(Ve,s*2),a)}else i.resolve(u);else if(u.status===300){let c=u.headers.get("Location")||"";if(!c){const p=n.match(/^(.*\/api\/kernels\/[^/?]+)/);c=p?`${p[1]}/input`:""}if(!c){i.reject(new Error(`The kernel asked for an input, and where to send it could not be determined: no Location header, and the polled URL names no kernel (${n}).`));return}c.startsWith(t.baseUrl)||(c=I.URLExt.join(t.baseUrl,c));const{parent_header:_,input_request:w}=await u.json(),m=new be;m.addClass("jp-OutputArea-child"),m.addClass("jp-OutputArea-stdin-item");const M=new _e;M.addClass("jp-OutputArea-prompt"),m.addWidget(M);const k=new Re({future:Object.freeze({sendInputReply:(p,h)=>{x.ServerConnection.makeRequest(c,{method:"POST",body:JSON.stringify({input:p.value})},t).catch(E=>{console.error(`Failed to set input to ${JSON.stringify(p)}.`,E)})}}),parent_header:_,password:w.password,prompt:w.prompt,translator:o});k.addClass("jp-OutputArea-output"),m.addWidget(k);const U=k.node.getElementsByTagName("input")[0];k.value.then(p=>{m.addClass("jp-OutputArea-stdin-hiding"),e.outputArea.model.add({output_type:"stream",name:"stdin",text:p+`
1
+ import{c1 as O,aW as Ee,l as x,b_ as I,aV as be,d$ as _e,e0 as Re,e1 as Ce,r as f,o as ne,ap as Me,e2 as Ue,j as v,ar as je,as as qe,at as Te,B as Q,au as Ae,az as Ne,aA as Ie,aG as Oe}from"../datalayer-app-main.js";import{u as Le}from"./useProgressTask-UPro-gwc.js";import{a as De}from"./NotebookToolbar-rtMQZWHQ.js";import{C as Je,a as $e,N as Be}from"./CellSidebarExtension-p2BAkwis.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./index-C7os26P7.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./renderer-BwlsmtXF.js";import"./SquareIcon-e3ygcjpv.js";const H="jupyter_server_nbmodel",Pe=new WeakSet;function We(e){return Pe.has(e)}function re(e){const n=e.model.getMetadata(H);return n?.kernelId&&n.requestId&&n.requestUrl?n:void 0}function oe(e,n){e.model.setMetadata(H,n)}function Z(e){e.model.deleteMetadata(H)}function se(e){return(typeof e=="string"?JSON.parse(e):e).reduce((r,t)=>{const o=r[r.length-1];if(t.output_type==="stream"&&o?.output_type==="stream"&&o.name===t.name){const s=Array.isArray(o.text)?o.text.join(""):o.text??"",a=Array.isArray(t.text)?t.text.join(""):t.text??"";o.text=s+a}else r.push(t);return r},[])}function j(e){return Array.isArray(e.text)?e.text.join(""):e.text??""}function Ke(e,n){return e?.output_type==="stream"&&n?.output_type==="stream"&&e.name===n.name&&j(n).startsWith(j(e))}function He(e,n){return e.length>n.length?!1:e.every((r,t)=>O.deepEqual(r,n[t])||t===e.length-1&&Ke(r,n[t]))}function Fe(e,n){const r=Math.min(e.length,n.length);for(let t=0;t<r;t+=1){const o=e[t],s=n[t];if(O.deepEqual(o,s))continue;if(!(o?.output_type==="stream"&&s?.output_type==="stream"&&o.name===s.name))return-1;const i=j(o),u=j(s);if(!u.startsWith(i)&&!i.startsWith(u)||t<r-1)return-1}return r}function Ge(e,n,r){let t=n.length;if(n.length>0&&r.length>=n.length){const o=n.length-1,s=n[o],a=r[o];if(!O.deepEqual(s,a)){const i=j(a).slice(j(s).length);i&&e.outputArea.model.add({...a,text:i})}}for(;t<r.length;)e.outputArea.model.add(r[t]),t+=1}function ae(e,n,r){const t=e.model.sharedModel,o=t.getOutputs();if(O.deepEqual(o,n))return;if(n.length===0){r?.length&&o.length&&e.outputArea.model.clear();return}if(He(n,o))return;console.debug("[jupyter-server-nbmodel] Applying pending output snapshot",{cellId:t.getId(),outputCount:n.length});const s=Fe(o,n);s>=0?Ge(e,o.slice(0,s),n):t.setOutputs(n)}const Ve=1e3;async function ze(e,n,r){let t;try{t=await n.json()}catch{return}if(t.request_id&&t.kernel_id){const a=n.headers.get("Location")??t.request_url;a&&(r.requestUrl=a),a&&r.recoverOutputs&&oe(e,{kernelId:t.kernel_id,requestId:t.request_id,requestUrl:a}),r.accepted||(r.accepted=!0,r.onAccepted?.())}if(t.outputs===void 0||!r.recoverOutputs)return;const o=se(t.outputs),s=r.serverOutputs;r.serverOutputs=o,ae(e,o,s)}async function K(e,n,r,t,o,s=100,a={}){const i=new Ee;return x.ServerConnection.makeRequest(n,r,t).then(async u=>{if(u.ok)if(u.status===202){await ze(e,u,a);let c=u.headers.get("Location")||a.requestUrl||n;c.startsWith(t.baseUrl)||(c=I.URLExt.join(t.baseUrl,c)),setTimeout(async(_,w,m,M,k,U,p)=>{try{const h=await K(_,w,m,M,k,U,p);i.resolve(h)}catch(h){i.reject(h)}},s,e,c,{method:"GET"},t,o,Math.min(Ve,s*2),a)}else i.resolve(u);else if(u.status===300){let c=u.headers.get("Location")||"";if(!c){const p=n.match(/^(.*\/api\/kernels\/[^/?]+)/);c=p?`${p[1]}/input`:""}if(!c){i.reject(new Error(`The kernel asked for an input, and where to send it could not be determined: no Location header, and the polled URL names no kernel (${n}).`));return}c.startsWith(t.baseUrl)||(c=I.URLExt.join(t.baseUrl,c));const{parent_header:_,input_request:w}=await u.json(),m=new be;m.addClass("jp-OutputArea-child"),m.addClass("jp-OutputArea-stdin-item");const M=new _e;M.addClass("jp-OutputArea-prompt"),m.addWidget(M);const k=new Re({future:Object.freeze({sendInputReply:(p,h)=>{x.ServerConnection.makeRequest(c,{method:"POST",body:JSON.stringify({input:p.value})},t).catch(E=>{console.error(`Failed to set input to ${JSON.stringify(p)}.`,E)})}}),parent_header:_,password:w.password,prompt:w.prompt,translator:o});k.addClass("jp-OutputArea-output"),m.addWidget(k);const U=k.node.getElementsByTagName("input")[0];k.value.then(p=>{m.addClass("jp-OutputArea-stdin-hiding"),e.outputArea.model.add({output_type:"stream",name:"stdin",text:p+`
2
2
  `}),U.focus(),window.setTimeout(async()=>{const h=document.activeElement;m.dispose(),h&&h instanceof HTMLElement&&h.focus();try{const E=await K(e,n,r,t,o,100,a);i.resolve(E)}catch(E){i.reject(E)}},500)}),e.outputArea.layout.addWidget(m)}else i.reject(await x.ServerConnection.ResponseError.create(u))}).catch(u=>{i.reject(new x.ServerConnection.NetworkError(u))}),i.promise}async function Ye(e,n,r,t,o,s=100,a,i=!1){return K(e,n,r,t,o,s,{onAccepted:a,recoverOutputs:i})}async function Xe(e,n,r){const t=e.model.sharedModel;t.executionState="running";try{const s=await(await Ye(e,n,{method:"GET"},r,void 0,100,void 0,!0)).json(),a=se(s.outputs??"[]");return ae(e,a),t.execution_count=s.execution_count??null,t.executionState="idle",Z(e),s.status==="ok"}catch(o){if(o instanceof x.ServerConnection.ResponseError&&o.response.status===404)return Z(e),t.executionState="idle",!1;throw o}}const N=new Set;function Qe(e,n){if(e.startsWith(n.baseUrl))return e;const r=e.startsWith("http")?new URL(e).pathname:e;return I.URLExt.join(n.baseUrl,r)}function Ze(e,n){if(We(e))return!1;const r=re(e);if(!r||N.has(r.requestId)||e.isDisposed||!e.model)return!1;N.add(r.requestId);const t=Qe(r.requestUrl,n);return console.info("[agent-runtimes] Resuming a server execution",{cellId:e.model.sharedModel.getId(),requestId:r.requestId,requestUrl:t}),Xe(e,t,n).catch(o=>{if(e.isDisposed){N.delete(r.requestId);return}console.warn(`[agent-runtimes] Failed to resume the execution ${r.requestId}.`,o)}),!0}const W=new Set;async function et(e,n,r){const t=`${r.baseUrl}#${n.id}`;if(W.has(t))return 0;const o=await x.ServerConnection.makeRequest(I.URLExt.join(r.baseUrl,`api/kernels/${n.id}/execute`),{method:"GET"},r);if(o.status===404)return W.add(t),0;if(!o.ok)throw await x.ServerConnection.ResponseError.create(o).catch(()=>new Error(`Invalid response: ${o.status} ${o.statusText}`.trim()));W.add(t);const s=await o.json();let a=0;for(const i of s.requests??[]){if(!i.cell_id||N.has(i.request_id))continue;const u=e.find(c=>c.model?.sharedModel.getId()===i.cell_id);!u||u.isDisposed||re(u)||(oe(u,{kernelId:i.kernel_id,requestId:i.request_id,requestUrl:i.request_url}),a+=1)}return a}async function tt(e){if(e.isDisposed)return 0;const n=e.sessionContext?.session?.kernel,r=n?.serverSettings;if(!n||!r)return 0;const t=e.content.widgets.filter(s=>s instanceof Ce);if(t.length===0)return 0;try{await et(t,n,r)}catch(s){console.warn("[agent-runtimes] Failed to discover the active executions of the kernel.",s)}let o=0;for(const s of t)Ze(s,r)&&(o+=1);return o}const ee=1e3,nt=3e4;function rt(e,n){f.useEffect(()=>{if(!e||!n)return;let r=0;const t=()=>{const a=ne.getState().selectNotebook(e)?.adapter?.panel;!a||a.isDisposed||tt(a)};t();const o=window.setInterval(()=>{if(r+=ee,r>=nt){window.clearInterval(o);return}t()},ee);return()=>{window.clearInterval(o)}},[e,n])}const te={cells:[{cell_type:"code",source:[""],metadata:{},outputs:[],execution_count:null}],metadata:{kernelspec:{display_name:"Python 3",language:"python",name:"python3"},language_info:{name:"python"}},nbformat:4,nbformat_minor:5};function ot({inherit:e,colorMode:n,themeConfig:r,children:t}){return e?v.jsx(v.Fragment,{children:t}):v.jsx(Ie,{colorMode:n,theme:r.primerTheme,themeStyles:r.themeStyles,children:t})}function Et({notebookId:e,runtimeName:n,runtimeOverride:r,serviceManager:t,inheritTheme:o=!1,kernelId:s,cellSidebarMargin:a=120,nbformat:i,onNbformatChange:u,toolbarComponent:c,toolbarExtraItems:_,showToolbar:w=!0,showSaveItem:m=!1,themeVariant:M,colorMode:k,collaborationProvider:U}){const p=f.useRef(i??te),h=f.useRef(e);h.current!==e&&(h.current=e,p.current=i??te);const E=p.current,F=f.useRef(JSON.stringify(E)),{runtimes:G,refetchRuntimes:L}=Me(void 0,{enabled:!!String(n||"").trim()&&!t&&!String(r?.baseUrl||"").trim()}),V=f.useMemo(()=>{const l=String(n||"").trim();if(l)return G.find(d=>String(d?.runtime_name||"")===l)},[n,G]),S=f.useMemo(()=>{const l=String(r?.baseUrl||"").trim();return l?{url:l,wsUrl:String(r?.wsUrl||"").trim()||void 0,token:String(r?.token||"").trim(),runtime_name:String(r?.runtimeName||"").trim()||"agent-node-proxy"}:V},[r,V]),z=!!(!r?.baseUrl&&String(n||"").trim()&&!S);f.useEffect(()=>{if(!z)return;L();const l=window.setInterval(()=>{L()},1e3);return()=>{window.clearInterval(l)}},[z,L]);const[ie,D]=f.useState(null),[ue,J]=f.useState(void 0),[le,$]=f.useState(!1);f.useEffect(()=>{let l=!1,d=null,b=null;const y=async()=>{const R=String(S?.url||"").trim();if(!R){l||(D(null),J(void 0),$(!1));return}try{const A=String(S?.token||"").trim(),we=String(S?.wsUrl||"").trim()||R.replace(/^http/,"ws"),ke=x.ServerConnection.makeSettings({baseUrl:R,wsUrl:we,token:A,appendToken:!0}),C=new x.ServiceManager({serverSettings:ke});if(d=C,b=Ne(String(S?.runtime_name||""),d),l){g(C);return}await C.ready,await C.kernels.refreshRunning();const X=[...C.kernels.running()][0];if(l){g(C);return}D(C),J(X?.id),$(!X)}catch(A){d&&(g(d),d=null),l||(console.warn(`[agent-runtimes] Could not reach the sandbox at ${R}.`,A),D(null),J(void 0),$(!1))}},g=R=>{b?.(),b=null,Oe(R)};return y(),()=>{l=!0,d?(g(d),d=null):(b?.(),b=null)}},[S?.runtime_name,S?.url,S?.token,S?.wsUrl]);const q=t??ie,ce=Ue(),de=s??ue,fe=t?!s:le,me=f.useMemo(()=>{if(!w)return;const l=c||De,d=m?void 0:["notebook-save","notebook-divider-file"];return!_?.length&&!d?l:function(y){return v.jsx(l,{...y,extraItems:_,hiddenItems:d})}},[w,m,c,_]),pe=!!((String(n||"").trim()||String(r?.baseUrl||"").trim())&&!q);Le(`ephemeral-notebook-start-${e}`,pe),rt(e,q??void 0),f.useEffect(()=>{if(U)return;const l=()=>{const g=ne.getState().selectNotebook(e)?.adapter;return(g?.notebook?.model??g?.panel?.content?.model??null)?.toJSON?.()??null},d=()=>{const y=l();if(!y||!Array.isArray(y.cells))return;const g=JSON.stringify(y);g!==F.current&&(F.current=g,u?.(y))},b=window.setInterval(d,500);return()=>{window.clearInterval(b),d()}},[q,e,u]);const{colorMode:he,theme:ge}=je(),B=k??he,Se=M??ge,ye=qe(),P=Te(Se),Y=B==="auto"?ye:B,T=(Y==="dark"?P.themeStyles.dark:P.themeStyles.light).backgroundColor??"",ve=f.useMemo(()=>[new Je({factory:$e})],[]),xe=f.useMemo(()=>`.datalayer/${e}.ipynb`,[e]);return v.jsx(Q,{flex:1,minHeight:0,height:"100%",position:"relative",overflow:"hidden",bg:"canvas.default",children:q&&ce?v.jsx(ot,{inherit:o,colorMode:B,themeConfig:P,children:v.jsx(Ae,{colormode:Y,backgroundColor:T,children:v.jsx(Q,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",overflow:"hidden",overscrollBehaviorY:"contain",overflowAnchor:"none",padding:2,backgroundColor:T,"& #dla-Jupyter-Notebook":{display:"flex",flexDirection:"column"},...w?{"& #dla-Jupyter-Notebook > :first-of-type":{position:"sticky",top:0,zIndex:2,flex:"0 0 auto",backgroundColor:T}}:{"& .datalayer-NotebookPanel-header":{display:"none",minHeight:0}},"& #dla-Jupyter-Notebook > .dla-Box-Notebook":{flex:"1 1 auto",minHeight:0},'& [role="toolbar"][aria-label="Notebook toolbar"]':{backgroundColor:T}},children:v.jsx(Be,{nbformat:E,id:e,path:xe,serviceManager:q,startDefaultKernel:fe,kernelId:de,height:"100%",cellSidebarMargin:a,extensions:ve,Toolbar:me,collaborationProvider:U})})})}):null})}export{Et as EphemeralNotebook,Et as default};
@@ -1 +1 @@
1
- import{r as o,j as p,K as N,bS as T,bT as z,bU as L,bV as F,bW as R,I as O,bX as U}from"../datalayer-app-main.js";import{x as _,y as W,z as $,A as M}from"./JupyterLexicalExtension-BUSLnJVL.js";import H from"./ExcalidrawModal-BpsfNG-u.js";import{r as X}from"./percentages-BXMCSKIN-hVEpOtFm.js";import{u as V}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-OIgTyxpD.js";import"./index-CuqMWXgT.js";import"./hoverbox-CStlKQWE.js";import"./index-Dyv67BU9.js";import"./index-DSts8s_N.js";import"./color-CG7_7V2-.js";import"./isEqual-SWNqZJZT.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-CNg1T5sQ.js";import"./extends-CF3RwP-h.js";import"./index-BvgsWH_d.js";import"./index-DoBkwclg.js";const J=e=>{const n=e?.firstElementChild?.firstElementChild,b=e.getAttribute("viewBox");if(b!=null){const a=b.split(" ");e.setAttribute("width",a[2]),e.setAttribute("height",a[3])}n&&n.tagName==="style"&&n.remove()};function P({elements:e,files:n,imageContainerRef:b,appState:a,rootClassName:s=null,width:c="inherit",height:C="inherit"}){const[g,x]=o.useState(null),{theme:E}=V(g),[B,u]=o.useState(null),[v,S]=o.useState(0);o.useEffect(()=>{const r=new MutationObserver(w=>{for(const h of w)if(h.type==="attributes"&&(h.attributeName==="style"||h.attributeName==="class")){S(l=>l+1);break}});return r.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class"]}),r.observe(document.body,{attributes:!0,attributeFilter:["style","class"]}),()=>r.disconnect()},[]),o.useEffect(()=>{(async()=>{await new Promise(D=>setTimeout(D,150));const w=["#ffffff","#000000","transparent",""],h=a?.viewBackgroundColor||"transparent",l=w.includes(h.toLowerCase()),A={...a,viewBackgroundColor:l?"transparent":a?.viewBackgroundColor,exportBackground:!l,exportWithDarkMode:E==="dark"},m=await X({appState:A,elements:e,files:n});J(m),m.setAttribute("width","100%"),m.setAttribute("height","100%"),m.setAttribute("display","block"),u(m)})()},[e,n,a,E,v]);const f={};c!=="inherit"&&(f.width=`${c}px`),C!=="inherit"&&(f.height=`${C}px`);const k=a?.viewBackgroundColor||"transparent";if(["#ffffff","#000000","transparent",""].includes(k.toLowerCase())){const r=E==="dark"?"#1e1e1e":"#ffffff";f.backgroundColor=`var(--bgColor-default, var(--jp-layout-color0, var(--vscode-editor-background, ${r})))`}return p.jsx("div",{ref:r=>{x(r),r&&b&&(b.current=r)},className:s??"",style:f,dangerouslySetInnerHTML:{__html:B?.outerHTML??""}})}function Bt({nodeKey:e,data:n,width:b,height:a}){const[s]=N(),c=_(),[C,g]=o.useState(n==="[]"&&s.isEditable()),x=o.useRef(null),E=o.useRef(null),B=o.useRef(null),[u,v,S]=W(e),[f,k]=o.useState(!1);o.useEffect(()=>{if(!c){u&&S();return}return T(s.registerCommand(z,t=>{const d=E.current,i=t.target;return f?!0:d!==null&&L(i)&&d.contains(i)?(t.shiftKey||S(),v(!u),t.detail>1&&g(!0),!0):!1},F))},[S,s,u,f,v,c]);const j=o.useCallback(()=>(g(!1),s.update(()=>{const t=R(e);t&&t.remove()})),[s,e]),I=(t,d,i)=>s.update(()=>{const y=R(e);M(y)&&(t&&t.length>0||Object.keys(i).length>0?y.setData(JSON.stringify({appState:d,elements:t,files:i})):y.remove())}),r=()=>{k(!0)},w=(t,d)=>{setTimeout(()=>{k(!1)},200),s.update(()=>{const i=R(e);M(i)&&(i.setWidth(t),i.setHeight(d))})},h=o.useCallback(()=>{g(!0)},[]),{elements:l=[],files:A={},appState:m={}}=o.useMemo(()=>JSON.parse(n),[n]),D=o.useCallback(()=>{g(!1),l.length===0&&s.update(()=>{const t=R(e);t&&t.remove()})},[s,e,l.length]);return p.jsxs(p.Fragment,{children:[c&&C&&p.jsx(H,{initialElements:l,initialFiles:A,initialAppState:m,isShown:C,onDelete:j,onClose:D,onSave:(t,d,i)=>{I(t,d,i),g(!1)},closeOnClickOutside:!1}),l.length>0&&p.jsxs("button",{ref:E,className:`excalidraw-button ${u?"selected":""}`,children:[p.jsx(P,{imageContainerRef:x,className:"image",elements:l,files:A,appState:m,width:b,height:a}),u&&c&&p.jsx(O,{icon:U,"aria-label":"Edit the drawing",size:"small",variant:"default",sx:{position:"absolute",top:8,right:8,zIndex:10},onMouseDown:t=>t.preventDefault(),onClick:h}),(u||f)&&c&&p.jsx($,{buttonRef:B,showCaption:!0,setShowCaption:()=>null,imageRef:x,editor:s,onResizeStart:r,onResizeEnd:w})]})]})}export{Bt as default};
1
+ import{r as o,j as p,K as N,bS as T,bT as z,bU as L,bV as F,bW as R,I as O,bX as U}from"../datalayer-app-main.js";import{x as _,y as W,z as $,A as M}from"./JupyterLexicalExtension-CRccZ2h7.js";import H from"./ExcalidrawModal-BOVvWzYQ.js";import{r as X}from"./percentages-BXMCSKIN-fzYCDL7m.js";import{u as V}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-C4hBhZ5k.js";import"./index-DMf0f7ny.js";import"./hoverbox-CStlKQWE.js";import"./index-C7os26P7.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-BlBEZPP4.js";import"./extends-CF3RwP-h.js";import"./index-BvgsWH_d.js";import"./index-DoBkwclg.js";const J=e=>{const n=e?.firstElementChild?.firstElementChild,b=e.getAttribute("viewBox");if(b!=null){const a=b.split(" ");e.setAttribute("width",a[2]),e.setAttribute("height",a[3])}n&&n.tagName==="style"&&n.remove()};function P({elements:e,files:n,imageContainerRef:b,appState:a,rootClassName:s=null,width:c="inherit",height:C="inherit"}){const[g,x]=o.useState(null),{theme:E}=V(g),[B,u]=o.useState(null),[v,S]=o.useState(0);o.useEffect(()=>{const r=new MutationObserver(w=>{for(const h of w)if(h.type==="attributes"&&(h.attributeName==="style"||h.attributeName==="class")){S(l=>l+1);break}});return r.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class"]}),r.observe(document.body,{attributes:!0,attributeFilter:["style","class"]}),()=>r.disconnect()},[]),o.useEffect(()=>{(async()=>{await new Promise(D=>setTimeout(D,150));const w=["#ffffff","#000000","transparent",""],h=a?.viewBackgroundColor||"transparent",l=w.includes(h.toLowerCase()),A={...a,viewBackgroundColor:l?"transparent":a?.viewBackgroundColor,exportBackground:!l,exportWithDarkMode:E==="dark"},m=await X({appState:A,elements:e,files:n});J(m),m.setAttribute("width","100%"),m.setAttribute("height","100%"),m.setAttribute("display","block"),u(m)})()},[e,n,a,E,v]);const f={};c!=="inherit"&&(f.width=`${c}px`),C!=="inherit"&&(f.height=`${C}px`);const k=a?.viewBackgroundColor||"transparent";if(["#ffffff","#000000","transparent",""].includes(k.toLowerCase())){const r=E==="dark"?"#1e1e1e":"#ffffff";f.backgroundColor=`var(--bgColor-default, var(--jp-layout-color0, var(--vscode-editor-background, ${r})))`}return p.jsx("div",{ref:r=>{x(r),r&&b&&(b.current=r)},className:s??"",style:f,dangerouslySetInnerHTML:{__html:B?.outerHTML??""}})}function Bt({nodeKey:e,data:n,width:b,height:a}){const[s]=N(),c=_(),[C,g]=o.useState(n==="[]"&&s.isEditable()),x=o.useRef(null),E=o.useRef(null),B=o.useRef(null),[u,v,S]=W(e),[f,k]=o.useState(!1);o.useEffect(()=>{if(!c){u&&S();return}return T(s.registerCommand(z,t=>{const d=E.current,i=t.target;return f?!0:d!==null&&L(i)&&d.contains(i)?(t.shiftKey||S(),v(!u),t.detail>1&&g(!0),!0):!1},F))},[S,s,u,f,v,c]);const j=o.useCallback(()=>(g(!1),s.update(()=>{const t=R(e);t&&t.remove()})),[s,e]),I=(t,d,i)=>s.update(()=>{const y=R(e);M(y)&&(t&&t.length>0||Object.keys(i).length>0?y.setData(JSON.stringify({appState:d,elements:t,files:i})):y.remove())}),r=()=>{k(!0)},w=(t,d)=>{setTimeout(()=>{k(!1)},200),s.update(()=>{const i=R(e);M(i)&&(i.setWidth(t),i.setHeight(d))})},h=o.useCallback(()=>{g(!0)},[]),{elements:l=[],files:A={},appState:m={}}=o.useMemo(()=>JSON.parse(n),[n]),D=o.useCallback(()=>{g(!1),l.length===0&&s.update(()=>{const t=R(e);t&&t.remove()})},[s,e,l.length]);return p.jsxs(p.Fragment,{children:[c&&C&&p.jsx(H,{initialElements:l,initialFiles:A,initialAppState:m,isShown:C,onDelete:j,onClose:D,onSave:(t,d,i)=>{I(t,d,i),g(!1)},closeOnClickOutside:!1}),l.length>0&&p.jsxs("button",{ref:E,className:`excalidraw-button ${u?"selected":""}`,children:[p.jsx(P,{imageContainerRef:x,className:"image",elements:l,files:A,appState:m,width:b,height:a}),u&&c&&p.jsx(O,{icon:U,"aria-label":"Edit the drawing",size:"small",variant:"default",sx:{position:"absolute",top:8,right:8,zIndex:10},onMouseDown:t=>t.preventDefault(),onClick:h}),(u||f)&&c&&p.jsx($,{buttonRef:B,showCaption:!0,setShowCaption:()=>null,imageRef:x,editor:s,onResizeStart:r,onResizeEnd:w})]})]})}export{Bt as default};
@@ -1 +1 @@
1
- import{r as t,j as o,D as u,bi as h,c as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-hVEpOtFm.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-BUSLnJVL.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-OIgTyxpD.js";import"./index-CuqMWXgT.js";import"./hoverbox-CStlKQWE.js";import"./index-Dyv67BU9.js";import"./index-DSts8s_N.js";import"./color-CG7_7V2-.js";import"./isEqual-SWNqZJZT.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-CNg1T5sQ.js";import"./extends-CF3RwP-h.js";import"./index-BvgsWH_d.js";import"./index-DoBkwclg.js";function pe({closeOnClickOutside:I=!1,onSave:x,initialElements:l,initialAppState:g,initialFiles:d,isShown:n=!1,onDelete:v,onClose:c}){const[w,C]=t.useState(null),{theme:b}=z(w),m=t.useRef(null),E=t.useCallback(e=>{m.current=e,C(e)},[]),[r,k]=t.useState(null),[j,i]=t.useState(!1),[p,M]=t.useState(l),[D,S]=t.useState(d);t.useEffect(()=>{m.current?.focus()},[]),t.useEffect(()=>{if(!r||!n)return;const e=()=>r.refresh(),a=requestAnimationFrame(e),s=setTimeout(e,300);return window.addEventListener("resize",e),()=>{cancelAnimationFrame(a),clearTimeout(s),window.removeEventListener("resize",e)}},[r,n]);const A=()=>{if(p?.some(e=>!e.isDeleted)){const e=r?.getAppState(),a={exportBackground:e?.exportBackground,exportScale:e?.exportScale,exportWithDarkMode:e?.theme==="dark",isBindingEnabled:e?.isBindingEnabled,isLoading:e?.isLoading,name:e?.name,theme:e?.theme,viewBackgroundColor:e?.viewBackgroundColor,viewModeEnabled:e?.viewModeEnabled,zenModeEnabled:e?.zenModeEnabled,zoom:e?.zoom};x(p,a,D)}else v()},B=()=>{i(!0)};if(n===!1)return null;const y=(e,a,s)=>{M(e),S(s)};return o.jsxs(o.Fragment,{children:[o.jsxs(u,{title:"Excalidraw",onClose:()=>c(),width:"xlarge",height:"auto",sx:{width:"80vw !important",maxWidth:"80vw !important",height:"80vh !important",maxHeight:"80vh !important"},children:[o.jsx(h,{ref:E,tabIndex:-1,sx:{height:"calc(80vh - 140px)",position:"relative",overflow:"hidden"},children:o.jsx(T,{onChange:y,excalidrawAPI:e=>k(e),initialData:{appState:g||{isLoading:!1},elements:l,files:d},theme:b})}),o.jsxs(h,{sx:{display:"flex",gap:2,justifyContent:"flex-end",p:2,borderTop:"1px solid",borderColor:"var(--borderColor-default)"},children:[o.jsx(f,{variant:"invisible",onClick:B,children:"Discard"}),o.jsx(f,{variant:"primary",onClick:A,children:"Save"})]})]}),j&&o.jsx(u,{title:"Discard",onClose:()=>i(!1),width:"small",height:"auto",footerButtons:[{buttonType:"danger",content:"Discard",onClick:()=>{i(!1),c()}},{buttonType:"default",content:"Cancel",onClick:()=>i(!1)}],children:"Are you sure you want to discard the changes?"})]})}export{pe as default};
1
+ import{r as t,j as o,D as u,bi as h,c as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-fzYCDL7m.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-CRccZ2h7.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-C4hBhZ5k.js";import"./index-DMf0f7ny.js";import"./hoverbox-CStlKQWE.js";import"./index-C7os26P7.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-BlBEZPP4.js";import"./extends-CF3RwP-h.js";import"./index-BvgsWH_d.js";import"./index-DoBkwclg.js";function pe({closeOnClickOutside:I=!1,onSave:x,initialElements:l,initialAppState:g,initialFiles:d,isShown:n=!1,onDelete:v,onClose:c}){const[w,C]=t.useState(null),{theme:b}=z(w),m=t.useRef(null),E=t.useCallback(e=>{m.current=e,C(e)},[]),[r,k]=t.useState(null),[j,i]=t.useState(!1),[p,M]=t.useState(l),[D,S]=t.useState(d);t.useEffect(()=>{m.current?.focus()},[]),t.useEffect(()=>{if(!r||!n)return;const e=()=>r.refresh(),a=requestAnimationFrame(e),s=setTimeout(e,300);return window.addEventListener("resize",e),()=>{cancelAnimationFrame(a),clearTimeout(s),window.removeEventListener("resize",e)}},[r,n]);const A=()=>{if(p?.some(e=>!e.isDeleted)){const e=r?.getAppState(),a={exportBackground:e?.exportBackground,exportScale:e?.exportScale,exportWithDarkMode:e?.theme==="dark",isBindingEnabled:e?.isBindingEnabled,isLoading:e?.isLoading,name:e?.name,theme:e?.theme,viewBackgroundColor:e?.viewBackgroundColor,viewModeEnabled:e?.viewModeEnabled,zenModeEnabled:e?.zenModeEnabled,zoom:e?.zoom};x(p,a,D)}else v()},B=()=>{i(!0)};if(n===!1)return null;const y=(e,a,s)=>{M(e),S(s)};return o.jsxs(o.Fragment,{children:[o.jsxs(u,{title:"Excalidraw",onClose:()=>c(),width:"xlarge",height:"auto",sx:{width:"80vw !important",maxWidth:"80vw !important",height:"80vh !important",maxHeight:"80vh !important"},children:[o.jsx(h,{ref:E,tabIndex:-1,sx:{height:"calc(80vh - 140px)",position:"relative",overflow:"hidden"},children:o.jsx(T,{onChange:y,excalidrawAPI:e=>k(e),initialData:{appState:g||{isLoading:!1},elements:l,files:d},theme:b})}),o.jsxs(h,{sx:{display:"flex",gap:2,justifyContent:"flex-end",p:2,borderTop:"1px solid",borderColor:"var(--borderColor-default)"},children:[o.jsx(f,{variant:"invisible",onClick:B,children:"Discard"}),o.jsx(f,{variant:"primary",onClick:A,children:"Save"})]})]}),j&&o.jsx(u,{title:"Discard",onClose:()=>i(!1),width:"small",height:"auto",footerButtons:[{buttonType:"danger",content:"Discard",onClick:()=>{i(!1),c()}},{buttonType:"default",content:"Cancel",onClick:()=>i(!1)}],children:"Are you sure you want to discard the changes?"})]})}export{pe as default};