@dxos/react-ui-canvas-compute 0.8.4-main.72ec0f3 → 0.8.4-main.7ace549

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.
@@ -145,7 +145,7 @@ var useComputeNodeState = (shape) => {
145
145
  // src/hooks/useGraphMonitor.ts
146
146
  import { useMemo } from "react";
147
147
  import { ComputeGraphModel, DEFAULT_INPUT, DEFAULT_OUTPUT } from "@dxos/conductor";
148
- import { ObjectId, Ref } from "@dxos/echo/internal";
148
+ import { Obj, Ref } from "@dxos/echo";
149
149
  import { invariant as invariant2 } from "@dxos/invariant";
150
150
  import { getSpace } from "@dxos/react-client/echo";
151
151
  import { isNonNullable } from "@dxos/util";
@@ -172,7 +172,7 @@ var mapEdge = (graph, { source, target, output = DEFAULT_OUTPUT, input = DEFAULT
172
172
  ]
173
173
  });
174
174
  return {
175
- id: ObjectId.random(),
175
+ id: Obj.ID.random(),
176
176
  source: sourceNode.node,
177
177
  target: targetNode.node,
178
178
  output,
@@ -272,7 +272,7 @@ var deleteTriggerObjects = (computeGraph, deleted) => {
272
272
  // src/graph/node-defs.ts
273
273
  import { NODE_INPUT, NODE_OUTPUT, getTemplateInputSchema, registry } from "@dxos/conductor";
274
274
  import { raise as raise2 } from "@dxos/debug";
275
- import { ObjectId as ObjectId2, toJsonSchema } from "@dxos/echo/internal";
275
+ import { JsonSchema, Obj as Obj2 } from "@dxos/echo";
276
276
  import { invariant as invariant3 } from "@dxos/invariant";
277
277
  var __dxlog_file3 = "/__w/dxos/dxos/packages/ui/react-ui-canvas-compute/src/graph/node-defs.ts";
278
278
  var resolveComputeNode = async (node) => {
@@ -332,7 +332,7 @@ var nodeFactory = {
332
332
  valueType: shape.valueType,
333
333
  value: shape.text
334
334
  });
335
- node.inputSchema = toJsonSchema(getTemplateInputSchema(node));
335
+ node.inputSchema = JsonSchema.toJsonSchema(getTemplateInputSchema(node));
336
336
  return node;
337
337
  },
338
338
  ["text"]: () => createNode("text"),
@@ -340,7 +340,7 @@ var nodeFactory = {
340
340
  ["trigger"]: () => createNode(NODE_INPUT)
341
341
  };
342
342
  var createNode = (type, props) => ({
343
- id: ObjectId2.random(),
343
+ id: Obj2.ID.random(),
344
344
  type,
345
345
  ...props
346
346
  });
@@ -712,7 +712,7 @@ import { createAnchors, getParentShapeElement, rowHeight } from "@dxos/react-ui-
712
712
  import * as Schema2 from "effect/Schema";
713
713
  import * as SchemaAST from "effect/SchemaAST";
714
714
  import { DEFAULT_INPUT as DEFAULT_INPUT2, DEFAULT_OUTPUT as DEFAULT_OUTPUT2 } from "@dxos/conductor";
715
- import { ObjectId as ObjectId3 } from "@dxos/echo/internal";
715
+ import { Obj as Obj3 } from "@dxos/echo";
716
716
  import { Polygon } from "@dxos/react-ui-canvas-editor";
717
717
  var getProperties = (ast) => SchemaAST.getPropertySignatures(ast).map(({ name }) => ({
718
718
  name: name.toString()
@@ -730,13 +730,13 @@ var parseAnchorId = (id) => {
730
730
  };
731
731
  var ComputeShape = Schema2.extend(Polygon, Schema2.Struct({
732
732
  // TODO(burdon): Rename computeNode?
733
- node: Schema2.optional(ObjectId3.annotations({
733
+ node: Schema2.optional(Obj3.ID.annotations({
734
734
  description: "Compute node id"
735
735
  }))
736
736
  }).pipe(Schema2.mutable));
737
737
  var createShape = ({ id, ...rest }) => {
738
738
  return {
739
- id: id ?? ObjectId3.random(),
739
+ id: id ?? Obj3.ID.random(),
740
740
  ...rest
741
741
  };
742
742
  };
@@ -2084,7 +2084,7 @@ import { useSignals as _useSignals21 } from "@preact-signals/safe-react/tracking
2084
2084
  import * as Schema21 from "effect/Schema";
2085
2085
  import React22, { useRef as useRef5 } from "react";
2086
2086
  import { ComputeValueType as ComputeValueType3, TemplateOutput, VoidInput as VoidInput2, getTemplateInputSchema as getTemplateInputSchema2 } from "@dxos/conductor";
2087
- import { toJsonSchema as toJsonSchema2 } from "@dxos/echo/internal";
2087
+ import { toJsonSchema } from "@dxos/echo/internal";
2088
2088
  import { invariant as invariant5 } from "@dxos/invariant";
2089
2089
  import { TextBox as TextBox4 } from "@dxos/react-ui-canvas-editor";
2090
2090
  var __dxlog_file6 = "/__w/dxos/dxos/packages/ui/react-ui-canvas-compute/src/shapes/Template.tsx";
@@ -2102,7 +2102,7 @@ var TextInputComponent3 = ({ shape, title, ...props }) => {
2102
2102
  if (value.length) {
2103
2103
  const schema = getTemplateInputSchema2(node);
2104
2104
  node.value = value;
2105
- node.inputSchema = toJsonSchema2(schema);
2105
+ node.inputSchema = toJsonSchema(schema);
2106
2106
  }
2107
2107
  };
2108
2108
  const handleTypeChange = (newType) => {
@@ -2116,7 +2116,7 @@ var TextInputComponent3 = ({ shape, title, ...props }) => {
2116
2116
  ]
2117
2117
  });
2118
2118
  node.valueType = newType;
2119
- node.inputSchema = toJsonSchema2(getTemplateInputSchema2(node));
2119
+ node.inputSchema = toJsonSchema(getTemplateInputSchema2(node));
2120
2120
  };
2121
2121
  return /* @__PURE__ */ React22.createElement(Box, {
2122
2122
  shape,
@@ -2332,15 +2332,14 @@ import { useSignals as _useSignals25 } from "@preact-signals/safe-react/tracking
2332
2332
  import * as Schema25 from "effect/Schema";
2333
2333
  import React26, { useEffect as useEffect8 } from "react";
2334
2334
  import { VoidInput as VoidInput3 } from "@dxos/conductor";
2335
- import { Filter as Filter2, Query } from "@dxos/echo";
2336
- import { ObjectId as ObjectId4, Ref as Ref3 } from "@dxos/echo/internal";
2335
+ import { Filter as Filter2, Obj as Obj4, Query, Ref as Ref3, Type } from "@dxos/echo";
2337
2336
  import { Trigger, TriggerEvent } from "@dxos/functions";
2338
2337
  import { DXN, SpaceId } from "@dxos/keys";
2339
2338
  import { useSpace } from "@dxos/react-client/echo";
2340
2339
  import { Select as Select2 } from "@dxos/react-ui";
2341
2340
  var TriggerShape = Schema25.extend(ComputeShape, Schema25.Struct({
2342
2341
  type: Schema25.Literal("trigger"),
2343
- functionTrigger: Schema25.optional(Ref3(Trigger.Trigger))
2342
+ functionTrigger: Schema25.optional(Type.Ref(Trigger.Trigger))
2344
2343
  }));
2345
2344
  var createTrigger = (props) => {
2346
2345
  const functionTrigger = Trigger.make({
@@ -2447,7 +2446,7 @@ var createTriggerSpec = (props) => {
2447
2446
  const dxn = new DXN(DXN.kind.QUEUE, [
2448
2447
  "data",
2449
2448
  props.spaceId ?? SpaceId.random(),
2450
- ObjectId4.random()
2449
+ Obj4.ID.random()
2451
2450
  ]).toString();
2452
2451
  return {
2453
2452
  kind: "queue",