@streamoid/ui 0.6.20 → 0.6.22
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/docs/AGENTS.md +3 -3
- package/dist/docs/ScAppSwitchPanel.md +9 -1
- package/dist/docs/ScWorkspaceAccountMenu.md +19 -5
- package/dist/docs/components.json +23 -3
- package/dist/index.css +34 -2
- package/dist/index.d.mts +67 -5
- package/dist/index.d.ts +67 -5
- package/dist/index.js +339 -155
- package/dist/index.mjs +322 -135
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -215,6 +215,43 @@ function ScStreamoidMascot({
|
|
|
215
215
|
|
|
216
216
|
// src/SC-AppSwitch/ScAppSwitchPanel.tsx
|
|
217
217
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
218
|
+
var STREAMOID_CHANGELOG_URL = "https://doc.clickup.com/3414296/p/h/3868r-26044/13a22b6f796b2c8";
|
|
219
|
+
var STREAMOID_STATUS_PAGE_URL = "https://status.streamoid.com/";
|
|
220
|
+
function openExternal(url) {
|
|
221
|
+
if (typeof window !== "undefined") {
|
|
222
|
+
window.open(url, "_blank", "noopener,noreferrer");
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function createStreamoidAppSwitchUtilities(utilities) {
|
|
226
|
+
const before = (action) => () => {
|
|
227
|
+
utilities.onClose?.();
|
|
228
|
+
action();
|
|
229
|
+
};
|
|
230
|
+
return [
|
|
231
|
+
{
|
|
232
|
+
key: "changelog",
|
|
233
|
+
label: "Changelog",
|
|
234
|
+
trailingText: utilities.appVersion,
|
|
235
|
+
external: true,
|
|
236
|
+
onSelect: before(
|
|
237
|
+
() => openExternal(utilities.changelogUrl ?? STREAMOID_CHANGELOG_URL)
|
|
238
|
+
)
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
key: "status",
|
|
242
|
+
label: "Status Page",
|
|
243
|
+
external: true,
|
|
244
|
+
onSelect: before(
|
|
245
|
+
() => openExternal(utilities.statusPageUrl ?? STREAMOID_STATUS_PAGE_URL)
|
|
246
|
+
)
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
key: "support",
|
|
250
|
+
label: "Help and Support",
|
|
251
|
+
onSelect: before(utilities.onHelpAndSupport)
|
|
252
|
+
}
|
|
253
|
+
];
|
|
254
|
+
}
|
|
218
255
|
var T = {
|
|
219
256
|
primary: "var(--alias-text---icons-primary, #f5f5f5)",
|
|
220
257
|
secondary: "var(--alias-text---icons-secondary, #dadada)",
|
|
@@ -433,12 +470,14 @@ var ScAppSwitchSystemRow = ({ item }) => {
|
|
|
433
470
|
};
|
|
434
471
|
var ScAppSwitchPanel = ({
|
|
435
472
|
apps,
|
|
436
|
-
systemItems
|
|
473
|
+
systemItems,
|
|
474
|
+
utilities,
|
|
437
475
|
systemLabel,
|
|
438
476
|
className,
|
|
439
477
|
style
|
|
440
478
|
}) => {
|
|
441
479
|
const ordered = [...apps].sort((a, b) => orderIndex(a) - orderIndex(b));
|
|
480
|
+
const resolvedSystemItems = systemItems ?? (utilities ? createStreamoidAppSwitchUtilities(utilities) : []);
|
|
442
481
|
return /* @__PURE__ */ jsxs4(
|
|
443
482
|
"div",
|
|
444
483
|
{
|
|
@@ -453,7 +492,7 @@ var ScAppSwitchPanel = ({
|
|
|
453
492
|
},
|
|
454
493
|
children: [
|
|
455
494
|
ordered.map((app) => /* @__PURE__ */ jsx5(ScAppSwitchRow, { item: app }, app.key)),
|
|
456
|
-
|
|
495
|
+
resolvedSystemItems.length > 0 ? /* @__PURE__ */ jsxs4(
|
|
457
496
|
"div",
|
|
458
497
|
{
|
|
459
498
|
style: {
|
|
@@ -478,7 +517,7 @@ var ScAppSwitchPanel = ({
|
|
|
478
517
|
children: systemLabel
|
|
479
518
|
}
|
|
480
519
|
) : null,
|
|
481
|
-
|
|
520
|
+
resolvedSystemItems.map((item) => /* @__PURE__ */ jsx5(ScAppSwitchSystemRow, { item }, item.key))
|
|
482
521
|
]
|
|
483
522
|
}
|
|
484
523
|
) : null
|
|
@@ -4124,6 +4163,7 @@ function StreamoidSidebar({
|
|
|
4124
4163
|
expandedLogo,
|
|
4125
4164
|
collapsedLogo,
|
|
4126
4165
|
profile,
|
|
4166
|
+
appIdentity,
|
|
4127
4167
|
versionText = "v1.0.0",
|
|
4128
4168
|
toggleIcon,
|
|
4129
4169
|
toggleInProfile = false,
|
|
@@ -4183,6 +4223,7 @@ function StreamoidSidebar({
|
|
|
4183
4223
|
/* @__PURE__ */ jsxs40(
|
|
4184
4224
|
"div",
|
|
4185
4225
|
{
|
|
4226
|
+
"data-streamoid-sidebar-card": true,
|
|
4186
4227
|
className: "flex flex-col h-full relative shrink-0",
|
|
4187
4228
|
style: {
|
|
4188
4229
|
backgroundColor: "var(--alias-surface-base)",
|
|
@@ -4378,7 +4419,26 @@ function StreamoidSidebar({
|
|
|
4378
4419
|
}
|
|
4379
4420
|
) : null,
|
|
4380
4421
|
/* @__PURE__ */ jsx49(HDivider, { edgeToEdge: true }),
|
|
4381
|
-
|
|
4422
|
+
appIdentity ? /* @__PURE__ */ jsx49(
|
|
4423
|
+
"button",
|
|
4424
|
+
{
|
|
4425
|
+
type: "button",
|
|
4426
|
+
className: "flex items-center shrink-0 w-full",
|
|
4427
|
+
style: {
|
|
4428
|
+
minWidth: 0,
|
|
4429
|
+
minHeight: 48,
|
|
4430
|
+
padding: "var(--spacing-md) var(--spacing-xl)",
|
|
4431
|
+
border: 0,
|
|
4432
|
+
borderRadius: "var(--radius-xl)",
|
|
4433
|
+
background: "transparent",
|
|
4434
|
+
color: "inherit",
|
|
4435
|
+
cursor: "pointer"
|
|
4436
|
+
},
|
|
4437
|
+
onClick: appIdentity.onClick,
|
|
4438
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
4439
|
+
children: appIdentity.content
|
|
4440
|
+
}
|
|
4441
|
+
) : profile ? toggleInProfile && !effectiveHideFooter ? (
|
|
4382
4442
|
/* Footer row: profile and collapse toggle are two SEPARATE
|
|
4383
4443
|
interactive units side by side (own rounded hover bg each). */
|
|
4384
4444
|
/* @__PURE__ */ jsxs40(
|
|
@@ -4546,6 +4606,7 @@ function StreamoidSidebar({
|
|
|
4546
4606
|
/* @__PURE__ */ jsxs40(
|
|
4547
4607
|
"div",
|
|
4548
4608
|
{
|
|
4609
|
+
"data-streamoid-sidebar-card": true,
|
|
4549
4610
|
className: "flex flex-col h-full items-center justify-center relative shrink-0",
|
|
4550
4611
|
style: {
|
|
4551
4612
|
backgroundColor: "var(--alias-surface-base)",
|
|
@@ -4693,7 +4754,26 @@ function StreamoidSidebar({
|
|
|
4693
4754
|
}
|
|
4694
4755
|
) : null,
|
|
4695
4756
|
/* @__PURE__ */ jsx49(HDivider, { edgeToEdge: true }),
|
|
4696
|
-
|
|
4757
|
+
appIdentity ? /* @__PURE__ */ jsx49(
|
|
4758
|
+
"button",
|
|
4759
|
+
{
|
|
4760
|
+
type: "button",
|
|
4761
|
+
className: "flex items-center justify-center shrink-0",
|
|
4762
|
+
style: {
|
|
4763
|
+
width: 48,
|
|
4764
|
+
height: 48,
|
|
4765
|
+
padding: "var(--spacing-md)",
|
|
4766
|
+
border: 0,
|
|
4767
|
+
borderRadius: "var(--radius-3xl)",
|
|
4768
|
+
background: "transparent",
|
|
4769
|
+
color: "inherit",
|
|
4770
|
+
cursor: "pointer"
|
|
4771
|
+
},
|
|
4772
|
+
onClick: appIdentity.onClick,
|
|
4773
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
4774
|
+
children: appIdentity.content
|
|
4775
|
+
}
|
|
4776
|
+
) : profile ? /* @__PURE__ */ jsx49(
|
|
4697
4777
|
"div",
|
|
4698
4778
|
{
|
|
4699
4779
|
className: "flex items-center justify-center shrink-0 cursor-pointer",
|
|
@@ -5080,7 +5160,7 @@ function ScWorkspaceAccountMenu({
|
|
|
5080
5160
|
Icon,
|
|
5081
5161
|
{
|
|
5082
5162
|
size: 20,
|
|
5083
|
-
color: selected ? "
|
|
5163
|
+
color: selected ? "#fff" : mutedIcon
|
|
5084
5164
|
}
|
|
5085
5165
|
)
|
|
5086
5166
|
},
|
|
@@ -5291,10 +5371,78 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
5291
5371
|
return { expanded, setExpanded, toggle };
|
|
5292
5372
|
}
|
|
5293
5373
|
|
|
5374
|
+
// src/SC-SidebarShell/useStreamoidSidebarPopoverPosition.ts
|
|
5375
|
+
import {
|
|
5376
|
+
useLayoutEffect,
|
|
5377
|
+
useState as useState11
|
|
5378
|
+
} from "react";
|
|
5379
|
+
var VIEWPORT_INSET = 16;
|
|
5380
|
+
function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
5381
|
+
placement,
|
|
5382
|
+
width,
|
|
5383
|
+
gap = 8,
|
|
5384
|
+
inset = 24
|
|
5385
|
+
}) {
|
|
5386
|
+
const [position, setPosition] = useState11({
|
|
5387
|
+
position: "fixed",
|
|
5388
|
+
left: 0,
|
|
5389
|
+
top: 0,
|
|
5390
|
+
width,
|
|
5391
|
+
maxWidth: `calc(100vw - ${VIEWPORT_INSET * 2}px)`,
|
|
5392
|
+
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
5393
|
+
visibility: "hidden"
|
|
5394
|
+
});
|
|
5395
|
+
useLayoutEffect(() => {
|
|
5396
|
+
const sidebar = sidebarRef.current;
|
|
5397
|
+
if (!sidebar || typeof window === "undefined") return;
|
|
5398
|
+
const card = (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
|
|
5399
|
+
"[data-streamoid-sidebar-card]"
|
|
5400
|
+
)) ?? sidebar;
|
|
5401
|
+
const measure = () => {
|
|
5402
|
+
const bounds = card.getBoundingClientRect();
|
|
5403
|
+
const availableWidth = Math.max(0, window.innerWidth - VIEWPORT_INSET * 2);
|
|
5404
|
+
const panelWidth = Math.min(width, availableWidth);
|
|
5405
|
+
const preferredLeft = bounds.right + gap;
|
|
5406
|
+
const maximumLeft = Math.max(
|
|
5407
|
+
VIEWPORT_INSET,
|
|
5408
|
+
window.innerWidth - panelWidth - VIEWPORT_INSET
|
|
5409
|
+
);
|
|
5410
|
+
const left = Math.max(
|
|
5411
|
+
VIEWPORT_INSET,
|
|
5412
|
+
Math.min(preferredLeft, maximumLeft)
|
|
5413
|
+
);
|
|
5414
|
+
const vertical = placement === "top-right" ? { top: Math.max(VIEWPORT_INSET, bounds.top + inset) } : {
|
|
5415
|
+
bottom: Math.max(
|
|
5416
|
+
VIEWPORT_INSET,
|
|
5417
|
+
window.innerHeight - bounds.bottom + inset
|
|
5418
|
+
)
|
|
5419
|
+
};
|
|
5420
|
+
setPosition({
|
|
5421
|
+
position: "fixed",
|
|
5422
|
+
left,
|
|
5423
|
+
width: panelWidth,
|
|
5424
|
+
maxWidth: `calc(100vw - ${VIEWPORT_INSET * 2}px)`,
|
|
5425
|
+
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
5426
|
+
visibility: "visible",
|
|
5427
|
+
...vertical
|
|
5428
|
+
});
|
|
5429
|
+
};
|
|
5430
|
+
measure();
|
|
5431
|
+
window.addEventListener("resize", measure);
|
|
5432
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
5433
|
+
observer?.observe(card);
|
|
5434
|
+
return () => {
|
|
5435
|
+
window.removeEventListener("resize", measure);
|
|
5436
|
+
observer?.disconnect();
|
|
5437
|
+
};
|
|
5438
|
+
}, [gap, inset, placement, sidebarRef, width]);
|
|
5439
|
+
return position;
|
|
5440
|
+
}
|
|
5441
|
+
|
|
5294
5442
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
|
|
5295
5443
|
import {
|
|
5296
5444
|
useCallback as useCallback2,
|
|
5297
|
-
useState as
|
|
5445
|
+
useState as useState12
|
|
5298
5446
|
} from "react";
|
|
5299
5447
|
|
|
5300
5448
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
|
|
@@ -5317,6 +5465,8 @@ var ScArtifaxSidebar_default = {
|
|
|
5317
5465
|
sectionChevron: "ScArtifaxSidebar_sectionChevron",
|
|
5318
5466
|
profileRow: "ScArtifaxSidebar_profileRow",
|
|
5319
5467
|
profileMain: "ScArtifaxSidebar_profileMain",
|
|
5468
|
+
appIdentityMain: "ScArtifaxSidebar_appIdentityMain",
|
|
5469
|
+
appIdentityCollapsed: "ScArtifaxSidebar_appIdentityCollapsed",
|
|
5320
5470
|
profileRowCollapsed: "ScArtifaxSidebar_profileRowCollapsed",
|
|
5321
5471
|
profileAvatar: "ScArtifaxSidebar_profileAvatar",
|
|
5322
5472
|
profileInfo: "ScArtifaxSidebar_profileInfo",
|
|
@@ -5384,6 +5534,7 @@ var ScArtifaxSidebar = ({
|
|
|
5384
5534
|
creditWarning,
|
|
5385
5535
|
assistantCta,
|
|
5386
5536
|
profile,
|
|
5537
|
+
appIdentity,
|
|
5387
5538
|
toggleIcon,
|
|
5388
5539
|
hideToggle = false,
|
|
5389
5540
|
openSections,
|
|
@@ -5399,7 +5550,7 @@ var ScArtifaxSidebar = ({
|
|
|
5399
5550
|
}
|
|
5400
5551
|
};
|
|
5401
5552
|
const isControlled = !!openSections;
|
|
5402
|
-
const [internalOpen, setInternalOpen] =
|
|
5553
|
+
const [internalOpen, setInternalOpen] = useState12(
|
|
5403
5554
|
() => {
|
|
5404
5555
|
const init = {};
|
|
5405
5556
|
sections.forEach((s) => {
|
|
@@ -5451,72 +5602,88 @@ var ScArtifaxSidebar = ({
|
|
|
5451
5602
|
onExpandedChange: changeExpanded
|
|
5452
5603
|
}
|
|
5453
5604
|
) : null,
|
|
5454
|
-
/* @__PURE__ */ jsxs42(
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
showHeader
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
{
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5605
|
+
/* @__PURE__ */ jsxs42(
|
|
5606
|
+
"div",
|
|
5607
|
+
{
|
|
5608
|
+
"data-streamoid-sidebar-card": true,
|
|
5609
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.expanded,
|
|
5610
|
+
children: [
|
|
5611
|
+
/* @__PURE__ */ jsx51("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayExpanded }),
|
|
5612
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.body, children: [
|
|
5613
|
+
expandedLogo ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.logoUnitExpanded, children: expandedLogo }) : null,
|
|
5614
|
+
sections.map((section, idx) => {
|
|
5615
|
+
const open = section.label ? section.collapsible !== false ? isSectionOpen(section.id) : true : true;
|
|
5616
|
+
const showHeader = !!section.label;
|
|
5617
|
+
const canToggle = showHeader && section.collapsible !== false;
|
|
5618
|
+
return /* @__PURE__ */ jsxs42("div", { children: [
|
|
5619
|
+
idx > 0 ? /* @__PURE__ */ jsx51(ScHDivider, {}) : null,
|
|
5620
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.sectionContainer, children: [
|
|
5621
|
+
showHeader ? /* @__PURE__ */ jsx51(
|
|
5622
|
+
SectionHeader2,
|
|
5623
|
+
{
|
|
5624
|
+
label: section.label,
|
|
5625
|
+
open,
|
|
5626
|
+
onToggle: canToggle ? () => handleSectionToggle(section.id) : void 0
|
|
5627
|
+
}
|
|
5628
|
+
) : null,
|
|
5629
|
+
open ? section.items.map(
|
|
5630
|
+
(item) => renderMenuItem2(item, section.id)
|
|
5631
|
+
) : null
|
|
5632
|
+
] })
|
|
5633
|
+
] }, section.id);
|
|
5634
|
+
})
|
|
5635
|
+
] }),
|
|
5636
|
+
creditWarning ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ jsx51(
|
|
5637
|
+
CreditWarningBanner,
|
|
5638
|
+
{
|
|
5639
|
+
availableCredits: creditWarning.availableCredits,
|
|
5640
|
+
remainingPct: creditWarning.remainingPct,
|
|
5641
|
+
level: creditWarning.level ?? "danger",
|
|
5642
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5643
|
+
expanded: true
|
|
5644
|
+
}
|
|
5645
|
+
) }) : null,
|
|
5646
|
+
assistantCta ? /* @__PURE__ */ jsx51(ScAskAgentSlot, { cta: assistantCta }) : null,
|
|
5647
|
+
/* @__PURE__ */ jsx51(ScHDivider, {}),
|
|
5648
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.profileRow, children: [
|
|
5649
|
+
appIdentity ? /* @__PURE__ */ jsx51(
|
|
5650
|
+
"button",
|
|
5651
|
+
{
|
|
5652
|
+
type: "button",
|
|
5653
|
+
className: ScArtifaxSidebar_default.appIdentityMain,
|
|
5654
|
+
onClick: appIdentity.onClick,
|
|
5655
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5656
|
+
children: appIdentity.content
|
|
5657
|
+
}
|
|
5658
|
+
) : profile ? /* @__PURE__ */ jsxs42(
|
|
5659
|
+
"button",
|
|
5660
|
+
{
|
|
5661
|
+
type: "button",
|
|
5662
|
+
className: ScArtifaxSidebar_default.profileMain,
|
|
5663
|
+
onClick: profile.onClick,
|
|
5664
|
+
children: [
|
|
5665
|
+
/* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar }),
|
|
5666
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.profileInfo, children: [
|
|
5667
|
+
/* @__PURE__ */ jsx51("span", { className: ScArtifaxSidebar_default.profileName, children: profile.name }),
|
|
5668
|
+
profile.subtitle ? /* @__PURE__ */ jsx51("span", { className: ScArtifaxSidebar_default.profileSubtitle, children: profile.subtitle }) : null
|
|
5669
|
+
] })
|
|
5670
|
+
]
|
|
5671
|
+
}
|
|
5672
|
+
) : /* @__PURE__ */ jsx51("span", { className: ScArtifaxSidebar_default.profileMain, "aria-hidden": "true" }),
|
|
5673
|
+
!hideToggle ? /* @__PURE__ */ jsx51(
|
|
5674
|
+
"button",
|
|
5675
|
+
{
|
|
5676
|
+
type: "button",
|
|
5677
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5678
|
+
onClick: onToggle,
|
|
5679
|
+
"aria-label": "Collapse sidebar",
|
|
5680
|
+
children: resolveToggleIcon2(toggleIcon, true)
|
|
5681
|
+
}
|
|
5682
|
+
) : null
|
|
5683
|
+
] })
|
|
5684
|
+
]
|
|
5685
|
+
}
|
|
5686
|
+
)
|
|
5520
5687
|
]
|
|
5521
5688
|
}
|
|
5522
5689
|
);
|
|
@@ -5534,57 +5701,73 @@ var ScArtifaxSidebar = ({
|
|
|
5534
5701
|
onExpandedChange: changeExpanded
|
|
5535
5702
|
}
|
|
5536
5703
|
) : null,
|
|
5537
|
-
/* @__PURE__ */ jsxs42(
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
/* @__PURE__ */ jsx51("div", {
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
{
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5704
|
+
/* @__PURE__ */ jsxs42(
|
|
5705
|
+
"div",
|
|
5706
|
+
{
|
|
5707
|
+
"data-streamoid-sidebar-card": true,
|
|
5708
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.collapsed,
|
|
5709
|
+
children: [
|
|
5710
|
+
/* @__PURE__ */ jsx51("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayCollapsed }),
|
|
5711
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.body + " " + ScArtifaxSidebar_default.bodyCollapsed, children: [
|
|
5712
|
+
collapsedLogo ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.logoUnitCollapsed, children: collapsedLogo }) : null,
|
|
5713
|
+
sections.map((section, idx) => /* @__PURE__ */ jsxs42("div", { children: [
|
|
5714
|
+
idx > 0 ? /* @__PURE__ */ jsx51(ScHDivider, {}) : null,
|
|
5715
|
+
/* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.sectionContainerCollapsed, children: section.items.map((item) => renderMenuItem2(item, section.id)) })
|
|
5716
|
+
] }, section.id))
|
|
5717
|
+
] }),
|
|
5718
|
+
creditWarning ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ jsx51(
|
|
5719
|
+
CreditWarningBanner,
|
|
5720
|
+
{
|
|
5721
|
+
availableCredits: creditWarning.availableCredits,
|
|
5722
|
+
remainingPct: creditWarning.remainingPct,
|
|
5723
|
+
level: creditWarning.level ?? "danger",
|
|
5724
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5725
|
+
expanded: false
|
|
5726
|
+
}
|
|
5727
|
+
) }) : null,
|
|
5728
|
+
assistantCta ? /* @__PURE__ */ jsx51(ScAskAgentSlot, { cta: assistantCta, collapsed: true }) : null,
|
|
5729
|
+
/* @__PURE__ */ jsx51(ScHDivider, {}),
|
|
5730
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.footerCollapsed, children: [
|
|
5731
|
+
appIdentity ? /* @__PURE__ */ jsx51(
|
|
5732
|
+
"button",
|
|
5733
|
+
{
|
|
5734
|
+
type: "button",
|
|
5735
|
+
className: ScArtifaxSidebar_default.appIdentityCollapsed,
|
|
5736
|
+
onClick: appIdentity.onClick,
|
|
5737
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5738
|
+
children: appIdentity.content
|
|
5739
|
+
}
|
|
5740
|
+
) : profile ? /* @__PURE__ */ jsx51(
|
|
5741
|
+
"button",
|
|
5742
|
+
{
|
|
5743
|
+
type: "button",
|
|
5744
|
+
className: ScArtifaxSidebar_default.profileRowCollapsed,
|
|
5745
|
+
onClick: profile.onClick,
|
|
5746
|
+
"aria-label": profile.name,
|
|
5747
|
+
children: /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar })
|
|
5748
|
+
}
|
|
5749
|
+
) : null,
|
|
5750
|
+
!hideToggle ? /* @__PURE__ */ jsx51(
|
|
5751
|
+
"button",
|
|
5752
|
+
{
|
|
5753
|
+
type: "button",
|
|
5754
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5755
|
+
onClick: onToggle,
|
|
5756
|
+
"aria-label": "Expand sidebar",
|
|
5757
|
+
children: resolveToggleIcon2(toggleIcon, false)
|
|
5758
|
+
}
|
|
5759
|
+
) : null
|
|
5760
|
+
] })
|
|
5761
|
+
]
|
|
5762
|
+
}
|
|
5763
|
+
)
|
|
5581
5764
|
]
|
|
5582
5765
|
}
|
|
5583
5766
|
);
|
|
5584
5767
|
};
|
|
5585
5768
|
|
|
5586
5769
|
// src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
|
|
5587
|
-
import { useState as
|
|
5770
|
+
import { useState as useState13 } from "react";
|
|
5588
5771
|
|
|
5589
5772
|
// src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
|
|
5590
5773
|
var ScSidebarSwitchMenu_default = {
|
|
@@ -6232,7 +6415,7 @@ var ScCatalogixSidebar = ({
|
|
|
6232
6415
|
className,
|
|
6233
6416
|
style
|
|
6234
6417
|
}) => {
|
|
6235
|
-
const [appListOpen, setAppListOpen] =
|
|
6418
|
+
const [appListOpen, setAppListOpen] = useState13(false);
|
|
6236
6419
|
const handleSwitch = () => {
|
|
6237
6420
|
setAppListOpen((prev) => !prev);
|
|
6238
6421
|
onLogoClick?.();
|
|
@@ -8092,7 +8275,7 @@ var ScWorkspaceCard = ({
|
|
|
8092
8275
|
};
|
|
8093
8276
|
|
|
8094
8277
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
8095
|
-
import { useState as
|
|
8278
|
+
import { useState as useState14 } from "react";
|
|
8096
8279
|
import { SiconSwitch as SiconSwitch3, SiconSettings as SiconSettings3, SiconLogout as SiconLogout3 } from "@streamoid/icons";
|
|
8097
8280
|
|
|
8098
8281
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
@@ -8133,7 +8316,7 @@ function ScWorkspaceSwitchCard({
|
|
|
8133
8316
|
onSettings,
|
|
8134
8317
|
onLeave
|
|
8135
8318
|
}) {
|
|
8136
|
-
const [internalHover, setInternalHover] =
|
|
8319
|
+
const [internalHover, setInternalHover] = useState14(false);
|
|
8137
8320
|
const isHover = hover !== void 0 ? hover : internalHover;
|
|
8138
8321
|
const isCurrent = type === "currentWS";
|
|
8139
8322
|
const isOther = type === "otherWS";
|
|
@@ -8443,7 +8626,7 @@ var ScTabs = ({
|
|
|
8443
8626
|
};
|
|
8444
8627
|
|
|
8445
8628
|
// src/SC-Counter/ScCounter.tsx
|
|
8446
|
-
import { useState as
|
|
8629
|
+
import { useState as useState15 } from "react";
|
|
8447
8630
|
import { SiconMinus, SiconPlus as SiconPlus2 } from "@streamoid/icons";
|
|
8448
8631
|
|
|
8449
8632
|
// src/SC-Counter/ScCounter.module.css
|
|
@@ -8465,7 +8648,7 @@ var ScCounter = ({
|
|
|
8465
8648
|
className,
|
|
8466
8649
|
style
|
|
8467
8650
|
}) => {
|
|
8468
|
-
const [showInput, setShowInput] =
|
|
8651
|
+
const [showInput, setShowInput] = useState15(false);
|
|
8469
8652
|
const set = (n) => {
|
|
8470
8653
|
let v = n;
|
|
8471
8654
|
if (min !== void 0) v = Math.max(min, v);
|
|
@@ -9560,7 +9743,7 @@ var ScSelectionList = ({
|
|
|
9560
9743
|
};
|
|
9561
9744
|
|
|
9562
9745
|
// src/SC-textArea/ScTextArea.tsx
|
|
9563
|
-
import { useState as
|
|
9746
|
+
import { useState as useState16 } from "react";
|
|
9564
9747
|
|
|
9565
9748
|
// src/SC-textArea/ScTextArea.module.css
|
|
9566
9749
|
var ScTextArea_default = {
|
|
@@ -9590,7 +9773,7 @@ var ScTextArea = ({
|
|
|
9590
9773
|
style,
|
|
9591
9774
|
...props
|
|
9592
9775
|
}) => {
|
|
9593
|
-
const [focused, setFocused] =
|
|
9776
|
+
const [focused, setFocused] = useState16(false);
|
|
9594
9777
|
const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
|
|
9595
9778
|
const stateClass = ScTextArea_default["state-" + derivedState];
|
|
9596
9779
|
const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
|
|
@@ -9632,7 +9815,7 @@ var ScTextArea = ({
|
|
|
9632
9815
|
};
|
|
9633
9816
|
|
|
9634
9817
|
// src/SC-select/ScSelect.tsx
|
|
9635
|
-
import { useState as
|
|
9818
|
+
import { useState as useState17, useRef as useRef6, useEffect as useEffect7 } from "react";
|
|
9636
9819
|
|
|
9637
9820
|
// src/SC-select/ScSelect.module.css
|
|
9638
9821
|
var ScSelect_default = {
|
|
@@ -9669,7 +9852,7 @@ var ScSelect = (props) => {
|
|
|
9669
9852
|
disabled = false,
|
|
9670
9853
|
className
|
|
9671
9854
|
} = props;
|
|
9672
|
-
const [open, setOpen] =
|
|
9855
|
+
const [open, setOpen] = useState17(false);
|
|
9673
9856
|
const rootRef = useRef6(null);
|
|
9674
9857
|
useEffect7(() => {
|
|
9675
9858
|
if (!open) return;
|
|
@@ -9919,7 +10102,7 @@ var ScFileField = (props) => {
|
|
|
9919
10102
|
};
|
|
9920
10103
|
|
|
9921
10104
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
9922
|
-
import { useState as
|
|
10105
|
+
import { useState as useState18, useEffect as useEffect8 } from "react";
|
|
9923
10106
|
|
|
9924
10107
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
9925
10108
|
var ScMediaApproval_default = {
|
|
@@ -9966,8 +10149,8 @@ var ScMediaApproval = (props) => {
|
|
|
9966
10149
|
className
|
|
9967
10150
|
} = props;
|
|
9968
10151
|
const total = mediaUrls.length;
|
|
9969
|
-
const [index, setIndex] =
|
|
9970
|
-
const [mediaLoading, setMediaLoading] =
|
|
10152
|
+
const [index, setIndex] = useState18(activeIndex ?? 0);
|
|
10153
|
+
const [mediaLoading, setMediaLoading] = useState18(false);
|
|
9971
10154
|
useEffect8(() => {
|
|
9972
10155
|
if (typeof activeIndex === "number") {
|
|
9973
10156
|
setIndex(activeIndex);
|
|
@@ -10228,7 +10411,7 @@ var ScMediaSelect = (props) => {
|
|
|
10228
10411
|
};
|
|
10229
10412
|
|
|
10230
10413
|
// src/SC-todoList/ScTodoList.tsx
|
|
10231
|
-
import { useState as
|
|
10414
|
+
import { useState as useState19 } from "react";
|
|
10232
10415
|
|
|
10233
10416
|
// src/SC-todoList/ScTodoList.module.css
|
|
10234
10417
|
var ScTodoList_default = {
|
|
@@ -10261,9 +10444,9 @@ var ScTodoList = ({
|
|
|
10261
10444
|
addPlaceholder = "Add an item",
|
|
10262
10445
|
className
|
|
10263
10446
|
}) => {
|
|
10264
|
-
const [editingId, setEditingId] =
|
|
10265
|
-
const [editValue, setEditValue] =
|
|
10266
|
-
const [newValue, setNewValue] =
|
|
10447
|
+
const [editingId, setEditingId] = useState19(null);
|
|
10448
|
+
const [editValue, setEditValue] = useState19("");
|
|
10449
|
+
const [newValue, setNewValue] = useState19("");
|
|
10267
10450
|
const total = items.length;
|
|
10268
10451
|
const completed = items.filter((i) => i.status === "completed").length;
|
|
10269
10452
|
const startEditing = (item) => {
|
|
@@ -11615,6 +11798,8 @@ export {
|
|
|
11615
11798
|
ProductCollapsedMark,
|
|
11616
11799
|
ProductWordmark,
|
|
11617
11800
|
SIDEBAR_RESIZE_THRESHOLD_PX,
|
|
11801
|
+
STREAMOID_CHANGELOG_URL,
|
|
11802
|
+
STREAMOID_STATUS_PAGE_URL,
|
|
11618
11803
|
ScAccess,
|
|
11619
11804
|
ScAppCard,
|
|
11620
11805
|
ScAppCardForCopilot,
|
|
@@ -11744,8 +11929,10 @@ export {
|
|
|
11744
11929
|
StreamoidWorkspaceSwitcher,
|
|
11745
11930
|
UsageHistoryMobile,
|
|
11746
11931
|
advanceSidebarResizeGesture,
|
|
11932
|
+
createStreamoidAppSwitchUtilities,
|
|
11747
11933
|
formatSubAgentLabel,
|
|
11748
11934
|
hasCollapsedMark,
|
|
11935
|
+
useStreamoidSidebarPopoverPosition,
|
|
11749
11936
|
useStreamoidSidebarPreference,
|
|
11750
11937
|
useStreamoidThemePreference
|
|
11751
11938
|
};
|