@dxos/react-ui-canvas-compute 0.8.4-main.21d9917 → 0.8.4-main.2244d791bb

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.
@@ -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: 30,
647
+ L: 29,
648
648
  S: void 0,
649
649
  A: [
650
650
  "shape.type",
@@ -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("div", {
1487
- className: "pli-2 plb-1 overflow-y-auto"
1488
- }, text),
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("div", {
1662
- className: "flex flex-col is-full overflow-y-auto divide-y divide-separator"
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
1672
  classNames: "p-1 pli-2",
1668
1673
  item
1669
- }))));
1674
+ })))));
1670
1675
  };
1671
1676
  var QueueItem = ({ classNames, item }) => {
1672
1677
  if (typeof item !== "object") {
@@ -1818,7 +1823,7 @@ 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/react";
1826
+ import { Surface } from "@dxos/app-framework/ui";
1822
1827
  import { DEFAULT_INPUT as DEFAULT_INPUT6 } from "@dxos/conductor";
1823
1828
  import { createAnchorMap as createAnchorMap9 } from "@dxos/react-ui-canvas-editor";
1824
1829
  var SurfaceShape = Schema18.extend(ComputeShape, Schema18.Struct({
@@ -1844,7 +1849,7 @@ var SurfaceComponent = ({ shape }) => {
1844
1849
  return /* @__PURE__ */ React19.createElement(Box, {
1845
1850
  shape,
1846
1851
  onAction: handleAction
1847
- }, value !== null && /* @__PURE__ */ React19.createElement(Surface, {
1852
+ }, value !== null && /* @__PURE__ */ React19.createElement(Surface.Surface, {
1848
1853
  role: "card--extrinsic",
1849
1854
  data: {
1850
1855
  value
@@ -2072,6 +2077,7 @@ var textShape = {
2072
2077
  import * as Schema23 from "effect/Schema";
2073
2078
  import React24, { useEffect as useEffect7, useRef as useRef6 } from "react";
2074
2079
  import { createInputSchema as createInputSchema2, createOutputSchema as createOutputSchema2 } from "@dxos/conductor";
2080
+ import { ScrollArea as ScrollArea3 } from "@dxos/react-ui";
2075
2081
  import { Message as Message2 } from "@dxos/types";
2076
2082
  import { mx as mx3 } from "@dxos/ui-theme";
2077
2083
  var InputSchema2 = createInputSchema2(Message2.Message);
@@ -2099,19 +2105,22 @@ var ThreadComponent = ({ shape }) => {
2099
2105
  ]);
2100
2106
  return /* @__PURE__ */ React24.createElement(Box, {
2101
2107
  shape
2102
- }, /* @__PURE__ */ React24.createElement("div", {
2103
- ref: scrollRef,
2104
- className: "flex flex-col is-full overflow-y-auto gap-2 p-2"
2108
+ }, /* @__PURE__ */ React24.createElement(ScrollArea3.Root, {
2109
+ orientation: "vertical"
2110
+ }, /* @__PURE__ */ React24.createElement(ScrollArea3.Viewport, {
2111
+ classNames: "gap-2 p-2",
2112
+ ref: scrollRef
2105
2113
  }, [
2106
2114
  ...items
2107
2115
  ].map((item, i) => /* @__PURE__ */ React24.createElement(ThreadItem, {
2108
2116
  key: i,
2109
2117
  item
2110
- }))));
2118
+ })))));
2111
2119
  };
2112
2120
  var ThreadItem = ({ classNames, item }) => {
2113
2121
  if (typeof item !== "object") {
2114
2122
  return /* @__PURE__ */ React24.createElement("div", {
2123
+ role: "none",
2115
2124
  className: mx3(classNames)
2116
2125
  }, item);
2117
2126
  }