@streamoid/ui 0.6.21 → 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.d.mts +47 -3
- package/dist/index.d.ts +47 -3
- package/dist/index.js +294 -170
- package/dist/index.mjs +277 -150
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,6 +26,8 @@ __export(index_exports, {
|
|
|
26
26
|
ProductCollapsedMark: () => ProductCollapsedMark,
|
|
27
27
|
ProductWordmark: () => ProductWordmark,
|
|
28
28
|
SIDEBAR_RESIZE_THRESHOLD_PX: () => SIDEBAR_RESIZE_THRESHOLD_PX,
|
|
29
|
+
STREAMOID_CHANGELOG_URL: () => STREAMOID_CHANGELOG_URL,
|
|
30
|
+
STREAMOID_STATUS_PAGE_URL: () => STREAMOID_STATUS_PAGE_URL,
|
|
29
31
|
ScAccess: () => ScAccess,
|
|
30
32
|
ScAppCard: () => ScAppCard,
|
|
31
33
|
ScAppCardForCopilot: () => ScAppCardForCopilot,
|
|
@@ -155,8 +157,10 @@ __export(index_exports, {
|
|
|
155
157
|
StreamoidWorkspaceSwitcher: () => StreamoidWorkspaceSwitcher,
|
|
156
158
|
UsageHistoryMobile: () => UsageHistoryMobile,
|
|
157
159
|
advanceSidebarResizeGesture: () => advanceSidebarResizeGesture,
|
|
160
|
+
createStreamoidAppSwitchUtilities: () => createStreamoidAppSwitchUtilities,
|
|
158
161
|
formatSubAgentLabel: () => formatSubAgentLabel,
|
|
159
162
|
hasCollapsedMark: () => hasCollapsedMark,
|
|
163
|
+
useStreamoidSidebarPopoverPosition: () => useStreamoidSidebarPopoverPosition,
|
|
160
164
|
useStreamoidSidebarPreference: () => useStreamoidSidebarPreference,
|
|
161
165
|
useStreamoidThemePreference: () => useStreamoidThemePreference
|
|
162
166
|
});
|
|
@@ -379,6 +383,43 @@ function ScStreamoidMascot({
|
|
|
379
383
|
|
|
380
384
|
// src/SC-AppSwitch/ScAppSwitchPanel.tsx
|
|
381
385
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
386
|
+
var STREAMOID_CHANGELOG_URL = "https://doc.clickup.com/3414296/p/h/3868r-26044/13a22b6f796b2c8";
|
|
387
|
+
var STREAMOID_STATUS_PAGE_URL = "https://status.streamoid.com/";
|
|
388
|
+
function openExternal(url) {
|
|
389
|
+
if (typeof window !== "undefined") {
|
|
390
|
+
window.open(url, "_blank", "noopener,noreferrer");
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
function createStreamoidAppSwitchUtilities(utilities) {
|
|
394
|
+
const before = (action) => () => {
|
|
395
|
+
utilities.onClose?.();
|
|
396
|
+
action();
|
|
397
|
+
};
|
|
398
|
+
return [
|
|
399
|
+
{
|
|
400
|
+
key: "changelog",
|
|
401
|
+
label: "Changelog",
|
|
402
|
+
trailingText: utilities.appVersion,
|
|
403
|
+
external: true,
|
|
404
|
+
onSelect: before(
|
|
405
|
+
() => openExternal(utilities.changelogUrl ?? STREAMOID_CHANGELOG_URL)
|
|
406
|
+
)
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
key: "status",
|
|
410
|
+
label: "Status Page",
|
|
411
|
+
external: true,
|
|
412
|
+
onSelect: before(
|
|
413
|
+
() => openExternal(utilities.statusPageUrl ?? STREAMOID_STATUS_PAGE_URL)
|
|
414
|
+
)
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
key: "support",
|
|
418
|
+
label: "Help and Support",
|
|
419
|
+
onSelect: before(utilities.onHelpAndSupport)
|
|
420
|
+
}
|
|
421
|
+
];
|
|
422
|
+
}
|
|
382
423
|
var T = {
|
|
383
424
|
primary: "var(--alias-text---icons-primary, #f5f5f5)",
|
|
384
425
|
secondary: "var(--alias-text---icons-secondary, #dadada)",
|
|
@@ -597,12 +638,14 @@ var ScAppSwitchSystemRow = ({ item }) => {
|
|
|
597
638
|
};
|
|
598
639
|
var ScAppSwitchPanel = ({
|
|
599
640
|
apps,
|
|
600
|
-
systemItems
|
|
641
|
+
systemItems,
|
|
642
|
+
utilities,
|
|
601
643
|
systemLabel,
|
|
602
644
|
className,
|
|
603
645
|
style
|
|
604
646
|
}) => {
|
|
605
647
|
const ordered = [...apps].sort((a, b) => orderIndex(a) - orderIndex(b));
|
|
648
|
+
const resolvedSystemItems = systemItems ?? (utilities ? createStreamoidAppSwitchUtilities(utilities) : []);
|
|
606
649
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
607
650
|
"div",
|
|
608
651
|
{
|
|
@@ -617,7 +660,7 @@ var ScAppSwitchPanel = ({
|
|
|
617
660
|
},
|
|
618
661
|
children: [
|
|
619
662
|
ordered.map((app) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ScAppSwitchRow, { item: app }, app.key)),
|
|
620
|
-
|
|
663
|
+
resolvedSystemItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
621
664
|
"div",
|
|
622
665
|
{
|
|
623
666
|
style: {
|
|
@@ -642,7 +685,7 @@ var ScAppSwitchPanel = ({
|
|
|
642
685
|
children: systemLabel
|
|
643
686
|
}
|
|
644
687
|
) : null,
|
|
645
|
-
|
|
688
|
+
resolvedSystemItems.map((item) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ScAppSwitchSystemRow, { item }, item.key))
|
|
646
689
|
]
|
|
647
690
|
}
|
|
648
691
|
) : null
|
|
@@ -4348,6 +4391,7 @@ function StreamoidSidebar({
|
|
|
4348
4391
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4349
4392
|
"div",
|
|
4350
4393
|
{
|
|
4394
|
+
"data-streamoid-sidebar-card": true,
|
|
4351
4395
|
className: "flex flex-col h-full relative shrink-0",
|
|
4352
4396
|
style: {
|
|
4353
4397
|
backgroundColor: "var(--alias-surface-base)",
|
|
@@ -4730,6 +4774,7 @@ function StreamoidSidebar({
|
|
|
4730
4774
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
4731
4775
|
"div",
|
|
4732
4776
|
{
|
|
4777
|
+
"data-streamoid-sidebar-card": true,
|
|
4733
4778
|
className: "flex flex-col h-full items-center justify-center relative shrink-0",
|
|
4734
4779
|
style: {
|
|
4735
4780
|
backgroundColor: "var(--alias-surface-base)",
|
|
@@ -5485,8 +5530,73 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
5485
5530
|
return { expanded, setExpanded, toggle };
|
|
5486
5531
|
}
|
|
5487
5532
|
|
|
5488
|
-
// src/SC-
|
|
5533
|
+
// src/SC-SidebarShell/useStreamoidSidebarPopoverPosition.ts
|
|
5489
5534
|
var import_react14 = require("react");
|
|
5535
|
+
var VIEWPORT_INSET = 16;
|
|
5536
|
+
function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
5537
|
+
placement,
|
|
5538
|
+
width,
|
|
5539
|
+
gap = 8,
|
|
5540
|
+
inset = 24
|
|
5541
|
+
}) {
|
|
5542
|
+
const [position, setPosition] = (0, import_react14.useState)({
|
|
5543
|
+
position: "fixed",
|
|
5544
|
+
left: 0,
|
|
5545
|
+
top: 0,
|
|
5546
|
+
width,
|
|
5547
|
+
maxWidth: `calc(100vw - ${VIEWPORT_INSET * 2}px)`,
|
|
5548
|
+
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
5549
|
+
visibility: "hidden"
|
|
5550
|
+
});
|
|
5551
|
+
(0, import_react14.useLayoutEffect)(() => {
|
|
5552
|
+
const sidebar = sidebarRef.current;
|
|
5553
|
+
if (!sidebar || typeof window === "undefined") return;
|
|
5554
|
+
const card = (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
|
|
5555
|
+
"[data-streamoid-sidebar-card]"
|
|
5556
|
+
)) ?? sidebar;
|
|
5557
|
+
const measure = () => {
|
|
5558
|
+
const bounds = card.getBoundingClientRect();
|
|
5559
|
+
const availableWidth = Math.max(0, window.innerWidth - VIEWPORT_INSET * 2);
|
|
5560
|
+
const panelWidth = Math.min(width, availableWidth);
|
|
5561
|
+
const preferredLeft = bounds.right + gap;
|
|
5562
|
+
const maximumLeft = Math.max(
|
|
5563
|
+
VIEWPORT_INSET,
|
|
5564
|
+
window.innerWidth - panelWidth - VIEWPORT_INSET
|
|
5565
|
+
);
|
|
5566
|
+
const left = Math.max(
|
|
5567
|
+
VIEWPORT_INSET,
|
|
5568
|
+
Math.min(preferredLeft, maximumLeft)
|
|
5569
|
+
);
|
|
5570
|
+
const vertical = placement === "top-right" ? { top: Math.max(VIEWPORT_INSET, bounds.top + inset) } : {
|
|
5571
|
+
bottom: Math.max(
|
|
5572
|
+
VIEWPORT_INSET,
|
|
5573
|
+
window.innerHeight - bounds.bottom + inset
|
|
5574
|
+
)
|
|
5575
|
+
};
|
|
5576
|
+
setPosition({
|
|
5577
|
+
position: "fixed",
|
|
5578
|
+
left,
|
|
5579
|
+
width: panelWidth,
|
|
5580
|
+
maxWidth: `calc(100vw - ${VIEWPORT_INSET * 2}px)`,
|
|
5581
|
+
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
5582
|
+
visibility: "visible",
|
|
5583
|
+
...vertical
|
|
5584
|
+
});
|
|
5585
|
+
};
|
|
5586
|
+
measure();
|
|
5587
|
+
window.addEventListener("resize", measure);
|
|
5588
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
5589
|
+
observer?.observe(card);
|
|
5590
|
+
return () => {
|
|
5591
|
+
window.removeEventListener("resize", measure);
|
|
5592
|
+
observer?.disconnect();
|
|
5593
|
+
};
|
|
5594
|
+
}, [gap, inset, placement, sidebarRef, width]);
|
|
5595
|
+
return position;
|
|
5596
|
+
}
|
|
5597
|
+
|
|
5598
|
+
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
|
|
5599
|
+
var import_react15 = require("react");
|
|
5490
5600
|
|
|
5491
5601
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
|
|
5492
5602
|
var ScArtifaxSidebar_default = {
|
|
@@ -5593,7 +5703,7 @@ var ScArtifaxSidebar = ({
|
|
|
5593
5703
|
}
|
|
5594
5704
|
};
|
|
5595
5705
|
const isControlled = !!openSections;
|
|
5596
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
5706
|
+
const [internalOpen, setInternalOpen] = (0, import_react15.useState)(
|
|
5597
5707
|
() => {
|
|
5598
5708
|
const init = {};
|
|
5599
5709
|
sections.forEach((s) => {
|
|
@@ -5603,7 +5713,7 @@ var ScArtifaxSidebar = ({
|
|
|
5603
5713
|
}
|
|
5604
5714
|
);
|
|
5605
5715
|
const isSectionOpen = (id) => isControlled ? !!openSections?.[id] : !!internalOpen[id];
|
|
5606
|
-
const handleSectionToggle = (0,
|
|
5716
|
+
const handleSectionToggle = (0, import_react15.useCallback)(
|
|
5607
5717
|
(id) => {
|
|
5608
5718
|
const next = !isSectionOpen(id);
|
|
5609
5719
|
if (isControlled) {
|
|
@@ -5645,81 +5755,88 @@ var ScArtifaxSidebar = ({
|
|
|
5645
5755
|
onExpandedChange: changeExpanded
|
|
5646
5756
|
}
|
|
5647
5757
|
) : null,
|
|
5648
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
showHeader
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
{
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
className: ScArtifaxSidebar_default.
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5758
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5759
|
+
"div",
|
|
5760
|
+
{
|
|
5761
|
+
"data-streamoid-sidebar-card": true,
|
|
5762
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.expanded,
|
|
5763
|
+
children: [
|
|
5764
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayExpanded }),
|
|
5765
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.body, children: [
|
|
5766
|
+
expandedLogo ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.logoUnitExpanded, children: expandedLogo }) : null,
|
|
5767
|
+
sections.map((section, idx) => {
|
|
5768
|
+
const open = section.label ? section.collapsible !== false ? isSectionOpen(section.id) : true : true;
|
|
5769
|
+
const showHeader = !!section.label;
|
|
5770
|
+
const canToggle = showHeader && section.collapsible !== false;
|
|
5771
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
|
|
5772
|
+
idx > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}) : null,
|
|
5773
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.sectionContainer, children: [
|
|
5774
|
+
showHeader ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5775
|
+
SectionHeader2,
|
|
5776
|
+
{
|
|
5777
|
+
label: section.label,
|
|
5778
|
+
open,
|
|
5779
|
+
onToggle: canToggle ? () => handleSectionToggle(section.id) : void 0
|
|
5780
|
+
}
|
|
5781
|
+
) : null,
|
|
5782
|
+
open ? section.items.map(
|
|
5783
|
+
(item) => renderMenuItem2(item, section.id)
|
|
5784
|
+
) : null
|
|
5785
|
+
] })
|
|
5786
|
+
] }, section.id);
|
|
5787
|
+
})
|
|
5788
|
+
] }),
|
|
5789
|
+
creditWarning ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5790
|
+
CreditWarningBanner,
|
|
5791
|
+
{
|
|
5792
|
+
availableCredits: creditWarning.availableCredits,
|
|
5793
|
+
remainingPct: creditWarning.remainingPct,
|
|
5794
|
+
level: creditWarning.level ?? "danger",
|
|
5795
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5796
|
+
expanded: true
|
|
5797
|
+
}
|
|
5798
|
+
) }) : null,
|
|
5799
|
+
assistantCta ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScAskAgentSlot, { cta: assistantCta }) : null,
|
|
5800
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}),
|
|
5801
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.profileRow, children: [
|
|
5802
|
+
appIdentity ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5803
|
+
"button",
|
|
5804
|
+
{
|
|
5805
|
+
type: "button",
|
|
5806
|
+
className: ScArtifaxSidebar_default.appIdentityMain,
|
|
5807
|
+
onClick: appIdentity.onClick,
|
|
5808
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5809
|
+
children: appIdentity.content
|
|
5810
|
+
}
|
|
5811
|
+
) : profile ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5812
|
+
"button",
|
|
5813
|
+
{
|
|
5814
|
+
type: "button",
|
|
5815
|
+
className: ScArtifaxSidebar_default.profileMain,
|
|
5816
|
+
onClick: profile.onClick,
|
|
5817
|
+
children: [
|
|
5818
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar }),
|
|
5819
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.profileInfo, children: [
|
|
5820
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ScArtifaxSidebar_default.profileName, children: profile.name }),
|
|
5821
|
+
profile.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ScArtifaxSidebar_default.profileSubtitle, children: profile.subtitle }) : null
|
|
5822
|
+
] })
|
|
5823
|
+
]
|
|
5824
|
+
}
|
|
5825
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ScArtifaxSidebar_default.profileMain, "aria-hidden": "true" }),
|
|
5826
|
+
!hideToggle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5827
|
+
"button",
|
|
5828
|
+
{
|
|
5829
|
+
type: "button",
|
|
5830
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5831
|
+
onClick: onToggle,
|
|
5832
|
+
"aria-label": "Collapse sidebar",
|
|
5833
|
+
children: resolveToggleIcon2(toggleIcon, true)
|
|
5834
|
+
}
|
|
5835
|
+
) : null
|
|
5836
|
+
] })
|
|
5837
|
+
]
|
|
5838
|
+
}
|
|
5839
|
+
)
|
|
5723
5840
|
]
|
|
5724
5841
|
}
|
|
5725
5842
|
);
|
|
@@ -5737,66 +5854,73 @@ var ScArtifaxSidebar = ({
|
|
|
5737
5854
|
onExpandedChange: changeExpanded
|
|
5738
5855
|
}
|
|
5739
5856
|
) : null,
|
|
5740
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", {
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
{
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5857
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5858
|
+
"div",
|
|
5859
|
+
{
|
|
5860
|
+
"data-streamoid-sidebar-card": true,
|
|
5861
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.collapsed,
|
|
5862
|
+
children: [
|
|
5863
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayCollapsed }),
|
|
5864
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.body + " " + ScArtifaxSidebar_default.bodyCollapsed, children: [
|
|
5865
|
+
collapsedLogo ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.logoUnitCollapsed, children: collapsedLogo }) : null,
|
|
5866
|
+
sections.map((section, idx) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
|
|
5867
|
+
idx > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}) : null,
|
|
5868
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.sectionContainerCollapsed, children: section.items.map((item) => renderMenuItem2(item, section.id)) })
|
|
5869
|
+
] }, section.id))
|
|
5870
|
+
] }),
|
|
5871
|
+
creditWarning ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5872
|
+
CreditWarningBanner,
|
|
5873
|
+
{
|
|
5874
|
+
availableCredits: creditWarning.availableCredits,
|
|
5875
|
+
remainingPct: creditWarning.remainingPct,
|
|
5876
|
+
level: creditWarning.level ?? "danger",
|
|
5877
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5878
|
+
expanded: false
|
|
5879
|
+
}
|
|
5880
|
+
) }) : null,
|
|
5881
|
+
assistantCta ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScAskAgentSlot, { cta: assistantCta, collapsed: true }) : null,
|
|
5882
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}),
|
|
5883
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.footerCollapsed, children: [
|
|
5884
|
+
appIdentity ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5885
|
+
"button",
|
|
5886
|
+
{
|
|
5887
|
+
type: "button",
|
|
5888
|
+
className: ScArtifaxSidebar_default.appIdentityCollapsed,
|
|
5889
|
+
onClick: appIdentity.onClick,
|
|
5890
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5891
|
+
children: appIdentity.content
|
|
5892
|
+
}
|
|
5893
|
+
) : profile ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5894
|
+
"button",
|
|
5895
|
+
{
|
|
5896
|
+
type: "button",
|
|
5897
|
+
className: ScArtifaxSidebar_default.profileRowCollapsed,
|
|
5898
|
+
onClick: profile.onClick,
|
|
5899
|
+
"aria-label": profile.name,
|
|
5900
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar })
|
|
5901
|
+
}
|
|
5902
|
+
) : null,
|
|
5903
|
+
!hideToggle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5904
|
+
"button",
|
|
5905
|
+
{
|
|
5906
|
+
type: "button",
|
|
5907
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5908
|
+
onClick: onToggle,
|
|
5909
|
+
"aria-label": "Expand sidebar",
|
|
5910
|
+
children: resolveToggleIcon2(toggleIcon, false)
|
|
5911
|
+
}
|
|
5912
|
+
) : null
|
|
5913
|
+
] })
|
|
5914
|
+
]
|
|
5915
|
+
}
|
|
5916
|
+
)
|
|
5793
5917
|
]
|
|
5794
5918
|
}
|
|
5795
5919
|
);
|
|
5796
5920
|
};
|
|
5797
5921
|
|
|
5798
5922
|
// src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
|
|
5799
|
-
var
|
|
5923
|
+
var import_react16 = require("react");
|
|
5800
5924
|
|
|
5801
5925
|
// src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
|
|
5802
5926
|
var ScSidebarSwitchMenu_default = {
|
|
@@ -6438,7 +6562,7 @@ var ScCatalogixSidebar = ({
|
|
|
6438
6562
|
className,
|
|
6439
6563
|
style
|
|
6440
6564
|
}) => {
|
|
6441
|
-
const [appListOpen, setAppListOpen] = (0,
|
|
6565
|
+
const [appListOpen, setAppListOpen] = (0, import_react16.useState)(false);
|
|
6442
6566
|
const handleSwitch = () => {
|
|
6443
6567
|
setAppListOpen((prev) => !prev);
|
|
6444
6568
|
onLogoClick?.();
|
|
@@ -6681,7 +6805,7 @@ var ScSlider = ({
|
|
|
6681
6805
|
};
|
|
6682
6806
|
|
|
6683
6807
|
// src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
|
|
6684
|
-
var
|
|
6808
|
+
var import_react17 = require("react");
|
|
6685
6809
|
var import_icons42 = require("@streamoid/icons");
|
|
6686
6810
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
6687
6811
|
var PRIMARY_ICON = "var(--alias-text---icons-primary)";
|
|
@@ -6872,12 +6996,12 @@ function StreamoidWorkspaceSwitcher({
|
|
|
6872
6996
|
onSwitchWorkspace,
|
|
6873
6997
|
config
|
|
6874
6998
|
}) {
|
|
6875
|
-
const modalRef = (0,
|
|
6999
|
+
const modalRef = (0, import_react17.useRef)(null);
|
|
6876
7000
|
const title = config?.title || "Switch workspace";
|
|
6877
7001
|
const loadingText = config?.loadingText || "Loading workspaces\u2026";
|
|
6878
7002
|
const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
|
|
6879
7003
|
const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
|
|
6880
|
-
(0,
|
|
7004
|
+
(0, import_react17.useEffect)(() => {
|
|
6881
7005
|
if (!open) return;
|
|
6882
7006
|
function handleKeyDown(e) {
|
|
6883
7007
|
if (e.key === "Escape") onClose();
|
|
@@ -8288,7 +8412,7 @@ var ScWorkspaceCard = ({
|
|
|
8288
8412
|
};
|
|
8289
8413
|
|
|
8290
8414
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
8291
|
-
var
|
|
8415
|
+
var import_react18 = require("react");
|
|
8292
8416
|
var import_icons62 = require("@streamoid/icons");
|
|
8293
8417
|
|
|
8294
8418
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
@@ -8329,7 +8453,7 @@ function ScWorkspaceSwitchCard({
|
|
|
8329
8453
|
onSettings,
|
|
8330
8454
|
onLeave
|
|
8331
8455
|
}) {
|
|
8332
|
-
const [internalHover, setInternalHover] = (0,
|
|
8456
|
+
const [internalHover, setInternalHover] = (0, import_react18.useState)(false);
|
|
8333
8457
|
const isHover = hover !== void 0 ? hover : internalHover;
|
|
8334
8458
|
const isCurrent = type === "currentWS";
|
|
8335
8459
|
const isOther = type === "otherWS";
|
|
@@ -8457,7 +8581,7 @@ function ScWorkspaceSwitchCard({
|
|
|
8457
8581
|
var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
|
|
8458
8582
|
|
|
8459
8583
|
// src/SC-Modal/ScModal.tsx
|
|
8460
|
-
var
|
|
8584
|
+
var import_react19 = require("react");
|
|
8461
8585
|
var import_react_dom = require("react-dom");
|
|
8462
8586
|
|
|
8463
8587
|
// src/SC-Modal/ScModal.module.css
|
|
@@ -8479,7 +8603,7 @@ var ScModal = ({
|
|
|
8479
8603
|
closeOnBackdrop = true,
|
|
8480
8604
|
closeOnEsc = true
|
|
8481
8605
|
}) => {
|
|
8482
|
-
(0,
|
|
8606
|
+
(0, import_react19.useEffect)(() => {
|
|
8483
8607
|
if (!open || !closeOnEsc) return;
|
|
8484
8608
|
const onKey = (e) => {
|
|
8485
8609
|
if (e.key === "Escape") onClose?.();
|
|
@@ -8512,7 +8636,7 @@ var ScModal = ({
|
|
|
8512
8636
|
};
|
|
8513
8637
|
|
|
8514
8638
|
// src/SC-Drawer/ScDrawer.tsx
|
|
8515
|
-
var
|
|
8639
|
+
var import_react20 = require("react");
|
|
8516
8640
|
var import_react_dom2 = require("react-dom");
|
|
8517
8641
|
|
|
8518
8642
|
// src/SC-Drawer/ScDrawer.module.css
|
|
@@ -8540,8 +8664,8 @@ var ScDrawer = ({
|
|
|
8540
8664
|
backdrop = false,
|
|
8541
8665
|
zIndex
|
|
8542
8666
|
}) => {
|
|
8543
|
-
const panelRef = (0,
|
|
8544
|
-
(0,
|
|
8667
|
+
const panelRef = (0, import_react20.useRef)(null);
|
|
8668
|
+
(0, import_react20.useEffect)(() => {
|
|
8545
8669
|
if (!open) return;
|
|
8546
8670
|
const onKey = (e) => {
|
|
8547
8671
|
if (closeOnEsc && e.key === "Escape") onClose?.();
|
|
@@ -8639,7 +8763,7 @@ var ScTabs = ({
|
|
|
8639
8763
|
};
|
|
8640
8764
|
|
|
8641
8765
|
// src/SC-Counter/ScCounter.tsx
|
|
8642
|
-
var
|
|
8766
|
+
var import_react21 = require("react");
|
|
8643
8767
|
var import_icons63 = require("@streamoid/icons");
|
|
8644
8768
|
|
|
8645
8769
|
// src/SC-Counter/ScCounter.module.css
|
|
@@ -8661,7 +8785,7 @@ var ScCounter = ({
|
|
|
8661
8785
|
className,
|
|
8662
8786
|
style
|
|
8663
8787
|
}) => {
|
|
8664
|
-
const [showInput, setShowInput] = (0,
|
|
8788
|
+
const [showInput, setShowInput] = (0, import_react21.useState)(false);
|
|
8665
8789
|
const set = (n) => {
|
|
8666
8790
|
let v = n;
|
|
8667
8791
|
if (min !== void 0) v = Math.max(min, v);
|
|
@@ -9750,7 +9874,7 @@ var ScSelectionList = ({
|
|
|
9750
9874
|
};
|
|
9751
9875
|
|
|
9752
9876
|
// src/SC-textArea/ScTextArea.tsx
|
|
9753
|
-
var
|
|
9877
|
+
var import_react22 = require("react");
|
|
9754
9878
|
|
|
9755
9879
|
// src/SC-textArea/ScTextArea.module.css
|
|
9756
9880
|
var ScTextArea_default = {
|
|
@@ -9780,7 +9904,7 @@ var ScTextArea = ({
|
|
|
9780
9904
|
style,
|
|
9781
9905
|
...props
|
|
9782
9906
|
}) => {
|
|
9783
|
-
const [focused, setFocused] = (0,
|
|
9907
|
+
const [focused, setFocused] = (0, import_react22.useState)(false);
|
|
9784
9908
|
const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
|
|
9785
9909
|
const stateClass = ScTextArea_default["state-" + derivedState];
|
|
9786
9910
|
const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
|
|
@@ -9822,7 +9946,7 @@ var ScTextArea = ({
|
|
|
9822
9946
|
};
|
|
9823
9947
|
|
|
9824
9948
|
// src/SC-select/ScSelect.tsx
|
|
9825
|
-
var
|
|
9949
|
+
var import_react23 = require("react");
|
|
9826
9950
|
|
|
9827
9951
|
// src/SC-select/ScSelect.module.css
|
|
9828
9952
|
var ScSelect_default = {
|
|
@@ -9859,9 +9983,9 @@ var ScSelect = (props) => {
|
|
|
9859
9983
|
disabled = false,
|
|
9860
9984
|
className
|
|
9861
9985
|
} = props;
|
|
9862
|
-
const [open, setOpen] = (0,
|
|
9863
|
-
const rootRef = (0,
|
|
9864
|
-
(0,
|
|
9986
|
+
const [open, setOpen] = (0, import_react23.useState)(false);
|
|
9987
|
+
const rootRef = (0, import_react23.useRef)(null);
|
|
9988
|
+
(0, import_react23.useEffect)(() => {
|
|
9865
9989
|
if (!open) return;
|
|
9866
9990
|
const handleClick = (e) => {
|
|
9867
9991
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -9952,7 +10076,7 @@ var ScSelect = (props) => {
|
|
|
9952
10076
|
};
|
|
9953
10077
|
|
|
9954
10078
|
// src/SC-fileField/ScFileField.tsx
|
|
9955
|
-
var
|
|
10079
|
+
var import_react24 = require("react");
|
|
9956
10080
|
|
|
9957
10081
|
// src/SC-fileField/ScFileField.module.css
|
|
9958
10082
|
var ScFileField_default = {
|
|
@@ -9990,7 +10114,7 @@ var ScFileField = (props) => {
|
|
|
9990
10114
|
label,
|
|
9991
10115
|
className
|
|
9992
10116
|
} = props;
|
|
9993
|
-
const inputRef = (0,
|
|
10117
|
+
const inputRef = (0, import_react24.useRef)(null);
|
|
9994
10118
|
const hasFile = Boolean(fileName);
|
|
9995
10119
|
const isUploading = Boolean(uploading);
|
|
9996
10120
|
const clampedProgress = Math.max(0, Math.min(100, progress));
|
|
@@ -10109,7 +10233,7 @@ var ScFileField = (props) => {
|
|
|
10109
10233
|
};
|
|
10110
10234
|
|
|
10111
10235
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
10112
|
-
var
|
|
10236
|
+
var import_react25 = require("react");
|
|
10113
10237
|
|
|
10114
10238
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
10115
10239
|
var ScMediaApproval_default = {
|
|
@@ -10156,9 +10280,9 @@ var ScMediaApproval = (props) => {
|
|
|
10156
10280
|
className
|
|
10157
10281
|
} = props;
|
|
10158
10282
|
const total = mediaUrls.length;
|
|
10159
|
-
const [index, setIndex] = (0,
|
|
10160
|
-
const [mediaLoading, setMediaLoading] = (0,
|
|
10161
|
-
(0,
|
|
10283
|
+
const [index, setIndex] = (0, import_react25.useState)(activeIndex ?? 0);
|
|
10284
|
+
const [mediaLoading, setMediaLoading] = (0, import_react25.useState)(false);
|
|
10285
|
+
(0, import_react25.useEffect)(() => {
|
|
10162
10286
|
if (typeof activeIndex === "number") {
|
|
10163
10287
|
setIndex(activeIndex);
|
|
10164
10288
|
}
|
|
@@ -10293,7 +10417,7 @@ var ScMediaApproval = (props) => {
|
|
|
10293
10417
|
};
|
|
10294
10418
|
|
|
10295
10419
|
// src/SC-mediaSelect/ScMediaSelect.tsx
|
|
10296
|
-
var
|
|
10420
|
+
var import_react26 = require("react");
|
|
10297
10421
|
|
|
10298
10422
|
// src/SC-mediaSelect/ScMediaSelect.module.css
|
|
10299
10423
|
var ScMediaSelect_default = {
|
|
@@ -10349,7 +10473,7 @@ var ScMediaSelect = (props) => {
|
|
|
10349
10473
|
} = props;
|
|
10350
10474
|
const total = items.length;
|
|
10351
10475
|
const resolvedMax = typeof max === "number" ? max : total;
|
|
10352
|
-
const selectedSet = (0,
|
|
10476
|
+
const selectedSet = (0, import_react26.useMemo)(() => new Set(selected), [selected]);
|
|
10353
10477
|
const selectedCount = selectedSet.size;
|
|
10354
10478
|
let countLabel = selectedCount + " of " + total + " selected";
|
|
10355
10479
|
if (min > 0) countLabel += " (min " + min + ")";
|
|
@@ -10418,7 +10542,7 @@ var ScMediaSelect = (props) => {
|
|
|
10418
10542
|
};
|
|
10419
10543
|
|
|
10420
10544
|
// src/SC-todoList/ScTodoList.tsx
|
|
10421
|
-
var
|
|
10545
|
+
var import_react27 = require("react");
|
|
10422
10546
|
|
|
10423
10547
|
// src/SC-todoList/ScTodoList.module.css
|
|
10424
10548
|
var ScTodoList_default = {
|
|
@@ -10451,9 +10575,9 @@ var ScTodoList = ({
|
|
|
10451
10575
|
addPlaceholder = "Add an item",
|
|
10452
10576
|
className
|
|
10453
10577
|
}) => {
|
|
10454
|
-
const [editingId, setEditingId] = (0,
|
|
10455
|
-
const [editValue, setEditValue] = (0,
|
|
10456
|
-
const [newValue, setNewValue] = (0,
|
|
10578
|
+
const [editingId, setEditingId] = (0, import_react27.useState)(null);
|
|
10579
|
+
const [editValue, setEditValue] = (0, import_react27.useState)("");
|
|
10580
|
+
const [newValue, setNewValue] = (0, import_react27.useState)("");
|
|
10457
10581
|
const total = items.length;
|
|
10458
10582
|
const completed = items.filter((i) => i.status === "completed").length;
|
|
10459
10583
|
const startEditing = (item) => {
|
|
@@ -11307,7 +11431,7 @@ var ScWorkspaceSwitchMobileV2 = ({
|
|
|
11307
11431
|
};
|
|
11308
11432
|
|
|
11309
11433
|
// src/SC-imageField/ScImageField.tsx
|
|
11310
|
-
var
|
|
11434
|
+
var import_react28 = require("react");
|
|
11311
11435
|
|
|
11312
11436
|
// src/SC-imageField/ScImageField.module.css
|
|
11313
11437
|
var ScImageField_default = {
|
|
@@ -11334,7 +11458,7 @@ var ScImageField = ({
|
|
|
11334
11458
|
onRemove,
|
|
11335
11459
|
className
|
|
11336
11460
|
}) => {
|
|
11337
|
-
const inputRef = (0,
|
|
11461
|
+
const inputRef = (0, import_react28.useRef)(null);
|
|
11338
11462
|
const hasImage = !!imagePreview;
|
|
11339
11463
|
function handleClick() {
|
|
11340
11464
|
if (!hasImage) {
|
|
@@ -11570,7 +11694,7 @@ var ScPlanDetailsCardMobile = ({
|
|
|
11570
11694
|
};
|
|
11571
11695
|
|
|
11572
11696
|
// src/SC-ProfilePopup/ScProfilePopup.tsx
|
|
11573
|
-
var
|
|
11697
|
+
var import_react29 = require("react");
|
|
11574
11698
|
|
|
11575
11699
|
// src/SC-ProfilePopup/ScProfilePopup.module.css
|
|
11576
11700
|
var ScProfilePopup_default = {
|
|
@@ -11604,7 +11728,7 @@ var activateOnKey = (handler) => (event) => {
|
|
|
11604
11728
|
handler();
|
|
11605
11729
|
}
|
|
11606
11730
|
};
|
|
11607
|
-
var ScProfilePopup = (0,
|
|
11731
|
+
var ScProfilePopup = (0, import_react29.forwardRef)(
|
|
11608
11732
|
({
|
|
11609
11733
|
name = "Chris Hemsworth",
|
|
11610
11734
|
email = "chris@kepler.com",
|