@dxos/plugin-script 0.8.4-main.406dc2a → 0.8.4-main.4a85c3132b
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/README.md +15 -13
- package/dist/lib/browser/DeploymentDialog-IIOXAS47.mjs +138 -0
- package/dist/lib/browser/DeploymentDialog-IIOXAS47.mjs.map +7 -0
- package/dist/lib/browser/{NotebookContainer-LVGRPFY3.mjs → NotebookContainer-VVZOKGRC.mjs} +367 -200
- package/dist/lib/browser/NotebookContainer-VVZOKGRC.mjs.map +7 -0
- package/dist/lib/browser/ScriptContainer-A5SSIUH6.mjs +93 -0
- package/dist/lib/browser/ScriptContainer-A5SSIUH6.mjs.map +7 -0
- package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs +294 -0
- package/dist/lib/browser/ScriptObjectSettings-HYYC7KXC.mjs.map +7 -0
- package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs +55 -0
- package/dist/lib/browser/ScriptPluginSettings-UTWA7CBT.mjs.map +7 -0
- package/dist/lib/browser/ScriptProperties-HREPUE65.mjs +28 -0
- package/dist/lib/browser/ScriptProperties-HREPUE65.mjs.map +7 -0
- package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs +39 -0
- package/dist/lib/browser/TestContainer-D4Y2K2TT.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs +69 -0
- package/dist/lib/browser/app-graph-builder-66ZDI72K.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-YMZEJBAZ.mjs +17 -0
- package/dist/lib/browser/blueprint-definition-YMZEJBAZ.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +8 -0
- package/dist/lib/browser/chunk-6IXFDTAI.mjs +113 -0
- package/dist/lib/browser/chunk-6IXFDTAI.mjs.map +7 -0
- package/dist/lib/browser/chunk-ATTZUDT7.mjs +67 -0
- package/dist/lib/browser/chunk-ATTZUDT7.mjs.map +7 -0
- package/dist/lib/browser/chunk-G3XIOLLI.mjs +174 -0
- package/dist/lib/browser/chunk-G3XIOLLI.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/{chunk-ST3ACVUC.mjs → chunk-J7PGML5B.mjs} +29 -12
- package/dist/lib/browser/chunk-J7PGML5B.mjs.map +7 -0
- package/dist/lib/browser/chunk-MUEVLYXJ.mjs +397 -0
- package/dist/lib/browser/chunk-MUEVLYXJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-PLDBKKYO.mjs +789 -0
- package/dist/lib/browser/chunk-PLDBKKYO.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q66L5EUR.mjs +20 -0
- package/dist/lib/browser/chunk-Q66L5EUR.mjs.map +7 -0
- package/dist/lib/browser/chunk-TW27W3EL.mjs +29 -0
- package/dist/lib/browser/chunk-TW27W3EL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-EZVXV6DA.mjs → chunk-WYR4QHPE.mjs} +7 -2
- package/dist/lib/browser/chunk-WYR4QHPE.mjs.map +7 -0
- package/dist/lib/browser/chunk-ZYU2LP6U.mjs +11 -0
- package/dist/lib/browser/chunk-ZYU2LP6U.mjs.map +7 -0
- package/dist/lib/browser/compiler-53G6ZHQM.mjs +99 -0
- package/dist/lib/browser/compiler-53G6ZHQM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +111 -140
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs +79 -0
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs.map +7 -0
- package/dist/lib/browser/react-surface-26P6HAFD.mjs +141 -0
- package/dist/lib/browser/react-surface-26P6HAFD.mjs.map +7 -0
- package/dist/lib/browser/settings-76UM7442.mjs +36 -0
- package/dist/lib/browser/settings-76UM7442.mjs.map +7 -0
- package/dist/lib/browser/templates/index.mjs +2 -1
- package/dist/lib/browser/types/index.mjs +12 -7
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs +139 -0
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs.map +7 -0
- package/dist/lib/node-esm/{NotebookContainer-QY5NJGJI.mjs → NotebookContainer-ZLWTNMQA.mjs} +367 -200
- package/dist/lib/node-esm/NotebookContainer-ZLWTNMQA.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs +94 -0
- package/dist/lib/node-esm/ScriptContainer-S4UKQAWP.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs +295 -0
- package/dist/lib/node-esm/ScriptObjectSettings-C5QBRERY.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs +56 -0
- package/dist/lib/node-esm/ScriptPluginSettings-MFACDW4R.mjs.map +7 -0
- package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs +29 -0
- package/dist/lib/node-esm/ScriptProperties-FMNIX3KU.mjs.map +7 -0
- package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs +40 -0
- package/dist/lib/node-esm/TestContainer-AO45YPGV.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs +70 -0
- package/dist/lib/node-esm/app-graph-builder-IGAZTJ45.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs +18 -0
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.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-5BG7OJGQ.mjs +176 -0
- package/dist/lib/node-esm/chunk-5BG7OJGQ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-OG2SIKHE.mjs → chunk-5HSJPAK7.mjs} +7 -2
- package/dist/lib/node-esm/chunk-5HSJPAK7.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-H46R2RS5.mjs +790 -0
- package/dist/lib/node-esm/chunk-H46R2RS5.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-JGN7TDJH.mjs +69 -0
- package/dist/lib/node-esm/chunk-JGN7TDJH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-2GVTWESW.mjs → chunk-QG6ANK4B.mjs} +29 -12
- package/dist/lib/node-esm/chunk-QG6ANK4B.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-S7DSCLOW.mjs +31 -0
- package/dist/lib/node-esm/chunk-S7DSCLOW.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs +22 -0
- package/dist/lib/node-esm/chunk-TZ2EBTPQ.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-UFBVE33O.mjs +12 -0
- package/dist/lib/node-esm/chunk-UFBVE33O.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-WWD5LUU6.mjs +114 -0
- package/dist/lib/node-esm/chunk-WWD5LUU6.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs +398 -0
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs.map +7 -0
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs +100 -0
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +111 -140
- 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-HFFDXWND.mjs +80 -0
- package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-THCIK266.mjs +142 -0
- package/dist/lib/node-esm/react-surface-THCIK266.mjs.map +7 -0
- package/dist/lib/node-esm/settings-CCHDPLFJ.mjs +37 -0
- package/dist/lib/node-esm/settings-CCHDPLFJ.mjs.map +7 -0
- package/dist/lib/node-esm/templates/index.mjs +2 -1
- package/dist/lib/node-esm/types/index.mjs +12 -7
- 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 +4 -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 +6 -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 +10 -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/FrameContainer/FrameContainer.d.ts +1 -1
- package/dist/types/src/components/FrameContainer/FrameContainer.d.ts.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookCell.d.ts +4 -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 +5 -4
- 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/ScriptToolbar/ScriptToolbar.d.ts +8 -8
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts +5 -4
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/TestPanel.d.ts.map +1 -1
- package/dist/types/src/components/TestPanel/index.d.ts +0 -1
- package/dist/types/src/components/TestPanel/index.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 +4 -5
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.d.ts +2 -4
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -0
- package/dist/types/src/{components/NotebookContainer.stories.d.ts → containers/DeploymentDialog/DeploymentDialog.stories.d.ts} +7 -6
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -0
- package/dist/types/src/containers/DeploymentDialog/index.d.ts +3 -0
- package/dist/types/src/containers/DeploymentDialog/index.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts +7 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts +7 -0
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.stories.d.ts.map +1 -0
- package/dist/types/src/containers/NotebookContainer/index.d.ts +3 -0
- package/dist/types/src/containers/NotebookContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts +10 -0
- package/dist/types/src/containers/ScriptContainer/ScriptContainer.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptContainer/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts +7 -0
- package/dist/types/src/containers/ScriptObjectSettings/ScriptObjectSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptObjectSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts +8 -0
- package/dist/types/src/containers/ScriptPluginSettings/ScriptPluginSettings.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptPluginSettings/index.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts +7 -0
- package/dist/types/src/containers/ScriptProperties/ScriptProperties.d.ts.map +1 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts +3 -0
- package/dist/types/src/containers/ScriptProperties/index.d.ts.map +1 -0
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts +8 -0
- package/dist/types/src/containers/TestContainer/TestContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TestContainer/index.d.ts +3 -0
- package/dist/types/src/containers/TestContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +9 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- 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 +17 -31
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +5 -4
- 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 +7 -16
- 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 +2 -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 +58 -0
- package/dist/types/src/notebook/compute-graph.d.ts.map +1 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts +2 -0
- package/dist/types/src/notebook/compute-graph.test.d.ts.map +1 -0
- package/dist/types/src/notebook/eval.d.ts +1 -1
- package/dist/types/src/notebook/eval.d.ts.map +1 -1
- package/dist/types/src/notebook/index.d.ts +1 -1
- package/dist/types/src/notebook/index.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/data.d.ts +2 -18
- package/dist/types/src/testing/data.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/translations.d.ts +4 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +108 -0
- package/dist/types/src/types/Notebook.d.ts.map +1 -0
- package/dist/types/src/types/actions.d.ts +30 -56
- 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 +4 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +6 -0
- package/dist/types/src/types/types.d.ts.map +1 -0
- package/dist/types/src/util/deploy.d.ts +4 -4
- package/dist/types/src/util/deploy.d.ts.map +1 -1
- package/dist/types/src/util/functions.d.ts +3 -3
- package/dist/types/src/util/functions.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +114 -82
- package/src/ScriptPlugin.tsx +45 -87
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/script-blueprint.ts +31 -0
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +56 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/{artifact-definition.ts → artifact-definition/artifact-definition.ts} +97 -95
- package/src/capabilities/artifact-definition/index.ts +7 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -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 +75 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +121 -0
- package/src/capabilities/settings/index.ts +7 -0
- package/src/capabilities/settings/settings.ts +33 -0
- package/src/compiler/compiler.ts +10 -3
- package/src/components/FrameContainer/FrameContainer.tsx +6 -5
- package/src/components/FrameContainer/frame.html +21 -21
- package/src/components/NotebookStack/NotebookCell.tsx +85 -87
- package/src/components/NotebookStack/NotebookStack.stories.tsx +32 -10
- package/src/components/NotebookStack/NotebookStack.tsx +16 -9
- package/src/components/QueryEditor/QueryEditor.stories.tsx +102 -0
- package/src/components/QueryEditor/QueryEditor.tsx +47 -0
- package/src/components/QueryEditor/index.ts +5 -0
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +42 -20
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +28 -31
- package/src/components/TestPanel/TestPanel.tsx +61 -36
- package/src/components/TestPanel/index.ts +0 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +25 -18
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +70 -74
- package/src/components/index.ts +4 -9
- package/src/constants.ts +7 -0
- package/src/containers/DeploymentDialog/DeploymentDialog.stories.tsx +61 -0
- package/src/containers/DeploymentDialog/DeploymentDialog.tsx +99 -0
- package/src/containers/DeploymentDialog/index.ts +7 -0
- package/src/containers/NotebookContainer/NotebookContainer.stories.tsx +87 -0
- package/src/containers/NotebookContainer/NotebookContainer.tsx +268 -0
- package/src/containers/NotebookContainer/index.ts +7 -0
- package/src/containers/ScriptContainer/ScriptContainer.tsx +84 -0
- package/src/containers/ScriptContainer/index.ts +7 -0
- package/src/{components/Settings → containers/ScriptObjectSettings}/ScriptObjectSettings.tsx +55 -50
- package/src/containers/ScriptObjectSettings/index.ts +7 -0
- package/src/{components/Settings → containers/ScriptPluginSettings}/ScriptPluginSettings.tsx +19 -14
- package/src/containers/ScriptPluginSettings/index.ts +7 -0
- package/src/containers/ScriptProperties/ScriptProperties.tsx +33 -0
- package/src/containers/ScriptProperties/index.ts +7 -0
- package/src/containers/TestContainer/TestContainer.tsx +28 -0
- package/src/containers/TestContainer/index.ts +7 -0
- package/src/containers/index.ts +13 -0
- package/src/e2e/ai.test.ts +92 -0
- package/src/e2e/deploy.test.ts +64 -0
- package/src/hooks/deploy.ts +43 -35
- package/src/hooks/format.ts +8 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/template.ts +22 -26
- package/src/hooks/useCompiler.ts +24 -0
- package/src/hooks/useCreateAndDeployScriptTemplates.ts +14 -16
- package/src/hooks/useToolbarState.ts +29 -4
- package/src/index.ts +2 -1
- package/src/meta.ts +8 -4
- package/src/notebook/{notebook.test.ts → compute-graph.test.ts} +31 -19
- package/src/notebook/{notebook.ts → compute-graph.ts} +65 -18
- package/src/notebook/eval.ts +1 -1
- package/src/notebook/index.ts +1 -1
- package/src/templates/anthropic.ts +42 -0
- package/src/templates/chess-bot.ts +58 -0
- package/src/templates/commentary.ts +231 -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/gmail.ts +1 -2
- package/src/templates/index.ts +18 -5
- package/src/templates/ping.ts +14 -5
- package/src/testing/data.ts +34 -9
- package/src/testing/simulator.test.ts +40 -0
- package/src/translations.ts +4 -3
- package/src/types/Notebook.ts +41 -0
- package/src/types/actions.ts +18 -26
- package/src/types/capabilities.ts +17 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +4 -1
- package/src/types/types.ts +15 -0
- package/src/util/deploy.ts +30 -40
- package/src/util/functions.ts +32 -28
- package/src/vite-env.d.ts +2 -0
- package/dist/lib/browser/DeploymentDialog-65TWT6S5.mjs +0 -13
- package/dist/lib/browser/NotebookContainer-LVGRPFY3.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-LRTRN7JW.mjs +0 -149
- package/dist/lib/browser/ScriptContainer-LRTRN7JW.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-DPYULSME.mjs +0 -65
- package/dist/lib/browser/app-graph-builder-DPYULSME.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-ET5KZ46I.mjs +0 -28
- package/dist/lib/browser/blueprint-definition-ET5KZ46I.mjs.map +0 -7
- package/dist/lib/browser/chunk-5CYLWXRH.mjs +0 -89
- package/dist/lib/browser/chunk-5CYLWXRH.mjs.map +0 -7
- package/dist/lib/browser/chunk-75LH4EUR.mjs +0 -326
- package/dist/lib/browser/chunk-75LH4EUR.mjs.map +0 -7
- package/dist/lib/browser/chunk-E7DXDICD.mjs +0 -282
- package/dist/lib/browser/chunk-E7DXDICD.mjs.map +0 -7
- package/dist/lib/browser/chunk-EZVXV6DA.mjs.map +0 -7
- package/dist/lib/browser/chunk-I3QSGUFJ.mjs +0 -646
- package/dist/lib/browser/chunk-I3QSGUFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-JO2O7W6J.mjs +0 -254
- package/dist/lib/browser/chunk-JO2O7W6J.mjs.map +0 -7
- package/dist/lib/browser/chunk-N6M34EUC.mjs +0 -112
- package/dist/lib/browser/chunk-N6M34EUC.mjs.map +0 -7
- package/dist/lib/browser/chunk-NM4WQS4F.mjs +0 -153
- package/dist/lib/browser/chunk-NM4WQS4F.mjs.map +0 -7
- package/dist/lib/browser/chunk-OKXN2N7M.mjs +0 -15
- package/dist/lib/browser/chunk-OKXN2N7M.mjs.map +0 -7
- package/dist/lib/browser/chunk-ST3ACVUC.mjs.map +0 -7
- package/dist/lib/browser/compiler-G2N2CG63.mjs +0 -98
- package/dist/lib/browser/compiler-G2N2CG63.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JLU7DVLQ.mjs +0 -105
- package/dist/lib/browser/intent-resolver-JLU7DVLQ.mjs.map +0 -7
- package/dist/lib/browser/react-surface-76SDTUYG.mjs +0 -127
- package/dist/lib/browser/react-surface-76SDTUYG.mjs.map +0 -7
- package/dist/lib/browser/settings-ERFKVNUK.mjs +0 -25
- package/dist/lib/browser/settings-ERFKVNUK.mjs.map +0 -7
- package/dist/lib/node-esm/DeploymentDialog-I63ZC2HH.mjs +0 -14
- package/dist/lib/node-esm/NotebookContainer-QY5NJGJI.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-SVXCSLNH.mjs +0 -150
- package/dist/lib/node-esm/ScriptContainer-SVXCSLNH.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-UXJGHXSL.mjs +0 -66
- package/dist/lib/node-esm/app-graph-builder-UXJGHXSL.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-AIYFOT7Q.mjs +0 -30
- package/dist/lib/node-esm/blueprint-definition-AIYFOT7Q.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-2GVTWESW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4X375PGY.mjs +0 -90
- package/dist/lib/node-esm/chunk-4X375PGY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-67OVZHI3.mjs +0 -327
- package/dist/lib/node-esm/chunk-67OVZHI3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-C2ORIPKH.mjs +0 -154
- package/dist/lib/node-esm/chunk-C2ORIPKH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-NUXZQQ6P.mjs +0 -16
- package/dist/lib/node-esm/chunk-NUXZQQ6P.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-OG2SIKHE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SMFPSKQT.mjs +0 -647
- package/dist/lib/node-esm/chunk-SMFPSKQT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VRSDE4CI.mjs +0 -114
- package/dist/lib/node-esm/chunk-VRSDE4CI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-VZAFGLD7.mjs +0 -283
- package/dist/lib/node-esm/chunk-VZAFGLD7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YW36TZ7K.mjs +0 -255
- package/dist/lib/node-esm/chunk-YW36TZ7K.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-PLDAZ5GJ.mjs +0 -99
- package/dist/lib/node-esm/compiler-PLDAZ5GJ.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-SFGTIFOG.mjs +0 -106
- package/dist/lib/node-esm/intent-resolver-SFGTIFOG.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-SHEBNW4R.mjs +0 -128
- package/dist/lib/node-esm/react-surface-SHEBNW4R.mjs.map +0 -7
- package/dist/lib/node-esm/settings-5TYXQ42N.mjs +0 -26
- package/dist/lib/node-esm/settings-5TYXQ42N.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/components/DeploymentDialog/DeploymentDialog.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts +0 -251
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.stories.d.ts.map +0 -1
- package/dist/types/src/components/DeploymentDialog/index.d.ts +0 -4
- package/dist/types/src/components/DeploymentDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/NotebookContainer.d.ts +0 -10
- package/dist/types/src/components/NotebookContainer.d.ts.map +0 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptContainer.d.ts +0 -12
- package/dist/types/src/components/ScriptContainer.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts +0 -8
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts +0 -6
- package/dist/types/src/components/Settings/ScriptPluginSettings.d.ts.map +0 -1
- package/dist/types/src/components/Settings/index.d.ts +0 -3
- package/dist/types/src/components/Settings/index.d.ts.map +0 -1
- package/dist/types/src/components/TestPanel/TestContainer.d.ts +0 -8
- package/dist/types/src/components/TestPanel/TestContainer.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/notebook/notebook.d.ts +0 -35
- package/dist/types/src/notebook/notebook.d.ts.map +0 -1
- package/dist/types/src/notebook/notebook.test.d.ts +0 -2
- package/dist/types/src/notebook/notebook.test.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/dist/types/src/types/schema.d.ts +0 -61
- package/dist/types/src/types/schema.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 -87
- package/src/capabilities/react-surface.tsx +0 -102
- package/src/capabilities/settings.ts +0 -21
- package/src/components/DeploymentDialog/DeploymentDialog.stories.tsx +0 -53
- package/src/components/DeploymentDialog/DeploymentDialog.tsx +0 -106
- package/src/components/DeploymentDialog/index.ts +0 -9
- package/src/components/NotebookContainer.stories.tsx +0 -32
- package/src/components/NotebookContainer.tsx +0 -124
- package/src/components/ScriptContainer.tsx +0 -69
- package/src/components/Settings/index.ts +0 -6
- package/src/components/TestPanel/TestContainer.tsx +0 -27
- package/src/events.ts +0 -11
- package/src/templates/chess.ts +0 -49
- package/src/types/schema.ts +0 -48
- /package/dist/lib/browser/{DeploymentDialog-65TWT6S5.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/DeploymentDialog-I63ZC2HH.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Obj, Type } from '@dxos/echo';
|
|
3
|
-
import { DataType } from '@dxos/schema';
|
|
4
|
-
export declare namespace Notebook {
|
|
5
|
-
type CellType = 'markdown' | 'script' | 'query' | 'prompt' | 'view';
|
|
6
|
-
const Cell: Schema.mutable<Schema.Struct<{
|
|
7
|
-
id: typeof Schema.String;
|
|
8
|
-
type: typeof Schema.String;
|
|
9
|
-
script: Schema.optional<Type.ref<Type.obj<Schema.Struct<{
|
|
10
|
-
content: typeof Schema.String;
|
|
11
|
-
}>>>>;
|
|
12
|
-
view: Schema.optional<Type.ref<Schema.Schema<DataType.View, import("@dxos/schema").ViewEncoded, never>>>;
|
|
13
|
-
chat: Schema.optional<Type.ref<Type.obj<Schema.Struct<{
|
|
14
|
-
id: import("@dxos/keys").ObjectIdClass;
|
|
15
|
-
name: Schema.optional<typeof Schema.String>;
|
|
16
|
-
queue: Type.ref<Schema.Schema<import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, never>>;
|
|
17
|
-
traceQueue: Schema.optional<Type.ref<Schema.Schema<import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, never>>>;
|
|
18
|
-
}>>>>;
|
|
19
|
-
}>>;
|
|
20
|
-
type Cell = Schema.Schema.Type<typeof Cell>;
|
|
21
|
-
const Notebook: Type.obj<Schema.Struct<{
|
|
22
|
-
name: Schema.optional<typeof Schema.String>;
|
|
23
|
-
cells: Schema.mutable<Schema.Array$<Schema.mutable<Schema.Struct<{
|
|
24
|
-
id: typeof Schema.String;
|
|
25
|
-
type: typeof Schema.String;
|
|
26
|
-
script: Schema.optional<Type.ref<Type.obj<Schema.Struct<{
|
|
27
|
-
content: typeof Schema.String;
|
|
28
|
-
}>>>>;
|
|
29
|
-
view: Schema.optional<Type.ref<Schema.Schema<DataType.View, import("@dxos/schema").ViewEncoded, never>>>;
|
|
30
|
-
chat: Schema.optional<Type.ref<Type.obj<Schema.Struct<{
|
|
31
|
-
id: import("@dxos/keys").ObjectIdClass;
|
|
32
|
-
name: Schema.optional<typeof Schema.String>;
|
|
33
|
-
queue: Type.ref<Schema.Schema<import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, never>>;
|
|
34
|
-
traceQueue: Schema.optional<Type.ref<Schema.Schema<import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>, never>>>;
|
|
35
|
-
}>>>>;
|
|
36
|
-
}>>>>;
|
|
37
|
-
}>>;
|
|
38
|
-
type Notebook = Schema.Schema.Type<typeof Notebook>;
|
|
39
|
-
const make: (props?: Obj.MakeProps<typeof Notebook>) => import("@dxos/live-object").Live<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
40
|
-
name?: string | undefined;
|
|
41
|
-
cells: {
|
|
42
|
-
id: string;
|
|
43
|
-
type: string;
|
|
44
|
-
script?: import("@dxos/echo/internal").Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
45
|
-
content: string;
|
|
46
|
-
}> | undefined;
|
|
47
|
-
view?: import("@dxos/echo/internal").Ref<DataType.View> | undefined;
|
|
48
|
-
chat?: import("@dxos/echo/internal").Ref<Type.OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
49
|
-
id: string;
|
|
50
|
-
name?: string | undefined;
|
|
51
|
-
queue: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>>;
|
|
52
|
-
traceQueue?: import("@dxos/echo/internal").Ref<import("@dxos/echo-db").Queue<Obj.Any | import("@dxos/echo/Relation").Any>> | undefined;
|
|
53
|
-
}> | undefined;
|
|
54
|
-
}[];
|
|
55
|
-
}>;
|
|
56
|
-
}
|
|
57
|
-
export declare const ScriptSettings: Schema.mutable<Schema.Struct<{
|
|
58
|
-
editorInputMode: Schema.Schema<"default" | "vim" | "vscode", "default" | "vim" | "vscode", never>;
|
|
59
|
-
}>>;
|
|
60
|
-
export type ScriptSettings = Schema.Schema.Type<typeof ScriptSettings>;
|
|
61
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,yBAAiB,QAAQ,CAAC;IACxB,KAAY,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEpE,MAAM,IAAI;;;;;;;;;;;;;OAMM,CAAC;IAExB,KAAY,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;IAE5C,MAAM,QAAQ;;;;;;;;;;;;;;;;OASpB,CAAC;IAEF,KAAY,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC;IAEpD,MAAM,IAAI,GAAI,QAAO,GAAG,CAAC,SAAS,CAAC,OAAO,QAAQ,CAAiB;;;;;;;;;;;;;;;;MAA8B,CAAC;CAC1G;AAED,eAAO,MAAM,cAAc;;GAI1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import * as Function from 'effect/Function';
|
|
7
|
-
import * as Option from 'effect/Option';
|
|
8
|
-
|
|
9
|
-
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { ScriptType } from '@dxos/functions';
|
|
12
|
-
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
13
|
-
import { createExtension } from '@dxos/plugin-graph';
|
|
14
|
-
|
|
15
|
-
import { meta } from '../meta';
|
|
16
|
-
|
|
17
|
-
export default (context: PluginContext) =>
|
|
18
|
-
contributes(Capabilities.AppGraphBuilder, [
|
|
19
|
-
createExtension({
|
|
20
|
-
id: `${meta.id}/execute`,
|
|
21
|
-
connector: (node) =>
|
|
22
|
-
Rx.make((get) =>
|
|
23
|
-
Function.pipe(
|
|
24
|
-
get(node),
|
|
25
|
-
Option.flatMap((node) => (Obj.instanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),
|
|
26
|
-
Option.map((node) => [
|
|
27
|
-
{
|
|
28
|
-
id: [node.id, 'execute'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
29
|
-
type: PLANK_COMPANION_TYPE,
|
|
30
|
-
data: 'execute',
|
|
31
|
-
properties: {
|
|
32
|
-
label: ['script test label', { ns: meta.id }],
|
|
33
|
-
icon: 'ph--terminal--regular',
|
|
34
|
-
disposition: 'hidden',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
]),
|
|
38
|
-
Option.getOrElse(() => []),
|
|
39
|
-
),
|
|
40
|
-
),
|
|
41
|
-
}),
|
|
42
|
-
createExtension({
|
|
43
|
-
id: `${meta.id}/logs`,
|
|
44
|
-
connector: (node) =>
|
|
45
|
-
Rx.make((get) =>
|
|
46
|
-
Function.pipe(
|
|
47
|
-
get(node),
|
|
48
|
-
Option.flatMap((node) => (Obj.instanceOf(ScriptType, node.data) ? Option.some(node) : Option.none())),
|
|
49
|
-
Option.map((node) => [
|
|
50
|
-
{
|
|
51
|
-
id: [node.id, 'logs'].join(ATTENDABLE_PATH_SEPARATOR),
|
|
52
|
-
type: PLANK_COMPANION_TYPE,
|
|
53
|
-
data: 'logs',
|
|
54
|
-
properties: {
|
|
55
|
-
label: ['script logs label', { ns: meta.id }],
|
|
56
|
-
icon: 'ph--clock-countdown--regular',
|
|
57
|
-
disposition: 'hidden',
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
]),
|
|
61
|
-
Option.getOrElse(() => []),
|
|
62
|
-
),
|
|
63
|
-
),
|
|
64
|
-
}),
|
|
65
|
-
]);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { Blueprint, Template } from '@dxos/blueprints';
|
|
7
|
-
import { type FunctionDefinition } from '@dxos/functions';
|
|
8
|
-
import { trim } from '@dxos/util';
|
|
9
|
-
|
|
10
|
-
const functions: FunctionDefinition[] = [];
|
|
11
|
-
const tools: string[] = [];
|
|
12
|
-
|
|
13
|
-
export default () => {
|
|
14
|
-
return [
|
|
15
|
-
contributes(Capabilities.Functions, functions),
|
|
16
|
-
contributes(
|
|
17
|
-
Capabilities.BlueprintDefinition,
|
|
18
|
-
Blueprint.make({
|
|
19
|
-
key: 'dxos.org/blueprint/script',
|
|
20
|
-
name: 'Script',
|
|
21
|
-
tools: Blueprint.toolDefinitions({ functions, tools }),
|
|
22
|
-
instructions: Template.make({
|
|
23
|
-
source: trim`
|
|
24
|
-
You can create and update scripts which contain Typescript code.
|
|
25
|
-
`,
|
|
26
|
-
}),
|
|
27
|
-
}),
|
|
28
|
-
),
|
|
29
|
-
];
|
|
30
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { type Compiler } from '../compiler';
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
|
|
10
|
-
export namespace ScriptCapabilities {
|
|
11
|
-
export const Compiler = defineCapability<Compiler>(`${meta.id}/capability/compiler`);
|
|
12
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
import wasmUrl from 'esbuild-wasm/esbuild.wasm?url';
|
|
7
|
-
|
|
8
|
-
import { contributes } from '@dxos/app-framework';
|
|
9
|
-
import { initializeBundler } from '@dxos/functions/bundler';
|
|
10
|
-
|
|
11
|
-
import { Compiler } from '../compiler';
|
|
12
|
-
|
|
13
|
-
import { ScriptCapabilities } from './capabilities';
|
|
14
|
-
|
|
15
|
-
export default async () => {
|
|
16
|
-
const compiler = new Compiler();
|
|
17
|
-
|
|
18
|
-
await compiler.initialize();
|
|
19
|
-
// TODO(wittjosiah): Fetch types for https modules.
|
|
20
|
-
compiler.setFile('/src/typings.d.ts', "declare module 'https://*';");
|
|
21
|
-
// TODO(wittjosiah): Proper function handler types.
|
|
22
|
-
// TODO(wittjosiah): Remove.
|
|
23
|
-
compiler.setFile(
|
|
24
|
-
'/src/runtime.ts',
|
|
25
|
-
`
|
|
26
|
-
export const Filter: any = {};
|
|
27
|
-
export type FunctionHandler = ({ event, context }: { event: any; context: any }) => Promise<Response>;
|
|
28
|
-
export const functionHandler = (handler: FunctionHandler) => handler;
|
|
29
|
-
`,
|
|
30
|
-
);
|
|
31
|
-
await initializeBundler({ wasmUrl });
|
|
32
|
-
|
|
33
|
-
return contributes(ScriptCapabilities.Compiler, compiler);
|
|
34
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Octokit } from '@octokit/core';
|
|
6
|
-
import * as Predicate from 'effect/Predicate';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, LayoutAction, contributes, createIntent, createResolver } from '@dxos/app-framework';
|
|
9
|
-
import { Obj, Ref } from '@dxos/echo';
|
|
10
|
-
import { ScriptType } from '@dxos/functions';
|
|
11
|
-
import { TokenManagerAction } from '@dxos/plugin-token-manager/types';
|
|
12
|
-
import { DataType } from '@dxos/schema';
|
|
13
|
-
|
|
14
|
-
import { DEPLOYMENT_DIALOG } from '../components';
|
|
15
|
-
import { defaultScriptsForIntegration } from '../meta';
|
|
16
|
-
import { templates } from '../templates';
|
|
17
|
-
import { Notebook, ScriptAction } from '../types';
|
|
18
|
-
|
|
19
|
-
export default () =>
|
|
20
|
-
contributes(Capabilities.IntentResolver, [
|
|
21
|
-
createResolver({
|
|
22
|
-
intent: ScriptAction.CreateScript,
|
|
23
|
-
resolve: async ({ name, gistUrl, initialTemplateId }) => {
|
|
24
|
-
let content = templates[0].source;
|
|
25
|
-
|
|
26
|
-
const gistId = gistUrl?.split('/').at(-1);
|
|
27
|
-
if (gistId) {
|
|
28
|
-
// TODO(wittjosiah): Capability which contributes Octokit?
|
|
29
|
-
// NOTE: AccessToken not needed to read public gists.
|
|
30
|
-
const octokit = new Octokit();
|
|
31
|
-
const response = await octokit.request('GET /gists/{gist_id}', {
|
|
32
|
-
gist_id: gistId,
|
|
33
|
-
});
|
|
34
|
-
const gistContent = Object.values(response.data.files ?? {})[0]?.content;
|
|
35
|
-
if (gistContent) {
|
|
36
|
-
content = gistContent;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (initialTemplateId) {
|
|
41
|
-
const template = templates.find((template) => template.id === initialTemplateId);
|
|
42
|
-
if (template) {
|
|
43
|
-
content = template.source;
|
|
44
|
-
name = name || template.name;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
data: {
|
|
50
|
-
object: Obj.make(ScriptType, { name, source: Ref.make(DataType.makeText(content)) }),
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
}),
|
|
55
|
-
createResolver({
|
|
56
|
-
intent: ScriptAction.CreateNotebook,
|
|
57
|
-
resolve: async ({ name }) => {
|
|
58
|
-
return {
|
|
59
|
-
data: {
|
|
60
|
-
object: Obj.make(Notebook.Notebook, { name, cells: [] }),
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
},
|
|
64
|
-
}),
|
|
65
|
-
createResolver({
|
|
66
|
-
intent: TokenManagerAction.AccessTokenCreated,
|
|
67
|
-
resolve: async ({ accessToken }) => {
|
|
68
|
-
const scriptTemplates = (defaultScriptsForIntegration[accessToken.source] ?? [])
|
|
69
|
-
.map((id) => templates.find((t) => t.id === id))
|
|
70
|
-
.filter(Predicate.isNotNullable);
|
|
71
|
-
|
|
72
|
-
if (scriptTemplates.length > 0) {
|
|
73
|
-
return {
|
|
74
|
-
intents: [
|
|
75
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
76
|
-
part: 'dialog',
|
|
77
|
-
subject: DEPLOYMENT_DIALOG,
|
|
78
|
-
options: { blockAlign: 'start', state: true, props: { accessToken, scriptTemplates } },
|
|
79
|
-
}),
|
|
80
|
-
],
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return { data: undefined };
|
|
85
|
-
},
|
|
86
|
-
}),
|
|
87
|
-
]);
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, createSurface, useCapability } from '@dxos/app-framework';
|
|
8
|
-
import { InvocationTraceContainer } from '@dxos/devtools';
|
|
9
|
-
import { Obj } from '@dxos/echo';
|
|
10
|
-
import { ScriptType } from '@dxos/functions';
|
|
11
|
-
import { SettingsStore } from '@dxos/local-storage';
|
|
12
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
13
|
-
import { StackItem } from '@dxos/react-ui-stack';
|
|
14
|
-
import { type DataType } from '@dxos/schema';
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
DEPLOYMENT_DIALOG,
|
|
18
|
-
DeploymentDialog,
|
|
19
|
-
NotebookContainer,
|
|
20
|
-
ScriptContainer,
|
|
21
|
-
ScriptObjectSettings,
|
|
22
|
-
ScriptPluginSettings,
|
|
23
|
-
ScriptProperties,
|
|
24
|
-
TestContainer,
|
|
25
|
-
} from '../components';
|
|
26
|
-
import { meta } from '../meta';
|
|
27
|
-
import { Notebook, type ScriptSettings } from '../types';
|
|
28
|
-
|
|
29
|
-
import { ScriptCapabilities } from './capabilities';
|
|
30
|
-
|
|
31
|
-
export default () =>
|
|
32
|
-
contributes(Capabilities.ReactSurface, [
|
|
33
|
-
createSurface({
|
|
34
|
-
id: `${meta.id}/plugin-settings`,
|
|
35
|
-
role: 'article',
|
|
36
|
-
filter: (data): data is { subject: SettingsStore<ScriptSettings> } =>
|
|
37
|
-
data.subject instanceof SettingsStore && data.subject.prefix === meta.id,
|
|
38
|
-
component: ({ data: { subject } }) => <ScriptPluginSettings settings={subject.value} />,
|
|
39
|
-
}),
|
|
40
|
-
createSurface({
|
|
41
|
-
id: `${meta.id}/script/article`,
|
|
42
|
-
role: ['article', 'section'],
|
|
43
|
-
filter: (data): data is { subject: ScriptType } => Obj.instanceOf(ScriptType, data.subject),
|
|
44
|
-
component: ({ data, role }) => {
|
|
45
|
-
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
46
|
-
// TODO(dmaretskyi): Since settings store is not reactive, this would break on the script plugin being enabled without a page reload.
|
|
47
|
-
const settings = useCapability(Capabilities.SettingsStore).getStore<ScriptSettings>(meta.id)?.value;
|
|
48
|
-
return <ScriptContainer role={role} script={data.subject} settings={settings} env={compiler.environment} />;
|
|
49
|
-
},
|
|
50
|
-
}),
|
|
51
|
-
createSurface({
|
|
52
|
-
id: `${meta.id}/notebook/article`,
|
|
53
|
-
role: 'article',
|
|
54
|
-
filter: (data): data is { subject: Notebook.Notebook } => Obj.instanceOf(Notebook.Notebook, data.subject),
|
|
55
|
-
component: ({ data, role }) => {
|
|
56
|
-
const compiler = useCapability(ScriptCapabilities.Compiler);
|
|
57
|
-
return <NotebookContainer role={role} notebook={data.subject} env={compiler.environment} />;
|
|
58
|
-
},
|
|
59
|
-
}),
|
|
60
|
-
// TODO(burdon): Standardize PluginSettings vs ObjectSettings.
|
|
61
|
-
// TODO(burdon): Why is ScriptProperties different from ScriptObjectSettings?
|
|
62
|
-
createSurface({
|
|
63
|
-
id: `${meta.id}/companion/base-settings`,
|
|
64
|
-
role: 'base-object-settings',
|
|
65
|
-
filter: (data): data is { subject: ScriptType } => Obj.instanceOf(ScriptType, data.subject),
|
|
66
|
-
component: ({ data }) => <ScriptProperties object={data.subject} />,
|
|
67
|
-
}),
|
|
68
|
-
createSurface({
|
|
69
|
-
id: `${meta.id}/companion/settings`,
|
|
70
|
-
role: 'object-settings',
|
|
71
|
-
filter: (data): data is { subject: ScriptType } => Obj.instanceOf(ScriptType, data.subject),
|
|
72
|
-
component: ({ data }) => <ScriptObjectSettings object={data.subject} />,
|
|
73
|
-
}),
|
|
74
|
-
createSurface({
|
|
75
|
-
id: `${meta.id}/companion/execute`,
|
|
76
|
-
role: 'article',
|
|
77
|
-
filter: (data): data is { companionTo: ScriptType } =>
|
|
78
|
-
Obj.instanceOf(ScriptType, data.companionTo) && data.subject === 'execute',
|
|
79
|
-
component: ({ data, role }) => <TestContainer script={data.companionTo} role={role} />,
|
|
80
|
-
}),
|
|
81
|
-
createSurface({
|
|
82
|
-
id: `${meta.id}/companion/logs`,
|
|
83
|
-
role: 'article',
|
|
84
|
-
filter: (data): data is { companionTo: ScriptType } =>
|
|
85
|
-
Obj.instanceOf(ScriptType, data.companionTo) && data.subject === 'logs',
|
|
86
|
-
component: ({ data, role }) => {
|
|
87
|
-
const space = getSpace(data.companionTo);
|
|
88
|
-
return (
|
|
89
|
-
<StackItem.Content>
|
|
90
|
-
<InvocationTraceContainer space={space} target={data.companionTo} detailAxis='block' />
|
|
91
|
-
</StackItem.Content>
|
|
92
|
-
);
|
|
93
|
-
},
|
|
94
|
-
}),
|
|
95
|
-
createSurface({
|
|
96
|
-
id: DEPLOYMENT_DIALOG,
|
|
97
|
-
role: 'dialog',
|
|
98
|
-
filter: (data): data is { props: { accessToken: DataType.AccessToken; scriptTemplates: any } } =>
|
|
99
|
-
data.component === DEPLOYMENT_DIALOG,
|
|
100
|
-
component: ({ data }) => <DeploymentDialog {...data.props} />,
|
|
101
|
-
}),
|
|
102
|
-
]);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
6
|
-
import { live } from '@dxos/live-object';
|
|
7
|
-
|
|
8
|
-
import { meta } from '../meta';
|
|
9
|
-
import { ScriptSettings } from '../types';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const settings = live<ScriptSettings>({
|
|
13
|
-
editorInputMode: 'vscode',
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
return contributes(Capabilities.Settings, {
|
|
17
|
-
prefix: meta.id,
|
|
18
|
-
schema: ScriptSettings,
|
|
19
|
-
value: settings,
|
|
20
|
-
});
|
|
21
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import React from 'react';
|
|
7
|
-
|
|
8
|
-
import { IntentPlugin } from '@dxos/app-framework';
|
|
9
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { Obj } from '@dxos/echo';
|
|
11
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
12
|
-
import { Dialog } from '@dxos/react-ui';
|
|
13
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
14
|
-
import { DataType } from '@dxos/schema';
|
|
15
|
-
|
|
16
|
-
import { translations } from '../../translations';
|
|
17
|
-
|
|
18
|
-
import { DeploymentDialog, type DeploymentDialogProps } from './DeploymentDialog';
|
|
19
|
-
|
|
20
|
-
const DefaultStory = (props: DeploymentDialogProps) => {
|
|
21
|
-
return (
|
|
22
|
-
<Dialog.Root defaultOpen={true}>
|
|
23
|
-
<DeploymentDialog {...props} />
|
|
24
|
-
</Dialog.Root>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const meta = {
|
|
29
|
-
title: 'plugins/plugin-script/DeploymentDialog',
|
|
30
|
-
component: DeploymentDialog,
|
|
31
|
-
render: DefaultStory,
|
|
32
|
-
parameters: { translations },
|
|
33
|
-
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
34
|
-
decorators: [withTheme, withPluginManager({ plugins: [IntentPlugin(), ClientPlugin({})] })],
|
|
35
|
-
} satisfies Meta<typeof DefaultStory>;
|
|
36
|
-
|
|
37
|
-
export default meta;
|
|
38
|
-
|
|
39
|
-
type Story = StoryObj<typeof meta>;
|
|
40
|
-
|
|
41
|
-
export const Default: Story = {
|
|
42
|
-
args: {
|
|
43
|
-
accessToken: Obj.make(DataType.AccessToken, {
|
|
44
|
-
source: 'example.com',
|
|
45
|
-
token: 'example-token',
|
|
46
|
-
}),
|
|
47
|
-
scriptTemplates: [
|
|
48
|
-
{ id: 't-1', name: 'Script 1', source: 'template1' },
|
|
49
|
-
{ id: 't-2', name: 'Script 2', source: 'template2' },
|
|
50
|
-
{ id: 't-3', name: 'Script 3', source: 'template3' },
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React, { useEffect, useMemo } from 'react';
|
|
6
|
-
|
|
7
|
-
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
8
|
-
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
-
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
10
|
-
import { type DataType } from '@dxos/schema';
|
|
11
|
-
|
|
12
|
-
import { useCreateAndDeployScriptTemplates } from '../../hooks/useCreateAndDeployScriptTemplates';
|
|
13
|
-
import { meta } from '../../meta';
|
|
14
|
-
import { type Template } from '../../templates';
|
|
15
|
-
|
|
16
|
-
export const DEPLOYMENT_DIALOG = `${meta.id}/deployment/dialog`;
|
|
17
|
-
|
|
18
|
-
// TODO(ZaymonFC):
|
|
19
|
-
// - Show activity and feedback to the user.
|
|
20
|
-
// - Only take an array of templateIds and get the name from the data.
|
|
21
|
-
// - Pending / onError states.
|
|
22
|
-
|
|
23
|
-
export type DeploymentDialogProps = {
|
|
24
|
-
accessToken: DataType.AccessToken;
|
|
25
|
-
scriptTemplates: Template[];
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDialogProps) => {
|
|
29
|
-
const { t } = useTranslation(meta.id);
|
|
30
|
-
const space = useMemo(() => getSpace(accessToken), [accessToken]);
|
|
31
|
-
|
|
32
|
-
// TODO(ZaymonFC): Thinking further. All of this should get moved to intents to run async in the background.
|
|
33
|
-
// Deployment shouldn't be tied to the lifecycle of the dialogue component.
|
|
34
|
-
const { handleCreateAndDeployScripts, status } = useCreateAndDeployScriptTemplates(space, scriptTemplates);
|
|
35
|
-
const { dispatchPromise: dispatch } = useIntentDispatcher();
|
|
36
|
-
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
if (status === 'success') {
|
|
39
|
-
// TODO(ZaymonFC): We can probably re-use this toast for normal script deployment.
|
|
40
|
-
void dispatch(
|
|
41
|
-
createIntent(LayoutAction.AddToast, {
|
|
42
|
-
part: 'toast',
|
|
43
|
-
subject: {
|
|
44
|
-
id: `${meta.id}/deployment-success`,
|
|
45
|
-
icon: 'ph--check--regular',
|
|
46
|
-
duration: Infinity,
|
|
47
|
-
title: ['script deployment toast label', { ns: meta.id, count: scriptTemplates.length }],
|
|
48
|
-
description: ['script deployment toast description', { ns: meta.id, count: scriptTemplates.length }],
|
|
49
|
-
closeLabel: ['script deployment toast close label', { ns: meta.id, count: scriptTemplates.length }],
|
|
50
|
-
},
|
|
51
|
-
}),
|
|
52
|
-
);
|
|
53
|
-
void dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } }));
|
|
54
|
-
}
|
|
55
|
-
if (status === 'error') {
|
|
56
|
-
void dispatch(createIntent(LayoutAction.UpdateDialog, { part: 'dialog', options: { state: false } }));
|
|
57
|
-
void dispatch(
|
|
58
|
-
createIntent(LayoutAction.AddToast, {
|
|
59
|
-
part: 'toast',
|
|
60
|
-
subject: {
|
|
61
|
-
id: `${meta.id}/deployment-error`,
|
|
62
|
-
icon: 'ph--warning--regular',
|
|
63
|
-
duration: Infinity,
|
|
64
|
-
title: ['script deployment error toast label', { ns: meta.id, count: scriptTemplates.length }],
|
|
65
|
-
description: ['script deployment error toast description', { ns: meta.id, count: scriptTemplates.length }],
|
|
66
|
-
closeLabel: ['script deployment error toast close label', { ns: meta.id, count: scriptTemplates.length }],
|
|
67
|
-
},
|
|
68
|
-
}),
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
}, [status, dispatch]);
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<Dialog.Content>
|
|
75
|
-
<div className='flex justify-between items-center'>
|
|
76
|
-
<Dialog.Title>{t('deployment dialog title')}</Dialog.Title>
|
|
77
|
-
<Dialog.Close asChild>
|
|
78
|
-
<Button density='fine' variant='ghost'>
|
|
79
|
-
<Icon icon='ph--x--regular' size={4} />
|
|
80
|
-
</Button>
|
|
81
|
-
</Dialog.Close>
|
|
82
|
-
</div>
|
|
83
|
-
<div role='none' className='plb-4'>
|
|
84
|
-
{/* TODO: Implement deployment logic and UI. */}
|
|
85
|
-
<p>{t('deployment dialog scripts found message', { count: scriptTemplates.length })}</p>
|
|
86
|
-
<ul className='pbs-2'>
|
|
87
|
-
{scriptTemplates.map((template) => {
|
|
88
|
-
return <li key={template.id}>{template.name}</li>;
|
|
89
|
-
})}
|
|
90
|
-
</ul>
|
|
91
|
-
</div>
|
|
92
|
-
<div role='none' className='flex flex-row-reverse gap-1'>
|
|
93
|
-
<Button variant='primary' onClick={handleCreateAndDeployScripts} disabled={status === 'pending'}>
|
|
94
|
-
{status === 'pending'
|
|
95
|
-
? t('deployment dialog deploy functions pending button label', { count: scriptTemplates.length })
|
|
96
|
-
: t('deployment dialog deploy functions button label', { count: scriptTemplates.length })}
|
|
97
|
-
</Button>
|
|
98
|
-
<Dialog.Close asChild disabled={status === 'pending'}>
|
|
99
|
-
<Button disabled={status === 'pending'}>{t('deployment dialog skip button label')}</Button>
|
|
100
|
-
</Dialog.Close>
|
|
101
|
-
</div>
|
|
102
|
-
</Dialog.Content>
|
|
103
|
-
);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export default DeploymentDialog;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
|
|
7
|
-
import { withClientProvider } from '@dxos/react-client/testing';
|
|
8
|
-
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
9
|
-
|
|
10
|
-
import { createNotebook } from '../testing';
|
|
11
|
-
import { translations } from '../translations';
|
|
12
|
-
|
|
13
|
-
import { NotebookContainer } from './NotebookContainer';
|
|
14
|
-
|
|
15
|
-
const meta = {
|
|
16
|
-
title: 'plugins/plugin-script/NotebookContainer',
|
|
17
|
-
component: NotebookContainer,
|
|
18
|
-
decorators: [withTheme, withLayout({ container: 'column', classNames: 'is-prose' }), withClientProvider()],
|
|
19
|
-
parameters: {
|
|
20
|
-
translations,
|
|
21
|
-
},
|
|
22
|
-
} satisfies Meta<typeof NotebookContainer>;
|
|
23
|
-
|
|
24
|
-
export default meta;
|
|
25
|
-
|
|
26
|
-
type Story = StoryObj<typeof meta>;
|
|
27
|
-
|
|
28
|
-
export const Default: Story = {
|
|
29
|
-
args: {
|
|
30
|
-
notebook: createNotebook(),
|
|
31
|
-
},
|
|
32
|
-
};
|