@burdenoff/microfe-sandbox 2026.624.2 → 2026.624.3

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.
@@ -16,7 +16,7 @@ function l({ expiresAt: l, onExpired: u, onExtend: d, compact: f = !1 }) {
16
16
  role: "timer",
17
17
  "aria-live": "polite",
18
18
  "aria-label": w,
19
- className: `inline-flex items-center gap-1 text-sm font-mono ${x}`,
19
+ className: `inline-flex items-center gap-1 text-sm font-mono tabular-nums ${x}`,
20
20
  children: [/* @__PURE__ */ s(a, {
21
21
  "aria-hidden": "true",
22
22
  className: "size-3.5"
@@ -34,7 +34,7 @@ function l({ expiresAt: l, onExpired: u, onExtend: d, compact: f = !1 }) {
34
34
  /* @__PURE__ */ c("div", {
35
35
  className: "flex flex-col",
36
36
  children: [/* @__PURE__ */ s("span", {
37
- className: `text-lg font-mono font-semibold ${x}`,
37
+ className: `text-lg font-mono font-semibold tabular-nums ${x}`,
38
38
  children: b
39
39
  }), /* @__PURE__ */ s("span", {
40
40
  className: "text-xs text-text-secondary",
@@ -1 +1 @@
1
- {"version":3,"file":"CountdownTimer.js","names":[],"sources":["../../../src/sandbox/components/CountdownTimer.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { Timer, Plus, AlertTriangle } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { tWithFallback } from '../utils/i18n';\nimport { useRemainingSeconds } from '../hooks/useRemainingSeconds';\n\ninterface CountdownTimerProps {\n expiresAt: string;\n onExpired?: () => void;\n onExtend?: () => void;\n compact?: boolean;\n}\n\nexport function CountdownTimer({\n expiresAt,\n onExpired,\n onExtend,\n compact = false,\n}: CountdownTimerProps) {\n const remainingSeconds = useRemainingSeconds(expiresAt, onExpired);\n const { t } = useI18n();\n\n // Browser notification at 60 seconds remaining, once per expiresAt window.\n // Ref-based flag avoids a render cycle and tracks the active expiresAt directly.\n const alertedForRef = useRef<string | null>(null);\n if (\n alertedForRef.current !== expiresAt &&\n remainingSeconds <= 60 &&\n remainingSeconds > 0 &&\n typeof window !== 'undefined' &&\n 'Notification' in window &&\n Notification.permission === 'granted'\n ) {\n alertedForRef.current = expiresAt;\n new Notification(tWithFallback(t, 'sandbox.timer.alertTitle', 'Sandbox expiring'), {\n body: tWithFallback(\n t,\n 'sandbox.timer.alertBody',\n 'Your sandbox will be destroyed in less than 1 minute. Extend it to continue working.'\n ),\n icon: '/favicon.ico',\n });\n }\n\n const hours = Math.floor(remainingSeconds / 3600);\n const minutes = Math.floor((remainingSeconds % 3600) / 60);\n const seconds = remainingSeconds % 60;\n const fmt = (n: number) => String(n).padStart(2, '0');\n const timeString =\n hours > 0 ? `${fmt(hours)}:${fmt(minutes)}:${fmt(seconds)}` : `${fmt(minutes)}:${fmt(seconds)}`;\n\n const color = (() => {\n if (remainingSeconds <= 0) return 'text-text-secondary';\n if (remainingSeconds <= 30) return 'text-status-error-text animate-pulse';\n if (remainingSeconds <= 60) return 'text-status-error-text';\n if (remainingSeconds <= 300) return 'text-status-warning-text';\n return 'text-status-success-text';\n })();\n\n const bg = (() => {\n if (remainingSeconds <= 0) return 'bg-bg-sunken border-border-subtle';\n if (remainingSeconds <= 60) return 'bg-status-error-bg-subtle border-border-default';\n if (remainingSeconds <= 300) return 'bg-status-warning-bg-subtle border-border-default';\n return 'bg-status-success-bg-subtle border-border-default';\n })();\n\n const remainingMinutes = Math.max(1, Math.ceil(remainingSeconds / 60));\n const accessibleLabel =\n remainingSeconds <= 0\n ? tWithFallback(t, 'sandbox.timer.expired', 'Expired')\n : tWithFallback(t, 'sandbox.timer.remaining', `${remainingMinutes} minutes remaining`, {\n count: remainingMinutes,\n });\n\n if (compact) {\n return (\n <span\n role=\"timer\"\n aria-live=\"polite\"\n aria-label={accessibleLabel}\n className={`inline-flex items-center gap-1 text-sm font-mono ${color}`}\n >\n <Timer aria-hidden=\"true\" className=\"size-3.5\" />\n {timeString}\n </span>\n );\n }\n\n return (\n <div\n role=\"timer\"\n aria-live=\"polite\"\n aria-label={accessibleLabel}\n className={`flex items-center gap-3 rounded-lg border px-4 py-2 ${bg}`}\n >\n <Timer aria-hidden=\"true\" className={`size-5 ${color}`} />\n <div className=\"flex flex-col\">\n <span className={`text-lg font-mono font-semibold ${color}`}>{timeString}</span>\n <span className=\"text-xs text-text-secondary\">\n {remainingSeconds <= 0\n ? tWithFallback(t, 'sandbox.timer.expired', 'Expired')\n : tWithFallback(t, 'sandbox.timer.label', 'Time remaining')}\n </span>\n </div>\n\n {remainingSeconds <= 60 && remainingSeconds > 0 && (\n <div className=\"flex items-center gap-1 text-xs text-status-error-text font-medium\">\n <AlertTriangle aria-hidden=\"true\" className=\"size-3.5\" />\n {tWithFallback(t, 'sandbox.timer.expiringSoon', 'Expiring soon')}\n </div>\n )}\n\n {onExtend && remainingSeconds > 0 && (\n <button\n type=\"button\"\n onClick={onExtend}\n aria-label={tWithFallback(t, 'sandbox.timer.extend', 'Extend sandbox duration')}\n className=\"ml-auto flex items-center gap-1 rounded-md bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-secondary shadow-sm border border-border-subtle hover:bg-bg-sunken transition-colors\"\n >\n <Plus aria-hidden=\"true\" className=\"size-3.5\" />\n {tWithFallback(t, 'sandbox.timer.extend', 'Extend')}\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAaA,SAAgB,EAAe,EAC7B,cACA,cACA,aACA,aAAU,MACY;CACtB,IAAM,IAAmB,EAAoB,GAAW,EAAU,EAC5D,EAAE,SAAM,GAAS,EAIjB,IAAgB,EAAsB,KAAK;AACjD,CACE,EAAc,YAAY,KAC1B,KAAoB,MACpB,IAAmB,KACnB,OAAO,SAAW,OAClB,kBAAkB,UAClB,aAAa,eAAe,cAE5B,EAAc,UAAU,GACxB,IAAI,aAAa,EAAc,GAAG,4BAA4B,mBAAmB,EAAE;EACjF,MAAM,EACJ,GACA,2BACA,uFACD;EACD,MAAM;EACP,CAAC;CAGJ,IAAM,IAAQ,K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;cAAf,CACE,kBAAC,GAAD;KAAe,eAAY;KAAO,WAAU;KAAa,CAAA,EACxD,EAAc,GAAG,8BAA8B,gBAAgB,CAC5D;;GAGP,KAAY,IAAmB,KAC9B,kBAAC,UAAD;IACE,MAAK;IACL,SAAS;IACT,cAAY,EAAc,GAAG,wBAAwB,0BAA0B;IAC/E,WAAU;cAJZ,CAME,kBAAC,GAAD;KAAM,eAAY;KAAO,WAAU;KAAa,CAAA,EAC/C,EAAc,GAAG,wBAAwB,SAAS,CAC5C;;GAEP"}
1
+ {"version":3,"file":"CountdownTimer.js","names":[],"sources":["../../../src/sandbox/components/CountdownTimer.tsx"],"sourcesContent":["import { useRef } from 'react';\nimport { Timer, Plus, AlertTriangle } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell';\nimport { tWithFallback } from '../utils/i18n';\nimport { useRemainingSeconds } from '../hooks/useRemainingSeconds';\n\ninterface CountdownTimerProps {\n expiresAt: string;\n onExpired?: () => void;\n onExtend?: () => void;\n compact?: boolean;\n}\n\nexport function CountdownTimer({\n expiresAt,\n onExpired,\n onExtend,\n compact = false,\n}: CountdownTimerProps) {\n const remainingSeconds = useRemainingSeconds(expiresAt, onExpired);\n const { t } = useI18n();\n\n // Browser notification at 60 seconds remaining, once per expiresAt window.\n // Ref-based flag avoids a render cycle and tracks the active expiresAt directly.\n const alertedForRef = useRef<string | null>(null);\n if (\n alertedForRef.current !== expiresAt &&\n remainingSeconds <= 60 &&\n remainingSeconds > 0 &&\n typeof window !== 'undefined' &&\n 'Notification' in window &&\n Notification.permission === 'granted'\n ) {\n alertedForRef.current = expiresAt;\n new Notification(tWithFallback(t, 'sandbox.timer.alertTitle', 'Sandbox expiring'), {\n body: tWithFallback(\n t,\n 'sandbox.timer.alertBody',\n 'Your sandbox will be destroyed in less than 1 minute. Extend it to continue working.'\n ),\n icon: '/favicon.ico',\n });\n }\n\n const hours = Math.floor(remainingSeconds / 3600);\n const minutes = Math.floor((remainingSeconds % 3600) / 60);\n const seconds = remainingSeconds % 60;\n const fmt = (n: number) => String(n).padStart(2, '0');\n const timeString =\n hours > 0 ? `${fmt(hours)}:${fmt(minutes)}:${fmt(seconds)}` : `${fmt(minutes)}:${fmt(seconds)}`;\n\n const color = (() => {\n if (remainingSeconds <= 0) return 'text-text-secondary';\n if (remainingSeconds <= 30) return 'text-status-error-text animate-pulse';\n if (remainingSeconds <= 60) return 'text-status-error-text';\n if (remainingSeconds <= 300) return 'text-status-warning-text';\n return 'text-status-success-text';\n })();\n\n const bg = (() => {\n if (remainingSeconds <= 0) return 'bg-bg-sunken border-border-subtle';\n if (remainingSeconds <= 60) return 'bg-status-error-bg-subtle border-border-default';\n if (remainingSeconds <= 300) return 'bg-status-warning-bg-subtle border-border-default';\n return 'bg-status-success-bg-subtle border-border-default';\n })();\n\n const remainingMinutes = Math.max(1, Math.ceil(remainingSeconds / 60));\n const accessibleLabel =\n remainingSeconds <= 0\n ? tWithFallback(t, 'sandbox.timer.expired', 'Expired')\n : tWithFallback(t, 'sandbox.timer.remaining', `${remainingMinutes} minutes remaining`, {\n count: remainingMinutes,\n });\n\n if (compact) {\n return (\n <span\n role=\"timer\"\n aria-live=\"polite\"\n aria-label={accessibleLabel}\n className={`inline-flex items-center gap-1 text-sm font-mono tabular-nums ${color}`}\n >\n <Timer aria-hidden=\"true\" className=\"size-3.5\" />\n {timeString}\n </span>\n );\n }\n\n return (\n <div\n role=\"timer\"\n aria-live=\"polite\"\n aria-label={accessibleLabel}\n className={`flex items-center gap-3 rounded-lg border px-4 py-2 ${bg}`}\n >\n <Timer aria-hidden=\"true\" className={`size-5 ${color}`} />\n <div className=\"flex flex-col\">\n <span className={`text-lg font-mono font-semibold tabular-nums ${color}`}>{timeString}</span>\n <span className=\"text-xs text-text-secondary\">\n {remainingSeconds <= 0\n ? tWithFallback(t, 'sandbox.timer.expired', 'Expired')\n : tWithFallback(t, 'sandbox.timer.label', 'Time remaining')}\n </span>\n </div>\n\n {remainingSeconds <= 60 && remainingSeconds > 0 && (\n <div className=\"flex items-center gap-1 text-xs text-status-error-text font-medium\">\n <AlertTriangle aria-hidden=\"true\" className=\"size-3.5\" />\n {tWithFallback(t, 'sandbox.timer.expiringSoon', 'Expiring soon')}\n </div>\n )}\n\n {onExtend && remainingSeconds > 0 && (\n <button\n type=\"button\"\n onClick={onExtend}\n aria-label={tWithFallback(t, 'sandbox.timer.extend', 'Extend sandbox duration')}\n className=\"ml-auto flex items-center gap-1 rounded-md bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-secondary shadow-sm border border-border-subtle hover:bg-bg-sunken transition-colors\"\n >\n <Plus aria-hidden=\"true\" className=\"size-3.5\" />\n {tWithFallback(t, 'sandbox.timer.extend', 'Extend')}\n </button>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAaA,SAAgB,EAAe,EAC7B,cACA,cACA,aACA,aAAU,MACY;CACtB,IAAM,IAAmB,EAAoB,GAAW,EAAU,EAC5D,EAAE,SAAM,GAAS,EAIjB,IAAgB,EAAsB,KAAK;AACjD,CACE,EAAc,YAAY,KAC1B,KAAoB,MACpB,IAAmB,KACnB,OAAO,SAAW,OAClB,kBAAkB,UAClB,aAAa,eAAe,cAE5B,EAAc,UAAU,GACxB,IAAI,aAAa,EAAc,GAAG,4BAA4B,mBAAmB,EAAE;EACjF,MAAM,EACJ,GACA,2BACA,uFACD;EACD,MAAM;EACP,CAAC;CAGJ,IAAM,IAAQ,KAAK,MAAM,IAAmB,KAAK,EAC3C,IAAU,KAAK,MAAO,IAAmB,OAAQ,GAAG,EACpD,IAAU,IAAmB,IAC7B,KAAO,MAAc,OAAO,EAAE,CAAC,SAAS,GAAG,IAAI,EAC/C,IACJ,IAAQ,IAAI,GAAG,EAAI,EAAM,CAAC,GAAG,EAAI,EAAQ,CAAC,GAAG,EAAI,EAAQ,KAAK,GAAG,EAAI,EAAQ,CAAC,GAAG,EAAI,EAAQ,IAEzF,IACA,KAAoB,IAAU,wBAC9B,KAAoB,KAAW,yCA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7 +37,7 @@ var o = ({ cpuRequest: o, cpuLimit: s, memoryRequest: c, memoryLimit: l, contain
37
37
  children: e.label
38
38
  }),
39
39
  /* @__PURE__ */ i("span", {
40
- className: "text-sm font-semibold",
40
+ className: "text-sm font-semibold tabular-nums",
41
41
  children: e.value
42
42
  })
43
43
  ]
@@ -52,7 +52,7 @@ var o = ({ cpuRequest: o, cpuLimit: s, memoryRequest: c, memoryLimit: l, contain
52
52
  className: e.color
53
53
  }),
54
54
  /* @__PURE__ */ i("span", {
55
- className: "font-medium",
55
+ className: "font-medium tabular-nums",
56
56
  children: e.value
57
57
  }),
58
58
  t < p.length - 1 && /* @__PURE__ */ i("span", {
@@ -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\">{item.value}</span>\n </div>\n ))}\n </div>\n );\n }\n\n return (\n <div className={cn('flex items-center gap-3 text-sm', className)}>\n {items.map((item, index) => (\n <span key={item.label} className=\"inline-flex items-center gap-1\">\n <item.icon size={14} className={item.color} />\n <span className=\"font-medium\">{item.value}</span>\n {index < items.length - 1 && <span className=\"ml-2 text-text-secondary/40\">|</span>}\n </span>\n ))}\n </div>\n );\n};\n"],"mappings":";;;;AAiBA,IAAa,KAA6C,EACxD,eACA,aACA,kBACA,gBACA,mBACA,cACA,YAAS,eACL;CACJ,IAAM,IAAQ;EACZ;GACE,MAAM;GACN,OAAO;GACP,OAAO,IAAW,GAAG,EAAW,KAAK,MAAa;GAClD,OAAO;GACR;EACD;GACE,MAAM;GACN,OAAO;GACP,OAAO,IAAc,GAAG,EAAc,KAAK,MAAgB;GAC3D,OAAO;GACR;EACD,GAAI,MAAmB,KAAA,IASnB,EAAE,GARF,CACE;GACE,MAAM;GACN,OAAO;GACP,OAAO,GAAG;GACV,OAAO;GACR,CACF;EAEN;AAmBD,QAjBI,MAAW,SAEX,kBAAC,OAAD;EAAK,WAAW,EAAG,0BAA0B,EAAU;YACpD,EAAM,KAAK,MACV,kBAAC,OAAD;GAEE,WAAU;aAFZ;IAIE,kBAAC,EAAK,MAAN;KAAW,MAAM;KAAI,WAAW,EAAK;KAAS,CAAA;IAC9C,kBAAC,QAAD;KAAM,WAAU;eAA+B,EAAK;KAAa,CAAA;IACjE,kBAAC,QAAD;KAAM,WAAU;eAAyB,EAAK;KAAa,CAAA;IACvD;KANC,EAAK,MAMN,CACN;EACE,CAAA,GAKR,kBAAC,OAAD;EAAK,WAAW,EAAG,mCAAmC,EAAU;YAC7D,EAAM,KAAK,GAAM,MAChB,kBAAC,QAAD;GAAuB,WAAU;aAAjC;IACE,kBAAC,EAAK,MAAN;KAAW,MAAM;KAAI,WAAW,EAAK;KAAS,CAAA;IAC9C,kBAAC,QAAD;KAAM,WAAU;eAAe,EAAK;KAAa,CAAA;IAChD,IAAQ,EAAM,SAAS,KAAK,kBAAC,QAAD;KAAM,WAAU;eAA8B;KAAQ,CAAA;IAC9E;KAJI,EAAK,MAIT,CACP;EACE,CAAA"}
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-sandbox",
3
- "version": "2026.624.2",
3
+ "version": "2026.624.3",
4
4
  "description": "Burdenoff Sandbox Microfrontend - Manage ephemeral sandbox environments",
5
5
  "type": "module",
6
6
  "files": [