@tangle-network/sandbox-ui 0.20.3 → 0.21.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.
- package/dist/chat.d.ts +111 -1
- package/dist/chat.js +17 -3
- package/dist/{chunk-QNVVKMEW.js → chunk-4KAPMTPU.js} +1 -542
- package/dist/chunk-DNZ4DTNA.js +547 -0
- package/dist/chunk-ESRYVGHF.js +147 -0
- package/dist/{chunk-R6QNJQRH.js → chunk-LA5GHELP.js} +446 -451
- package/dist/{chunk-CMY7W45U.js → chunk-MEDE37J5.js} +8 -2
- package/dist/{chunk-CP2L6B53.js → chunk-R6NONXFC.js} +12 -8
- package/dist/{chunk-76IQLPW2.js → chunk-SOKKTB7W.js} +29 -5
- package/dist/{chunk-MQ52AYJX.js → chunk-TAAYDQGM.js} +236 -24
- package/dist/dashboard.d.ts +37 -48
- package/dist/dashboard.js +14 -8
- package/dist/globals.css +33 -209
- package/dist/harness-picker-C1W3rTeb.d.ts +49 -0
- package/dist/hooks.d.ts +64 -3
- package/dist/hooks.js +2 -2
- package/dist/index.d.ts +6 -4
- package/dist/index.js +33 -15
- package/dist/{template-card-gf-InrfN.d.ts → model-picker-DUfMTQo5.d.ts} +1 -86
- package/dist/pages.d.ts +5 -37
- package/dist/pages.js +304 -396
- package/dist/sdk-hooks-jUbIngSV.d.ts +96 -0
- package/dist/sdk-hooks.d.ts +2 -77
- package/dist/sdk-hooks.js +1 -1
- package/dist/styles.css +33 -209
- package/dist/template-card-UhV3pmRC.d.ts +88 -0
- package/dist/workspace.d.ts +7 -0
- package/dist/workspace.js +1 -1
- package/package.json +8 -8
package/dist/pages.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BillingDashboard,
|
|
3
3
|
InfoPanel,
|
|
4
|
-
ModelPicker,
|
|
5
4
|
PricingPage,
|
|
6
5
|
TemplateCard,
|
|
7
|
-
UsageChart
|
|
8
|
-
|
|
9
|
-
} from "./chunk-QNVVKMEW.js";
|
|
6
|
+
UsageChart
|
|
7
|
+
} from "./chunk-DNZ4DTNA.js";
|
|
10
8
|
import {
|
|
11
9
|
Badge,
|
|
12
10
|
Button,
|
|
11
|
+
Input,
|
|
12
|
+
Switch,
|
|
13
13
|
Textarea
|
|
14
14
|
} from "./chunk-7ZA5SEK3.js";
|
|
15
|
+
import "./chunk-4KAPMTPU.js";
|
|
15
16
|
import {
|
|
16
17
|
cn
|
|
17
18
|
} from "./chunk-EI44GEQ5.js";
|
|
@@ -280,7 +281,6 @@ import {
|
|
|
280
281
|
ArrowLeft,
|
|
281
282
|
Layers,
|
|
282
283
|
Cpu,
|
|
283
|
-
Bot,
|
|
284
284
|
Info,
|
|
285
285
|
Loader2,
|
|
286
286
|
Settings,
|
|
@@ -294,6 +294,8 @@ var VALID_DRIVERS = /* @__PURE__ */ new Set([
|
|
|
294
294
|
"firecracker",
|
|
295
295
|
"tangle"
|
|
296
296
|
]);
|
|
297
|
+
var SECTION_CARD_CLASS = "rounded-lg border border-border bg-card p-5 shadow-sm";
|
|
298
|
+
var FIELD_LABEL_CLASS = "block text-xs font-medium text-muted-foreground uppercase tracking-[0.06em]";
|
|
297
299
|
var STACK_DISPLAY = {
|
|
298
300
|
universal: {
|
|
299
301
|
name: "Default",
|
|
@@ -509,10 +511,6 @@ function ProvisioningWizard({
|
|
|
509
511
|
skipToReview,
|
|
510
512
|
onLoadStartupScripts,
|
|
511
513
|
resourceLimits,
|
|
512
|
-
models,
|
|
513
|
-
popular,
|
|
514
|
-
defaultModel,
|
|
515
|
-
onSetDefault,
|
|
516
514
|
sshAccess,
|
|
517
515
|
pricingRates,
|
|
518
516
|
planTiers
|
|
@@ -599,19 +597,6 @@ function ProvisioningWizard({
|
|
|
599
597
|
(prev) => snapSliderValue(prev, STORAGE_MIN, storageMax, storageStep)
|
|
600
598
|
);
|
|
601
599
|
}, [cpuMax, ramMax, storageMax, cpuStep, ramStep, storageStep]);
|
|
602
|
-
const [modelTier, setModelTier] = React2.useState(
|
|
603
|
-
dc?.modelTier ?? defaultModel ?? ""
|
|
604
|
-
);
|
|
605
|
-
const [systemPrompt, setSystemPrompt] = React2.useState(
|
|
606
|
-
dc?.systemPrompt ?? ""
|
|
607
|
-
);
|
|
608
|
-
React2.useEffect(() => {
|
|
609
|
-
if (!models || models.length === 0) return;
|
|
610
|
-
const ids = models.map(canonicalModelId);
|
|
611
|
-
if (ids.includes(modelTier)) return;
|
|
612
|
-
const next = (defaultModel && ids.includes(defaultModel) ? defaultModel : void 0) ?? popular?.find((p) => ids.includes(p)) ?? ids[0];
|
|
613
|
-
if (next && next !== modelTier) setModelTier(next);
|
|
614
|
-
}, [models, modelTier, defaultModel, popular]);
|
|
615
600
|
const [name, setName] = React2.useState(dc?.name ?? "");
|
|
616
601
|
const [gitUrl, setGitUrl] = React2.useState(dc?.gitUrl ?? "");
|
|
617
602
|
const [envVars, setEnvVars] = React2.useState(dc?.envVars ?? [{ key: "", value: "" }]);
|
|
@@ -644,7 +629,7 @@ function ProvisioningWizard({
|
|
|
644
629
|
};
|
|
645
630
|
}, []);
|
|
646
631
|
const isMultistep = variant === "multistep";
|
|
647
|
-
const stepLabels = sshAccess ? ["Environment", "Resources", "
|
|
632
|
+
const stepLabels = sshAccess ? ["Environment", "Resources", "Access"] : ["Environment", "Resources"];
|
|
648
633
|
const finalStep = stepLabels.length;
|
|
649
634
|
const [currentStep, setCurrentStep] = React2.useState(
|
|
650
635
|
skipToReview && dc && isMultistep ? finalStep : 1
|
|
@@ -664,8 +649,6 @@ function ProvisioningWizard({
|
|
|
664
649
|
cpuCores,
|
|
665
650
|
ramGB,
|
|
666
651
|
storageGB,
|
|
667
|
-
modelTier,
|
|
668
|
-
systemPrompt,
|
|
669
652
|
name,
|
|
670
653
|
gitUrl,
|
|
671
654
|
envVars: envVars.filter((e) => e.key.trim() !== ""),
|
|
@@ -744,41 +727,43 @@ function ProvisioningWizard({
|
|
|
744
727
|
const rateSuffix = pricingView === "hourly" ? "/h" : "/s";
|
|
745
728
|
const fmtRate = (v) => pricingView === "hourly" ? v.toFixed(2) : formatPerSecondValue(v);
|
|
746
729
|
return /* @__PURE__ */ jsxs2("div", { className: cn("max-w-6xl mx-auto flex flex-col", className), children: [
|
|
747
|
-
/* @__PURE__ */ jsxs2("div", { className: "mb-
|
|
730
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-4 flex items-center gap-3 shrink-0", children: [
|
|
748
731
|
onBack && /* @__PURE__ */ jsx2(
|
|
749
|
-
|
|
732
|
+
Button,
|
|
750
733
|
{
|
|
751
734
|
type: "button",
|
|
735
|
+
variant: "outline",
|
|
736
|
+
size: "icon",
|
|
752
737
|
onClick: onBack,
|
|
753
|
-
className: "
|
|
754
|
-
children: /* @__PURE__ */ jsx2(ArrowLeft, { className: "h-
|
|
738
|
+
className: "h-9 w-9 shrink-0",
|
|
739
|
+
children: /* @__PURE__ */ jsx2(ArrowLeft, { className: "h-4 w-4" })
|
|
755
740
|
}
|
|
756
741
|
),
|
|
757
742
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
758
|
-
/* @__PURE__ */ jsx2("h1", { className: "text-
|
|
759
|
-
/* @__PURE__ */ jsx2("p", { className: "text-muted-foreground text-sm", children: "Select your stack, allocate resources, and
|
|
743
|
+
/* @__PURE__ */ jsx2("h1", { className: "text-2xl font-semibold tracking-tight text-foreground", children: "Sandbox Provisioning" }),
|
|
744
|
+
/* @__PURE__ */ jsx2("p", { className: "text-muted-foreground text-sm", children: "Select your stack, allocate resources, and deploy." })
|
|
760
745
|
] })
|
|
761
746
|
] }),
|
|
762
|
-
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-12 gap-
|
|
747
|
+
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-12 gap-5 flex-1 min-h-0", children: [
|
|
763
748
|
/* @__PURE__ */ jsxs2("div", { className: "col-span-12 xl:col-span-8 flex flex-col min-h-0", children: [
|
|
764
|
-
isMultistep && /* @__PURE__ */ jsx2("div", { className: "flex items-center gap-2 mb-4
|
|
749
|
+
isMultistep && /* @__PURE__ */ jsx2("div", { className: "flex items-center gap-2 mb-4 rounded-lg border border-border bg-card px-4 py-2 shadow-sm mx-auto max-w-2xl justify-between shrink-0", children: stepLabels.map((label, index) => {
|
|
765
750
|
const s = index + 1;
|
|
766
751
|
return /* @__PURE__ */ jsxs2("div", { className: "flex items-center", children: [
|
|
767
752
|
/* @__PURE__ */ jsx2(
|
|
768
753
|
"div",
|
|
769
754
|
{
|
|
770
755
|
className: cn(
|
|
771
|
-
"
|
|
772
|
-
currentStep
|
|
756
|
+
"h-6 w-6 rounded-full flex items-center justify-center font-semibold text-xs shrink-0 transition-colors duration-200",
|
|
757
|
+
currentStep >= s ? "bg-primary text-primary-foreground" : "bg-muted border border-border text-muted-foreground"
|
|
773
758
|
),
|
|
774
|
-
children: currentStep > s ? /* @__PURE__ */ jsx2(Check, { className: "h-3
|
|
759
|
+
children: currentStep > s ? /* @__PURE__ */ jsx2(Check, { className: "h-3 w-3" }) : s
|
|
775
760
|
}
|
|
776
761
|
),
|
|
777
762
|
/* @__PURE__ */ jsx2(
|
|
778
763
|
"span",
|
|
779
764
|
{
|
|
780
765
|
className: cn(
|
|
781
|
-
"ml-2
|
|
766
|
+
"ml-2 font-medium text-sm hidden sm:inline transition-colors duration-200",
|
|
782
767
|
currentStep === s ? "text-foreground" : currentStep > s ? "text-primary" : "text-muted-foreground"
|
|
783
768
|
),
|
|
784
769
|
children: label
|
|
@@ -788,22 +773,23 @@ function ProvisioningWizard({
|
|
|
788
773
|
"div",
|
|
789
774
|
{
|
|
790
775
|
className: cn(
|
|
791
|
-
"w-4 sm:w-8 h-
|
|
776
|
+
"w-4 sm:w-8 h-px mx-2 sm:mx-3 transition-colors duration-300",
|
|
792
777
|
currentStep > s ? "bg-primary" : "bg-border"
|
|
793
778
|
)
|
|
794
779
|
}
|
|
795
780
|
)
|
|
796
781
|
] }, s);
|
|
797
782
|
}) }),
|
|
798
|
-
dc && isMultistep && /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between
|
|
783
|
+
dc && isMultistep && /* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between rounded-lg border border-border bg-card px-4 py-2.5 shadow-sm shrink-0 mb-4", children: [
|
|
799
784
|
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
800
785
|
/* @__PURE__ */ jsx2(Info, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
801
786
|
/* @__PURE__ */ jsx2("span", { className: "text-muted-foreground", children: "Pre-configured from template." })
|
|
802
787
|
] }),
|
|
803
788
|
/* @__PURE__ */ jsx2(
|
|
804
|
-
|
|
789
|
+
Button,
|
|
805
790
|
{
|
|
806
791
|
type: "button",
|
|
792
|
+
variant: "link",
|
|
807
793
|
onClick: () => {
|
|
808
794
|
setCurrentStep(1);
|
|
809
795
|
setSelectedEnv(environments[0]?.id ?? "");
|
|
@@ -812,9 +798,6 @@ function ProvisioningWizard({
|
|
|
812
798
|
setStorageGB(
|
|
813
799
|
snapSliderValue(128, STORAGE_MIN, storageMax, storageStep)
|
|
814
800
|
);
|
|
815
|
-
const first = models?.[0];
|
|
816
|
-
setModelTier(first ? canonicalModelId(first) : "");
|
|
817
|
-
setSystemPrompt("");
|
|
818
801
|
setName("");
|
|
819
802
|
setGitUrl("");
|
|
820
803
|
setEnvVars([{ key: "", value: "" }]);
|
|
@@ -824,30 +807,30 @@ function ProvisioningWizard({
|
|
|
824
807
|
setActivePreset(null);
|
|
825
808
|
setPricingView("hourly");
|
|
826
809
|
},
|
|
827
|
-
className: "
|
|
810
|
+
className: "h-auto p-0 text-xs",
|
|
828
811
|
children: "Start from scratch"
|
|
829
812
|
}
|
|
830
813
|
)
|
|
831
814
|
] }),
|
|
832
|
-
loadError && /* @__PURE__ */ jsxs2("div", { className: "rounded-
|
|
815
|
+
loadError && /* @__PURE__ */ jsxs2("div", { className: "rounded-lg border border-destructive/30 bg-destructive/10 p-3 flex items-center gap-2 shrink-0 mb-4", children: [
|
|
833
816
|
/* @__PURE__ */ jsx2(Info, { className: "h-4 w-4 text-destructive shrink-0" }),
|
|
834
817
|
/* @__PURE__ */ jsx2("p", { className: "text-sm font-medium text-destructive", children: loadError })
|
|
835
818
|
] }),
|
|
836
819
|
/* @__PURE__ */ jsxs2("div", { className: "flex-1 overflow-y-auto min-h-0 space-y-4", children: [
|
|
837
|
-
(!isMultistep || currentStep === 1) && /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs2("section", { className:
|
|
838
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-
|
|
839
|
-
/* @__PURE__ */ jsx2(
|
|
840
|
-
/* @__PURE__ */ jsx2("h2", { className: "text-
|
|
820
|
+
(!isMultistep || currentStep === 1) && /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs2("section", { className: SECTION_CARD_CLASS, children: [
|
|
821
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
822
|
+
/* @__PURE__ */ jsx2(Layers, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
823
|
+
/* @__PURE__ */ jsx2("h2", { className: "text-sm font-semibold uppercase tracking-[0.06em] text-muted-foreground", children: "Environment Selection" })
|
|
841
824
|
] }),
|
|
842
825
|
/* @__PURE__ */ jsx2("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-3", children: isLoadingEnvironments && environments.length === 0 ? Array.from({ length: 3 }).map((_, i) => /* @__PURE__ */ jsxs2(
|
|
843
826
|
"div",
|
|
844
827
|
{
|
|
845
|
-
className: "p-
|
|
828
|
+
className: "p-3.5 rounded-lg border border-border bg-card/50 animate-pulse",
|
|
846
829
|
"aria-hidden": "true",
|
|
847
830
|
children: [
|
|
848
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-start mb-
|
|
831
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-start mb-2.5", children: [
|
|
849
832
|
/* @__PURE__ */ jsx2("div", { className: "w-10 h-10 rounded-full bg-muted/60 border border-border" }),
|
|
850
|
-
/* @__PURE__ */ jsx2("div", { className: "w-
|
|
833
|
+
/* @__PURE__ */ jsx2("div", { className: "w-4 h-4 rounded-full border-2 border-border" })
|
|
851
834
|
] }),
|
|
852
835
|
/* @__PURE__ */ jsx2("div", { className: "h-3 w-1/3 rounded bg-muted/60 mb-2" }),
|
|
853
836
|
/* @__PURE__ */ jsx2("div", { className: "h-2.5 w-5/6 rounded bg-muted/50 mb-1.5" }),
|
|
@@ -861,39 +844,38 @@ function ProvisioningWizard({
|
|
|
861
844
|
type: "button",
|
|
862
845
|
onClick: () => setSelectedEnv(env.id),
|
|
863
846
|
className: cn(
|
|
864
|
-
"group
|
|
865
|
-
selectedEnv === env.id ? "bg-primary/5 border-primary ring-
|
|
847
|
+
"group p-3.5 rounded-lg text-left border transition-colors duration-200",
|
|
848
|
+
selectedEnv === env.id ? "bg-primary/5 border-primary ring-1 ring-primary/20" : "bg-card border-border hover:border-primary/30 active:scale-[0.99]"
|
|
866
849
|
),
|
|
867
850
|
children: [
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
/* @__PURE__ */ jsx2("div", { className: "w-10 h-10 rounded-full flex items-center justify-center bg-muted/50 border border-border shadow-inner", children: env.icon }),
|
|
851
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-start mb-2.5", children: [
|
|
852
|
+
/* @__PURE__ */ jsx2("div", { className: "w-10 h-10 rounded-full flex items-center justify-center bg-muted/50 border border-border", children: env.icon }),
|
|
871
853
|
/* @__PURE__ */ jsx2(
|
|
872
854
|
"div",
|
|
873
855
|
{
|
|
874
856
|
className: cn(
|
|
875
|
-
"w-
|
|
857
|
+
"w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors duration-200",
|
|
876
858
|
selectedEnv === env.id ? "border-primary bg-primary" : "border-border group-hover:border-primary/40"
|
|
877
859
|
),
|
|
878
|
-
children: selectedEnv === env.id && /* @__PURE__ */ jsx2(Check, { className: "h-
|
|
860
|
+
children: selectedEnv === env.id && /* @__PURE__ */ jsx2(Check, { className: "h-2.5 w-2.5 text-primary-foreground" })
|
|
879
861
|
}
|
|
880
862
|
)
|
|
881
863
|
] }),
|
|
882
|
-
/* @__PURE__ */ jsx2("h3", { className: "font-
|
|
883
|
-
/* @__PURE__ */ jsx2("p", { className: "text-xs text-muted-foreground leading-relaxed
|
|
864
|
+
/* @__PURE__ */ jsx2("h3", { className: "font-semibold text-sm mb-0.5 text-foreground", children: env.name }),
|
|
865
|
+
/* @__PURE__ */ jsx2("p", { className: "text-xs text-muted-foreground leading-relaxed", children: env.description })
|
|
884
866
|
]
|
|
885
867
|
},
|
|
886
868
|
env.id
|
|
887
869
|
)) })
|
|
888
870
|
] }) }),
|
|
889
|
-
(!isMultistep || currentStep === 2) && /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs2("section", { className:
|
|
890
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-
|
|
891
|
-
/* @__PURE__ */ jsx2(
|
|
892
|
-
/* @__PURE__ */ jsx2("h2", { className: "text-
|
|
871
|
+
(!isMultistep || currentStep === 2) && /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs2("section", { className: SECTION_CARD_CLASS, children: [
|
|
872
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
873
|
+
/* @__PURE__ */ jsx2(Cpu, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
874
|
+
/* @__PURE__ */ jsx2("h2", { className: "text-sm font-semibold uppercase tracking-[0.06em] text-muted-foreground", children: "Resource Allocation" })
|
|
893
875
|
] }),
|
|
894
|
-
/* @__PURE__ */ jsxs2("div", { className: "mb-
|
|
895
|
-
/* @__PURE__ */ jsx2("label", { className: "
|
|
896
|
-
/* @__PURE__ */ jsx2("div", { className: "grid grid-cols-3 gap-
|
|
876
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-4", children: [
|
|
877
|
+
/* @__PURE__ */ jsx2("label", { className: cn(FIELD_LABEL_CLASS, "mb-2"), children: "Compute Presets" }),
|
|
878
|
+
/* @__PURE__ */ jsx2("div", { className: "grid grid-cols-3 gap-2", children: presets.map((p) => {
|
|
897
879
|
const active = activePreset === p.name && !p.locked;
|
|
898
880
|
return /* @__PURE__ */ jsxs2(
|
|
899
881
|
"button",
|
|
@@ -902,16 +884,16 @@ function ProvisioningWizard({
|
|
|
902
884
|
onClick: () => !p.locked && applyPreset(p.name, p.cpu, p.ram, p.storage),
|
|
903
885
|
disabled: p.locked,
|
|
904
886
|
className: cn(
|
|
905
|
-
"p-
|
|
906
|
-
active ? "bg-primary/5 border-primary ring-1 ring-primary/20
|
|
887
|
+
"p-2.5 rounded-lg transition-colors duration-200 text-center group border relative",
|
|
888
|
+
active ? "bg-primary/5 border-primary ring-1 ring-primary/20" : p.locked ? "bg-muted/30 border-border opacity-60 cursor-not-allowed" : "bg-card border-border hover:border-primary/30 active:scale-[0.99]"
|
|
907
889
|
),
|
|
908
890
|
children: [
|
|
909
|
-
p.locked && /* @__PURE__ */ jsx2("div", { className: "absolute -top-1.5 -right-1.5 bg-primary text-primary-foreground text-[9px] font-
|
|
891
|
+
p.locked && /* @__PURE__ */ jsx2("div", { className: "absolute -top-1.5 -right-1.5 bg-primary text-primary-foreground text-[9px] font-semibold px-1.5 py-0.5 rounded-full uppercase tracking-wider", children: p.unlockLabel }),
|
|
910
892
|
/* @__PURE__ */ jsx2(
|
|
911
893
|
"div",
|
|
912
894
|
{
|
|
913
895
|
className: cn(
|
|
914
|
-
"font-
|
|
896
|
+
"font-semibold text-sm transition-colors duration-200",
|
|
915
897
|
active ? "text-primary" : p.locked ? "text-muted-foreground" : "text-foreground"
|
|
916
898
|
),
|
|
917
899
|
children: p.name
|
|
@@ -934,7 +916,7 @@ function ProvisioningWizard({
|
|
|
934
916
|
);
|
|
935
917
|
}) })
|
|
936
918
|
] }),
|
|
937
|
-
/* @__PURE__ */ jsx2("div", { className: "space-y-
|
|
919
|
+
/* @__PURE__ */ jsx2("div", { className: "space-y-4", children: [
|
|
938
920
|
{
|
|
939
921
|
label: "Compute Cores (CPU)",
|
|
940
922
|
value: cpuCores,
|
|
@@ -966,9 +948,9 @@ function ProvisioningWizard({
|
|
|
966
948
|
({ label, value, setter, min, max, step: s, unit }) => {
|
|
967
949
|
const displayUnit = unit === "vCPU" ? `${value} vCPU${value === 1 ? "" : "s"}` : `${value}${unit}`;
|
|
968
950
|
return /* @__PURE__ */ jsxs2("div", { children: [
|
|
969
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-end
|
|
970
|
-
/* @__PURE__ */ jsx2("label", { className:
|
|
971
|
-
/* @__PURE__ */ jsx2("span", { className: "text-
|
|
951
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-end pb-1 mb-1.5", children: [
|
|
952
|
+
/* @__PURE__ */ jsx2("label", { className: FIELD_LABEL_CLASS, children: label }),
|
|
953
|
+
/* @__PURE__ */ jsx2("span", { className: "text-sm font-semibold text-foreground tabular-nums", children: displayUnit })
|
|
972
954
|
] }),
|
|
973
955
|
/* @__PURE__ */ jsx2(
|
|
974
956
|
"input",
|
|
@@ -982,7 +964,7 @@ function ProvisioningWizard({
|
|
|
982
964
|
setter(+e.target.value);
|
|
983
965
|
setActivePreset(null);
|
|
984
966
|
},
|
|
985
|
-
className: "w-full h-
|
|
967
|
+
className: "w-full h-1.5 rounded-full appearance-none cursor-pointer accent-primary [&::-webkit-slider-runnable-track]:bg-border [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:h-1.5 [&::-moz-range-track]:bg-border [&::-moz-range-track]:rounded-full [&::-moz-range-track]:h-1.5 [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:h-4 [&::-webkit-slider-thumb]:w-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:-mt-[5px] [&::-webkit-slider-thumb]:shadow-sm [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-primary-foreground"
|
|
986
968
|
}
|
|
987
969
|
),
|
|
988
970
|
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-[10px] font-mono text-muted-foreground/60 mt-1", children: [
|
|
@@ -999,294 +981,254 @@ function ProvisioningWizard({
|
|
|
999
981
|
}
|
|
1000
982
|
) })
|
|
1001
983
|
] }) }),
|
|
1002
|
-
(!isMultistep || currentStep ===
|
|
1003
|
-
/* @__PURE__ */ jsxs2(
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
)
|
|
984
|
+
(!isMultistep || currentStep === 2) && /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsx2("section", { className: SECTION_CARD_CLASS, children: /* @__PURE__ */ jsxs2("div", { children: [
|
|
985
|
+
/* @__PURE__ */ jsxs2(
|
|
986
|
+
"button",
|
|
987
|
+
{
|
|
988
|
+
type: "button",
|
|
989
|
+
onClick: () => setShowAdvanced(!showAdvanced),
|
|
990
|
+
className: "flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors text-sm font-medium focus:outline-none",
|
|
991
|
+
children: [
|
|
992
|
+
/* @__PURE__ */ jsx2(Settings, { className: "w-4 h-4" }),
|
|
993
|
+
showAdvanced ? "Hide Advanced Options" : "Show Advanced Options"
|
|
994
|
+
]
|
|
995
|
+
}
|
|
996
|
+
),
|
|
997
|
+
showAdvanced && /* @__PURE__ */ jsxs2("div", { className: "mt-4 space-y-4", children: [
|
|
998
|
+
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
|
|
999
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1000
|
+
/* @__PURE__ */ jsx2("label", { className: cn(FIELD_LABEL_CLASS, "mb-1.5"), children: "Workspace Name" }),
|
|
1001
|
+
/* @__PURE__ */ jsx2(
|
|
1002
|
+
Input,
|
|
1003
|
+
{
|
|
1004
|
+
type: "text",
|
|
1005
|
+
value: name,
|
|
1006
|
+
onChange: (e) => setName(e.target.value),
|
|
1007
|
+
maxLength: 128,
|
|
1008
|
+
className: "h-9 px-3 text-sm",
|
|
1009
|
+
placeholder: "my-cool-sandbox"
|
|
1010
|
+
}
|
|
1011
|
+
)
|
|
1012
|
+
] }),
|
|
1013
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1014
|
+
/* @__PURE__ */ jsx2("label", { className: cn(FIELD_LABEL_CLASS, "mb-1.5"), children: "Virtualization Driver" }),
|
|
1015
|
+
/* @__PURE__ */ jsxs2(
|
|
1016
|
+
"select",
|
|
1017
|
+
{
|
|
1018
|
+
value: driver,
|
|
1019
|
+
onChange: (e) => {
|
|
1020
|
+
if (VALID_DRIVERS.has(e.target.value))
|
|
1021
|
+
setDriver(
|
|
1022
|
+
e.target.value
|
|
1023
|
+
);
|
|
1024
|
+
},
|
|
1025
|
+
className: "w-full bg-card border border-border rounded-lg h-9 px-3 text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent appearance-none",
|
|
1026
|
+
children: [
|
|
1027
|
+
/* @__PURE__ */ jsx2("option", { value: "docker", className: "bg-gray-900", children: "Docker container (Default)" }),
|
|
1028
|
+
/* @__PURE__ */ jsx2(
|
|
1029
|
+
"option",
|
|
1030
|
+
{
|
|
1031
|
+
value: "firecracker",
|
|
1032
|
+
className: "bg-gray-900",
|
|
1033
|
+
children: "Firecracker microVM (Secure)"
|
|
1034
|
+
}
|
|
1035
|
+
),
|
|
1036
|
+
/* @__PURE__ */ jsx2("option", { value: "tangle", className: "bg-gray-900", children: "Tangle Distributed Node" })
|
|
1037
|
+
]
|
|
1038
|
+
}
|
|
1039
|
+
)
|
|
1040
|
+
] })
|
|
1031
1041
|
] }),
|
|
1032
1042
|
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1033
|
-
/* @__PURE__ */ jsx2("label", { className: "
|
|
1043
|
+
/* @__PURE__ */ jsx2("label", { className: cn(FIELD_LABEL_CLASS, "mb-1.5"), children: "Git Repository URL" }),
|
|
1034
1044
|
/* @__PURE__ */ jsx2(
|
|
1035
|
-
|
|
1045
|
+
Input,
|
|
1036
1046
|
{
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
className: "
|
|
1041
|
-
placeholder: "
|
|
1047
|
+
type: "text",
|
|
1048
|
+
value: gitUrl,
|
|
1049
|
+
onChange: (e) => setGitUrl(e.target.value),
|
|
1050
|
+
className: "h-9 px-3 text-sm",
|
|
1051
|
+
placeholder: "https://github.com/my-org/my-repo.git"
|
|
1042
1052
|
}
|
|
1043
1053
|
)
|
|
1044
1054
|
] }),
|
|
1045
|
-
/* @__PURE__ */ jsxs2("div", {
|
|
1046
|
-
/* @__PURE__ */ jsxs2(
|
|
1047
|
-
"
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
value: name,
|
|
1067
|
-
onChange: (e) => setName(e.target.value),
|
|
1068
|
-
maxLength: 128,
|
|
1069
|
-
className: "w-full bg-card border border-border rounded-xl h-12 px-4 font-bold text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent placeholder:text-muted-foreground",
|
|
1070
|
-
placeholder: "my-cool-sandbox"
|
|
1071
|
-
}
|
|
1072
|
-
)
|
|
1073
|
-
] }),
|
|
1074
|
-
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1075
|
-
/* @__PURE__ */ jsx2("label", { className: "block font-label text-xs font-bold uppercase tracking-widest text-muted-foreground mb-2", children: "Virtualization Driver" }),
|
|
1076
|
-
/* @__PURE__ */ jsxs2(
|
|
1077
|
-
"select",
|
|
1078
|
-
{
|
|
1079
|
-
value: driver,
|
|
1080
|
-
onChange: (e) => {
|
|
1081
|
-
if (VALID_DRIVERS.has(e.target.value))
|
|
1082
|
-
setDriver(
|
|
1083
|
-
e.target.value
|
|
1084
|
-
);
|
|
1085
|
-
},
|
|
1086
|
-
className: "w-full bg-card border border-border rounded-xl h-12 px-4 font-bold text-sm text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent appearance-none",
|
|
1087
|
-
children: [
|
|
1088
|
-
/* @__PURE__ */ jsx2("option", { value: "docker", className: "bg-gray-900", children: "Docker container (Default)" }),
|
|
1089
|
-
/* @__PURE__ */ jsx2(
|
|
1090
|
-
"option",
|
|
1091
|
-
{
|
|
1092
|
-
value: "firecracker",
|
|
1093
|
-
className: "bg-gray-900",
|
|
1094
|
-
children: "Firecracker microVM (Secure)"
|
|
1095
|
-
}
|
|
1096
|
-
),
|
|
1097
|
-
/* @__PURE__ */ jsx2("option", { value: "tangle", className: "bg-gray-900", children: "Tangle Distributed Node" })
|
|
1098
|
-
]
|
|
1099
|
-
}
|
|
1100
|
-
)
|
|
1101
|
-
] })
|
|
1102
|
-
] }),
|
|
1103
|
-
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1104
|
-
/* @__PURE__ */ jsx2("label", { className: "block font-label text-xs font-bold uppercase tracking-widest text-muted-foreground mb-2", children: "Git Repository URL" }),
|
|
1055
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1056
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-center mb-1.5", children: [
|
|
1057
|
+
/* @__PURE__ */ jsx2("label", { className: FIELD_LABEL_CLASS, children: "Environment Variables" }),
|
|
1058
|
+
/* @__PURE__ */ jsxs2(
|
|
1059
|
+
"button",
|
|
1060
|
+
{
|
|
1061
|
+
type: "button",
|
|
1062
|
+
onClick: () => setEnvVars([
|
|
1063
|
+
...envVars,
|
|
1064
|
+
{ key: "", value: "" }
|
|
1065
|
+
]),
|
|
1066
|
+
className: "flex items-center gap-1 text-xs text-primary hover:text-primary/70 transition-colors font-medium",
|
|
1067
|
+
children: [
|
|
1068
|
+
/* @__PURE__ */ jsx2(Plus, { className: "h-3 w-3" }),
|
|
1069
|
+
" Add Var"
|
|
1070
|
+
]
|
|
1071
|
+
}
|
|
1072
|
+
)
|
|
1073
|
+
] }),
|
|
1074
|
+
/* @__PURE__ */ jsxs2("div", { className: "space-y-2", children: [
|
|
1075
|
+
envVars.map((env, i) => /* @__PURE__ */ jsxs2("div", { className: "flex gap-2", children: [
|
|
1105
1076
|
/* @__PURE__ */ jsx2(
|
|
1106
|
-
|
|
1077
|
+
Input,
|
|
1107
1078
|
{
|
|
1108
1079
|
type: "text",
|
|
1109
|
-
value:
|
|
1110
|
-
onChange: (e) =>
|
|
1111
|
-
|
|
1112
|
-
|
|
1080
|
+
value: env.key,
|
|
1081
|
+
onChange: (e) => setEnvVars(
|
|
1082
|
+
envVars.map(
|
|
1083
|
+
(v, idx) => idx === i ? { ...v, key: e.target.value } : v
|
|
1084
|
+
)
|
|
1085
|
+
),
|
|
1086
|
+
className: "flex-1 h-9 px-3 font-mono text-sm",
|
|
1087
|
+
placeholder: "API_KEY"
|
|
1113
1088
|
}
|
|
1114
|
-
)
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
/* @__PURE__ */ jsx2(
|
|
1138
|
-
"input",
|
|
1139
|
-
{
|
|
1140
|
-
type: "text",
|
|
1141
|
-
value: env.key,
|
|
1142
|
-
onChange: (e) => setEnvVars(
|
|
1143
|
-
envVars.map(
|
|
1144
|
-
(v, idx) => idx === i ? { ...v, key: e.target.value } : v
|
|
1145
|
-
)
|
|
1146
|
-
),
|
|
1147
|
-
className: "flex-1 bg-card border border-border rounded-xl h-10 px-3 font-mono text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-primary placeholder:text-muted-foreground",
|
|
1148
|
-
placeholder: "API_KEY"
|
|
1149
|
-
}
|
|
1089
|
+
),
|
|
1090
|
+
/* @__PURE__ */ jsx2(
|
|
1091
|
+
Input,
|
|
1092
|
+
{
|
|
1093
|
+
type: "password",
|
|
1094
|
+
value: env.value,
|
|
1095
|
+
onChange: (e) => setEnvVars(
|
|
1096
|
+
envVars.map(
|
|
1097
|
+
(v, idx) => idx === i ? { ...v, value: e.target.value } : v
|
|
1098
|
+
)
|
|
1099
|
+
),
|
|
1100
|
+
className: "flex-[2] h-9 px-3 font-mono text-sm",
|
|
1101
|
+
placeholder: "sk-xxxxxxxxxxx"
|
|
1102
|
+
}
|
|
1103
|
+
),
|
|
1104
|
+
/* @__PURE__ */ jsx2(
|
|
1105
|
+
Button,
|
|
1106
|
+
{
|
|
1107
|
+
type: "button",
|
|
1108
|
+
variant: "outline",
|
|
1109
|
+
size: "icon",
|
|
1110
|
+
onClick: () => setEnvVars(
|
|
1111
|
+
envVars.filter((_, idx) => idx !== i)
|
|
1150
1112
|
),
|
|
1113
|
+
className: "h-9 w-9 shrink-0 text-destructive hover:bg-destructive/10 hover:border-destructive/30",
|
|
1114
|
+
children: /* @__PURE__ */ jsx2(Trash2, { className: "h-4 w-4" })
|
|
1115
|
+
}
|
|
1116
|
+
)
|
|
1117
|
+
] }, i)),
|
|
1118
|
+
envVars.length === 0 && /* @__PURE__ */ jsx2("div", { className: "text-center p-3 border border-dashed border-border rounded-lg text-muted-foreground/60 text-xs italic", children: "No environment variables set" })
|
|
1119
|
+
] })
|
|
1120
|
+
] }),
|
|
1121
|
+
availableScripts.length > 0 && /* @__PURE__ */ jsxs2("div", { children: [
|
|
1122
|
+
/* @__PURE__ */ jsx2("div", { className: cn(FIELD_LABEL_CLASS, "mb-1.5"), children: "Startup Scripts" }),
|
|
1123
|
+
/* @__PURE__ */ jsx2("div", { className: "space-y-2", children: availableScripts.filter((s) => s.enabled).map((script) => {
|
|
1124
|
+
const selected = startupScriptIds.includes(
|
|
1125
|
+
script.id
|
|
1126
|
+
);
|
|
1127
|
+
return /* @__PURE__ */ jsxs2(
|
|
1128
|
+
"label",
|
|
1129
|
+
{
|
|
1130
|
+
className: "flex items-start gap-3 cursor-pointer group rounded-lg border border-border p-3 transition-colors hover:border-primary/30",
|
|
1131
|
+
children: [
|
|
1151
1132
|
/* @__PURE__ */ jsx2(
|
|
1152
1133
|
"input",
|
|
1153
1134
|
{
|
|
1154
|
-
type: "
|
|
1155
|
-
|
|
1156
|
-
onChange: (
|
|
1157
|
-
|
|
1158
|
-
(
|
|
1159
|
-
)
|
|
1135
|
+
type: "checkbox",
|
|
1136
|
+
checked: selected,
|
|
1137
|
+
onChange: () => setStartupScriptIds(
|
|
1138
|
+
(prev) => selected ? prev.filter(
|
|
1139
|
+
(id) => id !== script.id
|
|
1140
|
+
) : [...prev, script.id]
|
|
1160
1141
|
),
|
|
1161
|
-
className: "
|
|
1162
|
-
placeholder: "sk-xxxxxxxxxxx"
|
|
1142
|
+
className: "mt-0.5 h-4 w-4 rounded border-border text-primary focus:ring-primary/30"
|
|
1163
1143
|
}
|
|
1164
1144
|
),
|
|
1165
|
-
/* @__PURE__ */
|
|
1166
|
-
"
|
|
1167
|
-
{
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
onChange: () => setStartupScriptIds(
|
|
1197
|
-
(prev) => selected ? prev.filter(
|
|
1198
|
-
(id) => id !== script.id
|
|
1199
|
-
) : [...prev, script.id]
|
|
1145
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex-1 min-w-0", children: [
|
|
1146
|
+
/* @__PURE__ */ jsx2("div", { className: "text-sm font-medium text-foreground group-hover:text-primary transition-colors", children: script.name }),
|
|
1147
|
+
script.description && /* @__PURE__ */ jsx2("div", { className: "text-xs text-muted-foreground mt-0.5", children: script.description }),
|
|
1148
|
+
script.injectSecrets.length > 0 && /* @__PURE__ */ jsx2("div", { className: "flex flex-wrap gap-1 mt-1.5", children: script.injectSecrets.map((s) => /* @__PURE__ */ jsxs2(
|
|
1149
|
+
"span",
|
|
1150
|
+
{
|
|
1151
|
+
className: "inline-flex items-center gap-0.5 rounded-full bg-muted px-2 py-0.5 text-[10px] text-muted-foreground",
|
|
1152
|
+
children: [
|
|
1153
|
+
/* @__PURE__ */ jsxs2(
|
|
1154
|
+
"svg",
|
|
1155
|
+
{
|
|
1156
|
+
className: "h-2.5 w-2.5",
|
|
1157
|
+
viewBox: "0 0 24 24",
|
|
1158
|
+
fill: "none",
|
|
1159
|
+
stroke: "currentColor",
|
|
1160
|
+
strokeWidth: "2",
|
|
1161
|
+
children: [
|
|
1162
|
+
/* @__PURE__ */ jsx2(
|
|
1163
|
+
"rect",
|
|
1164
|
+
{
|
|
1165
|
+
x: "3",
|
|
1166
|
+
y: "11",
|
|
1167
|
+
width: "18",
|
|
1168
|
+
height: "11",
|
|
1169
|
+
rx: "2",
|
|
1170
|
+
ry: "2"
|
|
1171
|
+
}
|
|
1172
|
+
),
|
|
1173
|
+
/* @__PURE__ */ jsx2("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
1174
|
+
]
|
|
1175
|
+
}
|
|
1200
1176
|
),
|
|
1201
|
-
className: "mt-0.5 h-4 w-4 rounded border-border text-primary focus:ring-primary/30"
|
|
1202
|
-
}
|
|
1203
|
-
),
|
|
1204
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex-1 min-w-0", children: [
|
|
1205
|
-
/* @__PURE__ */ jsx2("div", { className: "text-sm font-medium text-foreground group-hover:text-primary transition-colors", children: script.name }),
|
|
1206
|
-
script.description && /* @__PURE__ */ jsx2("div", { className: "text-xs text-muted-foreground mt-0.5", children: script.description }),
|
|
1207
|
-
script.injectSecrets.length > 0 && /* @__PURE__ */ jsx2("div", { className: "flex flex-wrap gap-1 mt-1.5", children: script.injectSecrets.map((s) => /* @__PURE__ */ jsxs2(
|
|
1208
|
-
"span",
|
|
1209
|
-
{
|
|
1210
|
-
className: "inline-flex items-center gap-0.5 rounded-full bg-muted px-2 py-0.5 text-[10px] text-muted-foreground",
|
|
1211
|
-
children: [
|
|
1212
|
-
/* @__PURE__ */ jsxs2(
|
|
1213
|
-
"svg",
|
|
1214
|
-
{
|
|
1215
|
-
className: "h-2.5 w-2.5",
|
|
1216
|
-
viewBox: "0 0 24 24",
|
|
1217
|
-
fill: "none",
|
|
1218
|
-
stroke: "currentColor",
|
|
1219
|
-
strokeWidth: "2",
|
|
1220
|
-
children: [
|
|
1221
|
-
/* @__PURE__ */ jsx2(
|
|
1222
|
-
"rect",
|
|
1223
|
-
{
|
|
1224
|
-
x: "3",
|
|
1225
|
-
y: "11",
|
|
1226
|
-
width: "18",
|
|
1227
|
-
height: "11",
|
|
1228
|
-
rx: "2",
|
|
1229
|
-
ry: "2"
|
|
1230
|
-
}
|
|
1231
|
-
),
|
|
1232
|
-
/* @__PURE__ */ jsx2("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })
|
|
1233
|
-
]
|
|
1234
|
-
}
|
|
1235
|
-
),
|
|
1236
|
-
s
|
|
1237
|
-
]
|
|
1238
|
-
},
|
|
1239
1177
|
s
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1178
|
+
]
|
|
1179
|
+
},
|
|
1180
|
+
s
|
|
1181
|
+
)) })
|
|
1182
|
+
] })
|
|
1183
|
+
]
|
|
1184
|
+
},
|
|
1185
|
+
script.id
|
|
1186
|
+
);
|
|
1187
|
+
}) })
|
|
1188
|
+
] }),
|
|
1189
|
+
/* @__PURE__ */ jsxs2("div", { className: "pt-3 border-t border-border flex items-start justify-between gap-3", children: [
|
|
1190
|
+
/* @__PURE__ */ jsxs2("div", { children: [
|
|
1191
|
+
/* @__PURE__ */ jsx2(
|
|
1192
|
+
"label",
|
|
1193
|
+
{
|
|
1194
|
+
htmlFor: "wizard-bare-mode",
|
|
1195
|
+
className: "block text-sm font-medium text-foreground cursor-pointer",
|
|
1196
|
+
children: "Bare Mode"
|
|
1197
|
+
}
|
|
1198
|
+
),
|
|
1199
|
+
/* @__PURE__ */ jsx2("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Start as a raw container without an embedded AI Agent backend." })
|
|
1200
|
+
] }),
|
|
1201
|
+
/* @__PURE__ */ jsx2(
|
|
1202
|
+
Switch,
|
|
1203
|
+
{
|
|
1204
|
+
id: "wizard-bare-mode",
|
|
1205
|
+
checked: bare,
|
|
1206
|
+
onCheckedChange: setBare,
|
|
1207
|
+
className: "mt-0.5"
|
|
1208
|
+
}
|
|
1209
|
+
)
|
|
1267
1210
|
] })
|
|
1268
1211
|
] })
|
|
1269
|
-
] }) }),
|
|
1270
|
-
sshAccess && (!isMultistep || currentStep ===
|
|
1271
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-
|
|
1272
|
-
/* @__PURE__ */ jsx2(
|
|
1273
|
-
/* @__PURE__ */ jsx2("h2", { className: "text-
|
|
1212
|
+
] }) }) }),
|
|
1213
|
+
sshAccess && (!isMultistep || currentStep === 3) && /* @__PURE__ */ jsx2(React2.Fragment, { children: /* @__PURE__ */ jsxs2("section", { className: SECTION_CARD_CLASS, children: [
|
|
1214
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
1215
|
+
/* @__PURE__ */ jsx2(Settings, { className: "h-4 w-4 text-primary shrink-0" }),
|
|
1216
|
+
/* @__PURE__ */ jsx2("h2", { className: "text-sm font-semibold uppercase tracking-[0.06em] text-muted-foreground", children: "Access Configuration" })
|
|
1274
1217
|
] }),
|
|
1275
1218
|
/* @__PURE__ */ jsx2(SshAccessStep, { config: sshAccess })
|
|
1276
1219
|
] }) })
|
|
1277
1220
|
] })
|
|
1278
1221
|
] }),
|
|
1279
1222
|
/* @__PURE__ */ jsxs2("div", { className: "col-span-12 xl:col-span-4 sticky top-4 space-y-4", children: [
|
|
1280
|
-
/* @__PURE__ */ jsxs2("div", { className: "
|
|
1281
|
-
/* @__PURE__ */
|
|
1282
|
-
|
|
1283
|
-
/* @__PURE__ */ jsx2("span", { className: "font-label text-xs font-bold uppercase tracking-widest text-muted-foreground", children: "Run Cost" }),
|
|
1223
|
+
/* @__PURE__ */ jsxs2("div", { className: "rounded-lg border border-border bg-card p-5 shadow-sm", children: [
|
|
1224
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between items-center mb-3", children: [
|
|
1225
|
+
/* @__PURE__ */ jsx2("span", { className: FIELD_LABEL_CLASS, children: "Run Cost" }),
|
|
1284
1226
|
/* @__PURE__ */ jsxs2(
|
|
1285
1227
|
"div",
|
|
1286
1228
|
{
|
|
1287
1229
|
role: "group",
|
|
1288
1230
|
"aria-label": "Pricing view",
|
|
1289
|
-
className: "inline-flex items-center rounded-
|
|
1231
|
+
className: "inline-flex items-center rounded-md border border-border bg-muted/50 p-0.5",
|
|
1290
1232
|
children: [
|
|
1291
1233
|
/* @__PURE__ */ jsx2(
|
|
1292
1234
|
"button",
|
|
@@ -1295,7 +1237,7 @@ function ProvisioningWizard({
|
|
|
1295
1237
|
"aria-pressed": pricingView === "hourly",
|
|
1296
1238
|
onClick: () => setPricingView("hourly"),
|
|
1297
1239
|
className: cn(
|
|
1298
|
-
"rounded
|
|
1240
|
+
"rounded px-2.5 py-0.5 text-[10px] font-medium transition-all",
|
|
1299
1241
|
pricingView === "hourly" ? "bg-card text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
1300
1242
|
),
|
|
1301
1243
|
children: "Per Hour"
|
|
@@ -1308,7 +1250,7 @@ function ProvisioningWizard({
|
|
|
1308
1250
|
"aria-pressed": pricingView === "perSecond",
|
|
1309
1251
|
onClick: () => setPricingView("perSecond"),
|
|
1310
1252
|
className: cn(
|
|
1311
|
-
"rounded
|
|
1253
|
+
"rounded px-2.5 py-0.5 text-[10px] font-medium transition-all",
|
|
1312
1254
|
pricingView === "perSecond" ? "bg-card text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
1313
1255
|
),
|
|
1314
1256
|
children: "Per Second"
|
|
@@ -1318,13 +1260,13 @@ function ProvisioningWizard({
|
|
|
1318
1260
|
}
|
|
1319
1261
|
)
|
|
1320
1262
|
] }),
|
|
1321
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex items-baseline gap-2 mb-
|
|
1263
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-baseline gap-2 mb-4", children: [
|
|
1322
1264
|
/* @__PURE__ */ jsxs2(
|
|
1323
1265
|
"span",
|
|
1324
1266
|
{
|
|
1325
1267
|
className: cn(
|
|
1326
|
-
"font-
|
|
1327
|
-
pricingView === "hourly" ? "text-
|
|
1268
|
+
"font-semibold text-foreground tracking-tight tabular-nums animate-in fade-in duration-200",
|
|
1269
|
+
pricingView === "hourly" ? "text-3xl" : "text-xl"
|
|
1328
1270
|
),
|
|
1329
1271
|
children: [
|
|
1330
1272
|
"$",
|
|
@@ -1333,10 +1275,10 @@ function ProvisioningWizard({
|
|
|
1333
1275
|
},
|
|
1334
1276
|
pricingView
|
|
1335
1277
|
),
|
|
1336
|
-
/* @__PURE__ */ jsx2("span", { className: "text-muted-foreground text-sm
|
|
1278
|
+
/* @__PURE__ */ jsx2("span", { className: "text-muted-foreground text-sm", children: pricingSuffix })
|
|
1337
1279
|
] }),
|
|
1338
|
-
/* @__PURE__ */ jsxs2("div", { className: "space-y-2
|
|
1339
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-
|
|
1280
|
+
/* @__PURE__ */ jsxs2("div", { className: "space-y-2 rounded-md border border-border bg-muted/30 p-3", children: [
|
|
1281
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-wide text-muted-foreground", children: [
|
|
1340
1282
|
/* @__PURE__ */ jsx2("span", { children: "COMPUTE" }),
|
|
1341
1283
|
/* @__PURE__ */ jsxs2("span", { className: "text-foreground", children: [
|
|
1342
1284
|
"$",
|
|
@@ -1344,7 +1286,7 @@ function ProvisioningWizard({
|
|
|
1344
1286
|
rateSuffix
|
|
1345
1287
|
] })
|
|
1346
1288
|
] }),
|
|
1347
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-
|
|
1289
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-wide text-muted-foreground", children: [
|
|
1348
1290
|
/* @__PURE__ */ jsx2("span", { children: "MEMORY" }),
|
|
1349
1291
|
/* @__PURE__ */ jsxs2("span", { className: "text-foreground/80", children: [
|
|
1350
1292
|
"$",
|
|
@@ -1352,7 +1294,7 @@ function ProvisioningWizard({
|
|
|
1352
1294
|
rateSuffix
|
|
1353
1295
|
] })
|
|
1354
1296
|
] }),
|
|
1355
|
-
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-
|
|
1297
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-wide text-muted-foreground", children: [
|
|
1356
1298
|
/* @__PURE__ */ jsx2("span", { children: "STORAGE" }),
|
|
1357
1299
|
/* @__PURE__ */ jsxs2("span", { className: "text-foreground/80", children: [
|
|
1358
1300
|
"$",
|
|
@@ -1360,7 +1302,7 @@ function ProvisioningWizard({
|
|
|
1360
1302
|
rateSuffix
|
|
1361
1303
|
] })
|
|
1362
1304
|
] }),
|
|
1363
|
-
hourlyCostBreakdown.floorApplies && /* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-
|
|
1305
|
+
hourlyCostBreakdown.floorApplies && /* @__PURE__ */ jsxs2("div", { className: "flex justify-between text-xs font-mono tracking-wide text-primary border-t border-border pt-2", children: [
|
|
1364
1306
|
/* @__PURE__ */ jsx2("span", { children: "MIN CHARGE" }),
|
|
1365
1307
|
/* @__PURE__ */ jsxs2("span", { children: [
|
|
1366
1308
|
"$",
|
|
@@ -1372,29 +1314,29 @@ function ProvisioningWizard({
|
|
|
1372
1314
|
] })
|
|
1373
1315
|
] })
|
|
1374
1316
|
] }),
|
|
1375
|
-
deployError && /* @__PURE__ */ jsxs2("div", { className: "rounded-
|
|
1317
|
+
deployError && /* @__PURE__ */ jsxs2("div", { className: "rounded-lg border border-destructive/30 bg-destructive/10 p-3 flex items-center gap-2", children: [
|
|
1376
1318
|
/* @__PURE__ */ jsx2(Info, { className: "h-4 w-4 text-destructive shrink-0" }),
|
|
1377
1319
|
/* @__PURE__ */ jsx2("p", { className: "text-sm font-medium text-destructive", children: deployError })
|
|
1378
1320
|
] }),
|
|
1379
|
-
/* @__PURE__ */ jsx2("div", { className: "space-y-
|
|
1321
|
+
/* @__PURE__ */ jsx2("div", { className: "space-y-2", children: isMultistep ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
1380
1322
|
currentStep < finalStep ? /* @__PURE__ */ jsxs2(
|
|
1381
|
-
|
|
1323
|
+
Button,
|
|
1382
1324
|
{
|
|
1383
1325
|
type: "button",
|
|
1384
1326
|
onClick: () => setCurrentStep((s) => s + 1),
|
|
1385
|
-
className: "w-full
|
|
1327
|
+
className: "w-full",
|
|
1386
1328
|
children: [
|
|
1387
1329
|
"Continue to ",
|
|
1388
1330
|
stepLabels[currentStep]
|
|
1389
1331
|
]
|
|
1390
1332
|
}
|
|
1391
1333
|
) : /* @__PURE__ */ jsx2(
|
|
1392
|
-
|
|
1334
|
+
Button,
|
|
1393
1335
|
{
|
|
1394
1336
|
type: "button",
|
|
1395
1337
|
onClick: handleDeploy,
|
|
1396
|
-
disabled: isDeploying || !selectedEnv
|
|
1397
|
-
className: "w-full
|
|
1338
|
+
disabled: isDeploying || !selectedEnv,
|
|
1339
|
+
className: "w-full",
|
|
1398
1340
|
children: isDeploying ? /* @__PURE__ */ jsxs2("span", { className: "flex items-center justify-center gap-2", children: [
|
|
1399
1341
|
/* @__PURE__ */ jsx2(Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
1400
1342
|
"Deploying..."
|
|
@@ -1402,21 +1344,22 @@ function ProvisioningWizard({
|
|
|
1402
1344
|
}
|
|
1403
1345
|
),
|
|
1404
1346
|
currentStep > 1 && /* @__PURE__ */ jsx2(
|
|
1405
|
-
|
|
1347
|
+
Button,
|
|
1406
1348
|
{
|
|
1407
1349
|
type: "button",
|
|
1350
|
+
variant: "secondary",
|
|
1408
1351
|
onClick: () => setCurrentStep((s) => s - 1),
|
|
1409
|
-
className: "w-full
|
|
1352
|
+
className: "w-full",
|
|
1410
1353
|
children: "Back"
|
|
1411
1354
|
}
|
|
1412
1355
|
)
|
|
1413
1356
|
] }) : /* @__PURE__ */ jsx2(
|
|
1414
|
-
|
|
1357
|
+
Button,
|
|
1415
1358
|
{
|
|
1416
1359
|
type: "button",
|
|
1417
1360
|
onClick: handleDeploy,
|
|
1418
|
-
disabled: isDeploying || !selectedEnv
|
|
1419
|
-
className: "w-full
|
|
1361
|
+
disabled: isDeploying || !selectedEnv,
|
|
1362
|
+
className: "w-full",
|
|
1420
1363
|
children: isDeploying ? /* @__PURE__ */ jsxs2("span", { className: "flex items-center justify-center gap-2", children: [
|
|
1421
1364
|
/* @__PURE__ */ jsx2(Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
1422
1365
|
"Spinning up environment..."
|
|
@@ -1427,36 +1370,6 @@ function ProvisioningWizard({
|
|
|
1427
1370
|
] })
|
|
1428
1371
|
] });
|
|
1429
1372
|
}
|
|
1430
|
-
function SaveAsDefault({
|
|
1431
|
-
modelTier,
|
|
1432
|
-
defaultModel,
|
|
1433
|
-
onSetDefault
|
|
1434
|
-
}) {
|
|
1435
|
-
const isCurrentDefault = Boolean(modelTier) && modelTier === defaultModel;
|
|
1436
|
-
const disabled = !modelTier || isCurrentDefault;
|
|
1437
|
-
return /* @__PURE__ */ jsxs2("div", { className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
1438
|
-
/* @__PURE__ */ jsx2(
|
|
1439
|
-
"button",
|
|
1440
|
-
{
|
|
1441
|
-
type: "button",
|
|
1442
|
-
onClick: () => {
|
|
1443
|
-
if (!disabled) onSetDefault(modelTier);
|
|
1444
|
-
},
|
|
1445
|
-
disabled,
|
|
1446
|
-
className: cn(
|
|
1447
|
-
"underline-offset-2 transition-colors",
|
|
1448
|
-
disabled ? "cursor-default opacity-60" : "hover:text-foreground hover:underline focus:outline-none focus:text-foreground focus:underline"
|
|
1449
|
-
),
|
|
1450
|
-
children: isCurrentDefault ? "\u2713 Saved as default" : "Save as default"
|
|
1451
|
-
}
|
|
1452
|
-
),
|
|
1453
|
-
defaultModel && !isCurrentDefault && /* @__PURE__ */ jsxs2("span", { className: "truncate", children: [
|
|
1454
|
-
"(current default: ",
|
|
1455
|
-
/* @__PURE__ */ jsx2("span", { className: "font-mono", children: defaultModel }),
|
|
1456
|
-
")"
|
|
1457
|
-
] })
|
|
1458
|
-
] });
|
|
1459
|
-
}
|
|
1460
1373
|
|
|
1461
1374
|
// src/pages/pricing-page.tsx
|
|
1462
1375
|
import * as React3 from "react";
|
|
@@ -1622,7 +1535,7 @@ import {
|
|
|
1622
1535
|
DialogTitle
|
|
1623
1536
|
} from "@tangle-network/ui/primitives";
|
|
1624
1537
|
import { EmptyState } from "@tangle-network/ui/primitives";
|
|
1625
|
-
import { Input } from "@tangle-network/ui/primitives";
|
|
1538
|
+
import { Input as Input2 } from "@tangle-network/ui/primitives";
|
|
1626
1539
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1627
1540
|
var TIER_LIMITS = {
|
|
1628
1541
|
free: 3,
|
|
@@ -1715,7 +1628,7 @@ function ProfilesPage({
|
|
|
1715
1628
|
/* @__PURE__ */ jsxs4("div", { className: "relative max-w-md", children: [
|
|
1716
1629
|
/* @__PURE__ */ jsx4(Search, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
1717
1630
|
/* @__PURE__ */ jsx4(
|
|
1718
|
-
|
|
1631
|
+
Input2,
|
|
1719
1632
|
{
|
|
1720
1633
|
placeholder: "Search profiles...",
|
|
1721
1634
|
value: searchQuery,
|
|
@@ -1991,7 +1904,7 @@ function ProfileFormDialog({
|
|
|
1991
1904
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
1992
1905
|
/* @__PURE__ */ jsx4("label", { className: "mb-1 block font-medium text-sm", children: "Name *" }),
|
|
1993
1906
|
/* @__PURE__ */ jsx4(
|
|
1994
|
-
|
|
1907
|
+
Input2,
|
|
1995
1908
|
{
|
|
1996
1909
|
value: formData.name,
|
|
1997
1910
|
onChange: (e) => setFormData((d) => ({ ...d, name: e.target.value })),
|
|
@@ -2005,7 +1918,7 @@ function ProfileFormDialog({
|
|
|
2005
1918
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
2006
1919
|
/* @__PURE__ */ jsx4("label", { className: "mb-1 block font-medium text-sm", children: "Description" }),
|
|
2007
1920
|
/* @__PURE__ */ jsx4(
|
|
2008
|
-
|
|
1921
|
+
Input2,
|
|
2009
1922
|
{
|
|
2010
1923
|
value: formData.description,
|
|
2011
1924
|
onChange: (e) => setFormData((d) => ({ ...d, description: e.target.value })),
|
|
@@ -2035,7 +1948,7 @@ function ProfileFormDialog({
|
|
|
2035
1948
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
2036
1949
|
/* @__PURE__ */ jsx4("label", { className: "mb-1 block font-medium text-sm", children: "Model" }),
|
|
2037
1950
|
/* @__PURE__ */ jsx4(
|
|
2038
|
-
|
|
1951
|
+
Input2,
|
|
2039
1952
|
{
|
|
2040
1953
|
value: formData.model,
|
|
2041
1954
|
onChange: (e) => setFormData((d) => ({ ...d, model: e.target.value })),
|
|
@@ -2060,7 +1973,7 @@ function ProfileFormDialog({
|
|
|
2060
1973
|
/* @__PURE__ */ jsxs4("div", { children: [
|
|
2061
1974
|
/* @__PURE__ */ jsx4("label", { className: "mb-1 block font-medium text-sm", children: "Tags" }),
|
|
2062
1975
|
/* @__PURE__ */ jsx4(
|
|
2063
|
-
|
|
1976
|
+
Input2,
|
|
2064
1977
|
{
|
|
2065
1978
|
value: formData.tags?.join(", "),
|
|
2066
1979
|
onChange: (e) => setFormData((d) => ({
|
|
@@ -3665,7 +3578,6 @@ var CATEGORY_DEFAULTS = {
|
|
|
3665
3578
|
cpuCores: 4,
|
|
3666
3579
|
ramGB: 16,
|
|
3667
3580
|
storageGB: 128,
|
|
3668
|
-
systemPrompt: "You are a blockchain development assistant. Help with smart contract development, testing, and deployment. Follow security best practices and suggest gas optimizations where relevant.",
|
|
3669
3581
|
bare: false
|
|
3670
3582
|
},
|
|
3671
3583
|
"ai-ml": {
|
|
@@ -3673,7 +3585,6 @@ var CATEGORY_DEFAULTS = {
|
|
|
3673
3585
|
cpuCores: 8,
|
|
3674
3586
|
ramGB: 32,
|
|
3675
3587
|
storageGB: 256,
|
|
3676
|
-
systemPrompt: "You are an AI/ML development assistant. Help with model training, data processing, and experiment management. Suggest efficient approaches for the available compute resources.",
|
|
3677
3588
|
bare: false
|
|
3678
3589
|
},
|
|
3679
3590
|
frontend: {
|
|
@@ -3681,7 +3592,6 @@ var CATEGORY_DEFAULTS = {
|
|
|
3681
3592
|
cpuCores: 2,
|
|
3682
3593
|
ramGB: 4,
|
|
3683
3594
|
storageGB: 50,
|
|
3684
|
-
systemPrompt: "You are a frontend development assistant. Help build modern, accessible, and performant user interfaces.",
|
|
3685
3595
|
bare: false
|
|
3686
3596
|
},
|
|
3687
3597
|
infrastructure: {
|
|
@@ -3689,7 +3599,6 @@ var CATEGORY_DEFAULTS = {
|
|
|
3689
3599
|
cpuCores: 4,
|
|
3690
3600
|
ramGB: 16,
|
|
3691
3601
|
storageGB: 128,
|
|
3692
|
-
systemPrompt: "You are an infrastructure and DevOps assistant. Help with service configuration, deployment, monitoring, and operational best practices.",
|
|
3693
3602
|
bare: false
|
|
3694
3603
|
},
|
|
3695
3604
|
general: {
|
|
@@ -3697,7 +3606,6 @@ var CATEGORY_DEFAULTS = {
|
|
|
3697
3606
|
cpuCores: 4,
|
|
3698
3607
|
ramGB: 16,
|
|
3699
3608
|
storageGB: 128,
|
|
3700
|
-
systemPrompt: "",
|
|
3701
3609
|
bare: false
|
|
3702
3610
|
}
|
|
3703
3611
|
};
|