@dxos/plugin-script 0.8.4-main.c1de068 → 0.8.4-main.c4373fc

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 (271) hide show
  1. package/dist/lib/browser/DeploymentDialog-7FNPALCV.mjs +12 -0
  2. package/dist/lib/browser/NotebookContainer-ZSXYRRZB.mjs +578 -0
  3. package/dist/lib/browser/NotebookContainer-ZSXYRRZB.mjs.map +7 -0
  4. package/dist/lib/browser/ScriptContainer-24LLLTLB.mjs +149 -0
  5. package/dist/lib/browser/ScriptContainer-24LLLTLB.mjs.map +7 -0
  6. package/dist/lib/browser/{app-graph-builder-HLQ7K3BT.mjs → app-graph-builder-DPYULSME.mjs} +9 -8
  7. package/dist/lib/browser/app-graph-builder-DPYULSME.mjs.map +7 -0
  8. package/dist/lib/browser/blueprint-definition-ET5KZ46I.mjs +28 -0
  9. package/dist/lib/browser/blueprint-definition-ET5KZ46I.mjs.map +7 -0
  10. package/dist/lib/browser/{chunk-3U6DTUH3.mjs → chunk-DXWTBOND.mjs} +26 -27
  11. package/dist/lib/browser/chunk-DXWTBOND.mjs.map +7 -0
  12. package/dist/lib/browser/{chunk-FMDXKOP7.mjs → chunk-ETFBQURU.mjs} +71 -50
  13. package/dist/lib/browser/chunk-ETFBQURU.mjs.map +7 -0
  14. package/dist/lib/browser/{chunk-QYAREHGH.mjs → chunk-EZVXV6DA.mjs} +3 -5
  15. package/dist/lib/browser/chunk-EZVXV6DA.mjs.map +7 -0
  16. package/dist/lib/browser/chunk-I3THDIT5.mjs +90 -0
  17. package/dist/lib/browser/chunk-I3THDIT5.mjs.map +7 -0
  18. package/dist/lib/browser/chunk-N6M34EUC.mjs +112 -0
  19. package/dist/lib/browser/chunk-N6M34EUC.mjs.map +7 -0
  20. package/dist/lib/browser/{chunk-P4HQKUCP.mjs → chunk-NNYSARXK.mjs} +15 -15
  21. package/dist/lib/browser/chunk-NNYSARXK.mjs.map +7 -0
  22. package/dist/lib/browser/{chunk-5TVBECWH.mjs → chunk-OKXN2N7M.mjs} +2 -2
  23. package/dist/lib/browser/{chunk-FIM2MVNJ.mjs → chunk-SRSEZWDY.mjs} +159 -68
  24. package/dist/lib/browser/chunk-SRSEZWDY.mjs.map +7 -0
  25. package/dist/lib/browser/chunk-SWBZUZDX.mjs +80 -0
  26. package/dist/lib/browser/chunk-SWBZUZDX.mjs.map +7 -0
  27. package/dist/lib/browser/chunk-VFJJA4WR.mjs +88 -0
  28. package/dist/lib/browser/chunk-VFJJA4WR.mjs.map +7 -0
  29. package/dist/lib/browser/{compiler-CXCUA4UQ.mjs → compiler-G2N2CG63.mjs} +24 -8
  30. package/dist/lib/browser/compiler-G2N2CG63.mjs.map +7 -0
  31. package/dist/lib/browser/index.mjs +96 -39
  32. package/dist/lib/browser/index.mjs.map +3 -3
  33. package/dist/lib/browser/{intent-resolver-7B77IG3N.mjs → intent-resolver-FYZRLYNT.mjs} +30 -16
  34. package/dist/lib/browser/intent-resolver-FYZRLYNT.mjs.map +7 -0
  35. package/dist/lib/browser/meta.json +1 -1
  36. package/dist/lib/browser/{react-surface-FYYXZA7C.mjs → react-surface-CFRYAL2P.mjs} +36 -13
  37. package/dist/lib/browser/react-surface-CFRYAL2P.mjs.map +7 -0
  38. package/dist/lib/browser/{settings-KCTBK5TY.mjs → settings-L3HCZRBP.mjs} +8 -8
  39. package/dist/lib/browser/settings-L3HCZRBP.mjs.map +7 -0
  40. package/dist/lib/browser/templates/index.mjs +1 -1
  41. package/dist/lib/browser/types/index.mjs +6 -4
  42. package/dist/lib/node-esm/{DeploymentDialog-3KPRWFE7.mjs → DeploymentDialog-AKAGR37W.mjs} +5 -5
  43. package/dist/lib/node-esm/NotebookContainer-2O3N3XPE.mjs +579 -0
  44. package/dist/lib/node-esm/NotebookContainer-2O3N3XPE.mjs.map +7 -0
  45. package/dist/lib/node-esm/ScriptContainer-IKOB6FHQ.mjs +150 -0
  46. package/dist/lib/node-esm/ScriptContainer-IKOB6FHQ.mjs.map +7 -0
  47. package/dist/lib/node-esm/{app-graph-builder-7EYIHWH4.mjs → app-graph-builder-UXJGHXSL.mjs} +9 -8
  48. package/dist/lib/node-esm/app-graph-builder-UXJGHXSL.mjs.map +7 -0
  49. package/dist/lib/node-esm/blueprint-definition-AIYFOT7Q.mjs +30 -0
  50. package/dist/lib/node-esm/blueprint-definition-AIYFOT7Q.mjs.map +7 -0
  51. package/dist/lib/node-esm/{chunk-QKK3NDHW.mjs → chunk-5IKGUOMI.mjs} +15 -15
  52. package/dist/lib/node-esm/chunk-5IKGUOMI.mjs.map +7 -0
  53. package/dist/lib/node-esm/{chunk-RT43MACC.mjs → chunk-7MR2L4T3.mjs} +26 -27
  54. package/dist/lib/node-esm/chunk-7MR2L4T3.mjs.map +7 -0
  55. package/dist/lib/node-esm/chunk-C33FKUSC.mjs +91 -0
  56. package/dist/lib/node-esm/chunk-C33FKUSC.mjs.map +7 -0
  57. package/dist/lib/node-esm/{chunk-35M3CHYE.mjs → chunk-NUXZQQ6P.mjs} +2 -2
  58. package/dist/lib/node-esm/{chunk-AHXJ6NQU.mjs → chunk-OG2SIKHE.mjs} +3 -5
  59. package/dist/lib/node-esm/chunk-OG2SIKHE.mjs.map +7 -0
  60. package/dist/lib/node-esm/chunk-OQGBKNYU.mjs +90 -0
  61. package/dist/lib/node-esm/chunk-OQGBKNYU.mjs.map +7 -0
  62. package/dist/lib/node-esm/{chunk-7NMI4CEU.mjs → chunk-PMQ3D535.mjs} +159 -68
  63. package/dist/lib/node-esm/chunk-PMQ3D535.mjs.map +7 -0
  64. package/dist/lib/node-esm/{chunk-XJPK3IYI.mjs → chunk-U4CZGISN.mjs} +71 -50
  65. package/dist/lib/node-esm/chunk-U4CZGISN.mjs.map +7 -0
  66. package/dist/lib/node-esm/chunk-VRSDE4CI.mjs +114 -0
  67. package/dist/lib/node-esm/chunk-VRSDE4CI.mjs.map +7 -0
  68. package/dist/lib/node-esm/chunk-ZF5ULKED.mjs +81 -0
  69. package/dist/lib/node-esm/chunk-ZF5ULKED.mjs.map +7 -0
  70. package/dist/lib/node-esm/{compiler-EPFKQXPE.mjs → compiler-PLDAZ5GJ.mjs} +24 -8
  71. package/dist/lib/node-esm/compiler-PLDAZ5GJ.mjs.map +7 -0
  72. package/dist/lib/node-esm/index.mjs +96 -39
  73. package/dist/lib/node-esm/index.mjs.map +3 -3
  74. package/dist/lib/node-esm/{intent-resolver-FRZGS4TB.mjs → intent-resolver-6J3CFL5T.mjs} +30 -16
  75. package/dist/lib/node-esm/intent-resolver-6J3CFL5T.mjs.map +7 -0
  76. package/dist/lib/node-esm/meta.json +1 -1
  77. package/dist/lib/node-esm/{react-surface-V32NWHKN.mjs → react-surface-NPKEO7SA.mjs} +36 -13
  78. package/dist/lib/node-esm/react-surface-NPKEO7SA.mjs.map +7 -0
  79. package/dist/lib/node-esm/{settings-DXZ334A3.mjs → settings-YWGZP4EW.mjs} +8 -8
  80. package/dist/lib/node-esm/settings-YWGZP4EW.mjs.map +7 -0
  81. package/dist/lib/node-esm/templates/index.mjs +1 -1
  82. package/dist/lib/node-esm/types/index.mjs +6 -4
  83. package/dist/types/src/ScriptPlugin.d.ts +1 -1
  84. package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
  85. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  86. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  87. package/dist/types/src/capabilities/artifact-definition.d.ts +1 -1
  88. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  89. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -0
  90. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  91. package/dist/types/src/capabilities/compiler.d.ts +1 -1
  92. package/dist/types/src/capabilities/compiler.d.ts.map +1 -1
  93. package/dist/types/src/capabilities/index.d.ts +6 -6
  94. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  95. package/dist/types/src/capabilities/intent-resolver.d.ts +1 -1
  96. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  97. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  98. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  99. package/dist/types/src/capabilities/settings.d.ts +1 -1
  100. package/dist/types/src/compiler/compiler.d.ts.map +1 -1
  101. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts +2 -2
  102. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
  103. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +225 -13
  104. package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
  105. package/dist/types/src/components/DeploymentDialog/index.d.ts +1 -1
  106. package/dist/types/src/components/DeploymentDialog/index.d.ts.map +1 -1
  107. package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
  108. package/dist/types/src/components/NotebookContainer.d.ts +10 -0
  109. package/dist/types/src/components/NotebookContainer.d.ts.map +1 -0
  110. package/dist/types/src/components/NotebookContainer.stories.d.ts +231 -0
  111. package/dist/types/src/components/NotebookContainer.stories.d.ts.map +1 -0
  112. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +16 -0
  113. package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -0
  114. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +231 -0
  115. package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -0
  116. package/dist/types/src/components/NotebookStack/index.d.ts +2 -0
  117. package/dist/types/src/components/NotebookStack/index.d.ts.map +1 -0
  118. package/dist/types/src/components/ScriptContainer.d.ts +2 -2
  119. package/dist/types/src/components/ScriptContainer.d.ts.map +1 -1
  120. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
  121. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +227 -10
  122. package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
  123. package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +1 -1
  124. package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +2 -2
  125. package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +1 -1
  126. package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +1 -1
  127. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +4 -2
  128. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
  129. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +17 -4
  130. package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
  131. package/dist/types/src/components/index.d.ts +3 -4
  132. package/dist/types/src/components/index.d.ts.map +1 -1
  133. package/dist/types/src/events.d.ts.map +1 -1
  134. package/dist/types/src/hooks/deploy.d.ts +11 -10
  135. package/dist/types/src/hooks/deploy.d.ts.map +1 -1
  136. package/dist/types/src/hooks/template.d.ts.map +1 -1
  137. package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
  138. package/dist/types/src/index.d.ts +1 -0
  139. package/dist/types/src/index.d.ts.map +1 -1
  140. package/dist/types/src/meta.d.ts +0 -1
  141. package/dist/types/src/meta.d.ts.map +1 -1
  142. package/dist/types/src/notebook/index.d.ts +2 -0
  143. package/dist/types/src/notebook/index.d.ts.map +1 -0
  144. package/dist/types/src/notebook/notebook.d.ts +39 -0
  145. package/dist/types/src/notebook/notebook.d.ts.map +1 -0
  146. package/dist/types/src/notebook/notebook.test.d.ts +2 -0
  147. package/dist/types/src/notebook/notebook.test.d.ts.map +1 -0
  148. package/dist/types/src/notebook/vfs-parser.d.ts +74 -0
  149. package/dist/types/src/notebook/vfs-parser.d.ts.map +1 -0
  150. package/dist/types/src/notebook/vfs-parser.test.d.ts +2 -0
  151. package/dist/types/src/notebook/vfs-parser.test.d.ts.map +1 -0
  152. package/dist/types/src/templates/chess.d.ts.map +1 -1
  153. package/dist/types/src/templates/data-generator.d.ts.map +1 -1
  154. package/dist/types/src/templates/discord.d.ts.map +1 -1
  155. package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
  156. package/dist/types/src/templates/forex.d.ts.map +1 -1
  157. package/dist/types/src/templates/gmail.d.ts.map +1 -1
  158. package/dist/types/src/testing/data.d.ts +10 -0
  159. package/dist/types/src/testing/data.d.ts.map +1 -0
  160. package/dist/types/src/testing/index.d.ts +2 -0
  161. package/dist/types/src/testing/index.d.ts.map +1 -0
  162. package/dist/types/src/translations.d.ts +21 -2
  163. package/dist/types/src/translations.d.ts.map +1 -1
  164. package/dist/types/src/types/actions.d.ts +58 -0
  165. package/dist/types/src/types/actions.d.ts.map +1 -0
  166. package/dist/types/src/types/index.d.ts +1 -0
  167. package/dist/types/src/types/index.d.ts.map +1 -1
  168. package/dist/types/src/types/schema.d.ts +29 -32
  169. package/dist/types/src/types/schema.d.ts.map +1 -1
  170. package/dist/types/src/util/deploy.d.ts +3 -3
  171. package/dist/types/src/util/deploy.d.ts.map +1 -1
  172. package/dist/types/src/util/functions.d.ts +5 -2
  173. package/dist/types/src/util/functions.d.ts.map +1 -1
  174. package/dist/types/tsconfig.tsbuildinfo +1 -1
  175. package/package.json +73 -69
  176. package/src/ScriptPlugin.tsx +91 -69
  177. package/src/capabilities/app-graph-builder.ts +6 -5
  178. package/src/capabilities/artifact-definition.ts +8 -12
  179. package/src/capabilities/blueprint-definition.ts +30 -0
  180. package/src/capabilities/compiler.ts +2 -1
  181. package/src/capabilities/index.ts +1 -1
  182. package/src/capabilities/intent-resolver.ts +15 -8
  183. package/src/capabilities/react-surface.tsx +20 -7
  184. package/src/capabilities/settings.ts +3 -3
  185. package/src/compiler/compiler.ts +1 -1
  186. package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +34 -20
  187. package/src/components/DeploymentDialog/DeploymentDialog.tsx +16 -22
  188. package/src/components/DeploymentDialog/index.ts +1 -1
  189. package/src/components/FrameContainer/FrameContainer.tsx +3 -2
  190. package/src/components/NotebookContainer.stories.tsx +36 -0
  191. package/src/components/NotebookContainer.tsx +82 -0
  192. package/src/components/NotebookStack/NotebookStack.stories.tsx +36 -0
  193. package/src/components/NotebookStack/NotebookStack.tsx +113 -0
  194. package/src/components/NotebookStack/index.ts +5 -0
  195. package/src/components/ScriptContainer.tsx +4 -3
  196. package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +33 -17
  197. package/src/components/ScriptToolbar/ScriptToolbar.tsx +30 -23
  198. package/src/components/Settings/ScriptObjectSettings.tsx +111 -31
  199. package/src/components/Settings/ScriptPluginSettings.tsx +37 -47
  200. package/src/components/TestPanel/TestContainer.tsx +2 -1
  201. package/src/components/TestPanel/TestPanel.tsx +6 -6
  202. package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +84 -30
  203. package/src/components/TypescriptEditor/TypescriptEditor.tsx +32 -25
  204. package/src/components/index.ts +3 -0
  205. package/src/events.ts +2 -2
  206. package/src/hooks/deploy.ts +18 -19
  207. package/src/hooks/format.ts +2 -2
  208. package/src/hooks/template.ts +4 -3
  209. package/src/hooks/useCreateAndDeployScriptTemplates.ts +4 -3
  210. package/src/index.ts +1 -0
  211. package/src/meta.ts +2 -4
  212. package/src/notebook/index.ts +5 -0
  213. package/src/notebook/notebook.test.ts +38 -0
  214. package/src/notebook/notebook.ts +188 -0
  215. package/src/notebook/vfs-parser.test.ts +149 -0
  216. package/src/notebook/vfs-parser.ts +490 -0
  217. package/src/templates/chess.ts +3 -1
  218. package/src/templates/data-generator.ts +9 -3
  219. package/src/templates/discord.ts +12 -4
  220. package/src/templates/forex-effect.ts +7 -3
  221. package/src/templates/forex.ts +3 -1
  222. package/src/templates/gmail.ts +33 -62
  223. package/src/testing/data.ts +37 -0
  224. package/src/testing/index.ts +5 -0
  225. package/src/translations.ts +24 -4
  226. package/src/types/actions.ts +49 -0
  227. package/src/types/index.ts +1 -0
  228. package/src/types/schema.ts +24 -19
  229. package/src/util/deploy.ts +20 -33
  230. package/src/util/functions.ts +35 -6
  231. package/dist/lib/browser/DeploymentDialog-M4QIHTDR.mjs +0 -12
  232. package/dist/lib/browser/ScriptContainer-Z6SIGRRC.mjs +0 -262
  233. package/dist/lib/browser/ScriptContainer-Z6SIGRRC.mjs.map +0 -7
  234. package/dist/lib/browser/app-graph-builder-HLQ7K3BT.mjs.map +0 -7
  235. package/dist/lib/browser/artifact-definition-24Q3IHOU.mjs +0 -249
  236. package/dist/lib/browser/artifact-definition-24Q3IHOU.mjs.map +0 -7
  237. package/dist/lib/browser/chunk-3U6DTUH3.mjs.map +0 -7
  238. package/dist/lib/browser/chunk-FIM2MVNJ.mjs.map +0 -7
  239. package/dist/lib/browser/chunk-FMDXKOP7.mjs.map +0 -7
  240. package/dist/lib/browser/chunk-IS4OG2UW.mjs +0 -39
  241. package/dist/lib/browser/chunk-IS4OG2UW.mjs.map +0 -7
  242. package/dist/lib/browser/chunk-P4HQKUCP.mjs.map +0 -7
  243. package/dist/lib/browser/chunk-QYAREHGH.mjs.map +0 -7
  244. package/dist/lib/browser/chunk-R4R7VOFY.mjs +0 -88
  245. package/dist/lib/browser/chunk-R4R7VOFY.mjs.map +0 -7
  246. package/dist/lib/browser/compiler-CXCUA4UQ.mjs.map +0 -7
  247. package/dist/lib/browser/intent-resolver-7B77IG3N.mjs.map +0 -7
  248. package/dist/lib/browser/react-surface-FYYXZA7C.mjs.map +0 -7
  249. package/dist/lib/browser/settings-KCTBK5TY.mjs.map +0 -7
  250. package/dist/lib/node-esm/ScriptContainer-KPU75HHI.mjs +0 -263
  251. package/dist/lib/node-esm/ScriptContainer-KPU75HHI.mjs.map +0 -7
  252. package/dist/lib/node-esm/app-graph-builder-7EYIHWH4.mjs.map +0 -7
  253. package/dist/lib/node-esm/artifact-definition-WAJFALUI.mjs +0 -250
  254. package/dist/lib/node-esm/artifact-definition-WAJFALUI.mjs.map +0 -7
  255. package/dist/lib/node-esm/chunk-7NMI4CEU.mjs.map +0 -7
  256. package/dist/lib/node-esm/chunk-AHXJ6NQU.mjs.map +0 -7
  257. package/dist/lib/node-esm/chunk-F5GFJ3PY.mjs +0 -90
  258. package/dist/lib/node-esm/chunk-F5GFJ3PY.mjs.map +0 -7
  259. package/dist/lib/node-esm/chunk-JIPFLBYA.mjs +0 -40
  260. package/dist/lib/node-esm/chunk-JIPFLBYA.mjs.map +0 -7
  261. package/dist/lib/node-esm/chunk-QKK3NDHW.mjs.map +0 -7
  262. package/dist/lib/node-esm/chunk-RT43MACC.mjs.map +0 -7
  263. package/dist/lib/node-esm/chunk-XJPK3IYI.mjs.map +0 -7
  264. package/dist/lib/node-esm/compiler-EPFKQXPE.mjs.map +0 -7
  265. package/dist/lib/node-esm/intent-resolver-FRZGS4TB.mjs.map +0 -7
  266. package/dist/lib/node-esm/react-surface-V32NWHKN.mjs.map +0 -7
  267. package/dist/lib/node-esm/settings-DXZ334A3.mjs.map +0 -7
  268. /package/dist/lib/browser/{DeploymentDialog-M4QIHTDR.mjs.map → DeploymentDialog-7FNPALCV.mjs.map} +0 -0
  269. /package/dist/lib/browser/{chunk-5TVBECWH.mjs.map → chunk-OKXN2N7M.mjs.map} +0 -0
  270. /package/dist/lib/node-esm/{DeploymentDialog-3KPRWFE7.mjs.map → DeploymentDialog-AKAGR37W.mjs.map} +0 -0
  271. /package/dist/lib/node-esm/{chunk-35M3CHYE.mjs.map → chunk-NUXZQQ6P.mjs.map} +0 -0
@@ -1,24 +1,24 @@
1
1
  import {
2
- ScriptSettingsSchema
3
- } from "./chunk-IS4OG2UW.mjs";
2
+ ScriptSettings
3
+ } from "./chunk-SWBZUZDX.mjs";
4
4
  import {
5
5
  meta
6
- } from "./chunk-QYAREHGH.mjs";
6
+ } from "./chunk-EZVXV6DA.mjs";
7
7
 
8
8
  // src/capabilities/settings.ts
9
9
  import { Capabilities, contributes } from "@dxos/app-framework";
10
10
  import { live } from "@dxos/live-object";
11
- var settings_default = () => {
12
- const settings = live(ScriptSettingsSchema, {
11
+ var settings_default = (() => {
12
+ const settings = live({
13
13
  editorInputMode: "vscode"
14
14
  });
15
15
  return contributes(Capabilities.Settings, {
16
16
  prefix: meta.id,
17
- schema: ScriptSettingsSchema,
17
+ schema: ScriptSettings,
18
18
  value: settings
19
19
  });
20
- };
20
+ });
21
21
  export {
22
22
  settings_default as default
23
23
  };
24
- //# sourceMappingURL=settings-KCTBK5TY.mjs.map
24
+ //# sourceMappingURL=settings-L3HCZRBP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/settings.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes } from '@dxos/app-framework';\nimport { live } from '@dxos/live-object';\n\nimport { meta } from '../meta';\nimport { ScriptSettings } from '../types';\n\nexport default () => {\n const settings = live<ScriptSettings>({\n editorInputMode: 'vscode',\n });\n\n return contributes(Capabilities.Settings, {\n prefix: meta.id,\n schema: ScriptSettings,\n value: settings,\n });\n};\n"],
5
+ "mappings": ";;;;;;;;AAIA,SAASA,cAAcC,mBAAmB;AAC1C,SAASC,YAAY;AAKrB,IAAA,oBAAe,MAAA;AACb,QAAMC,WAAWC,KAAqB;IACpCC,iBAAiB;EACnB,CAAA;AAEA,SAAOC,YAAYC,aAAaC,UAAU;IACxCC,QAAQC,KAAKC;IACbC,QAAQC;IACRC,OAAOX;EACT,CAAA;AACF;",
6
+ "names": ["Capabilities", "contributes", "live", "settings", "live", "editorInputMode", "contributes", "Capabilities", "Settings", "prefix", "meta", "id", "schema", "ScriptSettings", "value"]
7
+ }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  data_generator_default,
3
3
  templates
4
- } from "../chunk-R4R7VOFY.mjs";
4
+ } from "../chunk-VFJJA4WR.mjs";
5
5
  export {
6
6
  data_generator_default as dataGenerator,
7
7
  templates
@@ -1,10 +1,12 @@
1
1
  import {
2
+ Notebook,
2
3
  ScriptAction,
3
- ScriptSettingsSchema
4
- } from "../chunk-IS4OG2UW.mjs";
5
- import "../chunk-QYAREHGH.mjs";
4
+ ScriptSettings
5
+ } from "../chunk-SWBZUZDX.mjs";
6
+ import "../chunk-EZVXV6DA.mjs";
6
7
  export {
8
+ Notebook,
7
9
  ScriptAction,
8
- ScriptSettingsSchema
10
+ ScriptSettings
9
11
  };
10
12
  //# sourceMappingURL=index.mjs.map
@@ -2,12 +2,12 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  DEPLOYMENT_DIALOG,
4
4
  DeploymentDialog_default
5
- } from "./chunk-QKK3NDHW.mjs";
6
- import "./chunk-XJPK3IYI.mjs";
7
- import "./chunk-JIPFLBYA.mjs";
8
- import "./chunk-AHXJ6NQU.mjs";
5
+ } from "./chunk-5IKGUOMI.mjs";
6
+ import "./chunk-U4CZGISN.mjs";
7
+ import "./chunk-ZF5ULKED.mjs";
8
+ import "./chunk-OG2SIKHE.mjs";
9
9
  export {
10
10
  DEPLOYMENT_DIALOG,
11
11
  DeploymentDialog_default as default
12
12
  };
13
- //# sourceMappingURL=DeploymentDialog-3KPRWFE7.mjs.map
13
+ //# sourceMappingURL=DeploymentDialog-AKAGR37W.mjs.map
@@ -0,0 +1,579 @@
1
+ import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
+ import {
3
+ NotebookStack
4
+ } from "./chunk-C33FKUSC.mjs";
5
+ import "./chunk-VRSDE4CI.mjs";
6
+ import {
7
+ meta
8
+ } from "./chunk-OG2SIKHE.mjs";
9
+
10
+ // src/components/NotebookContainer.tsx
11
+ import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
12
+ import React, { useCallback, useMemo } from "react";
13
+ import { Ref } from "@dxos/echo";
14
+ import { Toolbar, useTranslation } from "@dxos/react-ui";
15
+ import { StackItem } from "@dxos/react-ui-stack";
16
+ import { DataType } from "@dxos/schema";
17
+
18
+ // src/notebook/notebook.ts
19
+ import { signal } from "@preact/signals-core";
20
+ import { log } from "@dxos/log";
21
+
22
+ // src/notebook/vfs-parser.ts
23
+ import { createSystem, createVirtualTypeScriptEnvironment } from "@typescript/vfs";
24
+ import ts from "typescript";
25
+ import { invariant } from "@dxos/invariant";
26
+ import { trim } from "@dxos/util";
27
+ function _define_property(obj, key, value) {
28
+ if (key in obj) {
29
+ Object.defineProperty(obj, key, {
30
+ value,
31
+ enumerable: true,
32
+ configurable: true,
33
+ writable: true
34
+ });
35
+ } else {
36
+ obj[key] = value;
37
+ }
38
+ return obj;
39
+ }
40
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-script/src/notebook/vfs-parser.ts";
41
+ var VirtualTypeScriptParser = class {
42
+ /**
43
+ * Parse a single expression or statement.
44
+ */
45
+ parseExpression(input) {
46
+ invariant(input.trim() !== "", "input must not be empty", {
47
+ F: __dxlog_file,
48
+ L: 46,
49
+ S: this,
50
+ A: [
51
+ "input.trim() !== ''",
52
+ "'input must not be empty'"
53
+ ]
54
+ });
55
+ const files = [
56
+ {
57
+ filename: "/temp.ts",
58
+ content: input
59
+ }
60
+ ];
61
+ const analysis = this.analyzeFiles(files);
62
+ if (analysis.length === 0) {
63
+ const sourcefilename = "/temp.ts";
64
+ const env = this.createEnvironment([
65
+ {
66
+ filename: sourcefilename,
67
+ content: input
68
+ },
69
+ ...systemFiles
70
+ ]);
71
+ const sourceFile = env.getSourceFile(sourcefilename);
72
+ const typeChecker = env.languageService.getProgram()?.getTypeChecker();
73
+ if (sourceFile && typeChecker) {
74
+ const assignmentInfo = this.findAssignmentExpression(sourceFile, typeChecker);
75
+ if (assignmentInfo) {
76
+ return assignmentInfo;
77
+ }
78
+ const references = this.findAllReferences(sourceFile, typeChecker);
79
+ return {
80
+ references
81
+ };
82
+ }
83
+ }
84
+ return analysis[0];
85
+ }
86
+ /**
87
+ * Analyze multiple files with full type information.
88
+ */
89
+ analyzeFiles(files) {
90
+ const env = this.createEnvironment([
91
+ ...files,
92
+ ...systemFiles
93
+ ]);
94
+ const results = [];
95
+ const typeChecker = env.languageService.getProgram()?.getTypeChecker();
96
+ files.forEach((file) => {
97
+ const sourceFile = env.getSourceFile(file.filename);
98
+ if (!sourceFile || !typeChecker) return;
99
+ const fileResults = this.analyzeSourceFile(sourceFile, typeChecker);
100
+ results.push(...fileResults);
101
+ });
102
+ return results;
103
+ }
104
+ /**
105
+ * Analyze a source file with type information.
106
+ */
107
+ analyzeSourceFile(sourceFile, typeChecker) {
108
+ const results = [];
109
+ const visit = (node) => {
110
+ if (ts.isFunctionDeclaration(node) && node.name) {
111
+ const symbol = typeChecker.getSymbolAtLocation(node.name);
112
+ const type = symbol && typeChecker.getTypeOfSymbolAtLocation(symbol, node);
113
+ const signature = type && typeChecker.getSignaturesOfType(type, ts.SignatureKind.Call)[0];
114
+ results.push({
115
+ name: node.name.text,
116
+ type: "function",
117
+ parameters: this.extractParameters(signature, typeChecker),
118
+ returnType: signature ? typeChecker.typeToString(signature.getReturnType()) : "any",
119
+ references: this.findReferences(node, sourceFile, typeChecker)
120
+ });
121
+ } else if (ts.isVariableStatement(node)) {
122
+ node.declarationList.declarations.forEach((declaration) => {
123
+ if (ts.isIdentifier(declaration.name)) {
124
+ const symbol = typeChecker.getSymbolAtLocation(declaration.name);
125
+ const type = symbol && typeChecker.getTypeOfSymbolAtLocation(symbol, declaration);
126
+ let kind = "variable";
127
+ let parameters;
128
+ let returnType;
129
+ let value;
130
+ const typeString = type ? typeChecker.typeToString(type) : "any";
131
+ if (declaration.initializer) {
132
+ if (ts.isArrowFunction(declaration.initializer) || ts.isFunctionExpression(declaration.initializer)) {
133
+ kind = "function";
134
+ const funcType = typeChecker.getTypeAtLocation(declaration.initializer);
135
+ const signature = typeChecker.getSignaturesOfType(funcType, ts.SignatureKind.Call)[0];
136
+ if (signature) {
137
+ parameters = this.extractParameters(signature, typeChecker);
138
+ returnType = typeChecker.typeToString(signature.getReturnType());
139
+ }
140
+ } else {
141
+ if (ts.isNumericLiteral(declaration.initializer)) {
142
+ value = Number(declaration.initializer.text);
143
+ } else if (ts.isStringLiteral(declaration.initializer)) {
144
+ value = declaration.initializer.text;
145
+ }
146
+ }
147
+ }
148
+ const refs = declaration.initializer ? this.findReferences(declaration.initializer, sourceFile, typeChecker) : [];
149
+ results.push({
150
+ name: declaration.name.text,
151
+ type: kind,
152
+ valueType: typeString,
153
+ value,
154
+ parameters,
155
+ returnType,
156
+ references: refs
157
+ });
158
+ }
159
+ });
160
+ } else if (ts.isClassDeclaration(node) && node.name) {
161
+ results.push({
162
+ name: node.name.text,
163
+ type: "class",
164
+ references: this.findReferences(node, sourceFile, typeChecker)
165
+ });
166
+ } else if (ts.isInterfaceDeclaration(node)) {
167
+ results.push({
168
+ name: node.name.text,
169
+ type: "interface",
170
+ references: this.findReferences(node, sourceFile, typeChecker)
171
+ });
172
+ }
173
+ ts.forEachChild(node, visit);
174
+ };
175
+ visit(sourceFile);
176
+ return results;
177
+ }
178
+ /**
179
+ * Extract parameter information from a signature.
180
+ */
181
+ extractParameters(signature, typeChecker) {
182
+ if (!signature) return [];
183
+ return signature.parameters.map((param) => ({
184
+ name: param.getName(),
185
+ type: typeChecker.typeToString(typeChecker.getTypeOfSymbolAtLocation(param, param.valueDeclaration))
186
+ }));
187
+ }
188
+ /**
189
+ * Find all references to variables used in a node.
190
+ */
191
+ findReferences(node, _sourceFile, _typeChecker) {
192
+ const references = /* @__PURE__ */ new Set();
193
+ const localSymbols = /* @__PURE__ */ new Set();
194
+ const collectLocalSymbols = (n) => {
195
+ if (ts.isFunctionDeclaration(n) || ts.isArrowFunction(n) || ts.isFunctionExpression(n)) {
196
+ n.parameters.forEach((param) => {
197
+ if (ts.isIdentifier(param.name)) {
198
+ localSymbols.add(param.name.text);
199
+ }
200
+ });
201
+ }
202
+ if (ts.isVariableDeclaration(n) && ts.isIdentifier(n.name)) {
203
+ localSymbols.add(n.name.text);
204
+ }
205
+ ts.forEachChild(n, collectLocalSymbols);
206
+ };
207
+ collectLocalSymbols(node);
208
+ const findRefs = (n) => {
209
+ if (ts.isIdentifier(n)) {
210
+ if (!localSymbols.has(n.text)) {
211
+ const parent = n.parent;
212
+ const isDeclaration = ts.isVariableDeclaration(parent) && parent.name === n || ts.isFunctionDeclaration(parent) && parent.name === n || ts.isParameter(parent) && parent.name === n;
213
+ if (!isDeclaration && !this.isBuiltIn(n.text)) {
214
+ references.add(n.text);
215
+ }
216
+ }
217
+ }
218
+ ts.forEachChild(n, findRefs);
219
+ };
220
+ findRefs(node);
221
+ return Array.from(references);
222
+ }
223
+ /**
224
+ * Check if a name is a built-in global.
225
+ */
226
+ isBuiltIn(name) {
227
+ return builtIns.has(name);
228
+ }
229
+ /**
230
+ * Find assignment expressions in a source file.
231
+ */
232
+ findAssignmentExpression(sourceFile, typeChecker) {
233
+ let result = null;
234
+ const visit = (node) => {
235
+ if (ts.isExpressionStatement(node) && ts.isBinaryExpression(node.expression)) {
236
+ const expr = node.expression;
237
+ if (expr.operatorToken.kind === ts.SyntaxKind.EqualsToken && ts.isIdentifier(expr.left)) {
238
+ const type = typeChecker.getTypeAtLocation(expr.right);
239
+ const typeString = typeChecker.typeToString(type);
240
+ let value;
241
+ if (ts.isNumericLiteral(expr.right)) {
242
+ value = Number(expr.right.text);
243
+ } else if (ts.isStringLiteral(expr.right)) {
244
+ value = expr.right.text;
245
+ }
246
+ const references = this.findReferences(expr.right, sourceFile, typeChecker);
247
+ result = {
248
+ name: expr.left.text,
249
+ type: "variable",
250
+ valueType: typeString,
251
+ value,
252
+ references
253
+ };
254
+ }
255
+ }
256
+ if (!result) {
257
+ ts.forEachChild(node, visit);
258
+ }
259
+ };
260
+ visit(sourceFile);
261
+ return result;
262
+ }
263
+ /**
264
+ * Find all identifier references in a source file.
265
+ */
266
+ findAllReferences(sourceFile, _typeChecker) {
267
+ const references = /* @__PURE__ */ new Set();
268
+ const visit = (node) => {
269
+ if (ts.isIdentifier(node)) {
270
+ const parent = node.parent;
271
+ const isDeclaration = ts.isVariableDeclaration(parent) && parent.name === node || ts.isFunctionDeclaration(parent) && parent.name === node || ts.isParameter(parent) && parent.name === node;
272
+ const isAssignmentTarget = ts.isBinaryExpression(parent) && parent.operatorToken.kind === ts.SyntaxKind.EqualsToken && parent.left === node;
273
+ if (!isDeclaration && !isAssignmentTarget && !this.isBuiltIn(node.text)) {
274
+ references.add(node.text);
275
+ }
276
+ }
277
+ ts.forEachChild(node, visit);
278
+ };
279
+ visit(sourceFile);
280
+ return Array.from(references);
281
+ }
282
+ createEnvironment(files) {
283
+ const fileMap = /* @__PURE__ */ new Map();
284
+ files.forEach(({ filename, content }) => {
285
+ fileMap.set(filename, content);
286
+ });
287
+ const system = createSystem(fileMap);
288
+ return createVirtualTypeScriptEnvironment(system, files.map(({ filename }) => filename), ts, this.compilerOptions);
289
+ }
290
+ constructor() {
291
+ _define_property(this, "compilerOptions", {
292
+ target: ts.ScriptTarget.ES2020,
293
+ module: ts.ModuleKind.ESNext,
294
+ strict: true,
295
+ esModuleInterop: true,
296
+ skipLibCheck: true,
297
+ forceConsistentCasingInfilenames: true,
298
+ jsx: ts.JsxEmit.React,
299
+ noLib: true
300
+ });
301
+ }
302
+ };
303
+ var builtIns = /* @__PURE__ */ new Set([
304
+ // Types.
305
+ "Array",
306
+ "Date",
307
+ "Error",
308
+ "JSON",
309
+ "Map",
310
+ "Math",
311
+ "Number",
312
+ "Promise",
313
+ "Object",
314
+ "RegExp",
315
+ "Set",
316
+ "String",
317
+ // Functions.
318
+ "console",
319
+ "document",
320
+ "global",
321
+ "isFinite",
322
+ "isNaN",
323
+ "parseFloat",
324
+ "parseInt",
325
+ "process",
326
+ "window"
327
+ ]);
328
+ var systemFiles = [
329
+ {
330
+ filename: "/lib.d.ts",
331
+ content: trim`
332
+ interface Array<T> { length: number; [n: number]: T; }
333
+ interface Boolean {}
334
+ interface Function {}
335
+ interface IArguments {}
336
+ interface Number {}
337
+ interface Object {}
338
+ interface RegExp {}
339
+ interface String { length: number; }
340
+ interface CallableFunction extends Function {}
341
+ interface NewableFunction extends Function {}
342
+ declare var console: { log(...args: any[]): void };
343
+ `
344
+ }
345
+ ];
346
+
347
+ // src/notebook/notebook.ts
348
+ function _define_property2(obj, key, value) {
349
+ if (key in obj) {
350
+ Object.defineProperty(obj, key, {
351
+ value,
352
+ enumerable: true,
353
+ configurable: true,
354
+ writable: true
355
+ });
356
+ } else {
357
+ obj[key] = value;
358
+ }
359
+ return obj;
360
+ }
361
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-script/src/notebook/notebook.ts";
362
+ var ComputeGraph = class {
363
+ /**
364
+ * Parsed expressions by cell ID.
365
+ */
366
+ get expressions() {
367
+ return this._expressions;
368
+ }
369
+ /**
370
+ * Computed values by cell ID.
371
+ */
372
+ get values() {
373
+ return this._values;
374
+ }
375
+ /**
376
+ * Compute values.
377
+ */
378
+ evaluate() {
379
+ const { expressions, dependencyGraph } = this.parse();
380
+ this._values.value = {};
381
+ const cellExpressions = /* @__PURE__ */ new Map();
382
+ Object.entries(expressions).forEach(([id, expr]) => {
383
+ cellExpressions.set(id, expr);
384
+ });
385
+ const evaluationOrder = this.topologicalSort(Object.keys(expressions), dependencyGraph);
386
+ const valuesByName = {};
387
+ const valuesByCellId = {};
388
+ for (const cellId of evaluationOrder) {
389
+ const expr = cellExpressions.get(cellId);
390
+ if (!expr) {
391
+ log.error("no expression for cell", {
392
+ cellId
393
+ }, {
394
+ F: __dxlog_file2,
395
+ L: 63,
396
+ S: this,
397
+ C: (f, a) => f(...a)
398
+ });
399
+ continue;
400
+ }
401
+ const cellSource = this._notebook.cells.find((cell) => cell.id === cellId)?.script.target?.content;
402
+ if (!cellSource) {
403
+ log.error("no source for cell", {
404
+ cellId
405
+ }, {
406
+ F: __dxlog_file2,
407
+ L: 69,
408
+ S: this,
409
+ C: (f, a) => f(...a)
410
+ });
411
+ continue;
412
+ }
413
+ try {
414
+ if (expr.name && expr.value !== void 0) {
415
+ valuesByName[expr.name] = expr.value;
416
+ valuesByCellId[cellId] = expr.value;
417
+ } else if (expr.name) {
418
+ const equalIndex = cellSource.indexOf("=");
419
+ if (equalIndex !== -1) {
420
+ let rhs = cellSource.substring(equalIndex + 1).trim();
421
+ if (rhs.endsWith(";")) {
422
+ rhs = rhs.slice(0, -1).trim();
423
+ }
424
+ const result = this.evalScript(rhs, valuesByName);
425
+ valuesByName[expr.name] = result;
426
+ if (typeof result !== "function") {
427
+ valuesByCellId[cellId] = result;
428
+ }
429
+ }
430
+ } else {
431
+ const result = this.evalScript(cellSource, valuesByName);
432
+ valuesByCellId[cellId] = result;
433
+ }
434
+ } catch (error) {
435
+ log.error("error evaluating cell", {
436
+ cellId,
437
+ error
438
+ }, {
439
+ F: __dxlog_file2,
440
+ L: 104,
441
+ S: this,
442
+ C: (f, a) => f(...a)
443
+ });
444
+ }
445
+ }
446
+ this._values.value = valuesByCellId;
447
+ return valuesByCellId;
448
+ }
449
+ /**
450
+ * Parse expressions.
451
+ */
452
+ parse() {
453
+ const expressions = this._notebook.cells.reduce((acc, cell) => {
454
+ const text = cell.script.target?.content.trim();
455
+ if (text) {
456
+ const parsed = this._parser.parseExpression(text);
457
+ acc[cell.id] = parsed;
458
+ }
459
+ return acc;
460
+ }, {});
461
+ const dependencyGraph = this.buildDependencyGraph(expressions);
462
+ this._expressions.value = expressions;
463
+ return {
464
+ expressions,
465
+ dependencyGraph
466
+ };
467
+ }
468
+ topologicalSort(nodes, dependencies) {
469
+ const visited = /* @__PURE__ */ new Set();
470
+ const result = [];
471
+ const visit = (node) => {
472
+ if (visited.has(node)) {
473
+ return;
474
+ }
475
+ visited.add(node);
476
+ const deps = dependencies[node] || [];
477
+ deps.forEach((dep) => visit(dep));
478
+ result.push(node);
479
+ };
480
+ nodes.forEach((node) => visit(node));
481
+ return result;
482
+ }
483
+ buildDependencyGraph(expressions) {
484
+ const nameToCellId = /* @__PURE__ */ new Map();
485
+ Object.entries(expressions).forEach(([id, expr]) => {
486
+ if (expr.name) {
487
+ nameToCellId.set(expr.name, id);
488
+ }
489
+ });
490
+ const graph = {};
491
+ Object.entries(expressions).forEach(([id, expr]) => {
492
+ if (expr.references && expr.references.length > 0) {
493
+ const dependencyCellIds = expr.references.map((ref) => nameToCellId.get(ref)).filter((cellId) => cellId !== void 0 && cellId !== id);
494
+ if (dependencyCellIds.length > 0) {
495
+ graph[id] = dependencyCellIds;
496
+ }
497
+ }
498
+ });
499
+ return graph;
500
+ }
501
+ /**
502
+ * Evaluate the script (with dependencies as arguments).
503
+ */
504
+ evalScript(code, deps = {}) {
505
+ return new Function(...Object.keys(deps), "return " + code)(...Object.values(deps));
506
+ }
507
+ constructor(_notebook) {
508
+ _define_property2(this, "_notebook", void 0);
509
+ _define_property2(this, "_parser", void 0);
510
+ _define_property2(this, "_expressions", void 0);
511
+ _define_property2(this, "_values", void 0);
512
+ this._notebook = _notebook;
513
+ this._parser = new VirtualTypeScriptParser();
514
+ this._expressions = signal({});
515
+ this._values = signal({});
516
+ }
517
+ };
518
+
519
+ // src/components/NotebookContainer.tsx
520
+ var NotebookContainer = ({ notebook, env }) => {
521
+ var _effect = _useSignals();
522
+ try {
523
+ const { t } = useTranslation(meta.id);
524
+ const graph = useMemo(() => notebook && new ComputeGraph(notebook), [
525
+ notebook
526
+ ]);
527
+ const handleCompute = useCallback(() => {
528
+ graph?.evaluate();
529
+ }, [
530
+ graph
531
+ ]);
532
+ const handleCellInsert = useCallback((after) => {
533
+ const idx = after ? notebook.cells.findIndex((cell) => cell.id === after) : notebook.cells.length;
534
+ notebook?.cells.splice(idx, 0, {
535
+ id: crypto.randomUUID(),
536
+ script: Ref.make(DataType.makeText("\n\n\n"))
537
+ });
538
+ }, [
539
+ notebook
540
+ ]);
541
+ const handleCellDelete = useCallback((id) => {
542
+ const idx = notebook.cells.findIndex((cell) => cell.id === id);
543
+ if (idx !== -1) {
544
+ notebook.cells.splice(idx, 1);
545
+ }
546
+ }, [
547
+ notebook
548
+ ]);
549
+ return /* @__PURE__ */ React.createElement(StackItem.Content, {
550
+ classNames: "container-max-width border-l border-r border-subduedSeparator",
551
+ toolbar: true
552
+ }, /* @__PURE__ */ React.createElement(Toolbar.Root, null, /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
553
+ icon: "ph--plus--regular",
554
+ iconOnly: true,
555
+ label: t("add cell label"),
556
+ onClick: () => handleCellInsert("")
557
+ }), /* @__PURE__ */ React.createElement(Toolbar.IconButton, {
558
+ icon: "ph--play--fill",
559
+ iconOnly: true,
560
+ label: t("compute label"),
561
+ classNames: "text-green-500",
562
+ onClick: handleCompute
563
+ })), /* @__PURE__ */ React.createElement(NotebookStack, {
564
+ notebook,
565
+ graph,
566
+ env,
567
+ onCellInsert: handleCellInsert,
568
+ onCellDelete: handleCellDelete
569
+ }));
570
+ } finally {
571
+ _effect.f();
572
+ }
573
+ };
574
+ var NotebookContainer_default = NotebookContainer;
575
+ export {
576
+ NotebookContainer,
577
+ NotebookContainer_default as default
578
+ };
579
+ //# sourceMappingURL=NotebookContainer-2O3N3XPE.mjs.map