@reopt-ai/opt-devtool 1.0.0 → 1.0.2

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 (55) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +11 -2
  3. package/dist/brandapp/index.cjs +457 -363
  4. package/dist/brandapp/index.d.cts +80 -81
  5. package/dist/brandapp/index.d.ts +80 -81
  6. package/dist/brandapp/index.js +451 -361
  7. package/dist/datagrid/index.cjs +170 -180
  8. package/dist/datagrid/index.d.cts +9 -11
  9. package/dist/datagrid/index.d.ts +9 -11
  10. package/dist/datagrid/index.js +167 -179
  11. package/dist/editor/index.cjs +209 -228
  12. package/dist/editor/index.d.cts +9 -11
  13. package/dist/editor/index.d.ts +9 -11
  14. package/dist/editor/index.js +206 -227
  15. package/dist/harness/index.cjs +5 -12
  16. package/dist/harness/index.d.cts +14 -16
  17. package/dist/harness/index.d.ts +14 -16
  18. package/dist/harness/index.js +1 -11
  19. package/dist/harness-CJZXBH3w.js +528 -0
  20. package/dist/harness-CPOp9Wlj.cjs +582 -0
  21. package/dist/index.cjs +3619 -3782
  22. package/dist/index.d.cts +9 -17
  23. package/dist/index.d.ts +9 -17
  24. package/dist/index.js +3611 -3781
  25. package/dist/provider-Cjg2rSYG.js +110 -0
  26. package/dist/provider-H53ZWHCo.cjs +161 -0
  27. package/dist/theme/index.cjs +298 -12
  28. package/dist/theme/index.d.cts +26 -28
  29. package/dist/theme/index.d.ts +26 -28
  30. package/dist/theme/index.js +294 -11
  31. package/dist/theme-isolate-BOo3J259.js +42 -0
  32. package/dist/theme-isolate-D9AMkYrD.cjs +53 -0
  33. package/dist/types-BKmW0EBr.js +4 -0
  34. package/dist/types-Bz4DijhU.cjs +9 -0
  35. package/dist/types-D_lNT2Nr.d.cts +91 -0
  36. package/dist/types-D_lNT2Nr.d.ts +91 -0
  37. package/dist/ui/index.cjs +4 -8
  38. package/dist/ui/index.d.cts +3 -2
  39. package/dist/ui/index.d.ts +3 -2
  40. package/dist/ui/index.js +1 -7
  41. package/package.json +4 -4
  42. package/dist/chunk-4MJKIAXH.cjs +0 -65
  43. package/dist/chunk-5HRIQSVF.js +0 -32
  44. package/dist/chunk-6AGUYGVT.cjs +0 -77
  45. package/dist/chunk-EQPETYJJ.cjs +0 -32
  46. package/dist/chunk-H3F2WACS.cjs +0 -568
  47. package/dist/chunk-N7YO56TN.cjs +0 -25
  48. package/dist/chunk-SQ3E3QLA.cjs +0 -253
  49. package/dist/chunk-SW2FF6EV.js +0 -568
  50. package/dist/chunk-UJSIQF3A.js +0 -25
  51. package/dist/chunk-UQY5I3WS.js +0 -253
  52. package/dist/chunk-YCYIUFB4.js +0 -65
  53. package/dist/chunk-Z2KFRHSI.js +0 -77
  54. package/dist/index-Bakx4o8Z.d.cts +0 -91
  55. package/dist/index-Bakx4o8Z.d.ts +0 -91
@@ -1,239 +1,218 @@
1
1
  "use client";
2
2
  "use client";
3
- import {
4
- useOptDevtoolPlugin
5
- } from "../chunk-Z2KFRHSI.js";
6
- import "../chunk-UJSIQF3A.js";
7
-
8
- // src/editor/index.tsx
3
+ import { n as useOptDevtoolPlugin } from "../provider-Cjg2rSYG.js";
9
4
  import * as React from "react";
10
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
- function StatusDot({
12
- active,
13
- label,
14
- activeClassName = "bg-emerald-400"
15
- }) {
16
- return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1", children: [
17
- /* @__PURE__ */ jsx(
18
- "span",
19
- {
20
- className: `inline-block h-1.5 w-1.5 rounded-full ${active ? activeClassName : "bg-white/20"}`
21
- }
22
- ),
23
- label
24
- ] });
6
+ // src/editor/index.tsx
7
+ function StatusDot({ active, label, activeClassName = "bg-emerald-400" }) {
8
+ return /* @__PURE__ */ jsxs("span", {
9
+ className: "inline-flex items-center gap-1",
10
+ children: [/* @__PURE__ */ jsx("span", { className: `inline-block h-1.5 w-1.5 rounded-full ${active ? activeClassName : "bg-white/20"}` }), label]
11
+ });
25
12
  }
26
13
  function ModeBadge({ mode }) {
27
- const classesByMode = {
28
- edit: "bg-emerald-900/50 text-emerald-300",
29
- stream: "bg-white/10 text-white/50",
30
- diff: "bg-amber-900/50 text-amber-300"
31
- };
32
- return /* @__PURE__ */ jsx(
33
- "span",
34
- {
35
- className: `inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium ${classesByMode[mode]}`,
36
- children: mode
37
- }
38
- );
14
+ return /* @__PURE__ */ jsx("span", {
15
+ className: `inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium ${{
16
+ edit: "bg-emerald-900/50 text-emerald-300",
17
+ stream: "bg-white/10 text-white/50",
18
+ diff: "bg-amber-900/50 text-amber-300"
19
+ }[mode]}`,
20
+ children: mode
21
+ });
39
22
  }
40
23
  function StreamBadge({ status }) {
41
- if (!status) {
42
- return /* @__PURE__ */ jsx("span", { className: "inline-flex items-center rounded bg-white/10 px-1.5 py-0.5 text-[9px] text-white/40", children: "N/A" });
43
- }
44
- const styles = {
45
- idle: "bg-white/10 text-white/50",
46
- streaming: "animate-pulse bg-emerald-900/50 text-emerald-300",
47
- done: "bg-emerald-900/50 text-emerald-300",
48
- error: "bg-red-900/50 text-red-300"
49
- };
50
- return /* @__PURE__ */ jsx(
51
- "span",
52
- {
53
- className: `inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium ${styles[status]}`,
54
- children: status
55
- }
56
- );
24
+ if (!status) return /* @__PURE__ */ jsx("span", {
25
+ className: "inline-flex items-center rounded bg-white/10 px-1.5 py-0.5 text-[9px] text-white/40",
26
+ children: "N/A"
27
+ });
28
+ return /* @__PURE__ */ jsx("span", {
29
+ className: `inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium ${{
30
+ idle: "bg-white/10 text-white/50",
31
+ streaming: "animate-pulse bg-emerald-900/50 text-emerald-300",
32
+ done: "bg-emerald-900/50 text-emerald-300",
33
+ error: "bg-red-900/50 text-red-300"
34
+ }[status]}`,
35
+ children: status
36
+ });
57
37
  }
58
- function ChipList({
59
- items,
60
- emptyLabel
61
- }) {
62
- if (items.length === 0) {
63
- return /* @__PURE__ */ jsx("span", { children: emptyLabel });
64
- }
65
- return /* @__PURE__ */ jsx(Fragment, { children: items.map((item) => /* @__PURE__ */ jsx(
66
- "span",
67
- {
68
- className: "rounded border border-white/10 px-1.5 py-0.5",
69
- children: item
70
- },
71
- item
72
- )) });
38
+ function ChipList({ items, emptyLabel }) {
39
+ if (items.length === 0) return /* @__PURE__ */ jsx("span", { children: emptyLabel });
40
+ return /* @__PURE__ */ jsx(Fragment, { children: items.map((item) => /* @__PURE__ */ jsx("span", {
41
+ className: "rounded border border-white/10 px-1.5 py-0.5",
42
+ children: item
43
+ }, item)) });
73
44
  }
74
- function EditorDevtoolPanel({
75
- snapshot,
76
- streamStatus
77
- }) {
78
- var _a, _b, _c, _d, _e, _f;
79
- if (!snapshot) {
80
- return /* @__PURE__ */ jsx("div", { className: "text-[11px] text-white/55", children: "Waiting for Editor snapshot." });
81
- }
82
- const selectedBlockIds = (_a = snapshot.selectedBlockIds) != null ? _a : [];
83
- const selectedBlockTypes = (_b = snapshot.selectedBlockTypes) != null ? _b : [];
84
- const selectedBlockCount = (_c = snapshot.selectedBlockCount) != null ? _c : snapshot.selectedBlockId ? 1 : selectedBlockIds.length;
85
- const features = snapshot.features;
86
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 text-[11px]", children: [
87
- /* @__PURE__ */ jsxs("section", { children: [
88
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] font-semibold text-emerald-400", children: "Runtime" }),
89
- /* @__PURE__ */ jsxs("div", { className: "grid gap-1.5 text-white/70 md:grid-cols-2", children: [
90
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
91
- "Mode: ",
92
- /* @__PURE__ */ jsx(ModeBadge, { mode: snapshot.mode })
93
- ] }),
94
- /* @__PURE__ */ jsxs("div", { children: [
95
- "Spec version: v",
96
- (_d = snapshot.specVersion) != null ? _d : "?"
97
- ] }),
98
- /* @__PURE__ */ jsxs("div", { children: [
99
- "Selected block: ",
100
- (_e = snapshot.selectedBlockId) != null ? _e : "None"
101
- ] }),
102
- /* @__PURE__ */ jsxs("div", { children: [
103
- "Roots: ",
104
- snapshot.rootCount
105
- ] }),
106
- /* @__PURE__ */ jsxs("div", { children: [
107
- "Elements: ",
108
- snapshot.elementCount
109
- ] }),
110
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
111
- /* @__PURE__ */ jsx(StatusDot, { active: snapshot.canUndo, label: "Undo" }),
112
- /* @__PURE__ */ jsx(StatusDot, { active: snapshot.canRedo, label: "Redo" })
113
- ] }),
114
- /* @__PURE__ */ jsxs("div", { children: [
115
- "Focus target:",
116
- " ",
117
- snapshot.focusTarget ? `${snapshot.focusTarget.blockId}${snapshot.focusTarget.offset !== void 0 ? ` @${snapshot.focusTarget.offset}` : ""}` : "None"
118
- ] }),
119
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
120
- "Stream: ",
121
- /* @__PURE__ */ jsx(StreamBadge, { status: streamStatus })
122
- ] }),
123
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(
124
- StatusDot,
125
- {
126
- active: !!snapshot.externalStreaming,
127
- activeClassName: "animate-pulse bg-emerald-400",
128
- label: snapshot.externalStreaming ? "External stream" : "Local updates"
129
- }
130
- ) })
131
- ] })
132
- ] }),
133
- /* @__PURE__ */ jsxs("section", { children: [
134
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] font-semibold text-emerald-400", children: "Selection" }),
135
- /* @__PURE__ */ jsxs("div", { className: "grid gap-1.5 text-white/70 md:grid-cols-2", children: [
136
- /* @__PURE__ */ jsxs("div", { children: [
137
- "Selected blocks: ",
138
- selectedBlockCount
139
- ] }),
140
- /* @__PURE__ */ jsxs("div", { children: [
141
- "State keys: ",
142
- (_f = snapshot.stateKeyCount) != null ? _f : 0
143
- ] }),
144
- /* @__PURE__ */ jsxs("div", { className: "md:col-span-2", children: [
145
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] text-white/45", children: "IDs" }),
146
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 text-white/75", children: /* @__PURE__ */ jsx(
147
- ChipList,
148
- {
149
- items: selectedBlockIds,
150
- emptyLabel: "No block selection."
151
- }
152
- ) })
153
- ] }),
154
- /* @__PURE__ */ jsxs("div", { className: "md:col-span-2", children: [
155
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] text-white/45", children: "Types" }),
156
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 text-white/75", children: /* @__PURE__ */ jsx(
157
- ChipList,
158
- {
159
- items: selectedBlockTypes,
160
- emptyLabel: "No block types."
161
- }
162
- ) })
163
- ] })
164
- ] })
165
- ] }),
166
- /* @__PURE__ */ jsxs("section", { children: [
167
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] font-semibold text-emerald-400", children: "Integrations" }),
168
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-3 gap-y-1.5 text-white/70", children: [
169
- /* @__PURE__ */ jsx(StatusDot, { active: !!(features == null ? void 0 : features.stateStore), label: "State store" }),
170
- /* @__PURE__ */ jsx(
171
- StatusDot,
172
- {
173
- active: !!(features == null ? void 0 : features.actionRegistry),
174
- label: "Action registry"
175
- }
176
- ),
177
- /* @__PURE__ */ jsx(StatusDot, { active: !!(features == null ? void 0 : features.aiRequest), label: "AI request" }),
178
- /* @__PURE__ */ jsx(StatusDot, { active: !!(features == null ? void 0 : features.ghostText), label: "Ghost text" }),
179
- /* @__PURE__ */ jsx(
180
- StatusDot,
181
- {
182
- active: !!(features == null ? void 0 : features.highlightCode),
183
- label: "Code highlight"
184
- }
185
- ),
186
- /* @__PURE__ */ jsx(StatusDot, { active: !!(features == null ? void 0 : features.fileUpload), label: "File upload" }),
187
- /* @__PURE__ */ jsx(StatusDot, { active: !!(features == null ? void 0 : features.imageBrowse), label: "Image browse" }),
188
- /* @__PURE__ */ jsx(
189
- StatusDot,
190
- {
191
- active: !!(features == null ? void 0 : features.imageGenerate),
192
- label: "Image generate"
193
- }
194
- ),
195
- /* @__PURE__ */ jsx(StatusDot, { active: !!(features == null ? void 0 : features.imageEdit), label: "Image edit" })
196
- ] })
197
- ] }),
198
- /* @__PURE__ */ jsxs("section", { children: [
199
- /* @__PURE__ */ jsx("p", { className: "mb-1 text-[10px] font-semibold text-emerald-400", children: "Last changed IDs" }),
200
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 text-white/75", children: /* @__PURE__ */ jsx(
201
- ChipList,
202
- {
203
- items: snapshot.lastChangedIds,
204
- emptyLabel: "No pending changes."
205
- }
206
- ) })
207
- ] })
208
- ] });
45
+ function EditorDevtoolPanel({ snapshot, streamStatus }) {
46
+ var _snapshot$selectedBlo, _snapshot$selectedBlo2, _snapshot$selectedBlo3, _snapshot$specVersion, _snapshot$selectedBlo4, _snapshot$stateKeyCou;
47
+ if (!snapshot) return /* @__PURE__ */ jsx("div", {
48
+ className: "text-[11px] text-white/55",
49
+ children: "Waiting for Editor snapshot."
50
+ });
51
+ const selectedBlockIds = (_snapshot$selectedBlo = snapshot.selectedBlockIds) !== null && _snapshot$selectedBlo !== void 0 ? _snapshot$selectedBlo : [];
52
+ const selectedBlockTypes = (_snapshot$selectedBlo2 = snapshot.selectedBlockTypes) !== null && _snapshot$selectedBlo2 !== void 0 ? _snapshot$selectedBlo2 : [];
53
+ const selectedBlockCount = (_snapshot$selectedBlo3 = snapshot.selectedBlockCount) !== null && _snapshot$selectedBlo3 !== void 0 ? _snapshot$selectedBlo3 : snapshot.selectedBlockId ? 1 : selectedBlockIds.length;
54
+ const features = snapshot.features;
55
+ return /* @__PURE__ */ jsxs("div", {
56
+ className: "flex flex-col gap-3 text-[11px]",
57
+ children: [
58
+ /* @__PURE__ */ jsxs("section", { children: [/* @__PURE__ */ jsx("p", {
59
+ className: "mb-1 text-[10px] font-semibold text-emerald-400",
60
+ children: "Runtime"
61
+ }), /* @__PURE__ */ jsxs("div", {
62
+ className: "grid gap-1.5 text-white/70 md:grid-cols-2",
63
+ children: [
64
+ /* @__PURE__ */ jsxs("div", {
65
+ className: "flex items-center gap-1.5",
66
+ children: ["Mode: ", /* @__PURE__ */ jsx(ModeBadge, { mode: snapshot.mode })]
67
+ }),
68
+ /* @__PURE__ */ jsxs("div", { children: ["Spec version: v", (_snapshot$specVersion = snapshot.specVersion) !== null && _snapshot$specVersion !== void 0 ? _snapshot$specVersion : "?"] }),
69
+ /* @__PURE__ */ jsxs("div", { children: ["Selected block: ", (_snapshot$selectedBlo4 = snapshot.selectedBlockId) !== null && _snapshot$selectedBlo4 !== void 0 ? _snapshot$selectedBlo4 : "None"] }),
70
+ /* @__PURE__ */ jsxs("div", { children: ["Roots: ", snapshot.rootCount] }),
71
+ /* @__PURE__ */ jsxs("div", { children: ["Elements: ", snapshot.elementCount] }),
72
+ /* @__PURE__ */ jsxs("div", {
73
+ className: "flex items-center gap-2",
74
+ children: [/* @__PURE__ */ jsx(StatusDot, {
75
+ active: snapshot.canUndo,
76
+ label: "Undo"
77
+ }), /* @__PURE__ */ jsx(StatusDot, {
78
+ active: snapshot.canRedo,
79
+ label: "Redo"
80
+ })]
81
+ }),
82
+ /* @__PURE__ */ jsxs("div", { children: [
83
+ "Focus target:",
84
+ " ",
85
+ snapshot.focusTarget ? `${snapshot.focusTarget.blockId}${snapshot.focusTarget.offset !== void 0 ? ` @${snapshot.focusTarget.offset}` : ""}` : "None"
86
+ ] }),
87
+ /* @__PURE__ */ jsxs("div", {
88
+ className: "flex items-center gap-1.5",
89
+ children: ["Stream: ", /* @__PURE__ */ jsx(StreamBadge, { status: streamStatus })]
90
+ }),
91
+ /* @__PURE__ */ jsx("div", {
92
+ className: "flex items-center gap-2",
93
+ children: /* @__PURE__ */ jsx(StatusDot, {
94
+ active: !!snapshot.externalStreaming,
95
+ activeClassName: "animate-pulse bg-emerald-400",
96
+ label: snapshot.externalStreaming ? "External stream" : "Local updates"
97
+ })
98
+ })
99
+ ]
100
+ })] }),
101
+ /* @__PURE__ */ jsxs("section", { children: [/* @__PURE__ */ jsx("p", {
102
+ className: "mb-1 text-[10px] font-semibold text-emerald-400",
103
+ children: "Selection"
104
+ }), /* @__PURE__ */ jsxs("div", {
105
+ className: "grid gap-1.5 text-white/70 md:grid-cols-2",
106
+ children: [
107
+ /* @__PURE__ */ jsxs("div", { children: ["Selected blocks: ", selectedBlockCount] }),
108
+ /* @__PURE__ */ jsxs("div", { children: ["State keys: ", (_snapshot$stateKeyCou = snapshot.stateKeyCount) !== null && _snapshot$stateKeyCou !== void 0 ? _snapshot$stateKeyCou : 0] }),
109
+ /* @__PURE__ */ jsxs("div", {
110
+ className: "md:col-span-2",
111
+ children: [/* @__PURE__ */ jsx("p", {
112
+ className: "mb-1 text-[10px] text-white/45",
113
+ children: "IDs"
114
+ }), /* @__PURE__ */ jsx("div", {
115
+ className: "flex flex-wrap gap-1.5 text-white/75",
116
+ children: /* @__PURE__ */ jsx(ChipList, {
117
+ items: selectedBlockIds,
118
+ emptyLabel: "No block selection."
119
+ })
120
+ })]
121
+ }),
122
+ /* @__PURE__ */ jsxs("div", {
123
+ className: "md:col-span-2",
124
+ children: [/* @__PURE__ */ jsx("p", {
125
+ className: "mb-1 text-[10px] text-white/45",
126
+ children: "Types"
127
+ }), /* @__PURE__ */ jsx("div", {
128
+ className: "flex flex-wrap gap-1.5 text-white/75",
129
+ children: /* @__PURE__ */ jsx(ChipList, {
130
+ items: selectedBlockTypes,
131
+ emptyLabel: "No block types."
132
+ })
133
+ })]
134
+ })
135
+ ]
136
+ })] }),
137
+ /* @__PURE__ */ jsxs("section", { children: [/* @__PURE__ */ jsx("p", {
138
+ className: "mb-1 text-[10px] font-semibold text-emerald-400",
139
+ children: "Integrations"
140
+ }), /* @__PURE__ */ jsxs("div", {
141
+ className: "flex flex-wrap gap-x-3 gap-y-1.5 text-white/70",
142
+ children: [
143
+ /* @__PURE__ */ jsx(StatusDot, {
144
+ active: !!(features === null || features === void 0 ? void 0 : features.stateStore),
145
+ label: "State store"
146
+ }),
147
+ /* @__PURE__ */ jsx(StatusDot, {
148
+ active: !!(features === null || features === void 0 ? void 0 : features.actionRegistry),
149
+ label: "Action registry"
150
+ }),
151
+ /* @__PURE__ */ jsx(StatusDot, {
152
+ active: !!(features === null || features === void 0 ? void 0 : features.aiRequest),
153
+ label: "AI request"
154
+ }),
155
+ /* @__PURE__ */ jsx(StatusDot, {
156
+ active: !!(features === null || features === void 0 ? void 0 : features.ghostText),
157
+ label: "Ghost text"
158
+ }),
159
+ /* @__PURE__ */ jsx(StatusDot, {
160
+ active: !!(features === null || features === void 0 ? void 0 : features.highlightCode),
161
+ label: "Code highlight"
162
+ }),
163
+ /* @__PURE__ */ jsx(StatusDot, {
164
+ active: !!(features === null || features === void 0 ? void 0 : features.fileUpload),
165
+ label: "File upload"
166
+ }),
167
+ /* @__PURE__ */ jsx(StatusDot, {
168
+ active: !!(features === null || features === void 0 ? void 0 : features.imageBrowse),
169
+ label: "Image browse"
170
+ }),
171
+ /* @__PURE__ */ jsx(StatusDot, {
172
+ active: !!(features === null || features === void 0 ? void 0 : features.imageGenerate),
173
+ label: "Image generate"
174
+ }),
175
+ /* @__PURE__ */ jsx(StatusDot, {
176
+ active: !!(features === null || features === void 0 ? void 0 : features.imageEdit),
177
+ label: "Image edit"
178
+ })
179
+ ]
180
+ })] }),
181
+ /* @__PURE__ */ jsxs("section", { children: [/* @__PURE__ */ jsx("p", {
182
+ className: "mb-1 text-[10px] font-semibold text-emerald-400",
183
+ children: "Last changed IDs"
184
+ }), /* @__PURE__ */ jsx("div", {
185
+ className: "flex flex-wrap gap-1.5 text-white/75",
186
+ children: /* @__PURE__ */ jsx(ChipList, {
187
+ items: snapshot.lastChangedIds,
188
+ emptyLabel: "No pending changes."
189
+ })
190
+ })] })
191
+ ]
192
+ });
209
193
  }
210
- function useEditorDevtoolBridge({
211
- id,
212
- label,
213
- order = 30,
214
- streamStatus
215
- }) {
216
- const [snapshot, setSnapshot] = React.useState(
217
- null
218
- );
219
- const inspect = React.useCallback((nextSnapshot) => {
220
- setSnapshot(nextSnapshot);
221
- }, []);
222
- const plugin = React.useMemo(
223
- () => ({
224
- id,
225
- label,
226
- order,
227
- tab: "editor",
228
- renderPanel: () => /* @__PURE__ */ jsx(EditorDevtoolPanel, { snapshot, streamStatus })
229
- }),
230
- [id, label, order, snapshot, streamStatus]
231
- );
232
- useOptDevtoolPlugin(plugin);
233
- return {
234
- inspect
235
- };
194
+ function useEditorDevtoolBridge({ id, label, order = 30, streamStatus }) {
195
+ const [snapshot, setSnapshot] = React.useState(null);
196
+ const inspect = React.useCallback((nextSnapshot) => {
197
+ setSnapshot(nextSnapshot);
198
+ }, []);
199
+ const plugin = React.useMemo(() => ({
200
+ id,
201
+ label,
202
+ order,
203
+ tab: "editor",
204
+ renderPanel: () => /* @__PURE__ */ jsx(EditorDevtoolPanel, {
205
+ snapshot,
206
+ streamStatus
207
+ })
208
+ }), [
209
+ id,
210
+ label,
211
+ order,
212
+ snapshot,
213
+ streamStatus
214
+ ]);
215
+ useOptDevtoolPlugin(plugin);
216
+ return { inspect };
236
217
  }
237
- export {
238
- useEditorDevtoolBridge
239
- };
218
+ export { useEditorDevtoolBridge };
@@ -1,13 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
2
1
  "use client";
3
-
4
-
5
-
6
- var _chunkH3F2WACScjs = require('../chunk-H3F2WACS.cjs');
7
- require('../chunk-EQPETYJJ.cjs');
8
- require('../chunk-6AGUYGVT.cjs');
9
- require('../chunk-N7YO56TN.cjs');
10
-
11
-
12
-
13
- exports.ShellOverlay = _chunkH3F2WACScjs.ShellOverlay; exports.useShellDevtoolBridge = _chunkH3F2WACScjs.useShellDevtoolBridge;
2
+ "use client";
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
+ const require_harness = require("../harness-CPOp9Wlj.cjs");
5
+ exports.ShellOverlay = require_harness.ShellOverlay;
6
+ exports.useShellDevtoolBridge = require_harness.useShellDevtoolBridge;
@@ -1,19 +1,19 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ShellDevtoolSnapshot } from '@reopt-ai/opt-shell';
3
1
 
4
- interface UseShellDevtoolBridgeOptions {
5
- id: string;
6
- label: string;
7
- order?: number;
8
- /** URL to the harness manager UI (e.g. "/builder/shells"). Shown as a link in the panel. */
9
- managerHref?: string;
2
+ import * as React from "react";
3
+ import { ShellDevtoolSnapshot } from "@reopt-ai/opt-shell";
4
+ export interface UseShellDevtoolBridgeOptions {
5
+ id: string;
6
+ label: string;
7
+ order?: number;
8
+ /** URL to the harness manager UI (e.g. "/builder/shells"). Shown as a link in the panel. */
9
+ managerHref?: string;
10
10
  }
11
- interface RegisteredShellDevtoolBridge {
12
- inspect: (snapshot: ShellDevtoolSnapshot) => void;
11
+ export interface RegisteredShellDevtoolBridge {
12
+ inspect: (snapshot: ShellDevtoolSnapshot) => void;
13
13
  }
14
- declare function ShellOverlay({ snapshot, }: {
15
- snapshot: ShellDevtoolSnapshot | null;
16
- }): react_jsx_runtime.JSX.Element | null;
14
+ export declare function ShellOverlay({ snapshot }: {
15
+ snapshot: ShellDevtoolSnapshot | null;
16
+ }): React.JSX.Element | null;
17
17
  /**
18
18
  * Register the harness devtool bridge.
19
19
  *
@@ -25,6 +25,4 @@ declare function ShellOverlay({ snapshot, }: {
25
25
  * different tab. The other bridges only render inside their tab and so can
26
26
  * keep their snapshot fully local.
27
27
  */
28
- declare function useShellDevtoolBridge({ id, label, order, managerHref, }: UseShellDevtoolBridgeOptions): RegisteredShellDevtoolBridge;
29
-
30
- export { type RegisteredShellDevtoolBridge, ShellOverlay, type UseShellDevtoolBridgeOptions, useShellDevtoolBridge };
28
+ export declare function useShellDevtoolBridge({ id, label, order, managerHref }: UseShellDevtoolBridgeOptions): RegisteredShellDevtoolBridge;
@@ -1,19 +1,19 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ShellDevtoolSnapshot } from '@reopt-ai/opt-shell';
3
1
 
4
- interface UseShellDevtoolBridgeOptions {
5
- id: string;
6
- label: string;
7
- order?: number;
8
- /** URL to the harness manager UI (e.g. "/builder/shells"). Shown as a link in the panel. */
9
- managerHref?: string;
2
+ import * as React from "react";
3
+ import { ShellDevtoolSnapshot } from "@reopt-ai/opt-shell";
4
+ export interface UseShellDevtoolBridgeOptions {
5
+ id: string;
6
+ label: string;
7
+ order?: number;
8
+ /** URL to the harness manager UI (e.g. "/builder/shells"). Shown as a link in the panel. */
9
+ managerHref?: string;
10
10
  }
11
- interface RegisteredShellDevtoolBridge {
12
- inspect: (snapshot: ShellDevtoolSnapshot) => void;
11
+ export interface RegisteredShellDevtoolBridge {
12
+ inspect: (snapshot: ShellDevtoolSnapshot) => void;
13
13
  }
14
- declare function ShellOverlay({ snapshot, }: {
15
- snapshot: ShellDevtoolSnapshot | null;
16
- }): react_jsx_runtime.JSX.Element | null;
14
+ export declare function ShellOverlay({ snapshot }: {
15
+ snapshot: ShellDevtoolSnapshot | null;
16
+ }): React.JSX.Element | null;
17
17
  /**
18
18
  * Register the harness devtool bridge.
19
19
  *
@@ -25,6 +25,4 @@ declare function ShellOverlay({ snapshot, }: {
25
25
  * different tab. The other bridges only render inside their tab and so can
26
26
  * keep their snapshot fully local.
27
27
  */
28
- declare function useShellDevtoolBridge({ id, label, order, managerHref, }: UseShellDevtoolBridgeOptions): RegisteredShellDevtoolBridge;
29
-
30
- export { type RegisteredShellDevtoolBridge, ShellOverlay, type UseShellDevtoolBridgeOptions, useShellDevtoolBridge };
28
+ export declare function useShellDevtoolBridge({ id, label, order, managerHref }: UseShellDevtoolBridgeOptions): RegisteredShellDevtoolBridge;
@@ -1,13 +1,3 @@
1
1
  "use client";
2
2
  "use client";
3
- import {
4
- ShellOverlay,
5
- useShellDevtoolBridge
6
- } from "../chunk-SW2FF6EV.js";
7
- import "../chunk-5HRIQSVF.js";
8
- import "../chunk-Z2KFRHSI.js";
9
- import "../chunk-UJSIQF3A.js";
10
- export {
11
- ShellOverlay,
12
- useShellDevtoolBridge
13
- };
3
+ export { t as ShellOverlay, n as useShellDevtoolBridge } from "../harness-CJZXBH3w.js";