@dxos/react-ui-canvas-compute 0.8.4-main.5ad4a44 → 0.8.4-main.66e292d

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.
Files changed (43) hide show
  1. package/dist/lib/browser/index.mjs +86 -106
  2. package/dist/lib/browser/index.mjs.map +3 -3
  3. package/dist/lib/browser/meta.json +1 -1
  4. package/dist/lib/node-esm/index.mjs +86 -106
  5. package/dist/lib/node-esm/index.mjs.map +3 -3
  6. package/dist/lib/node-esm/meta.json +1 -1
  7. package/dist/types/src/graph/controller.d.ts +11 -28
  8. package/dist/types/src/graph/controller.d.ts.map +1 -1
  9. package/dist/types/src/hooks/useComputeNodeState.d.ts +2 -2
  10. package/dist/types/src/hooks/useComputeNodeState.d.ts.map +1 -1
  11. package/dist/types/src/shapes/RNG.d.ts.map +1 -1
  12. package/dist/types/src/shapes/Surface.d.ts.map +1 -1
  13. package/dist/types/src/shapes/Trigger.d.ts +3 -3
  14. package/dist/types/src/shapes/Trigger.d.ts.map +1 -1
  15. package/dist/types/src/testing/circuits.d.ts +1 -1
  16. package/dist/types/src/testing/circuits.d.ts.map +1 -1
  17. package/dist/types/tsconfig.tsbuildinfo +1 -1
  18. package/package.json +42 -40
  19. package/src/compute.stories.tsx +6 -6
  20. package/src/graph/controller.ts +12 -5
  21. package/src/graph/node-defs.ts +3 -3
  22. package/src/hooks/useComputeNodeState.ts +4 -3
  23. package/src/hooks/useGraphMonitor.ts +2 -2
  24. package/src/schema.test.ts +7 -7
  25. package/src/shapes/Audio.tsx +1 -1
  26. package/src/shapes/Beacon.tsx +1 -1
  27. package/src/shapes/Boolean.tsx +2 -2
  28. package/src/shapes/Function.tsx +3 -3
  29. package/src/shapes/Gpt.tsx +1 -1
  30. package/src/shapes/GptRealtime.tsx +1 -1
  31. package/src/shapes/Queue.tsx +2 -2
  32. package/src/shapes/RNG.tsx +5 -1
  33. package/src/shapes/Scope.tsx +1 -1
  34. package/src/shapes/Surface.tsx +6 -2
  35. package/src/shapes/Switch.tsx +1 -1
  36. package/src/shapes/Table.tsx +3 -3
  37. package/src/shapes/Thread.tsx +5 -5
  38. package/src/shapes/Trigger.tsx +24 -41
  39. package/src/shapes/common/Box.tsx +5 -5
  40. package/src/shapes/common/FunctionBody.tsx +2 -2
  41. package/src/shapes/common/TypeSelect.tsx +1 -1
  42. package/src/shapes/defs.ts +3 -3
  43. package/src/testing/circuits.ts +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui-canvas-compute",
3
- "version": "0.8.4-main.5ad4a44",
3
+ "version": "0.8.4-main.66e292d",
4
4
  "description": "A compute graph extension for the canvas editor component.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -29,61 +29,63 @@
29
29
  "@effect/platform": "0.92.1",
30
30
  "@preact-signals/safe-react": "^0.9.0",
31
31
  "chess.js": "^1.0.0",
32
- "@dxos/ai": "0.8.4-main.5ad4a44",
33
- "@dxos/app-framework": "0.8.4-main.5ad4a44",
34
- "@dxos/assistant": "0.8.4-main.5ad4a44",
35
- "@dxos/conductor": "0.8.4-main.5ad4a44",
36
- "@dxos/async": "0.8.4-main.5ad4a44",
37
- "@dxos/blueprints": "0.8.4-main.5ad4a44",
38
- "@dxos/context": "0.8.4-main.5ad4a44",
39
- "@dxos/debug": "0.8.4-main.5ad4a44",
40
- "@dxos/echo": "0.8.4-main.5ad4a44",
41
- "@dxos/edge-client": "0.8.4-main.5ad4a44",
42
- "@dxos/functions": "0.8.4-main.5ad4a44",
43
- "@dxos/graph": "0.8.4-main.5ad4a44",
44
- "@dxos/invariant": "0.8.4-main.5ad4a44",
45
- "@dxos/live-object": "0.8.4-main.5ad4a44",
46
- "@dxos/log": "0.8.4-main.5ad4a44",
47
- "@dxos/react-client": "0.8.4-main.5ad4a44",
48
- "@dxos/react-edge-client": "0.8.4-main.5ad4a44",
49
- "@dxos/react-ui-attention": "0.8.4-main.5ad4a44",
50
- "@dxos/keys": "0.8.4-main.5ad4a44",
51
- "@dxos/react-ui-canvas": "0.8.4-main.5ad4a44",
52
- "@dxos/react-ui-canvas-editor": "0.8.4-main.5ad4a44",
53
- "@dxos/react-ui-editor": "0.8.4-main.5ad4a44",
54
- "@dxos/react-ui-form": "0.8.4-main.5ad4a44",
55
- "@dxos/react-ui-sfx": "0.8.4-main.5ad4a44",
56
- "@dxos/react-ui-syntax-highlighter": "0.8.4-main.5ad4a44",
57
- "@dxos/schema": "0.8.4-main.5ad4a44",
58
- "@dxos/util": "0.8.4-main.5ad4a44",
59
- "@dxos/react-ui-stack": "0.8.4-main.5ad4a44"
32
+ "@dxos/ai": "0.8.4-main.66e292d",
33
+ "@dxos/app-framework": "0.8.4-main.66e292d",
34
+ "@dxos/assistant": "0.8.4-main.66e292d",
35
+ "@dxos/context": "0.8.4-main.66e292d",
36
+ "@dxos/debug": "0.8.4-main.66e292d",
37
+ "@dxos/echo": "0.8.4-main.66e292d",
38
+ "@dxos/conductor": "0.8.4-main.66e292d",
39
+ "@dxos/blueprints": "0.8.4-main.66e292d",
40
+ "@dxos/async": "0.8.4-main.66e292d",
41
+ "@dxos/functions": "0.8.4-main.66e292d",
42
+ "@dxos/functions-runtime": "0.8.4-main.66e292d",
43
+ "@dxos/graph": "0.8.4-main.66e292d",
44
+ "@dxos/edge-client": "0.8.4-main.66e292d",
45
+ "@dxos/live-object": "0.8.4-main.66e292d",
46
+ "@dxos/keys": "0.8.4-main.66e292d",
47
+ "@dxos/log": "0.8.4-main.66e292d",
48
+ "@dxos/invariant": "0.8.4-main.66e292d",
49
+ "@dxos/react-edge-client": "0.8.4-main.66e292d",
50
+ "@dxos/react-ui-canvas-editor": "0.8.4-main.66e292d",
51
+ "@dxos/react-ui-canvas": "0.8.4-main.66e292d",
52
+ "@dxos/react-ui-editor": "0.8.4-main.66e292d",
53
+ "@dxos/react-ui-sfx": "0.8.4-main.66e292d",
54
+ "@dxos/react-ui-form": "0.8.4-main.66e292d",
55
+ "@dxos/react-ui-attention": "0.8.4-main.66e292d",
56
+ "@dxos/react-ui-stack": "0.8.4-main.66e292d",
57
+ "@dxos/react-client": "0.8.4-main.66e292d",
58
+ "@dxos/react-ui-syntax-highlighter": "0.8.4-main.66e292d",
59
+ "@dxos/schema": "0.8.4-main.66e292d",
60
+ "@dxos/types": "0.8.4-main.66e292d",
61
+ "@dxos/util": "0.8.4-main.66e292d"
60
62
  },
61
63
  "devDependencies": {
62
64
  "@effect/ai": "0.29.1",
63
65
  "@effect/experimental": "0.56.0",
64
66
  "@types/lodash.defaultsdeep": "^4.6.6",
65
67
  "@types/react": "~19.2.2",
66
- "@types/react-dom": "~19.2.1",
68
+ "@types/react-dom": "~19.2.2",
67
69
  "effect": "3.18.3",
68
70
  "lodash.defaultsdeep": "^4.6.1",
69
71
  "react": "~19.2.0",
70
72
  "react-dom": "~19.2.0",
71
73
  "vite": "7.1.9",
72
- "@dxos/app-framework": "0.8.4-main.5ad4a44",
73
- "@dxos/compute": "0.8.4-main.5ad4a44",
74
- "@dxos/echo-signals": "0.8.4-main.5ad4a44",
75
- "@dxos/assistant-testing": "0.8.4-main.5ad4a44",
76
- "@dxos/random": "0.8.4-main.5ad4a44",
77
- "@dxos/react-ui": "0.8.4-main.5ad4a44",
78
- "@dxos/react-ui-theme": "0.8.4-main.5ad4a44",
79
- "@dxos/storybook-utils": "0.8.4-main.5ad4a44"
74
+ "@dxos/app-framework": "0.8.4-main.66e292d",
75
+ "@dxos/assistant-toolkit": "0.8.4-main.66e292d",
76
+ "@dxos/echo-signals": "0.8.4-main.66e292d",
77
+ "@dxos/compute": "0.8.4-main.66e292d",
78
+ "@dxos/random": "0.8.4-main.66e292d",
79
+ "@dxos/storybook-utils": "0.8.4-main.66e292d",
80
+ "@dxos/react-ui": "0.8.4-main.66e292d",
81
+ "@dxos/react-ui-theme": "0.8.4-main.66e292d"
80
82
  },
81
83
  "peerDependencies": {
82
84
  "effect": "^3.13.3",
83
85
  "react": "^19.0.0",
84
86
  "react-dom": "^19.0.0",
85
- "@dxos/react-ui": "0.8.4-main.5ad4a44",
86
- "@dxos/react-ui-theme": "0.8.4-main.5ad4a44"
87
+ "@dxos/react-ui": "0.8.4-main.66e292d",
88
+ "@dxos/react-ui-theme": "0.8.4-main.66e292d"
87
89
  },
88
90
  "publishConfig": {
89
91
  "access": "public"
@@ -6,9 +6,9 @@ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
6
  import React, { type PropsWithChildren, useEffect, useMemo, useRef, useState } from 'react';
7
7
 
8
8
  import { withPluginManager } from '@dxos/app-framework/testing';
9
- import { capabilities } from '@dxos/assistant-testing';
9
+ import { capabilities } from '@dxos/assistant-toolkit';
10
10
  import { type ComputeGraphModel, type ComputeNode, type GraphDiagnostic } from '@dxos/conductor';
11
- import { ServiceContainer } from '@dxos/functions';
11
+ import { ServiceContainer } from '@dxos/functions-runtime';
12
12
  import { withClientProvider } from '@dxos/react-client/testing';
13
13
  import { Select, Toolbar } from '@dxos/react-ui';
14
14
  import { withTheme } from '@dxos/react-ui/testing';
@@ -119,7 +119,7 @@ const DefaultStory = ({
119
119
  }
120
120
 
121
121
  return (
122
- <div className='grid grid-cols-[1fr,360px] w-full h-full'>
122
+ <div className='grid grid-cols-[1fr,360px] is-full bs-full'>
123
123
  <ComputeContext.Provider value={{ controller }}>
124
124
  <Container id={id} classNames={['flex grow overflow-hidden', !sidebar && 'col-span-2']}>
125
125
  <Editor.Root<ComputeShape>
@@ -141,8 +141,8 @@ const DefaultStory = ({
141
141
  </ComputeContext.Provider>
142
142
 
143
143
  {sidebar && (
144
- <Container id='sidebar' classNames='flex flex-col h-full overflow-hidden'>
145
- <Toolbar.Root classNames='p-1'>
144
+ <Container id='sidebar' classNames='flex flex-col bs-full overflow-hidden'>
145
+ <Toolbar.Root>
146
146
  <Select.Root value={sidebar} onValueChange={(value) => setSidebar(value as RenderProps['sidebar'])}>
147
147
  <Select.TriggerButton classNames='is-full'>{sidebar}</Select.TriggerButton>
148
148
  <Select.Portal>
@@ -160,7 +160,7 @@ const DefaultStory = ({
160
160
  </Select.Root>
161
161
  </Toolbar.Root>
162
162
 
163
- <div className='flex flex-col h-full overflow-hidden divide-y divider-separator'>
163
+ <div className='flex flex-col bs-full overflow-hidden divide-y divider-separator'>
164
164
  {sidebar === 'selected' && selected && (
165
165
  <div>Form</div>
166
166
  // <Form<ComputeNode> schema={FormSchema} values={getComputeNode(selected.id) ?? {}} Custom={{}} />
@@ -12,8 +12,8 @@ import { Event, synchronized } from '@dxos/async';
12
12
  import {
13
13
  type ComputeEdge,
14
14
  type ComputeGraphModel,
15
- type ComputeMeta,
16
15
  type ComputeNode,
16
+ type ComputeNodeMeta,
17
17
  type GptInput,
18
18
  type GptOutput,
19
19
  type GraphDiagnostic,
@@ -23,10 +23,10 @@ import {
23
23
  } from '@dxos/conductor';
24
24
  import { Resource } from '@dxos/context';
25
25
  import { type ComputeEventLogger, type ComputeEventPayload } from '@dxos/functions';
26
- import { type ServiceContainer } from '@dxos/functions';
26
+ import { type ServiceContainer } from '@dxos/functions-runtime';
27
27
  import { log } from '@dxos/log';
28
28
  import { type CanvasGraphModel } from '@dxos/react-ui-canvas-editor';
29
- import { type ContentBlock } from '@dxos/schema';
29
+ import { type ContentBlock } from '@dxos/types';
30
30
 
31
31
  import { createComputeGraph } from '../hooks';
32
32
  import { type ComputeShape } from '../shapes';
@@ -158,7 +158,14 @@ export class ComputeGraphController extends Resource {
158
158
  /**
159
159
  * Inputs and outputs for all nodes.
160
160
  */
161
- get state() {
161
+ get state(): Record<
162
+ string,
163
+ {
164
+ node: ComputeNode;
165
+ input: Record<string, RuntimeValue>;
166
+ output: Record<string, RuntimeValue>;
167
+ }
168
+ > {
162
169
  const ids = [...new Set([...Object.keys(this._runtimeStateInputs), ...Object.keys(this._runtimeStateOutputs)])];
163
170
  return Object.fromEntries(
164
171
  ids.map((id) => [
@@ -205,7 +212,7 @@ export class ComputeGraphController extends Resource {
205
212
  });
206
213
  }
207
214
 
208
- async getMeta(node: ComputeNode): Promise<ComputeMeta> {
215
+ async getMeta(node: ComputeNode): Promise<ComputeNodeMeta> {
209
216
  const { meta } = await resolveComputeNode(node);
210
217
  return meta;
211
218
  }
@@ -12,7 +12,7 @@ import {
12
12
  registry,
13
13
  } from '@dxos/conductor';
14
14
  import { raise } from '@dxos/debug';
15
- import { ObjectId, toJsonSchema } from '@dxos/echo/internal';
15
+ import { JsonSchema, Obj } from '@dxos/echo';
16
16
  import { invariant } from '@dxos/invariant';
17
17
 
18
18
  import { type ComputeShape, type ConstantShape, type TemplateShape } from '../shapes';
@@ -68,7 +68,7 @@ const nodeFactory: Record<NodeType | 'trigger', (shape: ComputeShape) => Compute
68
68
  ['switch' as const]: () => createNode('switch'),
69
69
  ['template' as const]: (shape) => {
70
70
  const node = createNode('template', { valueType: (shape as TemplateShape).valueType, value: shape.text });
71
- node.inputSchema = toJsonSchema(getTemplateInputSchema(node));
71
+ node.inputSchema = JsonSchema.toJsonSchema(getTemplateInputSchema(node));
72
72
  return node;
73
73
  },
74
74
  ['text' as const]: () => createNode('text'),
@@ -77,7 +77,7 @@ const nodeFactory: Record<NodeType | 'trigger', (shape: ComputeShape) => Compute
77
77
  };
78
78
 
79
79
  const createNode = (type: string, props?: Partial<ComputeNode>): ComputeNode => ({
80
- id: ObjectId.random(),
80
+ id: Obj.ID.random(),
81
81
  type,
82
82
  ...props,
83
83
  });
@@ -5,7 +5,7 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import { useCallback, useEffect, useState } from 'react';
7
7
 
8
- import type { ComputeMeta, ComputeNode } from '@dxos/conductor';
8
+ import type { ComputeNode, ComputeNodeMeta } from '@dxos/conductor';
9
9
  import type { ComputeEventPayload } from '@dxos/functions';
10
10
  import { invariant } from '@dxos/invariant';
11
11
 
@@ -16,7 +16,7 @@ import { useComputeContext } from './compute-context';
16
16
 
17
17
  export type ComputeNodeState = {
18
18
  node: ComputeNode;
19
- meta: ComputeMeta;
19
+ meta: ComputeNodeMeta;
20
20
  runtime: {
21
21
  inputs: Record<string, RuntimeValue>;
22
22
  outputs: Record<string, RuntimeValue>;
@@ -33,7 +33,7 @@ export const useComputeNodeState = (shape: ComputeShape): ComputeNodeState => {
33
33
  const { controller } = useComputeContext();
34
34
  invariant(controller);
35
35
 
36
- const [meta, setMeta] = useState<ComputeMeta>();
36
+ const [meta, setMeta] = useState<ComputeNodeMeta>();
37
37
  useEffect(() => {
38
38
  let disposed = false;
39
39
  queueMicrotask(async () => {
@@ -43,6 +43,7 @@ export const useComputeNodeState = (shape: ComputeShape): ComputeNodeState => {
43
43
  if (disposed) {
44
44
  return;
45
45
  }
46
+
46
47
  setMeta(meta);
47
48
  });
48
49
 
@@ -5,7 +5,7 @@
5
5
  import { useMemo } from 'react';
6
6
 
7
7
  import { type ComputeEdge, ComputeGraphModel, type ComputeNode, DEFAULT_INPUT, DEFAULT_OUTPUT } from '@dxos/conductor';
8
- import { ObjectId, Ref } from '@dxos/echo/internal';
8
+ import { Obj, Ref } from '@dxos/echo';
9
9
  import { invariant } from '@dxos/invariant';
10
10
  import { getSpace } from '@dxos/react-client/echo';
11
11
  import { type CanvasGraphModel, type Connection, type GraphMonitor } from '@dxos/react-ui-canvas-editor';
@@ -27,7 +27,7 @@ export const mapEdge = (
27
27
  invariant(targetNode?.node);
28
28
 
29
29
  return {
30
- id: ObjectId.random(),
30
+ id: Obj.ID.random(),
31
31
  source: sourceNode.node,
32
32
  target: targetNode.node,
33
33
  output,
@@ -5,9 +5,9 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import { describe, test } from 'vitest';
7
7
 
8
- import { live } from '@dxos/echo/internal';
9
- import { BaseGraphNode, Graph } from '@dxos/graph';
8
+ import { BaseGraphNode, type Graph } from '@dxos/graph';
10
9
  import {
10
+ CanvasGraphModel,
11
11
  Polygon,
12
12
  Shape,
13
13
  createEllipse,
@@ -21,7 +21,7 @@ import { ComputeShape, createFunction, createSwitch } from './shapes';
21
21
 
22
22
  describe('compute', () => {
23
23
  test('model', ({ expect }) => {
24
- // const model = CanvasGraphModel.create<ComputeShape>();
24
+ const model = CanvasGraphModel.create<ComputeShape>();
25
25
  const node = createSwitch({ id: 'x', center: { x: 0, y: 0 }, size: { width: 80, height: 80 } });
26
26
  console.log(JSON.stringify(node, null, 2));
27
27
  expect(Schema.is(ComputeShape)(node)).toBe(true);
@@ -29,11 +29,11 @@ describe('compute', () => {
29
29
  expect(Schema.is(Shape)(node)).toBe(true);
30
30
  expect(Schema.is(BaseGraphNode)(node)).toBe(true);
31
31
 
32
- const graph = live(Graph, { nodes: [], edges: [] });
33
- graph.nodes.push(node); // Throws.
32
+ const graph: Graph = { nodes: [], edges: [] };
33
+ graph.nodes.push(node);
34
34
 
35
- // model.createNode(node);
36
- // console.log(JSON.stringify(model, null, 2));
35
+ model.createNode(node);
36
+ console.log(JSON.stringify(model, null, 2));
37
37
  });
38
38
  });
39
39
 
@@ -35,7 +35,7 @@ export const AudioComponent = ({ shape }: ShapeComponentProps<AudioShape>) => {
35
35
 
36
36
  // https://docs.pmnd.rs/react-three-fiber/api/canvas#render-props
37
37
  return (
38
- <div className='flex w-full justify-center items-center'>
38
+ <div className='flex is-full justify-center items-center'>
39
39
  <Icon
40
40
  icon={active ? 'ph--microphone--regular' : 'ph--microphone-slash--regular'}
41
41
  classNames={['transition opacity-20 duration-1000', active && 'opacity-100 text-red-500']}
@@ -33,7 +33,7 @@ export const BeaconComponent = ({ shape }: ShapeComponentProps<BeaconShape>) =>
33
33
  const value = input?.type === 'executed' ? input.value : false;
34
34
 
35
35
  return (
36
- <div className='flex w-full justify-center items-center'>
36
+ <div className='flex is-full justify-center items-center'>
37
37
  <Icon
38
38
  icon='ph--sun--regular'
39
39
  classNames={['transition opacity-20 duration-1000', isTruthy(value) && 'opacity-100 text-yellow-500']}
@@ -57,7 +57,7 @@ const defineShape = <S extends GateShape>({
57
57
  // Be careful not to name component factories with a capital letter.
58
58
  component: () => {
59
59
  return (
60
- <div className='flex w-full justify-center items-center'>
60
+ <div className='flex is-full justify-center items-center'>
61
61
  <Symbol />
62
62
  </div>
63
63
  );
@@ -95,7 +95,7 @@ const createSymbol =
95
95
  const paths = pathConstructor({ startX, endX, height });
96
96
 
97
97
  return (
98
- <svg viewBox={`0 0 ${width} ${height}`} className='w-full h-full'>
98
+ <svg viewBox={`0 0 ${width} ${height}`} className='is-full bs-full'>
99
99
  {/* Input line. */}
100
100
  {getAnchorPoints({ x: 0, y: centerY }, inputs).map(({ x, y }, i) => (
101
101
  <line key={i} x1={x} y1={y} x2={startX * 1.3} y2={y} strokeWidth={strokeWidth} className={className} />
@@ -7,7 +7,7 @@ import React, { useCallback, useRef } from 'react';
7
7
 
8
8
  import { AnyOutput, FunctionInput } from '@dxos/conductor';
9
9
  import { Ref, getSnapshot, isInstanceOf } from '@dxos/echo/internal';
10
- import { FunctionType, ScriptType } from '@dxos/functions';
10
+ import { Function, Script } from '@dxos/functions';
11
11
  import { useClient } from '@dxos/react-client';
12
12
  import { Filter, parseId } from '@dxos/react-client/echo';
13
13
  import {
@@ -58,13 +58,13 @@ const TextInputComponent = ({ shape, title, ...props }: TextInputComponentProps)
58
58
 
59
59
  const space = client.spaces.get(spaceId);
60
60
  const object = space?.db.getObjectById(objectId);
61
- if (!space || !isInstanceOf(ScriptType, object)) {
61
+ if (!space || !isInstanceOf(Script.Script, object)) {
62
62
  return;
63
63
  }
64
64
 
65
65
  const {
66
66
  objects: [fn],
67
- } = await space.db.query(Filter.type(FunctionType, { source: Ref.make(object) })).run();
67
+ } = await space.db.query(Filter.type(Function.Function, { source: Ref.make(object) })).run();
68
68
  if (!fn) {
69
69
  return;
70
70
  }
@@ -74,7 +74,7 @@ export const GptComponent = ({ shape }: ShapeComponentProps<GptShape>) => {
74
74
  return (
75
75
  <FunctionBody
76
76
  shape={shape}
77
- content={<div className='px-2 py-1 overflow-y-scroll'>{text}</div>}
77
+ content={<div className='pli-2 plb-1 overflow-y-auto'>{text}</div>}
78
78
  status={`${tokens} tokens`}
79
79
  inputSchema={meta.input}
80
80
  outputSchema={meta.output}
@@ -143,7 +143,7 @@ export const GptRealtimeComponent = ({ shape }: ShapeComponentProps<GptRealtimeS
143
143
  };
144
144
 
145
145
  return (
146
- <div className='flex w-full justify-center items-center'>
146
+ <div className='flex is-full justify-center items-center'>
147
147
  <Icon
148
148
  icon={isReady ? 'ph--waveform--regular' : isLive ? 'ph--pulse--regular' : 'ph--play--regular'}
149
149
  size={16}
@@ -42,9 +42,9 @@ export const QueueComponent = ({ shape }: ShapeComponentProps<QueueShape>) => {
42
42
 
43
43
  return (
44
44
  <Box shape={shape} status={`${items.length} items`} onAction={handleAction}>
45
- <div className='flex flex-col w-full overflow-y-scroll divide-y divide-separator'>
45
+ <div className='flex flex-col is-full overflow-y-auto divide-y divide-separator'>
46
46
  {[...items].map((item, i) => (
47
- <QueueItem key={i} classNames='p-1 px-2' item={item} />
47
+ <QueueItem key={i} classNames='p-1 pli-2' item={item} />
48
48
  ))}
49
49
  </div>
50
50
  </Box>
@@ -27,7 +27,11 @@ export type RandomShape = Schema.Schema.Type<typeof RandomShape>;
27
27
  export type CreateRandomProps = CreateShapeProps<RandomShape>;
28
28
 
29
29
  export const createRandom = (props: CreateRandomProps) =>
30
- createShape<RandomShape>({ type: 'rng', size: { width: 64, height: 64 }, ...props });
30
+ createShape<RandomShape>({
31
+ type: 'rng',
32
+ size: { width: 64, height: 64 },
33
+ ...props,
34
+ });
31
35
 
32
36
  const icons = [
33
37
  'ph--dice-one--regular',
@@ -39,7 +39,7 @@ export const ScopeComponent = ({ shape }: ShapeComponentProps<ScopeShape>) => {
39
39
  const { getAverage } = useAudioStream(active);
40
40
 
41
41
  return (
42
- <div className='flex w-full justify-center items-center bg-black'>
42
+ <div className='flex is-full justify-center items-center bg-black'>
43
43
  <Chaos active={active} getValue={getAverage} options={{ ...shaderPresets.heptapod, zoom: 1.2 }} />
44
44
  </div>
45
45
  );
@@ -5,7 +5,7 @@
5
5
  import * as Schema from 'effect/Schema';
6
6
  import React from 'react';
7
7
 
8
- import { Surface } from '@dxos/app-framework';
8
+ import { Surface } from '@dxos/app-framework/react';
9
9
  import { DEFAULT_INPUT } from '@dxos/conductor';
10
10
  import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
11
11
  import { createAnchorMap } from '@dxos/react-ui-canvas-editor';
@@ -27,7 +27,11 @@ export type SurfaceShape = Schema.Schema.Type<typeof SurfaceShape>;
27
27
  export type CreateSurfaceProps = CreateShapeProps<SurfaceShape>;
28
28
 
29
29
  export const createSurface = (props: CreateSurfaceProps) =>
30
- createShape<SurfaceShape>({ type: 'surface', size: { width: 384, height: 384 }, ...props });
30
+ createShape<SurfaceShape>({
31
+ type: 'surface',
32
+ size: { width: 384, height: 384 },
33
+ ...props,
34
+ });
31
35
 
32
36
  export const SurfaceComponent = ({ shape }: ShapeComponentProps<SurfaceShape>) => {
33
37
  const { runtime } = useComputeNodeState(shape);
@@ -36,7 +36,7 @@ export const SwitchComponent = ({ shape }: ShapeComponentProps<SwitchShape>) =>
36
36
  }, [value]);
37
37
 
38
38
  return (
39
- <div className='flex w-full justify-center items-center' onClick={(ev) => ev.stopPropagation()}>
39
+ <div className='flex is-full justify-center items-center' onClick={(ev) => ev.stopPropagation()}>
40
40
  <Input.Root>
41
41
  <Input.Switch checked={value} onCheckedChange={(value) => setValue(value)} />
42
42
  </Input.Root>
@@ -7,13 +7,13 @@ import React from 'react';
7
7
 
8
8
  import { createInputSchema, createOutputSchema } from '@dxos/conductor';
9
9
  import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
10
- import { DataType } from '@dxos/schema';
10
+ import { Message } from '@dxos/types';
11
11
 
12
12
  import { Box, createFunctionAnchors } from './common';
13
13
  import { ComputeShape, type CreateShapeProps, createShape } from './defs';
14
14
 
15
- const InputSchema = createInputSchema(DataType.Message);
16
- const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(DataType.Message)));
15
+ const InputSchema = createInputSchema(Message.Message);
16
+ const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(Message.Message)));
17
17
 
18
18
  export const TableShape = Schema.extend(
19
19
  ComputeShape,
@@ -9,13 +9,13 @@ import { createInputSchema, createOutputSchema } from '@dxos/conductor';
9
9
  import { type ThemedClassName } from '@dxos/react-ui';
10
10
  import { type ShapeComponentProps, type ShapeDef } from '@dxos/react-ui-canvas-editor';
11
11
  import { mx } from '@dxos/react-ui-theme';
12
- import { DataType } from '@dxos/schema';
12
+ import { Message } from '@dxos/types';
13
13
 
14
14
  import { Box, createFunctionAnchors } from './common';
15
15
  import { ComputeShape, type CreateShapeProps, createShape } from './defs';
16
16
 
17
- const InputSchema = createInputSchema(DataType.Message);
18
- const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(DataType.Message)));
17
+ const InputSchema = createInputSchema(Message.Message);
18
+ const OutputSchema = createOutputSchema(Schema.mutable(Schema.Array(Message.Message)));
19
19
 
20
20
  export const ThreadShape = Schema.extend(
21
21
  ComputeShape,
@@ -42,7 +42,7 @@ export const ThreadComponent = ({ shape }: ShapeComponentProps<ThreadShape>) =>
42
42
 
43
43
  return (
44
44
  <Box shape={shape}>
45
- <div ref={scrollRef} className='flex flex-col w-full overflow-y-scroll gap-2 p-2'>
45
+ <div ref={scrollRef} className='flex flex-col is-full overflow-y-auto gap-2 p-2'>
46
46
  {[...items].map((item, i) => (
47
47
  <ThreadItem key={i} item={item} />
48
48
  ))}
@@ -63,7 +63,7 @@ export const ThreadItem = ({ classNames, item }: ThemedClassName<{ item: any }>)
63
63
  <div className={mx('flex', classNames, role === 'user' && 'justify-end')}>
64
64
  <div
65
65
  className={mx(
66
- 'block rounded-md p-1 px-2 text-sm',
66
+ 'block rounded-md p-1 pli-2 text-sm',
67
67
  role === 'user'
68
68
  ? 'bg-blue-100 dark:bg-blue-800'
69
69
  : role === 'system'