@dxos/react-ui-canvas-compute 0.8.4-main.bc674ce → 0.8.4-main.c351d160a8
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/index.mjs +77 -67
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +77 -67
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/compute.stories.d.ts.map +1 -1
- package/dist/types/src/graph/controller.d.ts +2 -2
- package/dist/types/src/graph/controller.d.ts.map +1 -1
- package/dist/types/src/hooks/useGraphMonitor.d.ts +2 -2
- package/dist/types/src/hooks/useGraphMonitor.d.ts.map +1 -1
- package/dist/types/src/shapes/Gpt.d.ts.map +1 -1
- package/dist/types/src/shapes/Queue.d.ts.map +1 -1
- package/dist/types/src/shapes/Surface.d.ts.map +1 -1
- package/dist/types/src/shapes/Thread.d.ts.map +1 -1
- package/dist/types/src/shapes/Trigger.d.ts +2 -1
- package/dist/types/src/shapes/Trigger.d.ts.map +1 -1
- package/dist/types/src/shapes/common/Box.d.ts +3 -3
- package/dist/types/src/shapes/common/Box.d.ts.map +1 -1
- package/dist/types/src/shapes/common/FunctionBody.d.ts +2 -2
- package/dist/types/src/shapes/common/FunctionBody.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +49 -48
- package/src/README.md +0 -3
- package/src/compute.stories.tsx +10 -7
- package/src/graph/controller.ts +2 -1
- package/src/graph/node-defs.ts +28 -28
- package/src/hooks/useGraphMonitor.ts +2 -2
- package/src/schema.test.ts +3 -3
- package/src/shapes/Audio.tsx +2 -2
- package/src/shapes/Beacon.tsx +1 -1
- package/src/shapes/Boolean.tsx +2 -2
- package/src/shapes/Gpt.tsx +6 -1
- package/src/shapes/GptRealtime.tsx +1 -1
- package/src/shapes/Queue.tsx +9 -7
- package/src/shapes/Scope.tsx +1 -1
- package/src/shapes/Surface.tsx +4 -2
- package/src/shapes/Switch.tsx +1 -1
- package/src/shapes/Thread.tsx +14 -8
- package/src/shapes/Trigger.tsx +3 -3
- package/src/shapes/common/Box.tsx +7 -8
- package/src/shapes/common/FunctionBody.tsx +4 -4
- package/src/shapes/common/TypeSelect.tsx +1 -1
|
@@ -305,33 +305,33 @@ var nodeFactory = {
|
|
|
305
305
|
[NODE_INPUT]: () => createNode(NODE_INPUT),
|
|
306
306
|
[NODE_OUTPUT]: () => createNode(NODE_OUTPUT),
|
|
307
307
|
// Extensions.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
308
|
+
"text-to-image": () => createNode("text-to-image"),
|
|
309
|
+
and: () => createNode("and"),
|
|
310
|
+
append: () => createNode("append"),
|
|
311
|
+
audio: () => createNode("audio"),
|
|
312
|
+
beacon: () => createNode("beacon"),
|
|
313
|
+
chat: () => createNode("chat"),
|
|
314
|
+
constant: (shape) => createNode("constant", {
|
|
315
315
|
value: shape.value
|
|
316
316
|
}),
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
317
|
+
"make-queue": () => createNode("make-queue"),
|
|
318
|
+
database: () => createNode("database"),
|
|
319
|
+
gpt: () => createNode("gpt"),
|
|
320
|
+
"gpt-realtime": () => createNode("gpt-realtime"),
|
|
321
|
+
if: () => createNode("if"),
|
|
322
|
+
"if-else": () => createNode("if-else"),
|
|
323
|
+
function: () => createNode("function"),
|
|
324
|
+
json: () => createNode("json"),
|
|
325
|
+
"json-transform": () => createNode("json-transform"),
|
|
326
|
+
not: () => createNode("not"),
|
|
327
|
+
or: () => createNode("or"),
|
|
328
|
+
queue: () => createNode("queue"),
|
|
329
|
+
rng: () => createNode("rng"),
|
|
330
|
+
reducer: () => createNode("reducer"),
|
|
331
|
+
scope: () => createNode("scope"),
|
|
332
|
+
surface: () => createNode("surface"),
|
|
333
|
+
switch: () => createNode("switch"),
|
|
334
|
+
template: (shape) => {
|
|
335
335
|
const node = createNode("template", {
|
|
336
336
|
valueType: shape.valueType,
|
|
337
337
|
value: shape.text
|
|
@@ -339,9 +339,9 @@ var nodeFactory = {
|
|
|
339
339
|
node.inputSchema = JsonSchema.toJsonSchema(getTemplateInputSchema(node));
|
|
340
340
|
return node;
|
|
341
341
|
},
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
text: () => createNode("text"),
|
|
343
|
+
thread: () => createNode("thread"),
|
|
344
|
+
trigger: () => createNode(NODE_INPUT)
|
|
345
345
|
};
|
|
346
346
|
var createNode = (type, props) => ({
|
|
347
347
|
id: Obj2.ID.random(),
|
|
@@ -463,7 +463,7 @@ var ComputeGraphController = class extends Resource {
|
|
|
463
463
|
} catch (err) {
|
|
464
464
|
log.catch(err, void 0, {
|
|
465
465
|
F: __dxlog_file4,
|
|
466
|
-
L:
|
|
466
|
+
L: 230,
|
|
467
467
|
S: this,
|
|
468
468
|
C: (f, a) => f(...a)
|
|
469
469
|
});
|
|
@@ -556,7 +556,7 @@ var ComputeGraphController = class extends Resource {
|
|
|
556
556
|
event
|
|
557
557
|
}, {
|
|
558
558
|
F: __dxlog_file4,
|
|
559
|
-
L:
|
|
559
|
+
L: 377,
|
|
560
560
|
S: this,
|
|
561
561
|
C: (f, a) => f(...a)
|
|
562
562
|
});
|
|
@@ -644,7 +644,7 @@ var footerHeight = 32;
|
|
|
644
644
|
var Box = /* @__PURE__ */ forwardRef(({ children, classNames, shape, title, status, open, onAction }, forwardedRef) => {
|
|
645
645
|
invariant4(shape.type, void 0, {
|
|
646
646
|
F: __dxlog_file5,
|
|
647
|
-
L:
|
|
647
|
+
L: 29,
|
|
648
648
|
S: void 0,
|
|
649
649
|
A: [
|
|
650
650
|
"shape.type",
|
|
@@ -657,9 +657,9 @@ var Box = /* @__PURE__ */ forwardRef(({ children, classNames, shape, title, stat
|
|
|
657
657
|
const { debug } = useEditorContext();
|
|
658
658
|
return /* @__PURE__ */ React.createElement("div", {
|
|
659
659
|
ref: forwardedRef,
|
|
660
|
-
className: "flex flex-col
|
|
660
|
+
className: "flex flex-col h-full w-full justify-between"
|
|
661
661
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
662
|
-
className: "flex shrink-0
|
|
662
|
+
className: "flex shrink-0 w-full justify-between items-center h-[32px] bg-input-surface"
|
|
663
663
|
}, /* @__PURE__ */ React.createElement(Icon, {
|
|
664
664
|
icon,
|
|
665
665
|
classNames: "mx-2"
|
|
@@ -678,11 +678,11 @@ var Box = /* @__PURE__ */ forwardRef(({ children, classNames, shape, title, stat
|
|
|
678
678
|
onAction?.("run");
|
|
679
679
|
}
|
|
680
680
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
681
|
-
className: mx("flex flex-col
|
|
681
|
+
className: mx("flex flex-col h-full grow overflow-hidden", classNames)
|
|
682
682
|
}, children), /* @__PURE__ */ React.createElement("div", {
|
|
683
|
-
className: "flex shrink-0
|
|
683
|
+
className: "flex shrink-0 w-full justify-between items-center h-[32px] bg-input-surface"
|
|
684
684
|
}, /* @__PURE__ */ React.createElement("div", {
|
|
685
|
-
className: "grow
|
|
685
|
+
className: "grow px-2 text-sm truncate"
|
|
686
686
|
}, debug ? shape.id : status), openable && /* @__PURE__ */ React.createElement(IconButton, {
|
|
687
687
|
classNames: "p-1",
|
|
688
688
|
variant: "ghost",
|
|
@@ -785,7 +785,7 @@ var FunctionBody = ({ shape, name, content, inputSchema = VoidInput, outputSchem
|
|
|
785
785
|
className: "flex flex-col"
|
|
786
786
|
}, inputs?.map(({ name: name2 }) => /* @__PURE__ */ React2.createElement("div", {
|
|
787
787
|
key: name2,
|
|
788
|
-
className: "
|
|
788
|
+
className: "px-2 truncate text-sm font-mono items-center",
|
|
789
789
|
style: {
|
|
790
790
|
height: rowHeight
|
|
791
791
|
}
|
|
@@ -793,7 +793,7 @@ var FunctionBody = ({ shape, name, content, inputSchema = VoidInput, outputSchem
|
|
|
793
793
|
className: "flex flex-col"
|
|
794
794
|
}, outputs?.map(({ name: name2 }) => /* @__PURE__ */ React2.createElement("div", {
|
|
795
795
|
key: name2,
|
|
796
|
-
className: "
|
|
796
|
+
className: "px-2 truncate text-sm font-mono items-center text-right",
|
|
797
797
|
style: {
|
|
798
798
|
height: rowHeight
|
|
799
799
|
}
|
|
@@ -829,7 +829,7 @@ var TypeSelect = ({ value, onValueChange }) => {
|
|
|
829
829
|
onValueChange
|
|
830
830
|
}, /* @__PURE__ */ React3.createElement(Select.TriggerButton, {
|
|
831
831
|
variant: "ghost",
|
|
832
|
-
classNames: "
|
|
832
|
+
classNames: "w-full px-0!"
|
|
833
833
|
}), /* @__PURE__ */ React3.createElement(Select.Portal, null, /* @__PURE__ */ React3.createElement(Select.Content, null, /* @__PURE__ */ React3.createElement(Select.ScrollUpButton, null), /* @__PURE__ */ React3.createElement(Select.Viewport, null, ComputeValueType.literals.map((type) => /* @__PURE__ */ React3.createElement(Select.Option, {
|
|
834
834
|
key: type,
|
|
835
835
|
value: type
|
|
@@ -922,12 +922,12 @@ var AudioComponent = ({ shape }) => {
|
|
|
922
922
|
active
|
|
923
923
|
]);
|
|
924
924
|
return /* @__PURE__ */ React6.createElement("div", {
|
|
925
|
-
className: "flex
|
|
925
|
+
className: "flex w-full justify-center items-center"
|
|
926
926
|
}, /* @__PURE__ */ React6.createElement(Icon2, {
|
|
927
927
|
icon: active ? "ph--microphone--regular" : "ph--microphone-slash--regular",
|
|
928
928
|
classNames: [
|
|
929
929
|
"transition opacity-20 duration-1000",
|
|
930
|
-
active && "opacity-100 text-
|
|
930
|
+
active && "opacity-100 text-error-text"
|
|
931
931
|
],
|
|
932
932
|
size: 8,
|
|
933
933
|
onClick: () => setActive(!active)
|
|
@@ -969,7 +969,7 @@ var BeaconComponent = ({ shape }) => {
|
|
|
969
969
|
const input = runtime.inputs[DEFAULT_INPUT3];
|
|
970
970
|
const value = input?.type === "executed" ? input.value : false;
|
|
971
971
|
return /* @__PURE__ */ React7.createElement("div", {
|
|
972
|
-
className: "flex
|
|
972
|
+
className: "flex w-full justify-center items-center"
|
|
973
973
|
}, /* @__PURE__ */ React7.createElement(Icon3, {
|
|
974
974
|
icon: "ph--sun--regular",
|
|
975
975
|
classNames: [
|
|
@@ -1018,7 +1018,7 @@ var defineShape = ({ type, name, icon, symbol: Symbol, createShape: createShape2
|
|
|
1018
1018
|
// Be careful not to name component factories with a capital letter.
|
|
1019
1019
|
component: () => {
|
|
1020
1020
|
return /* @__PURE__ */ React8.createElement("div", {
|
|
1021
|
-
className: "flex
|
|
1021
|
+
className: "flex w-full justify-center items-center"
|
|
1022
1022
|
}, /* @__PURE__ */ React8.createElement(Symbol, null));
|
|
1023
1023
|
},
|
|
1024
1024
|
createShape: createShape2,
|
|
@@ -1045,7 +1045,7 @@ var createSymbol = (pathConstructor, inputs) => ({
|
|
|
1045
1045
|
});
|
|
1046
1046
|
return /* @__PURE__ */ React8.createElement("svg", {
|
|
1047
1047
|
viewBox: `0 0 ${width} ${height}`,
|
|
1048
|
-
className: "
|
|
1048
|
+
className: "w-full h-full"
|
|
1049
1049
|
}, getAnchorPoints({
|
|
1050
1050
|
x: 0,
|
|
1051
1051
|
y: centerY
|
|
@@ -1435,6 +1435,7 @@ var functionShape = {
|
|
|
1435
1435
|
import * as Schema12 from "effect/Schema";
|
|
1436
1436
|
import React13, { useEffect as useEffect4, useState as useState6 } from "react";
|
|
1437
1437
|
import { GptInput, GptOutput } from "@dxos/conductor";
|
|
1438
|
+
import { ScrollArea } from "@dxos/react-ui";
|
|
1438
1439
|
var GptShape = Schema12.extend(ComputeShape, Schema12.Struct({
|
|
1439
1440
|
type: Schema12.Literal("gpt")
|
|
1440
1441
|
}));
|
|
@@ -1483,9 +1484,10 @@ var GptComponent = ({ shape }) => {
|
|
|
1483
1484
|
]);
|
|
1484
1485
|
return /* @__PURE__ */ React13.createElement(FunctionBody, {
|
|
1485
1486
|
shape,
|
|
1486
|
-
content: /* @__PURE__ */ React13.createElement(
|
|
1487
|
-
|
|
1488
|
-
|
|
1487
|
+
content: /* @__PURE__ */ React13.createElement(ScrollArea.Root, {
|
|
1488
|
+
orientation: "vertical",
|
|
1489
|
+
thin: true
|
|
1490
|
+
}, /* @__PURE__ */ React13.createElement(ScrollArea.Viewport, null, text)),
|
|
1489
1491
|
status: `${tokens} tokens`,
|
|
1490
1492
|
inputSchema: meta.input,
|
|
1491
1493
|
outputSchema: meta.output
|
|
@@ -1634,6 +1636,7 @@ var ifElseShape = {
|
|
|
1634
1636
|
import * as Schema15 from "effect/Schema";
|
|
1635
1637
|
import React16, { Fragment } from "react";
|
|
1636
1638
|
import { DEFAULT_OUTPUT as DEFAULT_OUTPUT4, QueueInput, QueueOutput } from "@dxos/conductor";
|
|
1639
|
+
import { ScrollArea as ScrollArea2 } from "@dxos/react-ui";
|
|
1637
1640
|
import { mx as mx2 } from "@dxos/ui-theme";
|
|
1638
1641
|
var QueueShape = Schema15.extend(ComputeShape, Schema15.Struct({
|
|
1639
1642
|
type: Schema15.Literal("queue")
|
|
@@ -1658,15 +1661,17 @@ var QueueComponent = ({ shape }) => {
|
|
|
1658
1661
|
shape,
|
|
1659
1662
|
status: `${items.length} items`,
|
|
1660
1663
|
onAction: handleAction
|
|
1661
|
-
}, /* @__PURE__ */ React16.createElement(
|
|
1662
|
-
|
|
1664
|
+
}, /* @__PURE__ */ React16.createElement(ScrollArea2.Root, {
|
|
1665
|
+
orientation: "vertical"
|
|
1666
|
+
}, /* @__PURE__ */ React16.createElement(ScrollArea2.Viewport, {
|
|
1667
|
+
classNames: "divide-y divide-separator"
|
|
1663
1668
|
}, [
|
|
1664
1669
|
...items
|
|
1665
1670
|
].map((item, i) => /* @__PURE__ */ React16.createElement(QueueItem, {
|
|
1666
1671
|
key: i,
|
|
1667
|
-
classNames: "p-1
|
|
1672
|
+
classNames: "p-1 px-2",
|
|
1668
1673
|
item
|
|
1669
|
-
}))));
|
|
1674
|
+
})))));
|
|
1670
1675
|
};
|
|
1671
1676
|
var QueueItem = ({ classNames, item }) => {
|
|
1672
1677
|
if (typeof item !== "object") {
|
|
@@ -1675,7 +1680,7 @@ var QueueItem = ({ classNames, item }) => {
|
|
|
1675
1680
|
}, item);
|
|
1676
1681
|
}
|
|
1677
1682
|
return /* @__PURE__ */ React16.createElement("div", {
|
|
1678
|
-
className: mx2("grid grid-cols-[
|
|
1683
|
+
className: mx2("grid grid-cols-[80px_1fr]", classNames)
|
|
1679
1684
|
}, Object.entries(item).map(([key, value]) => /* @__PURE__ */ React16.createElement(Fragment, {
|
|
1680
1685
|
key
|
|
1681
1686
|
}, /* @__PURE__ */ React16.createElement("div", {
|
|
@@ -1791,7 +1796,7 @@ var ScopeComponent = ({ shape }) => {
|
|
|
1791
1796
|
const active = input?.type === "executed" ? input.value : false;
|
|
1792
1797
|
const { getAverage } = useAudioStream(active);
|
|
1793
1798
|
return /* @__PURE__ */ React18.createElement("div", {
|
|
1794
|
-
className: "flex
|
|
1799
|
+
className: "flex w-full justify-center items-center bg-black"
|
|
1795
1800
|
}, /* @__PURE__ */ React18.createElement(Chaos, {
|
|
1796
1801
|
active,
|
|
1797
1802
|
getValue: getAverage,
|
|
@@ -1818,8 +1823,9 @@ var scopeShape = {
|
|
|
1818
1823
|
// src/shapes/Surface.tsx
|
|
1819
1824
|
import * as Schema18 from "effect/Schema";
|
|
1820
1825
|
import React19 from "react";
|
|
1821
|
-
import { Surface } from "@dxos/app-framework/
|
|
1826
|
+
import { Surface } from "@dxos/app-framework/ui";
|
|
1822
1827
|
import { DEFAULT_INPUT as DEFAULT_INPUT6 } from "@dxos/conductor";
|
|
1828
|
+
import { Card } from "@dxos/react-ui";
|
|
1823
1829
|
import { createAnchorMap as createAnchorMap9 } from "@dxos/react-ui-canvas-editor";
|
|
1824
1830
|
var SurfaceShape = Schema18.extend(ComputeShape, Schema18.Struct({
|
|
1825
1831
|
type: Schema18.Literal("surface")
|
|
@@ -1844,13 +1850,13 @@ var SurfaceComponent = ({ shape }) => {
|
|
|
1844
1850
|
return /* @__PURE__ */ React19.createElement(Box, {
|
|
1845
1851
|
shape,
|
|
1846
1852
|
onAction: handleAction
|
|
1847
|
-
}, value !== null && /* @__PURE__ */ React19.createElement(Surface, {
|
|
1848
|
-
role: "card--
|
|
1853
|
+
}, /* @__PURE__ */ React19.createElement(Card.Root, null, value !== null && /* @__PURE__ */ React19.createElement(Surface.Surface, {
|
|
1854
|
+
role: "card--content",
|
|
1849
1855
|
data: {
|
|
1850
1856
|
value
|
|
1851
1857
|
},
|
|
1852
1858
|
limit: 1
|
|
1853
|
-
}));
|
|
1859
|
+
})));
|
|
1854
1860
|
};
|
|
1855
1861
|
var surfaceShape = {
|
|
1856
1862
|
type: "surface",
|
|
@@ -1893,7 +1899,7 @@ var SwitchComponent = ({ shape }) => {
|
|
|
1893
1899
|
value
|
|
1894
1900
|
]);
|
|
1895
1901
|
return /* @__PURE__ */ React20.createElement("div", {
|
|
1896
|
-
className: "flex
|
|
1902
|
+
className: "flex w-full justify-center items-center",
|
|
1897
1903
|
onClick: (ev) => ev.stopPropagation()
|
|
1898
1904
|
}, /* @__PURE__ */ React20.createElement(Input2.Root, null, /* @__PURE__ */ React20.createElement(Input2.Switch, {
|
|
1899
1905
|
checked: value,
|
|
@@ -2072,6 +2078,7 @@ var textShape = {
|
|
|
2072
2078
|
import * as Schema23 from "effect/Schema";
|
|
2073
2079
|
import React24, { useEffect as useEffect7, useRef as useRef6 } from "react";
|
|
2074
2080
|
import { createInputSchema as createInputSchema2, createOutputSchema as createOutputSchema2 } from "@dxos/conductor";
|
|
2081
|
+
import { ScrollArea as ScrollArea3 } from "@dxos/react-ui";
|
|
2075
2082
|
import { Message as Message2 } from "@dxos/types";
|
|
2076
2083
|
import { mx as mx3 } from "@dxos/ui-theme";
|
|
2077
2084
|
var InputSchema2 = createInputSchema2(Message2.Message);
|
|
@@ -2099,19 +2106,22 @@ var ThreadComponent = ({ shape }) => {
|
|
|
2099
2106
|
]);
|
|
2100
2107
|
return /* @__PURE__ */ React24.createElement(Box, {
|
|
2101
2108
|
shape
|
|
2102
|
-
}, /* @__PURE__ */ React24.createElement(
|
|
2103
|
-
|
|
2104
|
-
|
|
2109
|
+
}, /* @__PURE__ */ React24.createElement(ScrollArea3.Root, {
|
|
2110
|
+
orientation: "vertical"
|
|
2111
|
+
}, /* @__PURE__ */ React24.createElement(ScrollArea3.Viewport, {
|
|
2112
|
+
classNames: "gap-2 p-2",
|
|
2113
|
+
ref: scrollRef
|
|
2105
2114
|
}, [
|
|
2106
2115
|
...items
|
|
2107
2116
|
].map((item, i) => /* @__PURE__ */ React24.createElement(ThreadItem, {
|
|
2108
2117
|
key: i,
|
|
2109
2118
|
item
|
|
2110
|
-
}))));
|
|
2119
|
+
})))));
|
|
2111
2120
|
};
|
|
2112
2121
|
var ThreadItem = ({ classNames, item }) => {
|
|
2113
2122
|
if (typeof item !== "object") {
|
|
2114
2123
|
return /* @__PURE__ */ React24.createElement("div", {
|
|
2124
|
+
role: "none",
|
|
2115
2125
|
className: mx3(classNames)
|
|
2116
2126
|
}, item);
|
|
2117
2127
|
}
|
|
@@ -2119,7 +2129,7 @@ var ThreadItem = ({ classNames, item }) => {
|
|
|
2119
2129
|
return /* @__PURE__ */ React24.createElement("div", {
|
|
2120
2130
|
className: mx3("flex", classNames, role === "user" && "justify-end")
|
|
2121
2131
|
}, /* @__PURE__ */ React24.createElement("div", {
|
|
2122
|
-
className: mx3("block rounded-md p-1
|
|
2132
|
+
className: mx3("block rounded-md p-1 px-2 text-sm", role === "user" ? "bg-blue-100 dark:bg-blue-800" : role === "system" ? "bg-red-100, dark:bg-red-800" : "whitespace-pre-wrap bg-neutral-50 dark:bg-neutral-800")
|
|
2123
2133
|
}, message));
|
|
2124
2134
|
};
|
|
2125
2135
|
var threadShape = {
|
|
@@ -2170,14 +2180,14 @@ var textToImageShape = {
|
|
|
2170
2180
|
import * as Schema25 from "effect/Schema";
|
|
2171
2181
|
import React26, { useEffect as useEffect8 } from "react";
|
|
2172
2182
|
import { VoidInput as VoidInput3 } from "@dxos/conductor";
|
|
2173
|
-
import { Filter as Filter2, Obj as Obj4, Query, Ref as Ref3
|
|
2183
|
+
import { Filter as Filter2, Obj as Obj4, Query, Ref as Ref3 } from "@dxos/echo";
|
|
2174
2184
|
import { Trigger, TriggerEvent } from "@dxos/functions";
|
|
2175
2185
|
import { DXN, SpaceId } from "@dxos/keys";
|
|
2176
2186
|
import { useSpace } from "@dxos/react-client/echo";
|
|
2177
2187
|
import { Select as Select2 } from "@dxos/react-ui";
|
|
2178
2188
|
var TriggerShape = Schema25.extend(ComputeShape, Schema25.Struct({
|
|
2179
2189
|
type: Schema25.Literal("trigger"),
|
|
2180
|
-
functionTrigger: Schema25.optional(
|
|
2190
|
+
functionTrigger: Schema25.optional(Ref3.Ref(Trigger.Trigger))
|
|
2181
2191
|
}));
|
|
2182
2192
|
var createTrigger = (props) => {
|
|
2183
2193
|
const functionTrigger = Trigger.make({
|
|
@@ -2244,7 +2254,7 @@ var TriggerKindSelect = ({ value, onValueChange }) => {
|
|
|
2244
2254
|
onValueChange
|
|
2245
2255
|
}, /* @__PURE__ */ React26.createElement(Select2.TriggerButton, {
|
|
2246
2256
|
variant: "ghost",
|
|
2247
|
-
classNames: "
|
|
2257
|
+
classNames: "w-full px-0!"
|
|
2248
2258
|
}), /* @__PURE__ */ React26.createElement(Select2.Portal, null, /* @__PURE__ */ React26.createElement(Select2.Content, null, /* @__PURE__ */ React26.createElement(Select2.ScrollUpButton, null), /* @__PURE__ */ React26.createElement(Select2.Viewport, null, Trigger.Kinds.map((kind) => /* @__PURE__ */ React26.createElement(Select2.Option, {
|
|
2249
2259
|
key: kind,
|
|
2250
2260
|
value: kind
|
|
@@ -2412,7 +2422,7 @@ var GptRealtimeComponent = ({ shape }) => {
|
|
|
2412
2422
|
}
|
|
2413
2423
|
};
|
|
2414
2424
|
return /* @__PURE__ */ React27.createElement("div", {
|
|
2415
|
-
className: "flex
|
|
2425
|
+
className: "flex w-full justify-center items-center"
|
|
2416
2426
|
}, /* @__PURE__ */ React27.createElement(Icon5, {
|
|
2417
2427
|
icon: isReady ? "ph--waveform--regular" : isLive ? "ph--pulse--regular" : "ph--play--regular",
|
|
2418
2428
|
size: 16,
|