@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,391 +1,478 @@
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/brandapp/index.tsx
3
+ import { n as useOptDevtoolPlugin } from "../provider-Bn7CAE_Y.js";
9
4
  import * as React from "react";
10
5
  import { jsx, jsxs } from "react/jsx-runtime";
11
- var STATUS_STYLES = {
12
- connected: "bg-emerald-400",
13
- configured: "bg-blue-400",
14
- missing: "bg-red-400",
15
- warning: "bg-amber-300",
16
- error: "bg-red-400",
17
- unknown: "bg-white/25"
6
+ //#region src/brandapp/index.tsx
7
+ const STATUS_STYLES = {
8
+ connected: "bg-emerald-400",
9
+ configured: "bg-blue-400",
10
+ missing: "bg-red-400",
11
+ warning: "bg-amber-300",
12
+ error: "bg-red-400",
13
+ unknown: "bg-white/25"
18
14
  };
19
- var STATUS_TEXT_STYLES = {
20
- connected: "text-emerald-300",
21
- configured: "text-blue-300",
22
- missing: "text-red-300",
23
- warning: "text-amber-300",
24
- error: "text-red-300",
25
- unknown: "text-white/45"
15
+ const STATUS_TEXT_STYLES = {
16
+ connected: "text-emerald-300",
17
+ configured: "text-blue-300",
18
+ missing: "text-red-300",
19
+ warning: "text-amber-300",
20
+ error: "text-red-300",
21
+ unknown: "text-white/45"
26
22
  };
27
23
  function statusLabel(status) {
28
- return status != null ? status : "unknown";
24
+ return status !== null && status !== void 0 ? status : "unknown";
29
25
  }
26
+ /** Summarize required Brandapp env vars for status badges and diagnostics. */
30
27
  function getBrandappRequiredEnvSummary(env) {
31
- const required = (env != null ? env : []).filter((item) => item.required);
32
- return {
33
- total: required.length,
34
- present: required.filter((item) => item.present).length,
35
- missing: required.filter((item) => !item.present).map((item) => item.name)
36
- };
28
+ const required = (env !== null && env !== void 0 ? env : []).filter((item) => item.required);
29
+ return {
30
+ total: required.length,
31
+ present: required.filter((item) => item.present).length,
32
+ missing: required.filter((item) => !item.present).map((item) => item.name)
33
+ };
37
34
  }
35
+ /** Resolve the top-level Brandapp snapshot status from all reported signals. */
38
36
  function getBrandappSnapshotStatus(snapshot) {
39
- var _a, _b, _c, _d, _e;
40
- const requiredEnv = getBrandappRequiredEnvSummary(snapshot.env);
41
- const statuses = [
42
- (_a = snapshot.auth) == null ? void 0 : _a.status,
43
- (_b = snapshot.eav) == null ? void 0 : _b.status,
44
- (_c = snapshot.ai) == null ? void 0 : _c.status,
45
- ...((_d = snapshot.features) != null ? _d : []).map((feature) => feature.status),
46
- ...((_e = snapshot.routes) != null ? _e : []).map((route) => route.status)
47
- ];
48
- if (statuses.includes("error")) {
49
- return "error";
50
- }
51
- if (requiredEnv.missing.length > 0 || statuses.includes("missing")) {
52
- return "missing";
53
- }
54
- if (statuses.includes("warning")) {
55
- return "warning";
56
- }
57
- if (statuses.includes("connected")) {
58
- return "connected";
59
- }
60
- if (statuses.includes("configured")) {
61
- return "configured";
62
- }
63
- return "unknown";
37
+ var _snapshot$auth, _snapshot$eav, _snapshot$ai, _snapshot$features, _snapshot$routes;
38
+ const requiredEnv = getBrandappRequiredEnvSummary(snapshot.env);
39
+ const statuses = [
40
+ (_snapshot$auth = snapshot.auth) === null || _snapshot$auth === void 0 ? void 0 : _snapshot$auth.status,
41
+ (_snapshot$eav = snapshot.eav) === null || _snapshot$eav === void 0 ? void 0 : _snapshot$eav.status,
42
+ (_snapshot$ai = snapshot.ai) === null || _snapshot$ai === void 0 ? void 0 : _snapshot$ai.status,
43
+ ...((_snapshot$features = snapshot.features) !== null && _snapshot$features !== void 0 ? _snapshot$features : []).map((feature) => feature.status),
44
+ ...((_snapshot$routes = snapshot.routes) !== null && _snapshot$routes !== void 0 ? _snapshot$routes : []).map((route) => route.status)
45
+ ];
46
+ if (statuses.includes("error")) return "error";
47
+ if (requiredEnv.missing.length > 0 || statuses.includes("missing")) return "missing";
48
+ if (statuses.includes("warning")) return "warning";
49
+ if (statuses.includes("connected")) return "connected";
50
+ if (statuses.includes("configured")) return "configured";
51
+ return "unknown";
64
52
  }
65
53
  function formatDate(value) {
66
- if (value === void 0) {
67
- return "-";
68
- }
69
- const date = typeof value === "number" ? new Date(value) : new Date(value);
70
- if (Number.isNaN(date.getTime())) {
71
- return String(value);
72
- }
73
- return date.toLocaleString();
54
+ if (value === void 0) return "-";
55
+ const date = typeof value === "number" ? new Date(value) : new Date(value);
56
+ if (Number.isNaN(date.getTime())) return String(value);
57
+ return date.toLocaleString();
74
58
  }
75
59
  function formatOptional(value) {
76
- if (value === null || value === void 0 || value === "") {
77
- return "-";
78
- }
79
- return String(value);
60
+ if (value === null || value === void 0 || value === "") return "-";
61
+ return String(value);
80
62
  }
81
- function StatusDot({
82
- status,
83
- label
84
- }) {
85
- const resolved = status != null ? status : "unknown";
86
- return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
87
- /* @__PURE__ */ jsx(
88
- "span",
89
- {
90
- className: `inline-block h-1.5 w-1.5 rounded-full ${STATUS_STYLES[resolved]}`
91
- }
92
- ),
93
- /* @__PURE__ */ jsx("span", { className: STATUS_TEXT_STYLES[resolved], children: label })
94
- ] });
63
+ function StatusDot({ status, label }) {
64
+ const resolved = status !== null && status !== void 0 ? status : "unknown";
65
+ return /* @__PURE__ */ jsxs("span", {
66
+ className: "inline-flex items-center gap-1.5",
67
+ children: [/* @__PURE__ */ jsx("span", { className: `inline-block h-1.5 w-1.5 rounded-full ${STATUS_STYLES[resolved]}` }), /* @__PURE__ */ jsx("span", {
68
+ className: STATUS_TEXT_STYLES[resolved],
69
+ children: label
70
+ })]
71
+ });
95
72
  }
96
- function InfoRow({
97
- label,
98
- value
99
- }) {
100
- return /* @__PURE__ */ jsxs("div", { className: "grid min-w-0 grid-cols-[5.75rem_minmax(0,1fr)] items-center gap-1 rounded-md bg-white/[0.035] px-2 py-1", children: [
101
- /* @__PURE__ */ jsx("span", { className: "truncate text-[9px] font-semibold tracking-wide text-white/35 uppercase", children: label }),
102
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded bg-black/20 px-1.5 py-0.5 text-right font-mono text-[10px] text-white/78", children: formatOptional(value) })
103
- ] });
73
+ function InfoRow({ label, value }) {
74
+ return /* @__PURE__ */ jsxs("div", {
75
+ className: "grid min-w-0 grid-cols-[5.75rem_minmax(0,1fr)] items-center gap-1 rounded-md bg-white/[0.035] px-2 py-1",
76
+ children: [/* @__PURE__ */ jsx("span", {
77
+ className: "truncate text-[9px] font-semibold tracking-wide text-white/35 uppercase",
78
+ children: label
79
+ }), /* @__PURE__ */ jsx("span", {
80
+ className: "min-w-0 truncate rounded bg-black/20 px-1.5 py-0.5 text-right font-mono text-[10px] text-white/78",
81
+ children: formatOptional(value)
82
+ })]
83
+ });
104
84
  }
105
- function CollapsibleGroup({
106
- title,
107
- trailing,
108
- defaultOpen = true,
109
- children
110
- }) {
111
- const [open, setOpen] = React.useState(defaultOpen);
112
- return /* @__PURE__ */ jsxs("section", { className: "overflow-hidden rounded-lg bg-white/[0.025]", children: [
113
- /* @__PURE__ */ jsxs(
114
- "button",
115
- {
116
- type: "button",
117
- tabIndex: -1,
118
- onClick: () => setOpen((current) => !current),
119
- className: "flex w-full items-center justify-between gap-2 bg-white/[0.045] px-2.5 py-1.5 text-left transition-colors hover:bg-white/[0.065]",
120
- "aria-expanded": open,
121
- children: [
122
- /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
123
- /* @__PURE__ */ jsx("span", { className: "text-[9px] text-white/35", children: open ? "\u25BE" : "\u25B8" }),
124
- /* @__PURE__ */ jsx("span", { className: "truncate text-[10px] font-semibold text-emerald-400", children: title })
125
- ] }),
126
- trailing
127
- ]
128
- }
129
- ),
130
- open ? /* @__PURE__ */ jsx("div", { className: "px-2.5 py-2", children }) : null
131
- ] });
85
+ function CollapsibleGroup({ title, trailing, defaultOpen = true, children }) {
86
+ const [open, setOpen] = React.useState(defaultOpen);
87
+ return /* @__PURE__ */ jsxs("section", {
88
+ className: "overflow-hidden rounded-lg bg-white/[0.025]",
89
+ children: [/* @__PURE__ */ jsxs("button", {
90
+ type: "button",
91
+ tabIndex: -1,
92
+ onClick: () => setOpen((current) => !current),
93
+ className: "flex w-full items-center justify-between gap-2 bg-white/[0.045] px-2.5 py-1.5 text-left transition-colors hover:bg-white/[0.065]",
94
+ "aria-expanded": open,
95
+ children: [/* @__PURE__ */ jsxs("span", {
96
+ className: "flex min-w-0 items-center gap-1.5",
97
+ children: [/* @__PURE__ */ jsx("span", {
98
+ className: "text-[9px] text-white/35",
99
+ children: open ? "▾" : "▸"
100
+ }), /* @__PURE__ */ jsx("span", {
101
+ className: "truncate text-[10px] font-semibold text-emerald-400",
102
+ children: title
103
+ })]
104
+ }), trailing]
105
+ }), open ? /* @__PURE__ */ jsx("div", {
106
+ className: "px-2.5 py-2",
107
+ children
108
+ }) : null]
109
+ });
132
110
  }
133
111
  function SummaryPanel({ snapshot }) {
134
- const requiredEnv = getBrandappRequiredEnvSummary(snapshot.env);
135
- const status = getBrandappSnapshotStatus(snapshot);
136
- const statusText = statusLabel(status);
137
- return /* @__PURE__ */ jsxs("section", { className: "rounded-lg bg-white/[0.05] px-2.5 py-2", children: [
138
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
139
- /* @__PURE__ */ jsx(StatusDot, { status, label: `Brandapp ${statusText}` }),
140
- /* @__PURE__ */ jsxs("span", { className: "rounded bg-black/20 px-1.5 py-0.5 font-mono text-[9px] text-white/55", children: [
141
- "env ",
142
- requiredEnv.present,
143
- "/",
144
- requiredEnv.total
145
- ] })
146
- ] }),
147
- requiredEnv.missing.length > 0 ? /* @__PURE__ */ jsx("div", { className: "mt-1.5 flex flex-wrap gap-1", children: requiredEnv.missing.map((name) => /* @__PURE__ */ jsxs(
148
- "span",
149
- {
150
- className: "rounded bg-red-500/15 px-1.5 py-0.5 font-mono text-[9px] text-red-200",
151
- children: [
152
- "missing ",
153
- name
154
- ]
155
- },
156
- name
157
- )) }) : null
158
- ] });
112
+ const requiredEnv = getBrandappRequiredEnvSummary(snapshot.env);
113
+ const status = getBrandappSnapshotStatus(snapshot);
114
+ return /* @__PURE__ */ jsxs("section", {
115
+ className: "rounded-lg bg-white/[0.05] px-2.5 py-2",
116
+ children: [/* @__PURE__ */ jsxs("div", {
117
+ className: "flex items-center justify-between gap-2",
118
+ children: [/* @__PURE__ */ jsx(StatusDot, {
119
+ status,
120
+ label: `Brandapp ${statusLabel(status)}`
121
+ }), /* @__PURE__ */ jsxs("span", {
122
+ className: "rounded bg-black/20 px-1.5 py-0.5 font-mono text-[9px] text-white/55",
123
+ children: [
124
+ "env ",
125
+ requiredEnv.present,
126
+ "/",
127
+ requiredEnv.total
128
+ ]
129
+ })]
130
+ }), requiredEnv.missing.length > 0 ? /* @__PURE__ */ jsx("div", {
131
+ className: "mt-1.5 flex flex-wrap gap-1",
132
+ children: requiredEnv.missing.map((name) => /* @__PURE__ */ jsxs("span", {
133
+ className: "rounded bg-red-500/15 px-1.5 py-0.5 font-mono text-[9px] text-red-200",
134
+ children: ["missing ", name]
135
+ }, name))
136
+ }) : null]
137
+ });
159
138
  }
160
- function FeatureList({
161
- features
162
- }) {
163
- if (!features || features.length === 0) {
164
- return /* @__PURE__ */ jsx("div", { className: "text-[10px] text-white/40", children: "No feature signals." });
165
- }
166
- return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: features.map((feature) => /* @__PURE__ */ jsxs(
167
- "div",
168
- {
169
- className: "grid min-w-0 grid-cols-[6.5rem_minmax(0,1fr)] items-start gap-1 rounded-md bg-white/[0.035] px-2 py-1",
170
- children: [
171
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: /* @__PURE__ */ jsx(StatusDot, { status: feature.status, label: feature.label }) }),
172
- feature.detail ? /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded bg-black/20 px-1.5 py-0.5 font-mono text-[9px] text-white/55", children: feature.detail }) : /* @__PURE__ */ jsx("span", { className: "rounded bg-black/20 px-1.5 py-0.5 font-mono text-[9px] text-white/35", children: "-" })
173
- ]
174
- },
175
- feature.id
176
- )) });
139
+ function FeatureList({ features }) {
140
+ if (!features || features.length === 0) return /* @__PURE__ */ jsx("div", {
141
+ className: "text-[10px] text-white/40",
142
+ children: "No feature signals."
143
+ });
144
+ return /* @__PURE__ */ jsx("div", {
145
+ className: "flex flex-col gap-1",
146
+ children: features.map((feature) => /* @__PURE__ */ jsxs("div", {
147
+ className: "grid min-w-0 grid-cols-[6.5rem_minmax(0,1fr)] items-start gap-1 rounded-md bg-white/[0.035] px-2 py-1",
148
+ children: [/* @__PURE__ */ jsx("span", {
149
+ className: "min-w-0 truncate",
150
+ children: /* @__PURE__ */ jsx(StatusDot, {
151
+ status: feature.status,
152
+ label: feature.label
153
+ })
154
+ }), feature.detail ? /* @__PURE__ */ jsx("span", {
155
+ className: "min-w-0 truncate rounded bg-black/20 px-1.5 py-0.5 font-mono text-[9px] text-white/55",
156
+ children: feature.detail
157
+ }) : /* @__PURE__ */ jsx("span", {
158
+ className: "rounded bg-black/20 px-1.5 py-0.5 font-mono text-[9px] text-white/35",
159
+ children: "-"
160
+ })]
161
+ }, feature.id))
162
+ });
177
163
  }
178
- function EnvList({
179
- env
180
- }) {
181
- if (!env || env.length === 0) {
182
- return /* @__PURE__ */ jsx("div", { className: "text-[10px] text-white/40", children: "No env signals." });
183
- }
184
- const requiredEnv = getBrandappRequiredEnvSummary(env);
185
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
186
- requiredEnv.missing.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "rounded bg-red-500/12 px-2 py-1 text-[10px] text-red-200", children: [
187
- "Missing required env: ",
188
- requiredEnv.missing.join(", ")
189
- ] }) : null,
190
- env.map((item) => {
191
- var _a, _b;
192
- const status = item.present ? "configured" : item.required ? "missing" : "unknown";
193
- return /* @__PURE__ */ jsxs(
194
- "div",
195
- {
196
- className: "grid grid-cols-[minmax(0,1fr)_minmax(4.5rem,auto)] gap-1 rounded-md bg-white/[0.035] px-2 py-1",
197
- children: [
198
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
199
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5", children: [
200
- /* @__PURE__ */ jsx(StatusDot, { status, label: item.name }),
201
- item.required ? /* @__PURE__ */ jsx("span", { className: "rounded bg-amber-400/12 px-1 py-0.5 text-[8px] text-amber-300", children: "required" }) : null
202
- ] }),
203
- item.note ? /* @__PURE__ */ jsx("div", { className: "truncate pl-3 text-[9px] text-white/35", children: item.note }) : null
204
- ] }),
205
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate rounded bg-black/20 px-1.5 py-0.5 text-right font-mono text-[9px] text-white/55", children: (_b = (_a = item.maskedValue) != null ? _a : item.scope) != null ? _b : "" })
206
- ]
207
- },
208
- item.name
209
- );
210
- })
211
- ] });
164
+ function EnvList({ env }) {
165
+ if (!env || env.length === 0) return /* @__PURE__ */ jsx("div", {
166
+ className: "text-[10px] text-white/40",
167
+ children: "No env signals."
168
+ });
169
+ const requiredEnv = getBrandappRequiredEnvSummary(env);
170
+ return /* @__PURE__ */ jsxs("div", {
171
+ className: "flex flex-col gap-1",
172
+ children: [requiredEnv.missing.length > 0 ? /* @__PURE__ */ jsxs("div", {
173
+ className: "rounded bg-red-500/12 px-2 py-1 text-[10px] text-red-200",
174
+ children: ["Missing required env: ", requiredEnv.missing.join(", ")]
175
+ }) : null, env.map((item) => {
176
+ var _ref, _item$maskedValue;
177
+ return /* @__PURE__ */ jsxs("div", {
178
+ className: "grid grid-cols-[minmax(0,1fr)_minmax(4.5rem,auto)] gap-1 rounded-md bg-white/[0.035] px-2 py-1",
179
+ children: [/* @__PURE__ */ jsxs("div", {
180
+ className: "min-w-0",
181
+ children: [/* @__PURE__ */ jsxs("div", {
182
+ className: "flex min-w-0 items-center gap-1.5",
183
+ children: [/* @__PURE__ */ jsx(StatusDot, {
184
+ status: item.present ? "configured" : item.required ? "missing" : "unknown",
185
+ label: item.name
186
+ }), item.required ? /* @__PURE__ */ jsx("span", {
187
+ className: "rounded bg-amber-400/12 px-1 py-0.5 text-[8px] text-amber-300",
188
+ children: "required"
189
+ }) : null]
190
+ }), item.note ? /* @__PURE__ */ jsx("div", {
191
+ className: "truncate pl-3 text-[9px] text-white/35",
192
+ children: item.note
193
+ }) : null]
194
+ }), /* @__PURE__ */ jsx("span", {
195
+ className: "min-w-0 truncate rounded bg-black/20 px-1.5 py-0.5 text-right font-mono text-[9px] text-white/55",
196
+ children: (_ref = (_item$maskedValue = item.maskedValue) !== null && _item$maskedValue !== void 0 ? _item$maskedValue : item.scope) !== null && _ref !== void 0 ? _ref : ""
197
+ })]
198
+ }, item.name);
199
+ })]
200
+ });
212
201
  }
213
- function RouteList({
214
- routes
215
- }) {
216
- if (!routes || routes.length === 0) {
217
- return /* @__PURE__ */ jsx("div", { className: "text-[10px] text-white/40", children: "No route signals." });
218
- }
219
- return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: routes.map((route) => {
220
- var _a, _b, _c;
221
- const status = (_a = route.status) != null ? _a : "unknown";
222
- return /* @__PURE__ */ jsxs(
223
- "div",
224
- {
225
- className: "min-w-0 rounded-md bg-white/[0.035] px-2 py-1",
226
- children: [
227
- /* @__PURE__ */ jsxs("div", { className: "grid min-w-0 grid-cols-[3.25rem_minmax(0,1fr)] items-center gap-1", children: [
228
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: /* @__PURE__ */ jsx(StatusDot, { status, label: (_c = route.method) != null ? _c : "GET" }) }),
229
- /* @__PURE__ */ jsx("span", { className: "truncate rounded bg-black/20 px-1.5 py-0.5 font-mono text-[10px] text-white/75", children: route.path })
230
- ] }),
231
- route.statusCode !== void 0 || route.latencyMs !== void 0 || route.lastCheckedAt !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "mt-1 flex flex-wrap gap-1 pl-[3.75rem]", children: [
232
- route.statusCode !== void 0 ? /* @__PURE__ */ jsx("span", { className: "rounded bg-black/20 px-1.5 py-0.5 text-[9px] text-white/45", children: route.statusCode }) : null,
233
- route.latencyMs !== void 0 ? /* @__PURE__ */ jsxs("span", { className: "rounded bg-black/20 px-1.5 py-0.5 text-[9px] text-white/45", children: [
234
- route.latencyMs,
235
- "ms"
236
- ] }) : null,
237
- route.lastCheckedAt !== void 0 ? /* @__PURE__ */ jsx("span", { className: "rounded bg-black/20 px-1.5 py-0.5 text-[9px] text-white/40", children: formatDate(route.lastCheckedAt) }) : null
238
- ] }) : null,
239
- route.description ? /* @__PURE__ */ jsx("div", { className: "truncate pl-3 text-[9px] text-white/35", children: route.description }) : null
240
- ]
241
- },
242
- `${(_b = route.method) != null ? _b : "GET"} ${route.path}`
243
- );
244
- }) });
202
+ function RouteList({ routes }) {
203
+ if (!routes || routes.length === 0) return /* @__PURE__ */ jsx("div", {
204
+ className: "text-[10px] text-white/40",
205
+ children: "No route signals."
206
+ });
207
+ return /* @__PURE__ */ jsx("div", {
208
+ className: "flex flex-col gap-1",
209
+ children: routes.map((route) => {
210
+ var _route$status, _route$method, _route$method2;
211
+ return /* @__PURE__ */ jsxs("div", {
212
+ className: "min-w-0 rounded-md bg-white/[0.035] px-2 py-1",
213
+ children: [
214
+ /* @__PURE__ */ jsxs("div", {
215
+ className: "grid min-w-0 grid-cols-[3.25rem_minmax(0,1fr)] items-center gap-1",
216
+ children: [/* @__PURE__ */ jsx("span", {
217
+ className: "min-w-0 truncate",
218
+ children: /* @__PURE__ */ jsx(StatusDot, {
219
+ status: (_route$status = route.status) !== null && _route$status !== void 0 ? _route$status : "unknown",
220
+ label: (_route$method2 = route.method) !== null && _route$method2 !== void 0 ? _route$method2 : "GET"
221
+ })
222
+ }), /* @__PURE__ */ jsx("span", {
223
+ className: "truncate rounded bg-black/20 px-1.5 py-0.5 font-mono text-[10px] text-white/75",
224
+ children: route.path
225
+ })]
226
+ }),
227
+ route.statusCode !== void 0 || route.latencyMs !== void 0 || route.lastCheckedAt !== void 0 ? /* @__PURE__ */ jsxs("div", {
228
+ className: "mt-1 flex flex-wrap gap-1 pl-[3.75rem]",
229
+ children: [
230
+ route.statusCode !== void 0 ? /* @__PURE__ */ jsx("span", {
231
+ className: "rounded bg-black/20 px-1.5 py-0.5 text-[9px] text-white/45",
232
+ children: route.statusCode
233
+ }) : null,
234
+ route.latencyMs !== void 0 ? /* @__PURE__ */ jsxs("span", {
235
+ className: "rounded bg-black/20 px-1.5 py-0.5 text-[9px] text-white/45",
236
+ children: [route.latencyMs, "ms"]
237
+ }) : null,
238
+ route.lastCheckedAt !== void 0 ? /* @__PURE__ */ jsx("span", {
239
+ className: "rounded bg-black/20 px-1.5 py-0.5 text-[9px] text-white/40",
240
+ children: formatDate(route.lastCheckedAt)
241
+ }) : null
242
+ ]
243
+ }) : null,
244
+ route.description ? /* @__PURE__ */ jsx("div", {
245
+ className: "truncate pl-3 text-[9px] text-white/35",
246
+ children: route.description
247
+ }) : null
248
+ ]
249
+ }, `${(_route$method = route.method) !== null && _route$method !== void 0 ? _route$method : "GET"} ${route.path}`);
250
+ })
251
+ });
245
252
  }
246
253
  function formatEntityMetric(entity) {
247
- if (entity.recordCount !== void 0) {
248
- return `${entity.recordCount} rows`;
249
- }
250
- if (entity.attributeCount !== void 0) {
251
- return `${entity.attributeCount} attrs`;
252
- }
253
- if (entity.synced) {
254
- return "synced";
255
- }
256
- return entity.id;
254
+ if (entity.recordCount !== void 0) return `${entity.recordCount} rows`;
255
+ if (entity.attributeCount !== void 0) return `${entity.attributeCount} attrs`;
256
+ if (entity.synced) return "synced";
257
+ return entity.id;
257
258
  }
258
259
  function EavPanel({ eav }) {
259
- if (!eav) {
260
- return /* @__PURE__ */ jsx("div", { className: "text-[10px] text-white/40", children: "No EAV signal." });
261
- }
262
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
263
- /* @__PURE__ */ jsxs("div", { className: "grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2", children: [
264
- /* @__PURE__ */ jsx(InfoRow, { label: "status", value: statusLabel(eav.status) }),
265
- /* @__PURE__ */ jsx(InfoRow, { label: "schema", value: eav.schemaHash }),
266
- /* @__PURE__ */ jsx(InfoRow, { label: "lockfile", value: eav.lockfileHash }),
267
- /* @__PURE__ */ jsx(InfoRow, { label: "sync", value: formatDate(eav.lastSyncAt) })
268
- ] }),
269
- eav.entities && eav.entities.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: eav.entities.slice(0, 6).map((entity) => {
270
- var _a, _b;
271
- return /* @__PURE__ */ jsxs(
272
- "div",
273
- {
274
- className: "grid grid-cols-[minmax(0,1fr)_auto] gap-1 rounded-md bg-white/[0.035] px-2 py-1 text-[10px]",
275
- children: [
276
- /* @__PURE__ */ jsx("span", { className: "truncate text-white/70", children: (_b = (_a = entity.label) != null ? _a : entity.name) != null ? _b : entity.id }),
277
- /* @__PURE__ */ jsx("span", { className: "rounded bg-black/20 px-1.5 py-0.5 font-mono text-white/55", children: formatEntityMetric(entity) })
278
- ]
279
- },
280
- entity.id
281
- );
282
- }) }) : null
283
- ] });
260
+ if (!eav) return /* @__PURE__ */ jsx("div", {
261
+ className: "text-[10px] text-white/40",
262
+ children: "No EAV signal."
263
+ });
264
+ return /* @__PURE__ */ jsxs("div", {
265
+ className: "flex flex-col gap-1.5",
266
+ children: [/* @__PURE__ */ jsxs("div", {
267
+ className: "grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2",
268
+ children: [
269
+ /* @__PURE__ */ jsx(InfoRow, {
270
+ label: "status",
271
+ value: statusLabel(eav.status)
272
+ }),
273
+ /* @__PURE__ */ jsx(InfoRow, {
274
+ label: "schema",
275
+ value: eav.schemaHash
276
+ }),
277
+ /* @__PURE__ */ jsx(InfoRow, {
278
+ label: "lockfile",
279
+ value: eav.lockfileHash
280
+ }),
281
+ /* @__PURE__ */ jsx(InfoRow, {
282
+ label: "sync",
283
+ value: formatDate(eav.lastSyncAt)
284
+ })
285
+ ]
286
+ }), eav.entities && eav.entities.length > 0 ? /* @__PURE__ */ jsx("div", {
287
+ className: "flex flex-col gap-1",
288
+ children: eav.entities.slice(0, 6).map((entity) => {
289
+ var _ref2, _entity$label;
290
+ return /* @__PURE__ */ jsxs("div", {
291
+ className: "grid grid-cols-[minmax(0,1fr)_auto] gap-1 rounded-md bg-white/[0.035] px-2 py-1 text-[10px]",
292
+ children: [/* @__PURE__ */ jsx("span", {
293
+ className: "truncate text-white/70",
294
+ children: (_ref2 = (_entity$label = entity.label) !== null && _entity$label !== void 0 ? _entity$label : entity.name) !== null && _ref2 !== void 0 ? _ref2 : entity.id
295
+ }), /* @__PURE__ */ jsx("span", {
296
+ className: "rounded bg-black/20 px-1.5 py-0.5 font-mono text-white/55",
297
+ children: formatEntityMetric(entity)
298
+ })]
299
+ }, entity.id);
300
+ })
301
+ }) : null]
302
+ });
284
303
  }
285
- function BrandappDevtoolPanel({
286
- snapshot
287
- }) {
288
- var _a, _b, _c, _d, _e, _f, _g, _h;
289
- if (!snapshot) {
290
- return /* @__PURE__ */ jsx("div", { className: "text-[11px] text-white/55", children: "Waiting for Brandapp SDK snapshot." });
291
- }
292
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3 text-[11px]", children: [
293
- /* @__PURE__ */ jsx(SummaryPanel, { snapshot }),
294
- /* @__PURE__ */ jsx(CollapsibleGroup, { title: "Identity", children: /* @__PURE__ */ jsxs("div", { className: "grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2", children: [
295
- /* @__PURE__ */ jsx(InfoRow, { label: "brandappId", value: snapshot.brandappId }),
296
- /* @__PURE__ */ jsx(InfoRow, { label: "clientId", value: snapshot.clientId }),
297
- /* @__PURE__ */ jsx(InfoRow, { label: "baseUrl", value: snapshot.baseUrl }),
298
- /* @__PURE__ */ jsx(InfoRow, { label: "sdk", value: snapshot.sdkVersion }),
299
- /* @__PURE__ */ jsx(InfoRow, { label: "env", value: snapshot.environment }),
300
- /* @__PURE__ */ jsx(InfoRow, { label: "updated", value: formatDate(snapshot.updatedAt) })
301
- ] }) }),
302
- /* @__PURE__ */ jsxs(CollapsibleGroup, { title: "Connection", children: [
303
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-x-3 gap-y-1.5 text-white/70", children: [
304
- /* @__PURE__ */ jsx(StatusDot, { status: (_a = snapshot.auth) == null ? void 0 : _a.status, label: "Auth" }),
305
- /* @__PURE__ */ jsx(StatusDot, { status: (_b = snapshot.eav) == null ? void 0 : _b.status, label: "EAV" }),
306
- /* @__PURE__ */ jsx(StatusDot, { status: (_c = snapshot.ai) == null ? void 0 : _c.status, label: "AI" }),
307
- ((_d = snapshot.auth) == null ? void 0 : _d.session) ? /* @__PURE__ */ jsxs("span", { className: "text-white/45", children: [
308
- "session: ",
309
- snapshot.auth.session
310
- ] }) : null
311
- ] }),
312
- /* @__PURE__ */ jsxs("div", { className: "mt-1 grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2", children: [
313
- /* @__PURE__ */ jsx(InfoRow, { label: "provider", value: (_e = snapshot.auth) == null ? void 0 : _e.provider }),
314
- /* @__PURE__ */ jsx(InfoRow, { label: "callback", value: (_f = snapshot.auth) == null ? void 0 : _f.callbackPath }),
315
- /* @__PURE__ */ jsx(InfoRow, { label: "user", value: (_g = snapshot.auth) == null ? void 0 : _g.userId }),
316
- /* @__PURE__ */ jsx(InfoRow, { label: "org", value: (_h = snapshot.auth) == null ? void 0 : _h.organizationId })
317
- ] })
318
- ] }),
319
- /* @__PURE__ */ jsx(CollapsibleGroup, { title: "Features", children: /* @__PURE__ */ jsx(FeatureList, { features: snapshot.features }) }),
320
- /* @__PURE__ */ jsx(CollapsibleGroup, { title: "Environment", children: /* @__PURE__ */ jsx(EnvList, { env: snapshot.env }) }),
321
- /* @__PURE__ */ jsx(CollapsibleGroup, { title: "EAV", children: /* @__PURE__ */ jsx(EavPanel, { eav: snapshot.eav }) }),
322
- /* @__PURE__ */ jsx(CollapsibleGroup, { title: "Routes", children: /* @__PURE__ */ jsx(RouteList, { routes: snapshot.routes }) }),
323
- snapshot.ai ? /* @__PURE__ */ jsxs(CollapsibleGroup, { title: "AI", children: [
324
- /* @__PURE__ */ jsxs("div", { className: "grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2", children: [
325
- /* @__PURE__ */ jsx(InfoRow, { label: "status", value: statusLabel(snapshot.ai.status) }),
326
- /* @__PURE__ */ jsx(InfoRow, { label: "route", value: snapshot.ai.routePath }),
327
- /* @__PURE__ */ jsx(InfoRow, { label: "model", value: snapshot.ai.defaultModel }),
328
- /* @__PURE__ */ jsx(InfoRow, { label: "credits", value: snapshot.ai.creditBalance })
329
- ] }),
330
- snapshot.ai.models && snapshot.ai.models.length > 0 ? /* @__PURE__ */ jsx("div", { className: "mt-1 flex flex-wrap gap-1", children: snapshot.ai.models.map((model) => /* @__PURE__ */ jsx(
331
- "span",
332
- {
333
- className: "rounded bg-white/[0.055] px-1.5 py-0.5 text-[9px] text-white/60",
334
- children: model
335
- },
336
- model
337
- )) }) : null
338
- ] }) : null,
339
- snapshot.notes && snapshot.notes.length > 0 ? /* @__PURE__ */ jsx(CollapsibleGroup, { title: "Notes", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1 text-[10px] text-white/50", children: snapshot.notes.map((note, index) => /* @__PURE__ */ jsx(
340
- "div",
341
- {
342
- className: "rounded bg-white/[0.035] px-2 py-1",
343
- children: note
344
- },
345
- `${index}-${note}`
346
- )) }) }) : null
347
- ] });
304
+ function BrandappDevtoolPanel({ snapshot }) {
305
+ var _snapshot$auth2, _snapshot$eav2, _snapshot$ai2, _snapshot$auth3, _snapshot$auth4, _snapshot$auth5, _snapshot$auth6, _snapshot$auth7;
306
+ if (!snapshot) return /* @__PURE__ */ jsx("div", {
307
+ className: "text-[11px] text-white/55",
308
+ children: "Waiting for Brandapp SDK snapshot."
309
+ });
310
+ return /* @__PURE__ */ jsxs("div", {
311
+ className: "flex flex-col gap-3 text-[11px]",
312
+ children: [
313
+ /* @__PURE__ */ jsx(SummaryPanel, { snapshot }),
314
+ /* @__PURE__ */ jsx(CollapsibleGroup, {
315
+ title: "Identity",
316
+ children: /* @__PURE__ */ jsxs("div", {
317
+ className: "grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2",
318
+ children: [
319
+ /* @__PURE__ */ jsx(InfoRow, {
320
+ label: "brandappId",
321
+ value: snapshot.brandappId
322
+ }),
323
+ /* @__PURE__ */ jsx(InfoRow, {
324
+ label: "clientId",
325
+ value: snapshot.clientId
326
+ }),
327
+ /* @__PURE__ */ jsx(InfoRow, {
328
+ label: "baseUrl",
329
+ value: snapshot.baseUrl
330
+ }),
331
+ /* @__PURE__ */ jsx(InfoRow, {
332
+ label: "sdk",
333
+ value: snapshot.sdkVersion
334
+ }),
335
+ /* @__PURE__ */ jsx(InfoRow, {
336
+ label: "env",
337
+ value: snapshot.environment
338
+ }),
339
+ /* @__PURE__ */ jsx(InfoRow, {
340
+ label: "updated",
341
+ value: formatDate(snapshot.updatedAt)
342
+ })
343
+ ]
344
+ })
345
+ }),
346
+ /* @__PURE__ */ jsxs(CollapsibleGroup, {
347
+ title: "Connection",
348
+ children: [/* @__PURE__ */ jsxs("div", {
349
+ className: "flex flex-wrap gap-x-3 gap-y-1.5 text-white/70",
350
+ children: [
351
+ /* @__PURE__ */ jsx(StatusDot, {
352
+ status: (_snapshot$auth2 = snapshot.auth) === null || _snapshot$auth2 === void 0 ? void 0 : _snapshot$auth2.status,
353
+ label: "Auth"
354
+ }),
355
+ /* @__PURE__ */ jsx(StatusDot, {
356
+ status: (_snapshot$eav2 = snapshot.eav) === null || _snapshot$eav2 === void 0 ? void 0 : _snapshot$eav2.status,
357
+ label: "EAV"
358
+ }),
359
+ /* @__PURE__ */ jsx(StatusDot, {
360
+ status: (_snapshot$ai2 = snapshot.ai) === null || _snapshot$ai2 === void 0 ? void 0 : _snapshot$ai2.status,
361
+ label: "AI"
362
+ }),
363
+ ((_snapshot$auth3 = snapshot.auth) === null || _snapshot$auth3 === void 0 ? void 0 : _snapshot$auth3.session) ? /* @__PURE__ */ jsxs("span", {
364
+ className: "text-white/45",
365
+ children: ["session: ", snapshot.auth.session]
366
+ }) : null
367
+ ]
368
+ }), /* @__PURE__ */ jsxs("div", {
369
+ className: "mt-1 grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2",
370
+ children: [
371
+ /* @__PURE__ */ jsx(InfoRow, {
372
+ label: "provider",
373
+ value: (_snapshot$auth4 = snapshot.auth) === null || _snapshot$auth4 === void 0 ? void 0 : _snapshot$auth4.provider
374
+ }),
375
+ /* @__PURE__ */ jsx(InfoRow, {
376
+ label: "callback",
377
+ value: (_snapshot$auth5 = snapshot.auth) === null || _snapshot$auth5 === void 0 ? void 0 : _snapshot$auth5.callbackPath
378
+ }),
379
+ /* @__PURE__ */ jsx(InfoRow, {
380
+ label: "user",
381
+ value: (_snapshot$auth6 = snapshot.auth) === null || _snapshot$auth6 === void 0 ? void 0 : _snapshot$auth6.userId
382
+ }),
383
+ /* @__PURE__ */ jsx(InfoRow, {
384
+ label: "org",
385
+ value: (_snapshot$auth7 = snapshot.auth) === null || _snapshot$auth7 === void 0 ? void 0 : _snapshot$auth7.organizationId
386
+ })
387
+ ]
388
+ })]
389
+ }),
390
+ /* @__PURE__ */ jsx(CollapsibleGroup, {
391
+ title: "Features",
392
+ children: /* @__PURE__ */ jsx(FeatureList, { features: snapshot.features })
393
+ }),
394
+ /* @__PURE__ */ jsx(CollapsibleGroup, {
395
+ title: "Environment",
396
+ children: /* @__PURE__ */ jsx(EnvList, { env: snapshot.env })
397
+ }),
398
+ /* @__PURE__ */ jsx(CollapsibleGroup, {
399
+ title: "EAV",
400
+ children: /* @__PURE__ */ jsx(EavPanel, { eav: snapshot.eav })
401
+ }),
402
+ /* @__PURE__ */ jsx(CollapsibleGroup, {
403
+ title: "Routes",
404
+ children: /* @__PURE__ */ jsx(RouteList, { routes: snapshot.routes })
405
+ }),
406
+ snapshot.ai ? /* @__PURE__ */ jsxs(CollapsibleGroup, {
407
+ title: "AI",
408
+ children: [/* @__PURE__ */ jsxs("div", {
409
+ className: "grid gap-x-3 gap-y-1 text-[10px] md:grid-cols-2",
410
+ children: [
411
+ /* @__PURE__ */ jsx(InfoRow, {
412
+ label: "status",
413
+ value: statusLabel(snapshot.ai.status)
414
+ }),
415
+ /* @__PURE__ */ jsx(InfoRow, {
416
+ label: "route",
417
+ value: snapshot.ai.routePath
418
+ }),
419
+ /* @__PURE__ */ jsx(InfoRow, {
420
+ label: "model",
421
+ value: snapshot.ai.defaultModel
422
+ }),
423
+ /* @__PURE__ */ jsx(InfoRow, {
424
+ label: "credits",
425
+ value: snapshot.ai.creditBalance
426
+ })
427
+ ]
428
+ }), snapshot.ai.models && snapshot.ai.models.length > 0 ? /* @__PURE__ */ jsx("div", {
429
+ className: "mt-1 flex flex-wrap gap-1",
430
+ children: snapshot.ai.models.map((model) => /* @__PURE__ */ jsx("span", {
431
+ className: "rounded bg-white/[0.055] px-1.5 py-0.5 text-[9px] text-white/60",
432
+ children: model
433
+ }, model))
434
+ }) : null]
435
+ }) : null,
436
+ snapshot.notes && snapshot.notes.length > 0 ? /* @__PURE__ */ jsx(CollapsibleGroup, {
437
+ title: "Notes",
438
+ children: /* @__PURE__ */ jsx("div", {
439
+ className: "flex flex-col gap-1 text-[10px] text-white/50",
440
+ children: snapshot.notes.map((note, index) => /* @__PURE__ */ jsx("div", {
441
+ className: "rounded bg-white/[0.035] px-2 py-1",
442
+ children: note
443
+ }, `${index}-${note}`))
444
+ })
445
+ }) : null
446
+ ]
447
+ });
348
448
  }
349
- function useBrandappDevtoolBridge({
350
- id,
351
- label,
352
- order = 10,
353
- snapshot: controlledSnapshot
354
- }) {
355
- const isControlled = controlledSnapshot !== void 0;
356
- const [uncontrolledSnapshot, setUncontrolledSnapshot] = React.useState(controlledSnapshot != null ? controlledSnapshot : null);
357
- const snapshot = isControlled ? controlledSnapshot : uncontrolledSnapshot;
358
- const inspect = React.useCallback(
359
- (nextSnapshot) => {
360
- if (!isControlled) {
361
- setUncontrolledSnapshot(nextSnapshot);
362
- }
363
- },
364
- [isControlled]
365
- );
366
- const clear = React.useCallback(() => {
367
- if (!isControlled) {
368
- setUncontrolledSnapshot(null);
369
- }
370
- }, [isControlled]);
371
- const plugin = React.useMemo(
372
- () => ({
373
- id,
374
- label,
375
- order,
376
- tab: "brandapp",
377
- renderPanel: () => /* @__PURE__ */ jsx(BrandappDevtoolPanel, { snapshot })
378
- }),
379
- [id, label, order, snapshot]
380
- );
381
- useOptDevtoolPlugin(plugin);
382
- return {
383
- inspect,
384
- clear
385
- };
449
+ /** Register a Brandapp SDK integration panel in opt-devtool. */
450
+ function useBrandappDevtoolBridge({ id, label, order = 10, snapshot: controlledSnapshot }) {
451
+ const isControlled = controlledSnapshot !== void 0;
452
+ const [uncontrolledSnapshot, setUncontrolledSnapshot] = React.useState(controlledSnapshot !== null && controlledSnapshot !== void 0 ? controlledSnapshot : null);
453
+ const snapshot = isControlled ? controlledSnapshot : uncontrolledSnapshot;
454
+ const inspect = React.useCallback((nextSnapshot) => {
455
+ if (!isControlled) setUncontrolledSnapshot(nextSnapshot);
456
+ }, [isControlled]);
457
+ const clear = React.useCallback(() => {
458
+ if (!isControlled) setUncontrolledSnapshot(null);
459
+ }, [isControlled]);
460
+ useOptDevtoolPlugin(React.useMemo(() => ({
461
+ id,
462
+ label,
463
+ order,
464
+ tab: "brandapp",
465
+ renderPanel: () => /* @__PURE__ */ jsx(BrandappDevtoolPanel, { snapshot })
466
+ }), [
467
+ id,
468
+ label,
469
+ order,
470
+ snapshot
471
+ ]));
472
+ return {
473
+ inspect,
474
+ clear
475
+ };
386
476
  }
387
- export {
388
- getBrandappRequiredEnvSummary,
389
- getBrandappSnapshotStatus,
390
- useBrandappDevtoolBridge
391
- };
477
+ //#endregion
478
+ export { getBrandappRequiredEnvSummary, getBrandappSnapshotStatus, useBrandappDevtoolBridge };