@streamoid/settings 0.3.2 → 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.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +256 -332
- package/dist/index.mjs +261 -338
- package/package.json +1 -1
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);
|
|
@@ -4499,6 +4356,16 @@ function formatNextBillingDateLabel(iso) {
|
|
|
4499
4356
|
year: "numeric"
|
|
4500
4357
|
});
|
|
4501
4358
|
}
|
|
4359
|
+
function formatEffectiveDateLabel(value) {
|
|
4360
|
+
if (value == null) return "";
|
|
4361
|
+
const parsed = typeof value === "number" ? new Date(value < 1e10 ? value * 1e3 : value) : new Date(value);
|
|
4362
|
+
if (Number.isNaN(parsed.getTime())) return "";
|
|
4363
|
+
return parsed.toLocaleDateString("en-US", {
|
|
4364
|
+
month: "short",
|
|
4365
|
+
day: "numeric",
|
|
4366
|
+
year: "numeric"
|
|
4367
|
+
});
|
|
4368
|
+
}
|
|
4502
4369
|
function UpdateSubscriptionModal({
|
|
4503
4370
|
open,
|
|
4504
4371
|
currentPlanName,
|
|
@@ -4804,8 +4671,10 @@ function UpdateSubscriptionModal({
|
|
|
4804
4671
|
}
|
|
4805
4672
|
);
|
|
4806
4673
|
}
|
|
4674
|
+
var stripMonthly = (price) => price.replace(/\s*\/\s*month\s*$/i, "");
|
|
4807
4675
|
function PlansView({
|
|
4808
4676
|
onBack,
|
|
4677
|
+
hideHeader,
|
|
4809
4678
|
products,
|
|
4810
4679
|
currentPlanId,
|
|
4811
4680
|
currentPlanEndDate,
|
|
@@ -4903,80 +4772,42 @@ function PlansView({
|
|
|
4903
4772
|
backgroundSize: "24px 24px"
|
|
4904
4773
|
},
|
|
4905
4774
|
children: [
|
|
4906
|
-
/* @__PURE__ */
|
|
4775
|
+
!hideHeader && /* @__PURE__ */ jsx11(
|
|
4907
4776
|
"div",
|
|
4908
4777
|
{
|
|
4909
|
-
className: "flex items-center shrink-0 w-full",
|
|
4778
|
+
className: "flex items-center justify-end shrink-0 w-full",
|
|
4910
4779
|
style: { gap: "var(--spacing-lg)" },
|
|
4911
|
-
children:
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
children: "Pick a plan based on your monthly usage and credit needs."
|
|
4943
|
-
}
|
|
4944
|
-
)
|
|
4945
|
-
]
|
|
4946
|
-
}
|
|
4947
|
-
),
|
|
4948
|
-
/* @__PURE__ */ jsxs9(
|
|
4949
|
-
"div",
|
|
4950
|
-
{
|
|
4951
|
-
className: "flex items-center shrink-0 cursor-pointer",
|
|
4952
|
-
style: {
|
|
4953
|
-
gap: "var(--spacing-sm)",
|
|
4954
|
-
padding: "var(--spacing-xs) var(--spacing-lg)",
|
|
4955
|
-
borderRadius: "var(--radius-xl)",
|
|
4956
|
-
height: 32,
|
|
4957
|
-
border: "1px solid var(--alias-border-subtle)",
|
|
4958
|
-
backgroundColor: "var(--alias-surface-base)"
|
|
4959
|
-
},
|
|
4960
|
-
onClick: onBack,
|
|
4961
|
-
children: [
|
|
4962
|
-
/* @__PURE__ */ jsx11(SiconLeft2, { className: "w-4 h-4", color: MUTED_COLOR }),
|
|
4963
|
-
/* @__PURE__ */ jsx11(
|
|
4964
|
-
"span",
|
|
4965
|
-
{
|
|
4966
|
-
style: {
|
|
4967
|
-
fontFamily: "var(--font-family-font-family-body)",
|
|
4968
|
-
fontSize: "var(--font-size-font-size-sm)",
|
|
4969
|
-
fontWeight: 500,
|
|
4970
|
-
lineHeight: "var(--line-height-line-height-sm)",
|
|
4971
|
-
color: "var(--alias-text---icons-muted)"
|
|
4972
|
-
},
|
|
4973
|
-
children: "Back to billing"
|
|
4974
|
-
}
|
|
4975
|
-
)
|
|
4976
|
-
]
|
|
4977
|
-
}
|
|
4978
|
-
)
|
|
4979
|
-
]
|
|
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
|
+
)
|
|
4980
4811
|
}
|
|
4981
4812
|
),
|
|
4982
4813
|
/* @__PURE__ */ jsxs9(
|
|
@@ -4989,10 +4820,10 @@ function PlansView({
|
|
|
4989
4820
|
ScPlanCard,
|
|
4990
4821
|
{
|
|
4991
4822
|
planName: freePlan?.planName || "Free",
|
|
4992
|
-
price: freePlan?.price || `${workspaceCurrencySymbol}0
|
|
4823
|
+
price: stripMonthly(freePlan?.price || `${workspaceCurrencySymbol}0`),
|
|
4993
4824
|
credits: freePlan?.credits || "3,000 credits",
|
|
4994
4825
|
type: "free",
|
|
4995
|
-
|
|
4826
|
+
tagline: PLAN_TAGLINES.free,
|
|
4996
4827
|
buttonText: isFreeActionLoading ? "Processing..." : freePlan?.isCurrent ? "Current plan" : "Downgrade to free",
|
|
4997
4828
|
buttonState: freePlan?.isCurrent || isFreeActionLoading ? "disabled" : "default",
|
|
4998
4829
|
buttonVariant: "secondary",
|
|
@@ -5019,12 +4850,10 @@ function PlansView({
|
|
|
5019
4850
|
ScPlanCard,
|
|
5020
4851
|
{
|
|
5021
4852
|
planName: "Pro",
|
|
5022
|
-
price: selectedMiddlePlan?.price || "\u2014",
|
|
4853
|
+
price: stripMonthly(selectedMiddlePlan?.price || "\u2014"),
|
|
5023
4854
|
credits: selectedMiddlePlan?.credits || "\u2014",
|
|
5024
4855
|
type: "popular",
|
|
5025
|
-
|
|
5026
|
-
selectedMiddlePlan?.amount ?? middlePlans[0]?.amount ?? 4999
|
|
5027
|
-
),
|
|
4856
|
+
tagline: PLAN_TAGLINES.pro,
|
|
5028
4857
|
buttonText: isMiddleActionLoading ? "Processing..." : !selectedMiddlePlan ? "Select a plan" : selectedMiddlePlan.isCurrent ? "Current plan" : selectedMiddlePlan.amount > currentPlanAmount ? "Upgrade" : "Downgrade",
|
|
5029
4858
|
buttonState: selectedMiddlePlan?.isCurrent || isMiddleActionLoading || !selectedMiddlePlan ? "disabled" : "default",
|
|
5030
4859
|
buttonVariant: selectedMiddlePlan?.isCurrent ? "outline" : selectedMiddlePlan && selectedMiddlePlan.amount > currentPlanAmount ? "primary" : "secondary",
|
|
@@ -5115,12 +4944,8 @@ function PlansView({
|
|
|
5115
4944
|
{
|
|
5116
4945
|
planName: "Enterprise",
|
|
5117
4946
|
type: "custom",
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
/* @__PURE__ */ jsx11("br", {}),
|
|
5121
|
-
/* @__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." })
|
|
5122
|
-
] }),
|
|
5123
|
-
buttonText: "Contact us",
|
|
4947
|
+
tagline: PLAN_TAGLINES.enterprise,
|
|
4948
|
+
buttonText: "Contact Sales",
|
|
5124
4949
|
buttonVariant: "secondary",
|
|
5125
4950
|
onUpgrade: () => {
|
|
5126
4951
|
window.open("https://cal.com/streamoid/30min", "_blank");
|
|
@@ -5132,17 +4957,13 @@ function PlansView({
|
|
|
5132
4957
|
}
|
|
5133
4958
|
),
|
|
5134
4959
|
/* @__PURE__ */ jsx11(
|
|
5135
|
-
|
|
4960
|
+
ScPlanComparison,
|
|
5136
4961
|
{
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
lineHeight: "var(--line-height-line-height-sm)",
|
|
5143
|
-
color: "var(--alias-text---icons-muted)"
|
|
5144
|
-
},
|
|
5145
|
-
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
|
|
5146
4967
|
}
|
|
5147
4968
|
),
|
|
5148
4969
|
/* @__PURE__ */ jsx11(
|
|
@@ -5532,7 +5353,9 @@ function UsageLogsTable({
|
|
|
5532
5353
|
);
|
|
5533
5354
|
}
|
|
5534
5355
|
function BillingContent({
|
|
5535
|
-
embedded = false
|
|
5356
|
+
embedded = false,
|
|
5357
|
+
showPlans: showPlansProp,
|
|
5358
|
+
onShowPlansChange
|
|
5536
5359
|
} = {}) {
|
|
5537
5360
|
const { auth, workspace, api, toast, navigation } = useSettingsAdapters();
|
|
5538
5361
|
const user = auth.user;
|
|
@@ -5545,14 +5368,19 @@ function BillingContent({
|
|
|
5545
5368
|
return `${window.location.origin}${window.location.pathname}`;
|
|
5546
5369
|
};
|
|
5547
5370
|
const [activeTab, setActiveTab] = useState7("invoice");
|
|
5548
|
-
const [
|
|
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
|
+
};
|
|
5549
5377
|
const [showExportModal, setShowExportModal] = useState7(false);
|
|
5550
5378
|
const [showBuyCreditsModal, setShowBuyCreditsModal] = useState7(false);
|
|
5551
5379
|
const [subscription, setSubscription] = useState7(null);
|
|
5552
5380
|
const [availableCredits, setAvailableCredits] = useState7(null);
|
|
5553
5381
|
const [products, setProducts] = useState7([]);
|
|
5554
5382
|
const [invoices, setInvoices] = useState7([]);
|
|
5555
|
-
const [totalCredits, setTotalCredits] = useState7(
|
|
5383
|
+
const [totalCredits, setTotalCredits] = useState7(null);
|
|
5556
5384
|
const [usageLogs, setUsageLogs] = useState7([]);
|
|
5557
5385
|
const [userMap, setUserMap] = useState7({});
|
|
5558
5386
|
const [customPlanCredits, setCustomPlanCredits] = useState7(
|
|
@@ -5563,6 +5391,7 @@ function BillingContent({
|
|
|
5563
5391
|
);
|
|
5564
5392
|
const [buyCreditsInFlight, setBuyCreditsInFlight] = useState7(false);
|
|
5565
5393
|
const [loadingBilling, setLoadingBilling] = useState7(false);
|
|
5394
|
+
const [billingOverviewLoaded, setBillingOverviewLoaded] = useState7(false);
|
|
5566
5395
|
const [loadingTable, setLoadingTable] = useState7(false);
|
|
5567
5396
|
const [showInitialLoader, setShowInitialLoader] = useState7(true);
|
|
5568
5397
|
const [initialFetchTriggered, setInitialFetchTriggered] = useState7(false);
|
|
@@ -5587,6 +5416,7 @@ function BillingContent({
|
|
|
5587
5416
|
}, [api]);
|
|
5588
5417
|
const fetchBillingOverview = useCallback3(async () => {
|
|
5589
5418
|
setLoadingBilling(true);
|
|
5419
|
+
setBillingOverviewLoaded(false);
|
|
5590
5420
|
try {
|
|
5591
5421
|
console.log("calling Billing apis");
|
|
5592
5422
|
const [subRes, creditsRes, productsRes, customRes] = await Promise.all([
|
|
@@ -5615,6 +5445,7 @@ function BillingContent({
|
|
|
5615
5445
|
} catch {
|
|
5616
5446
|
} finally {
|
|
5617
5447
|
setLoadingBilling(false);
|
|
5448
|
+
setBillingOverviewLoaded(true);
|
|
5618
5449
|
}
|
|
5619
5450
|
}, [api, workspace.current?.country]);
|
|
5620
5451
|
const fetchUserMap = useCallback3(async () => {
|
|
@@ -5756,6 +5587,12 @@ function BillingContent({
|
|
|
5756
5587
|
useEffect4(() => {
|
|
5757
5588
|
setShowInitialLoader(true);
|
|
5758
5589
|
setInitialFetchTriggered(false);
|
|
5590
|
+
setBillingOverviewLoaded(false);
|
|
5591
|
+
setSubscription(null);
|
|
5592
|
+
setAvailableCredits(null);
|
|
5593
|
+
setProducts([]);
|
|
5594
|
+
setTotalCredits(null);
|
|
5595
|
+
setCustomPlanCredits(null);
|
|
5759
5596
|
}, [workspaceId]);
|
|
5760
5597
|
useEffect4(() => {
|
|
5761
5598
|
setInitialFetchTriggered(true);
|
|
@@ -5774,17 +5611,39 @@ function BillingContent({
|
|
|
5774
5611
|
useEffect4(() => {
|
|
5775
5612
|
if (!showInitialLoader) return;
|
|
5776
5613
|
if (!initialFetchTriggered) return;
|
|
5777
|
-
if (
|
|
5614
|
+
if (!billingOverviewLoaded) return;
|
|
5778
5615
|
setShowInitialLoader(false);
|
|
5779
|
-
}, [showInitialLoader, initialFetchTriggered,
|
|
5616
|
+
}, [showInitialLoader, initialFetchTriggered, billingOverviewLoaded]);
|
|
5780
5617
|
console.log("subscription", subscription);
|
|
5781
5618
|
const isProPlan = products.some(
|
|
5782
5619
|
(product) => product.id == subscription?.stripeProductId && product.name == "Paid"
|
|
5783
5620
|
);
|
|
5784
5621
|
console.log("isProPlan", isProPlan);
|
|
5785
|
-
const
|
|
5622
|
+
const currentPlanPrice = (() => {
|
|
5623
|
+
if (products.length > 0 && subscription?.plan?.id) {
|
|
5624
|
+
for (const product of products) {
|
|
5625
|
+
const price = product.prices.find((p) => p.id === subscription.plan.id);
|
|
5626
|
+
if (price) return price;
|
|
5627
|
+
}
|
|
5628
|
+
}
|
|
5629
|
+
return null;
|
|
5630
|
+
})();
|
|
5631
|
+
const preDowngradePlan = subscription?.downgradeScheduled && subscription.preDowngradeStripePriceData ? subscription.preDowngradeStripePriceData : null;
|
|
5632
|
+
const resolvedPlanName = (preDowngradePlan?.name?.trim() || currentPlanPrice?.metadata?.name?.trim() || subscription?.plan?.name?.trim() || (subscription?.plan?.amount != null ? subscription.plan.amount > 0 ? "Pro" : "Free" : "")).trim();
|
|
5633
|
+
const planName = isProPlan && resolvedPlanName !== "-" ? "Pro" : resolvedPlanName;
|
|
5786
5634
|
const isFreePlan = subscription?.plan?.amount == null || subscription.plan.amount === 0;
|
|
5787
|
-
const
|
|
5635
|
+
const hasResolvedPlanAmount = (preDowngradePlan?.amount ?? subscription?.plan?.amount) != null && Boolean(preDowngradePlan?.currency ?? subscription?.plan?.currency) && Boolean(preDowngradePlan?.interval ?? subscription?.plan?.interval);
|
|
5636
|
+
const planAmount = hasResolvedPlanAmount ? `${(preDowngradePlan?.currency ?? subscription?.plan?.currency) == "inr" ? "\u20B9" : "$"}${((preDowngradePlan?.amount ?? subscription.plan.amount) / 100).toFixed(2)} / ${preDowngradePlan?.interval ?? subscription?.plan?.interval}` : "";
|
|
5637
|
+
const planCreditsFromPrice = Number(
|
|
5638
|
+
preDowngradePlan?.credits ?? currentPlanPrice?.metadata?.credits
|
|
5639
|
+
);
|
|
5640
|
+
const currentPlanCredits = Number.isFinite(planCreditsFromPrice) ? planCreditsFromPrice : customPlanCredits;
|
|
5641
|
+
const planCreditsText = currentPlanCredits != null ? `${formatCredits(currentPlanCredits)} credits` : "";
|
|
5642
|
+
const scheduledDowngradeDateLabel = formatEffectiveDateLabel(
|
|
5643
|
+
subscription?.scheduledDowngradeEffectiveDate
|
|
5644
|
+
);
|
|
5645
|
+
const scheduledDowngradeText = subscription?.downgradeScheduled && subscription.plan?.name ? `Downgrades to ${subscription.plan.name}${scheduledDowngradeDateLabel ? ` ${scheduledDowngradeDateLabel}` : ""}` : void 0;
|
|
5646
|
+
const isPlanDetailsLoading = !billingOverviewLoaded || loadingBilling || subscription?.plan == null || !planName || planName === "-" || !planAmount || currentPlanCredits == null;
|
|
5788
5647
|
const usedCredits = availableCredits != null && totalCredits != null ? Math.max(0, totalCredits - availableCredits) : null;
|
|
5789
5648
|
const progressPct = usedCredits != null && totalCredits != null && totalCredits > 0 ? Math.min(100, Math.round(usedCredits / totalCredits * 100)) : 0;
|
|
5790
5649
|
const remainingPct = 100 - progressPct;
|
|
@@ -5977,6 +5836,7 @@ function BillingContent({
|
|
|
5977
5836
|
PlansView,
|
|
5978
5837
|
{
|
|
5979
5838
|
onBack: () => setShowPlans(false),
|
|
5839
|
+
hideHeader: Boolean(onShowPlansChange),
|
|
5980
5840
|
products,
|
|
5981
5841
|
currentPlanId: subscription?.plan?.id,
|
|
5982
5842
|
currentPlanEndDate: subscription?.plan?.subscriptionEndDate,
|
|
@@ -6002,11 +5862,13 @@ function BillingContent({
|
|
|
6002
5862
|
ScPlanDetailsCard,
|
|
6003
5863
|
{
|
|
6004
5864
|
planName,
|
|
6005
|
-
planCredits:
|
|
5865
|
+
planCredits: planCreditsText,
|
|
6006
5866
|
planPrice: planAmount,
|
|
6007
5867
|
badgeText: "Active",
|
|
5868
|
+
badgeSubText: scheduledDowngradeText,
|
|
6008
5869
|
currentPlanLabel: "Current plan",
|
|
6009
|
-
upgradeButtonText: subscription?.downgradeScheduled ? "Cancel downgrade" : "
|
|
5870
|
+
upgradeButtonText: subscription?.downgradeScheduled ? "Cancel downgrade" : "Manage Plan",
|
|
5871
|
+
isLoading: isPlanDetailsLoading,
|
|
6010
5872
|
className: "flex-1 min-w-0",
|
|
6011
5873
|
onUpgrade: () => {
|
|
6012
5874
|
void logBillingEvent("billing_plans_opened", "Plans opened", {
|
|
@@ -6103,7 +5965,9 @@ function BillingContent({
|
|
|
6103
5965
|
BuyCreditsModal,
|
|
6104
5966
|
{
|
|
6105
5967
|
country: workspace.current?.country,
|
|
6106
|
-
currencySymbol: getCurrencySymbolByCountry(
|
|
5968
|
+
currencySymbol: getCurrencySymbolByCountry(
|
|
5969
|
+
workspace.current?.country
|
|
5970
|
+
),
|
|
6107
5971
|
onClose: () => setShowBuyCreditsModal(false),
|
|
6108
5972
|
onBuy: (credits, price) => {
|
|
6109
5973
|
handleBuyCredits(credits, price);
|
|
@@ -6946,7 +6810,7 @@ function TokenTable({ tokens, deletingId, onRevoke, onDelete }) {
|
|
|
6946
6810
|
}
|
|
6947
6811
|
|
|
6948
6812
|
// src/settings-content.tsx
|
|
6949
|
-
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";
|
|
6950
6814
|
function deriveInitials(name) {
|
|
6951
6815
|
return name.split(/\s+/).slice(0, 2).map((part) => part[0]?.toUpperCase() ?? "").join("") || "WS";
|
|
6952
6816
|
}
|
|
@@ -7823,6 +7687,11 @@ function SettingsContentInner({ activeTab }) {
|
|
|
7823
7687
|
const [teamInviteOpen, setTeamInviteOpen] = useState9(false);
|
|
7824
7688
|
const [tokenShowRevoked, setTokenShowRevoked] = useState9(false);
|
|
7825
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]);
|
|
7826
7695
|
const [localWorkspaces, setLocalWorkspaces] = useState9(null);
|
|
7827
7696
|
const [wsModalOpen, setWsModalOpen] = useState9(false);
|
|
7828
7697
|
const [wsModalMode, setWsModalMode] = useState9("create");
|
|
@@ -8115,8 +7984,55 @@ function SettingsContentInner({ activeTab }) {
|
|
|
8115
7984
|
},
|
|
8116
7985
|
children: TAB_LABELS[activeTab]
|
|
8117
7986
|
}
|
|
8118
|
-
)
|
|
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
|
+
] })
|
|
8119
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
|
+
),
|
|
8120
8036
|
activeTab === "workspace" && /* @__PURE__ */ jsx13(
|
|
8121
8037
|
ScButton4,
|
|
8122
8038
|
{
|
|
@@ -8188,7 +8104,7 @@ function SettingsContentInner({ activeTab }) {
|
|
|
8188
8104
|
className: "flex items-start flex-1 min-h-0 w-full overflow-hidden",
|
|
8189
8105
|
style: { gap: 20 },
|
|
8190
8106
|
children: [
|
|
8191
|
-
/* @__PURE__ */ jsx13(SettingsNav, { activeTab, onTabChange: setActiveTab }),
|
|
8107
|
+
!isBillingPlans && /* @__PURE__ */ jsx13(SettingsNav, { activeTab, onTabChange: setActiveTab }),
|
|
8192
8108
|
activeTab === "profile" && /* @__PURE__ */ jsx13(ProfileTab, {}),
|
|
8193
8109
|
activeTab === "workspace" && /* @__PURE__ */ jsx13(
|
|
8194
8110
|
WorkspaceTab,
|
|
@@ -8213,7 +8129,14 @@ function SettingsContentInner({ activeTab }) {
|
|
|
8213
8129
|
),
|
|
8214
8130
|
activeTab === "referral" && /* @__PURE__ */ jsx13(ReferralTab, {}),
|
|
8215
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 }) }),
|
|
8216
|
-
activeTab === "billing" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(
|
|
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
|
+
) }),
|
|
8217
8140
|
activeTab === "apikey" && /* @__PURE__ */ jsx13("div", { className: "flex flex-col flex-1 min-w-0 min-h-0 h-full", children: /* @__PURE__ */ jsx13(
|
|
8218
8141
|
TokensContent,
|
|
8219
8142
|
{
|