@burdenoff/microfe-sandbox 2026.1101.2 → 2026.1109.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 (205) hide show
  1. package/dist/dev/Dashboard.d.ts +1 -2
  2. package/dist/dev/SandboxApp.d.ts +1 -2
  3. package/dist/dev/main.d.ts +0 -2
  4. package/dist/generated/global-operations.d.ts +4 -2
  5. package/dist/generated/global-types.d.ts +2 -22
  6. package/dist/generated/wspace-operations.d.ts +525 -438
  7. package/dist/generated/wspace-operations.js +2 -3
  8. package/dist/generated/wspace-operations.js.map +1 -1
  9. package/dist/generated/wspace-types.d.ts +4 -24
  10. package/dist/generated/wspace-types.js +1 -2
  11. package/dist/generated/wspace-types.js.map +1 -1
  12. package/dist/index.d.ts +0 -1
  13. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  14. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  15. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
  16. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  17. package/dist/sandbox/AdminRoutes.d.ts +1 -2
  18. package/dist/sandbox/AdminRoutes.js +1 -2
  19. package/dist/sandbox/AdminRoutes.js.map +1 -1
  20. package/dist/sandbox/SandboxAdminRoot.d.ts +0 -2
  21. package/dist/sandbox/SandboxAdminRoot.js +13 -10
  22. package/dist/sandbox/SandboxAdminRoot.js.map +1 -1
  23. package/dist/sandbox/SandboxRoot.d.ts +0 -2
  24. package/dist/sandbox/SandboxRoot.js +13 -10
  25. package/dist/sandbox/SandboxRoot.js.map +1 -1
  26. package/dist/sandbox/UserRoutes.d.ts +1 -2
  27. package/dist/sandbox/UserRoutes.js +1 -2
  28. package/dist/sandbox/UserRoutes.js.map +1 -1
  29. package/dist/sandbox/components/ContainerImagePicker.d.ts +1 -2
  30. package/dist/sandbox/components/CountdownTimer.d.ts +1 -2
  31. package/dist/sandbox/components/CountdownTimer.js +1 -2
  32. package/dist/sandbox/components/CountdownTimer.js.map +1 -1
  33. package/dist/sandbox/components/ExportSandboxesDialog.d.ts +1 -2
  34. package/dist/sandbox/components/ExportSandboxesDialog.js +22 -23
  35. package/dist/sandbox/components/ExportSandboxesDialog.js.map +1 -1
  36. package/dist/sandbox/components/ExtendTTLModal.d.ts +1 -2
  37. package/dist/sandbox/components/ExtendTTLModal.js +1 -2
  38. package/dist/sandbox/components/ExtendTTLModal.js.map +1 -1
  39. package/dist/sandbox/components/FilesFolderPicker.d.ts +1 -2
  40. package/dist/sandbox/components/FilesFolderPicker.js +1 -2
  41. package/dist/sandbox/components/FilesFolderPicker.js.map +1 -1
  42. package/dist/sandbox/components/PageLayout.d.ts +2 -4
  43. package/dist/sandbox/components/PageLayout.js +1 -2
  44. package/dist/sandbox/components/PageLayout.js.map +1 -1
  45. package/dist/sandbox/components/ResourceDisplay.d.ts +0 -2
  46. package/dist/sandbox/components/ResourceDisplay.js +1 -2
  47. package/dist/sandbox/components/ResourceDisplay.js.map +1 -1
  48. package/dist/sandbox/components/RouteUtils.d.ts +2 -4
  49. package/dist/sandbox/components/RouteUtils.js +2 -7
  50. package/dist/sandbox/components/RouteUtils.js.map +1 -1
  51. package/dist/sandbox/components/SandboxActivityTab.d.ts +1 -2
  52. package/dist/sandbox/components/SandboxActivityTab.js +4 -3
  53. package/dist/sandbox/components/SandboxActivityTab.js.map +1 -1
  54. package/dist/sandbox/components/SandboxAgentAppPanel.d.ts +1 -2
  55. package/dist/sandbox/components/SandboxAgentAppPanel.js +1 -2
  56. package/dist/sandbox/components/SandboxAgentAppPanel.js.map +1 -1
  57. package/dist/sandbox/components/SandboxScriptRunnerPanel.d.ts +0 -1
  58. package/dist/sandbox/components/SandboxScriptRunnerPanel.js +2 -3
  59. package/dist/sandbox/components/SandboxScriptRunnerPanel.js.map +1 -1
  60. package/dist/sandbox/components/SandboxTypeIcon.d.ts +0 -2
  61. package/dist/sandbox/components/SandboxTypeIcon.js +1 -2
  62. package/dist/sandbox/components/SandboxTypeIcon.js.map +1 -1
  63. package/dist/sandbox/components/SandboxTypeSelector.d.ts +1 -2
  64. package/dist/sandbox/components/SandboxUsageBanner.d.ts +1 -2
  65. package/dist/sandbox/components/SandboxUsageBanner.js +1 -2
  66. package/dist/sandbox/components/SandboxUsageBanner.js.map +1 -1
  67. package/dist/sandbox/components/StatusBadge.d.ts +0 -2
  68. package/dist/sandbox/components/StatusBadge.js +1 -2
  69. package/dist/sandbox/components/StatusBadge.js.map +1 -1
  70. package/dist/sandbox/components/TagsInput.d.ts +1 -2
  71. package/dist/sandbox/components/TagsInput.js +1 -2
  72. package/dist/sandbox/components/TagsInput.js.map +1 -1
  73. package/dist/sandbox/components/ui.d.ts +0 -1
  74. package/dist/sandbox/components/ui.js +1 -2
  75. package/dist/sandbox/hooks/useIsSuperAdmin.d.ts +0 -1
  76. package/dist/sandbox/hooks/useRemainingSeconds.d.ts +0 -1
  77. package/dist/sandbox/hooks/useRemainingSeconds.js +1 -2
  78. package/dist/sandbox/hooks/useRemainingSeconds.js.map +1 -1
  79. package/dist/sandbox/hooks/useTr.d.ts +0 -1
  80. package/dist/sandbox/hooks/useTr.js +1 -2
  81. package/dist/sandbox/hooks/useTr.js.map +1 -1
  82. package/dist/sandbox/index.d.ts +0 -1
  83. package/dist/sandbox/index.js +6 -5
  84. package/dist/sandbox/pages/AdminLandingPage.d.ts +1 -2
  85. package/dist/sandbox/pages/AdminLandingPage.js +7 -8
  86. package/dist/sandbox/pages/AdminLandingPage.js.map +1 -1
  87. package/dist/sandbox/pages/AdminPage.d.ts +1 -2
  88. package/dist/sandbox/pages/AdminPage.js +87 -88
  89. package/dist/sandbox/pages/AdminPage.js.map +1 -1
  90. package/dist/sandbox/pages/AdminTemplatesPage.d.ts +1 -2
  91. package/dist/sandbox/pages/AdminTemplatesPage.js +59 -60
  92. package/dist/sandbox/pages/AdminTemplatesPage.js.map +1 -1
  93. package/dist/sandbox/pages/SandboxCreatePage.d.ts +1 -2
  94. package/dist/sandbox/pages/SandboxCreatePage.js +269 -265
  95. package/dist/sandbox/pages/SandboxCreatePage.js.map +1 -1
  96. package/dist/sandbox/pages/SandboxDetailPage.d.ts +1 -2
  97. package/dist/sandbox/pages/SandboxDetailPage.js +453 -454
  98. package/dist/sandbox/pages/SandboxDetailPage.js.map +1 -1
  99. package/dist/sandbox/pages/SandboxListPage.d.ts +1 -2
  100. package/dist/sandbox/pages/SandboxListPage.js +319 -320
  101. package/dist/sandbox/pages/SandboxListPage.js.map +1 -1
  102. package/dist/sandbox/pages/TemplateDetailPage.d.ts +1 -2
  103. package/dist/sandbox/pages/TemplateDetailPage.js +326 -328
  104. package/dist/sandbox/pages/TemplateDetailPage.js.map +1 -1
  105. package/dist/sandbox/pages/UserLandingPage.d.ts +1 -2
  106. package/dist/sandbox/pages/UserLandingPage.js +10 -11
  107. package/dist/sandbox/pages/UserLandingPage.js.map +1 -1
  108. package/dist/sandbox/pages/UserTemplatesPage.d.ts +1 -2
  109. package/dist/sandbox/pages/UserTemplatesPage.js +47 -48
  110. package/dist/sandbox/pages/UserTemplatesPage.js.map +1 -1
  111. package/dist/sandbox/providers/SandboxProvider.d.ts +0 -2
  112. package/dist/sandbox/providers/SandboxProvider.js +5 -12
  113. package/dist/sandbox/providers/SandboxProvider.js.map +1 -1
  114. package/dist/sandbox/store/sandboxStore.d.ts +0 -2
  115. package/dist/sandbox/store/sandboxStore.js +1 -2
  116. package/dist/sandbox/store/sandboxStore.js.map +1 -1
  117. package/dist/sandbox/types/index.d.ts +0 -1
  118. package/dist/sandbox/utils/cn.d.ts +0 -2
  119. package/dist/sandbox/utils/cn.js +2 -3
  120. package/dist/sandbox/utils/cn.js.map +1 -1
  121. package/dist/sandbox/utils/formatters.d.ts +0 -1
  122. package/dist/sandbox/utils/formatters.js +1 -2
  123. package/dist/sandbox/utils/formatters.js.map +1 -1
  124. package/dist/sandbox/utils/i18n.d.ts +0 -2
  125. package/dist/sandbox/utils/i18n.js +1 -2
  126. package/dist/sandbox/utils/i18n.js.map +1 -1
  127. package/dist/sandbox/utils/imageRegistry.d.ts +0 -1
  128. package/dist/sandbox/utils/imageRegistry.js +1 -2
  129. package/dist/sandbox/utils/imageRegistry.js.map +1 -1
  130. package/dist/sandbox/utils/navigation.d.ts +0 -1
  131. package/dist/sandbox/utils/navigation.js +1 -2
  132. package/dist/sandbox/utils/navigation.js.map +1 -1
  133. package/dist/sandbox/utils/sandboxEvents.d.ts +0 -2
  134. package/dist/sandbox/utils/sandboxEvents.js +1 -2
  135. package/dist/sandbox/utils/sandboxEvents.js.map +1 -1
  136. package/dist/translations/en.d.ts +0 -1
  137. package/dist/translations/en.js +1 -2
  138. package/dist/translations/en.js.map +1 -1
  139. package/dist/translations/hi.d.ts +0 -2
  140. package/dist/translations/hi.js +3 -4
  141. package/dist/translations/hi.js.map +1 -1
  142. package/dist/translations/index.d.ts +0 -1
  143. package/dist/translations/index.js +4 -3
  144. package/dist/translations/ta.d.ts +0 -2
  145. package/dist/translations/ta.js +3 -4
  146. package/dist/translations/ta.js.map +1 -1
  147. package/dist/utils/nativeBridge.d.ts +0 -1
  148. package/dist/utils/nativeBridge.js +1 -2
  149. package/package.json +60 -46
  150. package/dist/dev/Dashboard.d.ts.map +0 -1
  151. package/dist/dev/SandboxApp.d.ts.map +0 -1
  152. package/dist/dev/main.d.ts.map +0 -1
  153. package/dist/generated/global-operations.d.ts.map +0 -1
  154. package/dist/generated/global-types.d.ts.map +0 -1
  155. package/dist/generated/wspace-operations.d.ts.map +0 -1
  156. package/dist/generated/wspace-types.d.ts.map +0 -1
  157. package/dist/index.d.ts.map +0 -1
  158. package/dist/sandbox/AdminRoutes.d.ts.map +0 -1
  159. package/dist/sandbox/SandboxAdminRoot.d.ts.map +0 -1
  160. package/dist/sandbox/SandboxRoot.d.ts.map +0 -1
  161. package/dist/sandbox/UserRoutes.d.ts.map +0 -1
  162. package/dist/sandbox/components/ContainerImagePicker.d.ts.map +0 -1
  163. package/dist/sandbox/components/CountdownTimer.d.ts.map +0 -1
  164. package/dist/sandbox/components/ExportSandboxesDialog.d.ts.map +0 -1
  165. package/dist/sandbox/components/ExtendTTLModal.d.ts.map +0 -1
  166. package/dist/sandbox/components/FilesFolderPicker.d.ts.map +0 -1
  167. package/dist/sandbox/components/PageLayout.d.ts.map +0 -1
  168. package/dist/sandbox/components/ResourceDisplay.d.ts.map +0 -1
  169. package/dist/sandbox/components/RouteUtils.d.ts.map +0 -1
  170. package/dist/sandbox/components/SandboxActivityTab.d.ts.map +0 -1
  171. package/dist/sandbox/components/SandboxAgentAppPanel.d.ts.map +0 -1
  172. package/dist/sandbox/components/SandboxScriptRunnerPanel.d.ts.map +0 -1
  173. package/dist/sandbox/components/SandboxTypeIcon.d.ts.map +0 -1
  174. package/dist/sandbox/components/SandboxTypeSelector.d.ts.map +0 -1
  175. package/dist/sandbox/components/SandboxUsageBanner.d.ts.map +0 -1
  176. package/dist/sandbox/components/StatusBadge.d.ts.map +0 -1
  177. package/dist/sandbox/components/TagsInput.d.ts.map +0 -1
  178. package/dist/sandbox/components/ui.d.ts.map +0 -1
  179. package/dist/sandbox/hooks/useIsSuperAdmin.d.ts.map +0 -1
  180. package/dist/sandbox/hooks/useRemainingSeconds.d.ts.map +0 -1
  181. package/dist/sandbox/hooks/useTr.d.ts.map +0 -1
  182. package/dist/sandbox/index.d.ts.map +0 -1
  183. package/dist/sandbox/pages/AdminLandingPage.d.ts.map +0 -1
  184. package/dist/sandbox/pages/AdminPage.d.ts.map +0 -1
  185. package/dist/sandbox/pages/AdminTemplatesPage.d.ts.map +0 -1
  186. package/dist/sandbox/pages/SandboxCreatePage.d.ts.map +0 -1
  187. package/dist/sandbox/pages/SandboxDetailPage.d.ts.map +0 -1
  188. package/dist/sandbox/pages/SandboxListPage.d.ts.map +0 -1
  189. package/dist/sandbox/pages/TemplateDetailPage.d.ts.map +0 -1
  190. package/dist/sandbox/pages/UserLandingPage.d.ts.map +0 -1
  191. package/dist/sandbox/pages/UserTemplatesPage.d.ts.map +0 -1
  192. package/dist/sandbox/providers/SandboxProvider.d.ts.map +0 -1
  193. package/dist/sandbox/store/sandboxStore.d.ts.map +0 -1
  194. package/dist/sandbox/types/index.d.ts.map +0 -1
  195. package/dist/sandbox/utils/cn.d.ts.map +0 -1
  196. package/dist/sandbox/utils/formatters.d.ts.map +0 -1
  197. package/dist/sandbox/utils/i18n.d.ts.map +0 -1
  198. package/dist/sandbox/utils/imageRegistry.d.ts.map +0 -1
  199. package/dist/sandbox/utils/navigation.d.ts.map +0 -1
  200. package/dist/sandbox/utils/sandboxEvents.d.ts.map +0 -1
  201. package/dist/translations/en.d.ts.map +0 -1
  202. package/dist/translations/hi.d.ts.map +0 -1
  203. package/dist/translations/index.d.ts.map +0 -1
  204. package/dist/translations/ta.d.ts.map +0 -1
  205. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -4,7 +4,7 @@ import { useState as n } from "react";
4
4
  import { Clock as r } from "lucide-react";
5
5
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  import { ResponsiveDialog as o, ResponsiveDialogContent as s, ResponsiveDialogFooter as c, ResponsiveDialogHeader as l, ResponsiveDialogTitle as u } from "@burdenoff/fe-libs/ui";
7
- //#region src/sandbox/components/ExtendTTLModal.tsx
7
+ // src/sandbox/components/ExtendTTLModal.tsx
8
8
  function d({ isOpen: d, onClose: f, onExtend: p, currentExpiresAt: m, isLoading: h }) {
9
9
  let g = t(), [_, v] = n(null), [y, b] = n(""), x = [
10
10
  {
@@ -95,7 +95,6 @@ function d({ isOpen: d, onClose: f, onExtend: p, currentExpiresAt: m, isLoading:
95
95
  })
96
96
  });
97
97
  }
98
- //#endregion
99
98
  export { d as ExtendTTLModal };
100
99
 
101
100
  //# 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 } from 'lucide-react';\nimport {\n ResponsiveDialog,\n ResponsiveDialogContent,\n ResponsiveDialogHeader,\n ResponsiveDialogTitle,\n ResponsiveDialogFooter,\n} from '@burdenoff/fe-libs/ui';\nimport { Button } from './ui';\nimport { useTr } from '../hooks/useTr';\n\ninterface ExtendTTLModalProps {\n isOpen: boolean;\n onClose: () => void;\n onExtend: (additionalSeconds: number) => void;\n currentExpiresAt: string;\n isLoading?: boolean;\n}\n\nexport function ExtendTTLModal({\n isOpen,\n onClose,\n onExtend,\n currentExpiresAt,\n isLoading,\n}: ExtendTTLModalProps) {\n const tr = useTr();\n const [selectedPreset, setSelectedPreset] = useState<number | null>(null);\n const [customMinutes, setCustomMinutes] = useState('');\n\n const presetDurations = [\n {\n label: tr('sandbox.extendDialog.preset.15min', '15 minutes'),\n seconds: 15 * 60,\n },\n {\n label: tr('sandbox.extendDialog.preset.30min', '30 minutes'),\n seconds: 30 * 60,\n },\n {\n label: tr('sandbox.extendDialog.preset.1hour', '1 hour'),\n seconds: 60 * 60,\n },\n {\n label: tr('sandbox.extendDialog.preset.2hours', '2 hours'),\n seconds: 2 * 60 * 60,\n },\n ];\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 = presetDurations[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 {tr('sandbox.extendDialog.new.title', 'Extend Sandbox Duration')}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n\n <p className=\"text-sm text-text-secondary mb-4\">\n {tr(\n 'sandbox.extendDialog.currentRemaining',\n 'Current remaining time: {{count}} minutes',\n {\n count: remainingMinutes,\n }\n )}\n </p>\n\n <div className=\"space-y-2 mb-4\">\n {presetDurations.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 {tr('sandbox.extendDialog.customLabel', '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={tr('sandbox.extendDialog.customPlaceholder', 'Enter minutes')}\n aria-label={tr('sandbox.extendDialog.customAriaLabel', '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 {tr('sandbox.extendDialog.cancel', 'Cancel')}\n </Button>\n <Button\n onClick={handleExtend}\n disabled={isLoading || (selectedPreset === null && !customMinutes)}\n className=\"flex-1\"\n >\n {isLoading\n ? tr('sandbox.extendDialog.extending', 'Extending...')\n : tr('sandbox.extendDialog.submit', 'Extend')}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;AAoBA,SAAg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AAG,oCAAoC,4BAA4B;MAC9D,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,aAAa,EAAG,0CAA0C,gBAAgB;MAC1E,cAAY,EAAG,wCAAwC,6BAA6B;MACpF,WAAU;MACV,CAAA,CACE;;IAEN,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KAAQ,SAAQ;KAAU,SAAS;KAAS,WAAU;eACnD,EAAG,+BAA+B,SAAS;KACrC,CAAA,EACT,kBAAC,GAAD;KACE,eAtFiB;MACzB,IAAI;AACJ,UAAI,MAAmB,KACrB,KAAU,EAAgB,GAAgB;eACjC,GAET;WADA,IAAU,SAAS,GAAe,GAAG,GAAG,IACpC,MAAM,EAAQ,IAAI,KAAW,EAAG;YAEpC;AAEF,QAAS,EAAQ;;KA6ET,UAAU,KAAc,MAAmB,QAAQ,CAAC;KACpD,WAAU;eAET,IACG,EAAG,kCAAkC,eAAe,GACpD,EAAG,+BAA+B,SAAS;KACxC,CAAA,CACc,EAAA,CAAA;IACD;;EACT,CAAA"}
1
+ {"version":3,"file":"ExtendTTLModal.js","names":["ExtendTTLModal","tr","useTr","selectedPreset","setSelectedPreset","useState","customMinutes","setCustomMinutes","presetDurations","isOpen","remainingMs","currentExpiresAt","remainingMinutes","ResponsiveDialog","open","onClose","ResponsiveDialogContent","ResponsiveDialogHeader","ResponsiveDialogTitle","Clock","i","preset","ResponsiveDialogFooter","Button","seconds","isLoading"],"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';\nimport { useTr } from '../hooks/useTr';\n\ninterface ExtendTTLModalProps {\n isOpen: boolean;\n onClose: () => void;\n onExtend: (additionalSeconds: number) => void;\n currentExpiresAt: string;\n isLoading?: boolean;\n}\n\nexport function ExtendTTLModal({\n isOpen,\n onClose,\n onExtend,\n currentExpiresAt,\n isLoading,\n}: ExtendTTLModalProps) {\n const tr = useTr();\n const [selectedPreset, setSelectedPreset] = useState<number | null>(null);\n const [customMinutes, setCustomMinutes] = useState('');\n\n const presetDurations = [\n {\n label: tr('sandbox.extendDialog.preset.15min', '15 minutes'),\n seconds: 15 * 60,\n },\n {\n label: tr('sandbox.extendDialog.preset.30min', '30 minutes'),\n seconds: 30 * 60,\n },\n {\n label: tr('sandbox.extendDialog.preset.1hour', '1 hour'),\n seconds: 60 * 60,\n },\n {\n label: tr('sandbox.extendDialog.preset.2hours', '2 hours'),\n seconds: 2 * 60 * 60,\n },\n ];\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 = presetDurations[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 {tr('sandbox.extendDialog.new.title', 'Extend Sandbox Duration')}\n </ResponsiveDialogTitle>\n </ResponsiveDialogHeader>\n\n <p className=\"text-sm text-text-secondary mb-4\">\n {tr(\n 'sandbox.extendDialog.currentRemaining',\n 'Current remaining time: {{count}} minutes',\n {\n count: remainingMinutes,\n }\n )}\n </p>\n\n <div className=\"space-y-2 mb-4\">\n {presetDurations.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 {tr('sandbox.extendDialog.customLabel', '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={tr('sandbox.extendDialog.customPlaceholder', 'Enter minutes')}\n aria-label={tr('sandbox.extendDialog.customAriaLabel', '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 {tr('sandbox.extendDialog.cancel', 'Cancel')}\n </Button>\n <Button\n onClick={handleExtend}\n disabled={isLoading || (selectedPreset === null && !customMinutes)}\n className=\"flex-1\"\n >\n {isLoading\n ? tr('sandbox.extendDialog.extending', 'Extending...')\n : tr('sandbox.extendDialog.submit', 'Extend')}\n </Button>\n </ResponsiveDialogFooter>\n </ResponsiveDialogContent>\n </ResponsiveDialog>\n );\n}\n"],"mappings":";;;;;;;AAoBA,SAAgBA,EAAe,EAC7B,WACA,YACA,aACA,qBACA,gBACsB;CACtB,IAAMC,IAAKC,EAAM,GACX,CAACC,GAAgBC,KAAqBC,EAAwB,IAAI,GAClE,CAACC,GAAe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oCAAoC,2BAA2B;KAC9D,CAAA,GACP,kBAAC,SAAD;MACE,IAAG;MACH,MAAK;MACL,KAAI;MACJ,KAAI;MACJ,OAAOK;MACP,WAAW,MAAM;OAEf,AADAC,EAAiB,EAAE,OAAO,KAAK,GAC/BH,EAAkB,IAAI;MACxB;MACA,aAAaH,EAAG,0CAA0C,eAAe;MACzE,cAAYA,EAAG,wCAAwC,4BAA4B;MACnF,WAAU;KACX,CAAA,CACE;;IAEL,kBAACqB,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD;KAAQ,SAAQ;KAAU,SAASR;KAAS,WAAU;KACnD,UAAAd,EAAG,+BAA+B,QAAQ;IACrC,CAAA,GACR,kBAACsB,GAAD;KACE,eAtFiB;MACzB,IAAIC;MACJ,IAAIrB,MAAmB,MACrB,IAAUK,EAAgBL,EAAe,CAAC;WACrC,IAAIG,GAET;WADA,IAAU,SAASA,GAAe,EAAE,IAAI,IACpC,MAAMkB,CAAO,KAAKA,KAAW,GAAG;MAAA,OAEpC;MAEF,EAASA,CAAO;KAClB;KA4EU,UAAUC,KAActB,MAAmB,QAAQ,CAACG;KACpD,WAAU;KAET,UAAAmB,IACGxB,EAAG,kCAAkC,cAAc,IACnDA,EAAG,+BAA+B,QAAQ;IACxC,CAAA,CACc,EAAA,CAAA;GACD;;CACT,CAAA;AAEtB"}
@@ -17,6 +17,5 @@ interface FilesFolderPickerProps {
17
17
  * Styling sticks to semantic tokens (`bg-bg-surface`, `text-text-secondary`,
18
18
  * `border-border-subtle`, `text-primary`) — no raw colours.
19
19
  */
20
- export declare function FilesFolderPicker({ value, onChange }: FilesFolderPickerProps): import("react").JSX.Element;
20
+ export declare function FilesFolderPicker({ value, onChange }: FilesFolderPickerProps): import('react').JSX.Element;
21
21
  export {};
22
- //# sourceMappingURL=FilesFolderPicker.d.ts.map
@@ -5,7 +5,7 @@ import { useMemo as a, useRef as o, useState as s } from "react";
5
5
  import { AlertCircle as c, Check as l, Folder as u, FolderOpen as d, Loader2 as f, Plus as p } from "lucide-react";
6
6
  import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell";
7
7
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
8
- //#region src/sandbox/components/FilesFolderPicker.tsx
8
+ // src/sandbox/components/FilesFolderPicker.tsx
9
9
  var _ = 20;
10
10
  function v({ value: v, onChange: y }) {
11
11
  let { t: b } = m(), x = o(0), [S, C] = s(!1), [w, T] = s(""), [E, D] = s(null), { data: O, loading: k, error: A, fetchMore: j, refetch: M } = i({
@@ -154,7 +154,6 @@ function v({ value: v, onChange: y }) {
154
154
  ]
155
155
  });
156
156
  }
157
- //#endregion
158
157
  export { v as FilesFolderPicker };
159
158
 
160
159
  //# sourceMappingURL=FilesFolderPicker.js.map
@@ -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-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,O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EAAqB,EAAE,WAAW,EAAE,OAAO,EAAE,SAAM,EAAE,EAAE,CAAC,EACtD,MAAM;AAC7B,SAAI,MACF,EAAS,EAAQ,GAAG,EACpB,EAAiB,GAAG,EACpB,EAAY,GAAM,EAClB,MAAM,GAAS;iBAEV,GAAK;AACZ,WAAe,aAAe,QAAQ,EAAI,UAAU,OAAO,EAAI,CAAC;;;;MAsH1D,UAAU,KAAiB,EAAc,MAAM,CAAC,WAAW;gBAJ7D,CAMG,IAAgB,kBAAC,GAAD,EAAS,WAAU,4BAA6B,CAAA,GAAG,MACnE,EAAc,GAAG,mDAAmD,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"}
1
+ {"version":3,"file":"FilesFolderPicker.js","names":["PAGE_SIZE","FilesFolderPicker","useI18n","offsetRef","useRef","creating","setCreating","useState","newFolderName","setNewFolderName","createError","setCreateError","useSandboxGetFoldersQuery","createFolderMutation","createLoading","useSandboxCreateFolderMutation","folders","useMemo","data","hasMore","tWithFallback","t","value","onChange","error","AlertCircle","loading","Loader2","isSelected","folder","FolderOpen","Folder","Check","Button","next","fetchMore","fetchMoreResult","prev","Input","name","created","refetch","err","Plus"],"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,IAAMA,IAAY;AAsBlB,SAAgBC,EAAkB,EAAE,UAAO,eAAoC;CAC7E,IAAM,EAAE,SAAMC,EAAQ,GAChBC,IAAYC,EAAO,CAAC,GACpB,CAACC,GAAUC,KAAeC,EAAS,EAAK,GACxC,CAACC,GAAeC,KAAoBF,EAAS,EAAE,GAC/C,CAACG,GAAaC,KAAkBJ,EAAwB,IAAI,GAE5D,EAAE,SAAM,YAAS,UAAO,cAAW,eAAYK,EAA0B;EAC7E,WAAW,EAAE,YAAY;GAAE,OAAOZ;GAAW,QAAQ;EAAE,EAAE;EACzD,aAAa;EACb,6BAA6B;CAC/B,CAAC,GAEK,CAACa,GAAsB,EAAE,SAASC,OAAmBC,EAA+B,GAQpFC,IAAuBC,QACpBC,GAAM,WAAW,WAAW,CAAC,GACpC,CAACA,CAAI,CACP,GACMC,IAAUD,GAAM,WAAW,WAAW;CAsC5C,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAAC,SAAD;KAAO,WAAU;KACd,UAAAE,EAAcC,GAAG,2CAA2C,2BAA2B;IACnF,CAAA,GACNC,MAAU,QACT,kBAAC,UAAD;KACE,MAAK;KACL,eAAeC,EAAS,IAAI;KAC5B,WAAU;KAET,UAAAH,EAAcC,GAAG,2CAA2C,OAAO;IAC9D,CAAA,CAEP;;GAEL,kBAAC,KAAD;IAAG,WAAU;IACV,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UAAA,CAMGM,IAAgB,kBAACa,GAAD,EAAS,WAAU,2BAA4B,CAAA,IAAI,MACnEP,EAAcC,GAAG,mDAAmD,QAAQ,CACvE;;KACR,kBAACY,GAAD;MACE,MAAK;MACL,MAAK;MACL,SAAQ;MACR,eAAe;OAGb,AAFA3B,EAAY,EAAK,GACjBG,EAAiB,EAAE,GACnBE,EAAe,IAAI;MACrB;MAEC,UAAAS,EAAcC,GAAG,4CAA4C,QAAQ;KAChE,CAAA;IACL;GAEL,CAAA,IAAA,kBAACY,GAAD;IAAQ,MAAK;IAAS,SAAQ;IAAU,MAAK;IAAK,eAAe3B,EAAY,EAAI;IAAjF,UAAA,CACE,kBAACqC,GAAD,EAAM,WAAU,cAAe,CAAA,GAC9BvB,EAAcC,GAAG,+CAA+C,eAAe,CAC1E;;GAGTX,KACC,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,kBAACe,GAAD,EAAa,WAAU,SAAU,CAAA,GAChCf,CACE;;EAEJ;;AAET"}
@@ -1,5 +1,4 @@
1
1
  import { ReactNode } from 'react';
2
-
3
2
  interface PageLayoutProps {
4
3
  children: ReactNode;
5
4
  /** Page title (string, or a node when a gradient/emphasis treatment is needed) */
@@ -31,7 +30,7 @@ interface PageLayoutProps {
31
30
  /**
32
31
  * PageLayout - A consistent page wrapper with responsive design
33
32
  */
34
- export declare function PageLayout({ children, title, subtitle, icon, headerActions, headerContent, heroBackdrop, maxWidth, showHeader, className, contentClassName, }: PageLayoutProps): import("react").JSX.Element;
33
+ export declare function PageLayout({ children, title, subtitle, icon, headerActions, headerContent, heroBackdrop, maxWidth, showHeader, className, contentClassName, }: PageLayoutProps): import('react').JSX.Element;
35
34
  /**
36
35
  * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.
37
36
  * Keeps the existing microfe-sandbox call sites stable while routing all
@@ -43,6 +42,5 @@ export declare function EmptyState({ icon, title, description, action, className
43
42
  description?: string;
44
43
  action?: ReactNode;
45
44
  className?: string;
46
- }): import("react").JSX.Element;
45
+ }): import('react').JSX.Element;
47
46
  export {};
48
- //# sourceMappingURL=PageLayout.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
3
  import "@burdenoff/fe-libs/ui";
4
- //#region src/sandbox/components/PageLayout.tsx
4
+ // src/sandbox/components/PageLayout.tsx
5
5
  var r = {
6
6
  sm: "max-w-screen-sm",
7
7
  md: "max-w-screen-md",
@@ -54,7 +54,6 @@ function i({ children: i, title: a, subtitle: o, icon: s, headerActions: c, head
54
54
  })
55
55
  });
56
56
  }
57
- //#endregion
58
57
  export { i as PageLayout };
59
58
 
60
59
  //# sourceMappingURL=PageLayout.js.map
@@ -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 (string, or a node when a gradient/emphasis treatment is needed) */\n title?: ReactNode;\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 /**\n * Optional decorative backdrop rendered behind the header section (e.g. an\n * `<AuroraBackground />`). It is placed in a `relative overflow-hidden`\n * wrapper at -z-10 so it never moves or covers content. Use sparingly — one\n * hero backdrop per MFE (the primary page).\n */\n heroBackdrop?: 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 heroBackdrop,\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\n className={cn(\n 'mb-6 sm:mb-8',\n heroBackdrop && 'relative overflow-hidden rounded-2xl px-4 py-5 sm:px-6 sm:py-6'\n )}\n >\n {heroBackdrop}\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":";;;;AAiCA,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,iBACA,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;IACE,WAAW,EACT,gBACA,KAAgB,iEACjB;cAJH;KAMG;KACD,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,OAAD;OAAK,WAAU;iBAAf,EACI,KAAS,MACT,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,KACC,kBAAC,OAAD;SAAK,WAAU;mBACZ;SACG,CAAA,EAEP,KACC,kBAAC,MAAD;SAAI,WAAU;mBACX;SACE,CAAA,CAEH;WAEP,KACC,kBAAC,KAAD;QAAG,WAAU;kBAAsD;QAAa,CAAA,CAE9E;UACL,KACC,kBAAC,OAAD;OAAK,WAAU;iBAAyC;OAAoB,CAAA,CAE1E;;KACL,KAAiB,kBAAC,OAAD;MAAK,WAAU;gBAAQ;MAAoB,CAAA;KACtD;OAKX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA"}
1
+ {"version":3,"file":"PageLayout.js","names":["maxWidthClasses","PageLayout","cn","className","maxWidth","contentClassName","showHeader","title","headerActions","heroBackdrop","icon","subtitle","headerContent"],"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 (string, or a node when a gradient/emphasis treatment is needed) */\n title?: ReactNode;\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 /**\n * Optional decorative backdrop rendered behind the header section (e.g. an\n * `<AuroraBackground />`). It is placed in a `relative overflow-hidden`\n * wrapper at -z-10 so it never moves or covers content. Use sparingly — one\n * hero backdrop per MFE (the primary page).\n */\n heroBackdrop?: 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 heroBackdrop,\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\n className={cn(\n 'mb-6 sm:mb-8',\n heroBackdrop && 'relative overflow-hidden rounded-2xl px-4 py-5 sm:px-6 sm:py-6'\n )}\n >\n {heroBackdrop}\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":";;;;AAiCA,IAAMA,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;AACR;AAKA,SAAgBC,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,iBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;CAClB,OACE,kBAAC,OAAD;EACE,WAAWC,EACT,uDACA,iCACA,yBACA,4DACAC,CACF;EAEA,UAAA,kBAAC,OAAD;GAAK,WAAWD,EAAG,kBAAkBF,EAAgBI,IAAWC,CAAgB;GAAhF,UAAA,CACGC,MAAeC,KAASC,MACvB,kBAAC,UAAD;IACE,WAAWN,EACT,gBACAO,KAAgB,gEAClB;IAJF,UAAA;KAMGA;KACD,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,EACIF,KAASG,MACT,kBAAC,OAAD;QAAK,WAAU;QAAf,UAAA,CACGA,KACC,kBAAC,OAAD;SAAK,WAAU;SACZ,UAAAA;QACE,CAAA,GAENH,KACC,kBAAC,MAAD;SAAI,WAAU;SACX,UAAAA;QACC,CAAA,CAEH;OAEN,CAAA,GAAAI,KACC,kBAAC,KAAD;QAAG,WAAU;QAAsD,UAAAA;OAAY,CAAA,CAE9E;MACJ,CAAA,GAAAH,KACC,kBAAC,OAAD;OAAK,WAAU;OAAyC,UAAAA;MAAmB,CAAA,CAE1E;;KACJI,KAAiB,kBAAC,OAAD;MAAK,WAAU;MAAQ,UAAAA;KAAmB,CAAA;IACtD;GAKV,CAAA,GAAA,kBAAC,OAAD;IAAK,WAAU;IAAa;GAAc,CAAA,CACvC;;CACF,CAAA;AAET"}
@@ -1,5 +1,4 @@
1
1
  import { FC } from 'react';
2
-
3
2
  interface ResourceDisplayProps {
4
3
  cpuRequest: string;
5
4
  cpuLimit?: string;
@@ -14,4 +13,3 @@ interface ResourceDisplayProps {
14
13
  */
15
14
  export declare const ResourceDisplay: FC<ResourceDisplayProps>;
16
15
  export {};
17
- //# sourceMappingURL=ResourceDisplay.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { Container as t, Cpu as n, MemoryStick as r } from "lucide-react";
3
3
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
- //#region src/sandbox/components/ResourceDisplay.tsx
4
+ // src/sandbox/components/ResourceDisplay.tsx
5
5
  var o = ({ cpuRequest: o, cpuLimit: s, memoryRequest: c, memoryLimit: l, containerCount: u, className: d, layout: f = "inline" }) => {
6
6
  let p = [
7
7
  {
@@ -63,7 +63,6 @@ var o = ({ cpuRequest: o, cpuLimit: s, memoryRequest: c, memoryLimit: l, contain
63
63
  }, e.label))
64
64
  });
65
65
  };
66
- //#endregion
67
66
  export { o as ResourceDisplay };
68
67
 
69
68
  //# sourceMappingURL=ResourceDisplay.js.map
@@ -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-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 tabular-nums\">{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 tabular-nums\">{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;eAAsC,EAAK;KAAa,CAAA;IACpE;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;eAA4B,EAAK;KAAa,CAAA;IAC7D,IAAQ,EAAM,SAAS,KAAK,kBAAC,QAAD;KAAM,WAAU;eAA8B;KAAQ,CAAA;IAC9E;KAJI,EAAK,MAIT,CACP;EACE,CAAA"}
1
+ {"version":3,"file":"ResourceDisplay.js","names":["ResourceDisplay","items","Cpu","cpuLimit","cpuRequest","MemoryStick","memoryLimit","memoryRequest","containerCount","Container","layout","cn","className","item","index"],"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 tabular-nums\">{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 tabular-nums\">{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,IAAaA,KAA6C,EACxD,eACA,aACA,kBACA,gBACA,mBACA,cACA,YAAS,eACL;CACJ,IAAMC,IAAQ;EACZ;GACE,MAAMC;GACN,OAAO;GACP,OAAOC,IAAW,GAAGC,EAAW,KAAKD,MAAaC;GAClD,OAAO;EACT;EACA;GACE,MAAMC;GACN,OAAO;GACP,OAAOC,IAAc,GAAGC,EAAc,KAAKD,MAAgBC;GAC3D,OAAO;EACT;EACA,GAAIC,MAAmB,KAAA,IASnB,CAAC,IARD,CACE;GACE,MAAMC;GACN,OAAO;GACP,OAAO,GAAGD;GACV,OAAO;EACT,CACF;CAEN;CAmBA,OAjBIE,MAAW,SAEX,kBAAC,OAAD;EAAK,WAAWC,EAAG,0BAA0BC,CAAS;EACnD,UAAAX,EAAM,KAAK,MACV,kBAAC,OAAD;GAEE,WAAU;GAFZ,UAAA;IAIE,kBAACY,EAAK,MAAN;KAAW,MAAM;KAAI,WAAWA,EAAK;IAAQ,CAAA;IAC7C,kBAAC,QAAD;KAAM,WAAU;KAA+B,UAAAA,EAAK;IAAY,CAAA;IAChE,kBAAC,QAAD;KAAM,WAAU;KAAsC,UAAAA,EAAK;IAAY,CAAA;GACpE;EANE,GAAAA,EAAK,KAMP,CACN;CACE,CAAA,IAKP,kBAAC,OAAD;EAAK,WAAWF,EAAG,mCAAmCC,CAAS;EAC5D,UAAAX,EAAM,KAAK,GAAM,MAChB,kBAAC,QAAD;GAAuB,WAAU;GAAjC,UAAA;IACE,kBAACY,EAAK,MAAN;KAAW,MAAM;KAAI,WAAWA,EAAK;IAAQ,CAAA;IAC7C,kBAAC,QAAD;KAAM,WAAU;KAA4B,UAAAA,EAAK;IAAY,CAAA;IAC5DC,IAAQb,EAAM,SAAS,KAAK,kBAAC,QAAD;KAAM,WAAU;KAA8B,UAAA;IAAO,CAAA;GAC9E;EAJK,GAAAY,EAAK,KAIV,CACP;CACE,CAAA;AAET"}
@@ -1,9 +1,8 @@
1
1
  import { Component, ReactNode, ErrorInfo } from 'react';
2
-
3
2
  /**
4
3
  * Loading fallback for lazy-loaded pages
5
4
  */
6
- export declare function PageLoader(): import("react").JSX.Element;
5
+ export declare function PageLoader(): import('react').JSX.Element;
7
6
  /**
8
7
  * Error boundary for lazy-loaded page chunks.
9
8
  * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.
@@ -23,6 +22,5 @@ export declare class LazyErrorBoundary extends Component<{
23
22
  };
24
23
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
25
24
  handleRetry: () => void;
26
- render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
25
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import('react').JSX.Element | null | undefined;
27
26
  }
28
- //# sourceMappingURL=RouteUtils.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { Component as e } from "react";
2
2
  import { AlertTriangle as t, Loader2 as n, RefreshCw as r } from "lucide-react";
3
3
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
- //#region src/sandbox/components/RouteUtils.tsx
4
+ // src/sandbox/components/RouteUtils.tsx
5
5
  function o() {
6
6
  return /* @__PURE__ */ i("div", {
7
7
  className: "flex items-center justify-center min-h-[400px]",
@@ -25,11 +25,7 @@ var s = class extends e {
25
25
  console.error("[Sandbox] Lazy page load failed:", e, t);
26
26
  }
27
27
  handleRetry = () => {
28
- if (this.state.error?.name === "ChunkLoadError") {
29
- window.location.reload();
30
- return;
31
- }
32
- this.setState({
28
+ this.state.error?.name === "ChunkLoadError" ? window.location.reload() : this.setState({
33
29
  hasError: !1,
34
30
  error: null
35
31
  });
@@ -62,7 +58,6 @@ var s = class extends e {
62
58
  }) : this.props.children;
63
59
  }
64
60
  };
65
- //#endregion
66
61
  export { s as LazyErrorBoundary, o as PageLoader };
67
62
 
68
63
  //# sourceMappingURL=RouteUtils.js.map
@@ -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-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"}
1
+ {"version":3,"file":"RouteUtils.js","names":["PageLoader","Loader2","LazyErrorBoundary","Component","props","error","errorInfo","AlertTriangle","RefreshCw"],"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 override 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 override 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,SAAgBA,IAAa;CAC3B,OACE,kBAAC,OAAD;EAAK,WAAU;EACb,UAAA,kBAACC,GAAD,EAAS,WAAU,mCAAoC,CAAA;CACpD,CAAA;AAET;AAMA,IAAaC,IAAb,cAAuCC,EAGrC;CACA,YAAY,GAAgC;EAE1C,AADA,MAAMC,CAAK,GACX,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;EAAK;CAC9C;CAEA,OAAO,yBAAyB,GAAc;EAC5C,OAAO;GAAE,UAAU;GAAM;EAAM;CACjC;CAEA,kBAA2B,GAAc,GAAsB;EAC7D,QAAQ,MAAM,oCAAoCC,GAAOC,CAAS;CACpE;CAEA,oBAAoB;EAClB,AAAI,KAAK,MAAM,OAAO,SAAS,mBAC7B,OAAO,SAAS,OAAO,IAGzB,KAAK,SAAS;GAAE,UAAU;GAAO,OAAO;EAAK,CAAC;CAChD;CAEA,SAAkB;EA2BhB,OA1BI,KAAK,MAAM,WAEX,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACE,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA,kBAACC,GAAD,EAAe,WAAU,gCAAiC,CAAA;IACvD,CAAA;IACL,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,kBAAC,MAAD;MAAI,WAAU;MAA0C,UAAA;KAAuB,CAAA,GAC/E,kBAAC,KAAD;MAAG,WAAU;MACV,UAAA,KAAK,MAAM,OAAO,SAAS,SAAS,eAAe,IAChD,4EACA;KACH,CAAA,CACA;;IACL,kBAAC,UAAD;KACE,MAAK;KACL,SAAS,KAAK;KACd,WAAU;KAHZ,UAAA,CAKE,kBAACC,GAAD,EAAW,WAAU,SAAU,CAAA,GAAC,WAE1B;;GACL;E,KAIF,KAAK,MAAM;CACpB;AACF"}
@@ -9,6 +9,5 @@ interface Props {
9
9
  * so no new backend query is needed for the v0.3.0 cycle. Server-side scoping
10
10
  * will move to a dedicated `getSandboxAuditLog(sandboxId)` query in a follow-up.
11
11
  */
12
- export declare function SandboxActivityTab({ sandboxId, workspaceId, pageSize }: Props): import("react").JSX.Element;
12
+ export declare function SandboxActivityTab({ sandboxId, workspaceId, pageSize }: Props): import('react').JSX.Element;
13
13
  export {};
14
- //# sourceMappingURL=SandboxActivityTab.d.ts.map
@@ -5,7 +5,7 @@ import { useApolloClient as a } from "@apollo/client/react";
5
5
  import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell";
6
6
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  import { IllustratedEmptyState as l } from "@burdenoff/fe-libs/ui";
8
- //#region src/sandbox/components/SandboxActivityTab.tsx
8
+ // src/sandbox/components/SandboxActivityTab.tsx
9
9
  var u = i`
10
10
  query GetRecentSandboxActivity($context: ContextInput!, $limit: Int) {
11
11
  getRecentSandboxActivity(context: $context, limit: $limit) {
@@ -34,7 +34,9 @@ function d({ sandboxId: i, workspaceId: d, pageSize: f = 50 }) {
34
34
  },
35
35
  fetchPolicy: "network-only"
36
36
  }).then((t) => {
37
- e || g((t.data?.getRecentSandboxActivity?.items ?? []).filter((e) => e.sandboxId === i));
37
+ if (e) return;
38
+ let n = t.data?.getRecentSandboxActivity?.items ?? [];
39
+ g(n.filter((e) => e.sandboxId === i));
38
40
  }).catch((t) => {
39
41
  e || v(t instanceof Error ? t.message : String(t));
40
42
  }), () => {
@@ -78,7 +80,6 @@ function d({ sandboxId: i, workspaceId: d, pageSize: f = 50 }) {
78
80
  }, t.id))
79
81
  });
80
82
  }
81
- //#endregion
82
83
  export { d as SandboxActivityTab };
83
84
 
84
85
  //# sourceMappingURL=SandboxActivityTab.js.map
@@ -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 { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\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 <IllustratedEmptyState\n illustration=\"empty-notifications\"\n className=\"py-6\"\n title={tWithFallback(t, 'sandbox.activity.empty', 'No activity yet.')}\n description={tWithFallback(\n t,\n 'sandbox.activity.emptyDescription',\n 'Actions on this sandbox — starts, stops, TTL extensions and script runs — will show up here as they happen.'\n )}\n />\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":";;;;;;;;AAOA,IAAM,IAAkB,CAAG;;;;;;;;;;;;;;;;AAuC3B,SAAgB,EA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;KACG,EAAc,GAAG,0BAA0B,MAAM,EAAM,WAAW,EACjE,OAAO,EAAM,SACd,CAAC;KAAE;KAAI;KACN;KACD,EACC,GACA,2BACA,MAAM,IAAI,KAAK,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":["RECENT_ACTIVITY","SandboxActivityTab","useI18n","client","useApolloClient","items","setItems","useState","error","setError","cancelled","pageSize","all","res","entry","sandboxId","err","workspaceId","sorted","useMemo","b","a","tWithFallback","t","IllustratedEmptyState"],"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 { IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\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 <IllustratedEmptyState\n illustration=\"empty-notifications\"\n className=\"py-6\"\n title={tWithFallback(t, 'sandbox.activity.empty', 'No activity yet.')}\n description={tWithFallback(\n t,\n 'sandbox.activity.emptyDescription',\n 'Actions on this sandbox — starts, stops, TTL extensions and script runs — will show up here as they happen.'\n )}\n />\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).toL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AACM,GAAD;EACE,cAAa;EACb,WAAU;EACV,OAAOF,EAAcC,GAAG,0BAA0B,kBAAkB;EACpE,aAAaD,EACXC,GACA,qCACA,6GACF;CACD,CAAA,IAKH,kBAAC,MAAD;EAAI,WAAU;EACX,UAAAL,EAAO,KAAK,MACX,kBAAC,MAAD;GAAmB,WAAU;GAA7B,UAAA,CACE,kBAAC,OAAD;IAAK,WAAU;IAAyC,UAAAJ,EAAM;GAAY,CAAA,GAC1E,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACGQ,EAAcC,GAAG,0BAA0B,MAAMT,EAAM,WAAW,EACjE,OAAOA,EAAM,QACf,CAAC;KAAG;KAAI;KACN;KACDQ,EACCC,GACA,2BACA,MAAM,IAAI,KAAKT,EAAM,SAAS,CAAC,CAAC,eAAe,KAC/C,EACE,MAAM,IAAI,KAAKA,EAAM,SAAS,CAAC,CAAC,eAAe,EACjD,CACF;IACG;GACH,CAAA,CAAA;EAhBK,GAAAA,EAAM,EAgBX,CACL;CACC,CAAA;AAER"}
@@ -11,6 +11,5 @@ interface Props {
11
11
  * once, on first create — afterwards the panel hides it behind a "rotate via
12
12
  * Developer Portal" message.
13
13
  */
14
- export declare function SandboxAgentAppPanel({ appId, clientId, clientSecret }: Props): import("react").JSX.Element | null;
14
+ export declare function SandboxAgentAppPanel({ appId, clientId, clientSecret }: Props): import('react').JSX.Element | null;
15
15
  export {};
16
- //# sourceMappingURL=SandboxAgentAppPanel.d.ts.map
@@ -4,7 +4,7 @@ import { useState as n } from "react";
4
4
  import { CheckCircle2 as r, Copy as i, Eye as a, EyeOff as o } from "lucide-react";
5
5
  import { useI18n as s } from "@burdenoff/fe-libs/shared/providers/shell";
6
6
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
- //#region src/sandbox/components/SandboxAgentAppPanel.tsx
7
+ // src/sandbox/components/SandboxAgentAppPanel.tsx
8
8
  function d({ appId: t, clientId: d, clientSecret: p }) {
9
9
  let { t: m } = s(), [h, g] = n(!1), [_, v] = n(null);
10
10
  if (!t && !d) return null;
@@ -99,7 +99,6 @@ function f({ label: e, value: n, onCopy: a, copied: o }) {
99
99
  })]
100
100
  });
101
101
  }
102
- //#endregion
103
102
  export { d as SandboxAgentAppPanel };
104
103
 
105
104
  //# sourceMappingURL=SandboxAgentAppPanel.js.map
@@ -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';\nimport { useTr } from '../hooks/useTr';\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 const tr = useTr();\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={tr('sandbox.agentApp.copyLabel', 'Copy {{label}}', { 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":";;;;;;;AAoBA,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,k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GAA9B,EAAc,MAAM,IAAM,CAAqB;IAClD,CAAA,CACN;KACD"}
1
+ {"version":3,"file":"SandboxAgentAppPanel.js","names":["_Fragment","SandboxAgentAppPanel","useI18n","revealed","setRevealed","useState","copied","setCopied","appId","clientId","copy","value","key","current","tWithFallback","t","Row","clientSecret","Fragment","jsx","CheckCircle2","Copy","EyeOff","Eye","tr","useTr","label","onCopy"],"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';\nimport { useTr } from '../hooks/useTr';\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 const tr = useTr();\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={tr('sandbox.agentApp.copyLabel', 'Copy {{label}}', { 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":";;;;;;;AAoBA,SAAgBC,EAAqB,EAAE,UAAO,aAAU,mBAAuB;CAC7E,IAAM,EAAE,SAAMC,EAAQ,GAChB,CAACC,GAAUC,KAAeC,EAAS,EAAK,GACxC,CAACC,GAAQC,KAAaF,EAAwB,IAAI;CAExD,IAAI,CAACG,KAAS,CAACC,GAAU,OAAO;CAEhC,IAAMC,KAAQ,GAAe,MAAgB;EAG3C,AAFA,UAAe,UAAU,UAAUC,CAAK,GACxCJ,EAAUK,CAAG,GACb,iBAAiBL,GAAW,MAAaM,MAAYD,IAAM,OAAOC,CAAQ,GAAG,IAAI;CACnF;CAEA,OACE,kBAAC,WAAD;EACE,cAAYC,EAAcC,GAAG,0BAA0B,6BAA6B;EACpF,WAAU;EAFZ,UAAA;GAIE,kBAAC,MAAD;IAAI,WAAU;IACX,UAAAD,EAAcC,GAAG,0BAA0B,6BAA6B;GACvE,CAAA;GACJ,kBAAC,KAAD;IAAG,WAAU;IACV,UAAAD,EACCC,GACA,gCACA,oHACF;GACC,CAAA;GACH,kBAAC,MAAD;IAAI,WAAU;IAAd,UAAA;KACGP,KACC,kBAACQ,GAAD;MACE,OAAOF,EAAcC,GAAG,0BAA0B,QAAQ;MAC1D,OAAOP;MACP,cAAcE,EAAKF,GAAO,KAAK;MAC/B,QAAQF,MAAW;KACpB,CAAA;KAEFG,KACC,kBAACO,GAAD;MACE,OAAOF,EAAcC,GAAG,6BAA6B,WAAW;MAChE,OAAON;MACP,cAAcC,EAA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AC,QAAD,EAAA,UAAOf,EAAY,CAAA,GACnB,kBAAC,UAAD;IACE,MAAK;IACL,SAASgB;IACT,cAAYH,EAAG,8BAA8B,kBAAkB,EAAE,SAAM,CAAC;IACxE,WAAU;IAET,UAASL,EAATb,IAAUc,IAA6BC,GAA9B,EAAc,MAAM,GAAK,CAAqB;GAClD,CAAA,CACN;EACD,CAAA,CAAA;;AAET"}
@@ -11,4 +11,3 @@ export declare function SandboxScriptRunnerPanel({ sandbox, workspaceId, }: {
11
11
  };
12
12
  workspaceId: string;
13
13
  }): React.ReactElement;
14
- //# sourceMappingURL=SandboxScriptRunnerPanel.d.ts.map
@@ -6,7 +6,7 @@ import { AlertCircle as f, ArrowUpCircle as p, CheckCircle2 as m, Loader2 as h,
6
6
  import { useSearchParams as b } from "react-router";
7
7
  import { useI18n as x } from "@burdenoff/fe-libs/shared/providers/shell";
8
8
  import { jsx as S, jsxs as C } from "react/jsx-runtime";
9
- //#region src/sandbox/components/SandboxScriptRunnerPanel.tsx
9
+ // src/sandbox/components/SandboxScriptRunnerPanel.tsx
10
10
  var w = [
11
11
  "bash",
12
12
  "sh",
@@ -37,7 +37,7 @@ function E({ sandbox: m, workspaceId: E }) {
37
37
  }
38
38
  }, []);
39
39
  let Z = c(async () => {
40
- if (!(!N.trim() || !V)) try {
40
+ if (N.trim() && V) try {
41
41
  let e = (await W({ variables: { input: {
42
42
  sandboxId: m.id,
43
43
  script: N,
@@ -235,7 +235,6 @@ function O({ run: e, tr: t }) {
235
235
  ]
236
236
  });
237
237
  }
238
- //#endregion
239
238
  export { E as SandboxScriptRunnerPanel };
240
239
 
241
240
  //# sourceMappingURL=SandboxScriptRunnerPanel.js.map