@dxos/plugin-script 0.7.1 → 0.7.2-main.f1adc9f
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/{AutomationPanel-RYJJQ5QX.mjs → AutomationPanel-ELXXAKW4.mjs} +15 -10
- package/dist/lib/browser/AutomationPanel-ELXXAKW4.mjs.map +7 -0
- package/dist/lib/browser/{ScriptContainer-RLBVHRCW.mjs → ScriptContainer-IC67ILI2.mjs} +9 -12
- package/dist/lib/browser/ScriptContainer-IC67ILI2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VEW5BERN.mjs → chunk-DTVOXLPP.mjs} +9 -9
- package/dist/lib/browser/chunk-DTVOXLPP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-NCZUJKJE.mjs → chunk-K7KY6YMG.mjs} +14 -10
- package/dist/lib/browser/chunk-K7KY6YMG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5GGRYRS4.mjs → chunk-KSIPC365.mjs} +17 -6
- package/dist/lib/browser/{chunk-5GGRYRS4.mjs.map → chunk-KSIPC365.mjs.map} +3 -3
- package/dist/lib/browser/edge/index.mjs +1 -1
- package/dist/lib/browser/index.mjs +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{AutomationPanel-3B5AGQQV.cjs → AutomationPanel-RCEBTDK7.cjs} +19 -16
- package/dist/lib/node/AutomationPanel-RCEBTDK7.cjs.map +7 -0
- package/dist/lib/node/{ScriptContainer-7VX44TH6.cjs → ScriptContainer-MRZXOY42.cjs} +22 -25
- package/dist/lib/node/ScriptContainer-MRZXOY42.cjs.map +7 -0
- package/dist/lib/node/{chunk-XS6GEYYH.cjs → chunk-2WF3LLHC.cjs} +20 -9
- package/dist/lib/node/{chunk-XS6GEYYH.cjs.map → chunk-2WF3LLHC.cjs.map} +3 -3
- package/dist/lib/node/{chunk-BJ4WIWCP.cjs → chunk-4INUJLXL.cjs} +16 -12
- package/dist/lib/node/chunk-4INUJLXL.cjs.map +7 -0
- package/dist/lib/node/{chunk-XJOH225K.cjs → chunk-T4PYTKIW.cjs} +12 -12
- package/dist/lib/node/chunk-T4PYTKIW.cjs.map +7 -0
- package/dist/lib/node/edge/index.cjs +10 -10
- package/dist/lib/node/edge/index.cjs.map +1 -1
- package/dist/lib/node/index.cjs +21 -21
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/types/index.cjs +4 -4
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{AutomationPanel-EEGLOILM.mjs → AutomationPanel-QFKOZXLO.mjs} +15 -10
- package/dist/lib/node-esm/AutomationPanel-QFKOZXLO.mjs.map +7 -0
- package/dist/lib/node-esm/{ScriptContainer-NGYXDSLQ.mjs → ScriptContainer-A4A663FM.mjs} +9 -12
- package/dist/lib/node-esm/ScriptContainer-A4A663FM.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-P7ULFJ4T.mjs → chunk-2HYWFUEN.mjs} +9 -9
- package/dist/lib/node-esm/chunk-2HYWFUEN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-V74XKPLC.mjs → chunk-4QWC64VN.mjs} +17 -6
- package/dist/lib/node-esm/{chunk-V74XKPLC.mjs.map → chunk-4QWC64VN.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-DXWSRDEN.mjs → chunk-OFYGBUNI.mjs} +14 -10
- package/dist/lib/node-esm/chunk-OFYGBUNI.mjs.map +7 -0
- package/dist/lib/node-esm/edge/index.mjs +1 -1
- package/dist/lib/node-esm/index.mjs +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +3 -3
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/DebugPanel/DebugPanel.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts +1 -5
- package/dist/types/src/components/ScriptBlock/ScriptBlock.d.ts.map +1 -1
- package/dist/types/src/components/ScriptBlock/ScriptBlock.stories.d.ts.map +1 -1
- package/dist/types/src/components/ScriptEditor.d.ts.map +1 -1
- package/dist/types/src/edge/functions.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +8 -8
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/package.json +35 -36
- package/src/components/AutomationPanel/AutomationPanel.tsx +10 -7
- package/src/components/DebugPanel/DebugPanel.tsx +41 -30
- package/src/components/ScriptBlock/ScriptBlock.stories.tsx +5 -25
- package/src/components/ScriptBlock/ScriptBlock.tsx +3 -8
- package/src/components/ScriptEditor.tsx +4 -3
- package/src/components/TypescriptEditor/TypescriptEditor.tsx +1 -1
- package/src/edge/functions.ts +12 -1
- package/src/types/schema.ts +10 -6
- package/dist/lib/browser/AutomationPanel-RYJJQ5QX.mjs.map +0 -7
- package/dist/lib/browser/ScriptContainer-RLBVHRCW.mjs.map +0 -7
- package/dist/lib/browser/chunk-NCZUJKJE.mjs.map +0 -7
- package/dist/lib/browser/chunk-VEW5BERN.mjs.map +0 -7
- package/dist/lib/node/AutomationPanel-3B5AGQQV.cjs.map +0 -7
- package/dist/lib/node/ScriptContainer-7VX44TH6.cjs.map +0 -7
- package/dist/lib/node/chunk-BJ4WIWCP.cjs.map +0 -7
- package/dist/lib/node/chunk-XJOH225K.cjs.map +0 -7
- package/dist/lib/node-esm/AutomationPanel-EEGLOILM.mjs.map +0 -7
- package/dist/lib/node-esm/ScriptContainer-NGYXDSLQ.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DXWSRDEN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P7ULFJ4T.mjs.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptBlock.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptBlock/ScriptBlock.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ScriptBlock.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScriptBlock/ScriptBlock.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAoC7C,eAAO,MAAM,OAAO,IAAK,CAAC;AAE1B,QAAA,MAAM,IAAI,EAAE,IAKX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScriptEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ScriptEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAM9D,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAYlF,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC;IAC9C,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC,GACA,IAAI,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,YAAY,gCAAiC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ScriptEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ScriptEditor.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAM9D,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAMtE,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAYlF,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC;IAC9C,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC,GACA,IAAI,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,YAAY,gCAAiC,iBAAiB,sBA8J1E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/edge/functions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAS1C,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAIhF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,cAAc,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/edge/functions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAS1C,eAAO,MAAM,6BAA6B,qCAAqC,CAAC;AAIhF,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,cAAc,CAAC;KAC9B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC;IACd,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AA0BF,eAAO,MAAM,oBAAoB,uFAQ9B,iBAAiB,sCAwBnB,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,uBAE5D,CAAC;AAEF,eAAO,MAAM,4BAA4B,SAAU,UAAU,eAAe,MAAM,SASjF,CAAC;AAoCF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,WAAW,MAAM,YAAW,iBAAiB,WAUhG,CAAC"}
|
|
@@ -2,23 +2,23 @@ import { JsonSchemaType, ref, S } from '@dxos/echo-schema';
|
|
|
2
2
|
declare const ScriptType_base: import("@dxos/echo-schema").AbstractTypedObject<{
|
|
3
3
|
name?: string | undefined;
|
|
4
4
|
description?: string | undefined;
|
|
5
|
+
changed?: boolean | undefined;
|
|
5
6
|
source: import("@dxos/echo-schema").Ref<{
|
|
6
7
|
content: string;
|
|
7
8
|
} & {
|
|
8
9
|
id: string;
|
|
9
10
|
}>;
|
|
10
|
-
changed?: boolean | undefined;
|
|
11
11
|
} & {
|
|
12
12
|
id: string;
|
|
13
13
|
}, S.Struct.Encoded<{
|
|
14
14
|
name: S.optional<typeof S.String>;
|
|
15
15
|
description: S.optional<typeof S.String>;
|
|
16
|
+
changed: S.optional<typeof S.Boolean>;
|
|
16
17
|
source: ref<{
|
|
17
18
|
content: string;
|
|
18
19
|
} & {
|
|
19
20
|
id: string;
|
|
20
21
|
}>;
|
|
21
|
-
changed: S.optional<typeof S.Boolean>;
|
|
22
22
|
}>>;
|
|
23
23
|
/**
|
|
24
24
|
* Source script.
|
|
@@ -26,41 +26,41 @@ declare const ScriptType_base: import("@dxos/echo-schema").AbstractTypedObject<{
|
|
|
26
26
|
export declare class ScriptType extends ScriptType_base {
|
|
27
27
|
}
|
|
28
28
|
declare const FunctionType_base: import("@dxos/echo-schema").AbstractTypedObject<{
|
|
29
|
-
name
|
|
29
|
+
name: string;
|
|
30
30
|
source?: import("@dxos/echo-schema").Ref<{
|
|
31
31
|
name?: string | undefined;
|
|
32
32
|
description?: string | undefined;
|
|
33
|
+
changed?: boolean | undefined;
|
|
33
34
|
source: import("@dxos/echo-schema").Ref<{
|
|
34
35
|
content: string;
|
|
35
36
|
} & {
|
|
36
37
|
id: string;
|
|
37
38
|
}>;
|
|
38
|
-
changed?: boolean | undefined;
|
|
39
39
|
} & {
|
|
40
40
|
id: string;
|
|
41
41
|
}>;
|
|
42
42
|
version: number;
|
|
43
|
-
binding?: string | undefined;
|
|
44
43
|
inputSchema?: JsonSchemaType | undefined;
|
|
44
|
+
binding?: string | undefined;
|
|
45
45
|
} & {
|
|
46
46
|
id: string;
|
|
47
47
|
}, S.Struct.Encoded<{
|
|
48
|
-
name:
|
|
48
|
+
name: typeof S.NonEmptyString;
|
|
49
49
|
version: typeof S.Number;
|
|
50
|
-
binding: S.optional<typeof S.String>;
|
|
51
50
|
source: S.optional<ref<{
|
|
52
51
|
name?: string | undefined;
|
|
53
52
|
description?: string | undefined;
|
|
53
|
+
changed?: boolean | undefined;
|
|
54
54
|
source: import("@dxos/echo-schema").Ref<{
|
|
55
55
|
content: string;
|
|
56
56
|
} & {
|
|
57
57
|
id: string;
|
|
58
58
|
}>;
|
|
59
|
-
changed?: boolean | undefined;
|
|
60
59
|
} & {
|
|
61
60
|
id: string;
|
|
62
61
|
}>>;
|
|
63
62
|
inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
63
|
+
binding: S.optional<typeof S.String>;
|
|
64
64
|
}>>;
|
|
65
65
|
/**
|
|
66
66
|
* Function deployment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;AAGxE;;GAEG;AACH,qBAAa,UAAW,SAAQ,eAW9B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;GAEG;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;AAGxE;;GAEG;AACH,qBAAa,UAAW,SAAQ,eAW9B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;GAEG;AAEH,qBAAa,YAAa,SAAQ,iBAgBhC;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-script",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2-main.f1adc9f",
|
|
4
4
|
"description": "Braneframe notebook plugin",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -67,32 +67,32 @@
|
|
|
67
67
|
"prettier": "^3.2.4",
|
|
68
68
|
"react-syntax-highlighter": "^15.5.0",
|
|
69
69
|
"typescript": "^5.6.2",
|
|
70
|
-
"@dxos/app-framework": "0.7.
|
|
71
|
-
"@dxos/async": "0.7.
|
|
72
|
-
"@dxos/client": "0.7.
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/
|
|
80
|
-
"@dxos/plugin-client": "0.7.
|
|
81
|
-
"@dxos/plugin-
|
|
82
|
-
"@dxos/plugin-
|
|
83
|
-
"@dxos/plugin-
|
|
84
|
-
"@dxos/plugin-
|
|
85
|
-
"@dxos/plugin-
|
|
86
|
-
"@dxos/plugin-
|
|
87
|
-
"@dxos/protocols": "0.7.
|
|
88
|
-
"@dxos/react-client": "0.7.
|
|
89
|
-
"@dxos/react-ui-editor": "0.7.
|
|
90
|
-
"@dxos/react-ui-
|
|
91
|
-
"@dxos/react-ui-
|
|
92
|
-
"@dxos/
|
|
93
|
-
"@dxos/rpc": "0.7.
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/util": "0.7.
|
|
70
|
+
"@dxos/app-framework": "0.7.2-main.f1adc9f",
|
|
71
|
+
"@dxos/async": "0.7.2-main.f1adc9f",
|
|
72
|
+
"@dxos/client": "0.7.2-main.f1adc9f",
|
|
73
|
+
"@dxos/client-protocol": "0.7.2-main.f1adc9f",
|
|
74
|
+
"@dxos/crypto": "0.7.2-main.f1adc9f",
|
|
75
|
+
"@dxos/echo-schema": "0.7.2-main.f1adc9f",
|
|
76
|
+
"@dxos/keys": "0.7.2-main.f1adc9f",
|
|
77
|
+
"@dxos/debug": "0.7.2-main.f1adc9f",
|
|
78
|
+
"@dxos/invariant": "0.7.2-main.f1adc9f",
|
|
79
|
+
"@dxos/log": "0.7.2-main.f1adc9f",
|
|
80
|
+
"@dxos/plugin-client": "0.7.2-main.f1adc9f",
|
|
81
|
+
"@dxos/plugin-markdown": "0.7.2-main.f1adc9f",
|
|
82
|
+
"@dxos/plugin-graph": "0.7.2-main.f1adc9f",
|
|
83
|
+
"@dxos/plugin-explorer": "0.7.2-main.f1adc9f",
|
|
84
|
+
"@dxos/plugin-space": "0.7.2-main.f1adc9f",
|
|
85
|
+
"@dxos/plugin-stack": "0.7.2-main.f1adc9f",
|
|
86
|
+
"@dxos/plugin-theme": "0.7.2-main.f1adc9f",
|
|
87
|
+
"@dxos/protocols": "0.7.2-main.f1adc9f",
|
|
88
|
+
"@dxos/react-client": "0.7.2-main.f1adc9f",
|
|
89
|
+
"@dxos/react-ui-editor": "0.7.2-main.f1adc9f",
|
|
90
|
+
"@dxos/react-ui-attention": "0.7.2-main.f1adc9f",
|
|
91
|
+
"@dxos/react-ui-form": "0.7.2-main.f1adc9f",
|
|
92
|
+
"@dxos/rpc": "0.7.2-main.f1adc9f",
|
|
93
|
+
"@dxos/rpc-tunnel": "0.7.2-main.f1adc9f",
|
|
94
|
+
"@dxos/react-ui-syntax-highlighter": "0.7.2-main.f1adc9f",
|
|
95
|
+
"@dxos/util": "0.7.2-main.f1adc9f"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@phosphor-icons/react": "^2.1.5",
|
|
@@ -102,20 +102,19 @@
|
|
|
102
102
|
"react": "~18.2.0",
|
|
103
103
|
"react-dom": "~18.2.0",
|
|
104
104
|
"vite": "5.4.7",
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/react-ui": "0.7.
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/react-ui-theme": "0.7.
|
|
109
|
-
"@dxos/
|
|
110
|
-
"@dxos/storybook-utils": "0.7.1"
|
|
105
|
+
"@dxos/random": "0.7.2-main.f1adc9f",
|
|
106
|
+
"@dxos/react-ui": "0.7.2-main.f1adc9f",
|
|
107
|
+
"@dxos/react-ui-mosaic": "0.7.2-main.f1adc9f",
|
|
108
|
+
"@dxos/react-ui-theme": "0.7.2-main.f1adc9f",
|
|
109
|
+
"@dxos/storybook-utils": "0.7.2-main.f1adc9f"
|
|
111
110
|
},
|
|
112
111
|
"peerDependencies": {
|
|
113
112
|
"@phosphor-icons/react": "^2.1.5",
|
|
114
113
|
"react": "~18.2.0",
|
|
115
114
|
"react-dom": "~18.2.0",
|
|
116
|
-
"@dxos/react-ui": "0.7.
|
|
117
|
-
"@dxos/react-ui-theme": "0.7.
|
|
118
|
-
"@dxos/react-ui-mosaic": "0.7.
|
|
115
|
+
"@dxos/react-ui": "0.7.2-main.f1adc9f",
|
|
116
|
+
"@dxos/react-ui-theme": "0.7.2-main.f1adc9f",
|
|
117
|
+
"@dxos/react-ui-mosaic": "0.7.2-main.f1adc9f"
|
|
119
118
|
},
|
|
120
119
|
"publishConfig": {
|
|
121
120
|
"access": "public"
|
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import React, { useMemo, useState } from 'react';
|
|
6
6
|
|
|
7
|
-
import { type
|
|
7
|
+
import { type ReactiveEchoObject } from '@dxos/client/echo';
|
|
8
8
|
import { failUndefined } from '@dxos/debug';
|
|
9
9
|
import { useClient } from '@dxos/react-client';
|
|
10
10
|
import { Filter, getMeta, getSpace, useQuery } from '@dxos/react-client/echo';
|
|
11
|
-
import { Select } from '@dxos/react-ui';
|
|
11
|
+
import { Select, useTranslation } from '@dxos/react-ui';
|
|
12
12
|
|
|
13
13
|
import { getInvocationUrl, getUserFunctionUrlInMetadata } from '../../edge';
|
|
14
|
+
import { SCRIPT_PLUGIN } from '../../meta';
|
|
14
15
|
import { FunctionType, ScriptType } from '../../types';
|
|
15
16
|
import { DebugPanel } from '../DebugPanel';
|
|
16
17
|
|
|
17
18
|
export interface AutomationPanelProps {
|
|
18
|
-
subject:
|
|
19
|
+
subject: ReactiveEchoObject<any>;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
export const AutomationPanel = ({ subject }: AutomationPanelProps) => {
|
|
23
|
+
const { t } = useTranslation(SCRIPT_PLUGIN);
|
|
22
24
|
const space = getSpace(subject);
|
|
23
25
|
|
|
24
26
|
// TODO(dmaretskyi): Parametric query.
|
|
@@ -28,8 +30,9 @@ export const AutomationPanel = ({ subject }: AutomationPanelProps) => {
|
|
|
28
30
|
{},
|
|
29
31
|
[subject],
|
|
30
32
|
);
|
|
33
|
+
|
|
31
34
|
const [selectedFunction, setSelectedFunction] = useState<FunctionType | null>(null);
|
|
32
|
-
const
|
|
35
|
+
const chatFunction = subject instanceof ScriptType ? functions[0] : selectedFunction;
|
|
33
36
|
|
|
34
37
|
return (
|
|
35
38
|
<div className='h-full flex flex-col'>
|
|
@@ -40,15 +43,15 @@ export const AutomationPanel = ({ subject }: AutomationPanelProps) => {
|
|
|
40
43
|
functions={functions}
|
|
41
44
|
/>
|
|
42
45
|
)}
|
|
43
|
-
{
|
|
44
|
-
{subject instanceof ScriptType && functions.length === 0 && <p>
|
|
46
|
+
{chatFunction && <ChatPanel fn={chatFunction} subject={subject} />}
|
|
47
|
+
{subject instanceof ScriptType && functions.length === 0 && <div className='p-1'>{t('not deployed')}</div>}
|
|
45
48
|
</div>
|
|
46
49
|
);
|
|
47
50
|
};
|
|
48
51
|
|
|
49
52
|
export interface ChatPanelProps {
|
|
50
53
|
fn: FunctionType;
|
|
51
|
-
subject:
|
|
54
|
+
subject: ReactiveEchoObject<any>;
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
const ChatPanel = ({ fn, subject }: ChatPanelProps) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2024 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
5
|
+
import React, { forwardRef, useEffect, useRef, useState } from 'react';
|
|
6
6
|
|
|
7
7
|
import { log } from '@dxos/log';
|
|
8
8
|
import { Avatar, Icon, Input, type ThemedClassName, Toolbar, useTranslation } from '@dxos/react-ui';
|
|
@@ -159,12 +159,10 @@ export const DebugPanel = ({ classNames, functionUrl }: DebugPanelProps) => {
|
|
|
159
159
|
|
|
160
160
|
return (
|
|
161
161
|
<div className={mx('flex flex-col h-full overflow-hidden', classNames)}>
|
|
162
|
-
{/* TODO(burdon): Replace with Thread
|
|
163
|
-
<
|
|
164
|
-
<MessageThread state={state} result={result} history={history} />
|
|
165
|
-
</div>
|
|
162
|
+
{/* TODO(burdon): Replace with Thread. */}
|
|
163
|
+
<MessageThread ref={scrollerRef} state={state} result={result} history={history} />
|
|
166
164
|
|
|
167
|
-
<Toolbar.Root classNames='p-
|
|
165
|
+
<Toolbar.Root classNames='p-1'>
|
|
168
166
|
<Input.Root>
|
|
169
167
|
<Input.TextInput
|
|
170
168
|
ref={inputRef}
|
|
@@ -189,32 +187,45 @@ export const DebugPanel = ({ classNames, functionUrl }: DebugPanelProps) => {
|
|
|
189
187
|
// TODO(burdon): Replace with thread?
|
|
190
188
|
// TODO(burdon): Button to delete individual messages.
|
|
191
189
|
// TODO(burdon): Button to edit/re-run question.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
190
|
+
type MessageThreadProps = {
|
|
191
|
+
state: State | null;
|
|
192
|
+
history: Message[];
|
|
193
|
+
result: string;
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
const MessageThread = forwardRef<HTMLDivElement, MessageThreadProps>(
|
|
197
|
+
({ state, history, result }: MessageThreadProps, forwardedRef) => {
|
|
198
|
+
if (!history.length && !result.length) {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
return (
|
|
203
|
+
<div ref={forwardedRef} className='flex flex-col gap-6 h-full p-2 overflow-x-hidden overflow-y-auto'>
|
|
204
|
+
{history.map((message, i) => (
|
|
205
|
+
<div key={i} className='grid grid-cols-[2rem_1fr_2rem]'>
|
|
206
|
+
<div className='p-1'>{message.type === 'response' && <RobotAvatar />}</div>
|
|
207
|
+
<div className='overflow-auto'>
|
|
208
|
+
<MessageItem message={message} />
|
|
209
|
+
</div>
|
|
209
210
|
</div>
|
|
210
|
-
|
|
211
|
-
|
|
211
|
+
))}
|
|
212
|
+
|
|
213
|
+
{result?.length > 0 && (
|
|
214
|
+
<div className='grid grid-cols-[2rem_1fr_2rem]'>
|
|
215
|
+
<div className='p-1'>
|
|
216
|
+
{(state === 'pending' && <Icon icon='ph--spinner--regular' size={6} classNames='animate-spin' />) || (
|
|
217
|
+
<Icon icon='ph--robot--regular' size={6} classNames='animate-[pulse_1s_ease-in-out_infinite]' />
|
|
218
|
+
)}
|
|
219
|
+
</div>
|
|
220
|
+
<div className='overflow-auto'>
|
|
221
|
+
<MessageItem message={{ type: 'response', text: result }} />
|
|
222
|
+
</div>
|
|
212
223
|
</div>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
224
|
+
)}
|
|
225
|
+
</div>
|
|
226
|
+
);
|
|
227
|
+
},
|
|
228
|
+
);
|
|
218
229
|
|
|
219
230
|
const MessageItem = ({ classNames, message }: ThemedClassName<{ message: Message }>) => {
|
|
220
231
|
const { type, text, data, error } = message;
|
|
@@ -5,12 +5,10 @@
|
|
|
5
5
|
import '@dxos-theme';
|
|
6
6
|
|
|
7
7
|
import { type Meta } from '@storybook/react';
|
|
8
|
-
import React, {
|
|
8
|
+
import React, { useMemo } from 'react';
|
|
9
9
|
|
|
10
|
-
import { createSpaceObjectGenerator, TestSchemaType } from '@dxos/echo-generator';
|
|
11
10
|
import { TextType } from '@dxos/plugin-markdown/types';
|
|
12
|
-
import {
|
|
13
|
-
import { create, createObject, useSpaces } from '@dxos/react-client/echo';
|
|
11
|
+
import { create, createObject } from '@dxos/react-client/echo';
|
|
14
12
|
import { withClientProvider } from '@dxos/react-client/testing';
|
|
15
13
|
import { withLayout, withTheme } from '@dxos/storybook-utils';
|
|
16
14
|
|
|
@@ -19,6 +17,8 @@ import { ScriptType } from '../../types';
|
|
|
19
17
|
// @ts-ignore
|
|
20
18
|
import mainUrl from '../FrameContainer/frame?url';
|
|
21
19
|
|
|
20
|
+
const typename = 'example.com/type/contact';
|
|
21
|
+
|
|
22
22
|
const code = [
|
|
23
23
|
"import { Filter, useQuery, useSpaces} from '@dxos/react-client/echo';",
|
|
24
24
|
"import { Chart, Explorer, Globe } from '@dxos/plugin-explorer';",
|
|
@@ -26,32 +26,12 @@ const code = [
|
|
|
26
26
|
'export default () => {',
|
|
27
27
|
' const spaces = useSpaces();',
|
|
28
28
|
' const space = spaces[1]',
|
|
29
|
-
|
|
29
|
+
` const objects = useQuery(space, Filter.typename('${typename}'));`,
|
|
30
30
|
' return <Chart items={objects} accessor={object => ({ x: object.lat, y: object.lng })} />',
|
|
31
31
|
'}',
|
|
32
32
|
].join('\n');
|
|
33
33
|
|
|
34
34
|
const DefaultStory = () => {
|
|
35
|
-
const client = useClient();
|
|
36
|
-
const spaces = useSpaces();
|
|
37
|
-
console.log(spaces.length);
|
|
38
|
-
|
|
39
|
-
useEffect(() => {
|
|
40
|
-
try {
|
|
41
|
-
// TODO(burdon): Default not set.
|
|
42
|
-
const generator = createSpaceObjectGenerator(client.spaces.default);
|
|
43
|
-
generator.addSchemas();
|
|
44
|
-
void generator
|
|
45
|
-
.createObjects({
|
|
46
|
-
[TestSchemaType.organization]: 20,
|
|
47
|
-
[TestSchemaType.contact]: 50,
|
|
48
|
-
})
|
|
49
|
-
.catch(() => {});
|
|
50
|
-
} catch (err) {
|
|
51
|
-
console.log(err);
|
|
52
|
-
}
|
|
53
|
-
}, [client]);
|
|
54
|
-
|
|
55
35
|
// TODO(burdon): Review what's the right way to create automerge-backed objects.
|
|
56
36
|
const object = useMemo(() => createObject(create(ScriptType, { source: create(TextType, { content: code }) })), []);
|
|
57
37
|
|
|
@@ -8,7 +8,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
8
8
|
|
|
9
9
|
import { createDocAccessor, DocAccessor } from '@dxos/react-client/echo';
|
|
10
10
|
import { Toolbar, Button, Icon } from '@dxos/react-ui';
|
|
11
|
-
import { mx } from '@dxos/react-ui-theme';
|
|
12
11
|
|
|
13
12
|
import { Bundler, type BundlerResult, initializeBundler } from '../../bundler';
|
|
14
13
|
import { type ScriptType } from '../../types';
|
|
@@ -28,10 +27,6 @@ const PROVIDED_MODULES = [
|
|
|
28
27
|
export type ScriptBlockProps = {
|
|
29
28
|
script: ScriptType;
|
|
30
29
|
hideSelector?: boolean;
|
|
31
|
-
classes?: {
|
|
32
|
-
root?: string;
|
|
33
|
-
toolbar?: string;
|
|
34
|
-
};
|
|
35
30
|
|
|
36
31
|
// Url to the page used to host the script in the iframe.
|
|
37
32
|
containerUrl: string;
|
|
@@ -41,7 +36,7 @@ export type ScriptBlockProps = {
|
|
|
41
36
|
* @deprecated
|
|
42
37
|
*/
|
|
43
38
|
// TODO(burdon): Cache compiled results in context.
|
|
44
|
-
export const ScriptBlock = ({ script, hideSelector,
|
|
39
|
+
export const ScriptBlock = ({ script, hideSelector, containerUrl }: ScriptBlockProps) => {
|
|
45
40
|
const source = useMemo(() => script.source && createDocAccessor(script.source, ['content']), [script.source]);
|
|
46
41
|
const [result, setResult] = useState<BundlerResult>();
|
|
47
42
|
const bundler = useMemo(
|
|
@@ -78,9 +73,9 @@ export const ScriptBlock = ({ script, hideSelector, classes, containerUrl }: Scr
|
|
|
78
73
|
);
|
|
79
74
|
|
|
80
75
|
return (
|
|
81
|
-
<div className=
|
|
76
|
+
<div className='flex flex-col grow overflow-hidden'>
|
|
82
77
|
{!hideSelector && (
|
|
83
|
-
<Toolbar.Root
|
|
78
|
+
<Toolbar.Root>
|
|
84
79
|
<div className='grow' />
|
|
85
80
|
{result?.bundle && !result?.error && (
|
|
86
81
|
<div title={String(result.error)}>
|
|
@@ -68,7 +68,6 @@ export const ScriptEditor = ({ classNames, script, env }: ScriptEditorProps) =>
|
|
|
68
68
|
);
|
|
69
69
|
|
|
70
70
|
const [view, setView] = useState<ViewType>('editor');
|
|
71
|
-
const initialValue = useMemo(() => script.source?.content, [script.source]);
|
|
72
71
|
const existingFunctionUrl = fn && getUserFunctionUrlInMetadata(getMeta(fn));
|
|
73
72
|
const [error, setError] = useState<string>();
|
|
74
73
|
|
|
@@ -140,7 +139,8 @@ export const ScriptEditor = ({ classNames, script, env }: ScriptEditorProps) =>
|
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
const deployedFunction =
|
|
143
|
-
fn ?? space.db.add(create(FunctionType, { version: functionVersionNumber, source: script }));
|
|
142
|
+
fn ?? space.db.add(create(FunctionType, { name: functionId, version: functionVersionNumber, source: script }));
|
|
143
|
+
|
|
144
144
|
script.changed = false;
|
|
145
145
|
|
|
146
146
|
if (meta.inputSchema) {
|
|
@@ -148,6 +148,7 @@ export const ScriptEditor = ({ classNames, script, env }: ScriptEditorProps) =>
|
|
|
148
148
|
} else {
|
|
149
149
|
log.verbose('no input schema in function metadata', { functionId });
|
|
150
150
|
}
|
|
151
|
+
|
|
151
152
|
setUserFunctionUrlInMetadata(getMeta(deployedFunction), `/${ownerDid}/${functionId}`);
|
|
152
153
|
|
|
153
154
|
setView('split');
|
|
@@ -185,7 +186,7 @@ export const ScriptEditor = ({ classNames, script, env }: ScriptEditorProps) =>
|
|
|
185
186
|
<TypescriptEditor
|
|
186
187
|
id={script.id}
|
|
187
188
|
env={env}
|
|
188
|
-
initialValue={
|
|
189
|
+
initialValue={script.source?.content}
|
|
189
190
|
extensions={extensions}
|
|
190
191
|
className='flex is-full bs-full overflow-hidden ch-focus-ring-inset-over-all'
|
|
191
192
|
/>
|
|
@@ -70,7 +70,7 @@ export const TypescriptEditor = ({
|
|
|
70
70
|
selection,
|
|
71
71
|
scrollTo,
|
|
72
72
|
}),
|
|
73
|
-
[id,
|
|
73
|
+
[id, extensions, themeMode, selection, scrollTo],
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
return <div ref={parentRef} className={className} {...focusAttributes} />;
|
package/src/edge/functions.ts
CHANGED
|
@@ -48,7 +48,18 @@ const defaultUserFunctionsBaseUrl = 'https://edge-main.dxos.workers.dev/function
|
|
|
48
48
|
const getBaseUrl = (config: Config) => {
|
|
49
49
|
if (config.values.runtime?.services?.edge?.url) {
|
|
50
50
|
const url = new URL('/functions', config.values.runtime?.services?.edge?.url);
|
|
51
|
-
url.protocol
|
|
51
|
+
switch (url.protocol) {
|
|
52
|
+
case 'http:':
|
|
53
|
+
case 'ws:':
|
|
54
|
+
url.protocol = 'http';
|
|
55
|
+
break;
|
|
56
|
+
case 'https:':
|
|
57
|
+
case 'wss:':
|
|
58
|
+
url.protocol = 'https';
|
|
59
|
+
break;
|
|
60
|
+
default:
|
|
61
|
+
throw new Error(`Invalid protocol: ${url.protocol}`);
|
|
62
|
+
}
|
|
52
63
|
return url.toString();
|
|
53
64
|
} else {
|
|
54
65
|
return defaultUserFunctionsBaseUrl;
|
package/src/types/schema.ts
CHANGED
|
@@ -15,26 +15,30 @@ export class ScriptType extends TypedObject({
|
|
|
15
15
|
// TODO(burdon): Change to URI?
|
|
16
16
|
name: S.optional(S.String),
|
|
17
17
|
description: S.optional(S.String),
|
|
18
|
-
source: ref(TextType),
|
|
19
18
|
// TODO(burdon): Change to hash of deployed content.
|
|
20
19
|
// Whether source has changed since last deploy.
|
|
21
20
|
changed: S.optional(S.Boolean),
|
|
21
|
+
source: ref(TextType),
|
|
22
22
|
}) {}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Function deployment.
|
|
26
26
|
*/
|
|
27
|
+
// TODO(burdon): Move to core/functions.
|
|
27
28
|
export class FunctionType extends TypedObject({
|
|
28
29
|
typename: 'dxos.org/type/Function',
|
|
29
30
|
version: '0.1.0',
|
|
30
31
|
})({
|
|
31
|
-
// TODO(burdon):
|
|
32
|
-
name: S.
|
|
32
|
+
// TODO(burdon): Rename to id/uri?
|
|
33
|
+
name: S.NonEmptyString,
|
|
33
34
|
version: S.Number,
|
|
34
|
-
|
|
35
|
-
// TODO(burdon): Move binding to inner type.
|
|
36
|
-
binding: S.optional(S.String),
|
|
35
|
+
|
|
37
36
|
// Reference to a source script if it exists within ECHO.
|
|
37
|
+
// TODO(burdon): Don't ref ScriptType directly (core).
|
|
38
38
|
source: S.optional(ref(ScriptType)),
|
|
39
|
+
|
|
39
40
|
inputSchema: S.optional(JsonSchemaType),
|
|
41
|
+
|
|
42
|
+
// Local binding to a function name.
|
|
43
|
+
binding: S.optional(S.String),
|
|
40
44
|
}) {}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/AutomationPanel/AutomationPanel.tsx", "../../../src/components/AutomationPanel/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { useMemo, useState } from 'react';\n\nimport { type EchoReactiveObject } from '@dxos/client/echo';\nimport { failUndefined } from '@dxos/debug';\nimport { useClient } from '@dxos/react-client';\nimport { Filter, getMeta, getSpace, useQuery } from '@dxos/react-client/echo';\nimport { Select } from '@dxos/react-ui';\n\nimport { getInvocationUrl, getUserFunctionUrlInMetadata } from '../../edge';\nimport { FunctionType, ScriptType } from '../../types';\nimport { DebugPanel } from '../DebugPanel';\n\nexport interface AutomationPanelProps {\n subject: EchoReactiveObject<any>;\n}\n\nexport const AutomationPanel = ({ subject }: AutomationPanelProps) => {\n const space = getSpace(subject);\n\n // TODO(dmaretskyi): Parametric query.\n const functions = useQuery(\n space ?? undefined,\n Filter.schema(FunctionType, (fn) => (subject instanceof ScriptType ? fn.source === subject : fn.binding != null)),\n {},\n [subject],\n );\n const [selectedFunction, setSelectedFunction] = useState<FunctionType | null>(null);\n const functionToChatWith = subject instanceof ScriptType ? functions[0] : selectedFunction;\n\n return (\n <div className='h-full flex flex-col'>\n {!(subject instanceof ScriptType) && (\n <BindingSelect\n selectedFunction={selectedFunction}\n setSelectedFunction={setSelectedFunction}\n functions={functions}\n />\n )}\n {functionToChatWith && <ChatPanel fn={functionToChatWith} subject={subject} />}\n {subject instanceof ScriptType && functions.length === 0 && <p>Deploy function to interact with it.</p>}\n </div>\n );\n};\n\nexport interface ChatPanelProps {\n fn: FunctionType;\n subject: EchoReactiveObject<any>;\n}\n\nconst ChatPanel = ({ fn, subject }: ChatPanelProps) => {\n const client = useClient();\n const space = getSpace(fn);\n const existingFunctionUrl = getUserFunctionUrlInMetadata(getMeta(fn));\n const functionUrl = useMemo(() => {\n if (!existingFunctionUrl) {\n return;\n }\n\n return getInvocationUrl(existingFunctionUrl, client.config.values.runtime?.services?.edge?.url ?? '', {\n spaceId: space?.id,\n subjectId: subject?.id,\n });\n }, [existingFunctionUrl, space, subject]);\n\n return <DebugPanel functionUrl={functionUrl} classNames='flex-1' />;\n};\n\nexport interface BindingSelectProps {\n selectedFunction: FunctionType | null;\n setSelectedFunction: (fn: FunctionType) => void;\n functions: FunctionType[];\n}\n\nconst BindingSelect = ({ selectedFunction, setSelectedFunction, functions }: BindingSelectProps) => {\n return (\n <Select.Root\n value={selectedFunction?.id}\n onValueChange={(id) => setSelectedFunction(functions.find((fn) => fn.id === id) ?? failUndefined())}\n >\n <Select.TriggerButton placeholder='Select value' />\n <Select.Portal>\n <Select.Content>\n <Select.ScrollUpButton />\n <Select.Viewport>\n {functions.map(({ id, binding }) => (\n <Select.Option key={id} value={id}>\n {binding}\n </Select.Option>\n ))}\n </Select.Viewport>\n <Select.ScrollDownButton />\n <Select.Arrow />\n </Select.Content>\n </Select.Portal>\n </Select.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { AutomationPanel } from './AutomationPanel';\n\nexport * from './AutomationPanel';\n\nexport default AutomationPanel;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;AAIA,OAAOA,SAASC,SAASC,gBAAgB;AAGzC,SAASC,qBAAqB;AAC9B,SAASC,iBAAiB;AAC1B,SAASC,QAAQC,SAASC,UAAUC,gBAAgB;AACpD,SAASC,cAAc;AAUhB,IAAMC,kBAAkB,CAAC,EAAEC,QAAO,MAAwB;AAC/D,QAAMC,QAAQC,SAASF,OAAAA;AAGvB,QAAMG,YAAYC,SAChBH,SAASI,QACTC,OAAOC,OAAOC,cAAc,CAACC,OAAQT,mBAAmBU,aAAaD,GAAGE,WAAWX,UAAUS,GAAGG,WAAW,IAAA,GAC3G,CAAC,GACD;IAACZ;GAAQ;AAEX,QAAM,CAACa,kBAAkBC,mBAAAA,IAAuBC,SAA8B,IAAA;AAC9E,QAAMC,qBAAqBhB,mBAAmBU,aAAaP,UAAU,CAAA,IAAKU;AAE1E,SACE,sBAAA,cAACI,OAAAA;IAAIC,WAAU;KACZ,EAAElB,mBAAmBU,eACpB,sBAAA,cAACS,eAAAA;IACCN;IACAC;IACAX;MAGHa,sBAAsB,sBAAA,cAACI,WAAAA;IAAUX,IAAIO;IAAoBhB;MACzDA,mBAAmBU,cAAcP,UAAUkB,WAAW,KAAK,sBAAA,cAACC,KAAAA,MAAE,sCAAA,CAAA;AAGrE;AAOA,IAAMF,YAAY,CAAC,EAAEX,IAAIT,QAAO,MAAkB;AAChD,QAAMuB,SAASC,UAAAA;AACf,QAAMvB,QAAQC,SAASO,EAAAA;AACvB,QAAMgB,sBAAsBC,6BAA6BC,QAAQlB,EAAAA,CAAAA;AACjE,QAAMmB,cAAcC,QAAQ,MAAA;AAC1B,QAAI,CAACJ,qBAAqB;AACxB;IACF;AAEA,WAAOK,iBAAiBL,qBAAqBF,OAAOQ,OAAOC,OAAOC,SAASC,UAAUC,MAAMC,OAAO,IAAI;MACpGC,SAASpC,OAAOqC;MAChBC,WAAWvC,SAASsC;IACtB,CAAA;EACF,GAAG;IAACb;IAAqBxB;IAAOD;GAAQ;AAExC,SAAO,sBAAA,cAACwC,YAAAA;IAAWZ;IAA0Ba,YAAW;;AAC1D;AAQA,IAAMtB,gBAAgB,CAAC,EAAEN,kBAAkBC,qBAAqBX,UAAS,MAAsB;AAC7F,SACE,sBAAA,cAACuC,OAAOC,MAAI;IACVC,OAAO/B,kBAAkByB;IACzBO,eAAe,CAACP,OAAOxB,oBAAoBX,UAAU2C,KAAK,CAACrC,OAAOA,GAAG6B,OAAOA,EAAAA,KAAOS,cAAAA,CAAAA;KAEnF,sBAAA,cAACL,OAAOM,eAAa;IAACC,aAAY;MAClC,sBAAA,cAACP,OAAOQ,QAAM,MACZ,sBAAA,cAACR,OAAOS,SAAO,MACb,sBAAA,cAACT,OAAOU,gBAAc,IAAA,GACtB,sBAAA,cAACV,OAAOW,UAAQ,MACblD,UAAUmD,IAAI,CAAC,EAAEhB,IAAI1B,QAAO,MAC3B,sBAAA,cAAC8B,OAAOa,QAAM;IAACC,KAAKlB;IAAIM,OAAON;KAC5B1B,OAAAA,CAAAA,CAAAA,GAIP,sBAAA,cAAC8B,OAAOe,kBAAgB,IAAA,GACxB,sBAAA,cAACf,OAAOgB,OAAK,IAAA,CAAA,CAAA,CAAA;AAKvB;;;AC5FA,IAAA,0BAAeC;",
|
|
6
|
-
"names": ["React", "useMemo", "useState", "failUndefined", "useClient", "Filter", "getMeta", "getSpace", "useQuery", "Select", "AutomationPanel", "subject", "space", "getSpace", "functions", "useQuery", "undefined", "Filter", "schema", "FunctionType", "fn", "ScriptType", "source", "binding", "selectedFunction", "setSelectedFunction", "useState", "functionToChatWith", "div", "className", "BindingSelect", "ChatPanel", "length", "p", "client", "useClient", "existingFunctionUrl", "getUserFunctionUrlInMetadata", "getMeta", "functionUrl", "useMemo", "getInvocationUrl", "config", "values", "runtime", "services", "edge", "url", "spaceId", "id", "subjectId", "DebugPanel", "classNames", "Select", "Root", "value", "onValueChange", "find", "failUndefined", "TriggerButton", "placeholder", "Portal", "Content", "ScrollUpButton", "Viewport", "map", "Option", "key", "ScrollDownButton", "Arrow", "AutomationPanel"]
|
|
7
|
-
}
|