@dxos/plugin-script 0.8.4-main.3eb6e50203 → 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/{chunk-BU6CGVU2.mjs → DeploymentDialog-IIOXAS47.mjs} +11 -10
- package/dist/lib/browser/DeploymentDialog-IIOXAS47.mjs.map +7 -0
- package/dist/lib/browser/{NotebookContainer-UQ4I24R6.mjs → NotebookContainer-VVZOKGRC.mjs} +31 -26
- 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/{blueprint-definition-5RFKE7VK.mjs → blueprint-definition-YMZEJBAZ.mjs} +4 -5
- package/dist/lib/browser/blueprint-definition-YMZEJBAZ.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +3 -3
- package/dist/lib/browser/{chunk-3BSF5BIA.mjs → chunk-6IXFDTAI.mjs} +6 -6
- package/dist/lib/browser/{chunk-3BSF5BIA.mjs.map → chunk-6IXFDTAI.mjs.map} +3 -3
- 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-4N5TLXEJ.mjs → chunk-J7PGML5B.mjs} +3 -3
- package/dist/lib/browser/chunk-J7PGML5B.mjs.map +7 -0
- package/dist/lib/browser/{chunk-WWCDIB6Z.mjs → chunk-MUEVLYXJ.mjs} +89 -249
- 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-F3QKSKSF.mjs → chunk-TW27W3EL.mjs} +11 -17
- package/dist/lib/browser/chunk-TW27W3EL.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-VPUVTFQD.mjs → compiler-53G6ZHQM.mjs} +10 -72
- package/dist/lib/browser/compiler-53G6ZHQM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +24 -19
- package/dist/lib/browser/index.mjs.map +1 -1
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{operation-resolver-NYDY7GDT.mjs → operation-resolver-CYEISDDK.mjs} +4 -8
- package/dist/lib/browser/operation-resolver-CYEISDDK.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-FYOQSC6S.mjs → react-surface-26P6HAFD.mjs} +14 -13
- package/dist/lib/browser/react-surface-26P6HAFD.mjs.map +7 -0
- package/dist/lib/browser/{settings-5SF77MRH.mjs → settings-76UM7442.mjs} +3 -3
- package/dist/lib/browser/templates/index.mjs +1 -1
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/lib/node-esm/{chunk-U6PXM2HT.mjs → DeploymentDialog-ZHPHEV2H.mjs} +11 -10
- package/dist/lib/node-esm/DeploymentDialog-ZHPHEV2H.mjs.map +7 -0
- package/dist/lib/node-esm/{NotebookContainer-DQGZ6QHI.mjs → NotebookContainer-ZLWTNMQA.mjs} +31 -26
- 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/{blueprint-definition-EYL5GNDC.mjs → blueprint-definition-5MGY6BRQ.mjs} +4 -5
- package/dist/lib/node-esm/blueprint-definition-5MGY6BRQ.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +3 -3
- 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-H46R2RS5.mjs +790 -0
- package/dist/lib/node-esm/chunk-H46R2RS5.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-V37R7KB5.mjs → chunk-QG6ANK4B.mjs} +3 -3
- package/dist/lib/node-esm/chunk-QG6ANK4B.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-Y3G5NCTP.mjs → chunk-S7DSCLOW.mjs} +11 -16
- 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-KRVL7UYI.mjs → chunk-WWD5LUU6.mjs} +6 -6
- package/dist/lib/node-esm/{chunk-KRVL7UYI.mjs.map → chunk-WWD5LUU6.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-ECRSTVR6.mjs → chunk-ZDJ2FI7E.mjs} +89 -249
- package/dist/lib/node-esm/chunk-ZDJ2FI7E.mjs.map +7 -0
- package/dist/lib/node-esm/{compiler-WUOSY6MS.mjs → compiler-HHQW7EP3.mjs} +10 -72
- package/dist/lib/node-esm/compiler-HHQW7EP3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +24 -19
- package/dist/lib/node-esm/index.mjs.map +1 -1
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{operation-resolver-AJNJXGCE.mjs → operation-resolver-HFFDXWND.mjs} +4 -8
- package/dist/lib/node-esm/operation-resolver-HFFDXWND.mjs.map +7 -0
- package/dist/lib/node-esm/{react-surface-LREMOVNJ.mjs → react-surface-THCIK266.mjs} +14 -13
- package/dist/lib/node-esm/react-surface-THCIK266.mjs.map +7 -0
- package/dist/lib/node-esm/{settings-ILI762CY.mjs → settings-CCHDPLFJ.mjs} +3 -3
- package/dist/lib/node-esm/templates/index.mjs +1 -1
- package/dist/lib/node-esm/types/index.mjs +2 -2
- package/dist/types/src/blueprints/index.d.ts +1 -1
- package/dist/types/src/blueprints/index.d.ts.map +1 -1
- package/dist/types/src/blueprints/script-blueprint.d.ts +3 -21
- package/dist/types/src/blueprints/script-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/artifact-definition/artifact-definition.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +1 -5
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +1 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/compiler/compiler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/settings/settings.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.map +1 -1
- package/dist/types/src/components/NotebookStack/NotebookStack.stories.d.ts.map +1 -1
- package/dist/types/src/components/QueryEditor/QueryEditor.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts +3 -2
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.d.ts.map +1 -1
- package/dist/types/src/components/ScriptToolbar/ScriptToolbar.stories.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.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 +0 -2
- package/dist/types/src/containers/DeploymentDialog/DeploymentDialog.d.ts.map +1 -0
- package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.d.ts.map +1 -1
- 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/{components → containers/NotebookContainer}/NotebookContainer.d.ts +2 -3
- package/dist/types/src/containers/NotebookContainer/NotebookContainer.d.ts.map +1 -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/{components → containers/ScriptContainer}/ScriptContainer.d.ts +2 -3
- 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/{components/Settings → containers/ScriptObjectSettings}/ScriptObjectSettings.d.ts +0 -1
- 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.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.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/hooks/deploy.d.ts +2 -1
- package/dist/types/src/hooks/deploy.d.ts.map +1 -1
- package/dist/types/src/hooks/format.d.ts +1 -0
- package/dist/types/src/hooks/format.d.ts.map +1 -1
- package/dist/types/src/hooks/template.d.ts +1 -0
- package/dist/types/src/hooks/template.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/templates/chess-bot.d.ts.map +1 -1
- package/dist/types/src/templates/commentary.d.ts.map +1 -1
- package/dist/types/src/types/Notebook.d.ts +12 -4
- package/dist/types/src/types/Notebook.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +74 -74
- package/src/blueprints/index.ts +1 -1
- package/src/blueprints/script-blueprint.ts +14 -7
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +4 -11
- package/src/capabilities/operation-resolver/operation-resolver.ts +1 -1
- package/src/capabilities/react-surface/react-surface.tsx +13 -11
- package/src/components/FrameContainer/FrameContainer.tsx +2 -3
- package/src/components/FrameContainer/frame.html +21 -21
- package/src/components/NotebookStack/NotebookCell.tsx +7 -9
- package/src/components/NotebookStack/NotebookStack.stories.tsx +2 -3
- package/src/components/NotebookStack/NotebookStack.tsx +3 -3
- package/src/components/QueryEditor/QueryEditor.stories.tsx +16 -14
- package/src/components/ScriptToolbar/ScriptToolbar.stories.tsx +4 -5
- package/src/components/ScriptToolbar/ScriptToolbar.tsx +7 -7
- package/src/components/TestPanel/TestPanel.tsx +6 -6
- package/src/components/TestPanel/index.ts +0 -1
- package/src/components/TypescriptEditor/TypescriptEditor.stories.tsx +16 -14
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +1 -1
- package/src/components/index.ts +4 -9
- package/src/constants.ts +7 -0
- package/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.tsx +3 -4
- package/src/{components → containers}/DeploymentDialog/DeploymentDialog.tsx +2 -6
- package/src/containers/DeploymentDialog/index.ts +7 -0
- package/src/{components → containers/NotebookContainer}/NotebookContainer.stories.tsx +7 -7
- package/src/{components → containers/NotebookContainer}/NotebookContainer.tsx +36 -39
- package/src/containers/NotebookContainer/index.ts +7 -0
- package/src/{components → containers/ScriptContainer}/ScriptContainer.tsx +20 -20
- package/src/containers/ScriptContainer/index.ts +7 -0
- package/src/{components/Settings → containers/ScriptObjectSettings}/ScriptObjectSettings.tsx +3 -21
- package/src/containers/ScriptObjectSettings/index.ts +7 -0
- 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/{components/TestPanel → containers/TestContainer}/TestContainer.tsx +7 -6
- package/src/containers/TestContainer/index.ts +7 -0
- package/src/containers/index.ts +13 -0
- package/src/e2e/deploy.test.ts +1 -1
- package/src/hooks/deploy.ts +5 -5
- package/src/hooks/format.ts +1 -0
- package/src/hooks/template.ts +2 -2
- package/src/index.ts +1 -0
- package/src/templates/chess-bot.ts +2 -2
- package/src/templates/commentary.ts +4 -3
- package/src/types/Notebook.ts +4 -4
- package/dist/lib/browser/DeploymentDialog-XUAFCNI7.mjs +0 -14
- package/dist/lib/browser/DeploymentDialog-XUAFCNI7.mjs.map +0 -7
- package/dist/lib/browser/NotebookContainer-UQ4I24R6.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-NB76645V.mjs +0 -149
- package/dist/lib/browser/ScriptContainer-NB76645V.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-5RFKE7VK.mjs.map +0 -7
- package/dist/lib/browser/chunk-4N5TLXEJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-BKGEAUUH.mjs +0 -270
- package/dist/lib/browser/chunk-BKGEAUUH.mjs.map +0 -7
- package/dist/lib/browser/chunk-BU6CGVU2.mjs.map +0 -7
- package/dist/lib/browser/chunk-F3QKSKSF.mjs.map +0 -7
- package/dist/lib/browser/chunk-I7CSE6T3.mjs +0 -110
- package/dist/lib/browser/chunk-I7CSE6T3.mjs.map +0 -7
- package/dist/lib/browser/chunk-LYMPME7J.mjs +0 -609
- package/dist/lib/browser/chunk-LYMPME7J.mjs.map +0 -7
- package/dist/lib/browser/chunk-WWCDIB6Z.mjs.map +0 -7
- package/dist/lib/browser/compiler-VPUVTFQD.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-NYDY7GDT.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FYOQSC6S.mjs.map +0 -7
- package/dist/lib/node-esm/DeploymentDialog-GGWDQMEB.mjs +0 -15
- package/dist/lib/node-esm/DeploymentDialog-GGWDQMEB.mjs.map +0 -7
- package/dist/lib/node-esm/NotebookContainer-DQGZ6QHI.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-PCNJFUWX.mjs +0 -150
- package/dist/lib/node-esm/ScriptContainer-PCNJFUWX.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-EYL5GNDC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3CKQUF55.mjs +0 -610
- package/dist/lib/node-esm/chunk-3CKQUF55.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3QBXN6QC.mjs +0 -271
- package/dist/lib/node-esm/chunk-3QBXN6QC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-ECRSTVR6.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs +0 -112
- package/dist/lib/node-esm/chunk-SLU3KRV3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-U6PXM2HT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V37R7KB5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Y3G5NCTP.mjs.map +0 -7
- package/dist/lib/node-esm/compiler-WUOSY6MS.mjs.map +0 -7
- package/dist/lib/node-esm/operation-resolver-AJNJXGCE.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-LREMOVNJ.mjs.map +0 -7
- package/dist/types/src/components/DeploymentDialog/DeploymentDialog.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.map +0 -1
- package/dist/types/src/components/NotebookContainer.stories.d.ts.map +0 -1
- package/dist/types/src/components/ScriptContainer.d.ts.map +0 -1
- package/dist/types/src/components/Settings/ScriptObjectSettings.d.ts.map +0 -1
- 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.map +0 -1
- package/src/components/DeploymentDialog/index.ts +0 -9
- package/src/components/Settings/index.ts +0 -6
- /package/dist/lib/browser/{settings-5SF77MRH.mjs.map → settings-76UM7442.mjs.map} +0 -0
- /package/dist/lib/node-esm/{settings-ILI762CY.mjs.map → settings-CCHDPLFJ.mjs.map} +0 -0
- /package/dist/types/src/{components → containers}/DeploymentDialog/DeploymentDialog.stories.d.ts +0 -0
- /package/dist/types/src/{components → containers/NotebookContainer}/NotebookContainer.stories.d.ts +0 -0
- /package/dist/types/src/{components/Settings → containers/ScriptPluginSettings}/ScriptPluginSettings.d.ts +0 -0
- /package/dist/types/src/{components/TestPanel → containers/TestContainer}/TestContainer.d.ts +0 -0
- /package/src/{components/Settings → containers/ScriptPluginSettings}/ScriptPluginSettings.tsx +0 -0
|
@@ -7,7 +7,7 @@ import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
|
7
7
|
import { log } from '@dxos/log';
|
|
8
8
|
import { Avatar, Icon, Input, ScrollArea, type ThemedClassName, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
9
9
|
import { SyntaxHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
10
|
-
import {
|
|
10
|
+
import { mx } from '@dxos/ui-theme';
|
|
11
11
|
|
|
12
12
|
import { meta } from '../../meta';
|
|
13
13
|
|
|
@@ -174,7 +174,7 @@ export const TestPanel = ({ classNames, functionUrl }: TestPanelProps) => {
|
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
return (
|
|
177
|
-
<div className={mx('flex flex-col
|
|
177
|
+
<div className={mx('flex flex-col h-full overflow-hidden', classNames)}>
|
|
178
178
|
{/* TODO(burdon): Replace with Thread. */}
|
|
179
179
|
<MessageThread ref={scrollerRef} state={state} result={result} history={history} />
|
|
180
180
|
{/* TODO(burdon): Replace with Form based on the function's input schema. */}
|
|
@@ -219,7 +219,7 @@ type MessageThreadProps = {
|
|
|
219
219
|
const MessageThread = forwardRef<HTMLDivElement, MessageThreadProps>(
|
|
220
220
|
({ state, history, result }: MessageThreadProps, forwardedRef) => {
|
|
221
221
|
return (
|
|
222
|
-
<ScrollArea.Root orientation='vertical' classNames='
|
|
222
|
+
<ScrollArea.Root orientation='vertical' classNames='h-full' ref={forwardedRef}>
|
|
223
223
|
<ScrollArea.Viewport classNames='gap-6 p-2'>
|
|
224
224
|
{history.map((message, i) => (
|
|
225
225
|
<div key={i} className='grid grid-cols-[2rem_1fr_2rem]'>
|
|
@@ -250,13 +250,13 @@ const MessageThread = forwardRef<HTMLDivElement, MessageThreadProps>(
|
|
|
250
250
|
|
|
251
251
|
const MessageItem = ({ classNames, message }: ThemedClassName<{ message: Message }>) => {
|
|
252
252
|
const { type, text, data, error } = message;
|
|
253
|
-
const wrapper = 'p-1
|
|
253
|
+
const wrapper = 'p-1 px-2 rounded-md bg-hover-surface overflow-auto';
|
|
254
254
|
return (
|
|
255
255
|
<div className={mx('flex', type === 'request' ? 'ml-[1rem] justify-end' : 'mr-[1rem]', classNames)}>
|
|
256
|
-
{error && <div className={mx(wrapper, 'whitespace-pre'
|
|
256
|
+
{error && <div className={mx(wrapper, 'whitespace-pre text-error-text')}>{String(error)}</div>}
|
|
257
257
|
|
|
258
258
|
{text !== undefined && (
|
|
259
|
-
<div className={mx(wrapper, type === 'request' && 'bg-primary-
|
|
259
|
+
<div className={mx(wrapper, type === 'request' && 'bg-primary-500 dark:bg-primary-600')}>
|
|
260
260
|
{text || '\u00D8'}
|
|
261
261
|
</div>
|
|
262
262
|
)}
|
|
@@ -7,8 +7,7 @@ import React, { useCallback, useMemo, useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { createDocAccessor } from '@dxos/echo-db';
|
|
9
9
|
import { createObject } from '@dxos/react-client/echo';
|
|
10
|
-
import { Toolbar } from '@dxos/react-ui';
|
|
11
|
-
import { Layout } from '@dxos/react-ui';
|
|
10
|
+
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
12
11
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
13
12
|
import { Json } from '@dxos/react-ui-syntax-highlighter';
|
|
14
13
|
import { createDataExtensions } from '@dxos/ui-editor';
|
|
@@ -66,24 +65,27 @@ const DefaultStory = (props: TypescriptEditorProps) => {
|
|
|
66
65
|
}, [object]);
|
|
67
66
|
|
|
68
67
|
return (
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
<Panel.Root>
|
|
69
|
+
<Panel.Toolbar asChild>
|
|
70
|
+
<Toolbar.Root>
|
|
71
|
+
<Toolbar.Button onClick={handleRun}>Run</Toolbar.Button>
|
|
72
|
+
</Toolbar.Root>
|
|
73
|
+
</Panel.Toolbar>
|
|
74
|
+
<Panel.Content>
|
|
75
|
+
<div role='none' className='grid grid-rows-[1fr_min-content] h-full overflow-hidden text-sm'>
|
|
76
|
+
<TypescriptEditor {...props} initialValue={object.content} extensions={extensions} />
|
|
77
|
+
<Json data={result} classNames='shrink-0 p-2 border-y border-subdued-separator' />
|
|
78
|
+
</div>
|
|
79
|
+
</Panel.Content>
|
|
80
|
+
</Panel.Root>
|
|
79
81
|
);
|
|
80
82
|
};
|
|
81
83
|
|
|
82
84
|
const meta = {
|
|
83
|
-
title: 'plugins/plugin-script/TypescriptEditor',
|
|
85
|
+
title: 'plugins/plugin-script/components/TypescriptEditor',
|
|
84
86
|
component: TypescriptEditor,
|
|
85
87
|
render: DefaultStory,
|
|
86
|
-
decorators: [withTheme(), withLayout({ layout: 'column', classNames: '
|
|
88
|
+
decorators: [withTheme(), withLayout({ layout: 'column', classNames: 'w-prose-max-width' })],
|
|
87
89
|
} satisfies Meta<typeof DefaultStory>;
|
|
88
90
|
|
|
89
91
|
export default meta;
|
|
@@ -129,7 +129,7 @@ const createTooltipRenderer = (themeMode: ThemeMode) => {
|
|
|
129
129
|
) ?? [];
|
|
130
130
|
return {
|
|
131
131
|
dom: Domino.of('div')
|
|
132
|
-
.classNames('xs:max-
|
|
132
|
+
.classNames('xs:max-w-80 max-w-lg p-1 bg-base-surface rounded-sm border border-separator')
|
|
133
133
|
.children(...children).root,
|
|
134
134
|
};
|
|
135
135
|
};
|
package/src/components/index.ts
CHANGED
|
@@ -2,14 +2,9 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export * from './FrameContainer';
|
|
7
6
|
export * from './NotebookStack';
|
|
8
|
-
export * from './
|
|
7
|
+
export * from './QueryEditor';
|
|
8
|
+
export * from './ScriptToolbar';
|
|
9
9
|
export * from './TestPanel';
|
|
10
|
-
|
|
11
|
-
export { DEPLOYMENT_DIALOG } from './DeploymentDialog';
|
|
12
|
-
|
|
13
|
-
export const ScriptContainer = lazy(() => import('./ScriptContainer'));
|
|
14
|
-
export const DeploymentDialog = lazy(() => import('./DeploymentDialog'));
|
|
15
|
-
export const NotebookContainer = lazy(() => import('./NotebookContainer'));
|
|
10
|
+
export * from './TypescriptEditor';
|
package/src/constants.ts
ADDED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import React, { useMemo } from 'react';
|
|
7
7
|
|
|
8
|
-
import { OperationPlugin } from '@dxos/app-framework';
|
|
8
|
+
import { OperationPlugin, RuntimePlugin } from '@dxos/app-framework';
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
11
|
import { ClientPlugin } from '@dxos/plugin-client';
|
|
@@ -17,7 +17,6 @@ import { translations } from '../../translations';
|
|
|
17
17
|
|
|
18
18
|
import { DeploymentDialog } from './DeploymentDialog';
|
|
19
19
|
|
|
20
|
-
// TODO(wittjosiah): ECHO objects don't work when passed via Storybook args.
|
|
21
20
|
const DeploymentDialogStory = () => {
|
|
22
21
|
const accessToken = useMemo(
|
|
23
22
|
() =>
|
|
@@ -43,14 +42,14 @@ const DeploymentDialogStory = () => {
|
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
const meta = {
|
|
46
|
-
title: 'plugins/plugin-script/DeploymentDialog',
|
|
45
|
+
title: 'plugins/plugin-script/containers/DeploymentDialog',
|
|
47
46
|
component: DeploymentDialogStory,
|
|
48
47
|
parameters: { translations },
|
|
49
48
|
// TODO(wittjosiah): Try to write story which does not depend on plugin manager.
|
|
50
49
|
decorators: [
|
|
51
50
|
withTheme(),
|
|
52
51
|
withPluginManager({
|
|
53
|
-
plugins: [OperationPlugin(), ClientPlugin({})],
|
|
52
|
+
plugins: [OperationPlugin(), RuntimePlugin(), ClientPlugin({})],
|
|
54
53
|
}),
|
|
55
54
|
],
|
|
56
55
|
} satisfies Meta<typeof DeploymentDialogStory>;
|
|
@@ -14,8 +14,6 @@ import { useCreateAndDeployScriptTemplates } from '../../hooks';
|
|
|
14
14
|
import { meta } from '../../meta';
|
|
15
15
|
import { type Template } from '../../templates';
|
|
16
16
|
|
|
17
|
-
export const DEPLOYMENT_DIALOG = `${meta.id}/deployment/dialog`;
|
|
18
|
-
|
|
19
17
|
// TODO(ZaymonFC):
|
|
20
18
|
// - Show activity and feedback to the user.
|
|
21
19
|
// - Only take an array of templateIds and get the name from the data.
|
|
@@ -69,14 +67,14 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
69
67
|
<IconButton icon='ph--x--regular' size={4} label='Close' iconOnly density='fine' variant='ghost' />
|
|
70
68
|
</Dialog.Close>
|
|
71
69
|
</div>
|
|
72
|
-
<div role='none' className='
|
|
70
|
+
<div role='none' className='py-4'>
|
|
73
71
|
{/* TODO: Implement deployment logic and UI. */}
|
|
74
72
|
<p>
|
|
75
73
|
{t('deployment dialog scripts found message', {
|
|
76
74
|
count: scriptTemplates.length,
|
|
77
75
|
})}
|
|
78
76
|
</p>
|
|
79
|
-
<ul className='
|
|
77
|
+
<ul className='pt-2'>
|
|
80
78
|
{scriptTemplates.map((template) => {
|
|
81
79
|
return <li key={template.id}>{template.name}</li>;
|
|
82
80
|
})}
|
|
@@ -99,5 +97,3 @@ export const DeploymentDialog = ({ accessToken, scriptTemplates }: DeploymentDia
|
|
|
99
97
|
</Dialog.Content>
|
|
100
98
|
);
|
|
101
99
|
};
|
|
102
|
-
|
|
103
|
-
export default DeploymentDialog;
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
|
|
9
9
|
import { SERVICES_CONFIG } from '@dxos/ai/testing';
|
|
10
10
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
11
|
-
import {
|
|
11
|
+
import { AgentFunctions } from '@dxos/assistant-toolkit';
|
|
12
12
|
import { Filter } from '@dxos/echo';
|
|
13
13
|
import { Function, serializeFunction } from '@dxos/functions';
|
|
14
14
|
import { AssistantPlugin } from '@dxos/plugin-assistant';
|
|
@@ -22,14 +22,14 @@ import { useQuery } from '@dxos/react-client/echo';
|
|
|
22
22
|
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
23
23
|
import { DataTypes } from '@dxos/schema';
|
|
24
24
|
|
|
25
|
-
import { createNotebook } from '
|
|
26
|
-
import { translations } from '
|
|
27
|
-
import { Notebook } from '
|
|
25
|
+
import { createNotebook } from '../../testing';
|
|
26
|
+
import { translations } from '../../translations';
|
|
27
|
+
import { Notebook } from '../../types';
|
|
28
28
|
|
|
29
29
|
import { NotebookContainer } from './NotebookContainer';
|
|
30
30
|
|
|
31
31
|
const meta: Meta<typeof NotebookContainer> = {
|
|
32
|
-
title: 'plugins/plugin-script/NotebookContainer',
|
|
32
|
+
title: 'plugins/plugin-script/containers/NotebookContainer',
|
|
33
33
|
component: NotebookContainer,
|
|
34
34
|
render: (args) => {
|
|
35
35
|
const client = useClient();
|
|
@@ -39,7 +39,7 @@ const meta: Meta<typeof NotebookContainer> = {
|
|
|
39
39
|
},
|
|
40
40
|
decorators: [
|
|
41
41
|
withTheme(),
|
|
42
|
-
withLayout({ layout: 'column', classNames: '
|
|
42
|
+
withLayout({ layout: 'column', classNames: 'w-prose-max-width' }),
|
|
43
43
|
withPluginManager({
|
|
44
44
|
plugins: [
|
|
45
45
|
...corePlugins(),
|
|
@@ -60,7 +60,7 @@ const meta: Meta<typeof NotebookContainer> = {
|
|
|
60
60
|
|
|
61
61
|
space.db.add(createNotebook());
|
|
62
62
|
space.db.add(Markdown.make({ content: '# Hello World' }));
|
|
63
|
-
space.db.add(serializeFunction(
|
|
63
|
+
space.db.add(serializeFunction(AgentFunctions.Prompt));
|
|
64
64
|
}),
|
|
65
65
|
}),
|
|
66
66
|
AssistantPlugin(),
|
|
@@ -10,7 +10,7 @@ import type * as Types from 'effect/Types';
|
|
|
10
10
|
import React, { useCallback, useContext, useMemo, useState } from 'react';
|
|
11
11
|
|
|
12
12
|
import { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';
|
|
13
|
-
import {
|
|
13
|
+
import { AgentFunctions } from '@dxos/assistant-toolkit';
|
|
14
14
|
import { Blueprint, Prompt } from '@dxos/blueprints';
|
|
15
15
|
import { Filter, Obj, Query, Ref } from '@dxos/echo';
|
|
16
16
|
import { QueryBuilder } from '@dxos/echo-query';
|
|
@@ -19,20 +19,21 @@ import { invariant } from '@dxos/invariant';
|
|
|
19
19
|
import { log } from '@dxos/log';
|
|
20
20
|
import { useComputeRuntimeCallback } from '@dxos/plugin-automation';
|
|
21
21
|
import { Graph } from '@dxos/plugin-explorer/types';
|
|
22
|
-
import { DropdownMenu, IconButton, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
23
|
-
import { Layout } from '@dxos/react-ui';
|
|
22
|
+
import { DropdownMenu, IconButton, Panel, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
24
23
|
import { useAttention } from '@dxos/react-ui-attention';
|
|
25
|
-
import { Text,
|
|
24
|
+
import { Text, ViewModel } from '@dxos/schema';
|
|
26
25
|
import { isNonNullable } from '@dxos/util';
|
|
27
26
|
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
27
|
+
import { NotebookMenu, NotebookStack, type NotebookStackProps, type TypescriptEditorProps } from '../../components';
|
|
28
|
+
import { meta } from '../../meta';
|
|
29
|
+
import { ComputeGraph } from '../../notebook';
|
|
30
|
+
import { type Notebook } from '../../types';
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
const INCLUDE_BLUEPRINTS = [
|
|
33
|
+
'dxos.org/blueprint/assistant',
|
|
34
|
+
'dxos.org/blueprint/database',
|
|
35
|
+
'dxos.org/blueprint/markdown',
|
|
36
|
+
];
|
|
36
37
|
|
|
37
38
|
// TODO(burdon): Support calling named deployed functions (as with sheet).
|
|
38
39
|
|
|
@@ -63,7 +64,7 @@ export const NotebookContainer = ({ role, subject: notebook, env }: NotebookCont
|
|
|
63
64
|
const ast = Query.select(filter).ast;
|
|
64
65
|
const graph = cell.graph?.target;
|
|
65
66
|
if (!graph) {
|
|
66
|
-
const { view } = await
|
|
67
|
+
const { view } = await ViewModel.makeFromDatabase({ db });
|
|
67
68
|
const newGraph = Graph.make({ query: { ast }, view });
|
|
68
69
|
Obj.change(notebook!, (n) => {
|
|
69
70
|
const c = n.cells.find((c) => c.id === cell.id);
|
|
@@ -189,25 +190,26 @@ export const NotebookContainer = ({ role, subject: notebook, env }: NotebookCont
|
|
|
189
190
|
);
|
|
190
191
|
|
|
191
192
|
return (
|
|
192
|
-
<
|
|
193
|
-
<Toolbar
|
|
194
|
-
<
|
|
195
|
-
<DropdownMenu.
|
|
196
|
-
<
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
193
|
+
<Panel.Root role={role} className='dx-article'>
|
|
194
|
+
<Panel.Toolbar asChild>
|
|
195
|
+
<Toolbar.Root disabled={!hasAttention} textBlockWidth>
|
|
196
|
+
<DropdownMenu.Root>
|
|
197
|
+
<DropdownMenu.Trigger asChild>
|
|
198
|
+
<IconButton icon='ph--plus--regular' iconOnly label={t('notebook cell insert label')} />
|
|
199
|
+
</DropdownMenu.Trigger>
|
|
200
|
+
<NotebookMenu onCellInsert={handleCellInsert} />
|
|
201
|
+
</DropdownMenu.Root>
|
|
202
|
+
<Toolbar.IconButton
|
|
203
|
+
icon='ph--play--fill'
|
|
204
|
+
iconOnly
|
|
205
|
+
label={t('compute label')}
|
|
206
|
+
classNames='text-green-500'
|
|
207
|
+
onClick={handleCompute}
|
|
208
|
+
/>
|
|
209
|
+
</Toolbar.Root>
|
|
210
|
+
</Panel.Toolbar>
|
|
211
|
+
<Panel.Content asChild>
|
|
209
212
|
<NotebookStack
|
|
210
|
-
classNames='container-max-width border-l border-r border-subduedSeparator'
|
|
211
213
|
db={db}
|
|
212
214
|
notebook={notebook}
|
|
213
215
|
graph={graph}
|
|
@@ -217,13 +219,11 @@ export const NotebookContainer = ({ role, subject: notebook, env }: NotebookCont
|
|
|
217
219
|
onCellInsert={handleCellInsert}
|
|
218
220
|
onCellDelete={handleCellDelete}
|
|
219
221
|
/>
|
|
220
|
-
</
|
|
221
|
-
</
|
|
222
|
+
</Panel.Content>
|
|
223
|
+
</Panel.Root>
|
|
222
224
|
);
|
|
223
225
|
};
|
|
224
226
|
|
|
225
|
-
export default NotebookContainer;
|
|
226
|
-
|
|
227
227
|
// TODO(wittjosiah): Factor out. Copied from PromptArticle in plugin-assistant.
|
|
228
228
|
const runPrompt = Effect.fn(function* ({
|
|
229
229
|
prompt,
|
|
@@ -234,10 +234,7 @@ const runPrompt = Effect.fn(function* ({
|
|
|
234
234
|
input: Record<string, any>;
|
|
235
235
|
onResult: (result: string) => void;
|
|
236
236
|
}) {
|
|
237
|
-
const inputData: FunctionDefinition.Input<typeof
|
|
238
|
-
prompt,
|
|
239
|
-
input,
|
|
240
|
-
};
|
|
237
|
+
const inputData: FunctionDefinition.Input<typeof AgentFunctions.Prompt> = { prompt, input };
|
|
241
238
|
const tracer = yield* TracingService;
|
|
242
239
|
const trace = yield* tracer.traceInvocationStart({
|
|
243
240
|
target: undefined,
|
|
@@ -247,7 +244,7 @@ const runPrompt = Effect.fn(function* ({
|
|
|
247
244
|
});
|
|
248
245
|
|
|
249
246
|
// Invoke the function.
|
|
250
|
-
const result = yield* FunctionInvocationService.invokeFunction(
|
|
247
|
+
const result = yield* FunctionInvocationService.invokeFunction(AgentFunctions.Prompt, inputData).pipe(
|
|
251
248
|
Effect.provide(trace.invocationTraceQueue ? TracingService.layerInvocation(trace) : TracingService.layerNoop),
|
|
252
249
|
Effect.exit,
|
|
253
250
|
);
|
|
@@ -10,14 +10,12 @@ import { createDocAccessor } from '@dxos/echo-db';
|
|
|
10
10
|
import { type Script } from '@dxos/functions';
|
|
11
11
|
import { getSpace } from '@dxos/react-client/echo';
|
|
12
12
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
13
|
-
import {
|
|
13
|
+
import { Panel } from '@dxos/react-ui';
|
|
14
14
|
import { createDataExtensions, listener, stackItemContentEditorClassNames } from '@dxos/ui-editor';
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
import { ScriptToolbar } from './ScriptToolbar';
|
|
20
|
-
import { TypescriptEditor, type TypescriptEditorProps } from './TypescriptEditor';
|
|
16
|
+
import { ScriptToolbar, TypescriptEditor, type TypescriptEditorProps } from '../../components';
|
|
17
|
+
import { useDeployState, useToolbarState } from '../../hooks';
|
|
18
|
+
import { type ScriptSettings } from '../../types';
|
|
21
19
|
|
|
22
20
|
export type ScriptEditorProps = SurfaceComponentProps<
|
|
23
21
|
Script.Script,
|
|
@@ -66,19 +64,21 @@ export const ScriptContainer = ({
|
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
return (
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
<Panel.Root role={role} className='dx-article'>
|
|
68
|
+
<Panel.Toolbar asChild>
|
|
69
|
+
<ScriptToolbar state={state} role={role} script={script} />
|
|
70
|
+
</Panel.Toolbar>
|
|
71
|
+
<Panel.Content asChild>
|
|
72
|
+
<TypescriptEditor
|
|
73
|
+
id={script.id}
|
|
74
|
+
env={env}
|
|
75
|
+
initialValue={script.source?.target?.content}
|
|
76
|
+
extensions={extensions}
|
|
77
|
+
classNames={stackItemContentEditorClassNames(role)}
|
|
78
|
+
inputMode={settings.editorInputMode}
|
|
79
|
+
toolbar
|
|
80
|
+
/>
|
|
81
|
+
</Panel.Content>
|
|
82
|
+
</Panel.Root>
|
|
81
83
|
);
|
|
82
84
|
};
|
|
83
|
-
|
|
84
|
-
export default ScriptContainer;
|
package/src/{components/Settings → containers/ScriptObjectSettings}/ScriptObjectSettings.tsx
RENAMED
|
@@ -35,24 +35,6 @@ export const ScriptObjectSettings = ({ object }: ScriptObjectSettingsProps) => {
|
|
|
35
35
|
);
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
export const ScriptProperties = ({ object }: ScriptObjectSettingsProps) => {
|
|
39
|
-
const { t } = useTranslation(meta.id);
|
|
40
|
-
return (
|
|
41
|
-
<Input.Root>
|
|
42
|
-
<Input.Label>{t('description label')}</Input.Label>
|
|
43
|
-
<Input.TextInput
|
|
44
|
-
placeholder={t('description placeholder')}
|
|
45
|
-
value={object.description ?? ''}
|
|
46
|
-
onChange={(event) => {
|
|
47
|
-
Obj.change(object, (o) => {
|
|
48
|
-
o.description = event.target.value;
|
|
49
|
-
});
|
|
50
|
-
}}
|
|
51
|
-
/>
|
|
52
|
-
</Input.Root>
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
38
|
const BlueprintEditor = ({ object }: ScriptObjectSettingsProps) => {
|
|
57
39
|
const { t } = useTranslation(meta.id);
|
|
58
40
|
const db = Obj.getDatabase(object);
|
|
@@ -111,7 +93,7 @@ const BlueprintEditor = ({ object }: ScriptObjectSettingsProps) => {
|
|
|
111
93
|
}, [db, existingBlueprint, fn, blueprintKey, object.name, instructions]);
|
|
112
94
|
|
|
113
95
|
return (
|
|
114
|
-
<div className='flex flex-col gap-4
|
|
96
|
+
<div className='flex flex-col gap-4 my-form-padding'>
|
|
115
97
|
<div>
|
|
116
98
|
<h2>{t('blueprint editor label', { default: 'Blueprint' })}</h2>
|
|
117
99
|
<p className='text-description text-sm'>
|
|
@@ -178,7 +160,7 @@ const Binding = ({ object }: ScriptObjectSettingsProps) => {
|
|
|
178
160
|
|
|
179
161
|
// TODO(burdon): Use form.
|
|
180
162
|
return (
|
|
181
|
-
<div role='form' className='flex flex-col gap-2
|
|
163
|
+
<div role='form' className='flex flex-col gap-2 my-form-padding'>
|
|
182
164
|
<h2>{t('remote function settings heading')}</h2>
|
|
183
165
|
<Input.Root>
|
|
184
166
|
<div role='none' className='flex flex-col gap-1'>
|
|
@@ -285,7 +267,7 @@ const Publishing = ({ object }: ScriptObjectSettingsProps) => {
|
|
|
285
267
|
}, [object, githubToken]);
|
|
286
268
|
|
|
287
269
|
return (
|
|
288
|
-
<div className='flex flex-col gap-4
|
|
270
|
+
<div className='flex flex-col gap-4 my-form-padding'>
|
|
289
271
|
<div>
|
|
290
272
|
<h2>{t('script publish settings label')}</h2>
|
|
291
273
|
<p className='text-description text-sm'>{t('script publish settings description')}</p>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2024 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { type Script } from '@dxos/functions';
|
|
9
|
+
import { Input, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
|
|
11
|
+
import { meta } from '../../meta';
|
|
12
|
+
|
|
13
|
+
export type ScriptPropertiesProps = {
|
|
14
|
+
object: Script.Script;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const ScriptProperties = ({ object }: ScriptPropertiesProps) => {
|
|
18
|
+
const { t } = useTranslation(meta.id);
|
|
19
|
+
return (
|
|
20
|
+
<Input.Root>
|
|
21
|
+
<Input.Label>{t('description label')}</Input.Label>
|
|
22
|
+
<Input.TextInput
|
|
23
|
+
placeholder={t('description placeholder')}
|
|
24
|
+
value={object.description ?? ''}
|
|
25
|
+
onChange={(event) => {
|
|
26
|
+
Obj.change(object, (o) => {
|
|
27
|
+
o.description = event.target.value;
|
|
28
|
+
});
|
|
29
|
+
}}
|
|
30
|
+
/>
|
|
31
|
+
</Input.Root>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { type Script } from '@dxos/functions';
|
|
8
|
-
import {
|
|
8
|
+
import { Panel } from '@dxos/react-ui';
|
|
9
9
|
|
|
10
|
+
import { TestPanel } from '../../components';
|
|
10
11
|
import { useDeployState, useToolbarState } from '../../hooks';
|
|
11
12
|
|
|
12
|
-
import { TestPanel } from './TestPanel';
|
|
13
|
-
|
|
14
13
|
export type TestContainerProps = {
|
|
15
14
|
role: string;
|
|
16
15
|
script: Script.Script;
|
|
@@ -20,8 +19,10 @@ export const TestContainer = ({ role, script }: TestContainerProps) => {
|
|
|
20
19
|
const state = useToolbarState();
|
|
21
20
|
useDeployState({ state, script });
|
|
22
21
|
return (
|
|
23
|
-
<
|
|
24
|
-
<
|
|
25
|
-
|
|
22
|
+
<Panel.Root role={role} className='dx-article'>
|
|
23
|
+
<Panel.Content asChild>
|
|
24
|
+
<TestPanel functionUrl={state.value.functionUrl} />
|
|
25
|
+
</Panel.Content>
|
|
26
|
+
</Panel.Root>
|
|
26
27
|
);
|
|
27
28
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
|
+
|
|
7
|
+
export const DeploymentDialog: ComponentType<any> = lazy(() => import('./DeploymentDialog'));
|
|
8
|
+
export const NotebookContainer: ComponentType<any> = lazy(() => import('./NotebookContainer'));
|
|
9
|
+
export const ScriptContainer: ComponentType<any> = lazy(() => import('./ScriptContainer'));
|
|
10
|
+
export const ScriptObjectSettings: ComponentType<any> = lazy(() => import('./ScriptObjectSettings'));
|
|
11
|
+
export const ScriptPluginSettings: ComponentType<any> = lazy(() => import('./ScriptPluginSettings'));
|
|
12
|
+
export const ScriptProperties: ComponentType<any> = lazy(() => import('./ScriptProperties'));
|
|
13
|
+
export const TestContainer: ComponentType<any> = lazy(() => import('./TestContainer'));
|
package/src/e2e/deploy.test.ts
CHANGED
|
@@ -50,7 +50,7 @@ describe.runIf(process.env.DX_TEST_TAGS?.includes('functions-e2e'))('Functions d
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
// Invoke deployed function via EDGE directly.
|
|
53
|
-
const edgeClient = client.edge;
|
|
53
|
+
const edgeClient = client.edge.http;
|
|
54
54
|
invariant(edgeClient, 'edgeClient is required');
|
|
55
55
|
edgeClient.setIdentity(createEdgeIdentity(client));
|
|
56
56
|
|