@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.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,83 @@ 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 findCard = () => (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
|
|
5555
|
+
"[data-streamoid-sidebar-card]"
|
|
5556
|
+
)) ?? sidebar;
|
|
5557
|
+
let observedCard = null;
|
|
5558
|
+
let resizeObserver = null;
|
|
5559
|
+
const measure = () => {
|
|
5560
|
+
const card = findCard();
|
|
5561
|
+
if (resizeObserver && observedCard !== card) {
|
|
5562
|
+
if (observedCard) resizeObserver.unobserve(observedCard);
|
|
5563
|
+
resizeObserver.observe(card);
|
|
5564
|
+
observedCard = card;
|
|
5565
|
+
}
|
|
5566
|
+
const bounds = card.getBoundingClientRect();
|
|
5567
|
+
const availableWidth = Math.max(0, window.innerWidth - VIEWPORT_INSET * 2);
|
|
5568
|
+
const panelWidth = Math.min(width, availableWidth);
|
|
5569
|
+
const preferredLeft = bounds.right + gap;
|
|
5570
|
+
const maximumLeft = Math.max(
|
|
5571
|
+
VIEWPORT_INSET,
|
|
5572
|
+
window.innerWidth - panelWidth - VIEWPORT_INSET
|
|
5573
|
+
);
|
|
5574
|
+
const left = Math.max(
|
|
5575
|
+
VIEWPORT_INSET,
|
|
5576
|
+
Math.min(preferredLeft, maximumLeft)
|
|
5577
|
+
);
|
|
5578
|
+
const vertical = placement === "top-right" ? { top: Math.max(VIEWPORT_INSET, bounds.top + inset) } : {
|
|
5579
|
+
bottom: Math.max(
|
|
5580
|
+
VIEWPORT_INSET,
|
|
5581
|
+
window.innerHeight - bounds.bottom + inset
|
|
5582
|
+
)
|
|
5583
|
+
};
|
|
5584
|
+
setPosition({
|
|
5585
|
+
position: "fixed",
|
|
5586
|
+
left,
|
|
5587
|
+
width: panelWidth,
|
|
5588
|
+
maxWidth: `calc(100vw - ${VIEWPORT_INSET * 2}px)`,
|
|
5589
|
+
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
5590
|
+
visibility: "visible",
|
|
5591
|
+
...vertical
|
|
5592
|
+
});
|
|
5593
|
+
};
|
|
5594
|
+
resizeObserver = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(measure);
|
|
5595
|
+
measure();
|
|
5596
|
+
window.addEventListener("resize", measure);
|
|
5597
|
+
const mutationObserver = typeof MutationObserver === "undefined" ? null : new MutationObserver(measure);
|
|
5598
|
+
mutationObserver?.observe(sidebar, { childList: true, subtree: true });
|
|
5599
|
+
return () => {
|
|
5600
|
+
window.removeEventListener("resize", measure);
|
|
5601
|
+
resizeObserver?.disconnect();
|
|
5602
|
+
mutationObserver?.disconnect();
|
|
5603
|
+
};
|
|
5604
|
+
}, [gap, inset, placement, sidebarRef, width]);
|
|
5605
|
+
return position;
|
|
5606
|
+
}
|
|
5607
|
+
|
|
5608
|
+
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
|
|
5609
|
+
var import_react15 = require("react");
|
|
5490
5610
|
|
|
5491
5611
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
|
|
5492
5612
|
var ScArtifaxSidebar_default = {
|
|
@@ -5593,7 +5713,7 @@ var ScArtifaxSidebar = ({
|
|
|
5593
5713
|
}
|
|
5594
5714
|
};
|
|
5595
5715
|
const isControlled = !!openSections;
|
|
5596
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
5716
|
+
const [internalOpen, setInternalOpen] = (0, import_react15.useState)(
|
|
5597
5717
|
() => {
|
|
5598
5718
|
const init = {};
|
|
5599
5719
|
sections.forEach((s) => {
|
|
@@ -5603,7 +5723,7 @@ var ScArtifaxSidebar = ({
|
|
|
5603
5723
|
}
|
|
5604
5724
|
);
|
|
5605
5725
|
const isSectionOpen = (id) => isControlled ? !!openSections?.[id] : !!internalOpen[id];
|
|
5606
|
-
const handleSectionToggle = (0,
|
|
5726
|
+
const handleSectionToggle = (0, import_react15.useCallback)(
|
|
5607
5727
|
(id) => {
|
|
5608
5728
|
const next = !isSectionOpen(id);
|
|
5609
5729
|
if (isControlled) {
|
|
@@ -5645,81 +5765,88 @@ var ScArtifaxSidebar = ({
|
|
|
5645
5765
|
onExpandedChange: changeExpanded
|
|
5646
5766
|
}
|
|
5647
5767
|
) : 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
|
-
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5769
|
+
"div",
|
|
5770
|
+
{
|
|
5771
|
+
"data-streamoid-sidebar-card": true,
|
|
5772
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.expanded,
|
|
5773
|
+
children: [
|
|
5774
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayExpanded }),
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.body, children: [
|
|
5776
|
+
expandedLogo ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.logoUnitExpanded, children: expandedLogo }) : null,
|
|
5777
|
+
sections.map((section, idx) => {
|
|
5778
|
+
const open = section.label ? section.collapsible !== false ? isSectionOpen(section.id) : true : true;
|
|
5779
|
+
const showHeader = !!section.label;
|
|
5780
|
+
const canToggle = showHeader && section.collapsible !== false;
|
|
5781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
|
|
5782
|
+
idx > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}) : null,
|
|
5783
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.sectionContainer, children: [
|
|
5784
|
+
showHeader ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5785
|
+
SectionHeader2,
|
|
5786
|
+
{
|
|
5787
|
+
label: section.label,
|
|
5788
|
+
open,
|
|
5789
|
+
onToggle: canToggle ? () => handleSectionToggle(section.id) : void 0
|
|
5790
|
+
}
|
|
5791
|
+
) : null,
|
|
5792
|
+
open ? section.items.map(
|
|
5793
|
+
(item) => renderMenuItem2(item, section.id)
|
|
5794
|
+
) : null
|
|
5795
|
+
] })
|
|
5796
|
+
] }, section.id);
|
|
5797
|
+
})
|
|
5798
|
+
] }),
|
|
5799
|
+
creditWarning ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5800
|
+
CreditWarningBanner,
|
|
5801
|
+
{
|
|
5802
|
+
availableCredits: creditWarning.availableCredits,
|
|
5803
|
+
remainingPct: creditWarning.remainingPct,
|
|
5804
|
+
level: creditWarning.level ?? "danger",
|
|
5805
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5806
|
+
expanded: true
|
|
5807
|
+
}
|
|
5808
|
+
) }) : null,
|
|
5809
|
+
assistantCta ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScAskAgentSlot, { cta: assistantCta }) : null,
|
|
5810
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}),
|
|
5811
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.profileRow, children: [
|
|
5812
|
+
appIdentity ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5813
|
+
"button",
|
|
5814
|
+
{
|
|
5815
|
+
type: "button",
|
|
5816
|
+
className: ScArtifaxSidebar_default.appIdentityMain,
|
|
5817
|
+
onClick: appIdentity.onClick,
|
|
5818
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5819
|
+
children: appIdentity.content
|
|
5820
|
+
}
|
|
5821
|
+
) : profile ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5822
|
+
"button",
|
|
5823
|
+
{
|
|
5824
|
+
type: "button",
|
|
5825
|
+
className: ScArtifaxSidebar_default.profileMain,
|
|
5826
|
+
onClick: profile.onClick,
|
|
5827
|
+
children: [
|
|
5828
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar }),
|
|
5829
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.profileInfo, children: [
|
|
5830
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ScArtifaxSidebar_default.profileName, children: profile.name }),
|
|
5831
|
+
profile.subtitle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ScArtifaxSidebar_default.profileSubtitle, children: profile.subtitle }) : null
|
|
5832
|
+
] })
|
|
5833
|
+
]
|
|
5834
|
+
}
|
|
5835
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: ScArtifaxSidebar_default.profileMain, "aria-hidden": "true" }),
|
|
5836
|
+
!hideToggle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5837
|
+
"button",
|
|
5838
|
+
{
|
|
5839
|
+
type: "button",
|
|
5840
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5841
|
+
onClick: onToggle,
|
|
5842
|
+
"aria-label": "Collapse sidebar",
|
|
5843
|
+
children: resolveToggleIcon2(toggleIcon, true)
|
|
5844
|
+
}
|
|
5845
|
+
) : null
|
|
5846
|
+
] })
|
|
5847
|
+
]
|
|
5848
|
+
}
|
|
5849
|
+
)
|
|
5723
5850
|
]
|
|
5724
5851
|
}
|
|
5725
5852
|
);
|
|
@@ -5737,66 +5864,73 @@ var ScArtifaxSidebar = ({
|
|
|
5737
5864
|
onExpandedChange: changeExpanded
|
|
5738
5865
|
}
|
|
5739
5866
|
) : 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
|
-
|
|
5867
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
5868
|
+
"div",
|
|
5869
|
+
{
|
|
5870
|
+
"data-streamoid-sidebar-card": true,
|
|
5871
|
+
className: ScArtifaxSidebar_default.container + " " + ScArtifaxSidebar_default.collapsed,
|
|
5872
|
+
children: [
|
|
5873
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { "aria-hidden": "true", className: ScArtifaxSidebar_default.borderOverlayCollapsed }),
|
|
5874
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.body + " " + ScArtifaxSidebar_default.bodyCollapsed, children: [
|
|
5875
|
+
collapsedLogo ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.logoUnitCollapsed, children: collapsedLogo }) : null,
|
|
5876
|
+
sections.map((section, idx) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { children: [
|
|
5877
|
+
idx > 0 ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}) : null,
|
|
5878
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.sectionContainerCollapsed, children: section.items.map((item) => renderMenuItem2(item, section.id)) })
|
|
5879
|
+
] }, section.id))
|
|
5880
|
+
] }),
|
|
5881
|
+
creditWarning ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.creditWarningSlot, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5882
|
+
CreditWarningBanner,
|
|
5883
|
+
{
|
|
5884
|
+
availableCredits: creditWarning.availableCredits,
|
|
5885
|
+
remainingPct: creditWarning.remainingPct,
|
|
5886
|
+
level: creditWarning.level ?? "danger",
|
|
5887
|
+
onBuyCredits: creditWarning.onBuyCredits,
|
|
5888
|
+
expanded: false
|
|
5889
|
+
}
|
|
5890
|
+
) }) : null,
|
|
5891
|
+
assistantCta ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScAskAgentSlot, { cta: assistantCta, collapsed: true }) : null,
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ScHDivider, {}),
|
|
5893
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: ScArtifaxSidebar_default.footerCollapsed, children: [
|
|
5894
|
+
appIdentity ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5895
|
+
"button",
|
|
5896
|
+
{
|
|
5897
|
+
type: "button",
|
|
5898
|
+
className: ScArtifaxSidebar_default.appIdentityCollapsed,
|
|
5899
|
+
onClick: appIdentity.onClick,
|
|
5900
|
+
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5901
|
+
children: appIdentity.content
|
|
5902
|
+
}
|
|
5903
|
+
) : profile ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5904
|
+
"button",
|
|
5905
|
+
{
|
|
5906
|
+
type: "button",
|
|
5907
|
+
className: ScArtifaxSidebar_default.profileRowCollapsed,
|
|
5908
|
+
onClick: profile.onClick,
|
|
5909
|
+
"aria-label": profile.name,
|
|
5910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: ScArtifaxSidebar_default.profileAvatar, children: profile.avatar })
|
|
5911
|
+
}
|
|
5912
|
+
) : null,
|
|
5913
|
+
!hideToggle ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
5914
|
+
"button",
|
|
5915
|
+
{
|
|
5916
|
+
type: "button",
|
|
5917
|
+
className: ScArtifaxSidebar_default.footerToggle,
|
|
5918
|
+
onClick: onToggle,
|
|
5919
|
+
"aria-label": "Expand sidebar",
|
|
5920
|
+
children: resolveToggleIcon2(toggleIcon, false)
|
|
5921
|
+
}
|
|
5922
|
+
) : null
|
|
5923
|
+
] })
|
|
5924
|
+
]
|
|
5925
|
+
}
|
|
5926
|
+
)
|
|
5793
5927
|
]
|
|
5794
5928
|
}
|
|
5795
5929
|
);
|
|
5796
5930
|
};
|
|
5797
5931
|
|
|
5798
5932
|
// src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
|
|
5799
|
-
var
|
|
5933
|
+
var import_react16 = require("react");
|
|
5800
5934
|
|
|
5801
5935
|
// src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
|
|
5802
5936
|
var ScSidebarSwitchMenu_default = {
|
|
@@ -6438,7 +6572,7 @@ var ScCatalogixSidebar = ({
|
|
|
6438
6572
|
className,
|
|
6439
6573
|
style
|
|
6440
6574
|
}) => {
|
|
6441
|
-
const [appListOpen, setAppListOpen] = (0,
|
|
6575
|
+
const [appListOpen, setAppListOpen] = (0, import_react16.useState)(false);
|
|
6442
6576
|
const handleSwitch = () => {
|
|
6443
6577
|
setAppListOpen((prev) => !prev);
|
|
6444
6578
|
onLogoClick?.();
|
|
@@ -6681,7 +6815,7 @@ var ScSlider = ({
|
|
|
6681
6815
|
};
|
|
6682
6816
|
|
|
6683
6817
|
// src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
|
|
6684
|
-
var
|
|
6818
|
+
var import_react17 = require("react");
|
|
6685
6819
|
var import_icons42 = require("@streamoid/icons");
|
|
6686
6820
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
6687
6821
|
var PRIMARY_ICON = "var(--alias-text---icons-primary)";
|
|
@@ -6872,12 +7006,12 @@ function StreamoidWorkspaceSwitcher({
|
|
|
6872
7006
|
onSwitchWorkspace,
|
|
6873
7007
|
config
|
|
6874
7008
|
}) {
|
|
6875
|
-
const modalRef = (0,
|
|
7009
|
+
const modalRef = (0, import_react17.useRef)(null);
|
|
6876
7010
|
const title = config?.title || "Switch workspace";
|
|
6877
7011
|
const loadingText = config?.loadingText || "Loading workspaces\u2026";
|
|
6878
7012
|
const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
|
|
6879
7013
|
const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
|
|
6880
|
-
(0,
|
|
7014
|
+
(0, import_react17.useEffect)(() => {
|
|
6881
7015
|
if (!open) return;
|
|
6882
7016
|
function handleKeyDown(e) {
|
|
6883
7017
|
if (e.key === "Escape") onClose();
|
|
@@ -8288,7 +8422,7 @@ var ScWorkspaceCard = ({
|
|
|
8288
8422
|
};
|
|
8289
8423
|
|
|
8290
8424
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
8291
|
-
var
|
|
8425
|
+
var import_react18 = require("react");
|
|
8292
8426
|
var import_icons62 = require("@streamoid/icons");
|
|
8293
8427
|
|
|
8294
8428
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
@@ -8329,7 +8463,7 @@ function ScWorkspaceSwitchCard({
|
|
|
8329
8463
|
onSettings,
|
|
8330
8464
|
onLeave
|
|
8331
8465
|
}) {
|
|
8332
|
-
const [internalHover, setInternalHover] = (0,
|
|
8466
|
+
const [internalHover, setInternalHover] = (0, import_react18.useState)(false);
|
|
8333
8467
|
const isHover = hover !== void 0 ? hover : internalHover;
|
|
8334
8468
|
const isCurrent = type === "currentWS";
|
|
8335
8469
|
const isOther = type === "otherWS";
|
|
@@ -8457,7 +8591,7 @@ function ScWorkspaceSwitchCard({
|
|
|
8457
8591
|
var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
|
|
8458
8592
|
|
|
8459
8593
|
// src/SC-Modal/ScModal.tsx
|
|
8460
|
-
var
|
|
8594
|
+
var import_react19 = require("react");
|
|
8461
8595
|
var import_react_dom = require("react-dom");
|
|
8462
8596
|
|
|
8463
8597
|
// src/SC-Modal/ScModal.module.css
|
|
@@ -8479,7 +8613,7 @@ var ScModal = ({
|
|
|
8479
8613
|
closeOnBackdrop = true,
|
|
8480
8614
|
closeOnEsc = true
|
|
8481
8615
|
}) => {
|
|
8482
|
-
(0,
|
|
8616
|
+
(0, import_react19.useEffect)(() => {
|
|
8483
8617
|
if (!open || !closeOnEsc) return;
|
|
8484
8618
|
const onKey = (e) => {
|
|
8485
8619
|
if (e.key === "Escape") onClose?.();
|
|
@@ -8512,7 +8646,7 @@ var ScModal = ({
|
|
|
8512
8646
|
};
|
|
8513
8647
|
|
|
8514
8648
|
// src/SC-Drawer/ScDrawer.tsx
|
|
8515
|
-
var
|
|
8649
|
+
var import_react20 = require("react");
|
|
8516
8650
|
var import_react_dom2 = require("react-dom");
|
|
8517
8651
|
|
|
8518
8652
|
// src/SC-Drawer/ScDrawer.module.css
|
|
@@ -8540,8 +8674,8 @@ var ScDrawer = ({
|
|
|
8540
8674
|
backdrop = false,
|
|
8541
8675
|
zIndex
|
|
8542
8676
|
}) => {
|
|
8543
|
-
const panelRef = (0,
|
|
8544
|
-
(0,
|
|
8677
|
+
const panelRef = (0, import_react20.useRef)(null);
|
|
8678
|
+
(0, import_react20.useEffect)(() => {
|
|
8545
8679
|
if (!open) return;
|
|
8546
8680
|
const onKey = (e) => {
|
|
8547
8681
|
if (closeOnEsc && e.key === "Escape") onClose?.();
|
|
@@ -8639,7 +8773,7 @@ var ScTabs = ({
|
|
|
8639
8773
|
};
|
|
8640
8774
|
|
|
8641
8775
|
// src/SC-Counter/ScCounter.tsx
|
|
8642
|
-
var
|
|
8776
|
+
var import_react21 = require("react");
|
|
8643
8777
|
var import_icons63 = require("@streamoid/icons");
|
|
8644
8778
|
|
|
8645
8779
|
// src/SC-Counter/ScCounter.module.css
|
|
@@ -8661,7 +8795,7 @@ var ScCounter = ({
|
|
|
8661
8795
|
className,
|
|
8662
8796
|
style
|
|
8663
8797
|
}) => {
|
|
8664
|
-
const [showInput, setShowInput] = (0,
|
|
8798
|
+
const [showInput, setShowInput] = (0, import_react21.useState)(false);
|
|
8665
8799
|
const set = (n) => {
|
|
8666
8800
|
let v = n;
|
|
8667
8801
|
if (min !== void 0) v = Math.max(min, v);
|
|
@@ -9750,7 +9884,7 @@ var ScSelectionList = ({
|
|
|
9750
9884
|
};
|
|
9751
9885
|
|
|
9752
9886
|
// src/SC-textArea/ScTextArea.tsx
|
|
9753
|
-
var
|
|
9887
|
+
var import_react22 = require("react");
|
|
9754
9888
|
|
|
9755
9889
|
// src/SC-textArea/ScTextArea.module.css
|
|
9756
9890
|
var ScTextArea_default = {
|
|
@@ -9780,7 +9914,7 @@ var ScTextArea = ({
|
|
|
9780
9914
|
style,
|
|
9781
9915
|
...props
|
|
9782
9916
|
}) => {
|
|
9783
|
-
const [focused, setFocused] = (0,
|
|
9917
|
+
const [focused, setFocused] = (0, import_react22.useState)(false);
|
|
9784
9918
|
const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
|
|
9785
9919
|
const stateClass = ScTextArea_default["state-" + derivedState];
|
|
9786
9920
|
const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
|
|
@@ -9822,7 +9956,7 @@ var ScTextArea = ({
|
|
|
9822
9956
|
};
|
|
9823
9957
|
|
|
9824
9958
|
// src/SC-select/ScSelect.tsx
|
|
9825
|
-
var
|
|
9959
|
+
var import_react23 = require("react");
|
|
9826
9960
|
|
|
9827
9961
|
// src/SC-select/ScSelect.module.css
|
|
9828
9962
|
var ScSelect_default = {
|
|
@@ -9859,9 +9993,9 @@ var ScSelect = (props) => {
|
|
|
9859
9993
|
disabled = false,
|
|
9860
9994
|
className
|
|
9861
9995
|
} = props;
|
|
9862
|
-
const [open, setOpen] = (0,
|
|
9863
|
-
const rootRef = (0,
|
|
9864
|
-
(0,
|
|
9996
|
+
const [open, setOpen] = (0, import_react23.useState)(false);
|
|
9997
|
+
const rootRef = (0, import_react23.useRef)(null);
|
|
9998
|
+
(0, import_react23.useEffect)(() => {
|
|
9865
9999
|
if (!open) return;
|
|
9866
10000
|
const handleClick = (e) => {
|
|
9867
10001
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -9952,7 +10086,7 @@ var ScSelect = (props) => {
|
|
|
9952
10086
|
};
|
|
9953
10087
|
|
|
9954
10088
|
// src/SC-fileField/ScFileField.tsx
|
|
9955
|
-
var
|
|
10089
|
+
var import_react24 = require("react");
|
|
9956
10090
|
|
|
9957
10091
|
// src/SC-fileField/ScFileField.module.css
|
|
9958
10092
|
var ScFileField_default = {
|
|
@@ -9990,7 +10124,7 @@ var ScFileField = (props) => {
|
|
|
9990
10124
|
label,
|
|
9991
10125
|
className
|
|
9992
10126
|
} = props;
|
|
9993
|
-
const inputRef = (0,
|
|
10127
|
+
const inputRef = (0, import_react24.useRef)(null);
|
|
9994
10128
|
const hasFile = Boolean(fileName);
|
|
9995
10129
|
const isUploading = Boolean(uploading);
|
|
9996
10130
|
const clampedProgress = Math.max(0, Math.min(100, progress));
|
|
@@ -10109,7 +10243,7 @@ var ScFileField = (props) => {
|
|
|
10109
10243
|
};
|
|
10110
10244
|
|
|
10111
10245
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
10112
|
-
var
|
|
10246
|
+
var import_react25 = require("react");
|
|
10113
10247
|
|
|
10114
10248
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
10115
10249
|
var ScMediaApproval_default = {
|
|
@@ -10156,9 +10290,9 @@ var ScMediaApproval = (props) => {
|
|
|
10156
10290
|
className
|
|
10157
10291
|
} = props;
|
|
10158
10292
|
const total = mediaUrls.length;
|
|
10159
|
-
const [index, setIndex] = (0,
|
|
10160
|
-
const [mediaLoading, setMediaLoading] = (0,
|
|
10161
|
-
(0,
|
|
10293
|
+
const [index, setIndex] = (0, import_react25.useState)(activeIndex ?? 0);
|
|
10294
|
+
const [mediaLoading, setMediaLoading] = (0, import_react25.useState)(false);
|
|
10295
|
+
(0, import_react25.useEffect)(() => {
|
|
10162
10296
|
if (typeof activeIndex === "number") {
|
|
10163
10297
|
setIndex(activeIndex);
|
|
10164
10298
|
}
|
|
@@ -10293,7 +10427,7 @@ var ScMediaApproval = (props) => {
|
|
|
10293
10427
|
};
|
|
10294
10428
|
|
|
10295
10429
|
// src/SC-mediaSelect/ScMediaSelect.tsx
|
|
10296
|
-
var
|
|
10430
|
+
var import_react26 = require("react");
|
|
10297
10431
|
|
|
10298
10432
|
// src/SC-mediaSelect/ScMediaSelect.module.css
|
|
10299
10433
|
var ScMediaSelect_default = {
|
|
@@ -10349,7 +10483,7 @@ var ScMediaSelect = (props) => {
|
|
|
10349
10483
|
} = props;
|
|
10350
10484
|
const total = items.length;
|
|
10351
10485
|
const resolvedMax = typeof max === "number" ? max : total;
|
|
10352
|
-
const selectedSet = (0,
|
|
10486
|
+
const selectedSet = (0, import_react26.useMemo)(() => new Set(selected), [selected]);
|
|
10353
10487
|
const selectedCount = selectedSet.size;
|
|
10354
10488
|
let countLabel = selectedCount + " of " + total + " selected";
|
|
10355
10489
|
if (min > 0) countLabel += " (min " + min + ")";
|
|
@@ -10418,7 +10552,7 @@ var ScMediaSelect = (props) => {
|
|
|
10418
10552
|
};
|
|
10419
10553
|
|
|
10420
10554
|
// src/SC-todoList/ScTodoList.tsx
|
|
10421
|
-
var
|
|
10555
|
+
var import_react27 = require("react");
|
|
10422
10556
|
|
|
10423
10557
|
// src/SC-todoList/ScTodoList.module.css
|
|
10424
10558
|
var ScTodoList_default = {
|
|
@@ -10451,9 +10585,9 @@ var ScTodoList = ({
|
|
|
10451
10585
|
addPlaceholder = "Add an item",
|
|
10452
10586
|
className
|
|
10453
10587
|
}) => {
|
|
10454
|
-
const [editingId, setEditingId] = (0,
|
|
10455
|
-
const [editValue, setEditValue] = (0,
|
|
10456
|
-
const [newValue, setNewValue] = (0,
|
|
10588
|
+
const [editingId, setEditingId] = (0, import_react27.useState)(null);
|
|
10589
|
+
const [editValue, setEditValue] = (0, import_react27.useState)("");
|
|
10590
|
+
const [newValue, setNewValue] = (0, import_react27.useState)("");
|
|
10457
10591
|
const total = items.length;
|
|
10458
10592
|
const completed = items.filter((i) => i.status === "completed").length;
|
|
10459
10593
|
const startEditing = (item) => {
|
|
@@ -11307,7 +11441,7 @@ var ScWorkspaceSwitchMobileV2 = ({
|
|
|
11307
11441
|
};
|
|
11308
11442
|
|
|
11309
11443
|
// src/SC-imageField/ScImageField.tsx
|
|
11310
|
-
var
|
|
11444
|
+
var import_react28 = require("react");
|
|
11311
11445
|
|
|
11312
11446
|
// src/SC-imageField/ScImageField.module.css
|
|
11313
11447
|
var ScImageField_default = {
|
|
@@ -11334,7 +11468,7 @@ var ScImageField = ({
|
|
|
11334
11468
|
onRemove,
|
|
11335
11469
|
className
|
|
11336
11470
|
}) => {
|
|
11337
|
-
const inputRef = (0,
|
|
11471
|
+
const inputRef = (0, import_react28.useRef)(null);
|
|
11338
11472
|
const hasImage = !!imagePreview;
|
|
11339
11473
|
function handleClick() {
|
|
11340
11474
|
if (!hasImage) {
|
|
@@ -11570,7 +11704,7 @@ var ScPlanDetailsCardMobile = ({
|
|
|
11570
11704
|
};
|
|
11571
11705
|
|
|
11572
11706
|
// src/SC-ProfilePopup/ScProfilePopup.tsx
|
|
11573
|
-
var
|
|
11707
|
+
var import_react29 = require("react");
|
|
11574
11708
|
|
|
11575
11709
|
// src/SC-ProfilePopup/ScProfilePopup.module.css
|
|
11576
11710
|
var ScProfilePopup_default = {
|
|
@@ -11604,7 +11738,7 @@ var activateOnKey = (handler) => (event) => {
|
|
|
11604
11738
|
handler();
|
|
11605
11739
|
}
|
|
11606
11740
|
};
|
|
11607
|
-
var ScProfilePopup = (0,
|
|
11741
|
+
var ScProfilePopup = (0, import_react29.forwardRef)(
|
|
11608
11742
|
({
|
|
11609
11743
|
name = "Chris Hemsworth",
|
|
11610
11744
|
email = "chris@kepler.com",
|