@streamoid/settings 0.3.3 → 0.3.5

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/index.mjs CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  SiconBilling,
27
27
  SiconSettings,
28
28
  SiconRight as SiconRight2,
29
+ SiconLeft as SiconLeft3,
29
30
  SiconUserAdd as SiconUserAdd2,
30
31
  SiconLock,
31
32
  SiconDown
@@ -1234,7 +1235,11 @@ var T4 = {
1234
1235
  tertiary: "var(--alias-text---icons-tertiary)",
1235
1236
  muted: "var(--alias-text---icons-muted)",
1236
1237
  inverse: "var(--alias-text---icons-inverse)",
1237
- surface: "var(--alias-surface-subtleraised)",
1238
+ // Grey modal shell so the nested white panels (app rows, store access) separate
1239
+ // from it — matches Create Workspace (workspace-modal). Dark-identical: both
1240
+ // surface-subtleraised and neutral-825 are #1f1f1f in dark; in light it's
1241
+ // #dbdbdb (grey) instead of #ffffff (white).
1242
+ surface: "var(--primitives-neutral-825)",
1238
1243
  base: "var(--alias-surface-base)",
1239
1244
  canvasBase: "var(--alias-surface-canvasbase)",
1240
1245
  fillPlus: "var(--alias-fill-neutral-neutralplus)",
@@ -3401,18 +3406,100 @@ import {
3401
3406
  ScBillingHistoryHeader,
3402
3407
  ScBillingHistoryTableList,
3403
3408
  ScHeader,
3404
- ScPlanCard
3409
+ ScPlanCard,
3410
+ ScPlanComparison
3405
3411
  } from "@streamoid/ui";
3406
3412
  import {
3407
3413
  SiconDownload,
3408
3414
  SiconLeft as SiconLeft2,
3409
3415
  SiconDoubleArrow,
3410
- SiconClose as SiconClose4,
3411
- SiconArtifacts as SiconArtifacts3,
3412
- SiconPhotogenix as SiconPhotogenix3,
3413
- SiconCatalogix as SiconCatalogix2
3416
+ SiconClose as SiconClose4
3414
3417
  } from "@streamoid/icons";
3415
3418
 
3419
+ // src/plan-comparison-data.ts
3420
+ var PLAN_COMPARISON_COLUMNS = ["Free", "Pro", "Enterprise"];
3421
+ var PLAN_COMPARISON_NOTE = "Credits roll over monthly and only expire if your plan is no longer active";
3422
+ var PLAN_COMPARISON_SECTIONS = [
3423
+ {
3424
+ rows: [{ label: "Usage volume", values: ["Limited", "Higher limits", "Unlimited"] }]
3425
+ },
3426
+ {
3427
+ header: "Artifax (Design & Insights)",
3428
+ rows: [
3429
+ { label: "Priority processing", values: ["Low", "Medium", "High"] },
3430
+ { label: "Tracked Brands", values: ["3 brands included", "5 brands included", "Unlimited"] },
3431
+ { label: "Custom brand scraping", values: ["-", "Included", "Included"] },
3432
+ { label: "Tracked news terms", values: ["-", "Up to 5 news terms", "Unlimited"] },
3433
+ { label: "Pattern, design & graphic generation", values: ["Up to 60 images", "Up to 200 images", "Unlimited"] },
3434
+ { label: "Vectorization & colorways", values: ["Up to 60 images", "Up to 200 images", "Unlimited"] },
3435
+ { label: "Background removal", values: ["Up to 300 images", "Up to 1,000 images", "Unlimited"] },
3436
+ { label: "Range planning", values: ["Up to 3 plans", "Up to 10 plans", "Unlimited"] },
3437
+ { label: "Tech packs", values: ["Manual fill", "Up to 5 tech packs", "Unlimited"] },
3438
+ { label: "Automated moodboards", values: ["Up to 20 moodboards", "Up to 66 moodboards", "Unlimited"] },
3439
+ { label: "Export & download vector assets", values: ["Free", "Free", "Free"] }
3440
+ ]
3441
+ },
3442
+ {
3443
+ header: "Photogenix (Imagery & Video)",
3444
+ rows: [
3445
+ { label: "Priority processing", values: ["Low", "Medium", "High"] },
3446
+ { label: "Image generation", values: ["Up to 60 images", "Up to 200 images", "Unlimited"] },
3447
+ { label: "Image watermarks", values: ["Watermarked", "No watermark", "No watermark"] },
3448
+ { label: "Image editing", values: ["Up to 300 edits", "Up to 1,000 edits", "Unlimited"] },
3449
+ { label: "Video generation from image", values: ["Up to 20 videos", "Up to 66 videos", "Unlimited"] },
3450
+ { label: "Video with background changes", values: ["Up to 15 videos", "Up to 50 videos", "Unlimited"] },
3451
+ { label: "Video Advertisement generation", values: ["-", "Included", "Included"] },
3452
+ { label: "Automated shoot configuration", values: ["Up to 300 products", "Up to 1,000 products", "Unlimited"] },
3453
+ { label: "UGC content creation", values: ["Up to 15 outputs", "Up to 50 outputs", "Unlimited"] },
3454
+ { label: "Marketplace exports", values: ["Up to 300 exports", "Up to 1,000 exports", "Unlimited"] }
3455
+ ]
3456
+ },
3457
+ {
3458
+ header: "Catalogix (Cataloging & Listing)",
3459
+ rows: [
3460
+ { label: "Priority processing", values: ["Low", "Medium", "High"] },
3461
+ { label: "Data import & mapping", values: ["Free", "Free", "Free"] },
3462
+ { label: "Attributes from images (express)", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3463
+ { label: "Attributes from images (precise)", values: ["Up to 42 styles", "Up to 142 styles", "Unlimited"] },
3464
+ // Blank-label sub-row per the design export (values present, no label).
3465
+ { label: "", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3466
+ { label: "Background removal", values: ["Up to 60 styles", "Up to 200 styles", "Unlimited"] },
3467
+ { label: "Identify image type (pose)", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3468
+ { label: "Extra images (detail shots)", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3469
+ // Blank-label sub-row per the design export.
3470
+ { label: "", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3471
+ { label: "Product titles & descriptions", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3472
+ { label: "SEO content", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3473
+ { label: "Size charts", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3474
+ { label: "Translation (data & images)", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3475
+ { label: "Automated quality checks", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] }
3476
+ ]
3477
+ },
3478
+ {
3479
+ header: "Security & Compliance",
3480
+ rows: [
3481
+ { label: "SSO / SAML", values: ["-", "-", "Included"] },
3482
+ { label: "Role-based access control", values: ["-", "-", "Included"] },
3483
+ { label: "Audit logs", values: ["-", "-", "Included"] },
3484
+ { label: "Data residency / region controls", values: ["-", "-", "Included"] },
3485
+ { label: "Custom data retention & DPA", values: ["-", "-", "Included"] }
3486
+ ]
3487
+ },
3488
+ {
3489
+ header: "Support",
3490
+ rows: [
3491
+ { label: "Support level", values: ["Community / docs", "Standard support", "Dedicated support + customer success manager"] },
3492
+ { label: "SLA", values: ["-", "-", "Custom SLA"] },
3493
+ { label: "Onboarding", values: ["Self-serve", "Self-serve", "Guided onboarding & training"] }
3494
+ ]
3495
+ }
3496
+ ];
3497
+ var PLAN_TAGLINES = {
3498
+ free: "Try the AI agents and automate your first workflows",
3499
+ pro: "Scale your team's output and get to market faster",
3500
+ enterprise: "For high-volume brands, agencies, and marketplaces that need custom scale, integrations, and support"
3501
+ };
3502
+
3416
3503
  // src/export-date-modal.tsx
3417
3504
  import { useState as useState5, useMemo, useCallback as useCallback2 } from "react";
3418
3505
  import { SiconClose as SiconClose2, SiconLeft, SiconRight } from "@streamoid/icons";
@@ -3932,9 +4019,9 @@ function BuyCreditsModal({
3932
4019
  {
3933
4020
  className: "flex flex-col relative",
3934
4021
  style: {
3935
- backgroundColor: "var(--alias-surface-subtle)",
4022
+ backgroundColor: "var(--primitives-neutral-825)",
3936
4023
  borderRadius: "var(--radius-4xl)",
3937
- border: "1px solid var(--alias-border-divider)",
4024
+ border: "1px solid var(--alias-border-subtle)",
3938
4025
  width: 480,
3939
4026
  maxWidth: "90vw"
3940
4027
  },
@@ -3996,6 +4083,7 @@ function BuyCreditsModal({
3996
4083
  {
3997
4084
  className: "flex items-center flex-1 min-w-0",
3998
4085
  style: {
4086
+ backgroundColor: "var(--alias-fill-neutral-neutralplus)",
3999
4087
  borderRadius: "var(--radius-xl)",
4000
4088
  padding: "var(--spacing-xl) var(--spacing-3xl)",
4001
4089
  border: "1.25px solid var(--alias-border-default)",
@@ -4254,232 +4342,6 @@ function getCurrencySymbolByCountry(country) {
4254
4342
  function formatCredits(n) {
4255
4343
  return n.toLocaleString("en-US");
4256
4344
  }
4257
- var SECTION_ICON_PROPS = {
4258
- color: "var(--alias-text---icons-tertiary)",
4259
- size: 24,
4260
- strokeWidth: 1.5
4261
- };
4262
- var PLAN_FEATURES_BY_AMOUNT = {
4263
- // Free — 300 credits
4264
- 0: [
4265
- {
4266
- section: "Artifax",
4267
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4268
- features: [
4269
- "Generate up to 60 images",
4270
- "Fill techpacks manually",
4271
- "Monitor up to 3 essential brands"
4272
- ]
4273
- },
4274
- {
4275
- section: "Photogenix",
4276
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4277
- features: [
4278
- "Generate up to 60 images",
4279
- "Generate up to 18 videos (8s)",
4280
- "Retouch up to 300 images"
4281
- ]
4282
- },
4283
- {
4284
- section: "Catalogix",
4285
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4286
- features: [
4287
- "Upload 50 products per store",
4288
- "Catalog up to 75 products",
4289
- "List up to 30 template files"
4290
- ]
4291
- }
4292
- ],
4293
- // PRO $49.99 — 1,000 credits
4294
- 4999: [
4295
- {
4296
- section: "Artifax",
4297
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4298
- features: [
4299
- "Generate up to 200 images",
4300
- "Autofill up to 5 techpacks",
4301
- "Monitor up to 10 custom brands"
4302
- ]
4303
- },
4304
- {
4305
- section: "Photogenix",
4306
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4307
- features: [
4308
- "Generate up to 200 images",
4309
- "Generate up to 60 videos (8s)",
4310
- "Retouch up to 1,000 images"
4311
- ]
4312
- },
4313
- {
4314
- section: "Catalogix",
4315
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4316
- features: [
4317
- "Upload 100k products per store",
4318
- "Catalog up to 250 products",
4319
- "List up to 100 template files"
4320
- ]
4321
- }
4322
- ],
4323
- // PRO $149.99 — 3,000 credits
4324
- 14999: [
4325
- {
4326
- section: "Artifax",
4327
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4328
- features: [
4329
- "Generate up to 600 images",
4330
- "Autofill up to 15 techpacks",
4331
- "Monitor up to 30 custom brands"
4332
- ]
4333
- },
4334
- {
4335
- section: "Photogenix",
4336
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4337
- features: [
4338
- "Generate up to 600 images",
4339
- "Generate up to 180 videos (8s)",
4340
- "Retouch up to 3,000 images"
4341
- ]
4342
- },
4343
- {
4344
- section: "Catalogix",
4345
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4346
- features: [
4347
- "Upload 100k products per store",
4348
- "Catalog up to 750 products",
4349
- "List up to 300 template files"
4350
- ]
4351
- }
4352
- ],
4353
- // PRO $349.99 — 8,000 credits
4354
- 34999: [
4355
- {
4356
- section: "Artifax",
4357
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4358
- features: [
4359
- "Generate up to 1,600 images",
4360
- "Autofill up to 40 techpacks",
4361
- "Monitor up to 80 custom brands"
4362
- ]
4363
- },
4364
- {
4365
- section: "Photogenix",
4366
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4367
- features: [
4368
- "Generate up to 1,600 images",
4369
- "Generate up to 480 videos (8s)",
4370
- "Retouch up to 8,000 images"
4371
- ]
4372
- },
4373
- {
4374
- section: "Catalogix",
4375
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4376
- features: [
4377
- "Upload 100k products per store",
4378
- "Catalog up to 2,000 products",
4379
- "List up to 800 template files"
4380
- ]
4381
- }
4382
- ],
4383
- // PRO $549.99 — 15,000 credits
4384
- 54999: [
4385
- {
4386
- section: "Artifax",
4387
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4388
- features: [
4389
- "Generate up to 3,000 images",
4390
- "Autofill up to 75 techpacks",
4391
- "Monitor up to 150 custom brands"
4392
- ]
4393
- },
4394
- {
4395
- section: "Photogenix",
4396
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4397
- features: [
4398
- "Generate up to 3,000 images",
4399
- "Generate up to 900 videos (8s)",
4400
- "Retouch up to 15,000 images"
4401
- ]
4402
- },
4403
- {
4404
- section: "Catalogix",
4405
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4406
- features: [
4407
- "Upload 100k products per store",
4408
- "Catalog up to 3,750 products",
4409
- "List up to 1,500 template files"
4410
- ]
4411
- }
4412
- ],
4413
- // PRO $1,049.99 — 30,000 credits
4414
- 104999: [
4415
- {
4416
- section: "Artifax",
4417
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4418
- features: [
4419
- "Generate up to 6,000 images",
4420
- "Autofill up to 150 techpacks",
4421
- "Monitor up to 300 custom brands"
4422
- ]
4423
- },
4424
- {
4425
- section: "Photogenix",
4426
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4427
- features: [
4428
- "Generate up to 6,000 images",
4429
- "Generate up to 1,800 videos (8s)",
4430
- "Retouch up to 30,000 images"
4431
- ]
4432
- },
4433
- {
4434
- section: "Catalogix",
4435
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4436
- features: [
4437
- "Upload 100k products per store",
4438
- "Catalog up to 7,500 products",
4439
- "List up to 3,000 template files"
4440
- ]
4441
- }
4442
- ]
4443
- };
4444
- var ENTERPRISE_FEATURES = [
4445
- {
4446
- section: "Artifax",
4447
- icon: /* @__PURE__ */ jsx11(SiconArtifacts3, { ...SECTION_ICON_PROPS }),
4448
- features: [
4449
- "Custom image generations",
4450
- "Custom techpack autofilled",
4451
- "Custom number of brands"
4452
- ]
4453
- },
4454
- {
4455
- section: "Photogenix",
4456
- icon: /* @__PURE__ */ jsx11(SiconPhotogenix3, { ...SECTION_ICON_PROPS }),
4457
- features: [
4458
- "Custom image generations",
4459
- "Custom video generations",
4460
- "Custom image retouches"
4461
- ]
4462
- },
4463
- {
4464
- section: "Catalogix",
4465
- icon: /* @__PURE__ */ jsx11(SiconCatalogix2, { ...SECTION_ICON_PROPS }),
4466
- features: [
4467
- "Custom product uploads",
4468
- "Custom product cataloging",
4469
- "Custom template file listings"
4470
- ]
4471
- }
4472
- ];
4473
- function getPlanFeatures(amount) {
4474
- if (PLAN_FEATURES_BY_AMOUNT[amount]) return PLAN_FEATURES_BY_AMOUNT[amount];
4475
- const tiers = Object.keys(PLAN_FEATURES_BY_AMOUNT).map(Number).sort((a, b) => a - b);
4476
- let best = tiers[0];
4477
- for (const t of tiers) {
4478
- if (t <= amount) best = t;
4479
- else break;
4480
- }
4481
- return PLAN_FEATURES_BY_AMOUNT[best] ?? [];
4482
- }
4483
4345
  function formatNextBillingDateLabel(iso) {
4484
4346
  if (iso) {
4485
4347
  const parsed = new Date(iso);
@@ -4509,6 +4371,22 @@ function formatEffectiveDateLabel(value) {
4509
4371
  year: "numeric"
4510
4372
  });
4511
4373
  }
4374
+ function useIsLightTheme() {
4375
+ const read = () => typeof document !== "undefined" && document.documentElement.getAttribute("data-theme") === "Light";
4376
+ const [isLight, setIsLight] = useState7(read);
4377
+ useEffect4(() => {
4378
+ if (typeof document === "undefined") return;
4379
+ const target = document.documentElement;
4380
+ const observer = new MutationObserver(() => setIsLight(read()));
4381
+ observer.observe(target, {
4382
+ attributes: true,
4383
+ attributeFilter: ["data-theme"]
4384
+ });
4385
+ setIsLight(read());
4386
+ return () => observer.disconnect();
4387
+ }, []);
4388
+ return isLight;
4389
+ }
4512
4390
  function UpdateSubscriptionModal({
4513
4391
  open,
4514
4392
  currentPlanName,
@@ -4520,6 +4398,9 @@ function UpdateSubscriptionModal({
4520
4398
  onClose,
4521
4399
  onProceed
4522
4400
  }) {
4401
+ const isLight = useIsLightTheme();
4402
+ const modalSurface = isLight ? "#ffffff" : "var(--alias-surface-base)";
4403
+ const cardBorder = isLight ? "1px solid var(--alias-border-subtle)" : "1px solid var(--alias-border-divider)";
4523
4404
  if (!open) return null;
4524
4405
  return /* @__PURE__ */ jsx11(
4525
4406
  "div",
@@ -4534,7 +4415,7 @@ function UpdateSubscriptionModal({
4534
4415
  {
4535
4416
  className: "flex flex-col w-full max-w-xl",
4536
4417
  style: {
4537
- backgroundColor: "var(--alias-surface-base)",
4418
+ backgroundColor: modalSurface,
4538
4419
  borderRadius: "var(--radius-3xl)",
4539
4420
  border: "1px solid var(--alias-border-subtle)",
4540
4421
  padding: "var(--spacing-6xl)",
@@ -4603,6 +4484,7 @@ function UpdateSubscriptionModal({
4603
4484
  className: "flex items-center w-full",
4604
4485
  style: {
4605
4486
  backgroundColor: "var(--alias-fill-neutral-neutral)",
4487
+ border: cardBorder,
4606
4488
  borderRadius: "var(--radius-3xl)",
4607
4489
  padding: "var(--spacing-3xl)"
4608
4490
  },
@@ -4660,7 +4542,8 @@ function UpdateSubscriptionModal({
4660
4542
  width: 36,
4661
4543
  height: 36,
4662
4544
  borderRadius: "var(--radius-xl)",
4663
- backgroundColor: "var(--alias-fill-neutral-neutral)"
4545
+ backgroundColor: "var(--alias-fill-neutral-neutral)",
4546
+ border: cardBorder
4664
4547
  },
4665
4548
  children: /* @__PURE__ */ jsx11(SiconDoubleArrow, { className: "w-4 h-4", color: MUTED_COLOR })
4666
4549
  }
@@ -4687,6 +4570,7 @@ function UpdateSubscriptionModal({
4687
4570
  className: "flex items-center w-full",
4688
4571
  style: {
4689
4572
  backgroundColor: "var(--alias-fill-neutral-neutral)",
4573
+ border: cardBorder,
4690
4574
  borderRadius: "var(--radius-3xl)",
4691
4575
  padding: "var(--spacing-3xl)"
4692
4576
  },
@@ -4702,7 +4586,7 @@ function UpdateSubscriptionModal({
4702
4586
  lineHeight: "var(--line-height-line-height-xxl)",
4703
4587
  color: "var(--alias-text---icons-primary)"
4704
4588
  },
4705
- children: "Pro"
4589
+ children: nextPlanName || "Pro"
4706
4590
  }
4707
4591
  ),
4708
4592
  /* @__PURE__ */ jsxs9("div", { className: "flex flex-col items-end", children: [
@@ -4814,8 +4698,10 @@ function UpdateSubscriptionModal({
4814
4698
  }
4815
4699
  );
4816
4700
  }
4701
+ var stripMonthly = (price) => price.replace(/\s*\/\s*month\s*$/i, "");
4817
4702
  function PlansView({
4818
4703
  onBack,
4704
+ hideHeader,
4819
4705
  products,
4820
4706
  currentPlanId,
4821
4707
  currentPlanEndDate,
@@ -4913,96 +4799,58 @@ function PlansView({
4913
4799
  backgroundSize: "24px 24px"
4914
4800
  },
4915
4801
  children: [
4916
- /* @__PURE__ */ jsxs9(
4802
+ !hideHeader && /* @__PURE__ */ jsx11(
4917
4803
  "div",
4918
4804
  {
4919
- className: "flex items-center shrink-0 w-full",
4805
+ className: "flex items-center justify-end shrink-0 w-full",
4920
4806
  style: { gap: "var(--spacing-lg)" },
4921
- children: [
4922
- /* @__PURE__ */ jsxs9(
4923
- "div",
4924
- {
4925
- className: "flex flex-col",
4926
- style: { gap: "var(--spacing-xs)", flex: 1, minWidth: 0 },
4927
- children: [
4928
- /* @__PURE__ */ jsx11(
4929
- "p",
4930
- {
4931
- className: "min-w-0 truncate",
4932
- style: {
4933
- fontFamily: "var(--font-family-font-family-display)",
4934
- fontSize: "var(--font-size-font-size-xxl)",
4935
- fontWeight: 700,
4936
- lineHeight: "var(--line-height-line-height-xxl)",
4937
- color: "var(--alias-text---icons-primary)"
4938
- },
4939
- children: "Upgrade Plans"
4940
- }
4941
- ),
4942
- /* @__PURE__ */ jsx11(
4943
- "p",
4944
- {
4945
- style: {
4946
- fontFamily: "var(--font-family-font-family-body)",
4947
- fontSize: "var(--font-size-font-size-sm)",
4948
- fontWeight: 400,
4949
- lineHeight: "var(--line-height-line-height-sm)",
4950
- color: "var(--alias-text---icons-muted)"
4951
- },
4952
- children: "Pick a plan based on your monthly usage and credit needs."
4953
- }
4954
- )
4955
- ]
4956
- }
4957
- ),
4958
- /* @__PURE__ */ jsxs9(
4959
- "div",
4960
- {
4961
- className: "flex items-center shrink-0 cursor-pointer",
4962
- style: {
4963
- gap: "var(--spacing-sm)",
4964
- padding: "var(--spacing-xs) var(--spacing-lg)",
4965
- borderRadius: "var(--radius-xl)",
4966
- height: 32,
4967
- border: "1px solid var(--alias-border-subtle)",
4968
- backgroundColor: "var(--alias-surface-base)"
4969
- },
4970
- onClick: onBack,
4971
- children: [
4972
- /* @__PURE__ */ jsx11(SiconLeft2, { className: "w-4 h-4", color: MUTED_COLOR }),
4973
- /* @__PURE__ */ jsx11(
4974
- "span",
4975
- {
4976
- style: {
4977
- fontFamily: "var(--font-family-font-family-body)",
4978
- fontSize: "var(--font-size-font-size-sm)",
4979
- fontWeight: 500,
4980
- lineHeight: "var(--line-height-line-height-sm)",
4981
- color: "var(--alias-text---icons-muted)"
4982
- },
4983
- children: "Back to billing"
4984
- }
4985
- )
4986
- ]
4987
- }
4988
- )
4989
- ]
4807
+ children: /* @__PURE__ */ jsxs9(
4808
+ "div",
4809
+ {
4810
+ className: "flex items-center shrink-0 cursor-pointer",
4811
+ style: {
4812
+ gap: "var(--spacing-sm)",
4813
+ padding: "var(--spacing-xs) var(--spacing-lg)",
4814
+ borderRadius: "var(--radius-xl)",
4815
+ height: 32,
4816
+ border: "1px solid var(--alias-border-subtle)",
4817
+ backgroundColor: "var(--alias-surface-base)"
4818
+ },
4819
+ onClick: onBack,
4820
+ children: [
4821
+ /* @__PURE__ */ jsx11(SiconLeft2, { className: "w-4 h-4", color: MUTED_COLOR }),
4822
+ /* @__PURE__ */ jsx11(
4823
+ "span",
4824
+ {
4825
+ style: {
4826
+ fontFamily: "var(--font-family-font-family-body)",
4827
+ fontSize: "var(--font-size-font-size-sm)",
4828
+ fontWeight: 500,
4829
+ lineHeight: "var(--line-height-line-height-sm)",
4830
+ color: "var(--alias-text---icons-muted)"
4831
+ },
4832
+ children: "Back to billing"
4833
+ }
4834
+ )
4835
+ ]
4836
+ }
4837
+ )
4990
4838
  }
4991
4839
  ),
4992
4840
  /* @__PURE__ */ jsxs9(
4993
4841
  "div",
4994
4842
  {
4995
4843
  className: "grid w-full grid-cols-1 md:grid-cols-2 xl:grid-cols-3 items-stretch",
4996
- style: { gap: "var(--spacing-6xl)" },
4844
+ style: { gap: "var(--spacing-8xl)" },
4997
4845
  children: [
4998
4846
  /* @__PURE__ */ jsx11("div", { className: "h-full", children: /* @__PURE__ */ jsx11(
4999
4847
  ScPlanCard,
5000
4848
  {
5001
4849
  planName: freePlan?.planName || "Free",
5002
- price: freePlan?.price || `${workspaceCurrencySymbol}0`,
4850
+ price: stripMonthly(freePlan?.price || `${workspaceCurrencySymbol}0`),
5003
4851
  credits: freePlan?.credits || "3,000 credits",
5004
4852
  type: "free",
5005
- features: getPlanFeatures(freePlan?.amount ?? 0),
4853
+ tagline: PLAN_TAGLINES.free,
5006
4854
  buttonText: isFreeActionLoading ? "Processing..." : freePlan?.isCurrent ? "Current plan" : "Downgrade to free",
5007
4855
  buttonState: freePlan?.isCurrent || isFreeActionLoading ? "disabled" : "default",
5008
4856
  buttonVariant: "secondary",
@@ -5029,12 +4877,10 @@ function PlansView({
5029
4877
  ScPlanCard,
5030
4878
  {
5031
4879
  planName: "Pro",
5032
- price: selectedMiddlePlan?.price || "\u2014",
4880
+ price: stripMonthly(selectedMiddlePlan?.price || "\u2014"),
5033
4881
  credits: selectedMiddlePlan?.credits || "\u2014",
5034
4882
  type: "popular",
5035
- features: getPlanFeatures(
5036
- selectedMiddlePlan?.amount ?? middlePlans[0]?.amount ?? 4999
5037
- ),
4883
+ tagline: PLAN_TAGLINES.pro,
5038
4884
  buttonText: isMiddleActionLoading ? "Processing..." : !selectedMiddlePlan ? "Select a plan" : selectedMiddlePlan.isCurrent ? "Current plan" : selectedMiddlePlan.amount > currentPlanAmount ? "Upgrade" : "Downgrade",
5039
4885
  buttonState: selectedMiddlePlan?.isCurrent || isMiddleActionLoading || !selectedMiddlePlan ? "disabled" : "default",
5040
4886
  buttonVariant: selectedMiddlePlan?.isCurrent ? "outline" : selectedMiddlePlan && selectedMiddlePlan.amount > currentPlanAmount ? "primary" : "secondary",
@@ -5125,12 +4971,8 @@ function PlansView({
5125
4971
  {
5126
4972
  planName: "Enterprise",
5127
4973
  type: "custom",
5128
- description: /* @__PURE__ */ jsxs9(Fragment5, { children: [
5129
- /* @__PURE__ */ jsx11("p", { style: { marginBottom: 0 }, children: "The Enterprise plan is for teams operating at scale." }),
5130
- /* @__PURE__ */ jsx11("br", {}),
5131
- /* @__PURE__ */ jsx11("p", { style: { marginBottom: 0 }, children: "Get expanded capacity, flexible usage options, and dedicated support to manage large production volumes and complex catalogs with confidence." })
5132
- ] }),
5133
- buttonText: "Contact us",
4974
+ tagline: PLAN_TAGLINES.enterprise,
4975
+ buttonText: "Contact Sales",
5134
4976
  buttonVariant: "secondary",
5135
4977
  onUpgrade: () => {
5136
4978
  window.open("https://cal.com/streamoid/30min", "_blank");
@@ -5142,17 +4984,13 @@ function PlansView({
5142
4984
  }
5143
4985
  ),
5144
4986
  /* @__PURE__ */ jsx11(
5145
- "p",
4987
+ ScPlanComparison,
5146
4988
  {
5147
- className: "w-full text-center",
5148
- style: {
5149
- fontFamily: "var(--font-family-font-family-body)",
5150
- fontSize: "var(--font-size-font-size-sm)",
5151
- fontWeight: 400,
5152
- lineHeight: "var(--line-height-line-height-sm)",
5153
- color: "var(--alias-text---icons-muted)"
5154
- },
5155
- children: "Credits expire monthly"
4989
+ layout: "table",
4990
+ columns: [...PLAN_COMPARISON_COLUMNS],
4991
+ note: PLAN_COMPARISON_NOTE,
4992
+ sections: PLAN_COMPARISON_SECTIONS,
4993
+ highlightColumnIndex: 1
5156
4994
  }
5157
4995
  ),
5158
4996
  /* @__PURE__ */ jsx11(
@@ -5542,7 +5380,9 @@ function UsageLogsTable({
5542
5380
  );
5543
5381
  }
5544
5382
  function BillingContent({
5545
- embedded = false
5383
+ embedded = false,
5384
+ showPlans: showPlansProp,
5385
+ onShowPlansChange
5546
5386
  } = {}) {
5547
5387
  const { auth, workspace, api, toast, navigation } = useSettingsAdapters();
5548
5388
  const user = auth.user;
@@ -5555,7 +5395,12 @@ function BillingContent({
5555
5395
  return `${window.location.origin}${window.location.pathname}`;
5556
5396
  };
5557
5397
  const [activeTab, setActiveTab] = useState7("invoice");
5558
- const [showPlans, setShowPlans] = useState7(false);
5398
+ const [showPlansInternal, setShowPlansInternal] = useState7(false);
5399
+ const showPlans = showPlansProp ?? showPlansInternal;
5400
+ const setShowPlans = (next) => {
5401
+ if (onShowPlansChange) onShowPlansChange(next);
5402
+ else setShowPlansInternal(next);
5403
+ };
5559
5404
  const [showExportModal, setShowExportModal] = useState7(false);
5560
5405
  const [showBuyCreditsModal, setShowBuyCreditsModal] = useState7(false);
5561
5406
  const [subscription, setSubscription] = useState7(null);
@@ -6018,6 +5863,7 @@ function BillingContent({
6018
5863
  PlansView,
6019
5864
  {
6020
5865
  onBack: () => setShowPlans(false),
5866
+ hideHeader: Boolean(onShowPlansChange),
6021
5867
  products,
6022
5868
  currentPlanId: subscription?.plan?.id,
6023
5869
  currentPlanEndDate: subscription?.plan?.subscriptionEndDate,
@@ -6991,7 +6837,7 @@ function TokenTable({ tokens, deletingId, onRevoke, onDelete }) {
6991
6837
  }
6992
6838
 
6993
6839
  // src/settings-content.tsx
6994
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
6840
+ import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
6995
6841
  function deriveInitials(name) {
6996
6842
  return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
6997
6843
  }
@@ -7868,6 +7714,11 @@ function SettingsContentInner({ activeTab }) {
7868
7714
  const [teamInviteOpen, setTeamInviteOpen] = useState9(false);
7869
7715
  const [tokenShowRevoked, setTokenShowRevoked] = useState9(false);
7870
7716
  const [tokenCreateOpen, setTokenCreateOpen] = useState9(false);
7717
+ const [billingShowPlans, setBillingShowPlans] = useState9(false);
7718
+ const isBillingPlans = activeTab === "billing" && billingShowPlans;
7719
+ useEffect6(() => {
7720
+ if (activeTab !== "billing") setBillingShowPlans(false);
7721
+ }, [activeTab]);
7871
7722
  const [localWorkspaces, setLocalWorkspaces] = useState9(null);
7872
7723
  const [wsModalOpen, setWsModalOpen] = useState9(false);
7873
7724
  const [wsModalMode, setWsModalMode] = useState9("create");
@@ -8160,8 +8011,55 @@ function SettingsContentInner({ activeTab }) {
8160
8011
  },
8161
8012
  children: TAB_LABELS[activeTab]
8162
8013
  }
8163
- )
8014
+ ),
8015
+ isBillingPlans && /* @__PURE__ */ jsxs11(Fragment7, { children: [
8016
+ /* @__PURE__ */ jsx13(SiconRight2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
8017
+ /* @__PURE__ */ jsx13(
8018
+ "span",
8019
+ {
8020
+ style: {
8021
+ fontFamily: "var(--font-family-font-family-body)",
8022
+ fontSize: "var(--font-size-font-size-xl)",
8023
+ fontWeight: 500,
8024
+ lineHeight: "var(--line-height-line-height-xl)",
8025
+ color: "var(--alias-text---icons-primary)"
8026
+ },
8027
+ children: "Plans"
8028
+ }
8029
+ )
8030
+ ] })
8164
8031
  ] }),
8032
+ isBillingPlans && /* @__PURE__ */ jsxs11(
8033
+ "div",
8034
+ {
8035
+ className: "flex items-center shrink-0 cursor-pointer",
8036
+ style: {
8037
+ gap: "var(--spacing-sm)",
8038
+ padding: "var(--spacing-xs) var(--spacing-lg)",
8039
+ borderRadius: "var(--radius-xl)",
8040
+ height: 32,
8041
+ border: "1px solid var(--alias-border-subtle)",
8042
+ backgroundColor: "var(--alias-surface-base)"
8043
+ },
8044
+ onClick: () => setBillingShowPlans(false),
8045
+ children: [
8046
+ /* @__PURE__ */ jsx13(SiconLeft3, { className: "w-4 h-4", color: "var(--alias-text---icons-muted)" }),
8047
+ /* @__PURE__ */ jsx13(
8048
+ "span",
8049
+ {
8050
+ style: {
8051
+ fontFamily: "var(--font-family-font-family-body)",
8052
+ fontSize: "var(--font-size-font-size-sm)",
8053
+ fontWeight: 500,
8054
+ lineHeight: "var(--line-height-line-height-sm)",
8055
+ color: "var(--alias-text---icons-muted)"
8056
+ },
8057
+ children: "Back to billing"
8058
+ }
8059
+ )
8060
+ ]
8061
+ }
8062
+ ),
8165
8063
  activeTab === "workspace" && /* @__PURE__ */ jsx13(
8166
8064
  ScButton4,
8167
8065
  {
@@ -8233,7 +8131,7 @@ function SettingsContentInner({ activeTab }) {
8233
8131
  className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
8234
8132
  style: { gap: 20 },
8235
8133
  children: [
8236
- /* @__PURE__ */ jsx13(SettingsNav, { activeTab, onTabChange: setActiveTab }),
8134
+ !isBillingPlans && /* @__PURE__ */ jsx13(SettingsNav, { activeTab, onTabChange: setActiveTab }),
8237
8135
  activeTab === "profile" && /* @__PURE__ */ jsx13(ProfileTab, {}),
8238
8136
  activeTab === "workspace" && /* @__PURE__ */ jsx13(
8239
8137
  WorkspaceTab,
@@ -8258,7 +8156,14 @@ function SettingsContentInner({ activeTab }) {
8258
8156
  ),
8259
8157
  activeTab === "referral" && /* @__PURE__ */ jsx13(ReferralTab, {}),
8260
8158
  activeTab === "team" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(TeamsContent, { embedded: true, onInviteOpen: teamInviteOpen, onInviteOpenChange: setTeamInviteOpen }) }),
8261
- activeTab === "billing" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(BillingContent, { embedded: true }) }),
8159
+ activeTab === "billing" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(
8160
+ BillingContent,
8161
+ {
8162
+ embedded: true,
8163
+ showPlans: billingShowPlans,
8164
+ onShowPlansChange: setBillingShowPlans
8165
+ }
8166
+ ) }),
8262
8167
  activeTab === "apikey" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(
8263
8168
  TokensContent,
8264
8169
  {