@dxos/plugin-automation 0.7.5-main.9cb18ac → 0.7.5-main.9d2a38b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/{AssistantPanel-32FH2RA6.mjs → AssistantPanel-N276BTPV.mjs} +2 -2
- package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs +232 -0
- package/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs +131 -0
- package/dist/lib/browser/app-graph-builder-IJTTULDP.mjs.map +7 -0
- package/dist/lib/browser/chunk-4AIMDHKY.mjs +10 -0
- package/dist/lib/browser/chunk-4AIMDHKY.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DN5M2QL5.mjs → chunk-DL6LB2NI.mjs} +2 -8
- package/dist/lib/browser/{chunk-DN5M2QL5.mjs.map → chunk-DL6LB2NI.mjs.map} +4 -4
- package/dist/lib/browser/{chunk-X5KMOH3I.mjs → chunk-HKX3D3ZP.mjs} +3 -3
- package/dist/lib/browser/chunk-HKX3D3ZP.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +89 -236
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react-surface-LL72F3F4.mjs +34 -0
- package/dist/lib/browser/react-surface-LL72F3F4.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -3
- package/dist/lib/node/{AssistantPanel-XANI7YNV.cjs → AssistantPanel-Z4GVHUF3.cjs} +6 -6
- package/dist/lib/node/{AutomationPanel-VADY3HMP.cjs → AutomationPanel-PPODB5XA.cjs} +113 -32
- package/dist/lib/node/AutomationPanel-PPODB5XA.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs +147 -0
- package/dist/lib/node/app-graph-builder-MF5M4QRS.cjs.map +7 -0
- package/dist/lib/node/chunk-25AQIF3L.cjs +43 -0
- package/dist/lib/node/chunk-25AQIF3L.cjs.map +7 -0
- package/dist/lib/node/{chunk-DTJ7XVO2.cjs → chunk-5VF5JKUN.cjs} +7 -7
- package/dist/lib/node/chunk-5VF5JKUN.cjs.map +7 -0
- package/dist/lib/node/{chunk-NIL4TP6U.cjs → chunk-JNDMZQH7.cjs} +4 -9
- package/dist/lib/node/chunk-JNDMZQH7.cjs.map +7 -0
- package/dist/lib/node/index.cjs +112 -258
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/react-surface-DVAU4MGD.cjs +57 -0
- package/dist/lib/node/react-surface-DVAU4MGD.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +5 -7
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/{AssistantPanel-5M6O6JV7.mjs → AssistantPanel-DDCQHBJX.mjs} +2 -2
- package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs +233 -0
- package/dist/lib/node-esm/AutomationPanel-R3D6CRF5.mjs.map +7 -0
- package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs +132 -0
- package/dist/lib/node-esm/app-graph-builder-5N7OK23B.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GCHXTXVT.mjs → chunk-GIAYUM5I.mjs} +2 -8
- package/dist/lib/node-esm/{chunk-GCHXTXVT.mjs.map → chunk-GIAYUM5I.mjs.map} +4 -4
- package/dist/lib/node-esm/{chunk-HNOBZHWK.mjs → chunk-X3LPRWIL.mjs} +3 -3
- package/dist/lib/node-esm/chunk-X3LPRWIL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-XW7TEQA3.mjs +12 -0
- package/dist/lib/node-esm/chunk-XW7TEQA3.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +89 -236
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs +35 -0
- package/dist/lib/node-esm/react-surface-4BED2PZ4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -3
- package/dist/types/src/AutomationPlugin.d.ts +1 -3
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +180 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +179 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -2
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +38 -46
- package/src/AutomationPlugin.tsx +55 -193
- package/src/capabilities/app-graph-builder.ts +127 -0
- package/src/capabilities/index.ts +8 -0
- package/src/capabilities/react-surface.tsx +27 -0
- package/src/components/AutomationPanel/AutomationPanel.tsx +54 -37
- package/src/components/TriggerEditor/TriggerEditor.tsx +63 -6
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -1
- package/src/translations.ts +9 -0
- package/src/types/index.ts +0 -1
- package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs +0 -151
- package/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs.map +0 -7
- package/dist/lib/browser/chunk-X5KMOH3I.mjs.map +0 -7
- package/dist/lib/browser/meta.mjs +0 -9
- package/dist/lib/browser/meta.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-VADY3HMP.cjs.map +0 -7
- package/dist/lib/node/chunk-DTJ7XVO2.cjs.map +0 -7
- package/dist/lib/node/chunk-NIL4TP6U.cjs.map +0 -7
- package/dist/lib/node/meta.cjs +0 -30
- package/dist/lib/node/meta.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs +0 -152
- package/dist/lib/node-esm/AutomationPanel-EETYIDPA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HNOBZHWK.mjs.map +0 -7
- package/dist/lib/node-esm/meta.mjs +0 -10
- package/dist/lib/node-esm/meta.mjs.map +0 -7
- package/dist/types/src/types/types.d.ts +0 -7
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/types/types.ts +0 -27
- /package/dist/lib/browser/{AssistantPanel-32FH2RA6.mjs.map → AssistantPanel-N276BTPV.mjs.map} +0 -0
- /package/dist/lib/node/{AssistantPanel-XANI7YNV.cjs.map → AssistantPanel-Z4GVHUF3.cjs.map} +0 -0
- /package/dist/lib/node-esm/{AssistantPanel-5M6O6JV7.mjs.map → AssistantPanel-DDCQHBJX.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytes":16049,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytes":1626,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytes":28000,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts","kind":"import-statement","original":"./system-instructions"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytes":739,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx","kind":"import-statement","original":"./AssistantPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytes":7128,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytes":557,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx","kind":"import-statement","original":"./TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":16783,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts","kind":"import-statement","original":"../TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytes":751,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytes":1078,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","kind":"dynamic-import","original":"./AssistantPanel"},{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytes":4459,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytes":4248,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/types.ts":{"bytes":1464,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytes":604,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/experimental/plugin-automation/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytes":29041,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytes":19268,"imports":[{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytes":1109,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"./presets"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-automation/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":23991},"packages/plugins/experimental/plugin-automation/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DN5M2QL5.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-X5KMOH3I.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-client/types","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-32FH2RA6.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs","kind":"dynamic-import"},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["AssistantPanel","AutomationAction","AutomationPanel","AutomationPlugin","ChainInputSchema","ChainInputType","ChainPromptType","ChainType","chainPresets","default","str"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytesInOutput":7755},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytesInOutput":180},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytesInOutput":1277},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytesInOutput":36},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytesInOutput":5489}},"bytes":15618},"packages/plugins/experimental/plugin-automation/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-X5KMOH3I.mjs","kind":"import-statement"}],"exports":["AUTOMATION_PLUGIN","default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/meta.ts","inputs":{},"bytes":169},"packages/plugins/experimental/plugin-automation/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DN5M2QL5.mjs","kind":"import-statement"}],"exports":["AutomationAction","ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/types/index.ts","inputs":{},"bytes":266},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DN5M2QL5.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2879},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DN5M2QL5.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["AutomationAction","ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"inputs":{"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytesInOutput":1247},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/types/types.ts":{"bytesInOutput":118}},"bytes":1653},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-32FH2RA6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22398},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-32FH2RA6.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-X5KMOH3I.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytesInOutput":7244},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytesInOutput":4067},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytesInOutput":45}},"bytes":11915},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13284},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-ABGPG5LE.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-X5KMOH3I.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":4160},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytesInOutput":1456},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":6223},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-X5KMOH3I.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":763},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-X5KMOH3I.mjs":{"imports":[],"exports":["AUTOMATION_PLUGIN","meta_default"],"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytesInOutput":333}},"bytes":489}}}
|
|
1
|
+
{"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytes":1663,"imports":[],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts":{"bytes":16198,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytes":16049,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytes":28000,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts","kind":"import-statement","original":"./system-instructions"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytes":739,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx","kind":"import-statement","original":"./AssistantPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytes":15553,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytes":557,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx","kind":"import-statement","original":"./TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytes":19445,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../../meta"},{"path":"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts","kind":"import-statement","original":"../TriggerEditor"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytes":751,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx","kind":"import-statement","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytes":1078,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","kind":"dynamic-import","original":"./AssistantPanel"},{"path":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","kind":"dynamic-import","original":"./AutomationPanel"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx":{"bytes":3922,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts":{"bytes":1109,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytes":5419,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytes":4248,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytes":519,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/types/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytes":10110,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytes":19268,"imports":[{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytes":885,"imports":[{"path":"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx","kind":"import-statement","original":"./AutomationPlugin"},{"path":"packages/plugins/experimental/plugin-automation/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/experimental/plugin-automation/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/experimental/plugin-automation/src/presets.ts","kind":"import-statement","original":"./presets"},{"path":"packages/plugins/experimental/plugin-automation/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/plugins/experimental/plugin-automation/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":16220},"packages/plugins/experimental/plugin-automation/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-deck","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/app-graph-builder-IJTTULDP.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-LL72F3F4.mjs","kind":"dynamic-import"},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["AUTOMATION_PLUGIN","AssistantPanel","AutomationPanel","AutomationPlugin","ChainInputSchema","ChainInputType","ChainPromptType","ChainType","chainPresets","meta","str"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/AutomationPlugin.tsx":{"bytesInOutput":2261},"packages/plugins/experimental/plugin-automation/src/capabilities/index.ts":{"bytesInOutput":193},"packages/plugins/experimental/plugin-automation/src/translations.ts":{"bytesInOutput":1597},"packages/plugins/experimental/plugin-automation/src/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/presets.ts":{"bytesInOutput":5489}},"bytes":10389},"packages/plugins/experimental/plugin-automation/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/experimental/plugin-automation/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs","kind":"import-statement"}],"exports":["ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/types/index.ts","inputs":{},"bytes":226},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2081},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-DL6LB2NI.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["ChainInputSchema","ChainInputType","ChainPromptType","ChainType"],"inputs":{"packages/plugins/experimental/plugin-automation/src/types/schema.ts":{"bytesInOutput":1247},"packages/plugins/experimental/plugin-automation/src/types/index.ts":{"bytesInOutput":0}},"bytes":1444},"packages/plugins/experimental/plugin-automation/dist/lib/browser/app-graph-builder-IJTTULDP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7468},"packages/plugins/experimental/plugin-automation/dist/lib/browser/app-graph-builder-IJTTULDP.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-graph","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/capabilities/app-graph-builder.ts":{"bytesInOutput":3950}},"bytes":4207},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-N276BTPV.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":22398},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-N276BTPV.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-syntax-highlighter","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/AssistantPanel.tsx":{"bytesInOutput":7244},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/system-instructions.ts":{"bytesInOutput":4067},"packages/plugins/experimental/plugin-automation/src/components/AssistantPanel/index.ts":{"bytesInOutput":45}},"bytes":11915},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":18804},"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-list","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/functions","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-form","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts","inputs":{"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/AutomationPanel.tsx":{"bytesInOutput":4886},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/TriggerEditor.tsx":{"bytesInOutput":3947},"packages/plugins/experimental/plugin-automation/src/components/TriggerEditor/index.ts":{"bytesInOutput":0},"packages/plugins/experimental/plugin-automation/src/components/AutomationPanel/index.ts":{"bytesInOutput":47}},"bytes":9440},"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-LL72F3F4.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1915},"packages/plugins/experimental/plugin-automation/dist/lib/browser/react-surface-LL72F3F4.mjs":{"imports":[{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs","kind":"import-statement"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx":{"bytesInOutput":812}},"bytes":1134},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":503},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-4AIMDHKY.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AssistantPanel-N276BTPV.mjs","kind":"dynamic-import"},{"path":"packages/plugins/experimental/plugin-automation/dist/lib/browser/AutomationPanel-IHZ4JKVS.mjs","kind":"dynamic-import"}],"exports":["AssistantPanel","AutomationPanel"],"inputs":{"packages/plugins/experimental/plugin-automation/src/components/index.ts":{"bytesInOutput":180}},"bytes":348},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":778},"packages/plugins/experimental/plugin-automation/dist/lib/browser/chunk-HKX3D3ZP.mjs":{"imports":[],"exports":["AUTOMATION_PLUGIN","meta"],"inputs":{"packages/plugins/experimental/plugin-automation/src/meta.ts":{"bytesInOutput":325}},"bytes":473}}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AssistantPanel,
|
|
3
|
+
AutomationPanel
|
|
4
|
+
} from "./chunk-4AIMDHKY.mjs";
|
|
5
|
+
import {
|
|
6
|
+
AUTOMATION_PLUGIN
|
|
7
|
+
} from "./chunk-HKX3D3ZP.mjs";
|
|
8
|
+
|
|
9
|
+
// packages/plugins/experimental/plugin-automation/src/capabilities/react-surface.tsx
|
|
10
|
+
import React from "react";
|
|
11
|
+
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
12
|
+
import { getSpace, isEchoObject } from "@dxos/react-client/echo";
|
|
13
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
14
|
+
createSurface({
|
|
15
|
+
id: `${AUTOMATION_PLUGIN}/assistant`,
|
|
16
|
+
role: "complementary--assistant",
|
|
17
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(AssistantPanel, {
|
|
18
|
+
subject: data.subject
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
createSurface({
|
|
22
|
+
id: `${AUTOMATION_PLUGIN}/automation`,
|
|
23
|
+
role: "complementary--automation",
|
|
24
|
+
filter: (data) => isEchoObject(data.subject) && !!getSpace(data.subject),
|
|
25
|
+
component: ({ data }) => /* @__PURE__ */ React.createElement(AutomationPanel, {
|
|
26
|
+
space: getSpace(data.subject),
|
|
27
|
+
object: data.subject
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
]);
|
|
31
|
+
export {
|
|
32
|
+
react_surface_default as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=react-surface-LL72F3F4.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { getSpace, isEchoObject, type ReactiveEchoObject } from '@dxos/react-client/echo';\n\nimport { AssistantPanel, AutomationPanel } from '../components';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${AUTOMATION_PLUGIN}/assistant`,\n role: 'complementary--assistant',\n component: ({ data }) => <AssistantPanel subject={data.subject} />,\n }),\n createSurface({\n id: `${AUTOMATION_PLUGIN}/automation`,\n role: 'complementary--automation',\n filter: (data): data is { subject: ReactiveEchoObject<any> } =>\n isEchoObject(data.subject) && !!getSpace(data.subject),\n component: ({ data }) => <AutomationPanel space={getSpace(data.subject)!} object={data.subject} />,\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AACzD,SAASC,UAAUC,oBAA6C;AAKhE,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,iBAAAA;IACPC,MAAM;IACNC,WAAW,CAAC,EAAEC,KAAI,MAAO,sBAAA,cAACC,gBAAAA;MAAeC,SAASF,KAAKE;;EACzD,CAAA;EACAP,cAAc;IACZC,IAAI,GAAGC,iBAAAA;IACPC,MAAM;IACNK,QAAQ,CAACH,SACPI,aAAaJ,KAAKE,OAAO,KAAK,CAAC,CAACG,SAASL,KAAKE,OAAO;IACvDH,WAAW,CAAC,EAAEC,KAAI,MAAO,sBAAA,cAACM,iBAAAA;MAAgBC,OAAOF,SAASL,KAAKE,OAAO;MAAIM,QAAQR,KAAKE;;EACzF,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "getSpace", "isEchoObject", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "AUTOMATION_PLUGIN", "role", "component", "data", "AssistantPanel", "subject", "filter", "isEchoObject", "getSpace", "AutomationPanel", "space", "object"]
|
|
7
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
AutomationAction,
|
|
3
2
|
ChainInputSchema,
|
|
4
3
|
ChainInputType,
|
|
5
4
|
ChainPromptType,
|
|
6
5
|
ChainType
|
|
7
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-DL6LB2NI.mjs";
|
|
8
7
|
export {
|
|
9
|
-
AutomationAction,
|
|
10
8
|
ChainInputSchema,
|
|
11
9
|
ChainInputType,
|
|
12
10
|
ChainPromptType,
|
|
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var AssistantPanel_Z4GVHUF3_exports = {};
|
|
30
|
+
__export(AssistantPanel_Z4GVHUF3_exports, {
|
|
31
31
|
default: () => AssistantPanel_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(AssistantPanel_Z4GVHUF3_exports);
|
|
34
|
+
var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_assistant = require("@dxos/assistant");
|
|
37
37
|
var import_keys = require("@dxos/keys");
|
|
@@ -188,7 +188,7 @@ var RE_OPEN_TAG_LINE = /^[ ]*<[a-zA-Z0-9\-_]+>[ ]*$/;
|
|
|
188
188
|
var RE_CLOSE_TAG_LINE = /^[ ]*<\/[a-zA-Z0-9\-_]+>[ ]*$/;
|
|
189
189
|
var PROPERTIES_ASSISTANT_KEY = "dxos.assistant.beta.properties";
|
|
190
190
|
var AssistantPanel = ({ subject, classNames }) => {
|
|
191
|
-
const { t } = (0, import_react_ui2.useTranslation)(
|
|
191
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
|
|
192
192
|
const config = (0, import_react_client.useConfig)();
|
|
193
193
|
const client = (0, import_react_client.useClient)();
|
|
194
194
|
const aiClient = (0, import_react.useRef)();
|
|
@@ -356,4 +356,4 @@ var parseMessage = (text) => {
|
|
|
356
356
|
};
|
|
357
357
|
};
|
|
358
358
|
var AssistantPanel_default = AssistantPanel;
|
|
359
|
-
//# sourceMappingURL=AssistantPanel-
|
|
359
|
+
//# sourceMappingURL=AssistantPanel-Z4GVHUF3.cjs.map
|
|
@@ -26,12 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var AutomationPanel_PPODB5XA_exports = {};
|
|
30
|
+
__export(AutomationPanel_PPODB5XA_exports, {
|
|
31
31
|
default: () => AutomationPanel_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(AutomationPanel_PPODB5XA_exports);
|
|
34
|
+
var import_chunk_5VF5JKUN = require("./chunk-5VF5JKUN.cjs");
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
37
37
|
var import_functions = require("@dxos/functions");
|
|
@@ -45,8 +45,8 @@ var import_functions2 = require("@dxos/functions");
|
|
|
45
45
|
var import_echo2 = require("@dxos/react-client/echo");
|
|
46
46
|
var import_react_ui2 = require("@dxos/react-ui");
|
|
47
47
|
var import_react_ui_form = require("@dxos/react-ui-form");
|
|
48
|
-
var TriggerEditor = ({ space, trigger, onSave, onCancel
|
|
49
|
-
const { t } = (0, import_react_ui2.useTranslation)(
|
|
48
|
+
var TriggerEditor = ({ space, trigger, onSave, onCancel }) => {
|
|
49
|
+
const { t } = (0, import_react_ui2.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
|
|
50
50
|
const functions = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_functions2.FunctionType));
|
|
51
51
|
const scripts = (0, import_echo2.useQuery)(space, import_echo2.Filter.schema(import_functions2.ScriptType));
|
|
52
52
|
const handleSave = (values) => {
|
|
@@ -55,7 +55,6 @@ var TriggerEditor = ({ space, trigger, onSave, onCancel, storedTrigger }) => {
|
|
|
55
55
|
return /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.Form, {
|
|
56
56
|
schema: import_functions2.FunctionTriggerSchema,
|
|
57
57
|
values: trigger,
|
|
58
|
-
filter: (props) => props.filter((p) => p.name !== "meta"),
|
|
59
58
|
onSave: handleSave,
|
|
60
59
|
onCancel,
|
|
61
60
|
Custom: {
|
|
@@ -72,7 +71,69 @@ var TriggerEditor = ({ space, trigger, onSave, onCancel, storedTrigger }) => {
|
|
|
72
71
|
value: kind,
|
|
73
72
|
label: t(`trigger type ${kind}`)
|
|
74
73
|
}))
|
|
75
|
-
})
|
|
74
|
+
}),
|
|
75
|
+
["meta"]: (props) => {
|
|
76
|
+
const meta = props.getValue("meta");
|
|
77
|
+
const [newMetaFieldName, setNewMetaFieldName] = (0, import_react2.useState)("");
|
|
78
|
+
import_react2.default.useEffect(() => props.onValueChange("meta", "object", {
|
|
79
|
+
...meta
|
|
80
|
+
}), []);
|
|
81
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("div", null, props.label), [
|
|
82
|
+
...Object.keys(meta)
|
|
83
|
+
].map((key) => {
|
|
84
|
+
const compositeKey = `meta.${key}`;
|
|
85
|
+
return /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
86
|
+
key: compositeKey,
|
|
87
|
+
role: "none",
|
|
88
|
+
className: "flex items-center mt-2 gap-1"
|
|
89
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
90
|
+
role: "none",
|
|
91
|
+
className: "flex-1"
|
|
92
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui_form.TextInput, {
|
|
93
|
+
...props,
|
|
94
|
+
property: compositeKey,
|
|
95
|
+
type: "string",
|
|
96
|
+
label: key
|
|
97
|
+
})), /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.IconButton, {
|
|
98
|
+
icon: "ph--trash--regular",
|
|
99
|
+
iconOnly: true,
|
|
100
|
+
classNames: "mt-6",
|
|
101
|
+
label: t("trigger meta remove"),
|
|
102
|
+
onClick: () => {
|
|
103
|
+
const newValues = {
|
|
104
|
+
...props.getValue("meta")
|
|
105
|
+
};
|
|
106
|
+
delete newValues[key];
|
|
107
|
+
props.onValueChange("meta", "object", newValues);
|
|
108
|
+
}
|
|
109
|
+
}));
|
|
110
|
+
}), /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
111
|
+
role: "none",
|
|
112
|
+
className: "flex items-center mt-2 gap-1 plb-1"
|
|
113
|
+
}, /* @__PURE__ */ import_react2.default.createElement("div", {
|
|
114
|
+
role: "none",
|
|
115
|
+
className: "flex-1"
|
|
116
|
+
}, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Input.Root, null, /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.Input.TextInput, {
|
|
117
|
+
placeholder: t("trigger meta prop name placeholder"),
|
|
118
|
+
value: newMetaFieldName,
|
|
119
|
+
onChange: (event) => setNewMetaFieldName(event.target.value)
|
|
120
|
+
}))), /* @__PURE__ */ import_react2.default.createElement(import_react_ui2.IconButton, {
|
|
121
|
+
icon: "ph--plus--regular",
|
|
122
|
+
iconOnly: true,
|
|
123
|
+
label: t("trigger meta add"),
|
|
124
|
+
onClick: () => {
|
|
125
|
+
if (newMetaFieldName.length) {
|
|
126
|
+
const meta2 = props.getValue("meta") ?? {};
|
|
127
|
+
const metaWithNewProp = {
|
|
128
|
+
...meta2,
|
|
129
|
+
[newMetaFieldName]: ""
|
|
130
|
+
};
|
|
131
|
+
setNewMetaFieldName("");
|
|
132
|
+
props.onValueChange("meta", "object", metaWithNewProp);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
})));
|
|
136
|
+
}
|
|
76
137
|
}
|
|
77
138
|
});
|
|
78
139
|
};
|
|
@@ -80,8 +141,8 @@ var getFunctionName = (scripts, fn) => {
|
|
|
80
141
|
return scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;
|
|
81
142
|
};
|
|
82
143
|
var grid = "grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]";
|
|
83
|
-
var AutomationPanel = ({ space }) => {
|
|
84
|
-
const { t } = (0, import_react_ui.useTranslation)(
|
|
144
|
+
var AutomationPanel = ({ space, object }) => {
|
|
145
|
+
const { t } = (0, import_react_ui.useTranslation)(import_chunk_5VF5JKUN.AUTOMATION_PLUGIN);
|
|
85
146
|
const client = (0, import_react_client.useClient)();
|
|
86
147
|
const triggers = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_functions.FunctionTrigger));
|
|
87
148
|
const functions = (0, import_echo.useQuery)(space, import_echo.Filter.schema(import_functions.FunctionType));
|
|
@@ -94,7 +155,9 @@ var AutomationPanel = ({ space }) => {
|
|
|
94
155
|
setSelected(trigger2);
|
|
95
156
|
};
|
|
96
157
|
const handleAdd = () => {
|
|
97
|
-
setTrigger((0, import_echo.create)(import_functions.FunctionTriggerSchema, {
|
|
158
|
+
setTrigger((0, import_echo.create)(import_functions.FunctionTriggerSchema, {
|
|
159
|
+
meta: {}
|
|
160
|
+
}));
|
|
98
161
|
setSelected(void 0);
|
|
99
162
|
};
|
|
100
163
|
const handleDelete = (trigger2) => {
|
|
@@ -123,25 +186,27 @@ var AutomationPanel = ({ space }) => {
|
|
|
123
186
|
}, ({ items: triggers2 }) => /* @__PURE__ */ import_react.default.createElement("div", {
|
|
124
187
|
role: "list",
|
|
125
188
|
className: "flex flex-col w-full"
|
|
126
|
-
}, triggers2?.map((trigger2) =>
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
189
|
+
}, triggers2?.map((trigger2) => {
|
|
190
|
+
const copyAction = getCopyAction(client, trigger2);
|
|
191
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.Item, {
|
|
192
|
+
key: trigger2.id,
|
|
193
|
+
item: trigger2,
|
|
194
|
+
classNames: (0, import_react_ui_theme.mx)(grid, import_react_ui_theme.ghostHover, "items-center", "px-2")
|
|
195
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Input.Root, null, /* @__PURE__ */ import_react.default.createElement(import_react_ui.Input.Switch, {
|
|
196
|
+
checked: trigger2.enabled,
|
|
197
|
+
onCheckedChange: (checked) => trigger2.enabled = checked
|
|
198
|
+
})), /* @__PURE__ */ import_react.default.createElement("div", {
|
|
199
|
+
className: "flex"
|
|
200
|
+
}, /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemTitle, {
|
|
201
|
+
classNames: "px-1 cursor-pointer w-0 shrink truncate",
|
|
202
|
+
onClick: () => handleSelect(trigger2)
|
|
203
|
+
}, getFunctionName2(scripts, functions, trigger2) ?? "\u2205"), copyAction && /* @__PURE__ */ import_react.default.createElement(import_react_ui.Button, {
|
|
204
|
+
onClick: () => navigator.clipboard.writeText(copyAction.contentProvider())
|
|
205
|
+
}, t(copyAction.translationKey))), /* @__PURE__ */ import_react.default.createElement(import_react_ui_list.List.ItemDeleteButton, {
|
|
206
|
+
onClick: () => handleDelete(trigger2)
|
|
207
|
+
}));
|
|
208
|
+
}))), trigger && /* @__PURE__ */ import_react.default.createElement(TriggerEditor, {
|
|
143
209
|
space,
|
|
144
|
-
storedTrigger: selected,
|
|
145
210
|
trigger,
|
|
146
211
|
onSave: handleSave,
|
|
147
212
|
onCancel: handleCancel
|
|
@@ -153,6 +218,21 @@ var AutomationPanel = ({ space }) => {
|
|
|
153
218
|
onClick: handleAdd
|
|
154
219
|
})));
|
|
155
220
|
};
|
|
221
|
+
var getCopyAction = (client, trigger) => {
|
|
222
|
+
if (trigger?.spec?.type === import_functions.TriggerKind.Email) {
|
|
223
|
+
return {
|
|
224
|
+
translationKey: "trigger copy email",
|
|
225
|
+
contentProvider: () => `${(0, import_echo.getSpace)(trigger).id}@dxos.network`
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
if (trigger?.spec?.type === import_functions.TriggerKind.Webhook) {
|
|
229
|
+
return {
|
|
230
|
+
translationKey: "trigger copy url",
|
|
231
|
+
contentProvider: () => getWebhookUrl(client, trigger)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
return void 0;
|
|
235
|
+
};
|
|
156
236
|
var getWebhookUrl = (client, trigger) => {
|
|
157
237
|
const spaceId = (0, import_echo.getSpace)(trigger).id;
|
|
158
238
|
const edgeUrl = new URL(client.config.values.runtime.services.edge.url);
|
|
@@ -161,11 +241,12 @@ var getWebhookUrl = (client, trigger) => {
|
|
|
161
241
|
return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();
|
|
162
242
|
};
|
|
163
243
|
var getFunctionName2 = (scripts, functions, trigger) => {
|
|
244
|
+
const shortId = trigger.function && `${trigger.function?.slice(0, 16)}\u2026`;
|
|
164
245
|
const functionObject = functions.find((fn) => fn.name === trigger.function);
|
|
165
246
|
if (!functionObject) {
|
|
166
|
-
return
|
|
247
|
+
return shortId;
|
|
167
248
|
}
|
|
168
|
-
return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ??
|
|
249
|
+
return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;
|
|
169
250
|
};
|
|
170
251
|
var AutomationPanel_default = AutomationPanel;
|
|
171
|
-
//# sourceMappingURL=AutomationPanel-
|
|
252
|
+
//# sourceMappingURL=AutomationPanel-PPODB5XA.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/TriggerEditor/TriggerEditor.tsx", "../../../src/components/AutomationPanel/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport { S } from '@dxos/echo-schema';\nimport {\n FunctionType,\n FunctionTrigger,\n FunctionTriggerSchema,\n TriggerKind,\n type FunctionTriggerType,\n ScriptType,\n} from '@dxos/functions';\nimport { type Client, useClient } from '@dxos/react-client';\nimport { create, Filter, useQuery, type Space, type ReactiveObject, getSpace } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation, Button } from '@dxos/react-ui';\nimport { List } from '@dxos/react-ui-list';\nimport { ghostHover, mx } from '@dxos/react-ui-theme';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\nimport { TriggerEditor, type TriggerEditorProps } from '../TriggerEditor';\n\nconst grid = 'grid grid-cols-[40px_1fr_32px] min-bs-[2.5rem]';\n\nexport type AutomationPanelProps = {\n space: Space;\n object?: ReactiveObject<any>;\n};\n\n// TODO(burdon): Factor out common layout with ViewEditor.\nexport const AutomationPanel = ({ space, object }: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n const client = useClient();\n const triggers = useQuery(space, Filter.schema(FunctionTrigger));\n const functions = useQuery(space, Filter.schema(FunctionType));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const [trigger, setTrigger] = useState<FunctionTriggerType>();\n const [selected, setSelected] = useState<FunctionTrigger>();\n\n const handleSelect = (trigger: FunctionTrigger) => {\n const { id: _, ...values } = trigger;\n setTrigger(values);\n setSelected(trigger);\n };\n\n const handleAdd = () => {\n setTrigger(create(FunctionTriggerSchema, { meta: {} }));\n setSelected(undefined);\n };\n\n const handleDelete = (trigger: FunctionTrigger) => {\n space.db.remove(trigger);\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleSave: TriggerEditorProps['onSave'] = (trigger) => {\n if (selected) {\n Object.assign(selected, trigger);\n } else {\n space.db.add(create(FunctionTrigger, trigger));\n }\n\n setTrigger(undefined);\n setSelected(undefined);\n };\n\n const handleCancel: TriggerEditorProps['onCancel'] = () => {\n setTrigger(undefined);\n };\n\n return (\n <div className='flex flex-col w-full divide-y divide-separator overflow-y-auto'>\n <List.Root<FunctionTrigger> items={triggers} isItem={S.is(FunctionTrigger)} getId={(field) => field.id}>\n {({ items: triggers }) => (\n <div role='list' className='flex flex-col w-full'>\n {triggers?.map((trigger) => {\n const copyAction = getCopyAction(client, trigger);\n return (\n <List.Item<FunctionTrigger>\n key={trigger.id}\n item={trigger}\n classNames={mx(grid, ghostHover, 'items-center', 'px-2')}\n >\n <Input.Root>\n <Input.Switch\n checked={trigger.enabled}\n onCheckedChange={(checked) => (trigger.enabled = checked)}\n />\n </Input.Root>\n\n <div className={'flex'}>\n <List.ItemTitle\n classNames='px-1 cursor-pointer w-0 shrink truncate'\n onClick={() => handleSelect(trigger)}\n >\n {getFunctionName(scripts, functions, trigger) ?? '∅'}\n </List.ItemTitle>\n\n {/* TODO: a better way to expose copy action */}\n {copyAction && (\n <Button onClick={() => navigator.clipboard.writeText(copyAction.contentProvider())}>\n {t(copyAction.translationKey)}\n </Button>\n )}\n </div>\n\n <List.ItemDeleteButton onClick={() => handleDelete(trigger)} />\n </List.Item>\n );\n })}\n </div>\n )}\n </List.Root>\n\n {trigger && <TriggerEditor space={space} trigger={trigger} onSave={handleSave} onCancel={handleCancel} />}\n\n {!trigger && (\n <div className='flex p-2 justify-center'>\n <IconButton icon='ph--plus--regular' label={t('new trigger')} onClick={handleAdd} />\n </div>\n )}\n </div>\n );\n};\n\nconst getCopyAction = (client: Client, trigger: FunctionTrigger | undefined) => {\n if (trigger?.spec?.type === TriggerKind.Email) {\n return { translationKey: 'trigger copy email', contentProvider: () => `${getSpace(trigger)!.id}@dxos.network` };\n }\n\n if (trigger?.spec?.type === TriggerKind.Webhook) {\n return { translationKey: 'trigger copy url', contentProvider: () => getWebhookUrl(client, trigger) };\n }\n\n return undefined;\n};\n\nconst getWebhookUrl = (client: Client, trigger: FunctionTrigger) => {\n const spaceId = getSpace(trigger)!.id;\n const edgeUrl = new URL(client.config.values.runtime!.services!.edge!.url!);\n const isSecure = edgeUrl.protocol.startsWith('https') || edgeUrl.protocol.startsWith('wss');\n edgeUrl.protocol = isSecure ? 'https' : 'http';\n return new URL(`/webhook/${spaceId}:${trigger.id}`, edgeUrl).toString();\n};\n\nconst getFunctionName = (scripts: ScriptType[], functions: FunctionType[], trigger: FunctionTriggerType) => {\n const shortId = trigger.function && `${trigger.function?.slice(0, 16)}…`;\n const functionObject = functions.find((fn) => fn.name === trigger.function);\n if (!functionObject) {\n return shortId;\n }\n return scripts.find((s) => functionObject.source?.target?.id === s.id)?.name ?? shortId;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useState } from 'react';\n\nimport {\n FunctionType,\n FunctionTriggerSchema,\n type FunctionTriggerType,\n type FunctionTrigger,\n ScriptType,\n TriggerKind,\n} from '@dxos/functions';\nimport { Filter, useQuery, type Space } from '@dxos/react-client/echo';\nimport { IconButton, Input, useTranslation } from '@dxos/react-ui';\nimport { Form, SelectInput, TextInput } from '@dxos/react-ui-form';\n\nimport { AUTOMATION_PLUGIN } from '../../meta';\n\nexport type TriggerEditorProps = {\n space: Space;\n trigger: FunctionTriggerType;\n onSave?: (trigger: Omit<FunctionTrigger, 'id'>) => void;\n onCancel?: () => void;\n};\n\nexport const TriggerEditor = ({ space, trigger, onSave, onCancel }: TriggerEditorProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n\n const functions = useQuery(space, Filter.schema(FunctionType));\n const scripts = useQuery(space, Filter.schema(ScriptType));\n\n const handleSave = (values: FunctionTriggerType) => {\n onSave?.(values);\n };\n\n return (\n <Form<FunctionTriggerType>\n schema={FunctionTriggerSchema}\n values={trigger}\n onSave={handleSave}\n onCancel={onCancel}\n Custom={{\n ['function' satisfies keyof FunctionTriggerType]: (props) => (\n <SelectInput<FunctionTriggerType>\n {...props}\n options={functions.map((fn) => ({\n value: fn.name,\n label: getFunctionName(scripts, fn),\n }))}\n />\n ),\n ['spec.type' as const]: (props) => (\n <SelectInput<FunctionTriggerType>\n {...props}\n options={Object.values(TriggerKind).map((kind) => ({\n value: kind,\n label: t(`trigger type ${kind}`),\n }))}\n />\n ),\n ['meta' as const]: (props) => {\n const meta = props.getValue('meta')!;\n\n const [newMetaFieldName, setNewMetaFieldName] = useState('');\n\n React.useEffect(() => props.onValueChange('meta', 'object', { ...meta }), []);\n\n return (\n <>\n <div>{props.label}</div>\n {[...Object.keys(meta)].map((key) => {\n const compositeKey: any = `meta.${key}`;\n return (\n <div key={compositeKey} role='none' className='flex items-center mt-2 gap-1'>\n <div role='none' className='flex-1'>\n <TextInput {...props} property={compositeKey} type={'string'} label={key} />\n </div>\n <IconButton\n icon='ph--trash--regular'\n iconOnly\n classNames={'mt-6'}\n label={t('trigger meta remove')}\n onClick={() => {\n const newValues: any = { ...props.getValue('meta') };\n delete newValues[key];\n props.onValueChange('meta', 'object', newValues);\n }}\n />\n </div>\n );\n })}\n <div role='none' className='flex items-center mt-2 gap-1 plb-1'>\n <div role='none' className='flex-1'>\n <Input.Root>\n <Input.TextInput\n placeholder={t('trigger meta prop name placeholder')}\n value={newMetaFieldName}\n onChange={(event) => setNewMetaFieldName(event.target.value)}\n />\n </Input.Root>\n </div>\n <IconButton\n icon='ph--plus--regular'\n iconOnly\n label={t('trigger meta add')}\n onClick={() => {\n if (newMetaFieldName.length) {\n const meta = props.getValue('meta') ?? {};\n const metaWithNewProp = { ...meta, [newMetaFieldName]: '' };\n setNewMetaFieldName('');\n props.onValueChange('meta', 'object', metaWithNewProp);\n }\n }}\n />\n </div>\n </>\n );\n },\n }}\n />\n );\n};\n\nconst getFunctionName = (scripts: ScriptType[], fn: FunctionType) => {\n return scripts.find((s) => fn.source?.target?.id === s.id)?.name ?? fn.name;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAAgC;AAEhC,yBAAkB;AAClB,uBAOO;AACP,0BAAuC;AACvC,kBAAoF;AACpF,sBAA0D;AAC1D,2BAAqB;AACrB,4BAA+B;ACf/B,IAAAA,gBAAgC;AAEhC,IAAAC,oBAOO;AACP,IAAAC,eAA6C;AAC7C,IAAAC,mBAAkD;AAClD,2BAA6C;AAWtC,IAAMC,gBAAgB,CAAC,EAAEC,OAAOC,SAASC,QAAQC,SAAQ,MAAsB;AACpF,QAAM,EAAEC,EAAC,QAAKC,iCAAeC,uCAAAA;AAE7B,QAAMC,gBAAYC,uBAASR,OAAOS,oBAAOC,OAAOC,8BAAAA,CAAAA;AAChD,QAAMC,cAAUJ,uBAASR,OAAOS,oBAAOC,OAAOG,4BAAAA,CAAAA;AAE9C,QAAMC,aAAa,CAACC,WAAAA;AAClBb,aAASa,MAAAA;EACX;AAEA,SACE,8BAAAC,QAAA,cAACC,2BAAAA;IACCP,QAAQQ;IACRH,QAAQd;IACRC,QAAQY;IACRX;IACAgB,QAAQ;MACN,CAAC,UAAA,GAAiD,CAACC,UACjD,8BA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iBAAAA,YAAYmF,OAAO;AAC7C,WAAO;MAAEH,gBAAgB;MAAsBD,iBAAiB,MAAM,OAAGK,sBAASjH,OAAAA,EAAUgE,EAAE;IAAgB;EAChH;AAEA,MAAIhE,SAAS+G,MAAMjE,SAASjB,iBAAAA,YAAYqF,SAAS;AAC/C,WAAO;MAAEL,gBAAgB;MAAoBD,iBAAiB,MAAMO,cAAc/C,QAAQpE,OAAAA;IAAS;EACrG;AAEA,SAAO+E;AACT;AAEA,IAAMoC,gBAAgB,CAAC/C,QAAgBpE,YAAAA;AACrC,QAAMoH,cAAUH,sBAASjH,OAAAA,EAAUgE;AACnC,QAAMqD,UAAU,IAAIC,IAAIlD,OAAOmD,OAAOzG,OAAO0G,QAASC,SAAUC,KAAMC,GAAG;AACzE,QAAMC,WAAWP,QAAQQ,SAASC,WAAW,OAAA,KAAYT,QAAQQ,SAASC,WAAW,KAAA;AACrFT,UAAQQ,WAAWD,WAAW,UAAU;AACxC,SAAO,IAAIN,IAAI,YAAYF,OAAAA,IAAWpH,QAAQgE,EAAE,IAAIqD,OAAAA,EAASU,SAAQ;AACvE;AAEA,IAAMpG,mBAAkB,CAAChB,SAAuBL,WAA2BN,YAAAA;AACzE,QAAMgI,UAAUhI,QAAQiI,YAAY,GAAGjI,QAAQiI,UAAUC,MAAM,GAAG,EAAA,CAAA;AAClE,QAAMC,iBAAiB7H,UAAUuD,KAAK,CAACtC,OAAOA,GAAGE,SAASzB,QAAQiI,QAAQ;AAC1E,MAAI,CAACE,gBAAgB;AACnB,WAAOH;EACT;AACA,SAAOrH,QAAQkD,KAAK,CAACC,MAAMqE,eAAepE,QAAQL,QAAQM,OAAOF,EAAEE,EAAE,GAAGvC,QAAQuG;AAClF;AEtJA,IAAA,0BAAe9D;",
|
|
6
|
+
"names": ["import_react", "import_functions", "import_echo", "import_react_ui", "TriggerEditor", "space", "trigger", "onSave", "onCancel", "t", "useTranslation", "AUTOMATION_PLUGIN", "functions", "useQuery", "Filter", "schema", "FunctionType", "scripts", "ScriptType", "handleSave", "values", "React", "Form", "FunctionTriggerSchema", "Custom", "props", "SelectInput", "options", "map", "fn", "value", "name", "label", "getFunctionName", "Object", "TriggerKind", "kind", "meta", "getValue", "newMetaFieldName", "setNewMetaFieldName", "useState", "useEffect", "onValueChange", "div", "keys", "key", "compositeKey", "role", "className", "TextInput", "property", "type", "IconButton", "icon", "iconOnly", "classNames", "onClick", "newValues", "Input", "Root", "placeholder", "onChange", "event", "target", "length", "metaWithNewProp", "find", "s", "source", "id", "grid", "AutomationPanel", "object", "client", "useClient", "triggers", "FunctionTrigger", "setTrigger", "selected", "setSelected", "handleSelect", "_", "handleAdd", "create", "undefined", "handleDelete", "db", "remove", "assign", "add", "handleCancel", "List", "items", "isItem", "S", "is", "getId", "field", "copyAction", "getCopyAction", "Item", "item", "mx", "ghostHover", "Switch", "checked", "enabled", "onCheckedChange", "ItemTitle", "Button", "navigator", "clipboard", "writeText", "contentProvider", "translationKey", "ItemDeleteButton", "spec", "Email", "getSpace", "Webhook", "getWebhookUrl", "spaceId", "edgeUrl", "URL", "config", "runtime", "services", "edge", "url", "isSecure", "protocol", "startsWith", "toString", "shortId", "function", "slice", "functionObject"]
|
|
7
|
+
}
|