@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.
- package/CHANGELOG.md +22 -0
- package/README.md +11 -2
- package/dist/brandapp/index.cjs +457 -363
- package/dist/brandapp/index.d.cts +80 -81
- package/dist/brandapp/index.d.ts +80 -81
- package/dist/brandapp/index.js +451 -361
- package/dist/datagrid/index.cjs +170 -180
- package/dist/datagrid/index.d.cts +9 -11
- package/dist/datagrid/index.d.ts +9 -11
- package/dist/datagrid/index.js +167 -179
- package/dist/editor/index.cjs +209 -228
- package/dist/editor/index.d.cts +9 -11
- package/dist/editor/index.d.ts +9 -11
- package/dist/editor/index.js +206 -227
- package/dist/harness/index.cjs +5 -12
- package/dist/harness/index.d.cts +14 -16
- package/dist/harness/index.d.ts +14 -16
- package/dist/harness/index.js +1 -11
- package/dist/harness-CJZXBH3w.js +528 -0
- package/dist/harness-CPOp9Wlj.cjs +582 -0
- package/dist/index.cjs +3619 -3782
- package/dist/index.d.cts +9 -17
- package/dist/index.d.ts +9 -17
- package/dist/index.js +3611 -3781
- package/dist/provider-Cjg2rSYG.js +110 -0
- package/dist/provider-H53ZWHCo.cjs +161 -0
- package/dist/theme/index.cjs +298 -12
- package/dist/theme/index.d.cts +26 -28
- package/dist/theme/index.d.ts +26 -28
- package/dist/theme/index.js +294 -11
- package/dist/theme-isolate-BOo3J259.js +42 -0
- package/dist/theme-isolate-D9AMkYrD.cjs +53 -0
- package/dist/types-BKmW0EBr.js +4 -0
- package/dist/types-Bz4DijhU.cjs +9 -0
- package/dist/types-D_lNT2Nr.d.cts +91 -0
- package/dist/types-D_lNT2Nr.d.ts +91 -0
- package/dist/ui/index.cjs +4 -8
- package/dist/ui/index.d.cts +3 -2
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +1 -7
- package/package.json +4 -4
- package/dist/chunk-4MJKIAXH.cjs +0 -65
- package/dist/chunk-5HRIQSVF.js +0 -32
- package/dist/chunk-6AGUYGVT.cjs +0 -77
- package/dist/chunk-EQPETYJJ.cjs +0 -32
- package/dist/chunk-H3F2WACS.cjs +0 -568
- package/dist/chunk-N7YO56TN.cjs +0 -25
- package/dist/chunk-SQ3E3QLA.cjs +0 -253
- package/dist/chunk-SW2FF6EV.js +0 -568
- package/dist/chunk-UJSIQF3A.js +0 -25
- package/dist/chunk-UQY5I3WS.js +0 -253
- package/dist/chunk-YCYIUFB4.js +0 -65
- package/dist/chunk-Z2KFRHSI.js +0 -77
- package/dist/index-Bakx4o8Z.d.cts +0 -91
- package/dist/index-Bakx4o8Z.d.ts +0 -91
package/dist/editor/index.js
CHANGED
|
@@ -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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
})
|
|
16
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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 };
|
package/dist/harness/index.cjs
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
1
|
"use client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
package/dist/harness/index.d.cts
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
11
|
+
export interface RegisteredShellDevtoolBridge {
|
|
12
|
+
inspect: (snapshot: ShellDevtoolSnapshot) => void;
|
|
13
13
|
}
|
|
14
|
-
declare function ShellOverlay({ snapshot
|
|
15
|
-
|
|
16
|
-
}):
|
|
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
|
|
29
|
-
|
|
30
|
-
export { type RegisteredShellDevtoolBridge, ShellOverlay, type UseShellDevtoolBridgeOptions, useShellDevtoolBridge };
|
|
28
|
+
export declare function useShellDevtoolBridge({ id, label, order, managerHref }: UseShellDevtoolBridgeOptions): RegisteredShellDevtoolBridge;
|
package/dist/harness/index.d.ts
CHANGED
|
@@ -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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
11
|
+
export interface RegisteredShellDevtoolBridge {
|
|
12
|
+
inspect: (snapshot: ShellDevtoolSnapshot) => void;
|
|
13
13
|
}
|
|
14
|
-
declare function ShellOverlay({ snapshot
|
|
15
|
-
|
|
16
|
-
}):
|
|
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
|
|
29
|
-
|
|
30
|
-
export { type RegisteredShellDevtoolBridge, ShellOverlay, type UseShellDevtoolBridgeOptions, useShellDevtoolBridge };
|
|
28
|
+
export declare function useShellDevtoolBridge({ id, label, order, managerHref }: UseShellDevtoolBridgeOptions): RegisteredShellDevtoolBridge;
|
package/dist/harness/index.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
|
|
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";
|