@streamoid/ui 0.6.21 → 0.6.23
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.d.mts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +304 -170
- package/dist/index.mjs +287 -150
- 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
|
|
@@ -4184,6 +4223,7 @@ function StreamoidSidebar({
|
|
|
4184
4223
|
/* @__PURE__ */ jsxs40(
|
|
4185
4224
|
"div",
|
|
4186
4225
|
{
|
|
4226
|
+
"data-streamoid-sidebar-card": true,
|
|
4187
4227
|
className: "flex flex-col h-full relative shrink-0",
|
|
4188
4228
|
style: {
|
|
4189
4229
|
backgroundColor: "var(--alias-surface-base)",
|
|
@@ -4566,6 +4606,7 @@ function StreamoidSidebar({
|
|
|
4566
4606
|
/* @__PURE__ */ jsxs40(
|
|
4567
4607
|
"div",
|
|
4568
4608
|
{
|
|
4609
|
+
"data-streamoid-sidebar-card": true,
|
|
4569
4610
|
className: "flex flex-col h-full items-center justify-center relative shrink-0",
|
|
4570
4611
|
style: {
|
|
4571
4612
|
backgroundColor: "var(--alias-surface-base)",
|
|
@@ -5330,10 +5371,88 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
5330
5371
|
return { expanded, setExpanded, toggle };
|
|
5331
5372
|
}
|
|
5332
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 findCard = () => (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
|
|
5399
|
+
"[data-streamoid-sidebar-card]"
|
|
5400
|
+
)) ?? sidebar;
|
|
5401
|
+
let observedCard = null;
|
|
5402
|
+
let resizeObserver = null;
|
|
5403
|
+
const measure = () => {
|
|
5404
|
+
const card = findCard();
|
|
5405
|
+
if (resizeObserver && observedCard !== card) {
|
|
5406
|
+
if (observedCard) resizeObserver.unobserve(observedCard);
|
|
5407
|
+
resizeObserver.observe(card);
|
|
5408
|
+
observedCard = card;
|
|
5409
|
+
}
|
|
5410
|
+
const bounds = card.getBoundingClientRect();
|
|
5411
|
+
const availableWidth = Math.max(0, window.innerWidth - VIEWPORT_INSET * 2);
|
|
5412
|
+
const panelWidth = Math.min(width, availableWidth);
|
|
5413
|
+
const preferredLeft = bounds.right + gap;
|
|
5414
|
+
const maximumLeft = Math.max(
|
|
5415
|
+
VIEWPORT_INSET,
|
|
5416
|
+
window.innerWidth - panelWidth - VIEWPORT_INSET
|
|
5417
|
+
);
|
|
5418
|
+
const left = Math.max(
|
|
5419
|
+
VIEWPORT_INSET,
|
|
5420
|
+
Math.min(preferredLeft, maximumLeft)
|
|
5421
|
+
);
|
|
5422
|
+
const vertical = placement === "top-right" ? { top: Math.max(VIEWPORT_INSET, bounds.top + inset) } : {
|
|
5423
|
+
bottom: Math.max(
|
|
5424
|
+
VIEWPORT_INSET,
|
|
5425
|
+
window.innerHeight - bounds.bottom + inset
|
|
5426
|
+
)
|
|
5427
|
+
};
|
|
5428
|
+
setPosition({
|
|
5429
|
+
position: "fixed",
|
|
5430
|
+
left,
|
|
5431
|
+
width: panelWidth,
|
|
5432
|
+
maxWidth: `calc(100vw - ${VIEWPORT_INSET * 2}px)`,
|
|
5433
|
+
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
5434
|
+
visibility: "visible",
|
|
5435
|
+
...vertical
|
|
5436
|
+
});
|
|
5437
|
+
};
|
|
5438
|
+
resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
5439
|
+
measure();
|
|
5440
|
+
window.addEventListener("resize", measure);
|
|
5441
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(measure);
|
|
5442
|
+
mutationObserver?.observe(sidebar, { childList: true, subtree: true });
|
|
5443
|
+
return () => {
|
|
5444
|
+
window.removeEventListener("resize", measure);
|
|
5445
|
+
resizeObserver?.disconnect();
|
|
5446
|
+
mutationObserver?.disconnect();
|
|
5447
|
+
};
|
|
5448
|
+
}, [gap, inset, placement, sidebarRef, width]);
|
|
5449
|
+
return position;
|
|
5450
|
+
}
|
|
5451
|
+
|
|
5333
5452
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
|
|
5334
5453
|
import {
|
|
5335
5454
|
useCallback as useCallback2,
|
|
5336
|
-
useState as
|
|
5455
|
+
useState as useState12
|
|
5337
5456
|
} from "react";
|
|
5338
5457
|
|
|
5339
5458
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
|
|
@@ -5441,7 +5560,7 @@ var ScArtifaxSidebar = ({
|
|
|
5441
5560
|
}
|
|
5442
5561
|
};
|
|
5443
5562
|
const isControlled = !!openSections;
|
|
5444
|
-
const [internalOpen, setInternalOpen] =
|
|
5563
|
+
const [internalOpen, setInternalOpen] = useState12(
|
|
5445
5564
|
() => {
|
|
5446
5565
|
const init = {};
|
|
5447
5566
|
sections.forEach((s) => {
|
|
@@ -5493,81 +5612,88 @@ var ScArtifaxSidebar = ({
|
|
|
5493
5612
|
onExpandedChange: changeExpanded
|
|
5494
5613
|
}
|
|
5495
5614
|
) : null,
|
|
5496
|
-
/* @__PURE__ */ jsxs42(
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
showHeader
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
{
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
className: ScArtifaxSidebar_default.
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5615
|
+
/* @__PURE__ */ jsxs42(
|
|
5616
|
+
"div",
|
|
5617
|
+
{
|
|
5618
|
+
"data-streamoid-sidebar-card": true,
|
|
5619
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.expanded,
|
|
5620
|
+
children: [
|
|
5621
|
+
/* @__PURE__ */ jsx51("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayExpanded }),
|
|
5622
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.body, children: [
|
|
5623
|
+
expandedLogo ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.logoUnitExpanded, children: expandedLogo }) : null,
|
|
5624
|
+
sections.map((section, idx) => {
|
|
5625
|
+
const open = section.label ? section.collapsible !== false ? isSectionOpen(section.id) : true : true;
|
|
5626
|
+
const showHeader = !!section.label;
|
|
5627
|
+
const canToggle = showHeader && section.collapsible !== false;
|
|
5628
|
+
return /* @__PURE__ */ jsxs42("div", { children: [
|
|
5629
|
+
idx > 0 ? /* @__PURE__ */ jsx51(ScHDivider, {}) : null,
|
|
5630
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.sectionContainer, children: [
|
|
5631
|
+
showHeader ? /* @__PURE__ */ jsx51(
|
|
5632
|
+
SectionHeader2,
|
|
5633
|
+
{
|
|
5634
|
+
label: section.label,
|
|
5635
|
+
open,
|
|
5636
|
+
onToggle: canToggle ? () => handleSectionToggle(section.id) : void 0
|
|
5637
|
+
}
|
|
5638
|
+
) : null,
|
|
5639
|
+
open ? section.items.map(
|
|
5640
|
+
(item) => renderMenuItem2(item, section.id)
|
|
5641
|
+
) : null
|
|
5642
|
+
] })
|
|
5643
|
+
] }, section.id);
|
|
5644
|
+
})
|
|
5645
|
+
] }),
|
|
5646
|
+
creditWarning ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ jsx51(
|
|
5647
|
+
CreditWarningBanner,
|
|
5648
|
+
{
|
|
5649
|
+
availableCredits: creditWarning.availableCredits,
|
|
5650
|
+
remainingPct: creditWarning.remainingPct,
|
|
5651
|
+
level: creditWarning.level ?? "danger",
|
|
5652
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5653
|
+
expanded: true
|
|
5654
|
+
}
|
|
5655
|
+
) }) : null,
|
|
5656
|
+
assistantCta ? /* @__PURE__ */ jsx51(ScAskAgentSlot, { cta: assistantCta }) : null,
|
|
5657
|
+
/* @__PURE__ */ jsx51(ScHDivider, {}),
|
|
5658
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.profileRow, children: [
|
|
5659
|
+
appIdentity ? /* @__PURE__ */ jsx51(
|
|
5660
|
+
"button",
|
|
5661
|
+
{
|
|
5662
|
+
type: "button",
|
|
5663
|
+
className: ScArtifaxSidebar_default.appIdentityMain,
|
|
5664
|
+
onClick: appIdentity.onClick,
|
|
5665
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5666
|
+
children: appIdentity.content
|
|
5667
|
+
}
|
|
5668
|
+
) : profile ? /* @__PURE__ */ jsxs42(
|
|
5669
|
+
"button",
|
|
5670
|
+
{
|
|
5671
|
+
type: "button",
|
|
5672
|
+
className: ScArtifaxSidebar_default.profileMain,
|
|
5673
|
+
onClick: profile.onClick,
|
|
5674
|
+
children: [
|
|
5675
|
+
/* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar }),
|
|
5676
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.profileInfo, children: [
|
|
5677
|
+
/* @__PURE__ */ jsx51("span", { className: ScArtifaxSidebar_default.profileName, children: profile.name }),
|
|
5678
|
+
profile.subtitle ? /* @__PURE__ */ jsx51("span", { className: ScArtifaxSidebar_default.profileSubtitle, children: profile.subtitle }) : null
|
|
5679
|
+
] })
|
|
5680
|
+
]
|
|
5681
|
+
}
|
|
5682
|
+
) : /* @__PURE__ */ jsx51("span", { className: ScArtifaxSidebar_default.profileMain, "aria-hidden": "true" }),
|
|
5683
|
+
!hideToggle ? /* @__PURE__ */ jsx51(
|
|
5684
|
+
"button",
|
|
5685
|
+
{
|
|
5686
|
+
type: "button",
|
|
5687
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5688
|
+
onClick: onToggle,
|
|
5689
|
+
"aria-label": "Collapse sidebar",
|
|
5690
|
+
children: resolveToggleIcon2(toggleIcon, true)
|
|
5691
|
+
}
|
|
5692
|
+
) : null
|
|
5693
|
+
] })
|
|
5694
|
+
]
|
|
5695
|
+
}
|
|
5696
|
+
)
|
|
5571
5697
|
]
|
|
5572
5698
|
}
|
|
5573
5699
|
);
|
|
@@ -5585,66 +5711,73 @@ var ScArtifaxSidebar = ({
|
|
|
5585
5711
|
onExpandedChange: changeExpanded
|
|
5586
5712
|
}
|
|
5587
5713
|
) : null,
|
|
5588
|
-
/* @__PURE__ */ jsxs42(
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
/* @__PURE__ */ jsx51("div", {
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
{
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5714
|
+
/* @__PURE__ */ jsxs42(
|
|
5715
|
+
"div",
|
|
5716
|
+
{
|
|
5717
|
+
"data-streamoid-sidebar-card": true,
|
|
5718
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.collapsed,
|
|
5719
|
+
children: [
|
|
5720
|
+
/* @__PURE__ */ jsx51("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayCollapsed }),
|
|
5721
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.body + " " + ScArtifaxSidebar_default.bodyCollapsed, children: [
|
|
5722
|
+
collapsedLogo ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.logoUnitCollapsed, children: collapsedLogo }) : null,
|
|
5723
|
+
sections.map((section, idx) => /* @__PURE__ */ jsxs42("div", { children: [
|
|
5724
|
+
idx > 0 ? /* @__PURE__ */ jsx51(ScHDivider, {}) : null,
|
|
5725
|
+
/* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.sectionContainerCollapsed, children: section.items.map((item) => renderMenuItem2(item, section.id)) })
|
|
5726
|
+
] }, section.id))
|
|
5727
|
+
] }),
|
|
5728
|
+
creditWarning ? /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ jsx51(
|
|
5729
|
+
CreditWarningBanner,
|
|
5730
|
+
{
|
|
5731
|
+
availableCredits: creditWarning.availableCredits,
|
|
5732
|
+
remainingPct: creditWarning.remainingPct,
|
|
5733
|
+
level: creditWarning.level ?? "danger",
|
|
5734
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5735
|
+
expanded: false
|
|
5736
|
+
}
|
|
5737
|
+
) }) : null,
|
|
5738
|
+
assistantCta ? /* @__PURE__ */ jsx51(ScAskAgentSlot, { cta: assistantCta, collapsed: true }) : null,
|
|
5739
|
+
/* @__PURE__ */ jsx51(ScHDivider, {}),
|
|
5740
|
+
/* @__PURE__ */ jsxs42("div", { className: ScArtifaxSidebar_default.footerCollapsed, children: [
|
|
5741
|
+
appIdentity ? /* @__PURE__ */ jsx51(
|
|
5742
|
+
"button",
|
|
5743
|
+
{
|
|
5744
|
+
type: "button",
|
|
5745
|
+
className: ScArtifaxSidebar_default.appIdentityCollapsed,
|
|
5746
|
+
onClick: appIdentity.onClick,
|
|
5747
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5748
|
+
children: appIdentity.content
|
|
5749
|
+
}
|
|
5750
|
+
) : profile ? /* @__PURE__ */ jsx51(
|
|
5751
|
+
"button",
|
|
5752
|
+
{
|
|
5753
|
+
type: "button",
|
|
5754
|
+
className: ScArtifaxSidebar_default.profileRowCollapsed,
|
|
5755
|
+
onClick: profile.onClick,
|
|
5756
|
+
"aria-label": profile.name,
|
|
5757
|
+
children: /* @__PURE__ */ jsx51("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar })
|
|
5758
|
+
}
|
|
5759
|
+
) : null,
|
|
5760
|
+
!hideToggle ? /* @__PURE__ */ jsx51(
|
|
5761
|
+
"button",
|
|
5762
|
+
{
|
|
5763
|
+
type: "button",
|
|
5764
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5765
|
+
onClick: onToggle,
|
|
5766
|
+
"aria-label": "Expand sidebar",
|
|
5767
|
+
children: resolveToggleIcon2(toggleIcon, false)
|
|
5768
|
+
}
|
|
5769
|
+
) : null
|
|
5770
|
+
] })
|
|
5771
|
+
]
|
|
5772
|
+
}
|
|
5773
|
+
)
|
|
5641
5774
|
]
|
|
5642
5775
|
}
|
|
5643
5776
|
);
|
|
5644
5777
|
};
|
|
5645
5778
|
|
|
5646
5779
|
// src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
|
|
5647
|
-
import { useState as
|
|
5780
|
+
import { useState as useState13 } from "react";
|
|
5648
5781
|
|
|
5649
5782
|
// src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
|
|
5650
5783
|
var ScSidebarSwitchMenu_default = {
|
|
@@ -6292,7 +6425,7 @@ var ScCatalogixSidebar = ({
|
|
|
6292
6425
|
className,
|
|
6293
6426
|
style
|
|
6294
6427
|
}) => {
|
|
6295
|
-
const [appListOpen, setAppListOpen] =
|
|
6428
|
+
const [appListOpen, setAppListOpen] = useState13(false);
|
|
6296
6429
|
const handleSwitch = () => {
|
|
6297
6430
|
setAppListOpen((prev) => !prev);
|
|
6298
6431
|
onLogoClick?.();
|
|
@@ -8152,7 +8285,7 @@ var ScWorkspaceCard = ({
|
|
|
8152
8285
|
};
|
|
8153
8286
|
|
|
8154
8287
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
8155
|
-
import { useState as
|
|
8288
|
+
import { useState as useState14 } from "react";
|
|
8156
8289
|
import { SiconSwitch as SiconSwitch3, SiconSettings as SiconSettings3, SiconLogout as SiconLogout3 } from "@streamoid/icons";
|
|
8157
8290
|
|
|
8158
8291
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
@@ -8193,7 +8326,7 @@ function ScWorkspaceSwitchCard({
|
|
|
8193
8326
|
onSettings,
|
|
8194
8327
|
onLeave
|
|
8195
8328
|
}) {
|
|
8196
|
-
const [internalHover, setInternalHover] =
|
|
8329
|
+
const [internalHover, setInternalHover] = useState14(false);
|
|
8197
8330
|
const isHover = hover !== void 0 ? hover : internalHover;
|
|
8198
8331
|
const isCurrent = type === "currentWS";
|
|
8199
8332
|
const isOther = type === "otherWS";
|
|
@@ -8503,7 +8636,7 @@ var ScTabs = ({
|
|
|
8503
8636
|
};
|
|
8504
8637
|
|
|
8505
8638
|
// src/SC-Counter/ScCounter.tsx
|
|
8506
|
-
import { useState as
|
|
8639
|
+
import { useState as useState15 } from "react";
|
|
8507
8640
|
import { SiconMinus, SiconPlus as SiconPlus2 } from "@streamoid/icons";
|
|
8508
8641
|
|
|
8509
8642
|
// src/SC-Counter/ScCounter.module.css
|
|
@@ -8525,7 +8658,7 @@ var ScCounter = ({
|
|
|
8525
8658
|
className,
|
|
8526
8659
|
style
|
|
8527
8660
|
}) => {
|
|
8528
|
-
const [showInput, setShowInput] =
|
|
8661
|
+
const [showInput, setShowInput] = useState15(false);
|
|
8529
8662
|
const set = (n) => {
|
|
8530
8663
|
let v = n;
|
|
8531
8664
|
if (min !== void 0) v = Math.max(min, v);
|
|
@@ -9620,7 +9753,7 @@ var ScSelectionList = ({
|
|
|
9620
9753
|
};
|
|
9621
9754
|
|
|
9622
9755
|
// src/SC-textArea/ScTextArea.tsx
|
|
9623
|
-
import { useState as
|
|
9756
|
+
import { useState as useState16 } from "react";
|
|
9624
9757
|
|
|
9625
9758
|
// src/SC-textArea/ScTextArea.module.css
|
|
9626
9759
|
var ScTextArea_default = {
|
|
@@ -9650,7 +9783,7 @@ var ScTextArea = ({
|
|
|
9650
9783
|
style,
|
|
9651
9784
|
...props
|
|
9652
9785
|
}) => {
|
|
9653
|
-
const [focused, setFocused] =
|
|
9786
|
+
const [focused, setFocused] = useState16(false);
|
|
9654
9787
|
const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
|
|
9655
9788
|
const stateClass = ScTextArea_default["state-" + derivedState];
|
|
9656
9789
|
const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
|
|
@@ -9692,7 +9825,7 @@ var ScTextArea = ({
|
|
|
9692
9825
|
};
|
|
9693
9826
|
|
|
9694
9827
|
// src/SC-select/ScSelect.tsx
|
|
9695
|
-
import { useState as
|
|
9828
|
+
import { useState as useState17, useRef as useRef6, useEffect as useEffect7 } from "react";
|
|
9696
9829
|
|
|
9697
9830
|
// src/SC-select/ScSelect.module.css
|
|
9698
9831
|
var ScSelect_default = {
|
|
@@ -9729,7 +9862,7 @@ var ScSelect = (props) => {
|
|
|
9729
9862
|
disabled = false,
|
|
9730
9863
|
className
|
|
9731
9864
|
} = props;
|
|
9732
|
-
const [open, setOpen] =
|
|
9865
|
+
const [open, setOpen] = useState17(false);
|
|
9733
9866
|
const rootRef = useRef6(null);
|
|
9734
9867
|
useEffect7(() => {
|
|
9735
9868
|
if (!open) return;
|
|
@@ -9979,7 +10112,7 @@ var ScFileField = (props) => {
|
|
|
9979
10112
|
};
|
|
9980
10113
|
|
|
9981
10114
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
9982
|
-
import { useState as
|
|
10115
|
+
import { useState as useState18, useEffect as useEffect8 } from "react";
|
|
9983
10116
|
|
|
9984
10117
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
9985
10118
|
var ScMediaApproval_default = {
|
|
@@ -10026,8 +10159,8 @@ var ScMediaApproval = (props) => {
|
|
|
10026
10159
|
className
|
|
10027
10160
|
} = props;
|
|
10028
10161
|
const total = mediaUrls.length;
|
|
10029
|
-
const [index, setIndex] =
|
|
10030
|
-
const [mediaLoading, setMediaLoading] =
|
|
10162
|
+
const [index, setIndex] = useState18(activeIndex ?? 0);
|
|
10163
|
+
const [mediaLoading, setMediaLoading] = useState18(false);
|
|
10031
10164
|
useEffect8(() => {
|
|
10032
10165
|
if (typeof activeIndex === "number") {
|
|
10033
10166
|
setIndex(activeIndex);
|
|
@@ -10288,7 +10421,7 @@ var ScMediaSelect = (props) => {
|
|
|
10288
10421
|
};
|
|
10289
10422
|
|
|
10290
10423
|
// src/SC-todoList/ScTodoList.tsx
|
|
10291
|
-
import { useState as
|
|
10424
|
+
import { useState as useState19 } from "react";
|
|
10292
10425
|
|
|
10293
10426
|
// src/SC-todoList/ScTodoList.module.css
|
|
10294
10427
|
var ScTodoList_default = {
|
|
@@ -10321,9 +10454,9 @@ var ScTodoList = ({
|
|
|
10321
10454
|
addPlaceholder = "Add an item",
|
|
10322
10455
|
className
|
|
10323
10456
|
}) => {
|
|
10324
|
-
const [editingId, setEditingId] =
|
|
10325
|
-
const [editValue, setEditValue] =
|
|
10326
|
-
const [newValue, setNewValue] =
|
|
10457
|
+
const [editingId, setEditingId] = useState19(null);
|
|
10458
|
+
const [editValue, setEditValue] = useState19("");
|
|
10459
|
+
const [newValue, setNewValue] = useState19("");
|
|
10327
10460
|
const total = items.length;
|
|
10328
10461
|
const completed = items.filter((i) => i.status === "completed").length;
|
|
10329
10462
|
const startEditing = (item) => {
|
|
@@ -11675,6 +11808,8 @@ export {
|
|
|
11675
11808
|
ProductCollapsedMark,
|
|
11676
11809
|
ProductWordmark,
|
|
11677
11810
|
SIDEBAR_RESIZE_THRESHOLD_PX,
|
|
11811
|
+
STREAMOID_CHANGELOG_URL,
|
|
11812
|
+
STREAMOID_STATUS_PAGE_URL,
|
|
11678
11813
|
ScAccess,
|
|
11679
11814
|
ScAppCard,
|
|
11680
11815
|
ScAppCardForCopilot,
|
|
@@ -11804,8 +11939,10 @@ export {
|
|
|
11804
11939
|
StreamoidWorkspaceSwitcher,
|
|
11805
11940
|
UsageHistoryMobile,
|
|
11806
11941
|
advanceSidebarResizeGesture,
|
|
11942
|
+
createStreamoidAppSwitchUtilities,
|
|
11807
11943
|
formatSubAgentLabel,
|
|
11808
11944
|
hasCollapsedMark,
|
|
11945
|
+
useStreamoidSidebarPopoverPosition,
|
|
11809
11946
|
useStreamoidSidebarPreference,
|
|
11810
11947
|
useStreamoidThemePreference
|
|
11811
11948
|
};
|