@dxos/plugin-script 0.8.4-main.66e292d → 0.8.4-main.69d29f4
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/lib/browser/DeploymentDialog-OSL6RMPA.mjs +14 -0
- package/dist/lib/browser/{NotebookContainer-MHY3DXDE.mjs → NotebookContainer-NBAXYESH.mjs} +266 -238
- package/dist/lib/browser/NotebookContainer-NBAXYESH.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-WD33CJMI.mjs +149 -0
- package/dist/lib/browser/ScriptContainer-WD33CJMI.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-7VO7AUI6.mjs +68 -0
- package/dist/lib/browser/app-graph-builder-7VO7AUI6.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-OSOUYI7A.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-OSOUYI7A.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/chunk-BTWHM6FH.mjs +270 -0
- package/dist/lib/browser/chunk-BTWHM6FH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ULJFT73Q.mjs → chunk-C53UJGSU.mjs} +232 -188
- package/dist/lib/browser/chunk-C53UJGSU.mjs.map +7 -0
- package/dist/lib/browser/chunk-F3QKSKSF.mjs +35 -0
- package/dist/lib/browser/chunk-F3QKSKSF.mjs.map +7 -0
- package/dist/lib/browser/chunk-I7CSE6T3.mjs +110 -0
- package/dist/lib/browser/chunk-I7CSE6T3.mjs.map +7 -0
- package/dist/lib/browser/chunk-TWX2NMZN.mjs +137 -0
- package/dist/lib/browser/chunk-TWX2NMZN.mjs.map +7 -0
- package/dist/lib/browser/chunk-UUR4JNNB.mjs +113 -0
- package/dist/lib/browser/chunk-UUR4JNNB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-2G2NA6DQ.mjs → chunk-UX4GHJ5E.mjs} +28 -11
- package/dist/lib/browser/chunk-UX4GHJ5E.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EB6AXFXO.mjs → chunk-WYR4QHPE.mjs} +1 -1
- package/dist/lib/browser/chunk-WYR4QHPE.mjs.map +7 -0
- package/dist/lib/browser/chunk-XCN4D3Z5.mjs +606 -0
- package/dist/lib/browser/chunk-XCN4D3Z5.mjs.map +7 -0
- package/dist/lib/browser/compiler-76F3QAXC.mjs +161 -0
- package/dist/lib/browser/compiler-76F3QAXC.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +92 -116
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-HUILPPKT.mjs +82 -0
- package/dist/lib/browser/operation-resolver-HUILPPKT.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-R245YN52.mjs → react-surface-O6GKHB2J.mjs} +53 -42
- package/dist/lib/browser/react-surface-O6GKHB2J.mjs.map +7 -0
- package/dist/lib/browser/settings-3ENI25PI.mjs +35 -0
- package/dist/lib/browser/settings-3ENI25PI.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +9 -5
- package/dist/lib/node-esm/{DeploymentDialog-2ULNOZQH.mjs → DeploymentDialog-OGBJPVIX.mjs} +6 -6
- package/dist/lib/node-esm/DeploymentDialog-OGBJPVIX.mjs.map +7 -0
- package/dist/lib/node-esm/{NotebookContainer-U4C2HQ4T.mjs → NotebookContainer-IUAYVJSD.mjs} +266 -238
- package/dist/lib/node-esm/NotebookContainer-IUAYVJSD.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-K7JCEU5Z.mjs +150 -0
- package/dist/lib/node-esm/ScriptContainer-K7JCEU5Z.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-NVE3EVBG.mjs +69 -0
- package/dist/lib/node-esm/app-graph-builder-NVE3EVBG.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-NC7NNJGI.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-NC7NNJGI.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +9 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-57JA6XL5.mjs → chunk-4F5FJZ36.mjs} +28 -11
- package/dist/lib/node-esm/chunk-4F5FJZ36.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-4QNZMXW6.mjs +607 -0
- package/dist/lib/node-esm/chunk-4QNZMXW6.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-IBV2DR36.mjs → chunk-5HSJPAK7.mjs} +1 -1
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-VJSRZRLI.mjs → chunk-BX5PP6AW.mjs} +232 -188
- package/dist/lib/node-esm/chunk-BX5PP6AW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-G3J76DWP.mjs +114 -0
- package/dist/lib/node-esm/chunk-G3J76DWP.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs +112 -0
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VQPIA4VF.mjs +138 -0
- package/dist/lib/node-esm/chunk-VQPIA4VF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-VWOLKNMO.mjs +271 -0
- package/dist/lib/node-esm/chunk-VWOLKNMO.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs +36 -0
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs.map +7 -0
- package/dist/lib/node-esm/compiler-FNZH6TFN.mjs +162 -0
- package/dist/lib/node-esm/compiler-FNZH6TFN.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +92 -116
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-JTCIY6HU.mjs +83 -0
- package/dist/lib/node-esm/operation-resolver-JTCIY6HU.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-MHT3PJ6C.mjs → react-surface-RLANMVMB.mjs} +53 -42
- package/dist/lib/node-esm/react-surface-RLANMVMB.mjs.map +7 -0
- package/dist/lib/node-esm/settings-7AYC5VXN.mjs +36 -0
- package/dist/lib/node-esm/settings-7AYC5VXN.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +1 -1
- package/dist/lib/node-esm/types/index.mjs +9 -5
- package/dist/types/src/ScriptPlugin.d.ts +2 -1
- package/dist/types/src/ScriptPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts +22 -0
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +12 -0
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/artifact-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +9 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler/compiler.d.ts +6 -0
- package/dist/types/src/capabilities/compiler/compiler.d.ts.map +1 -0
- package/dist/types/src/capabilities/compiler/index.d.ts +3 -0
- package/dist/types/src/capabilities/compiler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -7
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/index.d.ts +7 -0
- package/dist/types/src/capabilities/settings/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings/settings.d.ts +9 -0
- package/dist/types/src/capabilities/settings/settings.d.ts.map +1 -0
- package/dist/types/src/compiler/compiler.d.ts +1 -1
- package/dist/types/src/compiler/compiler.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.d.ts.map +1 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +1 -3
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookContainer.d.ts +3 -5
- package/dist/types/src/components/NotebookContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts +3 -250
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +3 -3
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts +2 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts +5 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts +13 -0
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -0
- package/dist/types/src/components/QueryEditor/index.d.ts +2 -0
- package/dist/types/src/components/QueryEditor/index.d.ts.map +1 -0
- package/dist/types/src/components/ScriptContainer.d.ts +4 -5
- package/dist/types/src/components/ScriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +2 -2
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +2 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +1 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +4 -2
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts +1 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts +3 -2
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.d.ts.map +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts +1 -1
- package/dist/types/src/components/TypescriptEditor/TypescriptEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +2 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/e2e/ai.test.d.ts +2 -0
- package/dist/types/src/e2e/ai.test.d.ts.map +1 -0
- package/dist/types/src/e2e/deploy.test.d.ts +2 -0
- package/dist/types/src/e2e/deploy.test.d.ts.map +1 -0
- package/dist/types/src/hooks/deploy.d.ts +9 -26
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +2 -2
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +2 -2
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/hooks/useCompiler.d.ts +7 -0
- package/dist/types/src/hooks/useCompiler.d.ts.map +1 -0
- package/dist/types/src/hooks/useCreateAndDeployScriptTemplates.d.ts.map +1 -1
- package/dist/types/src/hooks/useToolbarState.d.ts +8 -1
- package/dist/types/src/hooks/useToolbarState.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/notebook/compute-graph.d.ts +24 -11
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -1
- package/dist/types/src/templates/anthropic.d.ts +8 -0
- package/dist/types/src/templates/anthropic.d.ts.map +1 -0
- package/dist/types/src/templates/chess-bot.d.ts +16 -0
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -0
- package/dist/types/src/templates/commentary.d.ts +16 -0
- package/dist/types/src/templates/commentary.d.ts.map +1 -0
- package/dist/types/src/templates/forex-effect.d.ts +4 -1
- package/dist/types/src/templates/forex-effect.d.ts.map +1 -1
- package/dist/types/src/templates/forex.d.ts +4 -1
- package/dist/types/src/templates/forex.d.ts.map +1 -1
- package/dist/types/src/templates/index.d.ts +12 -3
- package/dist/types/src/templates/index.d.ts.map +1 -1
- package/dist/types/src/templates/ping.d.ts +1 -4
- package/dist/types/src/templates/ping.d.ts.map +1 -1
- package/dist/types/src/testing/simulator.test.d.ts +2 -0
- package/dist/types/src/testing/simulator.test.d.ts.map +1 -0
- package/dist/types/src/types/Notebook.d.ts +88 -19
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/src/types/actions.d.ts +30 -44
- package/dist/types/src/types/actions.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +12 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +113 -88
- package/src/ScriptPlugin.tsx +34 -60
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/script-blueprint.ts +24 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +55 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/{artifact-definition.ts → artifact-definition/artifact-definition.ts} +97 -94
- package/src/capabilities/artifact-definition/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +23 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/compiler/compiler.ts +103 -0
- package/src/capabilities/compiler/index.ts +7 -0
- package/src/capabilities/index.ts +6 -10
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +74 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +118 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +32 -0
- package/src/compiler/compiler.ts +10 -3
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +27 -23
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +22 -42
- package/src/components/FrameContainer/FrameContainer.tsx +4 -2
- package/src/components/NotebookContainer.stories.tsx +23 -19
- package/src/components/NotebookContainer.tsx +51 -40
- package/src/components/NotebookStack/NotebookCell.tsx +16 -15
- package/src/components/NotebookStack/NotebookStack.stories.tsx +19 -18
- package/src/components/NotebookStack/NotebookStack.tsx +4 -4
- package/src/components/QueryEditor/QueryEditor.stories.tsx +100 -0
- package/src/components/QueryEditor/QueryEditor.tsx +47 -0
- package/src/components/QueryEditor/index.ts +5 -0
- package/src/components/ScriptContainer.tsx +46 -32
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +38 -15
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +14 -17
- package/src/components/Settings/ScriptObjectSettings.tsx +40 -29
- package/src/components/Settings/ScriptPluginSettings.tsx +8 -3
- package/src/components/TestPanel/TestContainer.tsx +5 -5
- package/src/components/TestPanel/TestPanel.tsx +1 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +12 -7
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +69 -68
- package/src/e2e/ai.test.ts +92 -0
- package/src/e2e/deploy.test.ts +64 -0
- package/src/hooks/deploy.ts +33 -26
- package/src/hooks/format.ts +5 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/template.ts +15 -9
- package/src/hooks/useCompiler.ts +24 -0
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +13 -19
- package/src/hooks/useToolbarState.ts +29 -5
- package/src/index.ts +1 -1
- package/src/meta.ts +2 -2
- package/src/notebook/compute-graph.test.ts +20 -8
- package/src/notebook/compute-graph.ts +45 -21
- package/src/templates/anthropic.ts +42 -0
- package/src/templates/chess-bot.ts +58 -0
- package/src/templates/commentary.ts +232 -0
- package/src/templates/data-generator.ts +1 -1
- package/src/templates/forex-effect.ts +22 -27
- package/src/templates/forex.ts +7 -6
- package/src/templates/index.ts +18 -5
- package/src/templates/ping.ts +14 -5
- package/src/testing/simulator.test.ts +40 -0
- package/src/types/Notebook.ts +7 -8
- package/src/types/actions.ts +17 -25
- package/src/types/capabilities.ts +17 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +2 -0
- package/src/types/types.ts +1 -1
- package/src/util/deploy.ts +19 -25
- package/src/util/functions.ts +24 -22
- package/src/vite-env.d.ts +2 -0
- package/dist/lib/browser/DeploymentDialog-5TKNGPVR.mjs +0 -14
- package/dist/lib/browser/NotebookContainer-MHY3DXDE.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-CW6YN3DQ.mjs +0 -148
- package/dist/lib/browser/ScriptContainer-CW6YN3DQ.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs +0 -66
- package/dist/lib/browser/app-graph-builder-2WR2ATTJ.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs +0 -30
- package/dist/lib/browser/blueprint-definition-6PZWZM2Y.mjs.map +0 -7
- package/dist/lib/browser/chunk-2G2NA6DQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-ALS6X4HU.mjs +0 -304
- package/dist/lib/browser/chunk-ALS6X4HU.mjs.map +0 -7
- package/dist/lib/browser/chunk-EB6AXFXO.mjs.map +0 -7
- package/dist/lib/browser/chunk-M6KJPUJK.mjs +0 -111
- package/dist/lib/browser/chunk-M6KJPUJK.mjs.map +0 -7
- package/dist/lib/browser/chunk-N5EYLQOT.mjs +0 -647
- package/dist/lib/browser/chunk-N5EYLQOT.mjs.map +0 -7
- package/dist/lib/browser/chunk-QIZ3BPRK.mjs +0 -103
- package/dist/lib/browser/chunk-QIZ3BPRK.mjs.map +0 -7
- package/dist/lib/browser/chunk-SAN5Y7FI.mjs +0 -155
- package/dist/lib/browser/chunk-SAN5Y7FI.mjs.map +0 -7
- package/dist/lib/browser/chunk-ULJFT73Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-UOQ6NCH3.mjs +0 -15
- package/dist/lib/browser/chunk-UOQ6NCH3.mjs.map +0 -7
- package/dist/lib/browser/compiler-4KHRSX7J.mjs +0 -86
- package/dist/lib/browser/compiler-4KHRSX7J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-TXTBWOVD.mjs +0 -104
- package/dist/lib/browser/intent-resolver-TXTBWOVD.mjs.map +0 -7
- package/dist/lib/browser/react-surface-R245YN52.mjs.map +0 -7
- package/dist/lib/browser/settings-MHJXRGDF.mjs +0 -26
- package/dist/lib/browser/settings-MHJXRGDF.mjs.map +0 -7
- package/dist/lib/node-esm/NotebookContainer-U4C2HQ4T.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-VRPEKB4T.mjs +0 -149
- package/dist/lib/node-esm/ScriptContainer-VRPEKB4T.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs +0 -67
- package/dist/lib/node-esm/app-graph-builder-NCVLUL5R.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs +0 -31
- package/dist/lib/node-esm/blueprint-definition-5R6YCSZZ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-55JZVM6K.mjs +0 -16
- package/dist/lib/node-esm/chunk-55JZVM6K.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-57JA6XL5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs +0 -113
- package/dist/lib/node-esm/chunk-HDKR5WCD.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-IBV2DR36.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ND4BPYPR.mjs +0 -156
- package/dist/lib/node-esm/chunk-ND4BPYPR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UEVZP5DN.mjs +0 -648
- package/dist/lib/node-esm/chunk-UEVZP5DN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VJSRZRLI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VTRMJSQL.mjs +0 -305
- package/dist/lib/node-esm/chunk-VTRMJSQL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XYKKDWUR.mjs +0 -104
- package/dist/lib/node-esm/chunk-XYKKDWUR.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs +0 -87
- package/dist/lib/node-esm/compiler-DU5NQISX.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-D6AVAQRA.mjs +0 -105
- package/dist/lib/node-esm/intent-resolver-D6AVAQRA.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-MHT3PJ6C.mjs.map +0 -7
- package/dist/lib/node-esm/settings-BVJORMMJ.mjs +0 -27
- package/dist/lib/node-esm/settings-BVJORMMJ.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/artifact-definition.d.ts +0 -11
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/compiler.d.ts +0 -4
- package/dist/types/src/capabilities/compiler.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/templates/chess.d.ts +0 -3
- package/dist/types/src/templates/chess.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -65
- package/src/capabilities/blueprint-definition.ts +0 -30
- package/src/capabilities/capabilities.ts +0 -12
- package/src/capabilities/compiler.ts +0 -34
- package/src/capabilities/intent-resolver.ts +0 -86
- package/src/capabilities/react-surface.tsx +0 -103
- package/src/capabilities/settings.ts +0 -21
- package/src/events.ts +0 -11
- package/src/templates/chess.ts +0 -49
- /package/dist/lib/browser/{DeploymentDialog-5TKNGPVR.mjs.map → DeploymentDialog-OSL6RMPA.mjs.map} +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-2ULNOZQH.mjs.map → browser/blueprints/index.mjs.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/util/deploy.ts", "../../../src/util/functions.ts", "../../../src/hooks/deploy.ts", "../../../src/hooks/useToolbarState.ts", "../../../src/hooks/useCompiler.ts", "../../../src/hooks/format.ts", "../../../src/hooks/template.ts", "../../../src/hooks/useCreateAndDeployScriptTemplates.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Client } from '@dxos/client';\nimport { Obj, Ref } from '@dxos/echo';\nimport { Function, type Script, getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { bundleFunction } from '@dxos/functions-runtime/bundler';\nimport { FunctionsServiceClient, incrementSemverPatch } from '@dxos/functions-runtime/edge';\nimport { log } from '@dxos/log';\nimport { FunctionRuntimeKind } from '@dxos/protocols';\nimport { type Space } from '@dxos/react-client/echo';\n\nexport const isScriptDeployed = ({ script, fn }: { script: Script.Script; fn: any }): boolean => {\n const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));\n return Boolean(existingFunctionId) && !script.changed;\n};\n\ntype DeployScriptProps = {\n script: Script.Script;\n client: Client;\n space: Space;\n fn?: Function.Function;\n existingFunctionId?: string;\n};\n\ntype DeployScriptResult = { success: boolean; error?: Error; functionId?: string };\n\n/**\n * Deploy a script to a space, handling bundling and uploading to the FaaS infrastructure.\n */\nexport const deployScript = async ({\n script,\n client,\n space,\n fn,\n existingFunctionId,\n}: DeployScriptProps): Promise<DeployScriptResult> => {\n const validationError = validateDeployInputs(script, space);\n if (validationError) {\n return { success: false, error: validationError };\n }\n\n try {\n const buildResult = await bundleFunction({\n source: script.source!.target!.content,\n });\n if ('error' in buildResult) {\n throw buildResult.error || new Error('Bundle creation failed');\n }\n\n const functionsServiceClient = FunctionsServiceClient.fromClient(client);\n const newFunction = await functionsServiceClient.deploy({\n // TODO(dmaretskyi): Space key or identity key.\n ownerPublicKey: space.key,\n version: fn ? incrementSemverPatch(fn.version) : '0.0.1',\n functionId: existingFunctionId,\n entryPoint: buildResult.entryPoint,\n assets: buildResult.assets,\n runtime: FunctionRuntimeKind.enums.WORKER_LOADER,\n });\n\n const storedFunction = createOrUpdateFunctionInSpace(space, fn, script, newFunction);\n Obj.change(script, (s) => {\n s.changed = false;\n });\n\n return { success: true, functionId: getUserFunctionIdInMetadata(Obj.getMeta(storedFunction)) };\n } catch (err: any) {\n log.catch(err);\n return { success: false, error: err };\n }\n};\n\n/**\n * Validate inputs for script deployment.\n */\nconst validateDeployInputs = (script: Script.Script, space: Space): Error | null => {\n if (!script.source || !space) {\n return new Error('Script source or space not available');\n }\n return null;\n};\n\nconst createOrUpdateFunctionInSpace = (\n space: Space,\n fn: Function.Function | undefined,\n script: Script.Script,\n newFunction: Function.Function,\n): Function.Function => {\n if (fn) {\n Function.setFrom(fn, newFunction);\n return fn;\n } else {\n Obj.change(newFunction, (f) => {\n f.source = Ref.make(script);\n });\n return space.db.add(newFunction);\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Obj } from '@dxos/echo';\nimport { type Function, type Script, getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { getInvocationUrl } from '@dxos/functions-runtime';\nimport { type PublicKey } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type Credential } from '@dxos/protocols/proto/dxos/halo/credentials';\nimport { getSpace } from '@dxos/react-client/echo';\n/**\n * Get the function URL for a given script and client configuration\n */\nexport const getFunctionUrl = ({\n script,\n fn,\n edgeUrl,\n}: {\n script: Script.Script;\n fn: any;\n edgeUrl: string;\n}): string | undefined => {\n const space = getSpace(script);\n const existingFunctionId = fn && getUserFunctionIdInMetadata(Obj.getMeta(fn));\n\n if (!existingFunctionId) {\n return undefined;\n }\n\n return getInvocationUrl(existingFunctionId, edgeUrl, {\n spaceId: space?.id,\n });\n};\n\nexport const updateFunctionMetadata = (\n script: Script.Script,\n storedFunction: Function.Function,\n meta: any,\n functionId: string,\n) => {\n Obj.change(storedFunction, (f) => {\n if (script.description !== undefined && script.description.trim() !== '') {\n f.description = script.description;\n } else if (meta.description) {\n f.description = meta.description;\n } else {\n log.verbose('no description in function metadata', { functionId });\n }\n\n if (meta.inputSchema) {\n f.inputSchema = meta.inputSchema;\n } else {\n log.verbose('no input schema in function metadata', { functionId });\n }\n\n if (meta.outputSchema) {\n f.outputSchema = meta.outputSchema;\n } else {\n log.verbose('no output schema in function metadata', { functionId });\n }\n\n if (meta.key) {\n f.key = meta.key;\n } else {\n log.verbose('no key in function metadata', { functionId });\n }\n });\n};\n\nexport const getAccessCredential = (identityKey: PublicKey): Credential => {\n return {\n issuer: identityKey,\n issuanceDate: new Date(),\n subject: {\n id: identityKey,\n assertion: {\n '@type': 'dxos.halo.credentials.ServiceAccess',\n serverName: 'hub.dxos.network',\n serverKey: identityKey,\n identityKey,\n capabilities: ['composer:beta'],\n },\n },\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo } from 'react';\n\nimport { Obj, Query, Ref } from '@dxos/echo';\nimport { Function, type Script, getUserFunctionIdInMetadata } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { type Space, getSpace, useQuery } from '@dxos/react-client/echo';\nimport { type TFunction } from '@dxos/react-ui';\nimport { createMenuAction } from '@dxos/react-ui-menu';\nimport { errorMessageColors } from '@dxos/ui-theme';\n\nimport { meta } from '../meta';\nimport { deployScript, getFunctionUrl, isScriptDeployed } from '../util';\n\nexport type DeployActionProperties = { type: 'deploy' } | { type: 'copy' };\n\nexport type DeployState = {\n deploying: boolean;\n deployed: boolean;\n functionUrl: string;\n error: string;\n};\n\nimport { type ScriptToolbarStateStore } from './useToolbarState';\n\nexport type CreateDeployOptions = {\n state: ScriptToolbarStateStore;\n script: Script.Script;\n fn: Function.Function;\n space?: Space;\n existingFunctionId?: string;\n client: Client;\n t: TFunction;\n};\n\nexport const createDeploy = ({ state, script, space, fn, client, existingFunctionId, t }: CreateDeployOptions) => {\n const { value } = state;\n\n // TODO(wittjosiah): Should this be an action?\n const errorItem = createMenuAction('error', () => {}, {\n label: value.error ?? ['no error label', { ns: meta.id }],\n icon: 'ph--warning-circle--regular',\n hidden: !value.error,\n classNames: value.error && errorMessageColors,\n });\n\n const deployAction = createMenuAction<DeployActionProperties>(\n 'deploy',\n async () => {\n if (!script.source || !space) {\n return;\n }\n\n state.set('error', undefined);\n state.set('deploying', true);\n\n const result = await deployScript({ script, client, space, fn, existingFunctionId });\n\n if (!result.success) {\n log.catch(result.error);\n state.set('error', t('upload failed label'));\n }\n\n state.set('deploying', false);\n },\n {\n type: 'deploy',\n label: [value.deploying ? 'publishing label' : 'deploy label', { ns: meta.id }],\n icon: value.deploying ? 'ph--spinner-gap--regular' : 'ph--cloud-arrow-up--regular',\n disabled: value.deploying,\n classNames: value.deploying ? '[&_svg]:animate-spin' : '',\n },\n );\n\n const copyAction = createMenuAction<DeployActionProperties>(\n 'copy',\n async () => {\n if (value.functionUrl) {\n await navigator.clipboard.writeText(value.functionUrl);\n }\n },\n {\n type: 'copy',\n label: ['copy link label', { ns: meta.id }],\n icon: 'ph--link--regular',\n disabled: !value.functionUrl,\n },\n );\n\n return {\n nodes: [errorItem, deployAction, copyAction],\n edges: [\n { source: 'root', target: 'error' },\n { source: 'root', target: 'deploy' },\n { source: 'root', target: 'copy' },\n ],\n };\n};\n\nexport const useDeployState = ({ state, script }: { state: ScriptToolbarStateStore; script: Script.Script }) => {\n const { space, client, fn, existingFunctionId } = useDeployDeps({ script });\n useEffect(() => {\n if (!existingFunctionId) {\n return;\n }\n\n state.set(\n 'functionUrl',\n getFunctionUrl({\n script,\n fn,\n edgeUrl: client.config.values.runtime?.services?.edge?.url ?? '',\n }),\n );\n }, [existingFunctionId, space, fn, script, client.config.values.runtime?.services?.edge?.url, state]);\n\n useEffect(() => {\n state.set('deployed', isScriptDeployed({ script, fn }));\n }, [script.changed, existingFunctionId, fn, script, state]);\n};\n\nexport const useDeployDeps = ({ script }: { script: Script.Script }) => {\n const client = useClient();\n const space = getSpace(script);\n const [fn] = useQuery(space?.db, Query.type(Function.Function, { source: Ref.make(script) }));\n const existingFunctionId = useMemo(() => fn && getUserFunctionIdInMetadata(Obj.getMeta(fn)), [fn]);\n return { client, space, fn, existingFunctionId };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom, RegistryContext, useAtomValue } from '@effect-atom/atom-react';\nimport { useContext, useMemo } from 'react';\n\nimport { type DeployState } from './deploy';\n\nexport type ScriptToolbarState = Partial<DeployState>;\n\nexport type ScriptToolbarStateStore = {\n atom: Atom.Writable<ScriptToolbarState>;\n get value(): ScriptToolbarState;\n update: (updater: (current: ScriptToolbarState) => ScriptToolbarState) => void;\n set: <K extends keyof ScriptToolbarState>(key: K, value: ScriptToolbarState[K]) => void;\n};\n\n// TODO(burdon): Replace with context provider?\nexport const useToolbarState = (initialState: ScriptToolbarState = {}): ScriptToolbarStateStore => {\n const registry = useContext(RegistryContext);\n const atom = useMemo(() => Atom.make<ScriptToolbarState>(initialState), []);\n const value = useAtomValue(atom);\n\n return useMemo(\n () => ({\n atom,\n get value() {\n return registry.get(atom);\n },\n update: (updater: (current: ScriptToolbarState) => ScriptToolbarState) => {\n registry.set(atom, updater(registry.get(atom)));\n },\n set: <K extends keyof ScriptToolbarState>(key: K, v: ScriptToolbarState[K]) => {\n registry.set(atom, { ...registry.get(atom), [key]: v });\n },\n }),\n [atom, registry, value],\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCapabilities, usePluginManager } from '@dxos/app-framework/react';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { useAsyncEffect } from '@dxos/react-ui';\n\nimport type { Compiler } from '../compiler';\nimport { ScriptEvents } from '../types';\nimport { ScriptCapabilities } from '../types';\n\n/**\n * Asynchronously sets up the compiler and returns it.\n * @returns The compiler instance or undefined if it is not ready.\n */\nexport const useCompiler = (): Compiler | undefined => {\n const manager = usePluginManager();\n useAsyncEffect(async () => {\n await manager.activate(ScriptEvents.SetupCompiler).pipe(runAndForwardErrors);\n }, [manager]);\n const [compiler] = useCapabilities(ScriptCapabilities.Compiler);\n return compiler;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { format } from 'prettier';\nimport prettierPluginEstree from 'prettier/plugins/estree';\nimport prettierPluginTypescript from 'prettier/plugins/typescript';\n\nimport { Obj } from '@dxos/echo';\nimport { type Script } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { createMenuAction } from '@dxos/react-ui-menu';\n\nimport { meta } from '../meta';\n\nexport type FormatActionProperties = { type: 'format' };\n\nexport const createFormat = (script: Script.Script) => {\n const formatAction = createMenuAction(\n 'format',\n async () => {\n if (!script.source) {\n return;\n }\n\n try {\n const formatted = await format(script.source.target!.content, {\n parser: 'typescript',\n plugins: [prettierPluginEstree, prettierPluginTypescript],\n semi: true,\n singleQuote: true,\n });\n Obj.change(script.source.target!, (s) => {\n s.content = formatted;\n });\n } catch (err: any) {\n // TODO(wittjosiah): Show error in UI.\n log.catch(err);\n }\n },\n {\n label: ['format label', { ns: meta.id }],\n icon: 'ph--magic-wand--regular',\n },\n );\n\n return {\n nodes: [formatAction],\n edges: [\n {\n source: 'root',\n target: 'format',\n },\n ],\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { Obj } from '@dxos/echo';\nimport { FUNCTIONS_PRESET_META_KEY, type Script } from '@dxos/functions';\nimport { createMenuAction } from '@dxos/react-ui-menu';\n\nimport { templates } from '../templates';\n\nexport type TemplateActionProperties = { type: 'template'; value: string };\n\nconst createTemplateSelectActions = (script: Script.Script) => {\n return templates.map((template) => {\n return createMenuAction<TemplateActionProperties>(\n `template--${template.id}`,\n () => {\n Obj.change(script, (s) => {\n s.name = template.name;\n const meta = Obj.getMeta(s);\n const oldPresetIndex = meta.keys.findIndex((key) => key.source === FUNCTIONS_PRESET_META_KEY);\n if (oldPresetIndex >= 0) {\n meta.keys.splice(oldPresetIndex, 1);\n }\n if ('presetId' in template) {\n meta.keys.push({ source: FUNCTIONS_PRESET_META_KEY, id: template.presetId });\n }\n });\n if (script.source?.target) {\n Obj.change(script.source.target, (s) => {\n s.content = template.source;\n });\n }\n },\n {\n label: template.name,\n value: template.id,\n type: 'template',\n },\n );\n });\n};\n\nexport const createTemplateSelect = (script: Script.Script) => {\n const templateSelectActions = createTemplateSelectActions(script);\n return {\n nodes: [...templateSelectActions],\n edges: [\n { source: 'root', target: 'template-select' },\n ...templateSelectActions.map((action) => ({ source: 'template-select', target: action.id })),\n ],\n };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback, useState } from 'react';\n\nimport { useOperationInvoker } from '@dxos/app-framework/react';\nimport { Obj } from '@dxos/echo';\nimport { Script } from '@dxos/functions';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceOperation } from '@dxos/plugin-space/types';\nimport { useClient } from '@dxos/react-client';\nimport { type Space } from '@dxos/react-client/echo';\n\nimport { type Template } from '../templates';\nimport { ScriptOperation } from '../types';\nimport { deployScript } from '../util';\n\ntype DeploymentStatus = 'idle' | 'pending' | 'success' | 'error';\n\n/**\n * Hook for creating and deploying multiple script templates concurrently.\n *\n * Takes a space and an array of script template IDs, then provides a callback\n * function that creates each script from its template and deploys it to the space.\n * All creation / deployment operations run concurrently for improved performance.\n */\nexport const useCreateAndDeployScriptTemplates = (space: Space | undefined, scriptTemplates: Template[]) => {\n const { invokePromise } = useOperationInvoker();\n const client = useClient();\n const [status, setStatus] = useState<DeploymentStatus>('idle');\n const [error, setError] = useState<Error | undefined>(undefined);\n\n const handleCreateAndDeployScripts = useCallback(async () => {\n invariant(space);\n setStatus('pending');\n setError(undefined);\n\n const deploymentResults = await Promise.all(\n scriptTemplates.map(async (template) => {\n const createResult = await invokePromise(ScriptOperation.CreateScript, {\n db: space.db,\n initialTemplateId: template.id as any,\n });\n invariant(Obj.instanceOf(Script.Script, createResult.data?.object));\n await invokePromise(SpaceOperation.AddObject, { target: space.db, object: createResult.data.object });\n\n return deployScript({ space, client, script: createResult.data.object });\n }),\n );\n\n const hasErrors = deploymentResults.some((result) => !result.success);\n setStatus(hasErrors ? 'error' : 'success');\n }, [space, invokePromise, client, scriptTemplates]);\n\n // TODO(burdon): Return onCreateAndDeployScripts.\n return { handleCreateAndDeployScripts, status, error };\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;AAKA,SAASA,KAAKC,WAAW;AACzB,SAASC,UAAuBC,mCAAmC;AACnE,SAASC,sBAAsB;AAC/B,SAASC,wBAAwBC,4BAA4B;AAC7D,SAASC,WAAW;AACpB,SAASC,2BAA2B;;AAG7B,IAAMC,mBAAmB,CAAC,EAAEC,QAAQC,GAAE,MAAsC;AACjF,QAAMC,qBAAqBD,MAAMR,4BAA4BH,IAAIa,QAAQF,EAAAA,CAAAA;AACzE,SAAOG,QAAQF,kBAAAA,KAAuB,CAACF,OAAOK;AAChD;AAeO,IAAMC,eAAe,OAAO,EACjCN,QACAO,QACAC,OACAP,IACAC,mBAAkB,MACA;AAClB,QAAMO,kBAAkBC,qBAAqBV,QAAQQ,KAAAA;AACrD,MAAIC,iBAAiB;AACnB,WAAO;MAAEE,SAAS;MAAOC,OAAOH;IAAgB;EAClD;AAEA,MAAI;AACF,UAAMI,cAAc,MAAMnB,eAAe;MACvCoB,QAAQd,OAAOc,OAAQC,OAAQC;IACjC,CAAA;AACA,QAAI,WAAWH,aAAa;AAC1B,YAAMA,YAAYD,SAAS,IAAIK,MAAM,wBAAA;IACvC;AAEA,UAAMC,yBAAyBvB,uBAAuBwB,WAAWZ,MAAAA;AACjE,UAAMa,cAAc,MAAMF,uBAAuBG,OAAO;;MAEtDC,gBAAgBd,MAAMe;MACtBC,SAASvB,KAAKL,qBAAqBK,GAAGuB,OAAO,IAAI;MAC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;;;;AAC3D,YAAM5B,cAAc6B,eAAeC,WAAW;QAAEC,QAAQjC,MAAMuB;QAAIO,QAAQV,aAAaS,KAAKC;MAAO,CAAA;AAEnG,aAAOI,aAAa;QAAElC;QAAOI;QAAQ+B,QAAQf,aAAaS,KAAKC;MAAO,CAAA;IACxE,CAAA,CAAA;AAGF,UAAMM,YAAYrB,kBAAkBsB,KAAK,CAACC,WAAW,CAACA,OAAOC,OAAO;AACpEhC,cAAU6B,YAAY,UAAU,SAAA;EAClC,GAAG;IAACpC;IAAOE;IAAeE;IAAQH;GAAgB;AAGlD,SAAO;IAAEW;IAA8BN;IAAQG;EAAM;AACvD;",
|
|
6
|
+
"names": ["Obj", "Ref", "Function", "getUserFunctionIdInMetadata", "bundleFunction", "FunctionsServiceClient", "incrementSemverPatch", "log", "FunctionRuntimeKind", "isScriptDeployed", "script", "fn", "existingFunctionId", "getMeta", "Boolean", "changed", "deployScript", "client", "space", "validationError", "validateDeployInputs", "success", "error", "buildResult", "source", "target", "content", "Error", "functionsServiceClient", "fromClient", "newFunction", "deploy", "ownerPublicKey", "key", "version", "functionId", "entryPoint", "assets", "runtime", "enums", "WORKER_LOADER", "storedFunction", "createOrUpdateFunctionInSpace", "change", "s", "err", "catch", "setFrom", "f", "make", "db", "add", "Obj", "getUserFunctionIdInMetadata", "getInvocationUrl", "log", "getSpace", "getFunctionUrl", "script", "fn", "edgeUrl", "space", "existingFunctionId", "getMeta", "undefined", "spaceId", "id", "updateFunctionMetadata", "storedFunction", "meta", "functionId", "change", "f", "description", "trim", "verbose", "inputSchema", "outputSchema", "key", "getAccessCredential", "identityKey", "issuer", "issuanceDate", "Date", "subject", "assertion", "serverName", "serverKey", "capabilities", "useEffect", "useMemo", "Obj", "Query", "Ref", "Function", "getUserFunctionIdInMetadata", "log", "useClient", "getSpace", "useQuery", "createMenuAction", "errorMessageColors", "createDeploy", "state", "script", "space", "fn", "client", "existingFunctionId", "t", "value", "errorItem", "createMenuAction", "label", "error", "ns", "meta", "id", "icon", "hidden", "classNames", "errorMessageColors", "deployAction", "source", "set", "undefined", "result", "deployScript", "success", "log", "catch", "type", "deploying", "disabled", "copyAction", "functionUrl", "navigator", "clipboard", "writeText", "nodes", "edges", "target", "useDeployState", "useDeployDeps", "useEffect", "getFunctionUrl", "edgeUrl", "config", "values", "runtime", "services", "edge", "url", "isScriptDeployed", "changed", "useClient", "getSpace", "useQuery", "db", "Query", "Function", "Ref", "make", "useMemo", "getUserFunctionIdInMetadata", "Obj", "getMeta", "Atom", "RegistryContext", "useAtomValue", "useContext", "useMemo", "useToolbarState", "initialState", "registry", "useContext", "RegistryContext", "atom", "useMemo", "Atom", "make", "value", "useAtomValue", "get", "update", "updater", "set", "key", "v", "useCapabilities", "usePluginManager", "runAndForwardErrors", "useAsyncEffect", "useCompiler", "manager", "usePluginManager", "useAsyncEffect", "activate", "ScriptEvents", "SetupCompiler", "pipe", "runAndForwardErrors", "compiler", "useCapabilities", "ScriptCapabilities", "Compiler", "format", "prettierPluginEstree", "prettierPluginTypescript", "Obj", "log", "createMenuAction", "createFormat", "script", "formatAction", "createMenuAction", "source", "formatted", "format", "target", "content", "parser", "plugins", "prettierPluginEstree", "prettierPluginTypescript", "semi", "singleQuote", "Obj", "change", "s", "err", "log", "catch", "label", "ns", "meta", "id", "icon", "nodes", "edges", "Obj", "FUNCTIONS_PRESET_META_KEY", "createMenuAction", "createTemplateSelectActions", "script", "templates", "map", "template", "createMenuAction", "id", "Obj", "change", "s", "name", "meta", "getMeta", "oldPresetIndex", "keys", "findIndex", "key", "source", "FUNCTIONS_PRESET_META_KEY", "splice", "push", "presetId", "target", "content", "label", "value", "type", "createTemplateSelect", "templateSelectActions", "nodes", "edges", "action", "useCallback", "useState", "useOperationInvoker", "Obj", "Script", "invariant", "SpaceOperation", "useClient", "useCreateAndDeployScriptTemplates", "space", "scriptTemplates", "invokePromise", "useOperationInvoker", "client", "useClient", "status", "setStatus", "useState", "error", "setError", "undefined", "handleCreateAndDeployScripts", "useCallback", "invariant", "deploymentResults", "Promise", "all", "map", "template", "createResult", "ScriptOperation", "CreateScript", "db", "initialTemplateId", "id", "Obj", "instanceOf", "Script", "data", "object", "SpaceOperation", "AddObject", "target", "deployScript", "script", "hasErrors", "some", "result", "success"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/blueprints/script-blueprint.ts
|
|
6
|
+
var script_blueprint_exports = {};
|
|
7
|
+
__export(script_blueprint_exports, {
|
|
8
|
+
Key: () => Key,
|
|
9
|
+
functions: () => functions,
|
|
10
|
+
make: () => make,
|
|
11
|
+
tools: () => tools
|
|
12
|
+
});
|
|
13
|
+
import { Blueprint, Template } from "@dxos/blueprints";
|
|
14
|
+
import { trim } from "@dxos/util";
|
|
15
|
+
var functions = [];
|
|
16
|
+
var tools = [];
|
|
17
|
+
var Key = "dxos.org/blueprint/script";
|
|
18
|
+
var make = () => Blueprint.make({
|
|
19
|
+
key: Key,
|
|
20
|
+
name: "Script",
|
|
21
|
+
tools: Blueprint.toolDefinitions({
|
|
22
|
+
functions,
|
|
23
|
+
tools
|
|
24
|
+
}),
|
|
25
|
+
instructions: Template.make({
|
|
26
|
+
source: trim`
|
|
27
|
+
You can create and update scripts which contain Typescript code.
|
|
28
|
+
`
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
script_blueprint_exports
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=chunk-F3QKSKSF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/script-blueprint.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Blueprint, Template } from '@dxos/blueprints';\nimport { type FunctionDefinition } from '@dxos/functions';\nimport { trim } from '@dxos/util';\n\nexport const functions: FunctionDefinition[] = [];\nexport const tools: string[] = [];\n\nexport const Key = 'dxos.org/blueprint/script';\n\nexport const make = () =>\n Blueprint.make({\n key: Key,\n name: 'Script',\n tools: Blueprint.toolDefinitions({ functions, tools }),\n instructions: Template.make({\n source: trim`\n You can create and update scripts which contain Typescript code.\n `,\n }),\n });\n"],
|
|
5
|
+
"mappings": ";;;;;AAAA;;;;;;;AAIA,SAASA,WAAWC,gBAAgB;AAEpC,SAASC,YAAY;AAEd,IAAMC,YAAkC,CAAA;AACxC,IAAMC,QAAkB,CAAA;AAExB,IAAMC,MAAM;AAEZ,IAAMC,OAAO,MAClBC,UAAUD,KAAK;EACbE,KAAKH;EACLI,MAAM;EACNL,OAAOG,UAAUG,gBAAgB;IAAEP;IAAWC;EAAM,CAAA;EACpDO,cAAcC,SAASN,KAAK;IAC1BO,QAAQC;;;EAGV,CAAA;AACF,CAAA;",
|
|
6
|
+
"names": ["Blueprint", "Template", "trim", "functions", "tools", "Key", "make", "Blueprint", "key", "name", "toolDefinitions", "instructions", "Template", "source", "trim"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// src/components/TypescriptEditor/TypescriptEditor.tsx
|
|
2
|
+
import { autocompletion, completionKeymap } from "@codemirror/autocomplete";
|
|
3
|
+
import { javascript } from "@codemirror/lang-javascript";
|
|
4
|
+
import { HighlightStyle } from "@codemirror/language";
|
|
5
|
+
import { lintKeymap } from "@codemirror/lint";
|
|
6
|
+
import { Prec } from "@codemirror/state";
|
|
7
|
+
import { keymap } from "@codemirror/view";
|
|
8
|
+
import { tags } from "@lezer/highlight";
|
|
9
|
+
import { continueKeymap } from "@valtown/codemirror-continue";
|
|
10
|
+
import { tsAutocomplete, tsFacet, tsHover, tsLinter, tsSync } from "@valtown/codemirror-ts";
|
|
11
|
+
import React, { memo } from "react";
|
|
12
|
+
import { useThemeContext } from "@dxos/react-ui";
|
|
13
|
+
import { useTextEditor } from "@dxos/react-ui-editor";
|
|
14
|
+
import { Domino } from "@dxos/ui";
|
|
15
|
+
import { InputModeExtensions, createBasicExtensions, createThemeExtensions, defaultStyles } from "@dxos/ui-editor";
|
|
16
|
+
import { mx } from "@dxos/ui-theme";
|
|
17
|
+
import { isNonNullable } from "@dxos/util";
|
|
18
|
+
var TypescriptEditor = /* @__PURE__ */ memo(({ classNames, id, role = "article", inputMode = "vscode", env, options, initialValue, extensions, scrollTo, selection }) => {
|
|
19
|
+
const { themeMode } = useThemeContext();
|
|
20
|
+
const { parentRef, focusAttributes } = useTextEditor(() => ({
|
|
21
|
+
id,
|
|
22
|
+
initialValue,
|
|
23
|
+
selection,
|
|
24
|
+
scrollTo,
|
|
25
|
+
extensions: [
|
|
26
|
+
extensions,
|
|
27
|
+
createBasicExtensions({
|
|
28
|
+
highlightActiveLine: true,
|
|
29
|
+
indentWithTab: true,
|
|
30
|
+
lineNumbers: true,
|
|
31
|
+
lineWrapping: false,
|
|
32
|
+
scrollPastEnd: role !== "section",
|
|
33
|
+
search: true,
|
|
34
|
+
...options
|
|
35
|
+
}),
|
|
36
|
+
createThemeExtensions({
|
|
37
|
+
monospace: true,
|
|
38
|
+
themeMode,
|
|
39
|
+
syntaxHighlighting: true
|
|
40
|
+
}),
|
|
41
|
+
InputModeExtensions[inputMode],
|
|
42
|
+
javascript({
|
|
43
|
+
typescript: true
|
|
44
|
+
}),
|
|
45
|
+
autocompletion({
|
|
46
|
+
override: env ? [
|
|
47
|
+
tsAutocomplete()
|
|
48
|
+
] : void 0
|
|
49
|
+
}),
|
|
50
|
+
// Continues block comments when pressing Enter.
|
|
51
|
+
Prec.high(keymap.of(continueKeymap)),
|
|
52
|
+
keymap.of(completionKeymap),
|
|
53
|
+
keymap.of(lintKeymap),
|
|
54
|
+
// https://github.com/val-town/codemirror-ts
|
|
55
|
+
env && [
|
|
56
|
+
// TODO(burdon): Fix type.
|
|
57
|
+
tsFacet.of({
|
|
58
|
+
env,
|
|
59
|
+
path: `./src/${id}.ts`
|
|
60
|
+
}),
|
|
61
|
+
tsSync(),
|
|
62
|
+
tsLinter(),
|
|
63
|
+
tsHover({
|
|
64
|
+
renderTooltip: createTooltipRenderer(themeMode)
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
].filter(isNonNullable)
|
|
68
|
+
}), [
|
|
69
|
+
themeMode,
|
|
70
|
+
id,
|
|
71
|
+
extensions,
|
|
72
|
+
inputMode,
|
|
73
|
+
selection,
|
|
74
|
+
scrollTo,
|
|
75
|
+
env
|
|
76
|
+
]);
|
|
77
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
78
|
+
ref: parentRef,
|
|
79
|
+
className: mx(classNames),
|
|
80
|
+
...focusAttributes
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var createTooltipRenderer = (themeMode) => {
|
|
84
|
+
const theme = HighlightStyle.define(themeMode === "dark" ? defaultStyles.dark : defaultStyles.light);
|
|
85
|
+
const classFromKind = (_kind) => {
|
|
86
|
+
const kind = _kind.endsWith("Name") ? "name" : _kind;
|
|
87
|
+
const validTag = kind in tags;
|
|
88
|
+
if (!validTag) {
|
|
89
|
+
return "";
|
|
90
|
+
}
|
|
91
|
+
const tag = tags[kind];
|
|
92
|
+
if (typeof tag === "function") {
|
|
93
|
+
return "";
|
|
94
|
+
}
|
|
95
|
+
return theme.style([
|
|
96
|
+
tag
|
|
97
|
+
]) ?? "";
|
|
98
|
+
};
|
|
99
|
+
return (info) => {
|
|
100
|
+
const children = info.quickInfo?.displayParts?.map(({ kind, text }) => Domino.of("span").classNames(classFromKind(kind)).text(text)) ?? [];
|
|
101
|
+
return {
|
|
102
|
+
dom: Domino.of("div").classNames("xs:max-is-80 max-is-lg p-1 bg-baseSurface rounded border border-separator").children(...children).root
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
export {
|
|
108
|
+
TypescriptEditor
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=chunk-I7CSE6T3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/TypescriptEditor/TypescriptEditor.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { autocompletion, completionKeymap } from '@codemirror/autocomplete';\nimport { javascript } from '@codemirror/lang-javascript';\nimport { HighlightStyle } from '@codemirror/language';\nimport { lintKeymap } from '@codemirror/lint';\nimport { Prec } from '@codemirror/state';\nimport { keymap } from '@codemirror/view';\nimport { tags } from '@lezer/highlight';\nimport { type VirtualTypeScriptEnvironment } from '@typescript/vfs';\nimport { continueKeymap } from '@valtown/codemirror-continue';\nimport { type HoverInfo, tsAutocomplete, tsFacet, tsHover, tsLinter, tsSync } from '@valtown/codemirror-ts';\nimport React, { memo } from 'react';\n\nimport { type ThemeMode, type ThemedClassName, useThemeContext } from '@dxos/react-ui';\nimport { type UseTextEditorProps, useTextEditor } from '@dxos/react-ui-editor';\nimport { Domino } from '@dxos/ui';\nimport {\n type BasicExtensionsOptions,\n type EditorInputMode,\n InputModeExtensions,\n createBasicExtensions,\n createThemeExtensions,\n defaultStyles,\n} from '@dxos/ui-editor';\nimport { mx } from '@dxos/ui-theme';\nimport { isNonNullable } from '@dxos/util';\n\nexport type TypescriptEditorProps = ThemedClassName<\n {\n id: string;\n role?: string;\n inputMode?: EditorInputMode;\n toolbar?: boolean;\n env?: VirtualTypeScriptEnvironment;\n options?: BasicExtensionsOptions;\n } & Pick<UseTextEditorProps, 'initialValue' | 'extensions' | 'scrollTo' | 'selection'>\n>;\n\nexport const TypescriptEditor = memo(\n ({\n classNames,\n id,\n role = 'article',\n inputMode = 'vscode',\n env,\n options,\n initialValue,\n extensions,\n scrollTo,\n selection,\n }: TypescriptEditorProps) => {\n const { themeMode } = useThemeContext();\n const { parentRef, focusAttributes } = useTextEditor(\n () => ({\n id,\n initialValue,\n selection,\n scrollTo,\n extensions: [\n extensions,\n createBasicExtensions({\n highlightActiveLine: true,\n indentWithTab: true,\n lineNumbers: true,\n lineWrapping: false,\n scrollPastEnd: role !== 'section',\n search: true,\n ...options,\n }),\n createThemeExtensions({\n monospace: true,\n themeMode,\n syntaxHighlighting: true,\n }),\n\n InputModeExtensions[inputMode],\n javascript({ typescript: true }),\n autocompletion({ override: env ? [tsAutocomplete()] : undefined }),\n\n // Continues block comments when pressing Enter.\n Prec.high(keymap.of(continueKeymap)),\n keymap.of(completionKeymap),\n keymap.of(lintKeymap),\n\n // https://github.com/val-town/codemirror-ts\n env && [\n // TODO(burdon): Fix type.\n tsFacet.of({ env: env as any, path: `./src/${id}.ts` }),\n tsSync(),\n tsLinter(),\n tsHover({ renderTooltip: createTooltipRenderer(themeMode) }),\n ],\n ].filter(isNonNullable),\n }),\n [themeMode, id, extensions, inputMode, selection, scrollTo, env],\n );\n\n return <div ref={parentRef} className={mx(classNames)} {...focusAttributes} />;\n },\n);\n\n// TODO(burdon): Factor out (react-ui-editor).\nconst createTooltipRenderer = (themeMode: ThemeMode) => {\n const theme = HighlightStyle.define(themeMode === 'dark' ? defaultStyles.dark : defaultStyles.light);\n\n const classFromKind = (_kind: string) => {\n // E.g., localName, methodName, parameterName, etc.\n const kind = _kind.endsWith('Name') ? 'name' : _kind;\n const validTag = kind in tags;\n if (!validTag) {\n return '';\n }\n\n const tag = tags[kind as keyof typeof tags];\n if (typeof tag === 'function') {\n return '';\n }\n\n return theme.style([tag]) ?? '';\n };\n\n return (info: HoverInfo) => {\n const children =\n info.quickInfo?.displayParts?.map(({ kind, text }) =>\n Domino.of('span').classNames(classFromKind(kind)).text(text),\n ) ?? [];\n return {\n dom: Domino.of('div')\n .classNames('xs:max-is-80 max-is-lg p-1 bg-baseSurface rounded border border-separator')\n .children(...children).root,\n };\n };\n};\n\nexport default TypescriptEditor;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,gBAAgBC,wBAAwB;AACjD,SAASC,kBAAkB;AAC3B,SAASC,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ACrC;IAAWT;IAAIM;IAAYJ;IAAWM;IAAWD;IAAUJ;GAAI;AAGlE,SAAO,sBAAA,cAAC4C,OAAAA;IAAIC,KAAKrC;IAAWsC,WAAWC,GAAGnD,UAAAA;IAAc,GAAGa;;AAC7D,CAAA;AAIF,IAAMgC,wBAAwB,CAACnC,cAAAA;AAC7B,QAAM0C,QAAQC,eAAeC,OAAO5C,cAAc,SAAS6C,cAAcC,OAAOD,cAAcE,KAAK;AAEnG,QAAMC,gBAAgB,CAACC,UAAAA;AAErB,UAAMC,OAAOD,MAAME,SAAS,MAAA,IAAU,SAASF;AAC/C,UAAMG,WAAWF,QAAQG;AACzB,QAAI,CAACD,UAAU;AACb,aAAO;IACT;AAEA,UAAME,MAAMD,KAAKH,IAAAA;AACjB,QAAI,OAAOI,QAAQ,YAAY;AAC7B,aAAO;IACT;AAEA,WAAOZ,MAAMa,MAAM;MAACD;KAAI,KAAK;EAC/B;AAEA,SAAO,CAACE,SAAAA;AACN,UAAMC,WACJD,KAAKE,WAAWC,cAAcC,IAAI,CAAC,EAAEV,MAAMW,KAAI,MAC7CC,OAAOrC,GAAG,MAAA,EAAQnC,WAAW0D,cAAcE,IAAAA,CAAAA,EAAOW,KAAKA,IAAAA,CAAAA,KACpD,CAAA;AACP,WAAO;MACLE,KAAKD,OAAOrC,GAAG,KAAA,EACZnC,WAAW,2EAAA,EACXmE,SAAQ,GAAIA,QAAAA,EAAUO;IAC3B;EACF;AACF;",
|
|
6
|
+
"names": ["autocompletion", "completionKeymap", "javascript", "HighlightStyle", "lintKeymap", "Prec", "keymap", "tags", "continueKeymap", "tsAutocomplete", "tsFacet", "tsHover", "tsLinter", "tsSync", "React", "memo", "useThemeContext", "useTextEditor", "Domino", "InputModeExtensions", "createBasicExtensions", "createThemeExtensions", "defaultStyles", "mx", "isNonNullable", "TypescriptEditor", "memo", "classNames", "id", "role", "inputMode", "env", "options", "initialValue", "extensions", "scrollTo", "selection", "themeMode", "useThemeContext", "parentRef", "focusAttributes", "useTextEditor", "createBasicExtensions", "highlightActiveLine", "indentWithTab", "lineNumbers", "lineWrapping", "scrollPastEnd", "search", "createThemeExtensions", "monospace", "syntaxHighlighting", "InputModeExtensions", "javascript", "typescript", "autocompletion", "override", "tsAutocomplete", "undefined", "Prec", "high", "keymap", "of", "continueKeymap", "completionKeymap", "lintKeymap", "tsFacet", "path", "tsSync", "tsLinter", "tsHover", "renderTooltip", "createTooltipRenderer", "filter", "isNonNullable", "div", "ref", "className", "mx", "theme", "HighlightStyle", "define", "defaultStyles", "dark", "light", "classFromKind", "_kind", "kind", "endsWith", "validTag", "tags", "tag", "style", "info", "children", "quickInfo", "displayParts", "map", "text", "Domino", "dom", "root"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCreateAndDeployScriptTemplates
|
|
3
|
+
} from "./chunk-C53UJGSU.mjs";
|
|
4
|
+
import {
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-WYR4QHPE.mjs";
|
|
7
|
+
|
|
8
|
+
// src/components/DeploymentDialog/DeploymentDialog.tsx
|
|
9
|
+
import React, { useEffect, useMemo } from "react";
|
|
10
|
+
import { Common } from "@dxos/app-framework";
|
|
11
|
+
import { useOperationInvoker } from "@dxos/app-framework/react";
|
|
12
|
+
import { getSpace } from "@dxos/react-client/echo";
|
|
13
|
+
import { Button, Dialog, IconButton, useTranslation } from "@dxos/react-ui";
|
|
14
|
+
var DEPLOYMENT_DIALOG = `${meta.id}/deployment/dialog`;
|
|
15
|
+
var DeploymentDialog = ({ accessToken, scriptTemplates }) => {
|
|
16
|
+
const { t } = useTranslation(meta.id);
|
|
17
|
+
const space = useMemo(() => getSpace(accessToken), [
|
|
18
|
+
accessToken
|
|
19
|
+
]);
|
|
20
|
+
const { handleCreateAndDeployScripts, status } = useCreateAndDeployScriptTemplates(space, scriptTemplates);
|
|
21
|
+
const { invokePromise } = useOperationInvoker();
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
if (status === "success") {
|
|
24
|
+
void invokePromise(Common.LayoutOperation.AddToast, {
|
|
25
|
+
id: `${meta.id}/deployment-success`,
|
|
26
|
+
icon: "ph--check--regular",
|
|
27
|
+
duration: Infinity,
|
|
28
|
+
title: [
|
|
29
|
+
"script deployment toast label",
|
|
30
|
+
{
|
|
31
|
+
ns: meta.id,
|
|
32
|
+
count: scriptTemplates.length
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
description: [
|
|
36
|
+
"script deployment toast description",
|
|
37
|
+
{
|
|
38
|
+
ns: meta.id,
|
|
39
|
+
count: scriptTemplates.length
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
closeLabel: [
|
|
43
|
+
"script deployment toast close label",
|
|
44
|
+
{
|
|
45
|
+
ns: meta.id,
|
|
46
|
+
count: scriptTemplates.length
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
void invokePromise(Common.LayoutOperation.UpdateDialog, {
|
|
51
|
+
state: false
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (status === "error") {
|
|
55
|
+
void invokePromise(Common.LayoutOperation.UpdateDialog, {
|
|
56
|
+
state: false
|
|
57
|
+
});
|
|
58
|
+
void invokePromise(Common.LayoutOperation.AddToast, {
|
|
59
|
+
id: `${meta.id}/deployment-error`,
|
|
60
|
+
icon: "ph--warning--regular",
|
|
61
|
+
duration: Infinity,
|
|
62
|
+
title: [
|
|
63
|
+
"script deployment error toast label",
|
|
64
|
+
{
|
|
65
|
+
ns: meta.id,
|
|
66
|
+
count: scriptTemplates.length
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
description: [
|
|
70
|
+
"script deployment error toast description",
|
|
71
|
+
{
|
|
72
|
+
ns: meta.id,
|
|
73
|
+
count: scriptTemplates.length
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
closeLabel: [
|
|
77
|
+
"script deployment error toast close label",
|
|
78
|
+
{
|
|
79
|
+
ns: meta.id,
|
|
80
|
+
count: scriptTemplates.length
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}, [
|
|
86
|
+
status,
|
|
87
|
+
invokePromise
|
|
88
|
+
]);
|
|
89
|
+
return /* @__PURE__ */ React.createElement(Dialog.Content, null, /* @__PURE__ */ React.createElement("div", {
|
|
90
|
+
className: "flex justify-between items-center"
|
|
91
|
+
}, /* @__PURE__ */ React.createElement(Dialog.Title, null, t("deployment dialog title")), /* @__PURE__ */ React.createElement(Dialog.Close, {
|
|
92
|
+
asChild: true
|
|
93
|
+
}, /* @__PURE__ */ React.createElement(IconButton, {
|
|
94
|
+
icon: "ph--x--regular",
|
|
95
|
+
size: 4,
|
|
96
|
+
label: "Close",
|
|
97
|
+
iconOnly: true,
|
|
98
|
+
density: "fine",
|
|
99
|
+
variant: "ghost"
|
|
100
|
+
}))), /* @__PURE__ */ React.createElement("div", {
|
|
101
|
+
role: "none",
|
|
102
|
+
className: "plb-4"
|
|
103
|
+
}, /* @__PURE__ */ React.createElement("p", null, t("deployment dialog scripts found message", {
|
|
104
|
+
count: scriptTemplates.length
|
|
105
|
+
})), /* @__PURE__ */ React.createElement("ul", {
|
|
106
|
+
className: "pbs-2"
|
|
107
|
+
}, scriptTemplates.map((template) => {
|
|
108
|
+
return /* @__PURE__ */ React.createElement("li", {
|
|
109
|
+
key: template.id
|
|
110
|
+
}, template.name);
|
|
111
|
+
}))), /* @__PURE__ */ React.createElement("div", {
|
|
112
|
+
role: "none",
|
|
113
|
+
className: "flex flex-row-reverse gap-1"
|
|
114
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
115
|
+
variant: "primary",
|
|
116
|
+
onClick: handleCreateAndDeployScripts,
|
|
117
|
+
disabled: status === "pending"
|
|
118
|
+
}, status === "pending" ? t("deployment dialog deploy functions pending button label", {
|
|
119
|
+
count: scriptTemplates.length
|
|
120
|
+
}) : t("deployment dialog deploy functions button label", {
|
|
121
|
+
count: scriptTemplates.length
|
|
122
|
+
})), /* @__PURE__ */ React.createElement(Dialog.Close, {
|
|
123
|
+
asChild: true,
|
|
124
|
+
disabled: status === "pending"
|
|
125
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
126
|
+
disabled: status === "pending"
|
|
127
|
+
}, t("deployment dialog skip button label")))));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/components/DeploymentDialog/index.ts
|
|
131
|
+
var DeploymentDialog_default = DeploymentDialog;
|
|
132
|
+
|
|
133
|
+
export {
|
|
134
|
+
DEPLOYMENT_DIALOG,
|
|
135
|
+
DeploymentDialog_default
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=chunk-TWX2NMZN.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/DeploymentDialog/DeploymentDialog.tsx", "../../../src/components/DeploymentDialog/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React, { useEffect, useMemo } from 'react';\n\nimport { Common } from '@dxos/app-framework';\nimport { useOperationInvoker } from '@dxos/app-framework/react';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { Button, Dialog, IconButton, useTranslation } from '@dxos/react-ui';\nimport { type AccessToken } from '@dxos/types';\n\nimport { useCreateAndDeployScriptTemplates } from '../../hooks';\nimport { meta } from '../../meta';\nimport { type Template } from '../../templates';\n\nexport const DEPLOYMENT_DIALOG = `${meta.id}/deployment/dialog`;\n\n// TODO(ZaymonFC):\n// - Show activity and feedback to the user.\n// - Only take an array of templateIds and get the name from the data.\n// - Pending / onError states.\n\nexport type DeploymentDialogProps = {\n accessToken: AccessToken.AccessToken;\n scriptTemplates: Template[];\n};\n\nexport const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDialogProps) => {\n const { t } = useTranslation(meta.id);\n const space = useMemo(() => getSpace(accessToken), [accessToken]);\n\n // TODO(ZaymonFC): Thinking further. All of this should get moved to intents to run async in the background.\n // Deployment shouldn't be tied to the lifecycle of the dialogue component.\n const { handleCreateAndDeployScripts, status } = useCreateAndDeployScriptTemplates(space, scriptTemplates);\n const { invokePromise } = useOperationInvoker();\n\n useEffect(() => {\n if (status === 'success') {\n // TODO(ZaymonFC): We can probably re-use this toast for normal script deployment.\n void invokePromise(Common.LayoutOperation.AddToast, {\n id: `${meta.id}/deployment-success`,\n icon: 'ph--check--regular',\n duration: Infinity,\n title: ['script deployment toast label', { ns: meta.id, count: scriptTemplates.length }],\n description: ['script deployment toast description', { ns: meta.id, count: scriptTemplates.length }],\n closeLabel: ['script deployment toast close label', { ns: meta.id, count: scriptTemplates.length }],\n });\n void invokePromise(Common.LayoutOperation.UpdateDialog, { state: false });\n }\n if (status === 'error') {\n void invokePromise(Common.LayoutOperation.UpdateDialog, { state: false });\n void invokePromise(Common.LayoutOperation.AddToast, {\n id: `${meta.id}/deployment-error`,\n icon: 'ph--warning--regular',\n duration: Infinity,\n title: ['script deployment error toast label', { ns: meta.id, count: scriptTemplates.length }],\n description: ['script deployment error toast description', { ns: meta.id, count: scriptTemplates.length }],\n closeLabel: ['script deployment error toast close label', { ns: meta.id, count: scriptTemplates.length }],\n });\n }\n }, [status, invokePromise]);\n\n return (\n <Dialog.Content>\n <div className='flex justify-between items-center'>\n <Dialog.Title>{t('deployment dialog title')}</Dialog.Title>\n <Dialog.Close asChild>\n <IconButton icon='ph--x--regular' size={4} label='Close' iconOnly density='fine' variant='ghost' />\n </Dialog.Close>\n </div>\n <div role='none' className='plb-4'>\n {/* TODO: Implement deployment logic and UI. */}\n <p>\n {t('deployment dialog scripts found message', {\n count: scriptTemplates.length,\n })}\n </p>\n <ul className='pbs-2'>\n {scriptTemplates.map((template) => {\n return <li key={template.id}>{template.name}</li>;\n })}\n </ul>\n </div>\n <div role='none' className='flex flex-row-reverse gap-1'>\n <Button variant='primary' onClick={handleCreateAndDeployScripts} disabled={status === 'pending'}>\n {status === 'pending'\n ? t('deployment dialog deploy functions pending button label', {\n count: scriptTemplates.length,\n })\n : t('deployment dialog deploy functions button label', {\n count: scriptTemplates.length,\n })}\n </Button>\n <Dialog.Close asChild disabled={status === 'pending'}>\n <Button disabled={status === 'pending'}>{t('deployment dialog skip button label')}</Button>\n </Dialog.Close>\n </div>\n </Dialog.Content>\n );\n};\n\nexport default DeploymentDialog;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { DEPLOYMENT_DIALOG, DeploymentDialog } from './DeploymentDialog';\n\nexport { DEPLOYMENT_DIALOG };\n\nexport default DeploymentDialog;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,OAAOA,SAASC,WAAWC,eAAe;AAE1C,SAASC,cAAc;AACvB,SAASC,2BAA2B;AACpC,SAASC,gBAAgB;AACzB,SAASC,QAAQC,QAAQC,YAAYC,sBAAsB;AAOpD,IAAMC,oBAAoB,GAAGC,KAAKC,EAAE;AAYpC,IAAMC,mBAAmB,CAAC,EAAEC,aAAaC,gBAAe,MAAyB;AACtF,QAAM,EAAEC,EAAC,IAAKC,eAAeN,KAAKC,EAAE;AACpC,QAAMM,QAAQC,QAAQ,MAAMC,SAASN,WAAAA,GAAc;IAACA;GAAY;AAIhE,QAAM,EAAEO,8BAA8BC,OAAM,IAAKC,kCAAkCL,OAAOH,eAAAA;AAC1F,QAAM,EAAES,cAAa,IAAKC,oBAAAA;AAE1BC,YAAU,MAAA;AACR,QAAIJ,WAAW,WAAW;AAExB,WAAKE,cAAcG,OAAOC,gBAAgBC,UAAU;QAClDjB,IAAI,GAAGD,KAAKC,EAAE;QACdkB,MAAM;QACNC,UAAUC;QACVC,OAAO;UAAC;UAAiC;YAAEC,IAAIvB,KAAKC;YAAIuB,OAAOpB,gBAAgBqB;UAAO;;QACtFC,aAAa;UAAC;UAAuC;YAAEH,IAAIvB,KAAKC;YAAIuB,OAAOpB,gBAAgBqB;UAAO;;QAClGE,YAAY;UAAC;UAAuC;YAAEJ,IAAIvB,KAAKC;YAA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,CAAA,CAAA,GAGJ,sBAAA,cAAClB,OAAAA;IAAIW,MAAK;IAAOV,WAAU;KACzB,sBAAA,cAACkB,QAAAA;IAAOT,SAAQ;IAAUU,SAAS1C;IAA8B2C,UAAU1C,WAAW;KACnFA,WAAW,YACRN,EAAE,2DAA2D;IAC3DmB,OAAOpB,gBAAgBqB;EACzB,CAAA,IACApB,EAAE,mDAAmD;IACnDmB,OAAOpB,gBAAgBqB;EACzB,CAAA,CAAA,GAEN,sBAAA,cAACK,OAAOK,OAAK;IAACC,SAAAA;IAAQiB,UAAU1C,WAAW;KACzC,sBAAA,cAACwC,QAAAA;IAAOE,UAAU1C,WAAW;KAAYN,EAAE,qCAAA,CAAA,CAAA,CAAA,CAAA;AAKrD;;;AC5FA,IAAA,2BAAeiD;",
|
|
6
|
+
"names": ["React", "useEffect", "useMemo", "Common", "useOperationInvoker", "getSpace", "Button", "Dialog", "IconButton", "useTranslation", "DEPLOYMENT_DIALOG", "meta", "id", "DeploymentDialog", "accessToken", "scriptTemplates", "t", "useTranslation", "space", "useMemo", "getSpace", "handleCreateAndDeployScripts", "status", "useCreateAndDeployScriptTemplates", "invokePromise", "useOperationInvoker", "useEffect", "Common", "LayoutOperation", "AddToast", "icon", "duration", "Infinity", "title", "ns", "count", "length", "description", "closeLabel", "UpdateDialog", "state", "Dialog", "Content", "div", "className", "Title", "Close", "asChild", "IconButton", "size", "label", "iconOnly", "density", "variant", "role", "p", "ul", "map", "template", "li", "key", "name", "Button", "onClick", "disabled", "DeploymentDialog"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import {
|
|
2
|
+
templates
|
|
3
|
+
} from "./chunk-UX4GHJ5E.mjs";
|
|
4
|
+
import {
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-WYR4QHPE.mjs";
|
|
7
|
+
import {
|
|
8
|
+
__export
|
|
9
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
10
|
+
|
|
11
|
+
// src/types/actions.ts
|
|
12
|
+
import * as Schema from "effect/Schema";
|
|
13
|
+
import { Database } from "@dxos/echo";
|
|
14
|
+
import { Script } from "@dxos/functions";
|
|
15
|
+
import { Operation } from "@dxos/operation";
|
|
16
|
+
var SCRIPT_OPERATION = `${meta.id}/operation`;
|
|
17
|
+
(function(ScriptOperation2) {
|
|
18
|
+
ScriptOperation2.ScriptProps = Schema.Struct({
|
|
19
|
+
name: Schema.optional(Schema.String),
|
|
20
|
+
// TODO(wittjosiah): Placeholder annotation?
|
|
21
|
+
gistUrl: Schema.optional(Schema.String.annotations({
|
|
22
|
+
title: "Import from Gist (url)"
|
|
23
|
+
})),
|
|
24
|
+
initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(Schema.annotations({
|
|
25
|
+
title: "Template"
|
|
26
|
+
}), Schema.optional)
|
|
27
|
+
});
|
|
28
|
+
ScriptOperation2.NotebookProps = Schema.Struct({
|
|
29
|
+
name: Schema.optional(Schema.String)
|
|
30
|
+
});
|
|
31
|
+
ScriptOperation2.CreateScript = Operation.make({
|
|
32
|
+
meta: {
|
|
33
|
+
key: `${SCRIPT_OPERATION}/create-script`,
|
|
34
|
+
name: "Create Script"
|
|
35
|
+
},
|
|
36
|
+
schema: {
|
|
37
|
+
input: Schema.extend(ScriptOperation2.ScriptProps, Schema.Struct({
|
|
38
|
+
db: Database.Database
|
|
39
|
+
})),
|
|
40
|
+
output: Schema.Struct({
|
|
41
|
+
object: Script.Script
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
})(ScriptOperation || (ScriptOperation = {}));
|
|
46
|
+
var ScriptOperation;
|
|
47
|
+
|
|
48
|
+
// src/types/capabilities.ts
|
|
49
|
+
import { Capability } from "@dxos/app-framework";
|
|
50
|
+
(function(ScriptCapabilities2) {
|
|
51
|
+
ScriptCapabilities2.Settings = Capability.make(`${meta.id}/capability/settings`);
|
|
52
|
+
ScriptCapabilities2.Compiler = Capability.make(`${meta.id}/capability/compiler`);
|
|
53
|
+
})(ScriptCapabilities || (ScriptCapabilities = {}));
|
|
54
|
+
var ScriptCapabilities;
|
|
55
|
+
|
|
56
|
+
// src/types/events.ts
|
|
57
|
+
import { ActivationEvent } from "@dxos/app-framework";
|
|
58
|
+
(function(ScriptEvents2) {
|
|
59
|
+
ScriptEvents2.SetupCompiler = ActivationEvent.make(`${meta.id}/event/setup-compiler`);
|
|
60
|
+
})(ScriptEvents || (ScriptEvents = {}));
|
|
61
|
+
var ScriptEvents;
|
|
62
|
+
|
|
63
|
+
// src/types/Notebook.ts
|
|
64
|
+
var Notebook_exports = {};
|
|
65
|
+
__export(Notebook_exports, {
|
|
66
|
+
Cell: () => Cell,
|
|
67
|
+
Notebook: () => Notebook,
|
|
68
|
+
make: () => make
|
|
69
|
+
});
|
|
70
|
+
import * as Schema2 from "effect/Schema";
|
|
71
|
+
import { Prompt } from "@dxos/blueprints";
|
|
72
|
+
import { Obj, Type } from "@dxos/echo";
|
|
73
|
+
import { FormInputAnnotation } from "@dxos/echo/internal";
|
|
74
|
+
import { LabelAnnotation } from "@dxos/echo/internal";
|
|
75
|
+
import { Graph } from "@dxos/plugin-explorer/types";
|
|
76
|
+
import { Text } from "@dxos/schema";
|
|
77
|
+
var Cell = Schema2.Struct({
|
|
78
|
+
id: Schema2.String,
|
|
79
|
+
type: Schema2.String,
|
|
80
|
+
name: Schema2.optional(Schema2.String),
|
|
81
|
+
// TODO(burdon): Union type.
|
|
82
|
+
source: Schema2.optional(Type.Ref(Text.Text)),
|
|
83
|
+
prompt: Schema2.optional(Type.Ref(Prompt.Prompt)),
|
|
84
|
+
graph: Schema2.optional(Type.Ref(Graph.Graph))
|
|
85
|
+
});
|
|
86
|
+
var Notebook = Schema2.Struct({
|
|
87
|
+
name: Schema2.String.pipe(Schema2.optional),
|
|
88
|
+
cells: Cell.pipe(Schema2.Array, FormInputAnnotation.set(false))
|
|
89
|
+
}).pipe(Type.object({
|
|
90
|
+
typename: "dxos.org/type/Notebook",
|
|
91
|
+
version: "0.1.0"
|
|
92
|
+
}), LabelAnnotation.set([
|
|
93
|
+
"name"
|
|
94
|
+
]));
|
|
95
|
+
var make = (props = {
|
|
96
|
+
cells: []
|
|
97
|
+
}) => Obj.make(Notebook, props);
|
|
98
|
+
|
|
99
|
+
// src/types/types.ts
|
|
100
|
+
import * as Schema3 from "effect/Schema";
|
|
101
|
+
import { EditorInputMode } from "@dxos/ui-editor";
|
|
102
|
+
var ScriptSettings = Schema3.mutable(Schema3.Struct({
|
|
103
|
+
editorInputMode: EditorInputMode
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
ScriptOperation,
|
|
108
|
+
ScriptCapabilities,
|
|
109
|
+
ScriptEvents,
|
|
110
|
+
Notebook_exports,
|
|
111
|
+
ScriptSettings
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=chunk-UUR4JNNB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/actions.ts", "../../../src/types/capabilities.ts", "../../../src/types/events.ts", "../../../src/types/Notebook.ts", "../../../src/types/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Database } from '@dxos/echo';\nimport { Script } from '@dxos/functions';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '../meta';\nimport { templates } from '../templates';\n\nconst SCRIPT_OPERATION = `${meta.id}/operation`;\n\nexport namespace ScriptOperation {\n export const ScriptProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n // TODO(wittjosiah): Placeholder annotation?\n gistUrl: Schema.optional(Schema.String.annotations({ title: 'Import from Gist (url)' })),\n initialTemplateId: Schema.Literal(...templates.map(({ id }) => id)).pipe(\n Schema.annotations({ title: 'Template' }),\n Schema.optional,\n ),\n });\n\n export const NotebookProps = Schema.Struct({\n name: Schema.optional(Schema.String),\n });\n\n export const CreateScript = Operation.make({\n meta: { key: `${SCRIPT_OPERATION}/create-script`, name: 'Create Script' },\n schema: {\n input: Schema.extend(\n ScriptProps,\n Schema.Struct({\n db: Database.Database,\n }),\n ),\n output: Schema.Struct({\n object: Script.Script,\n }),\n },\n });\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Atom } from '@effect-atom/atom-react';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { type Compiler } from '../compiler';\nimport { meta } from '../meta';\n\nimport { type ScriptSettings } from './types';\n\nexport namespace ScriptCapabilities {\n export const Settings = Capability.make<Atom.Writable<ScriptSettings>>(`${meta.id}/capability/settings`);\n export const Compiler = Capability.make<Compiler>(`${meta.id}/capability/compiler`);\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ActivationEvent } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport namespace ScriptEvents {\n export const SetupCompiler = ActivationEvent.make(`${meta.id}/event/setup-compiler`);\n}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Prompt } from '@dxos/blueprints';\nimport { Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation } from '@dxos/echo/internal';\nimport { LabelAnnotation } from '@dxos/echo/internal';\nimport { Graph } from '@dxos/plugin-explorer/types';\nimport { Text } from '@dxos/schema';\n\nexport type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';\n\nexport const Cell = Schema.Struct({\n id: Schema.String,\n type: Schema.String,\n name: Schema.optional(Schema.String),\n // TODO(burdon): Union type.\n source: Schema.optional(Type.Ref(Text.Text)),\n prompt: Schema.optional(Type.Ref(Prompt.Prompt)),\n graph: Schema.optional(Type.Ref(Graph.Graph)),\n});\n\nexport interface Cell extends Schema.Schema.Type<typeof Cell> {}\n\nexport const Notebook = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n cells: Cell.pipe(Schema.Array, FormInputAnnotation.set(false)),\n}).pipe(\n Type.object({\n typename: 'dxos.org/type/Notebook',\n version: '0.1.0',\n }),\n LabelAnnotation.set(['name']),\n);\n\nexport type Notebook = Schema.Schema.Type<typeof Notebook>;\n\nexport const make = (props: Obj.MakeProps<typeof Notebook> = { cells: [] }): Notebook => Obj.make(Notebook, props);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { EditorInputMode } from '@dxos/ui-editor';\n\nexport const ScriptSettings = Schema.mutable(\n Schema.Struct({\n editorInputMode: EditorInputMode,\n }),\n);\n\nexport type ScriptSettings = Schema.Schema.Type<typeof ScriptSettings>;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,gBAAgB;AACzB,SAASC,cAAc;AACvB,SAASC,iBAAiB;AAK1B,IAAMC,mBAAmB,GAAGC,KAAKC,EAAE;UAElBC,kBAAAA;mBACFC,cAAqBC,cAAO;IACvCC,MAAaC,gBAAgBC,aAAM;;IAEnCC,SAAgBF,gBAAgBC,cAAOE,YAAY;MAAEC,OAAO;IAAyB,CAAA,CAAA;IACrFC,mBAA0BC,eAAO,GAAIC,UAAUC,IAAI,CAAC,EAAEb,GAAE,MAAOA,EAAAA,CAAAA,EAAKc,KAC3DN,mBAAY;MAAEC,OAAO;IAAW,CAAA,GAChCJ,eAAQ;EAEnB,CAAA;mBAEaU,gBAAuBZ,cAAO;IACzCC,MAAaC,gBAAgBC,aAAM;EACrC,CAAA;mBAEaU,eAAeC,UAAUC,KAAK;IACzCnB,MAAM;MAAEoB,KAAK,GAAGrB,gBAAAA;MAAkCM,MAAM;IAAgB;IACxEgB,QAAQ;MACNC,OAAcC,cAAMrB,iBAClBC,aACOC,cAAO;QACZoB,IAAIC,SAASA;MACf,CAAA,CAAA;MAEFC,QAAetB,cAAO;QACpBuB,QAAQC,OAAOA;MACjB,CAAA;IACF;EACF,CAAA;AACF,GA7BiB1B,oBAAAA,kBAAAA,CAAAA,EAAAA;;;;ACTjB,SAAS2B,kBAAkB;UAOVC,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Script", "Operation", "SCRIPT_OPERATION", "meta", "id", "ScriptOperation", "ScriptProps", "Struct", "name", "optional", "String", "gistUrl", "annotations", "title", "initialTemplateId", "Literal", "templates", "map", "pipe", "NotebookProps", "CreateScript", "Operation", "make", "key", "schema", "input", "extend", "db", "Database", "output", "object", "Script", "Capability", "ScriptCapabilities", "Settings", "Capability", "make", "meta", "id", "Compiler", "ActivationEvent", "ScriptEvents", "SetupCompiler", "ActivationEvent", "make", "meta", "id", "Schema", "Prompt", "Obj", "Type", "FormInputAnnotation", "LabelAnnotation", "Graph", "Text", "Cell", "Struct", "id", "String", "type", "name", "optional", "source", "Type", "Ref", "Text", "prompt", "Prompt", "graph", "Graph", "Notebook", "pipe", "cells", "Array", "FormInputAnnotation", "set", "object", "typename", "version", "LabelAnnotation", "make", "props", "Obj", "Schema", "EditorInputMode", "ScriptSettings", "mutable", "Struct", "editorInputMode", "EditorInputMode"]
|
|
7
|
+
}
|