@reopt-ai/opt-devtool 1.0.0 → 1.0.1

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