@burdenoff/microfe-sandbox 2026.623.1 → 2026.624.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 (33) hide show
  1. package/dist/sandbox/components/ExtendTTLModal.js +57 -64
  2. package/dist/sandbox/components/ExtendTTLModal.js.map +1 -1
  3. package/dist/sandbox/components/FilesFolderPicker.js +11 -11
  4. package/dist/sandbox/components/FilesFolderPicker.js.map +1 -1
  5. package/dist/sandbox/components/PageLayout.js +4 -4
  6. package/dist/sandbox/components/PageLayout.js.map +1 -1
  7. package/dist/sandbox/components/ResourceDisplay.js +3 -3
  8. package/dist/sandbox/components/ResourceDisplay.js.map +1 -1
  9. package/dist/sandbox/components/RouteUtils.js +5 -5
  10. package/dist/sandbox/components/RouteUtils.js.map +1 -1
  11. package/dist/sandbox/components/SandboxActivityTab.js +1 -1
  12. package/dist/sandbox/components/SandboxActivityTab.js.map +1 -1
  13. package/dist/sandbox/components/SandboxAgentAppPanel.js +1 -1
  14. package/dist/sandbox/components/SandboxAgentAppPanel.js.map +1 -1
  15. package/dist/sandbox/components/SandboxScriptRunnerPanel.js +13 -13
  16. package/dist/sandbox/components/SandboxScriptRunnerPanel.js.map +1 -1
  17. package/dist/sandbox/components/StatusBadge.js +2 -2
  18. package/dist/sandbox/components/StatusBadge.js.map +1 -1
  19. package/dist/sandbox/components/TagsInput.js +1 -1
  20. package/dist/sandbox/components/TagsInput.js.map +1 -1
  21. package/dist/sandbox/pages/AdminTemplatesPage.js +93 -75
  22. package/dist/sandbox/pages/AdminTemplatesPage.js.map +1 -1
  23. package/dist/sandbox/pages/SandboxCreatePage.js +71 -71
  24. package/dist/sandbox/pages/SandboxCreatePage.js.map +1 -1
  25. package/dist/sandbox/pages/SandboxDetailPage.js +46 -46
  26. package/dist/sandbox/pages/SandboxDetailPage.js.map +1 -1
  27. package/dist/sandbox/pages/SandboxListPage.js +229 -213
  28. package/dist/sandbox/pages/SandboxListPage.js.map +1 -1
  29. package/dist/sandbox/pages/TemplateDetailPage.js +33 -33
  30. package/dist/sandbox/pages/TemplateDetailPage.js.map +1 -1
  31. package/dist/sandbox/pages/UserTemplatesPage.js +2 -2
  32. package/dist/sandbox/pages/UserTemplatesPage.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
1
  import { Button as e } from "./ui.js";
2
2
  import { useState as t } from "react";
3
- import { Clock as n, X as r } from "lucide-react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
3
+ import { Clock as n } from "lucide-react";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { ResponsiveDialog as a, ResponsiveDialogContent as o, ResponsiveDialogFooter as s, ResponsiveDialogHeader as c, ResponsiveDialogTitle as l } from "@burdenoff/fe-libs/ui";
5
6
  //#region src/sandbox/components/ExtendTTLModal.tsx
6
- var o = [
7
+ var u = [
7
8
  {
8
9
  label: "15 minutes",
9
10
  seconds: 900
@@ -21,95 +22,87 @@ var o = [
21
22
  seconds: 7200
22
23
  }
23
24
  ];
24
- function s({ isOpen: s, onClose: c, onExtend: l, currentExpiresAt: u, isLoading: d }) {
25
- let [f, p] = t(null), [m, h] = t("");
26
- if (!s) return null;
27
- let g = new Date(u).getTime() - Date.now(), _ = Math.max(0, Math.floor(g / 6e4));
28
- return /* @__PURE__ */ i("div", {
29
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50",
30
- children: /* @__PURE__ */ a("div", {
31
- className: "w-full max-w-md rounded-xl bg-bg-surface p-6 shadow-xl",
25
+ function d({ isOpen: d, onClose: f, onExtend: p, currentExpiresAt: m, isLoading: h }) {
26
+ let [g, _] = t(null), [v, y] = t("");
27
+ if (!d) return null;
28
+ let b = new Date(m).getTime() - Date.now(), x = Math.max(0, Math.floor(b / 6e4));
29
+ return /* @__PURE__ */ r(a, {
30
+ open: d,
31
+ onOpenChange: (e) => {
32
+ e || f();
33
+ },
34
+ children: /* @__PURE__ */ i(o, {
35
+ className: "max-w-md",
32
36
  children: [
33
- /* @__PURE__ */ a("div", {
34
- className: "flex items-center justify-between mb-4",
35
- children: [/* @__PURE__ */ a("div", {
36
- className: "flex items-center gap-2",
37
- children: [/* @__PURE__ */ i(n, { className: "size-5 text-accent-blue" }), /* @__PURE__ */ i("h3", {
38
- className: "text-lg font-semibold",
39
- children: "Extend Sandbox Duration"
40
- })]
41
- }), /* @__PURE__ */ i("button", {
42
- type: "button",
43
- onClick: c,
44
- "aria-label": "Close dialog",
45
- className: "text-text-tertiary hover:text-text-secondary",
46
- children: /* @__PURE__ */ i(r, { className: "size-5" })
47
- })]
48
- }),
49
- /* @__PURE__ */ a("p", {
37
+ /* @__PURE__ */ r(c, { children: /* @__PURE__ */ i(l, {
38
+ className: "flex items-center gap-2",
39
+ children: [/* @__PURE__ */ r(n, { className: "size-5 text-accent-blue" }), "Extend Sandbox Duration"]
40
+ }) }),
41
+ /* @__PURE__ */ i("p", {
50
42
  className: "text-sm text-text-secondary mb-4",
51
- children: ["Current remaining time: ", /* @__PURE__ */ a("span", {
52
- className: "font-medium",
53
- children: [_, " minutes"]
54
- })]
43
+ children: [
44
+ "Current remaining time:",
45
+ " ",
46
+ /* @__PURE__ */ i("span", {
47
+ className: "font-medium tabular-nums",
48
+ children: [x, " minutes"]
49
+ })
50
+ ]
55
51
  }),
56
- /* @__PURE__ */ i("div", {
52
+ /* @__PURE__ */ r("div", {
57
53
  className: "space-y-2 mb-4",
58
- children: o.map((e, t) => /* @__PURE__ */ a("button", {
54
+ children: u.map((e, t) => /* @__PURE__ */ i("button", {
59
55
  type: "button",
60
56
  onClick: () => {
61
- p(t), h("");
57
+ _(t), y("");
62
58
  },
63
- className: `w-full rounded-lg border px-4 py-2.5 text-left text-sm font-medium transition-colors ${f === t ? "border-primary bg-status-info-bg-subtle text-status-info-text" : "border-border-subtle hover:bg-bg-sunken text-text-secondary"}`,
59
+ className: `w-full rounded-lg border px-4 py-2.5 text-left text-sm font-medium transition-colors ${g === t ? "border-primary bg-status-info-bg-subtle text-status-info-text" : "border-border-subtle hover:bg-bg-sunken text-text-secondary"}`,
64
60
  children: ["+ ", e.label]
65
61
  }, e.seconds))
66
62
  }),
67
- /* @__PURE__ */ a("div", {
68
- className: "mb-6",
69
- children: [/* @__PURE__ */ i("label", {
63
+ /* @__PURE__ */ i("div", {
64
+ className: "mb-2",
65
+ children: [/* @__PURE__ */ r("label", {
70
66
  htmlFor: "extend-ttl-custom-minutes",
71
67
  className: "block text-sm font-medium text-text-secondary mb-1",
72
68
  children: "Custom duration (minutes)"
73
- }), /* @__PURE__ */ i("input", {
69
+ }), /* @__PURE__ */ r("input", {
74
70
  id: "extend-ttl-custom-minutes",
75
71
  type: "number",
76
72
  min: "1",
77
73
  max: "1440",
78
- value: m,
74
+ value: v,
79
75
  onChange: (e) => {
80
- h(e.target.value), p(null);
76
+ y(e.target.value), _(null);
81
77
  },
82
78
  placeholder: "Enter minutes",
83
79
  "aria-label": "Custom duration in minutes",
84
80
  className: "w-full rounded-lg border border-border-subtle px-3 py-2 text-sm focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
85
81
  })]
86
82
  }),
87
- /* @__PURE__ */ a("div", {
88
- className: "flex gap-3",
89
- children: [/* @__PURE__ */ i(e, {
90
- variant: "outline",
91
- onClick: c,
92
- className: "flex-1",
93
- children: "Cancel"
94
- }), /* @__PURE__ */ i(e, {
95
- onClick: () => {
96
- let e;
97
- if (f !== null) e = o[f].seconds;
98
- else if (m) {
99
- if (e = parseInt(m, 10) * 60, isNaN(e) || e <= 0) return;
100
- } else return;
101
- l(e);
102
- },
103
- disabled: d || f === null && !m,
104
- className: "flex-1",
105
- children: d ? "Extending..." : "Extend"
106
- })]
107
- })
83
+ /* @__PURE__ */ i(s, { children: [/* @__PURE__ */ r(e, {
84
+ variant: "outline",
85
+ onClick: f,
86
+ className: "flex-1",
87
+ children: "Cancel"
88
+ }), /* @__PURE__ */ r(e, {
89
+ onClick: () => {
90
+ let e;
91
+ if (g !== null) e = u[g].seconds;
92
+ else if (v) {
93
+ if (e = parseInt(v, 10) * 60, isNaN(e) || e <= 0) return;
94
+ } else return;
95
+ p(e);
96
+ },
97
+ disabled: h || g === null && !v,
98
+ className: "flex-1",
99
+ children: h ? "Extending..." : "Extend"
100
+ })] })
108
101
  ]
109
102
  })
110
103
  });
111
104
  }
112
105
  //#endregion
113
- export { s as ExtendTTLModal };
106
+ export { d as ExtendTTLModal };
114
107
 
115
108
  //# sourceMappingURL=ExtendTTLModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExtendTTLModal.js","names":[],"sources":["../../../src/sandbox/components/ExtendTTLModal.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Clock, X } from 'lucide-react';\nimport { Button } from './ui';\n\ninterface ExtendTTLModalProps {\n isOpen: boolean;\n onClose: () => void;\n onExtend: (additionalSeconds: number) => void;\n currentExpiresAt: string;\n isLoading?: boolean;\n}\n\nconst PRESET_DURATIONS = [\n { label: '15 minutes', seconds: 15 * 60 },\n { label: '30 minutes', seconds: 30 * 60 },\n { label: '1 hour', seconds: 60 * 60 },\n { label: '2 hours', seconds: 2 * 60 * 60 },\n];\n\nexport function ExtendTTLModal({\n isOpen,\n onClose,\n onExtend,\n currentExpiresAt,\n isLoading,\n}: ExtendTTLModalProps) {\n const [selectedPreset, setSelectedPreset] = useState<number | null>(null);\n const [customMinutes, setCustomMinutes] = useState('');\n\n if (!isOpen) return null;\n\n const remainingMs = new Date(currentExpiresAt).getTime() - Date.now();\n const remainingMinutes = Math.max(0, Math.floor(remainingMs / 60000));\n\n const handleExtend = () => {\n let seconds: number;\n if (selectedPreset !== null) {\n seconds = PRESET_DURATIONS[selectedPreset].seconds;\n } else if (customMinutes) {\n seconds = parseInt(customMinutes, 10) * 60;\n if (isNaN(seconds) || seconds <= 0) return;\n } else {\n return;\n }\n onExtend(seconds);\n };\n\n return (\n <div className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/50\">\n <div className=\"w-full max-w-md rounded-xl bg-bg-surface p-6 shadow-xl\">\n <div className=\"flex items-center justify-between mb-4\">\n <div className=\"flex items-center gap-2\">\n <Clock className=\"size-5 text-accent-blue\" />\n <h3 className=\"text-lg font-semibold\">Extend Sandbox Duration</h3>\n </div>\n <button\n type=\"button\"\n onClick={onClose}\n aria-label=\"Close dialog\"\n className=\"text-text-tertiary hover:text-text-secondary\"\n >\n <X className=\"size-5\" />\n </button>\n </div>\n\n <p className=\"text-sm text-text-secondary mb-4\">\n Current remaining time: <span className=\"font-medium\">{remainingMinutes} minutes</span>\n </p>\n\n <div className=\"space-y-2 mb-4\">\n {PRESET_DURATIONS.map((preset, i) => (\n <button\n key={preset.seconds}\n type=\"button\"\n onClick={() => {\n setSelectedPreset(i);\n setCustomMinutes('');\n }}\n className={`w-full rounded-lg border px-4 py-2.5 text-left text-sm font-medium transition-colors ${\n selectedPreset === i\n ? 'border-primary bg-status-info-bg-subtle text-status-info-text'\n : 'border-border-subtle hover:bg-bg-sunken text-text-secondary'\n }`}\n >\n + {preset.label}\n </button>\n ))}\n </div>\n\n <div className=\"mb-6\">\n <label\n htmlFor=\"extend-ttl-custom-minutes\"\n className=\"block text-sm font-medium text-text-secondary mb-1\"\n >\n Custom duration (minutes)\n </label>\n <input\n id=\"extend-ttl-custom-minutes\"\n type=\"number\"\n min=\"1\"\n max=\"1440\"\n value={customMinutes}\n onChange={(e) => {\n setCustomMinutes(e.target.value);\n setSelectedPreset(null);\n }}\n placeholder=\"Enter minutes\"\n aria-label=\"Custom duration in minutes\"\n className=\"w-full rounded-lg border border-border-subtle px-3 py-2 text-sm focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary\"\n />\n </div>\n\n <div className=\"flex gap-3\">\n <Button variant=\"outline\" onClick={onClose} className=\"flex-1\">\n Cancel\n </Button>\n <Button\n onClick={handleExtend}\n disabled={isLoading || (selectedPreset === null && !customMinutes)}\n className=\"flex-1\"\n >\n {isLoading ? 'Extending...' : 'Extend'}\n </Button>\n </div>\n </div>\n </div>\n );\n}\n"],"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AD;KAAK,WAAU;eAAf,CACE,kBAAC,SAAD;MACE,SAAQ;MACR,WAAU;gBACX;MAEO,CAAA,EACR,kBAAC,SAAD;MACE,IAAG;MACH,MAAK;MACL,KAAI;MACJ,KAAI;MACJ,OAAO;MACP,WAAW,MAAM;AAEf,OADA,EAAiB,EAAE,OAAO,MAAM,EAChC,EAAkB,KAAK;;MAEzB,aAAY;MACZ,cAAW;MACX,WAAU;MACV,CAAA,CACE;;IAEN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD;MAAQ,SAAQ;MAAU,SAAS;MAAS,WAAU;gBAAS;MAEtD,CAAA,EACT,kBAAC,GAAD;MACE,eAnFiB;OACzB,IAAI;AACJ,WAAI,MAAmB,KACrB,KAAU,EAAiB,GAAgB;gBAClC,GAET;YADA,IAAU,SAAS,GAAe,GAAG,GAAG,IACpC,MAAM,EAAQ,IAAI,KAAW,EAAG;aAEpC;AAEF,SAAS,EAAQ;;MA0ET,UAAU,KAAc,MAAmB,QAAQ,CAAC;MACpD,WAAU;gBAET,IAAY,iBAAiB;MACvB,CAAA,CACL;;IACF;;EACF,CAAA"}
1
+ {"version":3,"file":"ExtendTTLModal.js","names":[],"sources":["../../../src/sandbox/components/ExtendTTLModal.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Clock } from 'lucide-react';\nimport {\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogFooter,\n} from '@burdenoff/fe-libs/ui';\nimport { Button } from './ui';\n\ninterface ExtendTTLModalProps {\n isOpen: boolean;\n onClose: () => void;\n onExtend: (additionalSeconds: number) => void;\n currentExpiresAt: string;\n isLoading?: boolean;\n}\n\nconst PRESET_DURATIONS = [\n { label: '15 minutes', seconds: 15 * 60 },\n { label: '30 minutes', seconds: 30 * 60 },\n { label: '1 hour', seconds: 60 * 60 },\n { label: '2 hours', seconds: 2 * 60 * 60 },\n];\n\nexport function ExtendTTLModal({\n isOpen,\n onClose,\n onExtend,\n currentExpiresAt,\n isLoading,\n}: ExtendTTLModalProps) {\n const [selectedPreset, setSelectedPreset] = useState<number | null>(null);\n const [customMinutes, setCustomMinutes] = useState('');\n\n if (!isOpen) return null;\n\n const remainingMs = new Date(currentExpiresAt).getTime() - Date.now();\n const remainingMinutes = Math.max(0, Math.floor(remainingMs / 60000));\n\n const handleExtend = () => {\n let seconds: number;\n if (selectedPreset !== null) {\n seconds = PRESET_DURATIONS[selectedPreset].seconds;\n } else if (customMinutes) {\n seconds = parseInt(customMinutes, 10) * 60;\n if (isNaN(seconds) || seconds <= 0) return;\n } else {\n return;\n }\n onExtend(seconds);\n };\n\n return (\n <ResponsiveDialog\n open={isOpen}\n onOpenChange={(open) => {\n if (!open) onClose();\n }}\n >\n <ResponsiveDialogContent className=\"max-w-md\">\n <ResponsiveDialogHeader>\n <ResponsiveDialogTitle className=\"flex items-center gap-2\">\n <Clock className=\"size-5 text-accent-blue\" />\n Extend Sandbox Duration\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n\n <p className=\"text-sm text-text-secondary mb-4\">\n Current remaining time:{' '}\n <span className=\"font-medium tabular-nums\">{remainingMinutes} minutes</span>\n </p>\n\n <div className=\"space-y-2 mb-4\">\n {PRESET_DURATIONS.map((preset, i) => (\n <button\n key={preset.seconds}\n type=\"button\"\n onClick={() => {\n setSelectedPreset(i);\n setCustomMinutes('');\n }}\n className={`w-full rounded-lg border px-4 py-2.5 text-left text-sm font-medium transition-colors ${\n selectedPreset === i\n ? 'border-primary bg-status-info-bg-subtle text-status-info-text'\n : 'border-border-subtle hover:bg-bg-sunken text-text-secondary'\n }`}\n >\n + {preset.label}\n </button>\n ))}\n </div>\n\n <div className=\"mb-2\">\n <label\n htmlFor=\"extend-ttl-custom-minutes\"\n className=\"block text-sm font-medium text-text-secondary mb-1\"\n >\n Custom duration (minutes)\n </label>\n <input\n id=\"extend-ttl-custom-minutes\"\n type=\"number\"\n min=\"1\"\n max=\"1440\"\n value={customMinutes}\n onChange={(e) => {\n setCustomMinutes(e.target.value);\n setSelectedPreset(null);\n }}\n placeholder=\"Enter minutes\"\n aria-label=\"Custom duration in minutes\"\n className=\"w-full rounded-lg border border-border-subtle px-3 py-2 text-sm focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary\"\n />\n </div>\n\n <ResponsiveDialogFooter>\n <Button variant=\"outline\" onClick={onClose} className=\"flex-1\">\n Cancel\n </Button>\n <Button\n onClick={handleExtend}\n disabled={isLoading || (selectedPreset === null && !customMinutes)}\n className=\"flex-1\"\n >\n {isLoading ? 'Extending...' : 'Extend'}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;AAmBA,IAAM,IAAmB;CACvB;EAAE,OAAO;EAAc,SAAS;EAAS;CACzC;EAAE,OAAO;EAAc,SAAS;EAAS;CACzC;EAAE,OAAO;EAAU,SAAS;EAAS;CACrC;EAAE,OAAO;EAAW,SAAS;EAAa;CAC3C;AAED,SAAgB,EAAe,EAC7B,WACA,YACA,aACA,qBACA,gBACsB;CACtB,IAAM,CAAC,GAAgB,KAAqB,EAAwB,KAAK,EACnE,CAAC,GAAe,KAAoB,EAAS,GAAG;AAEtD,KAAI,CAAC,EAAQ,QAAO;CAEpB,IAAM,IAAc,IAAI,KAAK,EAAiB,CAAC,SAAS,GAAG,KAAK,KAAK,EAC/D,IAAmB,KAAK,IAAI,GAAG,KAAK,MAAM,IAAc,IAAM,CAAC;AAerE,QACE,kBAAC,GAAD;EACE,MAAM;EACN,eAAe,MAAS;AACtB,GAAK,KAAM,GAAS;;YAGtB,kBAAC,GAAD;GAAyB,WAAU;aAAnC;IACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;KAAuB,WAAU;eAAjC,CACE,kBAAC,GAAD,EAAO,WAAU,2BAA4B,CAAA,EAAA,0BAEvB;QACD,CAAA;IAEzB,kBAAC,KAAD;KAAG,WAAU;eAAb;MAAgD;MACtB;MACxB,kBAAC,QAAD;OAAM,WAAU;iBAAhB,CAA4C,GAAiB,WAAe;;MAC1E;;IAEJ,kBAAC,OAAD;KAAK,WAAU;eACZ,EAAiB,KAAK,GAAQ,MAC7B,kBAAC,UAAD;MAEE,MAAK;MACL,eAAe;AAEb,OADA,EAAkB,EAAE,EACpB,EAAiB,GAAG;;MAEtB,WAAW,wFACT,MAAmB,IACf,kEACA;gBAVR,CAYC,MACI,EAAO,MACH;QAbF,EAAO,QAaL,CACT;KACE,CAAA;IAEN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,SAAD;MACE,SAAQ;MACR,WAAU;gBACX;MAEO,CAAA,EACR,kBAAC,SAAD;MACE,IAAG;MACH,MAAK;MACL,KAAI;MACJ,KAAI;MACJ,OAAO;MACP,WAAW,MAAM;AAEf,OADA,EAAiB,EAAE,OAAO,MAAM,EAChC,EAAkB,KAAK;;MAEzB,aAAY;MACZ,cAAW;MACX,WAAU;MACV,CAAA,CACE;;IAEN,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KAAQ,SAAQ;KAAU,SAAS;KAAS,WAAU;eAAS;KAEtD,CAAA,EACT,kBAAC,GAAD;KACE,eAjFiB;MACzB,IAAI;AACJ,UAAI,MAAmB,KACrB,KAAU,EAAiB,GAAgB;eAClC,GAET;WADA,IAAU,SAAS,GAAe,GAAG,GAAG,IACpC,MAAM,EAAQ,IAAI,KAAW,EAAG;YAEpC;AAEF,QAAS,EAAQ;;KAwET,UAAU,KAAc,MAAmB,QAAQ,CAAC;KACpD,WAAU;eAET,IAAY,iBAAiB;KACvB,CAAA,CACc,EAAA,CAAA;IACD;;EACT,CAAA"}
@@ -27,28 +27,28 @@ function v({ value: v, onChange: y }) {
27
27
  }), v !== null && /* @__PURE__ */ h("button", {
28
28
  type: "button",
29
29
  onClick: () => y(null),
30
- className: "text-xs text-muted-foreground hover:text-foreground transition-colors",
30
+ className: "text-xs text-text-secondary hover:text-text-primary transition-colors",
31
31
  children: n(b, "sandbox.create.fields.filesFolder.clear", "Clear")
32
32
  })]
33
33
  }),
34
34
  /* @__PURE__ */ h("p", {
35
- className: "text-xs text-muted-foreground",
35
+ className: "text-xs text-text-secondary",
36
36
  children: n(b, "sandbox.create.fields.filesFolder.help", "When the sandbox stops, the volume contents are best-effort copied to this folder. Leave empty to skip export.")
37
37
  }),
38
38
  A && /* @__PURE__ */ g("div", {
39
- className: "flex items-center gap-2 text-xs text-destructive",
39
+ className: "flex items-center gap-2 text-xs text-status-error-text",
40
40
  children: [/* @__PURE__ */ h(c, { className: "size-4" }), A.message]
41
41
  }),
42
42
  /* @__PURE__ */ g("div", {
43
- className: "border-2 border-border rounded-lg bg-background max-h-56 overflow-y-auto",
43
+ className: "border-2 border-border-subtle rounded-lg bg-bg-surface max-h-56 overflow-y-auto",
44
44
  children: [k && F.length === 0 ? /* @__PURE__ */ g("div", {
45
- className: "flex items-center justify-center py-6 text-muted-foreground",
45
+ className: "flex items-center justify-center py-6 text-text-secondary",
46
46
  children: [/* @__PURE__ */ h(f, { className: "size-4 animate-spin mr-2" }), /* @__PURE__ */ h("span", {
47
47
  className: "text-sm",
48
48
  children: n(b, "sandbox.create.fields.filesFolder.loading", "Loading folders…")
49
49
  })]
50
50
  }) : F.length === 0 ? /* @__PURE__ */ h("div", {
51
- className: "px-4 py-6 text-sm text-muted-foreground text-center",
51
+ className: "px-4 py-6 text-sm text-text-secondary text-center",
52
52
  children: n(b, "sandbox.create.fields.filesFolder.empty", "No folders yet — create one below.")
53
53
  }) : /* @__PURE__ */ h("ul", {
54
54
  className: "divide-y divide-border",
@@ -57,16 +57,16 @@ function v({ value: v, onChange: y }) {
57
57
  return /* @__PURE__ */ h("li", { children: /* @__PURE__ */ g("button", {
58
58
  type: "button",
59
59
  onClick: () => y(e.id),
60
- className: `w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-muted ${t ? "bg-primary/10" : ""}`,
60
+ className: `w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-bg-sunken ${t ? "bg-action-primary-bg/10" : ""}`,
61
61
  children: [
62
- t ? /* @__PURE__ */ h(d, { className: "size-4 text-primary" }) : /* @__PURE__ */ h(u, { className: "size-4 text-muted-foreground" }),
62
+ t ? /* @__PURE__ */ h(d, { className: "size-4 text-primary" }) : /* @__PURE__ */ h(u, { className: "size-4 text-text-secondary" }),
63
63
  /* @__PURE__ */ g("div", {
64
64
  className: "flex-1 min-w-0",
65
65
  children: [/* @__PURE__ */ h("p", {
66
66
  className: "text-sm font-medium truncate",
67
67
  children: e.name
68
68
  }), e.path && /* @__PURE__ */ h("p", {
69
- className: "text-xs text-muted-foreground truncate",
69
+ className: "text-xs text-text-secondary truncate",
70
70
  children: e.path
71
71
  })]
72
72
  }),
@@ -75,7 +75,7 @@ function v({ value: v, onChange: y }) {
75
75
  }) }, e.id);
76
76
  })
77
77
  }), I && /* @__PURE__ */ h("div", {
78
- className: "border-t border-border p-2",
78
+ className: "border-t border-border-subtle p-2",
79
79
  children: /* @__PURE__ */ g(e, {
80
80
  type: "button",
81
81
  variant: "ghost",
@@ -148,7 +148,7 @@ function v({ value: v, onChange: y }) {
148
148
  children: [/* @__PURE__ */ h(p, { className: "size-3 mr-2" }), n(b, "sandbox.create.fields.filesFolder.createNew", "Create folder")]
149
149
  }),
150
150
  E && /* @__PURE__ */ g("div", {
151
- className: "flex items-center gap-2 text-xs text-destructive",
151
+ className: "flex items-center gap-2 text-xs text-status-error-text",
152
152
  children: [/* @__PURE__ */ h(c, { className: "size-4" }), E]
153
153
  })
154
154
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"FilesFolderPicker.js","names":[],"sources":["../../../src/sandbox/components/FilesFolderPicker.tsx"],"sourcesContent":["import { useState, useMemo, useRef } from 'react';\nimport { FolderOpen, Folder, Plus, Loader2, Check, AlertCircle } from 'lucide-react';\nimport { Button, Input } from './ui';\nimport { tWithFallback } from '../utils/i18n';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n useSandboxGetFoldersQuery,\n useSandboxCreateFolderMutation,\n} from '../../generated/wspace-operations';\n\nconst PAGE_SIZE = 20;\n\ninterface FilesFolderPickerProps {\n /** Currently selected folder id (uncontrolled-leaning controlled). */\n value: string | null;\n /** Fired with the selected folder id (or null when cleared). */\n onChange: (folderId: string | null) => void;\n}\n\n/**\n * Picks a files-svc folder for sandbox volume export on stop.\n *\n * Behaviour:\n * - Lists folders from the workspaces gateway via `getFolders` (offset paging\n * — wspace.graphql exposes limit/offset, not cursor).\n * - \"Load more\" appends; \"Create folder\" inline action calls `createFolder`\n * and selects the newly created folder.\n * - Selection writes the folder id back through `onChange`.\n *\n * Styling sticks to semantic tokens (`bg-card`, `text-muted-foreground`,\n * `border-border`, `text-primary`) — no raw colours.\n */\nexport function FilesFolderPicker({ value, onChange }: FilesFolderPickerProps) {\n const { t } = useI18n();\n const offsetRef = useRef(0);\n const [creating, setCreating] = useState(false);\n const [newFolderName, setNewFolderName] = useState('');\n const [createError, setCreateError] = useState<string | null>(null);\n\n const { data, loading, error, fetchMore, refetch } = useSandboxGetFoldersQuery({\n variables: { pagination: { limit: PAGE_SIZE, offset: 0 } },\n fetchPolicy: 'cache-and-network',\n notifyOnNetworkStatusChange: true,\n });\n\n const [createFolderMutation, { loading: createLoading }] = useSandboxCreateFolderMutation();\n\n interface FolderRow {\n id: string;\n name: string;\n path: string;\n parentFolderId?: string | null;\n }\n const folders: FolderRow[] = useMemo(\n () => (data?.getFolders.folders ?? []) as FolderRow[],\n [data]\n );\n const hasMore = data?.getFolders.hasMore ?? false;\n\n const handleLoadMore = async (): Promise<void> => {\n const next = offsetRef.current + PAGE_SIZE;\n await fetchMore({\n variables: { pagination: { limit: PAGE_SIZE, offset: next } },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n ...fetchMoreResult,\n getFolders: {\n ...fetchMoreResult.getFolders,\n folders: [...prev.getFolders.folders, ...fetchMoreResult.getFolders.folders],\n },\n };\n },\n });\n offsetRef.current = next;\n };\n\n const handleCreate = async (): Promise<void> => {\n const name = newFolderName.trim();\n if (!name) return;\n setCreateError(null);\n try {\n const result = await createFolderMutation({ variables: { input: { name } } });\n const created = result.data?.createFolder;\n if (created) {\n onChange(created.id);\n setNewFolderName('');\n setCreating(false);\n await refetch();\n }\n } catch (err) {\n setCreateError(err instanceof Error ? err.message : String(err));\n }\n };\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <label className=\"block text-sm font-semibold\">\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.label', 'Export folder (files-svc)')}\n </label>\n {value !== null && (\n <button\n type=\"button\"\n onClick={() => onChange(null)}\n className=\"text-xs text-muted-foreground hover:text-foreground transition-colors\"\n >\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.clear', 'Clear')}\n </button>\n )}\n </div>\n\n <p className=\"text-xs text-muted-foreground\">\n {tWithFallback(\n t,\n 'sandbox.create.fields.filesFolder.help',\n 'When the sandbox stops, the volume contents are best-effort copied to this folder. Leave empty to skip export.'\n )}\n </p>\n\n {error && (\n <div className=\"flex items-center gap-2 text-xs text-destructive\">\n <AlertCircle className=\"size-4\" />\n {error.message}\n </div>\n )}\n\n <div className=\"border-2 border-border rounded-lg bg-background max-h-56 overflow-y-auto\">\n {loading && folders.length === 0 ? (\n <div className=\"flex items-center justify-center py-6 text-muted-foreground\">\n <Loader2 className=\"size-4 animate-spin mr-2\" />\n <span className=\"text-sm\">\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.loading', 'Loading folders…')}\n </span>\n </div>\n ) : folders.length === 0 ? (\n <div className=\"px-4 py-6 text-sm text-muted-foreground text-center\">\n {tWithFallback(\n t,\n 'sandbox.create.fields.filesFolder.empty',\n 'No folders yet — create one below.'\n )}\n </div>\n ) : (\n <ul className=\"divide-y divide-border\">\n {folders.map((folder) => {\n const isSelected = folder.id === value;\n return (\n <li key={folder.id}>\n <button\n type=\"button\"\n onClick={() => onChange(folder.id)}\n className={`w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-muted ${\n isSelected ? 'bg-primary/10' : ''\n }`}\n >\n {isSelected ? (\n <FolderOpen className=\"size-4 text-primary\" />\n ) : (\n <Folder className=\"size-4 text-muted-foreground\" />\n )}\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium truncate\">{folder.name}</p>\n {folder.path && (\n <p className=\"text-xs text-muted-foreground truncate\">{folder.path}</p>\n )}\n </div>\n {isSelected && <Check className=\"size-4 text-primary\" />}\n </button>\n </li>\n );\n })}\n </ul>\n )}\n\n {hasMore && (\n <div className=\"border-t border-border p-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={handleLoadMore}\n disabled={loading}\n className=\"w-full\"\n >\n {loading ? <Loader2 className=\"size-3 animate-spin mr-2\" /> : null}\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.loadMore', 'Load more')}\n </Button>\n </div>\n )}\n </div>\n\n {creating ? (\n <div className=\"flex items-center gap-2\">\n <Input\n value={newFolderName}\n onChange={(e) => setNewFolderName(e.target.value)}\n placeholder={tWithFallback(\n t,\n 'sandbox.create.fields.filesFolder.newPlaceholder',\n 'Folder name'\n )}\n className=\"flex-1\"\n autoFocus\n />\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={handleCreate}\n disabled={createLoading || newFolderName.trim().length === 0}\n >\n {createLoading ? <Loader2 className=\"size-3 animate-spin mr-2\" /> : null}\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.createConfirm', 'Create')}\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n onClick={() => {\n setCreating(false);\n setNewFolderName('');\n setCreateError(null);\n }}\n >\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.cancel', 'Cancel')}\n </Button>\n </div>\n ) : (\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={() => setCreating(true)}>\n <Plus className=\"size-3 mr-2\" />\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.createNew', 'Create folder')}\n </Button>\n )}\n\n {createError && (\n <div className=\"flex items-center gap-2 text-xs text-destructive\">\n <AlertCircle className=\"size-4\" />\n {createError}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAUA,IAAM,IAAY;AAsBlB,SAAgB,EAAkB,EAAE,UAAO,eAAoC;CAC7E,IAAM,EAAE,SAAM,GAAS,EACjB,IAAY,EAAO,EAAE,EACrB,CAAC,GAAU,KAAe,EAAS,GAAM,EACzC,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,CAAC,GAAa,KAAkB,EAAwB,KAAK,EAE7D,EAAE,SAAM,YAAS,UAAO,cAAW,eAAY,EAA0B;EAC7E,WAAW,EAAE,YAAY;GAAE,OAAO;GAAW,QAAQ;GAAG,EAAE;EAC1D,aAAa;EACb,6BAA6B;EAC9B,CAAC,EAEI,CAAC,GAAsB,EAAE,SAAS,OAAmB,GAAgC,EAQrF,IAAuB,QACpB,GAAM,WAAW,WAAW,EAAE,EACrC,CAAC,EAAK,CACP,EACK,IAAU,GAAM,WAAW,WAAW;AAsC5C,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,SAAD;KAAO,WAAU;eACd,EAAc,GAAG,2CAA2C,4BAA4B;KACnF,CAAA,EACP,MAAU,QACT,kBAAC,UAAD;KACE,MAAK;KACL,eAAe,EAAS,KAAK;KAC7B,WAAU;eAET,EAAc,GAAG,2CAA2C,QAAQ;KAC9D,CAAA,CAEP;;GAEN,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,GACA,0CACA,iHACD;IACC,CAAA;GAEH,KACC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAa,WAAU,UAAW,CAAA,EACjC,EAAM,QACH;;GAGR,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,KAAW,EAAQ,WAAW,IAC7B,kBAAC,OA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V,KACC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAa,WAAU,UAAW,CAAA,EACjC,EACG;;GAEJ"}
1
+ {"version":3,"file":"FilesFolderPicker.js","names":[],"sources":["../../../src/sandbox/components/FilesFolderPicker.tsx"],"sourcesContent":["import { useState, useMemo, useRef } from 'react';\nimport { FolderOpen, Folder, Plus, Loader2, Check, AlertCircle } from 'lucide-react';\nimport { Button, Input } from './ui';\nimport { tWithFallback } from '../utils/i18n';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport {\n useSandboxGetFoldersQuery,\n useSandboxCreateFolderMutation,\n} from '../../generated/wspace-operations';\n\nconst PAGE_SIZE = 20;\n\ninterface FilesFolderPickerProps {\n /** Currently selected folder id (uncontrolled-leaning controlled). */\n value: string | null;\n /** Fired with the selected folder id (or null when cleared). */\n onChange: (folderId: string | null) => void;\n}\n\n/**\n * Picks a files-svc folder for sandbox volume export on stop.\n *\n * Behaviour:\n * - Lists folders from the workspaces gateway via `getFolders` (offset paging\n * — wspace.graphql exposes limit/offset, not cursor).\n * - \"Load more\" appends; \"Create folder\" inline action calls `createFolder`\n * and selects the newly created folder.\n * - Selection writes the folder id back through `onChange`.\n *\n * Styling sticks to semantic tokens (`bg-bg-surface`, `text-text-secondary`,\n * `border-border-subtle`, `text-primary`) — no raw colours.\n */\nexport function FilesFolderPicker({ value, onChange }: FilesFolderPickerProps) {\n const { t } = useI18n();\n const offsetRef = useRef(0);\n const [creating, setCreating] = useState(false);\n const [newFolderName, setNewFolderName] = useState('');\n const [createError, setCreateError] = useState<string | null>(null);\n\n const { data, loading, error, fetchMore, refetch } = useSandboxGetFoldersQuery({\n variables: { pagination: { limit: PAGE_SIZE, offset: 0 } },\n fetchPolicy: 'cache-and-network',\n notifyOnNetworkStatusChange: true,\n });\n\n const [createFolderMutation, { loading: createLoading }] = useSandboxCreateFolderMutation();\n\n interface FolderRow {\n id: string;\n name: string;\n path: string;\n parentFolderId?: string | null;\n }\n const folders: FolderRow[] = useMemo(\n () => (data?.getFolders.folders ?? []) as FolderRow[],\n [data]\n );\n const hasMore = data?.getFolders.hasMore ?? false;\n\n const handleLoadMore = async (): Promise<void> => {\n const next = offsetRef.current + PAGE_SIZE;\n await fetchMore({\n variables: { pagination: { limit: PAGE_SIZE, offset: next } },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n ...fetchMoreResult,\n getFolders: {\n ...fetchMoreResult.getFolders,\n folders: [...prev.getFolders.folders, ...fetchMoreResult.getFolders.folders],\n },\n };\n },\n });\n offsetRef.current = next;\n };\n\n const handleCreate = async (): Promise<void> => {\n const name = newFolderName.trim();\n if (!name) return;\n setCreateError(null);\n try {\n const result = await createFolderMutation({ variables: { input: { name } } });\n const created = result.data?.createFolder;\n if (created) {\n onChange(created.id);\n setNewFolderName('');\n setCreating(false);\n await refetch();\n }\n } catch (err) {\n setCreateError(err instanceof Error ? err.message : String(err));\n }\n };\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <label className=\"block text-sm font-semibold\">\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.label', 'Export folder (files-svc)')}\n </label>\n {value !== null && (\n <button\n type=\"button\"\n onClick={() => onChange(null)}\n className=\"text-xs text-text-secondary hover:text-text-primary transition-colors\"\n >\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.clear', 'Clear')}\n </button>\n )}\n </div>\n\n <p className=\"text-xs text-text-secondary\">\n {tWithFallback(\n t,\n 'sandbox.create.fields.filesFolder.help',\n 'When the sandbox stops, the volume contents are best-effort copied to this folder. Leave empty to skip export.'\n )}\n </p>\n\n {error && (\n <div className=\"flex items-center gap-2 text-xs text-status-error-text\">\n <AlertCircle className=\"size-4\" />\n {error.message}\n </div>\n )}\n\n <div className=\"border-2 border-border-subtle rounded-lg bg-bg-surface max-h-56 overflow-y-auto\">\n {loading && folders.length === 0 ? (\n <div className=\"flex items-center justify-center py-6 text-text-secondary\">\n <Loader2 className=\"size-4 animate-spin mr-2\" />\n <span className=\"text-sm\">\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.loading', 'Loading folders…')}\n </span>\n </div>\n ) : folders.length === 0 ? (\n <div className=\"px-4 py-6 text-sm text-text-secondary text-center\">\n {tWithFallback(\n t,\n 'sandbox.create.fields.filesFolder.empty',\n 'No folders yet — create one below.'\n )}\n </div>\n ) : (\n <ul className=\"divide-y divide-border\">\n {folders.map((folder) => {\n const isSelected = folder.id === value;\n return (\n <li key={folder.id}>\n <button\n type=\"button\"\n onClick={() => onChange(folder.id)}\n className={`w-full flex items-center gap-3 px-4 py-2.5 text-left transition-colors hover:bg-bg-sunken ${\n isSelected ? 'bg-action-primary-bg/10' : ''\n }`}\n >\n {isSelected ? (\n <FolderOpen className=\"size-4 text-primary\" />\n ) : (\n <Folder className=\"size-4 text-text-secondary\" />\n )}\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-sm font-medium truncate\">{folder.name}</p>\n {folder.path && (\n <p className=\"text-xs text-text-secondary truncate\">{folder.path}</p>\n )}\n </div>\n {isSelected && <Check className=\"size-4 text-primary\" />}\n </button>\n </li>\n );\n })}\n </ul>\n )}\n\n {hasMore && (\n <div className=\"border-t border-border-subtle p-2\">\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={handleLoadMore}\n disabled={loading}\n className=\"w-full\"\n >\n {loading ? <Loader2 className=\"size-3 animate-spin mr-2\" /> : null}\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.loadMore', 'Load more')}\n </Button>\n </div>\n )}\n </div>\n\n {creating ? (\n <div className=\"flex items-center gap-2\">\n <Input\n value={newFolderName}\n onChange={(e) => setNewFolderName(e.target.value)}\n placeholder={tWithFallback(\n t,\n 'sandbox.create.fields.filesFolder.newPlaceholder',\n 'Folder name'\n )}\n className=\"flex-1\"\n autoFocus\n />\n <Button\n type=\"button\"\n size=\"sm\"\n onClick={handleCreate}\n disabled={createLoading || newFolderName.trim().length === 0}\n >\n {createLoading ? <Loader2 className=\"size-3 animate-spin mr-2\" /> : null}\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.createConfirm', 'Create')}\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"ghost\"\n onClick={() => {\n setCreating(false);\n setNewFolderName('');\n setCreateError(null);\n }}\n >\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.cancel', 'Cancel')}\n </Button>\n </div>\n ) : (\n <Button type=\"button\" variant=\"outline\" size=\"sm\" onClick={() => setCreating(true)}>\n <Plus className=\"size-3 mr-2\" />\n {tWithFallback(t, 'sandbox.create.fields.filesFolder.createNew', 'Create folder')}\n </Button>\n )}\n\n {createError && (\n <div className=\"flex items-center gap-2 text-xs text-status-error-text\">\n <AlertCircle className=\"size-4\" />\n {createError}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAUA,IAAM,IAAY;AAsBlB,SAAgB,EAAkB,EAAE,UAAO,eAAoC;CAC7E,IAAM,EAAE,SAAM,GAAS,EACjB,IAAY,EAAO,EAAE,EACrB,CAAC,GAAU,KAAe,EAAS,GAAM,EACzC,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,CAAC,GAAa,KAAkB,EAAwB,KAAK,EAE7D,EAAE,SAAM,YAAS,UAAO,cAAW,eAAY,EAA0B;EAC7E,WAAW,EAAE,YAAY;GAAE,OAAO;GAAW,QAAQ;GAAG,EAAE;EAC1D,aAAa;EACb,6BAA6B;EAC9B,CAAC,EAEI,CAAC,GAAsB,EAAE,SAAS,OAAmB,GAAgC,EAQrF,IAAuB,QACpB,GAAM,WAAW,WAAW,EAAE,EACrC,CAAC,EAAK,CACP,EACK,IAAU,GAAM,WAAW,WAAW;AAsC5C,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,SAAD;KAAO,WAAU;eACd,EAAc,GAAG,2CAA2C,4BAA4B;KACnF,CAAA,EACP,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AAmD,SAAS,CACvE;;KACT,kBAAC,GAAD;MACE,MAAK;MACL,MAAK;MACL,SAAQ;MACR,eAAe;AAGb,OAFA,EAAY,GAAM,EAClB,EAAiB,GAAG,EACpB,EAAe,KAAK;;gBAGrB,EAAc,GAAG,4CAA4C,SAAS;MAChE,CAAA;KACL;QAEN,kBAAC,GAAD;IAAQ,MAAK;IAAS,SAAQ;IAAU,MAAK;IAAK,eAAe,EAAY,GAAK;cAAlF,CACE,kBAAC,GAAD,EAAM,WAAU,eAAgB,CAAA,EAC/B,EAAc,GAAG,+CAA+C,gBAAgB,CAC1E;;GAGV,KACC,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAa,WAAU,UAAW,CAAA,EACjC,EACG;;GAEJ"}
@@ -13,7 +13,7 @@ var i = {
13
13
  };
14
14
  function a({ children: r, title: a, subtitle: o, icon: s, headerActions: c, headerContent: l, maxWidth: u = "xl", showHeader: d = !0, className: f, contentClassName: p }) {
15
15
  return /* @__PURE__ */ t("div", {
16
- className: e("min-h-screen w-full bg-bg-surface text-text-primary", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-500", f),
16
+ className: e("min-h-screen w-full bg-bg-surface text-text-primary", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-200", f),
17
17
  children: /* @__PURE__ */ n("div", {
18
18
  className: e("mx-auto w-full", i[u], p),
19
19
  children: [d && (a || c) && /* @__PURE__ */ n("header", {
@@ -25,14 +25,14 @@ function a({ children: r, title: a, subtitle: o, icon: s, headerActions: c, head
25
25
  children: [(a || s) && /* @__PURE__ */ n("div", {
26
26
  className: "flex items-center gap-3",
27
27
  children: [s && /* @__PURE__ */ t("div", {
28
- className: "flex-shrink-0 p-2.5 rounded-xl bg-primary/10 text-primary",
28
+ className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
29
29
  children: s
30
30
  }), a && /* @__PURE__ */ t("h1", {
31
- className: "text-2xl sm:text-3xl font-bold tracking-tight text-foreground",
31
+ className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
32
32
  children: a
33
33
  })]
34
34
  }), o && /* @__PURE__ */ t("p", {
35
- className: "text-sm sm:text-base text-muted-foreground max-w-2xl",
35
+ className: "text-sm sm:text-base text-text-secondary max-w-2xl",
36
36
  children: o
37
37
  })]
38
38
  }), c && /* @__PURE__ */ t("div", {
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/sandbox/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { EmptyState as CanonicalEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: 'max-w-screen-sm',\n md: 'max-w-screen-md',\n lg: 'max-w-screen-lg',\n xl: 'max-w-screen-xl',\n '2xl': 'max-w-screen-2xl',\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n 'min-h-screen w-full bg-bg-surface text-text-primary',\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n 'py-6 sm:py-8 lg:py-10',\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-500',\n className\n )}\n >\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-primary/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-muted-foreground max-w-2xl\">{subtitle}</p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n * Keeps the existing microfe-sandbox call sites stable while routing all\n * empty-state rendering through the shared primitive.\n */\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n return (\n <div className={className}>\n <CanonicalEmptyState icon={icon} title={title} description={description} action={action} />\n </div>\n );\n}\n"],"mappings":";;;;AA0BA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAKD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,uDACA,iCACA,yBACA,4DACA,EACD;YAED,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,EAAiB;aAAjF,CACG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA,EAEP,KACC,kBAAC,MAAD;QAAI,WAAU;kBACX;QACE,CAAA,CAEH;UAEP,KACC,kBAAC,KAAD;OAAG,WAAU;iBAAwD;OAAa,CAAA,CAEhF;SACL,KACC,kBAAC,OAAD;MAAK,WAAU;gBAAyC;MAAoB,CAAA,CAE1E;QACL,KAAiB,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAoB,CAAA,CACtD;OAKX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AASV,SAAgB,EAAW,EACzB,SACA,UACA,gBACA,WACA,gBAOC;AACD,QACE,kBAAC,OAAD;EAAgB;YACd,kBAAC,GAAD;GAA2B;GAAa;GAAoB;GAAqB;GAAU,CAAA;EACvF,CAAA"}
1
+ {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/sandbox/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { EmptyState as CanonicalEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: 'max-w-screen-sm',\n md: 'max-w-screen-md',\n lg: 'max-w-screen-lg',\n xl: 'max-w-screen-xl',\n '2xl': 'max-w-screen-2xl',\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n 'min-h-screen w-full bg-bg-surface text-text-primary',\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n 'py-6 sm:py-8 lg:py-10',\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-200',\n className\n )}\n >\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-text-primary\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-text-secondary max-w-2xl\">{subtitle}</p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n * Keeps the existing microfe-sandbox call sites stable while routing all\n * empty-state rendering through the shared primitive.\n */\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n return (\n <div className={className}>\n <CanonicalEmptyState icon={icon} title={title} description={description} action={action} />\n </div>\n );\n}\n"],"mappings":";;;;AA0BA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAKD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EACT,uDACA,iCACA,yBACA,4DACA,EACD;YAED,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,EAAiB;aAAjF,CACG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA,EAEP,KACC,kBAAC,MAAD;QAAI,WAAU;kBACX;QACE,CAAA,CAEH;UAEP,KACC,kBAAC,KAAD;OAAG,WAAU;iBAAsD;OAAa,CAAA,CAE9E;SACL,KACC,kBAAC,OAAD;MAAK,WAAU;gBAAyC;MAAoB,CAAA,CAE1E;QACL,KAAiB,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAoB,CAAA,CACtD;OAKX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AASV,SAAgB,EAAW,EACzB,SACA,UACA,gBACA,WACA,gBAOC;AACD,QACE,kBAAC,OAAD;EAAgB;YACd,kBAAC,GAAD;GAA2B;GAAa;GAAoB;GAAqB;GAAU,CAAA;EACvF,CAAA"}
@@ -26,14 +26,14 @@ var o = ({ cpuRequest: o, cpuLimit: s, memoryRequest: c, memoryLimit: l, contain
26
26
  return f === "grid" ? /* @__PURE__ */ i("div", {
27
27
  className: e("grid grid-cols-3 gap-3", d),
28
28
  children: p.map((e) => /* @__PURE__ */ a("div", {
29
- className: "flex flex-col items-center gap-1 p-2 rounded-lg bg-muted/50",
29
+ className: "flex flex-col items-center gap-1 p-2 rounded-lg bg-bg-sunken/50",
30
30
  children: [
31
31
  /* @__PURE__ */ i(e.icon, {
32
32
  size: 16,
33
33
  className: e.color
34
34
  }),
35
35
  /* @__PURE__ */ i("span", {
36
- className: "text-xs text-muted-foreground",
36
+ className: "text-xs text-text-secondary",
37
37
  children: e.label
38
38
  }),
39
39
  /* @__PURE__ */ i("span", {
@@ -56,7 +56,7 @@ var o = ({ cpuRequest: o, cpuLimit: s, memoryRequest: c, memoryLimit: l, contain
56
56
  children: e.value
57
57
  }),
58
58
  t < p.length - 1 && /* @__PURE__ */ i("span", {
59
- className: "ml-2 text-muted-foreground/40",
59
+ className: "ml-2 text-text-secondary/40",
60
60
  children: "|"
61
61
  })
62
62
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceDisplay.js","names":[],"sources":["../../../src/sandbox/components/ResourceDisplay.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Cpu, MemoryStick, Container } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface ResourceDisplayProps {\n cpuRequest: string;\n cpuLimit?: string;\n memoryRequest: string;\n memoryLimit?: string;\n containerCount?: number;\n className?: string;\n layout?: 'inline' | 'grid';\n}\n\n/**\n * Compact display for sandbox resource allocation (CPU / Memory / Containers)\n */\nexport const ResourceDisplay: FC<ResourceDisplayProps> = ({\n cpuRequest,\n cpuLimit,\n memoryRequest,\n memoryLimit,\n containerCount,\n className,\n layout = 'inline',\n}) => {\n const items = [\n {\n icon: Cpu,\n label: 'CPU',\n value: cpuLimit ? `${cpuRequest} / ${cpuLimit}` : cpuRequest,\n color: 'text-accent-blue',\n },\n {\n icon: MemoryStick,\n label: 'Memory',\n value: memoryLimit ? `${memoryRequest} / ${memoryLimit}` : memoryRequest,\n color: 'text-accent-purple',\n },\n ...(containerCount !== undefined\n ? [\n {\n icon: Container,\n label: 'Containers',\n value: `${containerCount}`,\n color: 'text-status-warning-text',\n },\n ]\n : []),\n ];\n\n if (layout === 'grid') {\n return (\n <div className={cn('grid grid-cols-3 gap-3', className)}>\n {items.map((item) => (\n <div\n key={item.label}\n className=\"flex flex-col items-center gap-1 p-2 rounded-lg bg-muted/50\"\n >\n <item.icon size={16} className={item.color} />\n <span className=\"text-xs text-muted-foreground\">{item.label}</span>\n <span className=\"text-sm font-semibold\">{item.value}</span>\n </div>\n ))}\n </div>\n );\n }\n\n return (\n <div className={cn('flex items-center gap-3 text-sm', className)}>\n {items.map((item, index) => (\n <span key={item.label} className=\"inline-flex items-center gap-1\">\n <item.icon size={14} className={item.color} />\n <span className=\"font-medium\">{item.value}</span>\n {index < items.length - 1 && <span className=\"ml-2 text-muted-foreground/40\">|</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"mappings":";;;;AAiBA,IAAa,KAA6C,EACxD,eACA,aACA,kBACA,gBACA,mBACA,cACA,YAAS,eACL;CACJ,IAAM,IAAQ;EACZ;GACE,MAAM;GACN,OAAO;GACP,OAAO,IAAW,GAAG,EAAW,KAAK,MAAa;GAClD,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO;GACP,OAAO,IAAc,GAAG,EAAc,KAAK,MAAgB;GAC3D,OAAO;GACR;EACD,GAAI,MAAmB,KAAA,IASnB,EAAE,GARF,CACE;GACE,MAAM;GACN,OAAO;GACP,OAAO,GAAG;GACV,OAAO;GACR,CACF;EAEN;AAmBD,QAjBI,MAAW,SAEX,kBAAC,OAAD;EAAK,WAAW,EAAG,0BAA0B,EAAU;YACpD,EAAM,KAAK,MACV,kBAAC,OAAD;GAEE,WAAU;aAFZ;IAIE,kBAAC,EAAK,MAAN;KAAW,MAAM;KAAI,WAAW,EAAK;KAAS,CAAA;IAC9C,kBAAC,QAAD;KAAM,WAAU;eAAiC,EAAK;KAAa,CAAA;IACnE,kBAAC,QAAD;KAAM,WAAU;eAAyB,EAAK;KAAa,CAAA;IACvD;KANC,EAAK,MAMN,CACN;EACE,CAAA,GAKR,kBAAC,OAAD;EAAK,WAAW,EAAG,mCAAmC,EAAU;YAC7D,EAAM,KAAK,GAAM,MAChB,kBAAC,QAAD;GAAuB,WAAU;aAAjC;IACE,kBAAC,EAAK,MAAN;KAAW,MAAM;KAAI,WAAW,EAAK;KAAS,CAAA;IAC9C,kBAAC,QAAD;KAAM,WAAU;eAAe,EAAK;KAAa,CAAA;IAChD,IAAQ,EAAM,SAAS,KAAK,kBAAC,QAAD;KAAM,WAAU;eAAgC;KAAQ,CAAA;IAChF;KAJI,EAAK,MAIT,CACP;EACE,CAAA"}
1
+ {"version":3,"file":"ResourceDisplay.js","names":[],"sources":["../../../src/sandbox/components/ResourceDisplay.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Cpu, MemoryStick, Container } from 'lucide-react';\nimport { cn } from '../utils/cn';\n\ninterface ResourceDisplayProps {\n cpuRequest: string;\n cpuLimit?: string;\n memoryRequest: string;\n memoryLimit?: string;\n containerCount?: number;\n className?: string;\n layout?: 'inline' | 'grid';\n}\n\n/**\n * Compact display for sandbox resource allocation (CPU / Memory / Containers)\n */\nexport const ResourceDisplay: FC<ResourceDisplayProps> = ({\n cpuRequest,\n cpuLimit,\n memoryRequest,\n memoryLimit,\n containerCount,\n className,\n layout = 'inline',\n}) => {\n const items = [\n {\n icon: Cpu,\n label: 'CPU',\n value: cpuLimit ? `${cpuRequest} / ${cpuLimit}` : cpuRequest,\n color: 'text-accent-blue',\n },\n {\n icon: MemoryStick,\n label: 'Memory',\n value: memoryLimit ? `${memoryRequest} / ${memoryLimit}` : memoryRequest,\n color: 'text-accent-purple',\n },\n ...(containerCount !== undefined\n ? [\n {\n icon: Container,\n label: 'Containers',\n value: `${containerCount}`,\n color: 'text-status-warning-text',\n },\n ]\n : []),\n ];\n\n if (layout === 'grid') {\n return (\n <div className={cn('grid grid-cols-3 gap-3', className)}>\n {items.map((item) => (\n <div\n key={item.label}\n className=\"flex flex-col items-center gap-1 p-2 rounded-lg bg-bg-sunken/50\"\n >\n <item.icon size={16} className={item.color} />\n <span className=\"text-xs text-text-secondary\">{item.label}</span>\n <span className=\"text-sm font-semibold\">{item.value}</span>\n </div>\n ))}\n </div>\n );\n }\n\n return (\n <div className={cn('flex items-center gap-3 text-sm', className)}>\n {items.map((item, index) => (\n <span key={item.label} className=\"inline-flex items-center gap-1\">\n <item.icon size={14} className={item.color} />\n <span className=\"font-medium\">{item.value}</span>\n {index < items.length - 1 && <span className=\"ml-2 text-text-secondary/40\">|</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"mappings":";;;;AAiBA,IAAa,KAA6C,EACxD,eACA,aACA,kBACA,gBACA,mBACA,cACA,YAAS,eACL;CACJ,IAAM,IAAQ;EACZ;GACE,MAAM;GACN,OAAO;GACP,OAAO,IAAW,GAAG,EAAW,KAAK,MAAa;GAClD,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO;GACP,OAAO,IAAc,GAAG,EAAc,KAAK,MAAgB;GAC3D,OAAO;GACR;EACD,GAAI,MAAmB,KAAA,IASnB,EAAE,GARF,CACE;GACE,MAAM;GACN,OAAO;GACP,OAAO,GAAG;GACV,OAAO;GACR,CACF;EAEN;AAmBD,QAjBI,MAAW,SAEX,kBAAC,OAAD;EAAK,WAAW,EAAG,0BAA0B,EAAU;YACpD,EAAM,KAAK,MACV,kBAAC,OAAD;GAEE,WAAU;aAFZ;IAIE,kBAAC,EAAK,MAAN;KAAW,MAAM;KAAI,WAAW,EAAK;KAAS,CAAA;IAC9C,kBAAC,QAAD;KAAM,WAAU;eAA+B,EAAK;KAAa,CAAA;IACjE,kBAAC,QAAD;KAAM,WAAU;eAAyB,EAAK;KAAa,CAAA;IACvD;KANC,EAAK,MAMN,CACN;EACE,CAAA,GAKR,kBAAC,OAAD;EAAK,WAAW,EAAG,mCAAmC,EAAU;YAC7D,EAAM,KAAK,GAAM,MAChB,kBAAC,QAAD;GAAuB,WAAU;aAAjC;IACE,kBAAC,EAAK,MAAN;KAAW,MAAM;KAAI,WAAW,EAAK;KAAS,CAAA;IAC9C,kBAAC,QAAD;KAAM,WAAU;eAAe,EAAK;KAAa,CAAA;IAChD,IAAQ,EAAM,SAAS,KAAK,kBAAC,QAAD;KAAM,WAAU;eAA8B;KAAQ,CAAA;IAC9E;KAJI,EAAK,MAIT,CACP;EACE,CAAA"}
@@ -39,23 +39,23 @@ var s = class extends e {
39
39
  className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
40
40
  children: [
41
41
  /* @__PURE__ */ i("div", {
42
- className: "p-3 rounded-full bg-destructive/10",
43
- children: /* @__PURE__ */ i(t, { className: "size-8 text-destructive" })
42
+ className: "p-3 rounded-full bg-status-error-bg/10",
43
+ children: /* @__PURE__ */ i(t, { className: "size-8 text-status-error-text" })
44
44
  }),
45
45
  /* @__PURE__ */ a("div", {
46
46
  className: "space-y-2",
47
47
  children: [/* @__PURE__ */ i("h3", {
48
- className: "text-lg font-semibold text-foreground",
48
+ className: "text-lg font-semibold text-text-primary",
49
49
  children: "Failed to load page"
50
50
  }), /* @__PURE__ */ i("p", {
51
- className: "text-sm text-muted-foreground max-w-md",
51
+ className: "text-sm text-text-secondary max-w-md",
52
52
  children: this.state.error?.message?.includes("Loading chunk") ? "The page chunk could not be loaded. This may be due to a network issue." : "Something went wrong while loading this page. Please try again."
53
53
  })]
54
54
  }),
55
55
  /* @__PURE__ */ a("button", {
56
56
  type: "button",
57
57
  onClick: this.handleRetry,
58
- className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
58
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
59
59
  children: [/* @__PURE__ */ i(r, { className: "size-4" }), "Try Again"]
60
60
  })
61
61
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"RouteUtils.js","names":[],"sources":["../../../src/sandbox/components/RouteUtils.tsx"],"sourcesContent":["import { Component, type ReactNode, type ErrorInfo } from 'react';\nimport { Loader2, AlertTriangle, RefreshCw } from 'lucide-react';\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nexport function PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nexport class LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[Sandbox] Lazy page load failed:', error, errorInfo);\n }\n\n handleRetry = () => {\n if (this.state.error?.name === 'ChunkLoadError') {\n window.location.reload();\n return;\n }\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-destructive/10\">\n <AlertTriangle className=\"size-8 text-destructive\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-foreground\">Failed to load page</h3>\n <p className=\"text-sm text-muted-foreground max-w-md\">\n {this.state.error?.message?.includes('Loading chunk')\n ? 'The page chunk could not be loaded. This may be due to a network issue.'\n : 'Something went wrong while loading this page. Please try again.'}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n"],"mappings":";;;;AAMA,SAAgB,IAAa;AAC3B,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAS,WAAU,oCAAqC,CAAA;EACpD,CAAA;;AAQV,IAAa,IAAb,cAAuC,EAGrC;CACA,YAAY,GAAgC;AAE1C,EADA,MAAM,EAAM,EACZ,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;;CAG/C,OAAO,yBAAyB,GAAc;AAC5C,SAAO;GAAE,UAAU;GAAM;GAAO;;CAGlC,kBAAkB,GAAc,GAAsB;AACpD,UAAQ,MAAM,oCAAoC,GAAO,EAAU;;CAGrE,oBAAoB;AAClB,MAAI,KAAK,MAAM,OAAO,SAAS,kBAAkB;AAC/C,UAAO,SAAS,QAAQ;AACxB;;AAEF,OAAK,SAAS;GAAE,UAAU;GAAO,OAAO;GAAM,CAAC;;CAGjD,SAAS;AA2BP,SA1BI,KAAK,MAAM,WAEX,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAe,WAAU,2BAA4B,CAAA;KACjD,CAAA;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBAAwC;MAAwB,CAAA,EAC9E,kBAAC,KAAD;MAAG,WAAU;gBACV,KAAK,MAAM,OAAO,SAAS,SAAS,gBAAgB,GACjD,4EACA;MACF,CAAA,CACA;;IACN,kBAAC,UAAD;KACE,MAAK;KACL,SAAS,KAAK;KACd,WAAU;eAHZ,CAKE,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA,EAAA,YAEzB;;IACL;OAIH,KAAK,MAAM"}
1
+ {"version":3,"file":"RouteUtils.js","names":[],"sources":["../../../src/sandbox/components/RouteUtils.tsx"],"sourcesContent":["import { Component, type ReactNode, type ErrorInfo } from 'react';\nimport { Loader2, AlertTriangle, RefreshCw } from 'lucide-react';\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nexport function PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nexport class LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[Sandbox] Lazy page load failed:', error, errorInfo);\n }\n\n handleRetry = () => {\n if (this.state.error?.name === 'ChunkLoadError') {\n window.location.reload();\n return;\n }\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">Failed to load page</h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {this.state.error?.message?.includes('Loading chunk')\n ? 'The page chunk could not be loaded. This may be due to a network issue.'\n : 'Something went wrong while loading this page. Please try again.'}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n"],"mappings":";;;;AAMA,SAAgB,IAAa;AAC3B,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAS,WAAU,oCAAqC,CAAA;EACpD,CAAA;;AAQV,IAAa,IAAb,cAAuC,EAGrC;CACA,YAAY,GAAgC;AAE1C,EADA,MAAM,EAAM,EACZ,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;;CAG/C,OAAO,yBAAyB,GAAc;AAC5C,SAAO;GAAE,UAAU;GAAM;GAAO;;CAGlC,kBAAkB,GAAc,GAAsB;AACpD,UAAQ,MAAM,oCAAoC,GAAO,EAAU;;CAGrE,oBAAoB;AAClB,MAAI,KAAK,MAAM,OAAO,SAAS,kBAAkB;AAC/C,UAAO,SAAS,QAAQ;AACxB;;AAEF,OAAK,SAAS;GAAE,UAAU;GAAO,OAAO;GAAM,CAAC;;CAGjD,SAAS;AA2BP,SA1BI,KAAK,MAAM,WAEX,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAe,WAAU,iCAAkC,CAAA;KACvD,CAAA;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBAA0C;MAAwB,CAAA,EAChF,kBAAC,KAAD;MAAG,WAAU;gBACV,KAAK,MAAM,OAAO,SAAS,SAAS,gBAAgB,GACjD,4EACA;MACF,CAAA,CACA;;IACN,kBAAC,UAAD;KACE,MAAK;KACL,SAAS,KAAK;KACd,WAAU;eAHZ,CAKE,kBAAC,GAAD,EAAW,WAAU,UAAW,CAAA,EAAA,YAEzB;;IACL;OAIH,KAAK,MAAM"}
@@ -60,7 +60,7 @@ function u({ sandboxId: i, workspaceId: u, pageSize: d = 50 }) {
60
60
  children: v.map((t) => /* @__PURE__ */ c("li", {
61
61
  className: "py-3",
62
62
  children: [/* @__PURE__ */ s("div", {
63
- className: "text-sm font-medium text-foreground",
63
+ className: "text-sm font-medium text-text-primary",
64
64
  children: t.action
65
65
  }), /* @__PURE__ */ c("div", {
66
66
  className: "mt-0.5 text-xs text-text-secondary",
@@ -1 +1 @@
1
- {"version":3,"file":"SandboxActivityTab.js","names":[],"sources":["../../../src/sandbox/components/SandboxActivityTab.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useApolloClient } from '@apollo/client/react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { tWithFallback } from '../utils/i18n';\n\nconst RECENT_ACTIVITY = gql`\n query GetRecentSandboxActivity($context: ContextInput!, $limit: Int) {\n getRecentSandboxActivity(context: $context, limit: $limit) {\n items {\n id\n action\n sandboxName\n sandboxId\n actorId\n status\n createdAt\n }\n total\n }\n }\n`;\n\ninterface ActivityItem {\n id: string;\n action: string;\n sandboxName: string;\n sandboxId?: string | null;\n actorId: string;\n status: string;\n createdAt: string;\n}\n\ninterface Props {\n sandboxId: string;\n workspaceId: string;\n pageSize?: number;\n}\n\n/**\n * Activity / audit feed scoped to a single sandbox. Reuses the existing\n * `getRecentSandboxActivity` admin query and filters client-side by sandboxId\n * so no new backend query is needed for the v0.3.0 cycle. Server-side scoping\n * will move to a dedicated `getSandboxAuditLog(sandboxId)` query in a follow-up.\n */\nexport function SandboxActivityTab({ sandboxId, workspaceId, pageSize = 50 }: Props) {\n const { t } = useI18n();\n const client = useApolloClient();\n const [items, setItems] = useState<ActivityItem[] | null>(null);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n let cancelled = false;\n client\n .query<{ getRecentSandboxActivity: { items: ActivityItem[] } }>({\n query: RECENT_ACTIVITY,\n variables: { context: { workspaceId }, limit: pageSize },\n fetchPolicy: 'network-only',\n })\n .then((res: { data?: { getRecentSandboxActivity?: { items?: ActivityItem[] } } }) => {\n if (cancelled) return;\n const all: ActivityItem[] = res.data?.getRecentSandboxActivity?.items ?? [];\n setItems(all.filter((entry: ActivityItem) => entry.sandboxId === sandboxId));\n })\n .catch((err: unknown) => {\n if (cancelled) return;\n setError(err instanceof Error ? err.message : String(err));\n });\n return () => {\n cancelled = true;\n };\n }, [client, sandboxId, workspaceId, pageSize]);\n\n const sorted = useMemo(\n () =>\n items\n ?.slice()\n .sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()) ?? null,\n [items]\n );\n\n if (error) {\n return (\n <p className=\"text-sm text-status-error-text\">\n {tWithFallback(t, 'sandbox.activity.loadFailed', \"Couldn't load activity.\")}\n </p>\n );\n }\n if (sorted == null) {\n return <p className=\"text-sm text-text-secondary\">…</p>;\n }\n if (sorted.length === 0) {\n return (\n <p className=\"text-sm text-text-secondary\">\n {tWithFallback(t, 'sandbox.activity.empty', 'No activity yet.')}\n </p>\n );\n }\n\n return (\n <ul className=\"divide-y divide-border-subtle\">\n {sorted.map((entry) => (\n <li key={entry.id} className=\"py-3\">\n <div className=\"text-sm font-medium text-foreground\">{entry.action}</div>\n <div className=\"mt-0.5 text-xs text-text-secondary\">\n {tWithFallback(t, 'sandbox.activity.actor', `by ${entry.actorId}`, {\n actor: entry.actorId,\n })}{' '}\n ·{' '}\n {tWithFallback(\n t,\n 'sandbox.activity.atTime',\n `at ${new Date(entry.createdAt).toLocaleString()}`,\n {\n time: new Date(entry.createdAt).toLocaleString(),\n }\n )}\n </div>\n </li>\n ))}\n </ul>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAM,IAAkB,CAAG;;;;;;;;;;;;;;;;AAuC3B,SAAgB,EAAmB,EAAE,cAAW,gBAAa,cAAW,MAAa;CACnF,IAAM,EAAE,SAAM,GAAS,EACjB,IAA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AK,EAAM,UAAU,CAAC,gBAAgB,IAChD,EACE,MAAM,IAAI,KAAK,EAAM,UAAU,CAAC,gBAAgB,EACjD,CACF;KACG;MACH;KAhBI,EAAM,GAgBV,CACL;EACC,CAAA"}
1
+ {"version":3,"file":"SandboxActivityTab.js","names":[],"sources":["../../../src/sandbox/components/SandboxActivityTab.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useApolloClient } from '@apollo/client/react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { tWithFallback } from '../utils/i18n';\n\nconst RECENT_ACTIVITY = gql`\n query GetRecentSandboxActivity($context: ContextInput!, $limit: Int) {\n getRecentSandboxActivity(context: $context, limit: $limit) {\n items {\n id\n action\n sandboxName\n sandboxId\n actorId\n status\n createdAt\n }\n total\n }\n }\n`;\n\ninterface ActivityItem {\n id: string;\n action: string;\n sandboxName: string;\n sandboxId?: string | null;\n actorId: string;\n status: string;\n createdAt: string;\n}\n\ninterface Props {\n sandboxId: string;\n workspaceId: string;\n pageSize?: number;\n}\n\n/**\n * Activity / audit feed scoped to a single sandbox. Reuses the existing\n * `getRecentSandboxActivity` admin query and filters client-side by sandboxId\n * so no new backend query is needed for the v0.3.0 cycle. Server-side scoping\n * will move to a dedicated `getSandboxAuditLog(sandboxId)` query in a follow-up.\n */\nexport function SandboxActivityTab({ sandboxId, workspaceId, pageSize = 50 }: Props) {\n const { t } = useI18n();\n const client = useApolloClient();\n const [items, setItems] = useState<ActivityItem[] | null>(null);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n let cancelled = false;\n client\n .query<{ getRecentSandboxActivity: { items: ActivityItem[] } }>({\n query: RECENT_ACTIVITY,\n variables: { context: { workspaceId }, limit: pageSize },\n fetchPolicy: 'network-only',\n })\n .then((res: { data?: { getRecentSandboxActivity?: { items?: ActivityItem[] } } }) => {\n if (cancelled) return;\n const all: ActivityItem[] = res.data?.getRecentSandboxActivity?.items ?? [];\n setItems(all.filter((entry: ActivityItem) => entry.sandboxId === sandboxId));\n })\n .catch((err: unknown) => {\n if (cancelled) return;\n setError(err instanceof Error ? err.message : String(err));\n });\n return () => {\n cancelled = true;\n };\n }, [client, sandboxId, workspaceId, pageSize]);\n\n const sorted = useMemo(\n () =>\n items\n ?.slice()\n .sort((a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()) ?? null,\n [items]\n );\n\n if (error) {\n return (\n <p className=\"text-sm text-status-error-text\">\n {tWithFallback(t, 'sandbox.activity.loadFailed', \"Couldn't load activity.\")}\n </p>\n );\n }\n if (sorted == null) {\n return <p className=\"text-sm text-text-secondary\">…</p>;\n }\n if (sorted.length === 0) {\n return (\n <p className=\"text-sm text-text-secondary\">\n {tWithFallback(t, 'sandbox.activity.empty', 'No activity yet.')}\n </p>\n );\n }\n\n return (\n <ul className=\"divide-y divide-border-subtle\">\n {sorted.map((entry) => (\n <li key={entry.id} className=\"py-3\">\n <div className=\"text-sm font-medium text-text-primary\">{entry.action}</div>\n <div className=\"mt-0.5 text-xs text-text-secondary\">\n {tWithFallback(t, 'sandbox.activity.actor', `by ${entry.actorId}`, {\n actor: entry.actorId,\n })}{' '}\n ·{' '}\n {tWithFallback(\n t,\n 'sandbox.activity.atTime',\n `at ${new Date(entry.createdAt).toLocaleString()}`,\n {\n time: new Date(entry.createdAt).toLocaleString(),\n }\n )}\n </div>\n </li>\n ))}\n </ul>\n );\n}\n"],"mappings":";;;;;;;AAMA,IAAM,IAAkB,CAAG;;;;;;;;;;;;;;;;AAuC3B,SAAgB,EAAmB,EAAE,cAAW,gBAAa,cAAW,MAAa;CACnF,IAAM,EAAE,SAAM,GAAS,EACjB,IAAS,GAAiB,EAC1B,CAAC,GAAO,KAAY,EAAgC,KAAK,EACzD,CAAC,GAAO,KAAY,EAAwB,KAAK;AAEvD,SAAgB;EACd,IAAI,IAAY;AAgBhB,SAfA,EACG,MAA+D;GAC9D,OAAO;GACP,WAAW;IAAE,SAAS,EA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, clientSecret: p }) {
15
15
  className: "rounded-md border border-border-subtle bg-bg-surface p-4 text-sm",
16
16
  children: [
17
17
  /* @__PURE__ */ c("h3", {
18
- className: "text-sm font-semibold text-foreground",
18
+ className: "text-sm font-semibold text-text-primary",
19
19
  children: e(m, "sandbox.agentApp.title", "Auto-registered application")
20
20
  }),
21
21
  /* @__PURE__ */ c("p", {
@@ -1 +1 @@
1
- {"version":3,"file":"SandboxAgentAppPanel.js","names":[],"sources":["../../../src/sandbox/components/SandboxAgentAppPanel.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Copy, CheckCircle2, Eye, EyeOff } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { tWithFallback } from '../utils/i18n';\n\ninterface Props {\n appId?: string | null;\n clientId?: string | null;\n /** Only available on first creation; backend never returns it again. */\n clientSecret?: string | null;\n}\n\n/**\n * Read-only panel surfacing the auto-registered DevPortal application created\n * for the in-sandbox VibeControls agent. Backend lifecycle lives in\n * `wspace-sandbox-svc/.../createSandboxAgentApp`. The clientSecret is shown\n * once, on first create — afterwards the panel hides it behind a \"rotate via\n * Developer Portal\" message.\n */\nexport function SandboxAgentAppPanel({ appId, clientId, clientSecret }: Props) {\n const { t } = useI18n();\n const [revealed, setRevealed] = useState(false);\n const [copied, setCopied] = useState<string | null>(null);\n\n if (!appId && !clientId) return null;\n\n const copy = (value: string, key: string) => {\n void navigator.clipboard.writeText(value);\n setCopied(key);\n setTimeout(() => setCopied((current) => (current === key ? null : current)), 1500);\n };\n\n return (\n <section\n aria-label={tWithFallback(t, 'sandbox.agentApp.title', 'Auto-registered application')}\n className=\"rounded-md border border-border-subtle bg-bg-surface p-4 text-sm\"\n >\n <h3 className=\"text-sm font-semibold text-foreground\">\n {tWithFallback(t, 'sandbox.agentApp.title', 'Auto-registered application')}\n </h3>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {tWithFallback(\n t,\n 'sandbox.agentApp.description',\n 'An OAuth app was created so the in-sandbox VibeControls agent can authenticate against the platform automatically.'\n )}\n </p>\n <dl className=\"mt-3 space-y-2\">\n {appId && (\n <Row\n label={tWithFallback(t, 'sandbox.agentApp.appId', 'App ID')}\n value={appId}\n onCopy={() => copy(appId, 'app')}\n copied={copied === 'app'}\n />\n )}\n {clientId && (\n <Row\n label={tWithFallback(t, 'sandbox.agentApp.clientId', 'Client ID')}\n value={clientId}\n onCopy={() => copy(clientId, 'client')}\n copied={copied === 'client'}\n />\n )}\n <div className=\"flex items-center justify-between gap-2\">\n <dt className=\"text-xs text-text-tertiary\">\n {tWithFallback(t, 'sandbox.agentApp.clientSecret', 'Client secret')}\n </dt>\n <dd className=\"flex items-center gap-2 font-mono text-xs\">\n {clientSecret && revealed ? (\n <>\n <span>{clientSecret}</span>\n <button\n type=\"button\"\n onClick={() => copy(clientSecret, 'secret')}\n aria-label={tWithFallback(t, 'sandbox.agentApp.copySecret', 'Copy client secret')}\n className=\"text-text-tertiary hover:text-text-secondary\"\n >\n {copied === 'secret' ? <CheckCircle2 size={12} /> : <Copy size={12} />}\n </button>\n <button\n type=\"button\"\n onClick={() => setRevealed(false)}\n className=\"text-text-tertiary hover:text-text-secondary\"\n aria-label={tWithFallback(t, 'sandbox.agentApp.hide', 'Hide')}\n >\n <EyeOff size={12} />\n </button>\n </>\n ) : clientSecret ? (\n <button\n type=\"button\"\n onClick={() => setRevealed(true)}\n className=\"inline-flex items-center gap-1 rounded-md border border-border-subtle px-2 py-0.5 text-text-secondary hover:bg-bg-sunken\"\n >\n <Eye size={12} aria-hidden=\"true\" />\n {tWithFallback(t, 'sandbox.agentApp.secret.revealOnce', 'Reveal once')}\n </button>\n ) : (\n <span className=\"text-text-tertiary\">\n {tWithFallback(\n t,\n 'sandbox.agentApp.secret.hidden',\n 'Hidden — visible only at first creation'\n )}\n </span>\n )}\n </dd>\n </div>\n </dl>\n </section>\n );\n}\n\nfunction Row({\n label,\n value,\n onCopy,\n copied,\n}: {\n label: string;\n value: string;\n onCopy: () => void;\n copied: boolean;\n}) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <dt className=\"text-xs text-text-tertiary\">{label}</dt>\n <dd className=\"flex items-center gap-2 font-mono text-xs\">\n <span>{value}</span>\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={`Copy ${label}`}\n className=\"text-text-tertiary hover:text-text-secondary\"\n >\n {copied ? <CheckCircle2 size={12} /> : <Copy size={12} />}\n </button>\n </dd>\n </div>\n );\n}\n"],"mappings":";;;;;;AAmBA,SAAgB,EAAqB,EAAE,UAAO,aAAU,mBAAuB;CAC7E,IAAM,EAAE,SAAM,GAAS,EACjB,CAAC,GAAU,KAAe,EAAS,GAAM,EACzC,CAAC,GAAQ,KAAa,EAAwB,KAAK;AAEzD,KAAI,CAAC,KAAS,CAAC,EAAU,QAAO;CAEhC,IAAM,KAAQ,GAAe,MAAgB;AAG3C,EAFK,UAAU,UAAU,UAAU,EAAM,EACzC,EAAU,EAAI,EACd,iBAAiB,GAAW,MAAa,MAAY,IAAM,OAAO,EAAS,EAAE,KAAK;;AAGpF,QACE,kBAAC,WAAD;EACE,cAAY,EAAc,GAAG,0BAA0B,8BAA8B;EACrF,WAAU;YAFZ;GAIE,kBAAC,MAAD;IAAI,WAAU;cACX,EAAc,GAAG,0BAA0B,8BAA8B;IACvE,CAAA;GACL,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,GACA,gCACA,qHACD;IACC,CAAA;GACJ,kBAAC,MAAD;IAAI,WAAU;cAAd;KACG,KACC,kBAAC,GAAD;MACE,OAAO,EAAc,GAAG,0BAA0B,SAAS;MAC3D,OAAO;MACP,cAAc,EAAK,GAAO,MAAM;MAChC,QAAQ,MAAW;MACnB,CAAA;KAEH,KACC,kBAAC,GAAD;MACE,OAAO,EAAc,GAAG,6BAA6B,YAAY;MACjE,OAAO;MACP,cAAc,EAAK,GAAU,SAAS;MACtC,QAAQ,MAAW;MACnB,CAAA;KAEJ,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC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":["../../../src/sandbox/components/SandboxAgentAppPanel.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Copy, CheckCircle2, Eye, EyeOff } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { tWithFallback } from '../utils/i18n';\n\ninterface Props {\n appId?: string | null;\n clientId?: string | null;\n /** Only available on first creation; backend never returns it again. */\n clientSecret?: string | null;\n}\n\n/**\n * Read-only panel surfacing the auto-registered DevPortal application created\n * for the in-sandbox VibeControls agent. Backend lifecycle lives in\n * `wspace-sandbox-svc/.../createSandboxAgentApp`. The clientSecret is shown\n * once, on first create — afterwards the panel hides it behind a \"rotate via\n * Developer Portal\" message.\n */\nexport function SandboxAgentAppPanel({ appId, clientId, clientSecret }: Props) {\n const { t } = useI18n();\n const [revealed, setRevealed] = useState(false);\n const [copied, setCopied] = useState<string | null>(null);\n\n if (!appId && !clientId) return null;\n\n const copy = (value: string, key: string) => {\n void navigator.clipboard.writeText(value);\n setCopied(key);\n setTimeout(() => setCopied((current) => (current === key ? null : current)), 1500);\n };\n\n return (\n <section\n aria-label={tWithFallback(t, 'sandbox.agentApp.title', 'Auto-registered application')}\n className=\"rounded-md border border-border-subtle bg-bg-surface p-4 text-sm\"\n >\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {tWithFallback(t, 'sandbox.agentApp.title', 'Auto-registered application')}\n </h3>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {tWithFallback(\n t,\n 'sandbox.agentApp.description',\n 'An OAuth app was created so the in-sandbox VibeControls agent can authenticate against the platform automatically.'\n )}\n </p>\n <dl className=\"mt-3 space-y-2\">\n {appId && (\n <Row\n label={tWithFallback(t, 'sandbox.agentApp.appId', 'App ID')}\n value={appId}\n onCopy={() => copy(appId, 'app')}\n copied={copied === 'app'}\n />\n )}\n {clientId && (\n <Row\n label={tWithFallback(t, 'sandbox.agentApp.clientId', 'Client ID')}\n value={clientId}\n onCopy={() => copy(clientId, 'client')}\n copied={copied === 'client'}\n />\n )}\n <div className=\"flex items-center justify-between gap-2\">\n <dt className=\"text-xs text-text-tertiary\">\n {tWithFallback(t, 'sandbox.agentApp.clientSecret', 'Client secret')}\n </dt>\n <dd className=\"flex items-center gap-2 font-mono text-xs\">\n {clientSecret && revealed ? (\n <>\n <span>{clientSecret}</span>\n <button\n type=\"button\"\n onClick={() => copy(clientSecret, 'secret')}\n aria-label={tWithFallback(t, 'sandbox.agentApp.copySecret', 'Copy client secret')}\n className=\"text-text-tertiary hover:text-text-secondary\"\n >\n {copied === 'secret' ? <CheckCircle2 size={12} /> : <Copy size={12} />}\n </button>\n <button\n type=\"button\"\n onClick={() => setRevealed(false)}\n className=\"text-text-tertiary hover:text-text-secondary\"\n aria-label={tWithFallback(t, 'sandbox.agentApp.hide', 'Hide')}\n >\n <EyeOff size={12} />\n </button>\n </>\n ) : clientSecret ? (\n <button\n type=\"button\"\n onClick={() => setRevealed(true)}\n className=\"inline-flex items-center gap-1 rounded-md border border-border-subtle px-2 py-0.5 text-text-secondary hover:bg-bg-sunken\"\n >\n <Eye size={12} aria-hidden=\"true\" />\n {tWithFallback(t, 'sandbox.agentApp.secret.revealOnce', 'Reveal once')}\n </button>\n ) : (\n <span className=\"text-text-tertiary\">\n {tWithFallback(\n t,\n 'sandbox.agentApp.secret.hidden',\n 'Hidden — visible only at first creation'\n )}\n </span>\n )}\n </dd>\n </div>\n </dl>\n </section>\n );\n}\n\nfunction Row({\n label,\n value,\n onCopy,\n copied,\n}: {\n label: string;\n value: string;\n onCopy: () => void;\n copied: boolean;\n}) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <dt className=\"text-xs text-text-tertiary\">{label}</dt>\n <dd className=\"flex items-center gap-2 font-mono text-xs\">\n <span>{value}</span>\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={`Copy ${label}`}\n className=\"text-text-tertiary hover:text-text-secondary\"\n >\n {copied ? <CheckCircle2 size={12} /> : <Copy size={12} />}\n </button>\n </dd>\n </div>\n );\n}\n"],"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