@dxos/plugin-automation 0.8.4-main.f9ba587 → 0.8.4-main.fd6878d
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/{AutomationContainer-VZNV2ZQF.mjs → AutomationContainer-5UYKI7EG.mjs} +4 -4
- package/dist/lib/browser/AutomationContainer-5UYKI7EG.mjs.map +7 -0
- package/dist/lib/browser/{AutomationPanel-ZWA6GOFY.mjs → AutomationPanel-YYERBNYJ.mjs} +3 -3
- package/dist/lib/browser/{FunctionsContainer-IOB333TX.mjs → FunctionsContainer-VOGKIPHA.mjs} +2 -2
- package/dist/lib/browser/{FunctionsContainer-IOB333TX.mjs.map → FunctionsContainer-VOGKIPHA.mjs.map} +2 -2
- package/dist/lib/browser/{FunctionsPanel-56ZKRVM5.mjs → FunctionsPanel-I443Y6KB.mjs} +2 -2
- package/dist/lib/browser/{app-graph-builder-ZTAUTFI4.mjs → app-graph-builder-4OFKIRAI.mjs} +2 -2
- package/dist/lib/{node-esm/app-graph-builder-3FP63ZSG.mjs.map → browser/app-graph-builder-4OFKIRAI.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-FSJZXTS2.mjs → chunk-7EE4SA6M.mjs} +2 -2
- package/dist/lib/{node-esm/chunk-AZH66CED.mjs.map → browser/chunk-7EE4SA6M.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-ECSTS2UI.mjs → chunk-CHENFUQ6.mjs} +5 -5
- package/dist/lib/browser/{chunk-S2LE7SYB.mjs → chunk-HN7OHFCB.mjs} +4 -5
- package/dist/lib/browser/chunk-HN7OHFCB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ERTIGJYE.mjs → chunk-OX6OW6XP.mjs} +4 -4
- package/dist/lib/browser/{chunk-ERTIGJYE.mjs.map → chunk-OX6OW6XP.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-LYJVTIVD.mjs → chunk-Z5DT4MHW.mjs} +2 -2
- package/dist/lib/{node-esm/chunk-ZGPUV5VS.mjs.map → browser/chunk-Z5DT4MHW.mjs.map} +3 -3
- package/dist/lib/browser/index.mjs +7 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-YLRSMLH4.mjs → intent-resolver-YZP6RKTR.mjs} +3 -3
- package/dist/lib/{node-esm/intent-resolver-LU7EYWEO.mjs.map → browser/intent-resolver-YZP6RKTR.mjs.map} +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-4DFSM7OX.mjs → react-surface-WNOIIT4O.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +8 -0
- package/dist/lib/node-esm/{AutomationContainer-WMIH3F4V.mjs → AutomationContainer-EZMY6DTD.mjs} +4 -4
- package/dist/lib/node-esm/AutomationContainer-EZMY6DTD.mjs.map +7 -0
- package/dist/lib/node-esm/{AutomationPanel-YYUMSK2W.mjs → AutomationPanel-5EQQF5S2.mjs} +3 -3
- package/dist/lib/node-esm/{FunctionsContainer-DJWB6WFH.mjs → FunctionsContainer-IHLMLXHH.mjs} +2 -2
- package/dist/lib/node-esm/{FunctionsContainer-DJWB6WFH.mjs.map → FunctionsContainer-IHLMLXHH.mjs.map} +2 -2
- package/dist/lib/node-esm/{FunctionsPanel-KGIOZSPZ.mjs → FunctionsPanel-ELINCXPW.mjs} +2 -2
- package/dist/lib/node-esm/{app-graph-builder-3FP63ZSG.mjs → app-graph-builder-555IHYOB.mjs} +2 -2
- package/dist/lib/{browser/app-graph-builder-ZTAUTFI4.mjs.map → node-esm/app-graph-builder-555IHYOB.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-ZGPUV5VS.mjs → chunk-CX2AILIS.mjs} +2 -2
- package/dist/lib/{browser/chunk-LYJVTIVD.mjs.map → node-esm/chunk-CX2AILIS.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-SGZPTJ47.mjs → chunk-D4VWZD53.mjs} +5 -5
- package/dist/lib/node-esm/{chunk-HIMYPGHF.mjs → chunk-GHRG4NQV.mjs} +4 -4
- package/dist/lib/node-esm/{chunk-HIMYPGHF.mjs.map → chunk-GHRG4NQV.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-UKATFY3R.mjs → chunk-OEZNHUL2.mjs} +4 -5
- package/dist/lib/node-esm/chunk-OEZNHUL2.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-AZH66CED.mjs → chunk-YPUO4IVX.mjs} +2 -2
- package/dist/lib/{browser/chunk-FSJZXTS2.mjs.map → node-esm/chunk-YPUO4IVX.mjs.map} +3 -3
- package/dist/lib/node-esm/index.mjs +7 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-LU7EYWEO.mjs → intent-resolver-TSLQE27W.mjs} +3 -3
- package/dist/lib/{browser/intent-resolver-YLRSMLH4.mjs.map → node-esm/intent-resolver-TSLQE27W.mjs.map} +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-3PNW7NDW.mjs → react-surface-K6MQFIAS.mjs} +3 -3
- package/dist/lib/node-esm/{types.mjs → types/index.mjs} +3 -3
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/components/AutomationContainer.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsContainer.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +3 -3
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -30
- package/src/AutomationPlugin.tsx +2 -2
- package/src/capabilities/app-graph-builder.ts +2 -2
- package/src/capabilities/intent-resolver.ts +3 -3
- package/src/components/AutomationContainer.tsx +3 -2
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +3 -2
- package/src/components/AutomationPanel/AutomationPanel.tsx +2 -2
- package/src/components/FunctionsContainer.tsx +2 -1
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +2 -2
- package/src/components/TriggerEditor/SpecSelector.tsx +1 -1
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +3 -2
- package/src/components/TriggerEditor/TriggerEditor.tsx +3 -3
- package/src/types/index.ts +5 -0
- package/src/{types.ts → types/schema.ts} +2 -4
- package/dist/lib/browser/AutomationContainer-VZNV2ZQF.mjs.map +0 -7
- package/dist/lib/browser/chunk-S2LE7SYB.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -8
- package/dist/lib/node-esm/AutomationContainer-WMIH3F4V.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-UKATFY3R.mjs.map +0 -7
- package/dist/types/src/types.d.ts.map +0 -1
- /package/dist/lib/browser/{AutomationPanel-ZWA6GOFY.mjs.map → AutomationPanel-YYERBNYJ.mjs.map} +0 -0
- /package/dist/lib/browser/{FunctionsPanel-56ZKRVM5.mjs.map → FunctionsPanel-I443Y6KB.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-ECSTS2UI.mjs.map → chunk-CHENFUQ6.mjs.map} +0 -0
- /package/dist/lib/browser/{react-surface-4DFSM7OX.mjs.map → react-surface-WNOIIT4O.mjs.map} +0 -0
- /package/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
- /package/dist/lib/node-esm/{AutomationPanel-YYUMSK2W.mjs.map → AutomationPanel-5EQQF5S2.mjs.map} +0 -0
- /package/dist/lib/node-esm/{FunctionsPanel-KGIOZSPZ.mjs.map → FunctionsPanel-ELINCXPW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-SGZPTJ47.mjs.map → chunk-D4VWZD53.mjs.map} +0 -0
- /package/dist/lib/node-esm/{react-surface-3PNW7NDW.mjs.map → react-surface-K6MQFIAS.mjs.map} +0 -0
- /package/dist/lib/node-esm/{types.mjs.map → types/index.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-automation",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fd6878d",
|
|
4
4
|
"description": "Prompt chain plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -10,14 +10,16 @@
|
|
|
10
10
|
"type": "module",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
+
"source": "./src/index.ts",
|
|
13
14
|
"types": "./dist/types/src/index.d.ts",
|
|
14
15
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
16
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
16
17
|
},
|
|
17
18
|
"./types": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
19
|
+
"source": "./src/types/index.ts",
|
|
20
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
21
|
+
"browser": "./dist/lib/browser/types/index.mjs",
|
|
22
|
+
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
21
23
|
}
|
|
22
24
|
},
|
|
23
25
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -32,38 +34,38 @@
|
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@preact-signals/safe-react": "^0.9.0",
|
|
34
36
|
"@preact/signals-core": "^1.9.0",
|
|
35
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
36
|
-
"@dxos/async": "0.8.4-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
46
|
-
"@dxos/plugin-deck": "0.8.4-main.
|
|
47
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
48
|
-
"@dxos/react-client": "0.8.4-main.
|
|
49
|
-
"@dxos/random": "0.8.4-main.
|
|
50
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
51
|
-
"@dxos/react-ui-
|
|
52
|
-
"@dxos/react-ui-
|
|
53
|
-
"@dxos/util": "0.8.4-main.
|
|
37
|
+
"@dxos/app-framework": "0.8.4-main.fd6878d",
|
|
38
|
+
"@dxos/async": "0.8.4-main.fd6878d",
|
|
39
|
+
"@dxos/echo": "0.8.4-main.fd6878d",
|
|
40
|
+
"@dxos/conductor": "0.8.4-main.fd6878d",
|
|
41
|
+
"@dxos/invariant": "0.8.4-main.fd6878d",
|
|
42
|
+
"@dxos/functions": "0.8.4-main.fd6878d",
|
|
43
|
+
"@dxos/live-object": "0.8.4-main.fd6878d",
|
|
44
|
+
"@dxos/echo-schema": "0.8.4-main.fd6878d",
|
|
45
|
+
"@dxos/plugin-client": "0.8.4-main.fd6878d",
|
|
46
|
+
"@dxos/log": "0.8.4-main.fd6878d",
|
|
47
|
+
"@dxos/plugin-graph": "0.8.4-main.fd6878d",
|
|
48
|
+
"@dxos/plugin-deck": "0.8.4-main.fd6878d",
|
|
49
|
+
"@dxos/plugin-space": "0.8.4-main.fd6878d",
|
|
50
|
+
"@dxos/react-client": "0.8.4-main.fd6878d",
|
|
51
|
+
"@dxos/random": "0.8.4-main.fd6878d",
|
|
52
|
+
"@dxos/react-ui-form": "0.8.4-main.fd6878d",
|
|
53
|
+
"@dxos/react-ui-list": "0.8.4-main.fd6878d",
|
|
54
|
+
"@dxos/react-ui-stack": "0.8.4-main.fd6878d",
|
|
55
|
+
"@dxos/util": "0.8.4-main.fd6878d"
|
|
54
56
|
},
|
|
55
57
|
"devDependencies": {
|
|
56
58
|
"@effect-rx/rx-react": "0.38.0",
|
|
57
|
-
"@effect/platform": "0.
|
|
59
|
+
"@effect/platform": "0.90.2",
|
|
58
60
|
"@types/react": "~18.2.0",
|
|
59
61
|
"@types/react-dom": "~18.2.0",
|
|
60
|
-
"effect": "3.
|
|
62
|
+
"effect": "3.17.7",
|
|
61
63
|
"react": "~18.2.0",
|
|
62
64
|
"react-dom": "~18.2.0",
|
|
63
65
|
"vite": "5.4.7",
|
|
64
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
65
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
66
|
-
"@dxos/react-ui
|
|
66
|
+
"@dxos/react-ui-theme": "0.8.4-main.fd6878d",
|
|
67
|
+
"@dxos/storybook-utils": "0.8.4-main.fd6878d",
|
|
68
|
+
"@dxos/react-ui": "0.8.4-main.fd6878d"
|
|
67
69
|
},
|
|
68
70
|
"peerDependencies": {
|
|
69
71
|
"@effect-rx/rx-react": "^0.34.1",
|
|
@@ -71,8 +73,8 @@
|
|
|
71
73
|
"effect": "^3.13.3",
|
|
72
74
|
"react": "~18.2.0",
|
|
73
75
|
"react-dom": "~18.2.0",
|
|
74
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
75
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
76
|
+
"@dxos/react-ui": "0.8.4-main.fd6878d",
|
|
77
|
+
"@dxos/react-ui-theme": "0.8.4-main.fd6878d"
|
|
76
78
|
},
|
|
77
79
|
"publishConfig": {
|
|
78
80
|
"access": "public"
|
package/src/AutomationPlugin.tsx
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { Capabilities, contributes, defineModule, definePlugin
|
|
6
|
-
import {
|
|
5
|
+
import { Capabilities, Events, contributes, defineModule, definePlugin } from '@dxos/app-framework';
|
|
6
|
+
import { FunctionTrigger, FunctionType } from '@dxos/functions';
|
|
7
7
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
8
|
|
|
9
9
|
import { AppGraphBuilder, IntentResolver, ReactSurface } from './capabilities';
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
import { Rx } from '@effect-rx/rx-react';
|
|
6
6
|
import { Option, pipe } from 'effect';
|
|
7
7
|
|
|
8
|
-
import { Capabilities,
|
|
8
|
+
import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
|
|
9
9
|
import { Obj } from '@dxos/echo';
|
|
10
10
|
import { ScriptType } from '@dxos/functions';
|
|
11
|
-
import {
|
|
11
|
+
import { ATTENDABLE_PATH_SEPARATOR, PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
|
|
12
12
|
import { createExtension } from '@dxos/plugin-graph';
|
|
13
13
|
import { SPACE_PLUGIN } from '@dxos/plugin-space';
|
|
14
14
|
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
-
contributes,
|
|
7
6
|
Capabilities,
|
|
8
|
-
|
|
7
|
+
LayoutAction,
|
|
9
8
|
type PluginContext,
|
|
9
|
+
contributes,
|
|
10
10
|
createIntent,
|
|
11
|
-
|
|
11
|
+
createResolver,
|
|
12
12
|
} from '@dxos/app-framework';
|
|
13
13
|
import { Obj, Ref } from '@dxos/echo';
|
|
14
14
|
import { FunctionTrigger, FunctionType, ScriptType, TriggerKind } from '@dxos/functions';
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { useTranslation } from '@dxos/react-ui';
|
|
8
|
-
import {
|
|
8
|
+
import { ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
9
9
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
10
10
|
|
|
11
|
-
import { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';
|
|
12
11
|
import { AUTOMATION_PLUGIN } from '../meta';
|
|
13
12
|
|
|
13
|
+
import { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';
|
|
14
|
+
|
|
14
15
|
export const AutomationContainer = (props: AutomationPanelProps) => {
|
|
15
16
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
16
17
|
return (
|
|
@@ -8,15 +8,16 @@ import { type Meta } from '@storybook/react-vite';
|
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { FunctionTrigger, FunctionType } from '@dxos/functions';
|
|
12
12
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
13
13
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
14
14
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
15
15
|
|
|
16
|
-
import { AutomationPanel } from './AutomationPanel';
|
|
17
16
|
import { functions } from '../../testing';
|
|
18
17
|
import { translations } from '../../translations';
|
|
19
18
|
|
|
19
|
+
import { AutomationPanel } from './AutomationPanel';
|
|
20
|
+
|
|
20
21
|
const DefaultStory = () => {
|
|
21
22
|
const spaces = useSpaces();
|
|
22
23
|
const space = spaces[1];
|
|
@@ -7,15 +7,15 @@ import React, { useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Filter, Obj } from '@dxos/echo';
|
|
9
9
|
import {
|
|
10
|
-
FunctionType,
|
|
11
10
|
FunctionTrigger,
|
|
12
11
|
FunctionTriggerSchema,
|
|
13
12
|
type FunctionTriggerType,
|
|
13
|
+
FunctionType,
|
|
14
14
|
ScriptType,
|
|
15
15
|
TriggerKind,
|
|
16
16
|
} from '@dxos/functions';
|
|
17
17
|
import { type Client, useClient } from '@dxos/react-client';
|
|
18
|
-
import {
|
|
18
|
+
import { type Space, getSpace, useQuery } from '@dxos/react-client/echo';
|
|
19
19
|
import { Clipboard, IconButton, Input, Separator, useTranslation } from '@dxos/react-ui';
|
|
20
20
|
import { ControlItem, controlItemClasses } from '@dxos/react-ui-form';
|
|
21
21
|
import { List } from '@dxos/react-ui-list';
|
|
@@ -9,9 +9,10 @@ import { useTranslation } from '@dxos/react-ui';
|
|
|
9
9
|
import { ControlPage, ControlSection } from '@dxos/react-ui-form';
|
|
10
10
|
import { StackItem } from '@dxos/react-ui-stack';
|
|
11
11
|
|
|
12
|
-
import { FunctionsPanel } from './FunctionsPanel';
|
|
13
12
|
import { AUTOMATION_PLUGIN } from '../meta';
|
|
14
13
|
|
|
14
|
+
import { FunctionsPanel } from './FunctionsPanel';
|
|
15
|
+
|
|
15
16
|
export const FunctionsContainer = ({ space }: { space: Space }) => {
|
|
16
17
|
const { t } = useTranslation(AUTOMATION_PLUGIN);
|
|
17
18
|
return (
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
import { Schema } from 'effect';
|
|
6
6
|
import React, { useCallback, useMemo } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
|
|
9
9
|
import { FunctionType, ScriptType } from '@dxos/functions';
|
|
10
|
-
import { Filter, fullyQualifiedId, useQuery
|
|
10
|
+
import { Filter, type Space, fullyQualifiedId, useQuery } from '@dxos/react-client/echo';
|
|
11
11
|
import { Button, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
import { controlItemClasses } from '@dxos/react-ui-form';
|
|
13
13
|
import { List } from '@dxos/react-ui-list';
|
|
@@ -6,7 +6,7 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { type FunctionTriggerType, TriggerKind, type TriggerType } from '@dxos/functions';
|
|
8
8
|
import { useTranslation } from '@dxos/react-ui';
|
|
9
|
-
import {
|
|
9
|
+
import { type InputProps, SelectInput, useInputProps } from '@dxos/react-ui-form';
|
|
10
10
|
|
|
11
11
|
import { AUTOMATION_PLUGIN } from '../../meta';
|
|
12
12
|
|
|
@@ -8,16 +8,17 @@ import { type Meta } from '@storybook/react-vite';
|
|
|
8
8
|
import React, { useEffect, useState } from 'react';
|
|
9
9
|
|
|
10
10
|
import { Obj } from '@dxos/echo';
|
|
11
|
-
import {
|
|
11
|
+
import { FunctionTrigger, FunctionType, TriggerKind } from '@dxos/functions';
|
|
12
12
|
import { faker } from '@dxos/random';
|
|
13
13
|
import { useSpaces } from '@dxos/react-client/echo';
|
|
14
14
|
import { ContactType, withClientProvider } from '@dxos/react-client/testing';
|
|
15
15
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
16
16
|
|
|
17
|
-
import { TriggerEditor } from './TriggerEditor';
|
|
18
17
|
import { functions } from '../../testing';
|
|
19
18
|
import { translations } from '../../translations';
|
|
20
19
|
|
|
20
|
+
import { TriggerEditor } from './TriggerEditor';
|
|
21
|
+
|
|
21
22
|
const DefaultStory = () => {
|
|
22
23
|
const spaces = useSpaces();
|
|
23
24
|
const space = spaces[1];
|
|
@@ -7,13 +7,13 @@ import React, { useCallback, useMemo } from 'react';
|
|
|
7
7
|
import { ComputeGraph } from '@dxos/conductor';
|
|
8
8
|
import { Type } from '@dxos/echo';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
type FunctionTrigger,
|
|
11
11
|
FunctionTriggerSchema,
|
|
12
12
|
type FunctionTriggerType,
|
|
13
|
-
|
|
13
|
+
FunctionType,
|
|
14
14
|
ScriptType,
|
|
15
15
|
} from '@dxos/functions';
|
|
16
|
-
import { Filter, Ref,
|
|
16
|
+
import { Filter, Ref, type Space, useQuery } from '@dxos/react-client/echo';
|
|
17
17
|
import { type CustomInputMap, Form, SelectInput, useRefQueryLookupHandler } from '@dxos/react-ui-form';
|
|
18
18
|
|
|
19
19
|
import { FunctionInputEditor, type FunctionInputEditorProps } from './FunctionInputEditor';
|
|
@@ -6,7 +6,7 @@ import { Schema } from 'effect';
|
|
|
6
6
|
|
|
7
7
|
import { SpaceSchema } from '@dxos/react-client/echo';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { meta } from '../meta';
|
|
10
10
|
|
|
11
11
|
const TriggerTemplate = Schema.Union(
|
|
12
12
|
Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),
|
|
@@ -14,10 +14,8 @@ const TriggerTemplate = Schema.Union(
|
|
|
14
14
|
);
|
|
15
15
|
|
|
16
16
|
export namespace AutomationAction {
|
|
17
|
-
const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;
|
|
18
|
-
|
|
19
17
|
export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(
|
|
20
|
-
`${
|
|
18
|
+
`${meta.id}/action/create-trigger-from-template`,
|
|
21
19
|
{
|
|
22
20
|
input: Schema.Struct({
|
|
23
21
|
space: SpaceSchema,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlSection, ControlPage } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const AutomationContainer = (props: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('automation description', { ns: AUTOMATION_PLUGIN })}\n >\n <AutomationPanel {...props} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default AutomationContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,sBAAsB;AAC/B,SAASC,gBAAgBC,mBAAmB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,sBAAsB,CAACC,UAAAA;;;AAClC,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,4BAA4B;QAAES,IAAIP;MAAkB,CAAA;MAC7DQ,aAAaV,EAAE,0BAA0B;QAAES,IAAIP;MAAkB,CAAA;OAEjE,sBAAA,cAACS,iBAAoBZ,KAAAA,CAAAA,CAAAA,CAAAA;;;;AAK/B;AAEA,IAAA,8BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlSection", "ControlPage", "StackItem", "AutomationContainer", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;\n\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${AUTOMATION_ACTION}/create-trigger-from-template`,\n {\n input: Schema.Struct({\n space: SpaceSchema,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAI5B,IAAMC,kBAAkBC,OAAOC,MAC7BD,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUC,MAAML,OAAOM;AAAO,CAAA,GACnEN,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUG,UAAUP,OAAOQ;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,iBAAAA;EAEtB,MAAMC,kCAAkCZ,OAAOa,YAAW,EAC/D,GAAGH,iBAAAA,iCACH;IACEI,OAAOd,OAAOE,OAAO;MACnBa,OAAOC;MACPC,UAAUlB;MACVmB,SAASlB,OAAOmB,SAASnB,OAAOoB,OAAO;;MAEvCC,YAAYrB,OAAOmB,SAASnB,OAAOM,MAAM;MACzCQ,OAAOd,OAAOmB,SAASnB,OAAOsB,OAAO;QAAEC,KAAKvB,OAAOM;QAAQkB,OAAOxB,OAAOQ;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAQzB,OAAO0B;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAjBiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "SpaceSchema", "TriggerTemplate", "Schema", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "CreateTriggerFromTemplate", "TaggedClass", "input", "space", "SpaceSchema", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { useTranslation } from '@dxos/react-ui';\nimport { ControlSection, ControlPage } from '@dxos/react-ui-form';\nimport { StackItem } from '@dxos/react-ui-stack';\n\nimport { AutomationPanel, type AutomationPanelProps } from './AutomationPanel';\nimport { AUTOMATION_PLUGIN } from '../meta';\n\nexport const AutomationContainer = (props: AutomationPanelProps) => {\n const { t } = useTranslation(AUTOMATION_PLUGIN);\n return (\n <StackItem.Content classNames='block overflow-y-auto'>\n <ControlPage>\n <ControlSection\n title={t('automation verbose label', { ns: AUTOMATION_PLUGIN })}\n description={t('automation description', { ns: AUTOMATION_PLUGIN })}\n >\n <AutomationPanel {...props} />\n </ControlSection>\n </ControlPage>\n </StackItem.Content>\n );\n};\n\nexport default AutomationContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,sBAAsB;AAC/B,SAASC,gBAAgBC,mBAAmB;AAC5C,SAASC,iBAAiB;AAKnB,IAAMC,sBAAsB,CAACC,UAAAA;;;AAClC,UAAM,EAAEC,EAAC,IAAKC,eAAeC,iBAAAA;AAC7B,WACE,sBAAA,cAACC,UAAUC,SAAO;MAACC,YAAW;OAC5B,sBAAA,cAACC,aAAAA,MACC,sBAAA,cAACC,gBAAAA;MACCC,OAAOR,EAAE,4BAA4B;QAAES,IAAIP;MAAkB,CAAA;MAC7DQ,aAAaV,EAAE,0BAA0B;QAAES,IAAIP;MAAkB,CAAA;OAEjE,sBAAA,cAACS,iBAAoBZ,KAAAA,CAAAA,CAAAA,CAAAA;;;;AAK/B;AAEA,IAAA,8BAAeD;",
|
|
6
|
-
"names": ["React", "useTranslation", "ControlSection", "ControlPage", "StackItem", "AutomationContainer", "props", "t", "useTranslation", "AUTOMATION_PLUGIN", "StackItem", "Content", "classNames", "ControlPage", "ControlSection", "title", "ns", "description", "AutomationPanel"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/types.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Schema } from 'effect';\n\nimport { SpaceSchema } from '@dxos/react-client/echo';\n\nimport { AUTOMATION_PLUGIN } from './meta';\n\nconst TriggerTemplate = Schema.Union(\n Schema.Struct({ type: Schema.Literal('timer'), cron: Schema.String }),\n Schema.Struct({ type: Schema.Literal('queue'), queueDXN: Schema.Any }),\n);\n\nexport namespace AutomationAction {\n const AUTOMATION_ACTION = `${AUTOMATION_PLUGIN}/action`;\n\n export class CreateTriggerFromTemplate extends Schema.TaggedClass<CreateTriggerFromTemplate>()(\n `${AUTOMATION_ACTION}/create-trigger-from-template`,\n {\n input: Schema.Struct({\n space: SpaceSchema,\n template: TriggerTemplate,\n enabled: Schema.optional(Schema.Boolean),\n // TODO(wittjosiah): Improve how this lookup is done.\n scriptName: Schema.optional(Schema.String),\n input: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),\n }),\n output: Schema.Void,\n },\n ) {}\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,mBAAmB;AAI5B,IAAMC,kBAAkBC,OAAOC,MAC7BD,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUC,MAAML,OAAOM;AAAO,CAAA,GACnEN,OAAOE,OAAO;EAAEC,MAAMH,OAAOI,QAAQ,OAAA;EAAUG,UAAUP,OAAOQ;AAAI,CAAA,CAAA;UAGrDC,mBAAAA;AACf,QAAMC,oBAAoB,GAAGC,iBAAAA;EAEtB,MAAMC,kCAAkCZ,OAAOa,YAAW,EAC/D,GAAGH,iBAAAA,iCACH;IACEI,OAAOd,OAAOE,OAAO;MACnBa,OAAOC;MACPC,UAAUlB;MACVmB,SAASlB,OAAOmB,SAASnB,OAAOoB,OAAO;;MAEvCC,YAAYrB,OAAOmB,SAASnB,OAAOM,MAAM;MACzCQ,OAAOd,OAAOmB,SAASnB,OAAOsB,OAAO;QAAEC,KAAKvB,OAAOM;QAAQkB,OAAOxB,OAAOQ;MAAI,CAAA,CAAA;IAC/E,CAAA;IACAiB,QAAQzB,OAAO0B;EACjB,CAAA,EAAA;EACC;oBAbUd,4BAAAA;AAcf,GAjBiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
-
"names": ["Schema", "SpaceSchema", "TriggerTemplate", "Schema", "Union", "Struct", "type", "Literal", "cron", "String", "queueDXN", "Any", "AutomationAction", "AUTOMATION_ACTION", "AUTOMATION_PLUGIN", "CreateTriggerFromTemplate", "TaggedClass", "input", "space", "SpaceSchema", "template", "enabled", "optional", "Boolean", "scriptName", "Record", "key", "value", "output", "Void"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAWhC,yBAAiB,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;IAGhC,MAAM,OAAO,yBAA0B,SAAQ,8BAa9C;KAAG;;CACL"}
|
/package/dist/lib/browser/{AutomationPanel-ZWA6GOFY.mjs.map → AutomationPanel-YYERBNYJ.mjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/browser/{FunctionsPanel-56ZKRVM5.mjs.map → FunctionsPanel-I443Y6KB.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/lib/node-esm/{AutomationPanel-YYUMSK2W.mjs.map → AutomationPanel-5EQQF5S2.mjs.map}
RENAMED
|
File without changes
|
/package/dist/lib/node-esm/{FunctionsPanel-KGIOZSPZ.mjs.map → FunctionsPanel-ELINCXPW.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/lib/node-esm/{react-surface-3PNW7NDW.mjs.map → react-surface-K6MQFIAS.mjs.map}
RENAMED
|
File without changes
|
|
File without changes
|