@datalayer/agent-runtimes 1.6.39 → 1.6.41

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 (156) hide show
  1. package/dist-embed/chunks/{AgentDetails-Ba3DRn2p.js → AgentDetails-DC7O2VWb.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-CXN0RO_L.js → AgentDetailsDialog-BTJCl-o-.js} +1 -1
  3. package/dist-embed/chunks/{AgentInspector-C66D0b0W.js → AgentInspector-BXqYY8g-.js} +1 -1
  4. package/dist-embed/chunks/{AgentInspectorDialog-DeK96QG1.js → AgentInspectorDialog-dRHZ1p73.js} +1 -1
  5. package/dist-embed/chunks/Avatar-Cv5OpUWu.js +1 -0
  6. package/dist-embed/chunks/{CellSidebarExtension-D7aXShZc.js → CellSidebarExtension-DXPIz0Km.js} +7 -7
  7. package/dist-embed/chunks/{ChatView-2N7PbcDs.js → ChatView-CRitAB2i.js} +4 -4
  8. package/dist-embed/chunks/{CollapsiblePlugin-y8sx_FL8.js → CollapsiblePlugin-BPlfrDQU.js} +1 -1
  9. package/dist-embed/chunks/DatalayerAgentBridge-D01Ek4NE.js +1 -0
  10. package/dist-embed/chunks/{DeckComponent-BnyeYRQq.js → DeckComponent-jvb83Q__.js} +1 -1
  11. package/dist-embed/chunks/{DocumentView-DT4DcdJI.js → DocumentView-BrdFnTVh.js} +3 -3
  12. package/dist-embed/chunks/{EphemeralDocument-CGISw1N3.js → EphemeralDocument-CkPQKyfy.js} +1 -1
  13. package/dist-embed/chunks/{EphemeralNotebook-Dyx-25uN.js → EphemeralNotebook-CiQIC3MG.js} +1 -1
  14. package/dist-embed/chunks/{ExcalidrawComponent-Bl3R2Mic.js → ExcalidrawComponent-D6Cr_b0Z.js} +1 -1
  15. package/dist-embed/chunks/{ExcalidrawModal-DSL5jBhG.js → ExcalidrawModal-Bso7oDbl.js} +1 -1
  16. package/dist-embed/chunks/{JupyterLexicalExtension-C55KdpCk.js → JupyterLexicalExtension-DuD7IV6j.js} +6 -6
  17. package/dist-embed/chunks/{KernelVariables-D3DSQaD3.js → KernelVariables-CXQagESp.js} +2 -2
  18. package/dist-embed/chunks/{NotebookSkeleton-BkzTMhIX.js → NotebookSkeleton-CvO9WylK.js} +1 -1
  19. package/dist-embed/chunks/{NotebookToolSurfaces-Bvj9nwA9.js → NotebookToolSurfaces-B9fkzQNR.js} +1 -1
  20. package/dist-embed/chunks/{NotebookToolbar-BMjQTGrr.js → NotebookToolbar-D36duUxK.js} +1 -1
  21. package/dist-embed/chunks/{NotebookView-DRPnBAI2.js → NotebookView-BrdHwtKH.js} +1 -1
  22. package/dist-embed/chunks/{Output-D-7eUege.js → Output-D9cwH5rg.js} +1 -1
  23. package/dist-embed/chunks/{SandboxDetailsDialog-qJBg2naH.js → SandboxDetailsDialog-BYgLjg3W.js} +1 -1
  24. package/dist-embed/chunks/{SchemaForm-D6BAKaNe.js → SchemaForm-B3qMIWMy.js} +1 -1
  25. package/dist-embed/chunks/{SheetTabs-BLaEhX0D.js → SheetTabs-BR72mzuo.js} +2 -2
  26. package/dist-embed/chunks/{SpreadsheetPreviewView-CaFQASZ4.js → SpreadsheetPreviewView-RA8ASTBV.js} +1 -1
  27. package/dist-embed/chunks/{SpreadsheetView-DesdGLpm.js → SpreadsheetView-BfScdA-X.js} +1 -1
  28. package/dist-embed/chunks/{Toolbar-BncUh2ly.js → Toolbar-BAjGB6b-.js} +1 -1
  29. package/dist-embed/chunks/{WidgetVariableView-B4faSdWW.js → WidgetVariableView-7lvDcxCg.js} +1 -1
  30. package/dist-embed/chunks/{YouTubePlugin-BPUrB3sh.js → YouTubePlugin-BbjCzaT_.js} +1 -1
  31. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-Dq_tRQtR.js → ar-SA-G6X2FPQ2-D4M2b5Lr.js} +1 -1
  32. package/dist-embed/chunks/{az-AZ-76LH7QW2-DQAoJi9C.js → az-AZ-76LH7QW2-Rn7oINhz.js} +1 -1
  33. package/dist-embed/chunks/{bg-BG-XCXSNQG7-CfZUFj2_.js → bg-BG-XCXSNQG7-xztohKe7.js} +1 -1
  34. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DiqZdhkT.js → bn-BD-2XOGV67Q-C7Ssg1_2.js} +1 -1
  35. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-B6c2PcO9.js → ca-ES-6MX7JW3Y-Cr0zd8Z6.js} +1 -1
  36. package/dist-embed/chunks/{celltoolbartracker-BHSFiiuz.js → celltoolbartracker-D1C_kGQL.js} +1 -1
  37. package/dist-embed/chunks/{component-BUTWfiVL.js → component-CmnuUtgX.js} +3 -3
  38. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-ha7l75va.js → cs-CZ-2BRQDIVT-G9tBUkZh.js} +1 -1
  39. package/dist-embed/chunks/{da-DK-5WZEPLOC-C3b8_hbR.js → da-DK-5WZEPLOC-91_vyLpq.js} +1 -1
  40. package/dist-embed/chunks/{de-DE-XR44H4JA-CxWFSn3l.js → de-DE-XR44H4JA-Bb9tvIZa.js} +1 -1
  41. package/dist-embed/chunks/{dist-BF0YFIb6.js → dist-B5YvY_O1.js} +2 -2
  42. package/dist-embed/chunks/{dist-DsEDq9qF.js → dist-BBqWTRLi.js} +1 -1
  43. package/dist-embed/chunks/{dist-DRRbvr4-.js → dist-BC_2VyAM.js} +1 -1
  44. package/dist-embed/chunks/{dist-B_TGJsfl.js → dist-BhfyuH1D.js} +1 -1
  45. package/dist-embed/chunks/{dist-Cfvz7CF7.js → dist-BlIg6ytm.js} +1 -1
  46. package/dist-embed/chunks/{dist-COiURBxL.js → dist-Ct-bkqXx.js} +4 -4
  47. package/dist-embed/chunks/{dist-tosaS6vh.js → dist-CtFgtNKe.js} +1 -1
  48. package/dist-embed/chunks/{dist-B1tXS8Wo.js → dist-DLyNQ3Jj.js} +1 -1
  49. package/dist-embed/chunks/{document-CqNE0DPx.js → document-Dp0KpIjg.js} +1 -1
  50. package/dist-embed/chunks/{drivecontents-D1HzL7Fi.js → drivecontents-BsC6Y2Vl.js} +1 -1
  51. package/dist-embed/chunks/{el-GR-BZB4AONW-iSsL6em8.js → el-GR-BZB4AONW-B5kc3JC5.js} +1 -1
  52. package/dist-embed/chunks/{es-ES-U4NZUMDT-BEbh9GGw.js → es-ES-U4NZUMDT-CpFB18Kf.js} +1 -1
  53. package/dist-embed/chunks/{esm-RWOqF6ly.js → esm-BqqxV5QL.js} +1 -1
  54. package/dist-embed/chunks/{eu-ES-A7QVB2H4-C7o7R9hc.js → eu-ES-A7QVB2H4-CqCALK0Q.js} +1 -1
  55. package/dist-embed/chunks/{fa-IR-HGAKTJCU-DQNpeHKi.js → fa-IR-HGAKTJCU-BzSY8fri.js} +1 -1
  56. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-D083iC1R.js → fi-FI-Z5N7JZ37-DPRPVT_v.js} +1 -1
  57. package/dist-embed/chunks/{fr-FR-RHASNOE6-CUvaq7hG.js → fr-FR-RHASNOE6-Cr4lVSvD.js} +1 -1
  58. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DU31KRvC.js → gl-ES-HMX3MZ6V-CZUw7dN0.js} +1 -1
  59. package/dist-embed/chunks/{he-IL-6SHJWFNN-bMtU7JNY.js → he-IL-6SHJWFNN-DaU5Odek.js} +1 -1
  60. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-Pma0rKxO.js → hi-IN-IWLTKZ5I-BZ84Rooc.js} +1 -1
  61. package/dist-embed/chunks/{htmlselect-CqXICb9e.js → htmlselect-5N6NdDqL.js} +1 -1
  62. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-Dof3afSc.js → hu-HU-A5ZG7DT2-SZiCSe0B.js} +1 -1
  63. package/dist-embed/chunks/{id-ID-SAP4L64H-ZwqZHBDj.js → id-ID-SAP4L64H-DrRa3vVi.js} +1 -1
  64. package/dist-embed/chunks/{index-9EhrHHj7.js → index-B6-uQd5L.js} +3 -3
  65. package/dist-embed/chunks/{index-9wJFadG-.js → index-CEeyR3FZ.js} +1 -1
  66. package/dist-embed/chunks/{index-CqP3xLL5.js → index-CKWSKbHe.js} +1 -1
  67. package/dist-embed/chunks/{index-BbcMy3Al.js → index-DpN8KK6c.js} +1 -1
  68. package/dist-embed/chunks/{index--S8WFITA.js → index-JmqWOkdt.js} +1 -1
  69. package/dist-embed/chunks/{index-CMhceBby.js → index-PKH5uAl-.js} +1 -1
  70. package/dist-embed/chunks/{index-C7UsrKrP.js → index-hhftmReh.js} +1 -1
  71. package/dist-embed/chunks/{index-6zxBQeM_.js → index-qhxI1VzX.js} +2 -2
  72. package/dist-embed/chunks/{index.esm-xgVG4GIx.js → index.esm-Bvtnemp7.js} +1 -1
  73. package/dist-embed/chunks/{it-IT-JPQ66NNP-C-uM6NhO.js → it-IT-JPQ66NNP-_TEhDIcF.js} +1 -1
  74. package/dist-embed/chunks/{ja-JP-DBVTYXUO-qzihtLnX.js → ja-JP-DBVTYXUO-IJaTVgTb.js} +1 -1
  75. package/dist-embed/chunks/{kaa-6HZHGXH3-Amx_Jfx0.js → kaa-6HZHGXH3-CTksAiLJ.js} +1 -1
  76. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-BPZfDYRT.js → kab-KAB-ZGHBKWFO-DbA7aOfU.js} +1 -1
  77. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-B83bJ3Yw.js → kk-KZ-P5N5QNE5-Bdzg30AB.js} +1 -1
  78. package/dist-embed/chunks/{km-KH-HSX4SM5Z-BvPDwBVw.js → km-KH-HSX4SM5Z-Bwn2NP1-.js} +1 -1
  79. package/dist-embed/chunks/{ko-KR-MTYHY66A-jpQ_OpzG.js → ko-KR-MTYHY66A-KUaxlo0q.js} +1 -1
  80. package/dist-embed/chunks/{ku-TR-6OUDTVRD-RsfwTm7i.js → ku-TR-6OUDTVRD-DRegsFXo.js} +1 -1
  81. package/dist-embed/chunks/{lib-CFx15o08.js → lib--J3JPp2K.js} +1 -1
  82. package/dist-embed/chunks/{lib-D6X8UF4a.js → lib-9S57siQD.js} +1 -1
  83. package/dist-embed/chunks/{lib-CoK70EWs.js → lib-BpltV-0Y.js} +1 -1
  84. package/dist-embed/chunks/{lib-DGhrI5Uw.js → lib-C2mgrsS1.js} +1 -1
  85. package/dist-embed/chunks/{lib-XSPvEMl2.js → lib-C46CpvHb.js} +1 -1
  86. package/dist-embed/chunks/{lib-D0Q8IWel.js → lib-CHID83aM.js} +1 -1
  87. package/dist-embed/chunks/{lib-Pqxz_81N.js → lib-COJY2oKd.js} +25 -25
  88. package/dist-embed/chunks/{lib-p7v7zGkv.js → lib-CQeoQJWp.js} +1 -1
  89. package/dist-embed/chunks/{lib-CdtiDxdA.js → lib-CjBEbEzm.js} +1 -1
  90. package/dist-embed/chunks/{lib-BBnVlTAj.js → lib-Cpc8Fspj.js} +1 -1
  91. package/dist-embed/chunks/{lib-CsiCQ8oM.js → lib-D7CvuX1J.js} +1 -1
  92. package/dist-embed/chunks/{lib-7ge2Kma3.js → lib-DOnguzJf.js} +1 -1
  93. package/dist-embed/chunks/{lib-UYAFV0Oh.js → lib-Dh9o1esj.js} +1 -1
  94. package/dist-embed/chunks/{lib-DdeRC7g0.js → lib-DrEcjKb5.js} +1 -1
  95. package/dist-embed/chunks/{lib-Dj12Ge-1.js → lib-PbTUB5SW.js} +1 -1
  96. package/dist-embed/chunks/{lib-DMy40SOL.js → lib-QmOij8gS.js} +1 -1
  97. package/dist-embed/chunks/{lib-C7Y61LM1.js → lib-csBGF1d0.js} +1 -1
  98. package/dist-embed/chunks/{lib-DTyx2eLX.js → lib-op0DTswa.js} +1 -1
  99. package/dist-embed/chunks/{lib-CkcilPdy.js → lib-ox3VOLDA.js} +1 -1
  100. package/dist-embed/chunks/{lib-Bi95m_cb.js → lib-rn9DpcHi.js} +1 -1
  101. package/dist-embed/chunks/{lt-LT-XHIRWOB4-qZ_KjUTQ.js → lt-LT-XHIRWOB4-c6CdaS7u.js} +1 -1
  102. package/dist-embed/chunks/{lv-LV-5QDEKY6T-BOKJbljG.js → lv-LV-5QDEKY6T-D9RognOk.js} +1 -1
  103. package/dist-embed/chunks/{model-C2VRzh1c.js → model-DbDJZyri.js} +1 -1
  104. package/dist-embed/chunks/{mr-IN-CRQNXWMA-xba6p6AI.js → mr-IN-CRQNXWMA-ht3P_mrN.js} +1 -1
  105. package/dist-embed/chunks/{my-MM-5M5IBNSE-B_H0GaRX.js → my-MM-5M5IBNSE-CsIkhWRp.js} +1 -1
  106. package/dist-embed/chunks/{nb-NO-T6EIAALU-Ddg4NpHf.js → nb-NO-T6EIAALU-DJw7Uvbx.js} +1 -1
  107. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DS_Sofox.js → nl-NL-IS3SIHDZ-Dcrp-zwB.js} +1 -1
  108. package/dist-embed/chunks/{nn-NO-6E72VCQL-CYSB6TTi.js → nn-NO-6E72VCQL-DaBAIbM9.js} +1 -1
  109. package/dist-embed/chunks/{oc-FR-POXYY2M6-QrIn4XvF.js → oc-FR-POXYY2M6-DSdMEDCa.js} +1 -1
  110. package/dist-embed/chunks/{pa-IN-N4M65BXN-BbacRfk_.js → pa-IN-N4M65BXN-BMyPito1.js} +1 -1
  111. package/dist-embed/chunks/{percentages-BXMCSKIN-TyKhSuec.js → percentages-BXMCSKIN-pswfKMt2.js} +3 -3
  112. package/dist-embed/chunks/{pl-PL-T2D74RX3-Cn2ehrU4.js → pl-PL-T2D74RX3-CFk8rHgP.js} +1 -1
  113. package/dist-embed/chunks/{plugin-CPCdQWpK.js → plugin-BpyrQiv7.js} +1 -1
  114. package/dist-embed/chunks/{plugin-D7Giq2rW.js → plugin-NcgdmcAO.js} +1 -1
  115. package/dist-embed/chunks/{plugin-AdqytlNC.js → plugin-omHCT1Jk.js} +1 -1
  116. package/dist-embed/chunks/{pt-BR-5N22H2LF-CpNtiBPh.js → pt-BR-5N22H2LF-BYlDcalT.js} +1 -1
  117. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-CcDR3Igq.js → pt-PT-UZXXM6DQ-xXdoFOOb.js} +1 -1
  118. package/dist-embed/chunks/{pyodide-kernel-CN7B4QLg.js → pyodide-kernel-bjLdubpe.js} +1 -1
  119. package/dist-embed/chunks/{pyodide-kernel-extension-CKE5jq9F.js → pyodide-kernel-extension-CshyO6Mm.js} +1 -1
  120. package/dist-embed/chunks/{renderer-8__rsP1H.js → renderer-We9CyR7b.js} +1 -1
  121. package/dist-embed/chunks/{ro-RO-JPDTUUEW-CANXxss1.js → ro-RO-JPDTUUEW-e-URCww-.js} +1 -1
  122. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-B_NkKbWo.js → ru-RU-B4JR7IUQ-CrXBOpZl.js} +1 -1
  123. package/dist-embed/chunks/{server-extension-BvlUJPbJ.js → server-extension-D9R-wwz5.js} +1 -1
  124. package/dist-embed/chunks/{sessions-CgjtuOSm.js → sessions-DdXtI_C1.js} +1 -1
  125. package/dist-embed/chunks/{si-LK-N5RQ5JYF-Da_Bg8Mv.js → si-LK-N5RQ5JYF-DmJK04-A.js} +1 -1
  126. package/dist-embed/chunks/{sk-SK-C5VTKIMK-BKs6l_DT.js → sk-SK-C5VTKIMK-BDHycW1Q.js} +1 -1
  127. package/dist-embed/chunks/{sl-SI-NN7IZMDC-C4TvSXZU.js → sl-SI-NN7IZMDC-Bv9ZQTNb.js} +1 -1
  128. package/dist-embed/chunks/{subset-shared.chunk-BZGTZU2h.js → subset-shared.chunk-B0WCMaCa.js} +1 -1
  129. package/dist-embed/chunks/{subset-worker.chunk-CNJFtQV7.js → subset-worker.chunk-i0SNRqXr.js} +1 -1
  130. package/dist-embed/chunks/{sv-SE-XGPEYMSR-DdKzikID.js → sv-SE-XGPEYMSR-_HPzcZFc.js} +1 -1
  131. package/dist-embed/chunks/{ta-IN-2NMHFXQM-CDzGLNXS.js → ta-IN-2NMHFXQM-Ccvi-lqm.js} +1 -1
  132. package/dist-embed/chunks/{th-TH-HPSO5L25-X4BJ7awj.js → th-TH-HPSO5L25-DvAg4Mv1.js} +1 -1
  133. package/dist-embed/chunks/{tokens-CBhRbpQP.js → tokens-CTXFWLvM.js} +1 -1
  134. package/dist-embed/chunks/{tr-TR-DEFEU3FU-CN69_6_H.js → tr-TR-DEFEU3FU-DJsjfrja.js} +1 -1
  135. package/dist-embed/chunks/{uk-UA-QMV73CPH-KjB2cySI.js → uk-UA-QMV73CPH-3fvexlQA.js} +1 -1
  136. package/dist-embed/chunks/{usePrimerThemeBridge-DyX4EYyN.js → usePrimerThemeBridge-NsTRGuo7.js} +1 -1
  137. package/dist-embed/chunks/{vi-VN-M7AON7JQ-BqVSbGWG.js → vi-VN-M7AON7JQ-BoQ3ayAr.js} +1 -1
  138. package/dist-embed/chunks/{zh-CN-LNUGB5OW-oRPI4tbl.js → zh-CN-LNUGB5OW-Dzh0Ni_q.js} +1 -1
  139. package/dist-embed/chunks/{zh-HK-E62DVLB3-BUlz3y0i.js → zh-HK-E62DVLB3-_1FpSc_d.js} +1 -1
  140. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-NxjUwhr3.js → zh-TW-RAJ6MFWO-CU-R8eF0.js} +1 -1
  141. package/dist-embed/datalayer-app-main.js +18 -18
  142. package/lib/apps/apps/AppRenderer.d.ts +6 -0
  143. package/lib/apps/apps/AppRenderer.js +3 -0
  144. package/lib/apps/plugins/agents/appLaunch.js +12 -0
  145. package/lib/hooks/useAgentRuntimes.d.ts +1 -1
  146. package/lib/hooks/useAgentRuntimes.js +2 -0
  147. package/lib/portable/hosts/agentClient.d.ts +5 -2
  148. package/lib/runtimes/actions.js +6 -0
  149. package/lib/runtimes/apis.d.ts +8 -0
  150. package/lib/specs/agents/agents.js +1 -1
  151. package/lib/types/agents-lifecycle.d.ts +7 -0
  152. package/lib/types/agentspecs.d.ts +9 -4
  153. package/lib/types/agentspecs.js +7 -1
  154. package/package.json +1 -1
  155. package/dist-embed/chunks/Avatar-MNx1kN3F.js +0 -1
  156. package/dist-embed/chunks/DatalayerAgentBridge-BuGt8vDu.js +0 -1
@@ -1 +1 @@
1
- import{r as o,j as p,aa as N,cc as z,cd as L,ce as T,cf as F,cg as R,I as O,ch as _}from"../datalayer-app-main.js";import{x as U,y as W,z as $,A as M}from"./JupyterLexicalExtension-C55KdpCk.js";import H from"./ExcalidrawModal-DSL5jBhG.js";import{r as X}from"./percentages-BXMCSKIN-TyKhSuec.js";import{u as J}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-BkzTMhIX.js";import"./Avatar-MNx1kN3F.js";import"./url-C6fJII94.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./LinkIcon-BtBG9K47.js";import"./Toolbar-BncUh2ly.js";import"./KebabHorizontalIcon-D6AY8pIS.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-DQMhvzcI.js";import"./Output-D-7eUege.js";import"./index--S8WFITA.js";import"./hoverbox-CStlKQWE.js";import"./index-6zxBQeM_.js";import"./index-9wJFadG-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BYxXubsX.js";import"./d3-color-Jd8hXty2.js";import"./dist-BrUAt6vF.js";import"./index-CqP3xLL5.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-LfEpCrfD.js";import"./extends-CF3RwP-h.js";import"./index-C0d-d3s4.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[h,S]=o.useState(null),{theme:E}=J(h),[B,u]=o.useState(null),[v,w]=o.useState(0);o.useEffect(()=>{const r=new MutationObserver(x=>{for(const b of x)if(b.type==="attributes"&&(b.attributeName==="style"||b.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",""],b=a?.viewBackgroundColor||"transparent",l=x.includes(b.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 Dt({nodeKey:e,data:n,width:g,height:a}){const[s]=N(),c=U(),[C,h]=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&&h(!0),!0):!1},F))},[w,s,u,f,v,c]);const j=o.useCallback(()=>(h(!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))})},b=o.useCallback(()=>{h(!0)},[]),{elements:l=[],files:A={},appState:m={}}=o.useMemo(()=>JSON.parse(n),[n]),D=o.useCallback(()=>{h(!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),h(!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:b}),(u||f)&&c&&p.jsx($,{buttonRef:B,showCaption:!0,setShowCaption:()=>null,imageRef:S,editor:s,onResizeStart:r,onResizeEnd:x})]})]})}export{Dt as default};
1
+ import{r as o,j as p,aa as N,c5 as z,c6 as L,c7 as T,c8 as F,c9 as R,I as O,ca as _}from"../datalayer-app-main.js";import{x as U,y as W,z as $,A as M}from"./JupyterLexicalExtension-DuD7IV6j.js";import H from"./ExcalidrawModal-Bso7oDbl.js";import{r as X}from"./percentages-BXMCSKIN-pswfKMt2.js";import{u as J}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-CvO9WylK.js";import"./Avatar-Cv5OpUWu.js";import"./url-C6fJII94.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./LinkIcon-BtBG9K47.js";import"./Toolbar-BAjGB6b-.js";import"./KebabHorizontalIcon-D6AY8pIS.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-DQMhvzcI.js";import"./Output-D9cwH5rg.js";import"./index-JmqWOkdt.js";import"./hoverbox-CStlKQWE.js";import"./index-qhxI1VzX.js";import"./index-CEeyR3FZ.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BYxXubsX.js";import"./d3-color-Jd8hXty2.js";import"./dist-BrUAt6vF.js";import"./index-CKWSKbHe.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-LfEpCrfD.js";import"./extends-CF3RwP-h.js";import"./index-C0d-d3s4.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 Dt({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{Dt as default};
@@ -1 +1 @@
1
- import{r as t,j as o,D as u,bE as h,v as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-TyKhSuec.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-C55KdpCk.js";import"./NotebookSkeleton-BkzTMhIX.js";import"./Avatar-MNx1kN3F.js";import"./url-C6fJII94.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./LinkIcon-BtBG9K47.js";import"./Toolbar-BncUh2ly.js";import"./KebabHorizontalIcon-D6AY8pIS.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-DQMhvzcI.js";import"./Output-D-7eUege.js";import"./index--S8WFITA.js";import"./hoverbox-CStlKQWE.js";import"./index-6zxBQeM_.js";import"./index-9wJFadG-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BYxXubsX.js";import"./d3-color-Jd8hXty2.js";import"./dist-BrUAt6vF.js";import"./index-CqP3xLL5.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-LfEpCrfD.js";import"./extends-CF3RwP-h.js";import"./index-C0d-d3s4.js";import"./index-DoBkwclg.js";function ue({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:E}=z(w),m=t.useRef(null),b=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:b,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:E})}),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{ue as default};
1
+ import{r as t,j as o,D as u,bw as h,v as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-pswfKMt2.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-DuD7IV6j.js";import"./NotebookSkeleton-CvO9WylK.js";import"./Avatar-Cv5OpUWu.js";import"./url-C6fJII94.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./LinkIcon-BtBG9K47.js";import"./Toolbar-BAjGB6b-.js";import"./KebabHorizontalIcon-D6AY8pIS.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-DQMhvzcI.js";import"./Output-D9cwH5rg.js";import"./index-JmqWOkdt.js";import"./hoverbox-CStlKQWE.js";import"./index-qhxI1VzX.js";import"./index-CEeyR3FZ.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BYxXubsX.js";import"./d3-color-Jd8hXty2.js";import"./dist-BrUAt6vF.js";import"./index-CKWSKbHe.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-LfEpCrfD.js";import"./extends-CF3RwP-h.js";import"./index-C0d-d3s4.js";import"./index-DoBkwclg.js";function ue({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{ue as default};