@datalayer/agent-runtimes 1.5.65 → 1.5.70

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 (296) hide show
  1. package/dist-embed/chunks/{AgentDetails-RIFH8RAg.js → AgentDetails-BriiIXid.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-CK7jVPSc.js → AgentDetailsDialog-Bh3yhb7O.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-DwZk4yjT.js → AgentInspector-Dd-G3TvL.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-Ct12Hqc-.js → AgentInspectorDialog-CQEiBqOl.js} +1 -1
  5. package/dist-embed/chunks/{CellSidebarExtension-CbVVhhaO.js → CellSidebarExtension-DbbW8AJP.js} +1 -1
  6. package/dist-embed/chunks/ChatView-LzqHHAEe.js +32 -0
  7. package/dist-embed/chunks/{ContextPie-DLR5REbp.js → ContextPie-I90j658q.js} +1 -1
  8. package/dist-embed/chunks/{DeckComponent-C_ZaO_iF.js → DeckComponent-DAnUabRV.js} +2 -2
  9. package/dist-embed/chunks/{DocumentView-DP-dxfpu.js → DocumentView-BKFitqiB.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralDocument-D3rfKBME.js → EphemeralDocument-BRzYMd8Z.js} +1 -1
  11. package/dist-embed/chunks/{EphemeralNotebook-Dn3ku5jr.js → EphemeralNotebook-COnqhW7Q.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawComponent-B7I0SoHM.js → ExcalidrawComponent-VnKcai35.js} +1 -1
  13. package/dist-embed/chunks/{ExcalidrawModal-B2VIt9DT.js → ExcalidrawModal-DrntFjbe.js} +1 -1
  14. package/dist-embed/chunks/{JupyterLexicalExtension-LpJ6Rj9h.js → JupyterLexicalExtension-BBivQZvX.js} +9 -9
  15. package/dist-embed/chunks/{KernelVariables-ZFnygJ4R.js → KernelVariables-CNEfUsyt.js} +1 -1
  16. package/dist-embed/chunks/{LexicalToolRegistry-BRMKFkxC.js → LexicalToolRegistry-B8ccPURu.js} +4 -4
  17. package/dist-embed/chunks/{NotebookToolSurfaces-Dz_cxy8L.js → NotebookToolSurfaces-B8Rmjy_m.js} +1 -1
  18. package/dist-embed/chunks/{NotebookView-DG-pAyOq.js → NotebookView-BDChKuA9.js} +1 -1
  19. package/dist-embed/chunks/{Output-Cnq5i-bK.js → Output-CEoYDjwn.js} +1 -1
  20. package/dist-embed/chunks/{SandboxDetailsDialog-BzGdQmTQ.js → SandboxDetailsDialog-DuavSJSL.js} +1 -1
  21. package/dist-embed/chunks/SchemaForm-C6wDxDrg.js +1 -0
  22. package/dist-embed/chunks/{WidgetVariableView-kRHeKnmD.js → WidgetVariableView-Tm5SSEKf.js} +1 -1
  23. package/dist-embed/chunks/{YouTubePlugin-ChwsOfjj.js → YouTubePlugin-C209681s.js} +1 -1
  24. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-sr3TJAkV.js → abnfDiagram-VCTEODGH-CsKFU4Ej.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Byz1QYm8.js → abnfDiagram-VCTEODGH-m7LJLYga.js} +1 -1
  26. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-D1OmbW2u.js → ar-SA-G6X2FPQ2-Dypu3IcK.js} +1 -1
  27. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-B7rDWQh9.js → architectureDiagram-5GKGNRK7-C22xzf-o.js} +1 -1
  28. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DOxpBf54.js → architectureDiagram-5GKGNRK7-iDgRBR0a.js} +1 -1
  29. package/dist-embed/chunks/{az-AZ-76LH7QW2-CmSoFd5x.js → az-AZ-76LH7QW2-D8CzfKb1.js} +1 -1
  30. package/dist-embed/chunks/{bg-BG-XCXSNQG7-D7b2U9I0.js → bg-BG-XCXSNQG7-_NVFEM1_.js} +1 -1
  31. package/dist-embed/chunks/{blockDiagram-868be97b-CKmWpImQ.js → blockDiagram-868be97b-D3BurtSN.js} +1 -1
  32. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-_fDDlpCe.js → blockDiagram-I7D4REHJ-CHicgYkf.js} +1 -1
  33. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-bzZkd0c3.js → blockDiagram-I7D4REHJ-oDRNhSU2.js} +1 -1
  34. package/dist-embed/chunks/{bn-BD-2XOGV67Q-CG3iRJ8B.js → bn-BD-2XOGV67Q-DMgdNi-k.js} +1 -1
  35. package/dist-embed/chunks/{c4Diagram-3f4bdde3-zvlk6Xm2.js → c4Diagram-3f4bdde3-Dmbl9p6m.js} +1 -1
  36. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-NpmtOeoK.js → c4Diagram-7LVT6UL2-CR3iQQ6O.js} +1 -1
  37. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-vHp7kFMG.js → c4Diagram-7LVT6UL2-auJZQjpw.js} +1 -1
  38. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BW4zf4cd.js → ca-ES-6MX7JW3Y-DpOQhzr4.js} +1 -1
  39. package/dist-embed/chunks/{celltoolbartracker-DDVXLR_l.js → celltoolbartracker-DCR86wxV.js} +1 -1
  40. package/dist-embed/chunks/{chunk-2Q5K7J3B-Blqxrfai.js → chunk-2Q5K7J3B-DpFWUcsT.js} +1 -1
  41. package/dist-embed/chunks/{chunk-2Q5K7J3B-D26LTlFj.js → chunk-2Q5K7J3B-H_DA_jTG.js} +1 -1
  42. package/dist-embed/chunks/{chunk-5VM5RSS4-CdbSD_M8.js → chunk-5VM5RSS4-BhWUyelG.js} +1 -1
  43. package/dist-embed/chunks/{chunk-5VM5RSS4-BcO1XpWr.js → chunk-5VM5RSS4-CaowF8Al.js} +1 -1
  44. package/dist-embed/chunks/{chunk-F27PBJKO-BQ-ZIw-1.js → chunk-F27PBJKO-B9wgW70d.js} +1 -1
  45. package/dist-embed/chunks/{chunk-F27PBJKO-BRe2RwsD.js → chunk-F27PBJKO-D7PuEggc.js} +1 -1
  46. package/dist-embed/chunks/{chunk-IMKFNOWR-D-RO-dCd.js → chunk-IMKFNOWR-DhXkXQPV.js} +1 -1
  47. package/dist-embed/chunks/{chunk-IMKFNOWR-CLFrksv5.js → chunk-IMKFNOWR-jZNuNkCa.js} +1 -1
  48. package/dist-embed/chunks/{chunk-JWPE2WC7-wyMu098x.js → chunk-JWPE2WC7-BIShIUcJ.js} +1 -1
  49. package/dist-embed/chunks/{chunk-JWPE2WC7-DbtWvNSt.js → chunk-JWPE2WC7-DaBG37yC.js} +1 -1
  50. package/dist-embed/chunks/{chunk-POPQ4Y6H-OgpU0qcq.js → chunk-POPQ4Y6H-DG5Q2OKT.js} +1 -1
  51. package/dist-embed/chunks/{chunk-POPQ4Y6H-lwXXWwpD.js → chunk-POPQ4Y6H-WjTzJISs.js} +1 -1
  52. package/dist-embed/chunks/{chunk-SVP7TREG-CtOO_gz8.js → chunk-SVP7TREG-ERRaAh-x.js} +1 -1
  53. package/dist-embed/chunks/{chunk-SVP7TREG-C1pZJEUL.js → chunk-SVP7TREG-bq0J6tH_.js} +1 -1
  54. package/dist-embed/chunks/{chunk-TICWLB2K-BUeW_P5i.js → chunk-TICWLB2K-B91fA6Jd.js} +1 -1
  55. package/dist-embed/chunks/{chunk-TICWLB2K-B2id4fS-.js → chunk-TICWLB2K-BV_9f6ak.js} +1 -1
  56. package/dist-embed/chunks/{chunk-XXDRQBXY-6emV99Se.js → chunk-XXDRQBXY-BAy0lBJk.js} +1 -1
  57. package/dist-embed/chunks/{chunk-XXDRQBXY-DASCZDLb.js → chunk-XXDRQBXY-fV8doVJJ.js} +1 -1
  58. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BUcYJSYu.js → classDiagram-ZZMXUADV-B0pbDswj.js} +1 -1
  59. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DXK_VS6x.js → classDiagram-ZZMXUADV-CGdcKCOI.js} +1 -1
  60. package/dist-embed/chunks/{classDiagram-f62afe4f-D_XtspOB.js → classDiagram-f62afe4f-tD890DEl.js} +1 -1
  61. package/dist-embed/chunks/{classDiagram-v2-604399ef-DmVGURP4.js → classDiagram-v2-604399ef-DReIuoeI.js} +1 -1
  62. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BUcYJSYu.js → classDiagram-v2-VYDZK3BY-B0pbDswj.js} +1 -1
  63. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DXK_VS6x.js → classDiagram-v2-VYDZK3BY-CGdcKCOI.js} +1 -1
  64. package/dist-embed/chunks/{code-block-IT6T5CEO-CLFy43wi.js → code-block-IT6T5CEO-DD7hwbHA.js} +1 -1
  65. package/dist-embed/chunks/{component-BABP_IeE.js → component-BWDcVpKW.js} +1 -1
  66. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DkllT3uc.js → cose-bilkent-JH36ORCC-BS_pJML-.js} +1 -1
  67. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-zloY56Dd.js → cose-bilkent-JH36ORCC-BsK2pWDL.js} +1 -1
  68. package/dist-embed/chunks/{createText-aed3d8b3-B_AmUgWn.js → createText-aed3d8b3-1eVJ8jxH.js} +2 -2
  69. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-DzWWfN4P.js → cs-CZ-2BRQDIVT-Fr-SpqHD.js} +1 -1
  70. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-CT11o-tV.js → cynefinDiagram-5FMLGOSQ-AxJwZ7KT.js} +1 -1
  71. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-Benlx8nr.js → cynefinDiagram-5FMLGOSQ-vmheD_S2.js} +1 -1
  72. package/dist-embed/chunks/{da-DK-5WZEPLOC-CaeirLFF.js → da-DK-5WZEPLOC-DO_sAXvt.js} +1 -1
  73. package/dist-embed/chunks/{dagre-GXQ25YYZ-B2PPWFKB.js → dagre-GXQ25YYZ-B8Ip03td.js} +1 -1
  74. package/dist-embed/chunks/{dagre-GXQ25YYZ-qys4evHY.js → dagre-GXQ25YYZ-BgrGEY09.js} +1 -1
  75. package/dist-embed/chunks/{de-DE-XR44H4JA-DBkebtzo.js → de-DE-XR44H4JA-4JnXB_iM.js} +1 -1
  76. package/dist-embed/chunks/{diagram-S7CK7UJ4-C1EHbNes.js → diagram-S7CK7UJ4-BxRBCYVP.js} +1 -1
  77. package/dist-embed/chunks/{diagram-S7CK7UJ4-CBkf-BrM.js → diagram-S7CK7UJ4-hQvZziAN.js} +1 -1
  78. package/dist-embed/chunks/{diagram-UQ7AKVKN-CKsxaZCe.js → diagram-UQ7AKVKN-BFkOO3Wu.js} +1 -1
  79. package/dist-embed/chunks/{diagram-UQ7AKVKN-C9zuKZ5Y.js → diagram-UQ7AKVKN-BvgP6_rf.js} +1 -1
  80. package/dist-embed/chunks/{diagram-VSXAHHWV-Cd8pBAf-.js → diagram-VSXAHHWV-Cy8iWh4H.js} +1 -1
  81. package/dist-embed/chunks/{diagram-VSXAHHWV-Dd_PlC0S.js → diagram-VSXAHHWV-WVuzjdxU.js} +1 -1
  82. package/dist-embed/chunks/{diagram-VX7I27RA-DZTLEsKe.js → diagram-VX7I27RA-CCx8R8FK.js} +1 -1
  83. package/dist-embed/chunks/{diagram-VX7I27RA-D5qf5Kw-.js → diagram-VX7I27RA-_LUOsaBb.js} +1 -1
  84. package/dist-embed/chunks/{diagram-Z3DM3KII-DlsBShb0.js → diagram-Z3DM3KII-CY856Sry.js} +1 -1
  85. package/dist-embed/chunks/{diagram-Z3DM3KII-B2zosfsY.js → diagram-Z3DM3KII-Dqcrl8-1.js} +1 -1
  86. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-VhBXkHc8.js → ebnfDiagram-PWID7BFC-DC-Zam6d.js} +1 -1
  87. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-sUXnKXhD.js → ebnfDiagram-PWID7BFC-kqD9RLAA.js} +1 -1
  88. package/dist-embed/chunks/{edges-b2856ca0-cYsFYCgh.js → edges-b2856ca0-B3ybuHDU.js} +1 -1
  89. package/dist-embed/chunks/{el-GR-BZB4AONW-DkmsSwGL.js → el-GR-BZB4AONW-MydAlwHl.js} +1 -1
  90. package/dist-embed/chunks/{erDiagram-5d81789a-DHzqp69u.js → erDiagram-5d81789a-HZ-VLc2f.js} +1 -1
  91. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-DPzcAUZq.js → erDiagram-RLTQ6QDP-CNO4pVhU.js} +1 -1
  92. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BRf7HEXF.js → erDiagram-RLTQ6QDP-zwXEFcAp.js} +1 -1
  93. package/dist-embed/chunks/{es-ES-U4NZUMDT-Dvnvh6dW.js → es-ES-U4NZUMDT-rQmnr_uu.js} +1 -1
  94. package/dist-embed/chunks/{eu-ES-A7QVB2H4-DYX6hpyz.js → eu-ES-A7QVB2H4-j5Hf8ngk.js} +1 -1
  95. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Dmlm1ZjK.js → fa-IR-HGAKTJCU-DMJRRSBp.js} +1 -1
  96. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-2ov9-9H3.js → fi-FI-Z5N7JZ37-BFLC0BFd.js} +1 -1
  97. package/dist-embed/chunks/{flowDb-185abca5-vnPYmNxZ.js → flowDb-185abca5-7Nn2obHG.js} +1 -1
  98. package/dist-embed/chunks/{flowDiagram-1629c991-D_P7IhnT.js → flowDiagram-1629c991-CnvM_psw.js} +1 -1
  99. package/dist-embed/chunks/{flowDiagram-HODETNUW-BUuZtbKx.js → flowDiagram-HODETNUW-BrbR1EkW.js} +1 -1
  100. package/dist-embed/chunks/{flowDiagram-HODETNUW-Dqms2kHK.js → flowDiagram-HODETNUW-Bsl5oOFb.js} +1 -1
  101. package/dist-embed/chunks/{flowDiagram-v2-1d953310-jyYNkbVD.js → flowDiagram-v2-1d953310-TkF25UVC.js} +1 -1
  102. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-CkUTQpED.js → flowchart-elk-definition-6df44142-CwiGfEuJ.js} +1 -1
  103. package/dist-embed/chunks/{fr-FR-RHASNOE6-BUlHGdL2.js → fr-FR-RHASNOE6-CxjhSJC1.js} +1 -1
  104. package/dist-embed/chunks/{ganttDiagram-3b0b3873-CDk8PUcC.js → ganttDiagram-3b0b3873-DeouFDZE.js} +1 -1
  105. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-D4fzILsk.js → ganttDiagram-EL5Y4UJY-BeK3rGHM.js} +1 -1
  106. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Tsk8dNyJ.js → ganttDiagram-EL5Y4UJY-DfJDZVnm.js} +1 -1
  107. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DSJR8KGU.js → gitGraphDiagram-WWUBYQGX-BujqTwbf.js} +1 -1
  108. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-XOpfU7hY.js → gitGraphDiagram-WWUBYQGX-DkYi8eWr.js} +1 -1
  109. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-C7QWh6IZ.js → gitGraphDiagram-f01e8bc2-mCCRVzIs.js} +1 -1
  110. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-T3hKsmlm.js → gl-ES-HMX3MZ6V-BuuMpTaX.js} +1 -1
  111. package/dist-embed/chunks/{he-IL-6SHJWFNN-DoePgaFj.js → he-IL-6SHJWFNN-Cv3Nrcgu.js} +1 -1
  112. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-B_E7TPlk.js → hi-IN-IWLTKZ5I-Sddst60F.js} +1 -1
  113. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-Bu8X3BrR.js → hu-HU-A5ZG7DT2-ehrXVpD0.js} +1 -1
  114. package/dist-embed/chunks/{id-ID-SAP4L64H-jOs7pgj2.js → id-ID-SAP4L64H-Gfb1UYxZ.js} +1 -1
  115. package/dist-embed/chunks/{index-JF61_zqs.js → index-5NOGMVjz.js} +1 -1
  116. package/dist-embed/chunks/{index-BzgczmKp.js → index-6zxVHKca.js} +10 -10
  117. package/dist-embed/chunks/{index-9bae90f3-BywpAnlj.js → index-9bae90f3-CzUk5Hhq.js} +1 -1
  118. package/dist-embed/chunks/{index-DvHqo_Qj.js → index-AHAhJxOc.js} +1 -1
  119. package/dist-embed/chunks/{index-7hNcqUR-.js → index-B9Ya6z2n.js} +1 -1
  120. package/dist-embed/chunks/{index-BwyZ8O-M.js → index-BOEhatkt.js} +1 -1
  121. package/dist-embed/chunks/{index-BYo3uv0g.js → index-BOGJMsUN.js} +2 -2
  122. package/dist-embed/chunks/{index-Bmo-OFNb.js → index-BaBNw6X5.js} +4 -4
  123. package/dist-embed/chunks/{index-BR58wzgU.js → index-BfvZMC2B.js} +1 -1
  124. package/dist-embed/chunks/{index-DnqWNX5L.js → index-BiuABva5.js} +1 -1
  125. package/dist-embed/chunks/{index-0m4vhMAR.js → index-BjfpYq_l.js} +1 -1
  126. package/dist-embed/chunks/{index-BI_0cBab.js → index-BuXVVl_h.js} +7 -7
  127. package/dist-embed/chunks/{index-fBSCurWE.js → index-By5Ku2wm.js} +4 -4
  128. package/dist-embed/chunks/{index-Bw1BRX9C.js → index-CNpJ8Y2y.js} +1 -1
  129. package/dist-embed/chunks/{index-zrM_sbHt.js → index-Cw1r0WFc.js} +1 -1
  130. package/dist-embed/chunks/{index-CS3mm6qN.js → index-D8x0MQWQ.js} +1 -1
  131. package/dist-embed/chunks/{index-BqpOM6Mx.js → index-DDnf06e_.js} +1 -1
  132. package/dist-embed/chunks/{index-B3fpdUTu.js → index-DGefzKhT.js} +1 -1
  133. package/dist-embed/chunks/{index-CgCcVxV_.js → index-DN6Cori6.js} +1 -1
  134. package/dist-embed/chunks/{index-_z7rhr9l.js → index-DQ-v6JVz.js} +4 -4
  135. package/dist-embed/chunks/{index-C2JsK59r.js → index-DTYZzbES.js} +1 -1
  136. package/dist-embed/chunks/{index-MfJ2dN-o.js → index-DWkIO3YS.js} +1 -1
  137. package/dist-embed/chunks/{index-CL2J1VY_.js → index-DZwyICkp.js} +1 -1
  138. package/dist-embed/chunks/{index-CoVJiT-h.js → index-D_vehxcD.js} +1 -1
  139. package/dist-embed/chunks/{index-wqOJuJys.js → index-DiTcTB7Y.js} +1 -1
  140. package/dist-embed/chunks/{index-COPak822.js → index-DmpLE1d4.js} +1 -1
  141. package/dist-embed/chunks/{index-Ca5wn1F-.js → index-Do4nOAaR.js} +1 -1
  142. package/dist-embed/chunks/{index-DBRbrQr1.js → index-DobaF_Ee.js} +1 -1
  143. package/dist-embed/chunks/{index-BfuxhQsr.js → index-DvwQdrde.js} +1 -1
  144. package/dist-embed/chunks/{index-KC9furSU.js → index-DzMYyq8T.js} +1 -1
  145. package/dist-embed/chunks/{index-Cz0vwY93.js → index-QHmZQlKN.js} +6 -6
  146. package/dist-embed/chunks/{index-C00mEIpi.js → index-hxIHgkzg.js} +1 -1
  147. package/dist-embed/chunks/{index-B27olYsx.js → index-nMwnYxTd.js} +1 -1
  148. package/dist-embed/chunks/{index-NvC9D0Mh.js → index-umwkqggg.js} +1 -1
  149. package/dist-embed/chunks/{index-3JfFVSno.js → index-yMppJWrQ.js} +1 -1
  150. package/dist-embed/chunks/{index.esm-BbIi4n-Y.js → index.esm-CC457Cyg.js} +1 -1
  151. package/dist-embed/chunks/{index.esm-ePira_es.js → index.esm-DFDbLGof.js} +1 -1
  152. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CvSw0Uqm.js → infoDiagram-27XIBGKW-C18Zz25F.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-BagqSEKB.js → infoDiagram-27XIBGKW-DiC5_yjB.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-a29d40f1-CY6P-RB2.js → infoDiagram-a29d40f1-DRVyx4Bf.js} +1 -1
  155. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CJjl4-N0.js → ishikawaDiagram-5VMMS53U-3WGbru46.js} +1 -1
  156. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DQfqd5pn.js → ishikawaDiagram-5VMMS53U-DrEzfSK9.js} +1 -1
  157. package/dist-embed/chunks/{it-IT-JPQ66NNP-CrGtxCjf.js → it-IT-JPQ66NNP-BehLHkar.js} +1 -1
  158. package/dist-embed/chunks/{ja-JP-DBVTYXUO-MhHoMhnM.js → ja-JP-DBVTYXUO-BZvqIigI.js} +1 -1
  159. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-B186toLf.js → journeyDiagram-3NMN7TZE-BZWmkUfk.js} +1 -1
  160. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-fMuL5yIV.js → journeyDiagram-3NMN7TZE-DpWKIFIN.js} +1 -1
  161. package/dist-embed/chunks/{journeyDiagram-95396277-Bt2VFr_f.js → journeyDiagram-95396277-D_QLiVq4.js} +1 -1
  162. package/dist-embed/chunks/{kaa-6HZHGXH3-otexWzw0.js → kaa-6HZHGXH3-DgAIF6rN.js} +1 -1
  163. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Bk_pPM_n.js → kab-KAB-ZGHBKWFO-DW4thPSJ.js} +1 -1
  164. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-tkyZOsyz.js → kanban-definition-UXKFOSKX-B84ZaZEy.js} +1 -1
  165. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DyX3lLGq.js → kanban-definition-UXKFOSKX-DxbTprYr.js} +1 -1
  166. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DuPx0Ivn.js → kk-KZ-P5N5QNE5-CCy_nSJ7.js} +1 -1
  167. package/dist-embed/chunks/{km-KH-HSX4SM5Z-DfW3Tv6Q.js → km-KH-HSX4SM5Z-kpXyoxjS.js} +1 -1
  168. package/dist-embed/chunks/{ko-KR-MTYHY66A-CWeM03UD.js → ko-KR-MTYHY66A-CFm6WtQG.js} +1 -1
  169. package/dist-embed/chunks/{ku-TR-6OUDTVRD-BpZVGVBG.js → ku-TR-6OUDTVRD-CKF85mOv.js} +1 -1
  170. package/dist-embed/chunks/{layout-i1FLEqsi.js → layout-DYytgC9r.js} +1 -1
  171. package/dist-embed/chunks/{layout-P_H-0ax9.js → layout-Dx5Hzkor.js} +1 -1
  172. package/dist-embed/chunks/{lexicalHooks-BjTCfdUi.js → lexicalHooks-DbTGOMyq.js} +1 -1
  173. package/dist-embed/chunks/{lt-LT-XHIRWOB4-LavcVuZR.js → lt-LT-XHIRWOB4-CO9Bo5qJ.js} +1 -1
  174. package/dist-embed/chunks/{lv-LV-5QDEKY6T-DWoheFP4.js → lv-LV-5QDEKY6T-CvZszc5p.js} +1 -1
  175. package/dist-embed/chunks/{mermaid.core-Cltl6__q.js → mermaid.core-D0955PCw.js} +5 -5
  176. package/dist-embed/chunks/{mermaid.core-Bd5egiDP.js → mermaid.core-D98kc0OO.js} +3 -3
  177. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BmuUH3a3.js → mindmap-definition-YA3MSWOX-D86IPkt3.js} +1 -1
  178. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-Di0Xac42.js → mindmap-definition-YA3MSWOX-_1SBIPav.js} +1 -1
  179. package/dist-embed/chunks/{mindmap-definition-e4c1d938-D0Ep5LxZ.js → mindmap-definition-e4c1d938-UbbfpF-a.js} +1 -1
  180. package/dist-embed/chunks/{mr-IN-CRQNXWMA-G-1tBL4-.js → mr-IN-CRQNXWMA-Cio_dB9M.js} +1 -1
  181. package/dist-embed/chunks/{my-MM-5M5IBNSE-DpmzmQ2W.js → my-MM-5M5IBNSE-Z0RQ5Vbz.js} +1 -1
  182. package/dist-embed/chunks/{nb-NO-T6EIAALU-DFU_SPCx.js → nb-NO-T6EIAALU-BEQ0YP9J.js} +1 -1
  183. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-Dlz_okxD.js → nl-NL-IS3SIHDZ-YtkJnS_J.js} +1 -1
  184. package/dist-embed/chunks/{nn-NO-6E72VCQL-D9E-BpHw.js → nn-NO-6E72VCQL-C1j2s3qO.js} +1 -1
  185. package/dist-embed/chunks/{oc-FR-POXYY2M6-CVonm6mx.js → oc-FR-POXYY2M6-CinnjccW.js} +1 -1
  186. package/dist-embed/chunks/{pa-IN-N4M65BXN-a5ExTB9v.js → pa-IN-N4M65BXN-c_6OtC6L.js} +1 -1
  187. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BYznG-ZK.js → pegDiagram-XKGWAZYB-BBVcHZ8T.js} +1 -1
  188. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Cptotyez.js → pegDiagram-XKGWAZYB-BJAdJVqh.js} +1 -1
  189. package/dist-embed/chunks/{percentages-BXMCSKIN-C2-svgs_.js → percentages-BXMCSKIN-VqMxh8LK.js} +5 -5
  190. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-BYEkkWvq.js → pieDiagram-E7YTZNPT-C55wHgO0.js} +1 -1
  191. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D51avc4V.js → pieDiagram-E7YTZNPT-EvMxJb2S.js} +1 -1
  192. package/dist-embed/chunks/{pieDiagram-c941bede-Bcau8_Gm.js → pieDiagram-c941bede-DTmViAsB.js} +1 -1
  193. package/dist-embed/chunks/{pl-PL-T2D74RX3-BaHKKcOg.js → pl-PL-T2D74RX3-Cn_9xZgM.js} +1 -1
  194. package/dist-embed/chunks/{pt-BR-5N22H2LF-DZEHszX8.js → pt-BR-5N22H2LF-Da6r-Pp1.js} +1 -1
  195. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BbJKz8vE.js → pt-PT-UZXXM6DQ-D6lhcuX9.js} +1 -1
  196. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-BfWK8wgJ.js → quadrantDiagram-AXDQQJYC-BCeMrGXB.js} +1 -1
  197. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CcMIo23m.js → quadrantDiagram-AXDQQJYC-rFaTvNlk.js} +1 -1
  198. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Db1y7cGB.js → quadrantDiagram-cf8b8fe0-BZAbhmbg.js} +1 -1
  199. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BzqhRF47.js → railroadDiagram-O6MQD6OU-BAXhb26s.js} +1 -1
  200. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DCRFdpxj.js → railroadDiagram-O6MQD6OU-bR7xXZGS.js} +1 -1
  201. package/dist-embed/chunks/{renderer-CM-Z_1Uj.js → renderer-DfML3j-s.js} +1 -1
  202. package/dist-embed/chunks/{requirementDiagram-53bda41b-Dj564NwS.js → requirementDiagram-53bda41b-DNqx3JRF.js} +1 -1
  203. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-dma0a-bN.js → requirementDiagram-BXWQKSXE-B0SL6Gqb.js} +1 -1
  204. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-CIFZt_cP.js → requirementDiagram-BXWQKSXE-DHLQ_9Lw.js} +1 -1
  205. package/dist-embed/chunks/{ro-RO-JPDTUUEW-szdAFgjr.js → ro-RO-JPDTUUEW-BFss9e8X.js} +1 -1
  206. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CbdtKkxy.js → ru-RU-B4JR7IUQ-DIruW2gS.js} +1 -1
  207. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-8ur8k-HP.js → sankeyDiagram-P5KCCOFB-CktuQIU1.js} +1 -1
  208. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DRxZFl9I.js → sankeyDiagram-P5KCCOFB-Nk71fRsK.js} +1 -1
  209. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-Da81kIDr.js → sankeyDiagram-c3ef121a-4-5C_fXA.js} +1 -1
  210. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-DM8BTW5K.js → sequenceDiagram-82a5b84f-DedJ5qnD.js} +1 -1
  211. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BH0Y4uG3.js → sequenceDiagram-WJ2MYXX4-BBGHED3s.js} +1 -1
  212. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CNwXBdZi.js → sequenceDiagram-WJ2MYXX4-Dm3QM01Z.js} +1 -1
  213. package/dist-embed/chunks/{sessions-DlvFLGbP.js → sessions-lT1zQJEG.js} +2 -2
  214. package/dist-embed/chunks/{si-LK-N5RQ5JYF-DfCWfEQf.js → si-LK-N5RQ5JYF-Dom-aTTE.js} +1 -1
  215. package/dist-embed/chunks/{sizeCapture-INFHLROL-D-nX-7Hv.js → sizeCapture-INFHLROL-BNuVN7vX.js} +1 -1
  216. package/dist-embed/chunks/{sizeCapture-INFHLROL-Tw2tvJ1W.js → sizeCapture-INFHLROL-BW7unDBA.js} +1 -1
  217. package/dist-embed/chunks/{sk-SK-C5VTKIMK-CTeAwA1b.js → sk-SK-C5VTKIMK-CLRU9TNq.js} +1 -1
  218. package/dist-embed/chunks/{sl-SI-NN7IZMDC-eFw2lQcd.js → sl-SI-NN7IZMDC-BKLCNVXA.js} +1 -1
  219. package/dist-embed/chunks/{stateDiagram-43e79a5f-H8oVn7EH.js → stateDiagram-43e79a5f-C-TVhCrM.js} +1 -1
  220. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DS-byRyy.js → stateDiagram-D77RDMKH-mLSMGpPQ.js} +1 -1
  221. package/dist-embed/chunks/{stateDiagram-D77RDMKH-CGEuq_3Z.js → stateDiagram-D77RDMKH-tqnmMQUf.js} +1 -1
  222. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-D7zd-PeH.js → stateDiagram-v2-2041ed4f-TVcKzajK.js} +1 -1
  223. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-Bbn7CxXx.js → stateDiagram-v2-MP3YSRHH-C3MNIg5B.js} +1 -1
  224. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CllCmLuo.js → stateDiagram-v2-MP3YSRHH-C6TftAzE.js} +1 -1
  225. package/dist-embed/chunks/{styles-455b33cd-CYP0pxwM.js → styles-455b33cd-CIILXOoF.js} +1 -1
  226. package/dist-embed/chunks/{styles-f932cba9-dXHjU5Mc.js → styles-f932cba9-CVBMDsh6.js} +1 -1
  227. package/dist-embed/chunks/{styles-fcc2142b-CrgFTq7b.js → styles-fcc2142b-CTOmFTKK.js} +1 -1
  228. package/dist-embed/chunks/{subset-shared.chunk-BCNcfBdp.js → subset-shared.chunk-zIH7OLsP.js} +1 -1
  229. package/dist-embed/chunks/{subset-worker.chunk-nY71AE9b.js → subset-worker.chunk-b9j7PKPe.js} +1 -1
  230. package/dist-embed/chunks/{sv-SE-XGPEYMSR-B3BAd7ic.js → sv-SE-XGPEYMSR-D0UV0HV7.js} +1 -1
  231. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-DY-6e2w2.js → svgDrawCommon-148a3cd9-BCgvh5nL.js} +1 -1
  232. package/dist-embed/chunks/{swimlanes-42K2YHIH-CpFqKR23.js → swimlanes-42K2YHIH-BQTDK2Ta.js} +1 -1
  233. package/dist-embed/chunks/{swimlanes-42K2YHIH-BoshoQYI.js → swimlanes-42K2YHIH-DHcV40DB.js} +1 -1
  234. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BNalU-se.js → swimlanesDiagram-VR7AAH4N-BV8Vb5g2.js} +1 -1
  235. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-CUEoZUeR.js → swimlanesDiagram-VR7AAH4N-CQ7d-sbG.js} +1 -1
  236. package/dist-embed/chunks/{ta-IN-2NMHFXQM-Ch7Coorh.js → ta-IN-2NMHFXQM-C-EJ3jDE.js} +1 -1
  237. package/dist-embed/chunks/{th-TH-HPSO5L25-gmc7tguq.js → th-TH-HPSO5L25-CfQh62Qa.js} +1 -1
  238. package/dist-embed/chunks/{timeline-definition-24CTP7MA-BD_Hd7OM.js → timeline-definition-24CTP7MA-CKtubk73.js} +1 -1
  239. package/dist-embed/chunks/{timeline-definition-24CTP7MA-CLQC5Soj.js → timeline-definition-24CTP7MA-DJcFE1jT.js} +1 -1
  240. package/dist-embed/chunks/{timeline-definition-7545f45a-CBNPBc2S.js → timeline-definition-7545f45a-CLycxRtq.js} +1 -1
  241. package/dist-embed/chunks/{tr-TR-DEFEU3FU-DoKmjhCn.js → tr-TR-DEFEU3FU-Lz7Ka2Zr.js} +1 -1
  242. package/dist-embed/chunks/{uk-UA-QMV73CPH-uzMCDuv6.js → uk-UA-QMV73CPH-DU0hsGUJ.js} +1 -1
  243. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Clhmiu8L.js → vennDiagram-4TSXK5OY-BMmQ-DIV.js} +1 -1
  244. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BxbIHKUM.js → vennDiagram-4TSXK5OY-Bq0xMhnH.js} +1 -1
  245. package/dist-embed/chunks/{vi-VN-M7AON7JQ-UC9RyOt8.js → vi-VN-M7AON7JQ-CDvS0SiL.js} +1 -1
  246. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-HuiHAtr-.js → wardleyDiagram-VM6X3IG4-C1VKw6YX.js} +1 -1
  247. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-un-PuqHe.js → wardleyDiagram-VM6X3IG4-DL5LgQWr.js} +1 -1
  248. package/dist-embed/chunks/{xychartDiagram-3f383b91-3k3NdPbU.js → xychartDiagram-3f383b91-B-BTwetN.js} +1 -1
  249. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CIDOTVoZ.js → xychartDiagram-S5SC5T6Z-BQHFHk-x.js} +1 -1
  250. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CvZAV0KM.js → xychartDiagram-S5SC5T6Z-BXkM4beH.js} +1 -1
  251. package/dist-embed/chunks/{zh-CN-LNUGB5OW-DFA0PCzk.js → zh-CN-LNUGB5OW-CWE-bF0d.js} +1 -1
  252. package/dist-embed/chunks/{zh-HK-E62DVLB3-WzEwoBkd.js → zh-HK-E62DVLB3-pEfL2bds.js} +1 -1
  253. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-B7w1h39x.js → zh-TW-RAJ6MFWO-Cp6UFUuD.js} +1 -1
  254. package/dist-embed/datalayer-app-main.js +107 -106
  255. package/lib/apps/apps/records.d.ts +21 -4
  256. package/lib/apps/apps/records.js +8 -6
  257. package/lib/apps/apps/threads.d.ts +11 -1
  258. package/lib/apps/apps/threads.js +17 -0
  259. package/lib/apps/core/index.d.ts +71 -0
  260. package/lib/apps/core/index.js +22 -0
  261. package/lib/apps/plugins/app-activity/AppActivity.js +10 -4
  262. package/lib/apps/plugins/chat/ChatView.js +123 -6
  263. package/lib/apps/plugins/chat/SessionActionsMenu.d.ts +40 -0
  264. package/lib/apps/plugins/chat/SessionActionsMenu.js +73 -0
  265. package/lib/apps/plugins/chat/SessionChooseDialog.d.ts +22 -0
  266. package/lib/apps/plugins/chat/SessionChooseDialog.js +39 -0
  267. package/lib/apps/plugins/chat/index.js +8 -1
  268. package/lib/apps/plugins/chat/sessionActions.d.ts +65 -0
  269. package/lib/apps/plugins/chat/sessionActions.js +184 -0
  270. package/lib/chat/Chat.d.ts +42 -2
  271. package/lib/chat/Chat.js +148 -2
  272. package/lib/chat/base/ChatBase.js +33 -6
  273. package/lib/chat/index.d.ts +1 -1
  274. package/lib/chat/messages/ChatMessageList.d.ts +3 -1
  275. package/lib/chat/messages/ChatMessageList.js +21 -2
  276. package/lib/portable/activity.d.ts +91 -2
  277. package/lib/portable/activity.js +143 -4
  278. package/lib/portable/fixtures.d.ts +1 -1
  279. package/lib/portable/fixtures.js +17 -7
  280. package/lib/portable/index.d.ts +1 -1
  281. package/lib/portable/index.js +3 -2
  282. package/lib/portable/sessions.d.ts +25 -1
  283. package/lib/portable/sessions.js +62 -4
  284. package/lib/specs/harnesses.js +96 -0
  285. package/lib/specs/index.d.ts +1 -0
  286. package/lib/specs/index.js +1 -0
  287. package/lib/specs/sessionFiles.d.ts +123 -0
  288. package/lib/specs/sessionFiles.js +578 -0
  289. package/lib/types/agentspecs.d.ts +26 -0
  290. package/lib/types/chat.d.ts +38 -0
  291. package/package.json +1 -1
  292. package/scripts/codegen/generate_agents.py +1 -0
  293. package/scripts/codegen/generate_harnesses.py +70 -0
  294. package/scripts/codegen/generate_session_files.py +296 -0
  295. package/dist-embed/chunks/ChatView-B_EEvtKi.js +0 -32
  296. package/dist-embed/chunks/SchemaForm-Dg9uk6m3.js +0 -1
@@ -1,3 +1,3 @@
1
- import{$ as b,a0 as E,a5 as v,r as I,j as i,B as c,T as N,bD as j,bE as T,bF as U}from"../datalayer-app-main.js";import{EphemeralDocument as O}from"./EphemeralDocument-D3rfKBME.js";import{O as _,b as D,u as P}from"./openingNotebook-BBToQOSy.js";import{P as d}from"./PrismCss-sPywsCAF.js";import"./lexicalHooks-BjTCfdUi.js";import"./LexicalToolRegistry-BRMKFkxC.js";import"./useProgressTask-CkYoDUBo.js";import"./JupyterLexicalExtension-LpJ6Rj9h.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./Output-Cnq5i-bK.js";import"./index-fBSCurWE.js";import"./hoverbox-CStlKQWE.js";import"./index-BI_0cBab.js";import"./index-BR58wzgU.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.js";import"./RestartIcon-Ca6_HoK0.js";const M="Quarterly revenue by region",S="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",w="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{$ as b,a0 as E,a5 as v,r as I,j as i,B as c,T as N,bD as j,bE as T,bF as U}from"../datalayer-app-main.js";import{EphemeralDocument as O}from"./EphemeralDocument-BRzYMd8Z.js";import{O as _,b as D,u as P}from"./openingNotebook-BBToQOSy.js";import{P as d}from"./PrismCss-sPywsCAF.js";import"./lexicalHooks-DbTGOMyq.js";import"./LexicalToolRegistry-B8ccPURu.js";import"./useProgressTask-CkYoDUBo.js";import"./JupyterLexicalExtension-BBivQZvX.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./Output-CEoYDjwn.js";import"./index-By5Ku2wm.js";import"./hoverbox-CStlKQWE.js";import"./index-BuXVVl_h.js";import"./index-BfvZMC2B.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.js";import"./RestartIcon-Ca6_HoK0.js";const M="Quarterly revenue by region",S="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",w="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(M)],{tag:"h1"}),u("paragraph",[g(S)],{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":D},metadata:{}}],jupyterInputNodeUuid:l,jupyterOutputNodeUuid:w}],direction:"ltr",format:"",indent:0,type:"root",version:1}}}function lt({workspace:e}){const o=b(),t=E(o.snapshot),r=e.surfaceId,n=P(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,aI as ke,aJ as Se,aK as je,aL as we,aM as ve,j as e,B as M,aN as Ce,aO as Ee,aP as be,aQ as Re,aR as V,k as K,aS as Me,aT as Te,aU as Pe,a9 as T,aV as Ne,aW as Y,aX as $,aY as De,aZ as Ue}from"../datalayer-app-main.js";import{useLexicalTools as He}from"./lexicalHooks-BjTCfdUi.js";import{u as Ie}from"./useProgressTask-CkYoDUBo.js";import{L as Le,j as We,T as Be,k as Ae,l as Je,m as _e,D as q,n as Fe,o as ze,p as Ve,q as Ke,J as Ye,s as $e,F as qe,t as Qe,u as Xe,v as Ze,w as Ge}from"./JupyterLexicalExtension-LpJ6Rj9h.js";import"./LexicalToolRegistry-BRMKFkxC.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./PrismCss-sPywsCAF.js";import"./Output-Cnq5i-bK.js";import"./index-fBSCurWE.js";import"./hoverbox-CStlKQWE.js";import"./index-BI_0cBab.js";import"./index-BR58wzgU.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.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=Y();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=Y();t.clear(),t.append($())},{tag:"history-merge"})}}},[o,s]),null}function et({disabled:o}){const[s]=T();return r.useEffect(()=>{Ne(s,De).output.disabled.value=o},[s,o]),null}function tt({setIsLinkEditMode:o,extraItems:s}){const[l]=T(),[t,d]=r.useState(l);return e.jsx(Ge,{editor:l,activeEditor:t,setActiveEditor:d,setIsLinkEditMode:o,extraItems:s})}function Q({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:X,colorMode:Z,content:P,onContentChange:w,onToolsReady:N,onKernelChange:v,collaboration:n,toolbarExtraItems:G,showToolbar:O=!0,inheritTheme:D=!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]),H=r.useRef(P),I=r.useRef(o);I.current!==o&&(I.current=o,H.current=P);const L=H.current,W=r.useRef(L??""),B=He(o);r.useEffect(()=>{N?.(B)},[B,N]);const{runtimes:A,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 A.find(j=>String(j?.runtime_name||"")===a)},[l,s,A]),J=!!(!l?.baseUrl&&String(s||"").trim()&&!m);r.useEffect(()=>{if(!J)return;C();const i=window.setInterval(()=>{C()},1e3);return()=>{window.clearInterval(i)}},[J,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=K.ServerConnection.makeSettings({baseUrl:b,wsUrl:pe,token:u,appendToken:!0});a=new K.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);Ie(`ephemeral-document-start-${o}`,_);const oe=r.useMemo(()=>Se({name:"@datalayer/agent-runtimes/EphemeralDocument",namespace:`ephemeral-document-${o}`,theme:Ze,dependencies:[Xe,...U?[Pe]:[]],onError(i){console.error("[EphemeralDocument]",i)}}),[o,U]),ie=r.useCallback(i=>{if(!w)return;const a=JSON.stringify(i.toJSON());a!==W.current&&(W.current=a,w(a))},[w]),[x,se]=r.useState(null),[,F]=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=Z??ue,ge=X??he,fe=we(),S=ve(ge),z=k==="auto"?fe:k,c=(z==="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(Q,{inherit:D,colorMode:k,themeConfig:S,children:e.jsx(Ce,{colormode:z,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(Le,{lexicalId:o,serviceManager:E,children:e.jsx(Ee,{extension:oe,contentEditable:null,children:e.jsx(We,{children:e.jsx(Be,{children:e.jsxs("div",{className:"editor-shell",children:[O?e.jsx(tt,{setIsLinkEditMode:F,extraItems:G}):null,e.jsx("div",{className:"editor-container",children:e.jsxs("div",{className:"editor-inner",children:[h&&n?e.jsx(Ae,{id:n.roomId,providerFactory:Je,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(q,{maxWidth:"100%"}),!h&&e.jsx(Re,{onChange:ie}),e.jsx(et,{disabled:h}),!h&&e.jsx(Oe,{content:L}),e.jsx(Fe,{}),e.jsx(ze,{}),e.jsx(Ve,{}),e.jsx(Ke,{kernel:p}),e.jsx(Ye,{kernel:p}),x&&e.jsxs(e.Fragment,{children:[e.jsx($e,{anchorElem:x}),e.jsx(qe,{anchorElem:x,setIsLinkEditMode:F}),e.jsx(Qe,{anchorElem:x})]})]})})]})})})})})})})}):_?e.jsx(Q,{inherit:D,colorMode:k,themeConfig:S,children:e.jsx(M,{position:"absolute",inset:0,display:"flex",flexDirection:"column",padding:2,backgroundColor:c,children:e.jsx(q,{label:"Starting the document",maxWidth:"100%"})})}):null})}export{Ut as EphemeralDocument,Ut as default};
1
+ import{r,aI as ke,aJ as Se,aK as je,aL as we,aM as ve,j as e,B as M,aN as Ce,aO as Ee,aP as be,aQ as Re,aR as V,k as K,aS as Me,aT as Te,aU as Pe,a9 as T,aV as Ne,aW as Y,aX as $,aY as De,aZ as Ue}from"../datalayer-app-main.js";import{useLexicalTools as He}from"./lexicalHooks-DbTGOMyq.js";import{u as Ie}from"./useProgressTask-CkYoDUBo.js";import{L as Le,j as We,T as Be,k as Ae,l as Je,m as _e,D as q,n as Fe,o as ze,p as Ve,q as Ke,J as Ye,s as $e,F as qe,t as Qe,u as Xe,v as Ze,w as Ge}from"./JupyterLexicalExtension-BBivQZvX.js";import"./LexicalToolRegistry-B8ccPURu.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./PrismCss-sPywsCAF.js";import"./Output-CEoYDjwn.js";import"./index-By5Ku2wm.js";import"./hoverbox-CStlKQWE.js";import"./index-BuXVVl_h.js";import"./index-BfvZMC2B.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.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=Y();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=Y();t.clear(),t.append($())},{tag:"history-merge"})}}},[o,s]),null}function et({disabled:o}){const[s]=T();return r.useEffect(()=>{Ne(s,De).output.disabled.value=o},[s,o]),null}function tt({setIsLinkEditMode:o,extraItems:s}){const[l]=T(),[t,d]=r.useState(l);return e.jsx(Ge,{editor:l,activeEditor:t,setActiveEditor:d,setIsLinkEditMode:o,extraItems:s})}function Q({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:X,colorMode:Z,content:P,onContentChange:w,onToolsReady:N,onKernelChange:v,collaboration:n,toolbarExtraItems:G,showToolbar:O=!0,inheritTheme:D=!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]),H=r.useRef(P),I=r.useRef(o);I.current!==o&&(I.current=o,H.current=P);const L=H.current,W=r.useRef(L??""),B=He(o);r.useEffect(()=>{N?.(B)},[B,N]);const{runtimes:A,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 A.find(j=>String(j?.runtime_name||"")===a)},[l,s,A]),J=!!(!l?.baseUrl&&String(s||"").trim()&&!m);r.useEffect(()=>{if(!J)return;C();const i=window.setInterval(()=>{C()},1e3);return()=>{window.clearInterval(i)}},[J,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=K.ServerConnection.makeSettings({baseUrl:b,wsUrl:pe,token:u,appendToken:!0});a=new K.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);Ie(`ephemeral-document-start-${o}`,_);const oe=r.useMemo(()=>Se({name:"@datalayer/agent-runtimes/EphemeralDocument",namespace:`ephemeral-document-${o}`,theme:Ze,dependencies:[Xe,...U?[Pe]:[]],onError(i){console.error("[EphemeralDocument]",i)}}),[o,U]),ie=r.useCallback(i=>{if(!w)return;const a=JSON.stringify(i.toJSON());a!==W.current&&(W.current=a,w(a))},[w]),[x,se]=r.useState(null),[,F]=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=Z??ue,ge=X??he,fe=we(),S=ve(ge),z=k==="auto"?fe:k,c=(z==="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(Q,{inherit:D,colorMode:k,themeConfig:S,children:e.jsx(Ce,{colormode:z,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(Le,{lexicalId:o,serviceManager:E,children:e.jsx(Ee,{extension:oe,contentEditable:null,children:e.jsx(We,{children:e.jsx(Be,{children:e.jsxs("div",{className:"editor-shell",children:[O?e.jsx(tt,{setIsLinkEditMode:F,extraItems:G}):null,e.jsx("div",{className:"editor-container",children:e.jsxs("div",{className:"editor-inner",children:[h&&n?e.jsx(Ae,{id:n.roomId,providerFactory:Je,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(q,{maxWidth:"100%"}),!h&&e.jsx(Re,{onChange:ie}),e.jsx(et,{disabled:h}),!h&&e.jsx(Oe,{content:L}),e.jsx(Fe,{}),e.jsx(ze,{}),e.jsx(Ve,{}),e.jsx(Ke,{kernel:p}),e.jsx(Ye,{kernel:p}),x&&e.jsxs(e.Fragment,{children:[e.jsx($e,{anchorElem:x}),e.jsx(qe,{anchorElem:x,setIsLinkEditMode:F}),e.jsx(Qe,{anchorElem:x})]})]})})]})})})})})})})}):_?e.jsx(Q,{inherit:D,colorMode:k,themeConfig:S,children:e.jsx(M,{position:"absolute",inset:0,display:"flex",flexDirection:"column",padding:2,backgroundColor:c,children:e.jsx(q,{label:"Starting the document",maxWidth:"100%"})})}):null})}export{Ut as EphemeralDocument,Ut as default};
@@ -1,2 +1,2 @@
1
- import{ck as O,bd as Ee,k as x,ch as I,bc as be,ei as _e,ej as Re,ek as Ce,r as f,X as ne,aI as Me,el as Ue,j as v,aK as je,aL as qe,aM as Te,B as Z,aN as Ae,aS as Ne,aT as Ie,aZ as Oe}from"../datalayer-app-main.js";import{u as Le}from"./useProgressTask-CkYoDUBo.js";import{a as De}from"./NotebookToolbar-OYR71Q5t.js";import{C as Je,a as Be,N as Pe}from"./CellSidebarExtension-CbVVhhaO.js";import"./RepoPushIcon-D-lnSZbT.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./index-BI_0cBab.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./index-BR58wzgU.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./renderer-CM-Z_1Uj.js";import"./SquareIcon-C4G5_a9Y.js";const H="jupyter_server_nbmodel",$e=new WeakSet;function Ke(e){return $e.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 Q(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 We(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&&We(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 W(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 W(_,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{ck as O,bd as Ee,k as x,ch as I,bc as be,ei as _e,ej as Re,ek as Ce,r as f,X as ne,aI as Me,el as Ue,j as v,aK as je,aL as qe,aM as Te,B as Z,aN as Ae,aS as Ne,aT as Ie,aZ as Oe}from"../datalayer-app-main.js";import{u as Le}from"./useProgressTask-CkYoDUBo.js";import{a as De}from"./NotebookToolbar-OYR71Q5t.js";import{C as Je,a as Be,N as Pe}from"./CellSidebarExtension-DbbW8AJP.js";import"./RepoPushIcon-D-lnSZbT.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./index-BuXVVl_h.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./index-BfvZMC2B.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./renderer-DfML3j-s.js";import"./SquareIcon-C4G5_a9Y.js";const H="jupyter_server_nbmodel",$e=new WeakSet;function Ke(e){return $e.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 Q(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 We(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&&We(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 W(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 W(_,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 W(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 Xe(e,n,r,t,o,s=100,a,i=!1){return W(e,n,r,t,o,s,{onAccepted:a,recoverOutputs:i})}async function Ye(e,n,r){const t=e.model.sharedModel;t.executionState="running";try{const s=await(await Xe(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",Q(e),s.status==="ok"}catch(o){if(o instanceof x.ServerConnection.ResponseError&&o.response.status===404)return Q(e),t.executionState="idle",!1;throw o}}const N=new Set;function Ze(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 Qe(e,n){if(Ke(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=Ze(r.requestUrl,n);return console.info("[agent-runtimes] Resuming a server execution",{cellId:e.model.sharedModel.getId(),requestId:r.requestId,requestUrl:t}),Ye(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 K=new Set;async function et(e,n,r){const t=`${r.baseUrl}#${n.id}`;if(K.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 K.add(t),0;if(!o.ok)throw await x.ServerConnection.ResponseError.create(o).catch(()=>new Error(`Invalid response: ${o.status} ${o.statusText}`.trim()));K.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)Qe(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,B]=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),B(!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 Y=[...C.kernels.running()][0];if(l){g(C);return}D(C),J(Y?.id),B(!Y)}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),B(!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(),P=k??he,Se=M??ge,ye=qe(),$=Te(Se),X=P==="auto"?ye:P,T=(X==="dark"?$.themeStyles.dark:$.themeStyles.light).backgroundColor??"",ve=f.useMemo(()=>[new Je({factory:Be})],[]),xe=f.useMemo(()=>`.datalayer/${e}.ipynb`,[e]);return v.jsx(Z,{flex:1,minHeight:0,height:"100%",position:"relative",overflow:"hidden",bg:"canvas.default",children:q&&ce?v.jsx(ot,{inherit:o,colorMode:P,themeConfig:$,children:v.jsx(Ae,{colormode:X,backgroundColor:T,children:v.jsx(Z,{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(Pe,{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,a9 as N,c9 as z,ca as L,cb as T,cc as F,cd as R,I as O,ce as _}from"../datalayer-app-main.js";import{x as U,y as W,z as $,A as M}from"./JupyterLexicalExtension-LpJ6Rj9h.js";import H from"./ExcalidrawModal-B2VIt9DT.js";import{r as X}from"./percentages-BXMCSKIN-C2-svgs_.js";import{u as J}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./PrismCss-sPywsCAF.js";import"./Output-Cnq5i-bK.js";import"./index-fBSCurWE.js";import"./hoverbox-CStlKQWE.js";import"./index-BI_0cBab.js";import"./index-BR58wzgU.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-BRMKFkxC.js";import"./extends-CF3RwP-h.js";import"./index-TsE1d0nj.js";import"./index-DoBkwclg.js";const P=e=>{const n=e?.firstElementChild?.firstElementChild,g=e.getAttribute("viewBox");if(g!=null){const a=g.split(" ");e.setAttribute("width",a[2]),e.setAttribute("height",a[3])}n&&n.tagName==="style"&&n.remove()};function V({elements:e,files:n,imageContainerRef:g,appState:a,rootClassName:s=null,width:c="inherit",height:C="inherit"}){const[b,S]=o.useState(null),{theme:E}=J(b),[B,u]=o.useState(null),[v,w]=o.useState(0);o.useEffect(()=>{const r=new MutationObserver(x=>{for(const h of x)if(h.type==="attributes"&&(h.attributeName==="style"||h.attributeName==="class")){w(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 x=["#ffffff","#000000","transparent",""],h=a?.viewBackgroundColor||"transparent",l=x.includes(h.toLowerCase()),A={...a,viewBackgroundColor:l?"transparent":a?.viewBackgroundColor,exportBackground:!l,exportWithDarkMode:E==="dark"},m=await X({appState:A,elements:e,files:n});P(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=>{S(r),r&&g&&(g.current=r)},className:s??"",style:f,dangerouslySetInnerHTML:{__html:B?.outerHTML??""}})}function Bt({nodeKey:e,data:n,width:g,height:a}){const[s]=N(),c=U(),[C,b]=o.useState(n==="[]"&&s.isEditable()),S=o.useRef(null),E=o.useRef(null),B=o.useRef(null),[u,v,w]=W(e),[f,k]=o.useState(!1);o.useEffect(()=>{if(!c){u&&w();return}return z(s.registerCommand(L,t=>{const d=E.current,i=t.target;return f?!0:d!==null&&T(i)&&d.contains(i)?(t.shiftKey||w(),v(!u),t.detail>1&&b(!0),!0):!1},F))},[w,s,u,f,v,c]);const j=o.useCallback(()=>(b(!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)},x=(t,d)=>{setTimeout(()=>{k(!1)},200),s.update(()=>{const i=R(e);M(i)&&(i.setWidth(t),i.setHeight(d))})},h=o.useCallback(()=>{b(!0)},[]),{elements:l=[],files:A={},appState:m={}}=o.useMemo(()=>JSON.parse(n),[n]),D=o.useCallback(()=>{b(!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),b(!1)},closeOnClickOutside:!1}),l.length>0&&p.jsxs("button",{ref:E,className:`excalidraw-button ${u?"selected":""}`,children:[p.jsx(V,{imageContainerRef:S,className:"image",elements:l,files:A,appState:m,width:g,height:a}),u&&c&&p.jsx(O,{icon:_,"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:S,editor:s,onResizeStart:r,onResizeEnd:x})]})]})}export{Bt as default};
1
+ import{r as o,j as p,a9 as N,c9 as z,ca as L,cb as T,cc as F,cd as R,I as O,ce as _}from"../datalayer-app-main.js";import{x as U,y as W,z as $,A as M}from"./JupyterLexicalExtension-BBivQZvX.js";import H from"./ExcalidrawModal-DrntFjbe.js";import{r as X}from"./percentages-BXMCSKIN-VqMxh8LK.js";import{u as J}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./PrismCss-sPywsCAF.js";import"./Output-CEoYDjwn.js";import"./index-By5Ku2wm.js";import"./hoverbox-CStlKQWE.js";import"./index-BuXVVl_h.js";import"./index-BfvZMC2B.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-B8ccPURu.js";import"./extends-CF3RwP-h.js";import"./index-TsE1d0nj.js";import"./index-DoBkwclg.js";const P=e=>{const n=e?.firstElementChild?.firstElementChild,g=e.getAttribute("viewBox");if(g!=null){const a=g.split(" ");e.setAttribute("width",a[2]),e.setAttribute("height",a[3])}n&&n.tagName==="style"&&n.remove()};function V({elements:e,files:n,imageContainerRef:g,appState:a,rootClassName:s=null,width:c="inherit",height:C="inherit"}){const[b,S]=o.useState(null),{theme:E}=J(b),[B,u]=o.useState(null),[v,w]=o.useState(0);o.useEffect(()=>{const r=new MutationObserver(x=>{for(const h of x)if(h.type==="attributes"&&(h.attributeName==="style"||h.attributeName==="class")){w(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 x=["#ffffff","#000000","transparent",""],h=a?.viewBackgroundColor||"transparent",l=x.includes(h.toLowerCase()),A={...a,viewBackgroundColor:l?"transparent":a?.viewBackgroundColor,exportBackground:!l,exportWithDarkMode:E==="dark"},m=await X({appState:A,elements:e,files:n});P(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=>{S(r),r&&g&&(g.current=r)},className:s??"",style:f,dangerouslySetInnerHTML:{__html:B?.outerHTML??""}})}function Bt({nodeKey:e,data:n,width:g,height:a}){const[s]=N(),c=U(),[C,b]=o.useState(n==="[]"&&s.isEditable()),S=o.useRef(null),E=o.useRef(null),B=o.useRef(null),[u,v,w]=W(e),[f,k]=o.useState(!1);o.useEffect(()=>{if(!c){u&&w();return}return z(s.registerCommand(L,t=>{const d=E.current,i=t.target;return f?!0:d!==null&&T(i)&&d.contains(i)?(t.shiftKey||w(),v(!u),t.detail>1&&b(!0),!0):!1},F))},[w,s,u,f,v,c]);const j=o.useCallback(()=>(b(!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)},x=(t,d)=>{setTimeout(()=>{k(!1)},200),s.update(()=>{const i=R(e);M(i)&&(i.setWidth(t),i.setHeight(d))})},h=o.useCallback(()=>{b(!0)},[]),{elements:l=[],files:A={},appState:m={}}=o.useMemo(()=>JSON.parse(n),[n]),D=o.useCallback(()=>{b(!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),b(!1)},closeOnClickOutside:!1}),l.length>0&&p.jsxs("button",{ref:E,className:`excalidraw-button ${u?"selected":""}`,children:[p.jsx(V,{imageContainerRef:S,className:"image",elements:l,files:A,appState:m,width:g,height:a}),u&&c&&p.jsx(O,{icon:_,"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:S,editor:s,onResizeStart:r,onResizeEnd:x})]})]})}export{Bt as default};
@@ -1 +1 @@
1
- import{r as t,j as o,D as u,bB as h,v as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-C2-svgs_.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-LpJ6Rj9h.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./PrismCss-sPywsCAF.js";import"./Output-Cnq5i-bK.js";import"./index-fBSCurWE.js";import"./hoverbox-CStlKQWE.js";import"./index-BI_0cBab.js";import"./index-BR58wzgU.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-BRMKFkxC.js";import"./extends-CF3RwP-h.js";import"./index-TsE1d0nj.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),[B,D]=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 S=()=>{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,B)}else v()},A=()=>{i(!0)};if(n===!1)return null;const y=(e,a,s)=>{M(e),D(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:A,children:"Discard"}),o.jsx(f,{variant:"primary",onClick:S,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,bB as h,v as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-VqMxh8LK.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-BBivQZvX.js";import"./NotebookSkeleton-CMjtj893.js";import"./Avatar-BdEm_dq2.js";import"./url-CyLVEV11.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-ClANP_40.js";import"./LinkIcon-D2NHA8tm.js";import"./Toolbar-BTcbrZZV.js";import"./KebabHorizontalIcon-DD3W5tPT.js";import"./ArrowUpIcon-DfyinHM7.js";import"./SortDescIcon-DoqEaF0Z.js";import"./PaintbrushIcon-uSa0SObK.js";import"./PrismCss-sPywsCAF.js";import"./Output-CEoYDjwn.js";import"./index-By5Ku2wm.js";import"./hoverbox-CStlKQWE.js";import"./index-BuXVVl_h.js";import"./index-BfvZMC2B.js";import"./color-CG7_7V2-.js";import"./isEqual-B_c_I9Ri.js";import"./defaultLocale-5voVPcsN.js";import"./index-N9VP4Lh3.js";import"./index-aWforeu6.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-B8ccPURu.js";import"./extends-CF3RwP-h.js";import"./index-TsE1d0nj.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),[B,D]=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 S=()=>{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,B)}else v()},A=()=>{i(!0)};if(n===!1)return null;const y=(e,a,s)=>{M(e),D(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:A,children:"Discard"}),o.jsx(f,{variant:"primary",onClick:S,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};