@datalayer/agent-runtimes 1.5.21 → 1.5.23
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.
- package/dist-embed/chunks/{AgentDetails-C7tCazwB.js → AgentDetails-Xvq2IvHg.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-Cwps4GeH.js → AgentDetailsDialog-DmtKB_5z.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-Gk7jbg8t.js → AgentInspector-EiBHJgc9.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-BSSDOFrT.js → AgentInspectorDialog-3fbLXnLP.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-p2BAkwis.js → CellSidebarExtension-CDnzN9Cb.js} +8 -8
- package/dist-embed/chunks/ChatView-BjZ993Ch.js +32 -0
- package/dist-embed/chunks/{ContextPie-bd_YOjzP.js → ContextPie-DdsXl5s7.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-4gxuEH4A.js → DeckComponent-Cb4_dZpN.js} +2 -2
- package/dist-embed/chunks/{DocumentView-BZSYqTh_.js → DocumentView-Caxb2xz-.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-Cevnk5OF.js → EphemeralDocument-DIHjR5l8.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-JvALIbK2.js → EphemeralNotebook-1Rwa3anx.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-CbghNk-F.js → ExcalidrawComponent-vJQwgcUt.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-BOVvWzYQ.js → ExcalidrawModal-BDgjdSz2.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-CRccZ2h7.js → JupyterLexicalExtension-_7FM5Om8.js} +28 -28
- package/dist-embed/chunks/{KernelVariables-ompObBEM.js → KernelVariables-CKIqy599.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-BlBEZPP4.js → LexicalToolRegistry-8wJyLumb.js} +1 -1
- package/dist-embed/chunks/{NotebookToolSurfaces-DP8sWqVy.js → NotebookToolSurfaces-YAM1bvZS.js} +1 -1
- package/dist-embed/chunks/{NotebookView-DC6BDVEp.js → NotebookView-C8RCvsR1.js} +1 -1
- package/dist-embed/chunks/{Output-C4hBhZ5k.js → Output-BWClePP-.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-CX8wvCLJ.js → SandboxDetailsDialog-CDSxIC0-.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-BuhXDyz6.js → SchemaForm-CO_2yGg2.js} +1 -1
- package/dist-embed/chunks/{WidgetVariableView-C2X5Ehcg.js → WidgetVariableView--osoOLv8.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-CjgOnMCz.js → YouTubePlugin-BB7Z7INn.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-kzVu7pzT.js → abnfDiagram-VCTEODGH-faK2fyHC.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-ArgZTGSp.js → ar-SA-G6X2FPQ2-D6Ko4I2x.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DVZUrWEx.js → architectureDiagram-5GKGNRK7-DBMLRsbO.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-DQgz6n32.js → az-AZ-76LH7QW2-B3UhxnSz.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-Cx0dPt6-.js → bg-BG-XCXSNQG7-BS-QRZjB.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-DEQh5CUO.js → blockDiagram-868be97b-BXBoGds2.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-C6gbEBfg.js → blockDiagram-I7D4REHJ-BNkBA3Vb.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-BkekmuYO.js → bn-BD-2XOGV67Q-DNg0uIV0.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-CUcRctJE.js → c4Diagram-3f4bdde3-4OdTwU_t.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DSQiEaxC.js → c4Diagram-7LVT6UL2-BGpBMrvl.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-Yr14RtMP.js → ca-ES-6MX7JW3Y-Bn4yHfTY.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-Bx9x9aeh.js → celltoolbartracker-DcYHi8Du.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-DbzMjK_L.js → chunk-2Q5K7J3B-P4f8Cifn.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-rEZEdbpi.js → chunk-5VM5RSS4-BVaSZr_4.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BH7lDumP.js → chunk-F27PBJKO-C-90E7AT.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-BA-vmq_V.js → chunk-IMKFNOWR--OZX7QCt.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-BfRI4eJ2.js → chunk-JWPE2WC7-OHowekj4.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-B7pT6rUf.js → chunk-POPQ4Y6H-BgLsR3l7.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-BxpYXJab.js → chunk-SVP7TREG-kM9Erqyf.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-LCiyX33a.js → chunk-TICWLB2K-pVdCft0o.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-islJGiCO.js → chunk-XXDRQBXY-BSfKSQ7y.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-C7-Ca_nP.js → classDiagram-ZZMXUADV-Dq0Eb9fh.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-BaJUb6H9.js → classDiagram-f62afe4f-C8j4XsQw.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-s6LKeK41.js → classDiagram-v2-604399ef-BVT78aGU.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-C7-Ca_nP.js → classDiagram-v2-VYDZK3BY-Dq0Eb9fh.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-BieLU8ls.js → code-block-IT6T5CEO-Dbm1cj5T.js} +1 -1
- package/dist-embed/chunks/{component-p2xkjXeh.js → component-CsXw-w1P.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-BkezndW_.js → cose-bilkent-JH36ORCC-DEGpy0W8.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-Dw8k7JC8.js → createText-aed3d8b3-BukHQ1P8.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-DYR-S6bD.js → cs-CZ-2BRQDIVT-DUGnyonZ.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DqoI6t3s.js → cynefinDiagram-5FMLGOSQ-CnZ3wqXe.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-DhaHIgKI.js → da-DK-5WZEPLOC-Is8nybqO.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-pcAHu_bK.js → dagre-GXQ25YYZ-Dbp_O7kO.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-CJpRH2Fy.js → de-DE-XR44H4JA-D54sMa4L.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-W17wgXHY.js → diagram-S7CK7UJ4-DHPFd83P.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-mH7QBO8y.js → diagram-UQ7AKVKN-BqXFRP10.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-CFHqpDaB.js → diagram-VSXAHHWV-DO0toZBQ.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-DQ6XlKLw.js → diagram-VX7I27RA-Diuc1eIf.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-Cenqf76m.js → diagram-Z3DM3KII-DtauJWd2.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Cqmnghct.js → ebnfDiagram-PWID7BFC-SU3uN2_2.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-ChO7JKaP.js → edges-b2856ca0-DbD0XDJS.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-DPGB1p8K.js → el-GR-BZB4AONW-CvM3SWat.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-jzhAXdZi.js → erDiagram-5d81789a-C-Tzt4MD.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-hAbP0vV0.js → erDiagram-RLTQ6QDP-C_c-qnRZ.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-CLztgM3g.js → es-ES-U4NZUMDT-BZDRRuRf.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4--ffZf65_.js → eu-ES-A7QVB2H4-DAmknI9y.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-Cwwej6FC.js → fa-IR-HGAKTJCU-CQhKri4O.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-Tw-dUSxy.js → fi-FI-Z5N7JZ37-DzEDoP64.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-DDUaXZ_Q.js → flowDb-185abca5-Di4aD0Mg.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-DpvDtFPK.js → flowDiagram-1629c991-fImernS2.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-DENY4Bvt.js → flowDiagram-HODETNUW-DzoskzA4.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-TxFSXMN7.js → flowDiagram-v2-1d953310-P1qDfDo-.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-BGFxwidp.js → flowchart-elk-definition-6df44142-CXebTCvX.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-CT1NyjSV.js → fr-FR-RHASNOE6-DiSkyvEB.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-DJqKtGUz.js → ganttDiagram-3b0b3873-Bupos8HO.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Ddh9hVkO.js → ganttDiagram-EL5Y4UJY-e3WDalFj.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-B3BVHs36.js → gitGraphDiagram-WWUBYQGX-Ck49f0H9.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-vOvP_sU8.js → gitGraphDiagram-f01e8bc2-DM8FMetI.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BKTaXj_2.js → gl-ES-HMX3MZ6V-3AJMzY-I.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-BJ5SwTG5.js → he-IL-6SHJWFNN-Cuh5an4X.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-D5ZQxogx.js → hi-IN-IWLTKZ5I-BbeuFB83.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-CoAAAzpy.js → hu-HU-A5ZG7DT2-C1OMfhob.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-DFWbGjYj.js → id-ID-SAP4L64H-BzKILJTZ.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-YA-Pbv-C.js → index-9bae90f3-l9tb84fw.js} +1 -1
- package/dist-embed/chunks/{index-CIDdX0nc.js → index-BFdE0KFI.js} +1 -1
- package/dist-embed/chunks/{index-Db1qHC1a.js → index-BMandbJB.js} +1 -1
- package/dist-embed/chunks/{index-BTeNnRc_.js → index-BO6VQLH6.js} +4 -4
- package/dist-embed/chunks/{index-1MXuxaax.js → index-BTnG8qrO.js} +1 -1
- package/dist-embed/chunks/{index-BVzIb3Wy.js → index-BktUM85c.js} +1 -1
- package/dist-embed/chunks/{index-BuyZwxeT.js → index-CAd5YQQl.js} +1 -1
- package/dist-embed/chunks/{index-DMf0f7ny.js → index-CFP9psRB.js} +2 -2
- package/dist-embed/chunks/{index-DPzPvDBn.js → index-CKFrz1es.js} +1 -1
- package/dist-embed/chunks/{index-DTCcg1ap.js → index-CM7xo08K.js} +1 -1
- package/dist-embed/chunks/{index-8Jy3Vws8.js → index-CPpm1tqJ.js} +6 -6
- package/dist-embed/chunks/{index-B0MhQWhs.js → index-CRZ1qthh.js} +1 -1
- package/dist-embed/chunks/{index-FbZJIbu_.js → index-CWwj0zW9.js} +1 -1
- package/dist-embed/chunks/{index-CCA_V9Td.js → index-Cu0bp_EI.js} +1 -1
- package/dist-embed/chunks/{index-BfMo5nXi.js → index-CyQgE_Es.js} +2 -2
- package/dist-embed/chunks/{index-BzQxauhZ.js → index-D4QM3qbA.js} +1 -1
- package/dist-embed/chunks/{index-D62kZnWZ.js → index-D64QvG43.js} +5 -5
- package/dist-embed/chunks/{index-JhvHCMRQ.js → index-DEjLPUAD.js} +1 -1
- package/dist-embed/chunks/{index-CkOZcvYl.js → index-DLimRfHQ.js} +1 -1
- package/dist-embed/chunks/{index-B0omKuYl.js → index-DN-cizG6.js} +1 -1
- package/dist-embed/chunks/{index-C7os26P7.js → index-DSN70XMH.js} +2 -2
- package/dist-embed/chunks/{index-CxIZHPCc.js → index-DY8mjz1l.js} +1 -1
- package/dist-embed/chunks/{index-BgWf1G8H.js → index-Dobs-OKl.js} +1 -1
- package/dist-embed/chunks/index-DyVR0igi.js +34 -0
- package/dist-embed/chunks/{index-6feFd5AZ.js → index-PqsSImlj.js} +1 -1
- package/dist-embed/chunks/{index-BNFZYAJT.js → index-SbFvdBPQ.js} +1 -1
- package/dist-embed/chunks/{index-B9vBhR-p.js → index-dYwQAVs_.js} +1 -1
- package/dist-embed/chunks/{index-DTbF6Y7O.js → index-f418CYn7.js} +1 -1
- package/dist-embed/chunks/{index-BL4KuFQP.js → index-f9WZsG2n.js} +1 -1
- package/dist-embed/chunks/{index-DSgHh0-i.js → index-noRoZrq5.js} +1 -1
- package/dist-embed/chunks/{index-B8y71UkT.js → index-wk9vl2uW.js} +1 -1
- package/dist-embed/chunks/{index-Dw1P-H6s.js → index-x45cMPwN.js} +1 -1
- package/dist-embed/chunks/{index.esm-B6P80s3J.js → index.esm-p0OnSU9h.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CZPNcDbH.js → infoDiagram-27XIBGKW-BjyM865y.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-Di_kmyTC.js → infoDiagram-a29d40f1-DXYFLipl.js} +1 -1
- package/dist-embed/chunks/{isEqual-D0eOPSLC.js → isEqual-Cwjr2skl.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DD5TaPvH.js → ishikawaDiagram-5VMMS53U-Bb5g5HNe.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-C7p9bCWQ.js → it-IT-JPQ66NNP-DuG05fUR.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-DupAM7Cv.js → ja-JP-DBVTYXUO-DeDfL3Bk.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-1NqbTyL4.js → journeyDiagram-3NMN7TZE-96VNFopN.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-xr9Xk_mL.js → journeyDiagram-95396277-CQ_kN2gp.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-DrthOcPY.js → kaa-6HZHGXH3-BRKFVG6s.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-C4hr0kbU.js → kab-KAB-ZGHBKWFO-Uqakmhz5.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DlSwjr3b.js → kanban-definition-UXKFOSKX-BPsXEKm4.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CrjDkh9r.js → kk-KZ-P5N5QNE5-DWMXMIAK.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-JHWf7VZ6.js → km-KH-HSX4SM5Z-BXNl9QnV.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-CJ4JxKMG.js → ko-KR-MTYHY66A-BZgIqTuN.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-YSlLPag_.js → ku-TR-6OUDTVRD-CQNa5i5U.js} +1 -1
- package/dist-embed/chunks/{layout-5FOjTADt.js → layout-Dq0J6INj.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-eqXJbnX9.js → lexicalHooks-Pqoe8h_O.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-2v6r2YYq.js → lt-LT-XHIRWOB4-BQW2k7iv.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-DVGd68q4.js → lv-LV-5QDEKY6T-B0HRRCC4.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-BU1Nkb56.js → mermaid.core-B9dEBs01.js} +4 -4
- package/dist-embed/chunks/{mermaid.core-DY5DKOtx.js → mermaid.core-pflA3DMC.js} +2 -2
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-sSfUfKt8.js → mindmap-definition-YA3MSWOX-DwLQYAqQ.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-btrk6STt.js → mindmap-definition-e4c1d938-CDWIPlcb.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-D1q8zjMr.js → mr-IN-CRQNXWMA-DXR6sWSH.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-CCWuEpIN.js → my-MM-5M5IBNSE-BZ5_9oCm.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-eJ92wx2h.js → nb-NO-T6EIAALU-CBtv36wZ.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DmkMgsvp.js → nl-NL-IS3SIHDZ-CcqE3cY8.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-CWYEaXBn.js → nn-NO-6E72VCQL-Cl9wPgpU.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-CayriaEZ.js → oc-FR-POXYY2M6-CQEkV2p1.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-CydiKcR8.js → pa-IN-N4M65BXN-CaE6yG0U.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB--dcG-x2B.js → pegDiagram-XKGWAZYB-Cwo6HzRh.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-fzYCDL7m.js → percentages-BXMCSKIN-Bk5xifLL.js} +3 -3
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D-uncTun.js → pieDiagram-E7YTZNPT-BvBHesgq.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-BoVaJIdw.js → pieDiagram-c941bede-Bsn1Bxk5.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-DhiK4YSC.js → pl-PL-T2D74RX3-M1pQcF2j.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-CwSVxIqs.js → pt-BR-5N22H2LF-BFDHu72z.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-BnxquNJT.js → pt-PT-UZXXM6DQ-DFcZY1Gz.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-ClE_bWPS.js → quadrantDiagram-AXDQQJYC-AaQ_WgXa.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-V_e2KgDu.js → quadrantDiagram-cf8b8fe0-BhaNj-gz.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-CkhmY0tS.js → railroadDiagram-O6MQD6OU-BlWFu3pn.js} +1 -1
- package/dist-embed/chunks/{renderer-BwlsmtXF.js → renderer-Dy4lZ1KZ.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-BZw7Ipej.js → requirementDiagram-53bda41b-C2WctYyl.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BXwXUXrr.js → requirementDiagram-BXWQKSXE-BpWNFdrw.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-D3G2f_fQ.js → ro-RO-JPDTUUEW-BGm_Xwik.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-SnVfNwaW.js → ru-RU-B4JR7IUQ-BsrZ_x8p.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-0B_Kvjm2.js → sankeyDiagram-P5KCCOFB-DnT5kYW5.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-e1QLivkZ.js → sankeyDiagram-c3ef121a-3FD4GIJS.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-N-16oABv.js → sequenceDiagram-82a5b84f-CZQmoHAd.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CtbkJYCv.js → sequenceDiagram-WJ2MYXX4-0HHgJN0L.js} +1 -1
- package/dist-embed/chunks/{sessions-C9DBCyZI.js → sessions-BRALW9Yv.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-Da7Bfexz.js → si-LK-N5RQ5JYF-BfaYS44g.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-B3xt8UaI.js → sizeCapture-INFHLROL-CIF2j9e_.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-BB-Ks1b-.js → sk-SK-C5VTKIMK-D-K9yMTN.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-DF3fUKHX.js → sl-SI-NN7IZMDC-B48XvZUw.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-BJcJNr41.js → stateDiagram-43e79a5f-CMlUXY1x.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-LjWP-fRB.js → stateDiagram-D77RDMKH-CkICPC-C.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-DTEruWg2.js → stateDiagram-v2-2041ed4f-BcO6vvJA.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-_xCQcvgo.js → stateDiagram-v2-MP3YSRHH-BFlXwfgz.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-OIhmfs6N.js → styles-455b33cd-BfyZJvzN.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-CwLjreIv.js → styles-f932cba9-k2wfF-9Q.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-DP74dQpR.js → styles-fcc2142b-z3csTkbW.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-Cf9zgTA9.js → subset-shared.chunk-DzA7mJjZ.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-WYW3AHku.js → subset-worker.chunk-CsTEdHAt.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-CeR-pJHy.js → sv-SE-XGPEYMSR-DfhLO_Vt.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-CgE5QJIv.js → svgDrawCommon-148a3cd9-NqUFgQ9x.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CZyflHYJ.js → swimlanes-42K2YHIH-B6pxWv6a.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-Bmr6N4fj.js → swimlanesDiagram-VR7AAH4N-B9ThT6OH.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-lmsodGuU.js → ta-IN-2NMHFXQM-EZA_oxSt.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-DQCWr96I.js → th-TH-HPSO5L25-G9vy_zQH.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-DqY5EM6p.js → timeline-definition-24CTP7MA-DVcslyxd.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-B8wMEyZY.js → timeline-definition-7545f45a-IhzNtIcW.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-CqnvlGZW.js → tr-TR-DEFEU3FU-DBj_G5CD.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-DdWFjbHe.js → uk-UA-QMV73CPH-DN7lMu5H.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-63-O_xI8.js → vennDiagram-4TSXK5OY-KKysbuVs.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-CydTT0Fi.js → vi-VN-M7AON7JQ-LoT02qgd.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-C9vLUvHf.js → wardleyDiagram-VM6X3IG4-CTed9ps7.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-BfoQg8n9.js → xychartDiagram-3f383b91-CsxcWMT8.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-BZr3T3n_.js → xychartDiagram-S5SC5T6Z-Kpqryflz.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-DEn1TFfK.js → zh-CN-LNUGB5OW-CjexwOqT.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-DJQRmOHH.js → zh-HK-E62DVLB3-B0ys_HV6.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-B7s9vmSf.js → zh-TW-RAJ6MFWO-tQJWLJuU.js} +1 -1
- package/dist-embed/datalayer-app-main.js +19 -19
- package/lib/apps/apps/records.d.ts +0 -29
- package/lib/apps/apps/records.js +11 -34
- package/lib/apps/apps/threads.d.ts +2 -21
- package/lib/apps/apps/threads.js +0 -75
- package/lib/apps/embed/embedSession.d.ts +0 -8
- package/lib/apps/embed/embedSession.js +1 -38
- package/lib/apps/embed/visitorApp.d.ts +22 -3
- package/lib/apps/embed/visitorApp.js +42 -4
- package/lib/apps/plugins/chat/ChatView.js +2 -1
- package/lib/chat/base/ChatBase.js +1 -1
- package/lib/chat/base/fullContextMessages.js +1 -1
- package/lib/hooks/useAgUi.js +1 -1
- package/lib/hooks/useToolApprovals.d.ts +1 -1
- package/lib/hooks/useToolApprovals.js +1 -1
- package/lib/{protocols → portable}/agUiRefusal.d.ts +1 -1
- package/lib/{protocols → portable}/agUiRefusal.js +1 -1
- package/lib/portable/agui.d.ts +72 -0
- package/lib/portable/agui.js +174 -0
- package/lib/portable/conversation.d.ts +124 -0
- package/lib/portable/conversation.js +357 -0
- package/lib/portable/index.d.ts +11 -6
- package/lib/portable/index.js +14 -11
- package/lib/portable/records.d.ts +27 -0
- package/lib/portable/records.js +46 -0
- package/lib/portable/sessions.d.ts +92 -0
- package/lib/portable/sessions.js +134 -0
- package/lib/portable/thread.d.ts +41 -0
- package/lib/portable/thread.js +102 -0
- package/lib/protocols/AGUIAdapter.d.ts +0 -2
- package/lib/protocols/AGUIAdapter.js +39 -74
- package/package.json +1 -1
- package/dist-embed/chunks/ChatView-fHb_i4kH.js +0 -32
- package/dist-embed/chunks/index-DpJpQnPn.js +0 -34
- /package/lib/{utils → portable}/approvals.d.ts +0 -0
- /package/lib/{utils → portable}/approvals.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{w as b,x as E,E as v,r as I,j as i,B as c,T as N,bk as j,bl as T,bm as U}from"../datalayer-app-main.js";import{EphemeralDocument as O}from"./EphemeralDocument-
|
|
1
|
+
import{w as b,x as E,E as v,r as I,j as i,B as c,T as N,bk as j,bl as T,bm as U}from"../datalayer-app-main.js";import{EphemeralDocument as O}from"./EphemeralDocument-DIHjR5l8.js";import{O as _,b as P,u as w}from"./openingNotebook-CjjarT8V.js";import{P as d}from"./PrismCss-CcU1ChRk.js";import"./lexicalHooks-Pqoe8h_O.js";import"./LexicalToolRegistry-8wJyLumb.js";import"./useProgressTask-UPro-gwc.js";import"./JupyterLexicalExtension-_7FM5Om8.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./Output-BWClePP-.js";import"./index-CFP9psRB.js";import"./hoverbox-CStlKQWE.js";import"./index-DSN70XMH.js";import"./index-DyVR0igi.js";import"./color-CG7_7V2-.js";import"./isEqual-Cwjr2skl.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";const D="Quarterly revenue by region",M="Six rows of revenue, two quarters, three regions. The cell below loads them and shows the frame; run it, change it, or ask an agent to take it further — the code and its output live in this document, beside the words about them.",l="opening-document-input",S="opening-document-output",g=e=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1}),u=(e,o,t={})=>({children:o,direction:"ltr",format:"",indent:0,type:e,version:1,...t}),h={type:"linebreak",version:1},s=(e,o)=>({detail:0,format:0,mode:"normal",style:"",text:e,type:"jupyter-input-highlight",version:1,highlightType:o}),f=e=>e.flatMap(o=>{if(typeof o=="string")return o.split(`
|
|
2
2
|
`).flatMap((n,m)=>[...m>0?[h]:[],...n.length>0?[s(n)]:[]]);const{content:t,type:r}=o;return typeof t=="string"?[s(t,r)]:Array.isArray(t)?t.length===1&&typeof t[0]=="string"?[s(t[0],r)]:f(t):[]}),k=e=>{const o=d.languages.python;return o?f(d.tokenize(e,o)):e.split(`
|
|
3
3
|
`).flatMap((t,r)=>[...r>0?[h]:[],...t.length>0?[s(t)]:[]])};function A(){const e=_.join("");return{root:{children:[u("heading",[g(D)],{tag:"h1"}),u("paragraph",[g(M)],{textFormat:0,textStyle:""}),u("jupyter-input",k(e),{language:"python",jupyterInputNodeUuid:l}),{type:"jupyter-output",version:1,format:"",source:e,outputs:[{output_type:"execute_result",execution_count:1,data:{"text/plain":P},metadata:{}}],jupyterInputNodeUuid:l,jupyterOutputNodeUuid:S}],direction:"ltr",format:"",indent:0,type:"root",version:1}}}function lt({workspace:e}){const o=b(),t=E(o.snapshot),r=e.surfaceId,n=w(T,j,{workspace:e,editorId:r}),a=v(U)[0]?.value,y=I.useMemo(()=>JSON.stringify((a?.document??A)()),[a]),x=a?.autoFocus??!0;if(t.state!=="running")return i.jsx(c,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:4,textAlign:"center",children:i.jsx(N,{children:"The document needs a running sandbox for its code blocks. Open the Sandbox view to see what it is doing."})});const p=o.getServiceManager()??void 0;return i.jsx(c,{height:"100%",minHeight:0,children:i.jsx(O,{inheritTheme:!0,documentId:r,content:y,autoFocus:x,serviceManager:p,showToolbar:n.present,toolbarExtraItems:n.items,kernelId:p?t.kernelId:void 0,runtimeOverride:!p&&t.jupyterUrl?{baseUrl:t.jupyterUrl,token:t.jupyterToken}:void 0})})}export{lt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,ap as ke,aq as Se,ar as je,as as we,at as ve,j as e,B as M,au as Ce,av as Ee,aw as be,ax as Re,ay as V,l as q,az as Me,aA as Te,aB as Pe,K as T,aC as De,aD as K,aE as $,aF as Ne,aG as Ue}from"../datalayer-app-main.js";import{useLexicalTools as Be}from"./lexicalHooks-
|
|
1
|
+
import{r,ap as ke,aq as Se,ar as je,as as we,at as ve,j as e,B as M,au as Ce,av as Ee,aw as be,ax as Re,ay as V,l as q,az as Me,aA as Te,aB as Pe,K as T,aC as De,aD as K,aE as $,aF as Ne,aG as Ue}from"../datalayer-app-main.js";import{useLexicalTools as Be}from"./lexicalHooks-Pqoe8h_O.js";import{u as He}from"./useProgressTask-UPro-gwc.js";import{L as Ae,j as Ie,T as Le,k as We,l as Fe,m as _e,D as G,n as ze,o as Je,p as Ve,q as qe,J as Ke,s as $e,F as Ge,t as Ye,u as Qe,v as Xe,w as Ze}from"./JupyterLexicalExtension-_7FM5Om8.js";import"./LexicalToolRegistry-8wJyLumb.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-BWClePP-.js";import"./index-CFP9psRB.js";import"./hoverbox-CStlKQWE.js";import"./index-DSN70XMH.js";import"./index-DyVR0igi.js";import"./color-CG7_7V2-.js";import"./isEqual-Cwjr2skl.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";function Oe({content:o}){const[s]=T(),l=r.useRef(!0);return r.useEffect(()=>{if(l.current){if(l.current=!1,!o){s.update(()=>{const t=K();t.getChildrenSize()===0&&t.append($())},{tag:"history-merge"});return}try{const t=JSON.parse(o);if(t&&typeof t=="object"&&t.root){const d=s.parseEditorState(o);s.setEditorState(d,{tag:"history-merge"})}else throw new Error("Invalid Lexical editor state format")}catch{s.update(()=>{const t=K();t.clear(),t.append($())},{tag:"history-merge"})}}},[o,s]),null}function et({disabled:o}){const[s]=T();return r.useEffect(()=>{De(s,Ne).output.disabled.value=o},[s,o]),null}function tt({setIsLinkEditMode:o,extraItems:s}){const[l]=T(),[t,d]=r.useState(l);return e.jsx(Ze,{editor:l,activeEditor:t,setActiveEditor:d,setIsLinkEditMode:o,extraItems:s})}function Y({inherit:o,colorMode:s,themeConfig:l,children:t}){return o?e.jsx(e.Fragment,{children:t}):e.jsx(Te,{colorMode:s,theme:l.primerTheme,themeStyles:l.themeStyles,children:t})}function Ut({documentId:o,runtimeName:s,runtimeOverride:l,serviceManager:t,kernelId:d,themeVariant:Q,colorMode:X,content:P,onContentChange:w,onToolsReady:D,onKernelChange:v,collaboration:n,toolbarExtraItems:Z,showToolbar:O=!0,inheritTheme:N=!1,autoFocus:U=!0}){const h=!!(n?.websocketUrl&&n?.roomId),ee=n?.identity?.displayName||n?.identity?.handle||n?.identity?.userId,te=n?.identity?.color,ne=r.useMemo(()=>({user:{id:n?.identity?.userId,username:n?.identity?.userId||n?.identity?.handle||n?.identity?.displayName,name:n?.identity?.handle||n?.identity?.displayName,display_name:n?.identity?.displayName||n?.identity?.handle,initials:n?.identity?.initials,color:n?.identity?.color,avatar_url:n?.identity?.avatarUrl,handle:n?.identity?.handle}}),[n?.identity]),B=r.useRef(P),H=r.useRef(o);H.current!==o&&(H.current=o,B.current=P);const A=B.current,I=r.useRef(A??""),L=Be(o);r.useEffect(()=>{D?.(L)},[L,D]);const{runtimes:W,refetchRuntimes:C}=ke(),m=r.useMemo(()=>{const i=String(l?.baseUrl||"").trim();if(i)return{url:i,wsUrl:String(l?.wsUrl||"").trim()||void 0,token:String(l?.token||"").trim(),runtime_name:String(l?.runtimeName||"").trim()||"agent-node-proxy"};const a=String(s||"").trim();if(a)return W.find(j=>String(j?.runtime_name||"")===a)},[l,s,W]),F=!!(!l?.baseUrl&&String(s||"").trim()&&!m);r.useEffect(()=>{if(!F)return;C();const i=window.setInterval(()=>{C()},1e3);return()=>{window.clearInterval(i)}},[F,C]);const[re,g]=r.useState(null),[p,f]=r.useState(void 0);r.useEffect(()=>{let i=!1,a=null,j=null;return(async()=>{if(t){try{await t.ready;const u=d?t.kernels.connectTo({model:{id:d,name:"python"}}):await t.kernels.startNew();i||(g(t),f(new V({kernelName:u.model.name,kernelSpecName:u.model.name,kernelModel:u.model,kernelManager:t.kernels,kernelspecsManager:t.kernelspecs,sessionManager:t.sessions})))}catch(u){console.error("[agent-runtimes] The document could not reach the kernel of the sandbox it was given.",u),i||(g(null),f(void 0))}return}const b=String(m?.url||"").trim();if(!b){i||(g(null),f(void 0));return}try{const u=String(m?.token||"").trim(),pe=String(m?.wsUrl||"").trim()||b.replace(/^http/,"ws"),xe=q.ServerConnection.makeSettings({baseUrl:b,wsUrl:pe,token:u,appendToken:!0});a=new q.ServiceManager({serverSettings:xe}),j=Me(String(m?.runtime_name||""),a),await a.ready;const R=await a.kernels.startNew();if(!i){const ye=new V({kernelName:R.model.name,kernelSpecName:R.model.name,kernelModel:R.model,kernelManager:a.kernels,kernelspecsManager:a.kernelspecs,sessionManager:a.sessions});g(a),f(ye)}}catch{i||(g(null),f(void 0))}})(),()=>{i=!0,j?.(),a&&Ue(a)}},[t,d,m?.runtime_name,m?.url,m?.token]),r.useEffect(()=>(v?.(p?.connection??null),()=>{v?.(null)}),[p,v]);const E=re,_=!!((String(s||"").trim()||String(l?.baseUrl||"").trim()||t)&&!E);He(`ephemeral-document-start-${o}`,_);const oe=r.useMemo(()=>Se({name:"@datalayer/agent-runtimes/EphemeralDocument",namespace:`ephemeral-document-${o}`,theme:Xe,dependencies:[Qe,...U?[Pe]:[]],onError(i){console.error("[EphemeralDocument]",i)}}),[o,U]),ie=r.useCallback(i=>{if(!w)return;const a=JSON.stringify(i.toJSON());a!==I.current&&(I.current=a,w(a))},[w]),[x,se]=r.useState(null),[,z]=r.useState(!1),y=h?n?.roomId:void 0,[ae,le]=r.useState(),ce=y===void 0||ae===y,me=r.useCallback(i=>le(i?y:void 0),[y]),de=i=>{i!==null&&se(i)},{colorMode:ue,theme:he}=je(),k=X??ue,ge=Q??he,fe=we(),S=ve(ge),J=k==="auto"?fe:k,c=(J==="dark"?S.themeStyles.dark:S.themeStyles.light).backgroundColor??"";return e.jsx(M,{flex:1,minHeight:0,height:"100%",position:"relative",overflow:"hidden",bg:"canvas.default",children:E?e.jsx(Y,{inherit:N,colorMode:k,themeConfig:S,children:e.jsx(Ce,{colormode:J,backgroundColor:c,children:e.jsx(M,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden",overscrollBehaviorY:"contain",padding:2,backgroundColor:c,"--bgColor-default":c,"& .editor-shell":{backgroundColor:c,borderRadius:2,display:"flex",flexDirection:"column",minHeight:0,flex:1,maxWidth:"none",width:"100%",margin:0},"& .editor-container":{backgroundColor:c,display:"flex",flexDirection:"column",minHeight:0,flex:1,width:"100%",maxWidth:"none",margin:0},"& .editor-inner":{backgroundColor:c,display:"flex",flexDirection:"column",minHeight:0,flex:1,width:"100%",maxWidth:"none"},"& .editor-scroller":{minHeight:0,flex:1,overflow:"auto",width:"100%",maxWidth:"none"},"& .editor":{minHeight:"100%",width:"100%",maxWidth:"none",margin:0},"& .editor-input":{backgroundColor:c,width:"100%",maxWidth:"none",margin:0},"& .ContentEditable__root":{width:"100%",maxWidth:"none",margin:0},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:c}},children:e.jsx(Ae,{lexicalId:o,serviceManager:E,children:e.jsx(Ee,{extension:oe,contentEditable:null,children:e.jsx(Ie,{children:e.jsx(Le,{children:e.jsxs("div",{className:"editor-shell",children:[O?e.jsx(tt,{setIsLinkEditMode:z,extraItems:Z}):null,e.jsx("div",{className:"editor-container",children:e.jsxs("div",{className:"editor-inner",children:[h&&n?e.jsx(We,{id:n.roomId,providerFactory:Fe,websocketUrl:n.websocketUrl,shouldBootstrap:!0,showCollaborators:!0,username:ee,cursorColor:te,awarenessData:ne,onInitialization:me}):null,e.jsx(_e,{}),ce?e.jsx("div",{className:"editor-scroller",children:e.jsx("div",{className:"editor",ref:de,children:e.jsx(be,{className:"editor-input","aria-label":"Ephemeral document editor"})})}):e.jsx(G,{maxWidth:"100%"}),!h&&e.jsx(Re,{onChange:ie}),e.jsx(et,{disabled:h}),!h&&e.jsx(Oe,{content:A}),e.jsx(ze,{}),e.jsx(Je,{}),e.jsx(Ve,{}),e.jsx(qe,{kernel:p}),e.jsx(Ke,{kernel:p}),x&&e.jsxs(e.Fragment,{children:[e.jsx($e,{anchorElem:x}),e.jsx(Ge,{anchorElem:x,setIsLinkEditMode:z}),e.jsx(Ye,{anchorElem:x})]})]})})]})})})})})})})}):_?e.jsx(Y,{inherit:N,colorMode:k,themeConfig:S,children:e.jsx(M,{position:"absolute",inset:0,display:"flex",flexDirection:"column",padding:2,backgroundColor:c,children:e.jsx(G,{label:"Starting the document",maxWidth:"100%"})})}):null})}export{Ut as EphemeralDocument,Ut as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c1 as O,aW as Ee,l as x,b_ as I,aV as be,d$ as _e,e0 as Re,e1 as Ce,r as f,o as ne,ap as Me,e2 as Ue,j as v,ar as je,as as qe,at as Te,B as Q,au as Ae,az as Ne,aA as Ie,aG as Oe}from"../datalayer-app-main.js";import{u as Le}from"./useProgressTask-UPro-gwc.js";import{a as De}from"./NotebookToolbar-rtMQZWHQ.js";import{C as Je,a as $e,N as Be}from"./CellSidebarExtension-
|
|
1
|
+
import{c1 as O,aW as Ee,l as x,b_ as I,aV as be,d$ as _e,e0 as Re,e1 as Ce,r as f,o as ne,ap as Me,e2 as Ue,j as v,ar as je,as as qe,at as Te,B as Q,au as Ae,az as Ne,aA as Ie,aG as Oe}from"../datalayer-app-main.js";import{u as Le}from"./useProgressTask-UPro-gwc.js";import{a as De}from"./NotebookToolbar-rtMQZWHQ.js";import{C as Je,a as $e,N as Be}from"./CellSidebarExtension-CDnzN9Cb.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./index-DSN70XMH.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./index-DyVR0igi.js";import"./color-CG7_7V2-.js";import"./isEqual-Cwjr2skl.js";import"./defaultLocale-5voVPcsN.js";import"./renderer-Dy4lZ1KZ.js";import"./SquareIcon-e3ygcjpv.js";const H="jupyter_server_nbmodel",Pe=new WeakSet;function We(e){return Pe.has(e)}function re(e){const n=e.model.getMetadata(H);return n?.kernelId&&n.requestId&&n.requestUrl?n:void 0}function oe(e,n){e.model.setMetadata(H,n)}function Z(e){e.model.deleteMetadata(H)}function se(e){return(typeof e=="string"?JSON.parse(e):e).reduce((r,t)=>{const o=r[r.length-1];if(t.output_type==="stream"&&o?.output_type==="stream"&&o.name===t.name){const s=Array.isArray(o.text)?o.text.join(""):o.text??"",a=Array.isArray(t.text)?t.text.join(""):t.text??"";o.text=s+a}else r.push(t);return r},[])}function j(e){return Array.isArray(e.text)?e.text.join(""):e.text??""}function Ke(e,n){return e?.output_type==="stream"&&n?.output_type==="stream"&&e.name===n.name&&j(n).startsWith(j(e))}function He(e,n){return e.length>n.length?!1:e.every((r,t)=>O.deepEqual(r,n[t])||t===e.length-1&&Ke(r,n[t]))}function Fe(e,n){const r=Math.min(e.length,n.length);for(let t=0;t<r;t+=1){const o=e[t],s=n[t];if(O.deepEqual(o,s))continue;if(!(o?.output_type==="stream"&&s?.output_type==="stream"&&o.name===s.name))return-1;const i=j(o),u=j(s);if(!u.startsWith(i)&&!i.startsWith(u)||t<r-1)return-1}return r}function Ge(e,n,r){let t=n.length;if(n.length>0&&r.length>=n.length){const o=n.length-1,s=n[o],a=r[o];if(!O.deepEqual(s,a)){const i=j(a).slice(j(s).length);i&&e.outputArea.model.add({...a,text:i})}}for(;t<r.length;)e.outputArea.model.add(r[t]),t+=1}function ae(e,n,r){const t=e.model.sharedModel,o=t.getOutputs();if(O.deepEqual(o,n))return;if(n.length===0){r?.length&&o.length&&e.outputArea.model.clear();return}if(He(n,o))return;console.debug("[jupyter-server-nbmodel] Applying pending output snapshot",{cellId:t.getId(),outputCount:n.length});const s=Fe(o,n);s>=0?Ge(e,o.slice(0,s),n):t.setOutputs(n)}const Ve=1e3;async function ze(e,n,r){let t;try{t=await n.json()}catch{return}if(t.request_id&&t.kernel_id){const a=n.headers.get("Location")??t.request_url;a&&(r.requestUrl=a),a&&r.recoverOutputs&&oe(e,{kernelId:t.kernel_id,requestId:t.request_id,requestUrl:a}),r.accepted||(r.accepted=!0,r.onAccepted?.())}if(t.outputs===void 0||!r.recoverOutputs)return;const o=se(t.outputs),s=r.serverOutputs;r.serverOutputs=o,ae(e,o,s)}async function K(e,n,r,t,o,s=100,a={}){const i=new Ee;return x.ServerConnection.makeRequest(n,r,t).then(async u=>{if(u.ok)if(u.status===202){await ze(e,u,a);let c=u.headers.get("Location")||a.requestUrl||n;c.startsWith(t.baseUrl)||(c=I.URLExt.join(t.baseUrl,c)),setTimeout(async(_,w,m,M,k,U,p)=>{try{const h=await K(_,w,m,M,k,U,p);i.resolve(h)}catch(h){i.reject(h)}},s,e,c,{method:"GET"},t,o,Math.min(Ve,s*2),a)}else i.resolve(u);else if(u.status===300){let c=u.headers.get("Location")||"";if(!c){const p=n.match(/^(.*\/api\/kernels\/[^/?]+)/);c=p?`${p[1]}/input`:""}if(!c){i.reject(new Error(`The kernel asked for an input, and where to send it could not be determined: no Location header, and the polled URL names no kernel (${n}).`));return}c.startsWith(t.baseUrl)||(c=I.URLExt.join(t.baseUrl,c));const{parent_header:_,input_request:w}=await u.json(),m=new be;m.addClass("jp-OutputArea-child"),m.addClass("jp-OutputArea-stdin-item");const M=new _e;M.addClass("jp-OutputArea-prompt"),m.addWidget(M);const k=new Re({future:Object.freeze({sendInputReply:(p,h)=>{x.ServerConnection.makeRequest(c,{method:"POST",body:JSON.stringify({input:p.value})},t).catch(E=>{console.error(`Failed to set input to ${JSON.stringify(p)}.`,E)})}}),parent_header:_,password:w.password,prompt:w.prompt,translator:o});k.addClass("jp-OutputArea-output"),m.addWidget(k);const U=k.node.getElementsByTagName("input")[0];k.value.then(p=>{m.addClass("jp-OutputArea-stdin-hiding"),e.outputArea.model.add({output_type:"stream",name:"stdin",text:p+`
|
|
2
2
|
`}),U.focus(),window.setTimeout(async()=>{const h=document.activeElement;m.dispose(),h&&h instanceof HTMLElement&&h.focus();try{const E=await K(e,n,r,t,o,100,a);i.resolve(E)}catch(E){i.reject(E)}},500)}),e.outputArea.layout.addWidget(m)}else i.reject(await x.ServerConnection.ResponseError.create(u))}).catch(u=>{i.reject(new x.ServerConnection.NetworkError(u))}),i.promise}async function Ye(e,n,r,t,o,s=100,a,i=!1){return K(e,n,r,t,o,s,{onAccepted:a,recoverOutputs:i})}async function Xe(e,n,r){const t=e.model.sharedModel;t.executionState="running";try{const s=await(await Ye(e,n,{method:"GET"},r,void 0,100,void 0,!0)).json(),a=se(s.outputs??"[]");return ae(e,a),t.execution_count=s.execution_count??null,t.executionState="idle",Z(e),s.status==="ok"}catch(o){if(o instanceof x.ServerConnection.ResponseError&&o.response.status===404)return Z(e),t.executionState="idle",!1;throw o}}const N=new Set;function Qe(e,n){if(e.startsWith(n.baseUrl))return e;const r=e.startsWith("http")?new URL(e).pathname:e;return I.URLExt.join(n.baseUrl,r)}function Ze(e,n){if(We(e))return!1;const r=re(e);if(!r||N.has(r.requestId)||e.isDisposed||!e.model)return!1;N.add(r.requestId);const t=Qe(r.requestUrl,n);return console.info("[agent-runtimes] Resuming a server execution",{cellId:e.model.sharedModel.getId(),requestId:r.requestId,requestUrl:t}),Xe(e,t,n).catch(o=>{if(e.isDisposed){N.delete(r.requestId);return}console.warn(`[agent-runtimes] Failed to resume the execution ${r.requestId}.`,o)}),!0}const W=new Set;async function et(e,n,r){const t=`${r.baseUrl}#${n.id}`;if(W.has(t))return 0;const o=await x.ServerConnection.makeRequest(I.URLExt.join(r.baseUrl,`api/kernels/${n.id}/execute`),{method:"GET"},r);if(o.status===404)return W.add(t),0;if(!o.ok)throw await x.ServerConnection.ResponseError.create(o).catch(()=>new Error(`Invalid response: ${o.status} ${o.statusText}`.trim()));W.add(t);const s=await o.json();let a=0;for(const i of s.requests??[]){if(!i.cell_id||N.has(i.request_id))continue;const u=e.find(c=>c.model?.sharedModel.getId()===i.cell_id);!u||u.isDisposed||re(u)||(oe(u,{kernelId:i.kernel_id,requestId:i.request_id,requestUrl:i.request_url}),a+=1)}return a}async function tt(e){if(e.isDisposed)return 0;const n=e.sessionContext?.session?.kernel,r=n?.serverSettings;if(!n||!r)return 0;const t=e.content.widgets.filter(s=>s instanceof Ce);if(t.length===0)return 0;try{await et(t,n,r)}catch(s){console.warn("[agent-runtimes] Failed to discover the active executions of the kernel.",s)}let o=0;for(const s of t)Ze(s,r)&&(o+=1);return o}const ee=1e3,nt=3e4;function rt(e,n){f.useEffect(()=>{if(!e||!n)return;let r=0;const t=()=>{const a=ne.getState().selectNotebook(e)?.adapter?.panel;!a||a.isDisposed||tt(a)};t();const o=window.setInterval(()=>{if(r+=ee,r>=nt){window.clearInterval(o);return}t()},ee);return()=>{window.clearInterval(o)}},[e,n])}const te={cells:[{cell_type:"code",source:[""],metadata:{},outputs:[],execution_count:null}],metadata:{kernelspec:{display_name:"Python 3",language:"python",name:"python3"},language_info:{name:"python"}},nbformat:4,nbformat_minor:5};function ot({inherit:e,colorMode:n,themeConfig:r,children:t}){return e?v.jsx(v.Fragment,{children:t}):v.jsx(Ie,{colorMode:n,theme:r.primerTheme,themeStyles:r.themeStyles,children:t})}function Et({notebookId:e,runtimeName:n,runtimeOverride:r,serviceManager:t,inheritTheme:o=!1,kernelId:s,cellSidebarMargin:a=120,nbformat:i,onNbformatChange:u,toolbarComponent:c,toolbarExtraItems:_,showToolbar:w=!0,showSaveItem:m=!1,themeVariant:M,colorMode:k,collaborationProvider:U}){const p=f.useRef(i??te),h=f.useRef(e);h.current!==e&&(h.current=e,p.current=i??te);const E=p.current,F=f.useRef(JSON.stringify(E)),{runtimes:G,refetchRuntimes:L}=Me(void 0,{enabled:!!String(n||"").trim()&&!t&&!String(r?.baseUrl||"").trim()}),V=f.useMemo(()=>{const l=String(n||"").trim();if(l)return G.find(d=>String(d?.runtime_name||"")===l)},[n,G]),S=f.useMemo(()=>{const l=String(r?.baseUrl||"").trim();return l?{url:l,wsUrl:String(r?.wsUrl||"").trim()||void 0,token:String(r?.token||"").trim(),runtime_name:String(r?.runtimeName||"").trim()||"agent-node-proxy"}:V},[r,V]),z=!!(!r?.baseUrl&&String(n||"").trim()&&!S);f.useEffect(()=>{if(!z)return;L();const l=window.setInterval(()=>{L()},1e3);return()=>{window.clearInterval(l)}},[z,L]);const[ie,D]=f.useState(null),[ue,J]=f.useState(void 0),[le,$]=f.useState(!1);f.useEffect(()=>{let l=!1,d=null,b=null;const y=async()=>{const R=String(S?.url||"").trim();if(!R){l||(D(null),J(void 0),$(!1));return}try{const A=String(S?.token||"").trim(),we=String(S?.wsUrl||"").trim()||R.replace(/^http/,"ws"),ke=x.ServerConnection.makeSettings({baseUrl:R,wsUrl:we,token:A,appendToken:!0}),C=new x.ServiceManager({serverSettings:ke});if(d=C,b=Ne(String(S?.runtime_name||""),d),l){g(C);return}await C.ready,await C.kernels.refreshRunning();const X=[...C.kernels.running()][0];if(l){g(C);return}D(C),J(X?.id),$(!X)}catch(A){d&&(g(d),d=null),l||(console.warn(`[agent-runtimes] Could not reach the sandbox at ${R}.`,A),D(null),J(void 0),$(!1))}},g=R=>{b?.(),b=null,Oe(R)};return y(),()=>{l=!0,d?(g(d),d=null):(b?.(),b=null)}},[S?.runtime_name,S?.url,S?.token,S?.wsUrl]);const q=t??ie,ce=Ue(),de=s??ue,fe=t?!s:le,me=f.useMemo(()=>{if(!w)return;const l=c||De,d=m?void 0:["notebook-save","notebook-divider-file"];return!_?.length&&!d?l:function(y){return v.jsx(l,{...y,extraItems:_,hiddenItems:d})}},[w,m,c,_]),pe=!!((String(n||"").trim()||String(r?.baseUrl||"").trim())&&!q);Le(`ephemeral-notebook-start-${e}`,pe),rt(e,q??void 0),f.useEffect(()=>{if(U)return;const l=()=>{const g=ne.getState().selectNotebook(e)?.adapter;return(g?.notebook?.model??g?.panel?.content?.model??null)?.toJSON?.()??null},d=()=>{const y=l();if(!y||!Array.isArray(y.cells))return;const g=JSON.stringify(y);g!==F.current&&(F.current=g,u?.(y))},b=window.setInterval(d,500);return()=>{window.clearInterval(b),d()}},[q,e,u]);const{colorMode:he,theme:ge}=je(),B=k??he,Se=M??ge,ye=qe(),P=Te(Se),Y=B==="auto"?ye:B,T=(Y==="dark"?P.themeStyles.dark:P.themeStyles.light).backgroundColor??"",ve=f.useMemo(()=>[new Je({factory:$e})],[]),xe=f.useMemo(()=>`.datalayer/${e}.ipynb`,[e]);return v.jsx(Q,{flex:1,minHeight:0,height:"100%",position:"relative",overflow:"hidden",bg:"canvas.default",children:q&&ce?v.jsx(ot,{inherit:o,colorMode:B,themeConfig:P,children:v.jsx(Ae,{colormode:Y,backgroundColor:T,children:v.jsx(Q,{sx:{position:"absolute",inset:0,display:"flex",flexDirection:"column",overflow:"hidden",overscrollBehaviorY:"contain",overflowAnchor:"none",padding:2,backgroundColor:T,"& #dla-Jupyter-Notebook":{display:"flex",flexDirection:"column"},...w?{"& #dla-Jupyter-Notebook > :first-of-type":{position:"sticky",top:0,zIndex:2,flex:"0 0 auto",backgroundColor:T}}:{"& .datalayer-NotebookPanel-header":{display:"none",minHeight:0}},"& #dla-Jupyter-Notebook > .dla-Box-Notebook":{flex:"1 1 auto",minHeight:0},'& [role="toolbar"][aria-label="Notebook toolbar"]':{backgroundColor:T}},children:v.jsx(Be,{nbformat:E,id:e,path:xe,serviceManager:q,startDefaultKernel:fe,kernelId:de,height:"100%",cellSidebarMargin:a,extensions:ve,Toolbar:me,collaborationProvider:U})})})}):null})}export{Et as EphemeralNotebook,Et as default};
|
package/dist-embed/chunks/{ExcalidrawComponent-CbghNk-F.js → ExcalidrawComponent-vJQwgcUt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,j as p,K as N,bS as T,bT as z,bU as L,bV as F,bW as R,I as O,bX as U}from"../datalayer-app-main.js";import{x as _,y as W,z as $,A as M}from"./JupyterLexicalExtension-
|
|
1
|
+
import{r as o,j as p,K as N,bS as T,bT as z,bU as L,bV as F,bW as R,I as O,bX as U}from"../datalayer-app-main.js";import{x as _,y as W,z as $,A as M}from"./JupyterLexicalExtension-_7FM5Om8.js";import H from"./ExcalidrawModal-BDgjdSz2.js";import{r as X}from"./percentages-BXMCSKIN-Bk5xifLL.js";import{u as V}from"./ThemeContext-D9ztCaU3.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-BWClePP-.js";import"./index-CFP9psRB.js";import"./hoverbox-CStlKQWE.js";import"./index-DSN70XMH.js";import"./index-DyVR0igi.js";import"./color-CG7_7V2-.js";import"./isEqual-Cwjr2skl.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-8wJyLumb.js";import"./extends-CF3RwP-h.js";import"./index-BvgsWH_d.js";import"./index-DoBkwclg.js";const J=e=>{const n=e?.firstElementChild?.firstElementChild,b=e.getAttribute("viewBox");if(b!=null){const a=b.split(" ");e.setAttribute("width",a[2]),e.setAttribute("height",a[3])}n&&n.tagName==="style"&&n.remove()};function P({elements:e,files:n,imageContainerRef:b,appState:a,rootClassName:s=null,width:c="inherit",height:C="inherit"}){const[g,x]=o.useState(null),{theme:E}=V(g),[B,u]=o.useState(null),[v,S]=o.useState(0);o.useEffect(()=>{const r=new MutationObserver(w=>{for(const h of w)if(h.type==="attributes"&&(h.attributeName==="style"||h.attributeName==="class")){S(l=>l+1);break}});return r.observe(document.documentElement,{attributes:!0,attributeFilter:["style","class"]}),r.observe(document.body,{attributes:!0,attributeFilter:["style","class"]}),()=>r.disconnect()},[]),o.useEffect(()=>{(async()=>{await new Promise(D=>setTimeout(D,150));const w=["#ffffff","#000000","transparent",""],h=a?.viewBackgroundColor||"transparent",l=w.includes(h.toLowerCase()),A={...a,viewBackgroundColor:l?"transparent":a?.viewBackgroundColor,exportBackground:!l,exportWithDarkMode:E==="dark"},m=await X({appState:A,elements:e,files:n});J(m),m.setAttribute("width","100%"),m.setAttribute("height","100%"),m.setAttribute("display","block"),u(m)})()},[e,n,a,E,v]);const f={};c!=="inherit"&&(f.width=`${c}px`),C!=="inherit"&&(f.height=`${C}px`);const k=a?.viewBackgroundColor||"transparent";if(["#ffffff","#000000","transparent",""].includes(k.toLowerCase())){const r=E==="dark"?"#1e1e1e":"#ffffff";f.backgroundColor=`var(--bgColor-default, var(--jp-layout-color0, var(--vscode-editor-background, ${r})))`}return p.jsx("div",{ref:r=>{x(r),r&&b&&(b.current=r)},className:s??"",style:f,dangerouslySetInnerHTML:{__html:B?.outerHTML??""}})}function Bt({nodeKey:e,data:n,width:b,height:a}){const[s]=N(),c=_(),[C,g]=o.useState(n==="[]"&&s.isEditable()),x=o.useRef(null),E=o.useRef(null),B=o.useRef(null),[u,v,S]=W(e),[f,k]=o.useState(!1);o.useEffect(()=>{if(!c){u&&S();return}return T(s.registerCommand(z,t=>{const d=E.current,i=t.target;return f?!0:d!==null&&L(i)&&d.contains(i)?(t.shiftKey||S(),v(!u),t.detail>1&&g(!0),!0):!1},F))},[S,s,u,f,v,c]);const j=o.useCallback(()=>(g(!1),s.update(()=>{const t=R(e);t&&t.remove()})),[s,e]),I=(t,d,i)=>s.update(()=>{const y=R(e);M(y)&&(t&&t.length>0||Object.keys(i).length>0?y.setData(JSON.stringify({appState:d,elements:t,files:i})):y.remove())}),r=()=>{k(!0)},w=(t,d)=>{setTimeout(()=>{k(!1)},200),s.update(()=>{const i=R(e);M(i)&&(i.setWidth(t),i.setHeight(d))})},h=o.useCallback(()=>{g(!0)},[]),{elements:l=[],files:A={},appState:m={}}=o.useMemo(()=>JSON.parse(n),[n]),D=o.useCallback(()=>{g(!1),l.length===0&&s.update(()=>{const t=R(e);t&&t.remove()})},[s,e,l.length]);return p.jsxs(p.Fragment,{children:[c&&C&&p.jsx(H,{initialElements:l,initialFiles:A,initialAppState:m,isShown:C,onDelete:j,onClose:D,onSave:(t,d,i)=>{I(t,d,i),g(!1)},closeOnClickOutside:!1}),l.length>0&&p.jsxs("button",{ref:E,className:`excalidraw-button ${u?"selected":""}`,children:[p.jsx(P,{imageContainerRef:x,className:"image",elements:l,files:A,appState:m,width:b,height:a}),u&&c&&p.jsx(O,{icon:U,"aria-label":"Edit the drawing",size:"small",variant:"default",sx:{position:"absolute",top:8,right:8,zIndex:10},onMouseDown:t=>t.preventDefault(),onClick:h}),(u||f)&&c&&p.jsx($,{buttonRef:B,showCaption:!0,setShowCaption:()=>null,imageRef:x,editor:s,onResizeStart:r,onResizeEnd:w})]})]})}export{Bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,j as o,D as u,bi as h,c as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-
|
|
1
|
+
import{r as t,j as o,D as u,bi as h,c as f}from"../datalayer-app-main.js";import{I as T}from"./percentages-BXMCSKIN-Bk5xifLL.js";import{u as z}from"./ThemeContext-D9ztCaU3.js";import"./JupyterLexicalExtension-_7FM5Om8.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./Output-BWClePP-.js";import"./index-CFP9psRB.js";import"./hoverbox-CStlKQWE.js";import"./index-DSN70XMH.js";import"./index-DyVR0igi.js";import"./color-CG7_7V2-.js";import"./isEqual-Cwjr2skl.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./LexicalToolRegistry-8wJyLumb.js";import"./extends-CF3RwP-h.js";import"./index-BvgsWH_d.js";import"./index-DoBkwclg.js";function pe({closeOnClickOutside:I=!1,onSave:x,initialElements:l,initialAppState:g,initialFiles:d,isShown:n=!1,onDelete:v,onClose:c}){const[w,C]=t.useState(null),{theme:b}=z(w),m=t.useRef(null),E=t.useCallback(e=>{m.current=e,C(e)},[]),[r,k]=t.useState(null),[j,i]=t.useState(!1),[p,M]=t.useState(l),[D,S]=t.useState(d);t.useEffect(()=>{m.current?.focus()},[]),t.useEffect(()=>{if(!r||!n)return;const e=()=>r.refresh(),a=requestAnimationFrame(e),s=setTimeout(e,300);return window.addEventListener("resize",e),()=>{cancelAnimationFrame(a),clearTimeout(s),window.removeEventListener("resize",e)}},[r,n]);const A=()=>{if(p?.some(e=>!e.isDeleted)){const e=r?.getAppState(),a={exportBackground:e?.exportBackground,exportScale:e?.exportScale,exportWithDarkMode:e?.theme==="dark",isBindingEnabled:e?.isBindingEnabled,isLoading:e?.isLoading,name:e?.name,theme:e?.theme,viewBackgroundColor:e?.viewBackgroundColor,viewModeEnabled:e?.viewModeEnabled,zenModeEnabled:e?.zenModeEnabled,zoom:e?.zoom};x(p,a,D)}else v()},B=()=>{i(!0)};if(n===!1)return null;const y=(e,a,s)=>{M(e),S(s)};return o.jsxs(o.Fragment,{children:[o.jsxs(u,{title:"Excalidraw",onClose:()=>c(),width:"xlarge",height:"auto",sx:{width:"80vw !important",maxWidth:"80vw !important",height:"80vh !important",maxHeight:"80vh !important"},children:[o.jsx(h,{ref:E,tabIndex:-1,sx:{height:"calc(80vh - 140px)",position:"relative",overflow:"hidden"},children:o.jsx(T,{onChange:y,excalidrawAPI:e=>k(e),initialData:{appState:g||{isLoading:!1},elements:l,files:d},theme:b})}),o.jsxs(h,{sx:{display:"flex",gap:2,justifyContent:"flex-end",p:2,borderTop:"1px solid",borderColor:"var(--borderColor-default)"},children:[o.jsx(f,{variant:"invisible",onClick:B,children:"Discard"}),o.jsx(f,{variant:"primary",onClick:A,children:"Save"})]})]}),j&&o.jsx(u,{title:"Discard",onClose:()=>i(!1),width:"small",height:"auto",footerButtons:[{buttonType:"danger",content:"Discard",onClick:()=>{i(!1),c()}},{buttonType:"default",content:"Cancel",onClick:()=>i(!1)}],children:"Are you sure you want to discard the changes?"})]})}export{pe as default};
|