@streamoid/settings 0.3.3 → 0.3.4

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
@@ -3401,18 +3402,100 @@ import {
3401
3402
  ScBillingHistoryHeader,
3402
3403
  ScBillingHistoryTableList,
3403
3404
  ScHeader,
3404
- ScPlanCard
3405
+ ScPlanCard,
3406
+ ScPlanComparison
3405
3407
  } from "@streamoid/ui";
3406
3408
  import {
3407
3409
  SiconDownload,
3408
3410
  SiconLeft as SiconLeft2,
3409
3411
  SiconDoubleArrow,
3410
- SiconClose as SiconClose4,
3411
- SiconArtifacts as SiconArtifacts3,
3412
- SiconPhotogenix as SiconPhotogenix3,
3413
- SiconCatalogix as SiconCatalogix2
3412
+ SiconClose as SiconClose4
3414
3413
  } from "@streamoid/icons";
3415
3414
 
3415
+ // src/plan-comparison-data.ts
3416
+ var PLAN_COMPARISON_COLUMNS = ["Free", "Pro", "Enterprise"];
3417
+ var PLAN_COMPARISON_NOTE = "Credits roll over monthly and only expire if your plan is no longer active";
3418
+ var PLAN_COMPARISON_SECTIONS = [
3419
+ {
3420
+ rows: [{ label: "Usage volume", values: ["Limited", "Higher limits", "Unlimited"] }]
3421
+ },
3422
+ {
3423
+ header: "Artifax (Design & Insights)",
3424
+ rows: [
3425
+ { label: "Priority processing", values: ["Low", "Medium", "High"] },
3426
+ { label: "Tracked Brands", values: ["3 brands included", "5 brands included", "Unlimited"] },
3427
+ { label: "Custom brand scraping", values: ["-", "Included", "Included"] },
3428
+ { label: "Tracked news terms", values: ["-", "Up to 5 news terms", "Unlimited"] },
3429
+ { label: "Pattern, design & graphic generation", values: ["Up to 60 images", "Up to 200 images", "Unlimited"] },
3430
+ { label: "Vectorization & colorways", values: ["Up to 60 images", "Up to 200 images", "Unlimited"] },
3431
+ { label: "Background removal", values: ["Up to 300 images", "Up to 1,000 images", "Unlimited"] },
3432
+ { label: "Range planning", values: ["Up to 3 plans", "Up to 10 plans", "Unlimited"] },
3433
+ { label: "Tech packs", values: ["Manual fill", "Up to 5 tech packs", "Unlimited"] },
3434
+ { label: "Automated moodboards", values: ["Up to 20 moodboards", "Up to 66 moodboards", "Unlimited"] },
3435
+ { label: "Export & download vector assets", values: ["Free", "Free", "Free"] }
3436
+ ]
3437
+ },
3438
+ {
3439
+ header: "Photogenix (Imagery & Video)",
3440
+ rows: [
3441
+ { label: "Priority processing", values: ["Low", "Medium", "High"] },
3442
+ { label: "Image generation", values: ["Up to 60 images", "Up to 200 images", "Unlimited"] },
3443
+ { label: "Image watermarks", values: ["Watermarked", "No watermark", "No watermark"] },
3444
+ { label: "Image editing", values: ["Up to 300 edits", "Up to 1,000 edits", "Unlimited"] },
3445
+ { label: "Video generation from image", values: ["Up to 20 videos", "Up to 66 videos", "Unlimited"] },
3446
+ { label: "Video with background changes", values: ["Up to 15 videos", "Up to 50 videos", "Unlimited"] },
3447
+ { label: "Video Advertisement generation", values: ["-", "Included", "Included"] },
3448
+ { label: "Automated shoot configuration", values: ["Up to 300 products", "Up to 1,000 products", "Unlimited"] },
3449
+ { label: "UGC content creation", values: ["Up to 15 outputs", "Up to 50 outputs", "Unlimited"] },
3450
+ { label: "Marketplace exports", values: ["Up to 300 exports", "Up to 1,000 exports", "Unlimited"] }
3451
+ ]
3452
+ },
3453
+ {
3454
+ header: "Catalogix (Cataloging & Listing)",
3455
+ rows: [
3456
+ { label: "Priority processing", values: ["Low", "Medium", "High"] },
3457
+ { label: "Data import & mapping", values: ["Free", "Free", "Free"] },
3458
+ { label: "Attributes from images (express)", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3459
+ { label: "Attributes from images (precise)", values: ["Up to 42 styles", "Up to 142 styles", "Unlimited"] },
3460
+ // Blank-label sub-row per the design export (values present, no label).
3461
+ { label: "", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3462
+ { label: "Background removal", values: ["Up to 60 styles", "Up to 200 styles", "Unlimited"] },
3463
+ { label: "Identify image type (pose)", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3464
+ { label: "Extra images (detail shots)", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3465
+ // Blank-label sub-row per the design export.
3466
+ { label: "", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3467
+ { label: "Product titles & descriptions", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3468
+ { label: "SEO content", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3469
+ { label: "Size charts", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] },
3470
+ { label: "Translation (data & images)", values: ["Up to 100 styles", "Up to 333 styles", "Unlimited"] },
3471
+ { label: "Automated quality checks", values: ["Up to 150 styles", "Up to 500 styles", "Unlimited"] }
3472
+ ]
3473
+ },
3474
+ {
3475
+ header: "Security & Compliance",
3476
+ rows: [
3477
+ { label: "SSO / SAML", values: ["-", "-", "Included"] },
3478
+ { label: "Role-based access control", values: ["-", "-", "Included"] },
3479
+ { label: "Audit logs", values: ["-", "-", "Included"] },
3480
+ { label: "Data residency / region controls", values: ["-", "-", "Included"] },
3481
+ { label: "Custom data retention & DPA", values: ["-", "-", "Included"] }
3482
+ ]
3483
+ },
3484
+ {
3485
+ header: "Support",
3486
+ rows: [
3487
+ { label: "Support level", values: ["Community / docs", "Standard support", "Dedicated support + customer success manager"] },
3488
+ { label: "SLA", values: ["-", "-", "Custom SLA"] },
3489
+ { label: "Onboarding", values: ["Self-serve", "Self-serve", "Guided onboarding & training"] }
3490
+ ]
3491
+ }
3492
+ ];
3493
+ var PLAN_TAGLINES = {
3494
+ free: "Try the AI agents and automate your first workflows",
3495
+ pro: "Scale your team's output and get to market faster",
3496
+ enterprise: "For high-volume brands, agencies, and marketplaces that need custom scale, integrations, and support"
3497
+ };
3498
+
3416
3499
  // src/export-date-modal.tsx
3417
3500
  import { useState as useState5, useMemo, useCallback as useCallback2 } from "react";
3418
3501
  import { SiconClose as SiconClose2, SiconLeft, SiconRight } from "@streamoid/icons";
@@ -4254,232 +4337,6 @@ function getCurrencySymbolByCountry(country) {
4254
4337
  function formatCredits(n) {
4255
4338
  return n.toLocaleString("en-US");
4256
4339
  }
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
4340
  function formatNextBillingDateLabel(iso) {
4484
4341
  if (iso) {
4485
4342
  const parsed = new Date(iso);
@@ -4814,8 +4671,10 @@ function UpdateSubscriptionModal({
4814
4671
  }
4815
4672
  );
4816
4673
  }
4674
+ var stripMonthly = (price) => price.replace(/\s*\/\s*month\s*$/i, "");
4817
4675
  function PlansView({
4818
4676
  onBack,
4677
+ hideHeader,
4819
4678
  products,
4820
4679
  currentPlanId,
4821
4680
  currentPlanEndDate,
@@ -4913,80 +4772,42 @@ function PlansView({
4913
4772
  backgroundSize: "24px 24px"
4914
4773
  },
4915
4774
  children: [
4916
- /* @__PURE__ */ jsxs9(
4775
+ !hideHeader && /* @__PURE__ */ jsx11(
4917
4776
  "div",
4918
4777
  {
4919
- className: "flex items-center shrink-0 w-full",
4778
+ className: "flex items-center justify-end shrink-0 w-full",
4920
4779
  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
- ]
4780
+ children: /* @__PURE__ */ jsxs9(
4781
+ "div",
4782
+ {
4783
+ className: "flex items-center shrink-0 cursor-pointer",
4784
+ style: {
4785
+ gap: "var(--spacing-sm)",
4786
+ padding: "var(--spacing-xs) var(--spacing-lg)",
4787
+ borderRadius: "var(--radius-xl)",
4788
+ height: 32,
4789
+ border: "1px solid var(--alias-border-subtle)",
4790
+ backgroundColor: "var(--alias-surface-base)"
4791
+ },
4792
+ onClick: onBack,
4793
+ children: [
4794
+ /* @__PURE__ */ jsx11(SiconLeft2, { className: "w-4 h-4", color: MUTED_COLOR }),
4795
+ /* @__PURE__ */ jsx11(
4796
+ "span",
4797
+ {
4798
+ style: {
4799
+ fontFamily: "var(--font-family-font-family-body)",
4800
+ fontSize: "var(--font-size-font-size-sm)",
4801
+ fontWeight: 500,
4802
+ lineHeight: "var(--line-height-line-height-sm)",
4803
+ color: "var(--alias-text---icons-muted)"
4804
+ },
4805
+ children: "Back to billing"
4806
+ }
4807
+ )
4808
+ ]
4809
+ }
4810
+ )
4990
4811
  }
4991
4812
  ),
4992
4813
  /* @__PURE__ */ jsxs9(
@@ -4999,10 +4820,10 @@ function PlansView({
4999
4820
  ScPlanCard,
5000
4821
  {
5001
4822
  planName: freePlan?.planName || "Free",
5002
- price: freePlan?.price || `${workspaceCurrencySymbol}0`,
4823
+ price: stripMonthly(freePlan?.price || `${workspaceCurrencySymbol}0`),
5003
4824
  credits: freePlan?.credits || "3,000 credits",
5004
4825
  type: "free",
5005
- features: getPlanFeatures(freePlan?.amount ?? 0),
4826
+ tagline: PLAN_TAGLINES.free,
5006
4827
  buttonText: isFreeActionLoading ? "Processing..." : freePlan?.isCurrent ? "Current plan" : "Downgrade to free",
5007
4828
  buttonState: freePlan?.isCurrent || isFreeActionLoading ? "disabled" : "default",
5008
4829
  buttonVariant: "secondary",
@@ -5029,12 +4850,10 @@ function PlansView({
5029
4850
  ScPlanCard,
5030
4851
  {
5031
4852
  planName: "Pro",
5032
- price: selectedMiddlePlan?.price || "\u2014",
4853
+ price: stripMonthly(selectedMiddlePlan?.price || "\u2014"),
5033
4854
  credits: selectedMiddlePlan?.credits || "\u2014",
5034
4855
  type: "popular",
5035
- features: getPlanFeatures(
5036
- selectedMiddlePlan?.amount ?? middlePlans[0]?.amount ?? 4999
5037
- ),
4856
+ tagline: PLAN_TAGLINES.pro,
5038
4857
  buttonText: isMiddleActionLoading ? "Processing..." : !selectedMiddlePlan ? "Select a plan" : selectedMiddlePlan.isCurrent ? "Current plan" : selectedMiddlePlan.amount > currentPlanAmount ? "Upgrade" : "Downgrade",
5039
4858
  buttonState: selectedMiddlePlan?.isCurrent || isMiddleActionLoading || !selectedMiddlePlan ? "disabled" : "default",
5040
4859
  buttonVariant: selectedMiddlePlan?.isCurrent ? "outline" : selectedMiddlePlan && selectedMiddlePlan.amount > currentPlanAmount ? "primary" : "secondary",
@@ -5125,12 +4944,8 @@ function PlansView({
5125
4944
  {
5126
4945
  planName: "Enterprise",
5127
4946
  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",
4947
+ tagline: PLAN_TAGLINES.enterprise,
4948
+ buttonText: "Contact Sales",
5134
4949
  buttonVariant: "secondary",
5135
4950
  onUpgrade: () => {
5136
4951
  window.open("https://cal.com/streamoid/30min", "_blank");
@@ -5142,17 +4957,13 @@ function PlansView({
5142
4957
  }
5143
4958
  ),
5144
4959
  /* @__PURE__ */ jsx11(
5145
- "p",
4960
+ ScPlanComparison,
5146
4961
  {
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"
4962
+ layout: "table",
4963
+ columns: [...PLAN_COMPARISON_COLUMNS],
4964
+ note: PLAN_COMPARISON_NOTE,
4965
+ sections: PLAN_COMPARISON_SECTIONS,
4966
+ highlightColumnIndex: 1
5156
4967
  }
5157
4968
  ),
5158
4969
  /* @__PURE__ */ jsx11(
@@ -5542,7 +5353,9 @@ function UsageLogsTable({
5542
5353
  );
5543
5354
  }
5544
5355
  function BillingContent({
5545
- embedded = false
5356
+ embedded = false,
5357
+ showPlans: showPlansProp,
5358
+ onShowPlansChange
5546
5359
  } = {}) {
5547
5360
  const { auth, workspace, api, toast, navigation } = useSettingsAdapters();
5548
5361
  const user = auth.user;
@@ -5555,7 +5368,12 @@ function BillingContent({
5555
5368
  return `${window.location.origin}${window.location.pathname}`;
5556
5369
  };
5557
5370
  const [activeTab, setActiveTab] = useState7("invoice");
5558
- const [showPlans, setShowPlans] = useState7(false);
5371
+ const [showPlansInternal, setShowPlansInternal] = useState7(false);
5372
+ const showPlans = showPlansProp ?? showPlansInternal;
5373
+ const setShowPlans = (next) => {
5374
+ if (onShowPlansChange) onShowPlansChange(next);
5375
+ else setShowPlansInternal(next);
5376
+ };
5559
5377
  const [showExportModal, setShowExportModal] = useState7(false);
5560
5378
  const [showBuyCreditsModal, setShowBuyCreditsModal] = useState7(false);
5561
5379
  const [subscription, setSubscription] = useState7(null);
@@ -6018,6 +5836,7 @@ function BillingContent({
6018
5836
  PlansView,
6019
5837
  {
6020
5838
  onBack: () => setShowPlans(false),
5839
+ hideHeader: Boolean(onShowPlansChange),
6021
5840
  products,
6022
5841
  currentPlanId: subscription?.plan?.id,
6023
5842
  currentPlanEndDate: subscription?.plan?.subscriptionEndDate,
@@ -6991,7 +6810,7 @@ function TokenTable({ tokens, deletingId, onRevoke, onDelete }) {
6991
6810
  }
6992
6811
 
6993
6812
  // src/settings-content.tsx
6994
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
6813
+ import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
6995
6814
  function deriveInitials(name) {
6996
6815
  return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
6997
6816
  }
@@ -7868,6 +7687,11 @@ function SettingsContentInner({ activeTab }) {
7868
7687
  const [teamInviteOpen, setTeamInviteOpen] = useState9(false);
7869
7688
  const [tokenShowRevoked, setTokenShowRevoked] = useState9(false);
7870
7689
  const [tokenCreateOpen, setTokenCreateOpen] = useState9(false);
7690
+ const [billingShowPlans, setBillingShowPlans] = useState9(false);
7691
+ const isBillingPlans = activeTab === "billing" && billingShowPlans;
7692
+ useEffect6(() => {
7693
+ if (activeTab !== "billing") setBillingShowPlans(false);
7694
+ }, [activeTab]);
7871
7695
  const [localWorkspaces, setLocalWorkspaces] = useState9(null);
7872
7696
  const [wsModalOpen, setWsModalOpen] = useState9(false);
7873
7697
  const [wsModalMode, setWsModalMode] = useState9("create");
@@ -8160,8 +7984,55 @@ function SettingsContentInner({ activeTab }) {
8160
7984
  },
8161
7985
  children: TAB_LABELS[activeTab]
8162
7986
  }
8163
- )
7987
+ ),
7988
+ isBillingPlans && /* @__PURE__ */ jsxs11(Fragment7, { children: [
7989
+ /* @__PURE__ */ jsx13(SiconRight2, { className: "w-6 h-6 shrink-0", color: "var(--alias-text---icons-primary)" }),
7990
+ /* @__PURE__ */ jsx13(
7991
+ "span",
7992
+ {
7993
+ style: {
7994
+ fontFamily: "var(--font-family-font-family-body)",
7995
+ fontSize: "var(--font-size-font-size-xl)",
7996
+ fontWeight: 500,
7997
+ lineHeight: "var(--line-height-line-height-xl)",
7998
+ color: "var(--alias-text---icons-primary)"
7999
+ },
8000
+ children: "Plans"
8001
+ }
8002
+ )
8003
+ ] })
8164
8004
  ] }),
8005
+ isBillingPlans && /* @__PURE__ */ jsxs11(
8006
+ "div",
8007
+ {
8008
+ className: "flex items-center shrink-0 cursor-pointer",
8009
+ style: {
8010
+ gap: "var(--spacing-sm)",
8011
+ padding: "var(--spacing-xs) var(--spacing-lg)",
8012
+ borderRadius: "var(--radius-xl)",
8013
+ height: 32,
8014
+ border: "1px solid var(--alias-border-subtle)",
8015
+ backgroundColor: "var(--alias-surface-base)"
8016
+ },
8017
+ onClick: () => setBillingShowPlans(false),
8018
+ children: [
8019
+ /* @__PURE__ */ jsx13(SiconLeft3, { className: "w-4 h-4", color: "var(--alias-text---icons-muted)" }),
8020
+ /* @__PURE__ */ jsx13(
8021
+ "span",
8022
+ {
8023
+ style: {
8024
+ fontFamily: "var(--font-family-font-family-body)",
8025
+ fontSize: "var(--font-size-font-size-sm)",
8026
+ fontWeight: 500,
8027
+ lineHeight: "var(--line-height-line-height-sm)",
8028
+ color: "var(--alias-text---icons-muted)"
8029
+ },
8030
+ children: "Back to billing"
8031
+ }
8032
+ )
8033
+ ]
8034
+ }
8035
+ ),
8165
8036
  activeTab === "workspace" && /* @__PURE__ */ jsx13(
8166
8037
  ScButton4,
8167
8038
  {
@@ -8233,7 +8104,7 @@ function SettingsContentInner({ activeTab }) {
8233
8104
  className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
8234
8105
  style: { gap: 20 },
8235
8106
  children: [
8236
- /* @__PURE__ */ jsx13(SettingsNav, { activeTab, onTabChange: setActiveTab }),
8107
+ !isBillingPlans && /* @__PURE__ */ jsx13(SettingsNav, { activeTab, onTabChange: setActiveTab }),
8237
8108
  activeTab === "profile" && /* @__PURE__ */ jsx13(ProfileTab, {}),
8238
8109
  activeTab === "workspace" && /* @__PURE__ */ jsx13(
8239
8110
  WorkspaceTab,
@@ -8258,7 +8129,14 @@ function SettingsContentInner({ activeTab }) {
8258
8129
  ),
8259
8130
  activeTab === "referral" && /* @__PURE__ */ jsx13(ReferralTab, {}),
8260
8131
  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 }) }),
8132
+ activeTab === "billing" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(
8133
+ BillingContent,
8134
+ {
8135
+ embedded: true,
8136
+ showPlans: billingShowPlans,
8137
+ onShowPlansChange: setBillingShowPlans
8138
+ }
8139
+ ) }),
8262
8140
  activeTab === "apikey" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(
8263
8141
  TokensContent,
8264
8142
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/settings",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",