@streamoid/ui 0.6.51 → 0.6.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +183 -168
- package/dist/index.mjs +149 -134
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4611,10 +4611,49 @@ function ScSidebarResizeHandle({
|
|
|
4611
4611
|
);
|
|
4612
4612
|
}
|
|
4613
4613
|
|
|
4614
|
+
// src/SC-SidebarShell/ScPopoverArrow.tsx
|
|
4615
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4616
|
+
function ScPopoverArrow({
|
|
4617
|
+
arrow,
|
|
4618
|
+
background = "var(--alias-surface-base, #101010)",
|
|
4619
|
+
borderColor = "var(--alias-border-default, #3e3e3e)",
|
|
4620
|
+
size = 12,
|
|
4621
|
+
style
|
|
4622
|
+
}) {
|
|
4623
|
+
if (!arrow) return null;
|
|
4624
|
+
const half = size / 2;
|
|
4625
|
+
const onLeftEdge = arrow.side === "left";
|
|
4626
|
+
return /* @__PURE__ */ jsx51(
|
|
4627
|
+
"span",
|
|
4628
|
+
{
|
|
4629
|
+
"aria-hidden": true,
|
|
4630
|
+
"data-streamoid-popover-arrow": arrow.side,
|
|
4631
|
+
style: {
|
|
4632
|
+
position: "absolute",
|
|
4633
|
+
top: arrow.top - half,
|
|
4634
|
+
[onLeftEdge ? "left" : "right"]: -half,
|
|
4635
|
+
width: size,
|
|
4636
|
+
height: size,
|
|
4637
|
+
background,
|
|
4638
|
+
/* Only the two edges that face away from the card. The other two sit
|
|
4639
|
+
under it, where a border would draw a line across the card's own
|
|
4640
|
+
edge. */
|
|
4641
|
+
borderTop: onLeftEdge ? "none" : `1px solid ${borderColor}`,
|
|
4642
|
+
borderRight: onLeftEdge ? "none" : `1px solid ${borderColor}`,
|
|
4643
|
+
borderBottom: onLeftEdge ? `1px solid ${borderColor}` : "none",
|
|
4644
|
+
borderLeft: onLeftEdge ? `1px solid ${borderColor}` : "none",
|
|
4645
|
+
transform: "rotate(45deg)",
|
|
4646
|
+
pointerEvents: "none",
|
|
4647
|
+
...style
|
|
4648
|
+
}
|
|
4649
|
+
}
|
|
4650
|
+
);
|
|
4651
|
+
}
|
|
4652
|
+
|
|
4614
4653
|
// src/SC-Sidebar-new/streamoid-sidebar.tsx
|
|
4615
|
-
import { Fragment as Fragment15, jsx as
|
|
4654
|
+
import { Fragment as Fragment15, jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4616
4655
|
function SectionHeader({ label }) {
|
|
4617
|
-
return /* @__PURE__ */
|
|
4656
|
+
return /* @__PURE__ */ jsx52("div", { className: "opacity-50 shrink-0 w-full", children: /* @__PURE__ */ jsx52("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsx52(
|
|
4618
4657
|
"div",
|
|
4619
4658
|
{
|
|
4620
4659
|
className: "flex items-center w-full text-text-xs-regular",
|
|
@@ -4622,12 +4661,12 @@ function SectionHeader({ label }) {
|
|
|
4622
4661
|
padding: "var(--spacing-xs) var(--spacing-3xl)",
|
|
4623
4662
|
color: "var(--alias-text---icons-tertiary)"
|
|
4624
4663
|
},
|
|
4625
|
-
children: /* @__PURE__ */
|
|
4664
|
+
children: /* @__PURE__ */ jsx52("span", { children: label })
|
|
4626
4665
|
}
|
|
4627
4666
|
) }) });
|
|
4628
4667
|
}
|
|
4629
4668
|
function HDivider({ edgeToEdge = false }) {
|
|
4630
|
-
return /* @__PURE__ */
|
|
4669
|
+
return /* @__PURE__ */ jsx52(
|
|
4631
4670
|
"div",
|
|
4632
4671
|
{
|
|
4633
4672
|
className: "shrink-0",
|
|
@@ -4672,7 +4711,7 @@ function renderMenuItem({
|
|
|
4672
4711
|
const derivedState = active ? "active" : highlighted ? "default-highlight" : "default";
|
|
4673
4712
|
const state = stateOverride ?? derivedState;
|
|
4674
4713
|
const iconActive = state === "active" || state === "default-active" || state === "default-highlight";
|
|
4675
|
-
return /* @__PURE__ */
|
|
4714
|
+
return /* @__PURE__ */ jsx52(
|
|
4676
4715
|
ScSidebarMenu,
|
|
4677
4716
|
{
|
|
4678
4717
|
icon: resolveIcon(iconMap, item, iconActive, expanded),
|
|
@@ -4731,8 +4770,8 @@ function StreamoidSidebar({
|
|
|
4731
4770
|
};
|
|
4732
4771
|
if (expanded) {
|
|
4733
4772
|
const logoRow = /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between w-full shrink-0", children: [
|
|
4734
|
-
/* @__PURE__ */
|
|
4735
|
-
isMobile ? /* @__PURE__ */
|
|
4773
|
+
/* @__PURE__ */ jsx52("div", { className: "min-w-0 flex-1", children: expandedLogo }),
|
|
4774
|
+
isMobile ? /* @__PURE__ */ jsx52(
|
|
4736
4775
|
"div",
|
|
4737
4776
|
{
|
|
4738
4777
|
className: "flex items-center cursor-pointer shrink-0",
|
|
@@ -4751,7 +4790,7 @@ function StreamoidSidebar({
|
|
|
4751
4790
|
className: `relative flex h-full items-center shrink-0 ${className ?? ""}`.trim(),
|
|
4752
4791
|
style: { padding: "var(--spacing-3xl)", ...style },
|
|
4753
4792
|
children: [
|
|
4754
|
-
resizable && !isMobile ? /* @__PURE__ */
|
|
4793
|
+
resizable && !isMobile ? /* @__PURE__ */ jsx52(
|
|
4755
4794
|
ScSidebarResizeHandle,
|
|
4756
4795
|
{
|
|
4757
4796
|
expanded,
|
|
@@ -4775,7 +4814,7 @@ function StreamoidSidebar({
|
|
|
4775
4814
|
gap: "var(--spacing-xxs)"
|
|
4776
4815
|
},
|
|
4777
4816
|
children: [
|
|
4778
|
-
/* @__PURE__ */
|
|
4817
|
+
/* @__PURE__ */ jsx52(
|
|
4779
4818
|
"div",
|
|
4780
4819
|
{
|
|
4781
4820
|
"aria-hidden": "true",
|
|
@@ -4804,7 +4843,7 @@ function StreamoidSidebar({
|
|
|
4804
4843
|
transition: "background-color 200ms ease, box-shadow 200ms ease"
|
|
4805
4844
|
},
|
|
4806
4845
|
children: [
|
|
4807
|
-
/* @__PURE__ */
|
|
4846
|
+
/* @__PURE__ */ jsx52(
|
|
4808
4847
|
"div",
|
|
4809
4848
|
{
|
|
4810
4849
|
style: {
|
|
@@ -4816,7 +4855,7 @@ function StreamoidSidebar({
|
|
|
4816
4855
|
children: logoRow
|
|
4817
4856
|
}
|
|
4818
4857
|
),
|
|
4819
|
-
/* @__PURE__ */
|
|
4858
|
+
/* @__PURE__ */ jsx52(
|
|
4820
4859
|
"div",
|
|
4821
4860
|
{
|
|
4822
4861
|
className: "absolute left-0 right-0",
|
|
@@ -4832,7 +4871,7 @@ function StreamoidSidebar({
|
|
|
4832
4871
|
overflow: "hidden",
|
|
4833
4872
|
transition: "opacity 200ms ease, background-color 200ms ease, box-shadow 200ms ease"
|
|
4834
4873
|
},
|
|
4835
|
-
children: /* @__PURE__ */
|
|
4874
|
+
children: /* @__PURE__ */ jsx52(
|
|
4836
4875
|
"div",
|
|
4837
4876
|
{
|
|
4838
4877
|
style: {
|
|
@@ -4840,7 +4879,7 @@ function StreamoidSidebar({
|
|
|
4840
4879
|
gridTemplateRows: panelOpen ? "1fr" : "0fr",
|
|
4841
4880
|
transition: "grid-template-rows 220ms ease"
|
|
4842
4881
|
},
|
|
4843
|
-
children: /* @__PURE__ */
|
|
4882
|
+
children: /* @__PURE__ */ jsx52("div", { style: { overflow: "hidden", minHeight: 0 }, children: switchPanel })
|
|
4844
4883
|
}
|
|
4845
4884
|
)
|
|
4846
4885
|
}
|
|
@@ -4848,7 +4887,7 @@ function StreamoidSidebar({
|
|
|
4848
4887
|
]
|
|
4849
4888
|
}
|
|
4850
4889
|
) : null,
|
|
4851
|
-
hasSwitchCard ? /* @__PURE__ */
|
|
4890
|
+
hasSwitchCard ? /* @__PURE__ */ jsx52(
|
|
4852
4891
|
"div",
|
|
4853
4892
|
{
|
|
4854
4893
|
"aria-hidden": "true",
|
|
@@ -4883,8 +4922,8 @@ function StreamoidSidebar({
|
|
|
4883
4922
|
children: [
|
|
4884
4923
|
!hasSwitchCard ? logoRow : null,
|
|
4885
4924
|
!!(topItems?.length || config.topItem) && /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
4886
|
-
/* @__PURE__ */
|
|
4887
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx52(HDivider, { edgeToEdge: true }),
|
|
4926
|
+
/* @__PURE__ */ jsx52(
|
|
4888
4927
|
"div",
|
|
4889
4928
|
{
|
|
4890
4929
|
className: "flex flex-col items-stretch shrink-0 w-full",
|
|
@@ -4905,10 +4944,10 @@ function StreamoidSidebar({
|
|
|
4905
4944
|
)
|
|
4906
4945
|
}
|
|
4907
4946
|
),
|
|
4908
|
-
/* @__PURE__ */
|
|
4947
|
+
/* @__PURE__ */ jsx52(HDivider, {})
|
|
4909
4948
|
] }),
|
|
4910
|
-
showBody && bodyContent ? /* @__PURE__ */
|
|
4911
|
-
!(topItems?.length || config.topItem) && /* @__PURE__ */
|
|
4949
|
+
showBody && bodyContent ? /* @__PURE__ */ jsx52("div", { className: "flex flex-col flex-1 min-h-0 w-full overflow-hidden", children: bodyContent }) : /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
4950
|
+
!(topItems?.length || config.topItem) && /* @__PURE__ */ jsx52(HDivider, { edgeToEdge: true }),
|
|
4912
4951
|
config.sections.map((section) => /* @__PURE__ */ jsxs41(
|
|
4913
4952
|
"div",
|
|
4914
4953
|
{
|
|
@@ -4918,7 +4957,7 @@ function StreamoidSidebar({
|
|
|
4918
4957
|
gap: "var(--spacing-xxs)"
|
|
4919
4958
|
},
|
|
4920
4959
|
children: [
|
|
4921
|
-
section.label ? /* @__PURE__ */
|
|
4960
|
+
section.label ? /* @__PURE__ */ jsx52(SectionHeader, { label: section.label }) : null,
|
|
4922
4961
|
section.items.map(
|
|
4923
4962
|
(item) => renderMenuItem({
|
|
4924
4963
|
item,
|
|
@@ -4937,9 +4976,9 @@ function StreamoidSidebar({
|
|
|
4937
4976
|
]
|
|
4938
4977
|
}
|
|
4939
4978
|
),
|
|
4940
|
-
assistantCta ? /* @__PURE__ */
|
|
4979
|
+
assistantCta ? /* @__PURE__ */ jsx52(ScAskAgentSlot, { cta: assistantCta }) : null,
|
|
4941
4980
|
preFooterContent,
|
|
4942
|
-
config.bottomItems?.length ? /* @__PURE__ */
|
|
4981
|
+
config.bottomItems?.length ? /* @__PURE__ */ jsx52(
|
|
4943
4982
|
"div",
|
|
4944
4983
|
{
|
|
4945
4984
|
className: "flex flex-col items-start shrink-0 w-full",
|
|
@@ -4956,8 +4995,8 @@ function StreamoidSidebar({
|
|
|
4956
4995
|
)
|
|
4957
4996
|
}
|
|
4958
4997
|
) : null,
|
|
4959
|
-
/* @__PURE__ */
|
|
4960
|
-
appIdentity ? /* @__PURE__ */
|
|
4998
|
+
/* @__PURE__ */ jsx52(HDivider, { edgeToEdge: true }),
|
|
4999
|
+
appIdentity ? /* @__PURE__ */ jsx52(
|
|
4961
5000
|
"button",
|
|
4962
5001
|
{
|
|
4963
5002
|
type: "button",
|
|
@@ -5005,7 +5044,7 @@ function StreamoidSidebar({
|
|
|
5005
5044
|
children: [
|
|
5006
5045
|
profile.avatar,
|
|
5007
5046
|
/* @__PURE__ */ jsxs41("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5047
|
+
/* @__PURE__ */ jsx52(
|
|
5009
5048
|
"span",
|
|
5010
5049
|
{
|
|
5011
5050
|
className: "text-text-sm-medium truncate",
|
|
@@ -5013,7 +5052,7 @@ function StreamoidSidebar({
|
|
|
5013
5052
|
children: profile.name
|
|
5014
5053
|
}
|
|
5015
5054
|
),
|
|
5016
|
-
profile.subtitle ? /* @__PURE__ */
|
|
5055
|
+
profile.subtitle ? /* @__PURE__ */ jsx52(
|
|
5017
5056
|
"span",
|
|
5018
5057
|
{
|
|
5019
5058
|
className: "text-text-xs-regular truncate",
|
|
@@ -5025,7 +5064,7 @@ function StreamoidSidebar({
|
|
|
5025
5064
|
]
|
|
5026
5065
|
}
|
|
5027
5066
|
),
|
|
5028
|
-
/* @__PURE__ */
|
|
5067
|
+
/* @__PURE__ */ jsx52(
|
|
5029
5068
|
"div",
|
|
5030
5069
|
{
|
|
5031
5070
|
className: "flex items-center cursor-pointer shrink-0",
|
|
@@ -5067,7 +5106,7 @@ function StreamoidSidebar({
|
|
|
5067
5106
|
children: [
|
|
5068
5107
|
profile.avatar,
|
|
5069
5108
|
/* @__PURE__ */ jsxs41("div", { className: "flex flex-col flex-1 min-w-0", children: [
|
|
5070
|
-
/* @__PURE__ */
|
|
5109
|
+
/* @__PURE__ */ jsx52(
|
|
5071
5110
|
"span",
|
|
5072
5111
|
{
|
|
5073
5112
|
className: "text-text-sm-medium truncate",
|
|
@@ -5075,7 +5114,7 @@ function StreamoidSidebar({
|
|
|
5075
5114
|
children: profile.name
|
|
5076
5115
|
}
|
|
5077
5116
|
),
|
|
5078
|
-
profile.subtitle ? /* @__PURE__ */
|
|
5117
|
+
profile.subtitle ? /* @__PURE__ */ jsx52(
|
|
5079
5118
|
"span",
|
|
5080
5119
|
{
|
|
5081
5120
|
className: "text-text-xs-regular truncate",
|
|
@@ -5087,9 +5126,9 @@ function StreamoidSidebar({
|
|
|
5087
5126
|
]
|
|
5088
5127
|
}
|
|
5089
5128
|
),
|
|
5090
|
-
!effectiveHideFooter && /* @__PURE__ */
|
|
5129
|
+
!effectiveHideFooter && /* @__PURE__ */ jsx52(Fragment15, { children: /* @__PURE__ */ jsx52(HDivider, {}) })
|
|
5091
5130
|
] }) : null,
|
|
5092
|
-
!effectiveHideFooter && !toggleInProfile && /* @__PURE__ */
|
|
5131
|
+
!effectiveHideFooter && !toggleInProfile && /* @__PURE__ */ jsx52("div", { className: "shrink-0 w-full", children: /* @__PURE__ */ jsx52("div", { className: "flex flex-row items-center size-full", children: /* @__PURE__ */ jsxs41(
|
|
5093
5132
|
"div",
|
|
5094
5133
|
{
|
|
5095
5134
|
className: "flex items-center w-full",
|
|
@@ -5098,7 +5137,7 @@ function StreamoidSidebar({
|
|
|
5098
5137
|
padding: "var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) var(--spacing-xl)"
|
|
5099
5138
|
},
|
|
5100
5139
|
children: [
|
|
5101
|
-
/* @__PURE__ */
|
|
5140
|
+
/* @__PURE__ */ jsx52(
|
|
5102
5141
|
"p",
|
|
5103
5142
|
{
|
|
5104
5143
|
className: "flex-1 text-text-sm-regular truncate",
|
|
@@ -5106,7 +5145,7 @@ function StreamoidSidebar({
|
|
|
5106
5145
|
children: versionText
|
|
5107
5146
|
}
|
|
5108
5147
|
),
|
|
5109
|
-
/* @__PURE__ */
|
|
5148
|
+
/* @__PURE__ */ jsx52(
|
|
5110
5149
|
"div",
|
|
5111
5150
|
{
|
|
5112
5151
|
className: "flex items-center cursor-pointer",
|
|
@@ -5134,7 +5173,7 @@ function StreamoidSidebar({
|
|
|
5134
5173
|
className: `relative flex h-full items-center justify-center shrink-0 ${className ?? ""}`.trim(),
|
|
5135
5174
|
style: { padding: "var(--spacing-3xl)", ...style },
|
|
5136
5175
|
children: [
|
|
5137
|
-
resizable && !isMobile ? /* @__PURE__ */
|
|
5176
|
+
resizable && !isMobile ? /* @__PURE__ */ jsx52(
|
|
5138
5177
|
ScSidebarResizeHandle,
|
|
5139
5178
|
{
|
|
5140
5179
|
expanded,
|
|
@@ -5157,7 +5196,7 @@ function StreamoidSidebar({
|
|
|
5157
5196
|
gap: "var(--spacing-xxs)"
|
|
5158
5197
|
},
|
|
5159
5198
|
children: [
|
|
5160
|
-
/* @__PURE__ */
|
|
5199
|
+
/* @__PURE__ */ jsx52(
|
|
5161
5200
|
"div",
|
|
5162
5201
|
{
|
|
5163
5202
|
"aria-hidden": "true",
|
|
@@ -5170,7 +5209,7 @@ function StreamoidSidebar({
|
|
|
5170
5209
|
}
|
|
5171
5210
|
),
|
|
5172
5211
|
hasSwitchCard ? /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
5173
|
-
/* @__PURE__ */
|
|
5212
|
+
/* @__PURE__ */ jsx52(
|
|
5174
5213
|
"div",
|
|
5175
5214
|
{
|
|
5176
5215
|
"aria-hidden": "true",
|
|
@@ -5185,7 +5224,7 @@ function StreamoidSidebar({
|
|
|
5185
5224
|
}
|
|
5186
5225
|
}
|
|
5187
5226
|
),
|
|
5188
|
-
/* @__PURE__ */
|
|
5227
|
+
/* @__PURE__ */ jsxs41(
|
|
5189
5228
|
"div",
|
|
5190
5229
|
{
|
|
5191
5230
|
style: {
|
|
@@ -5197,14 +5236,29 @@ function StreamoidSidebar({
|
|
|
5197
5236
|
backgroundColor: "var(--alias-surface-base)",
|
|
5198
5237
|
border: "1px solid var(--alias-border-default)",
|
|
5199
5238
|
borderRadius: "var(--radius-3xl)",
|
|
5200
|
-
overflow:
|
|
5201
|
-
|
|
5239
|
+
/* NOT `overflow: hidden`. The caret below hangs half outside
|
|
5240
|
+
this card by design, and clipping here cuts it off. The
|
|
5241
|
+
inner box clips instead — which is also what keeps a
|
|
5242
|
+
child's opaque background off the rounded corners. */
|
|
5202
5243
|
opacity: panelOpen ? 1 : 0,
|
|
5203
5244
|
transform: panelOpen ? "translateX(0)" : "translateX(-4px)",
|
|
5204
5245
|
pointerEvents: panelOpen ? "auto" : "none",
|
|
5205
5246
|
transition: "opacity 180ms ease, transform 180ms ease"
|
|
5206
5247
|
},
|
|
5207
|
-
children:
|
|
5248
|
+
children: [
|
|
5249
|
+
/* @__PURE__ */ jsx52(ScPopoverArrow, { arrow: { side: "left", top: 24 } }),
|
|
5250
|
+
/* @__PURE__ */ jsx52(
|
|
5251
|
+
"div",
|
|
5252
|
+
{
|
|
5253
|
+
style: {
|
|
5254
|
+
borderRadius: "var(--radius-3xl)",
|
|
5255
|
+
overflow: "hidden",
|
|
5256
|
+
paddingBottom: "var(--spacing-md)"
|
|
5257
|
+
},
|
|
5258
|
+
children: switchPanel
|
|
5259
|
+
}
|
|
5260
|
+
)
|
|
5261
|
+
]
|
|
5208
5262
|
}
|
|
5209
5263
|
)
|
|
5210
5264
|
] }) : null,
|
|
@@ -5223,8 +5277,8 @@ function StreamoidSidebar({
|
|
|
5223
5277
|
children: [
|
|
5224
5278
|
collapsedLogo,
|
|
5225
5279
|
!!(topItems?.length || config.topItem) ? /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
5226
|
-
/* @__PURE__ */
|
|
5227
|
-
/* @__PURE__ */
|
|
5280
|
+
/* @__PURE__ */ jsx52(HDivider, { edgeToEdge: true }),
|
|
5281
|
+
/* @__PURE__ */ jsx52(
|
|
5228
5282
|
"div",
|
|
5229
5283
|
{
|
|
5230
5284
|
className: "flex flex-col items-center shrink-0",
|
|
@@ -5245,10 +5299,10 @@ function StreamoidSidebar({
|
|
|
5245
5299
|
)
|
|
5246
5300
|
}
|
|
5247
5301
|
),
|
|
5248
|
-
/* @__PURE__ */
|
|
5302
|
+
/* @__PURE__ */ jsx52(HDivider, {})
|
|
5249
5303
|
] }) : null,
|
|
5250
|
-
showBody && bodyContent ? /* @__PURE__ */
|
|
5251
|
-
/* @__PURE__ */
|
|
5304
|
+
showBody && bodyContent ? /* @__PURE__ */ jsx52("div", { className: "flex flex-col items-center w-full", children: bodyContent }) : config.sections.map((section, sectionIndex) => /* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-center w-full", children: [
|
|
5305
|
+
/* @__PURE__ */ jsx52(
|
|
5252
5306
|
"div",
|
|
5253
5307
|
{
|
|
5254
5308
|
className: "flex flex-col items-start shrink-0",
|
|
@@ -5271,14 +5325,14 @@ function StreamoidSidebar({
|
|
|
5271
5325
|
)
|
|
5272
5326
|
}
|
|
5273
5327
|
),
|
|
5274
|
-
sectionIndex < config.sections.length - 1 ? /* @__PURE__ */
|
|
5328
|
+
sectionIndex < config.sections.length - 1 ? /* @__PURE__ */ jsx52(HDivider, {}) : null
|
|
5275
5329
|
] }, section.id))
|
|
5276
5330
|
]
|
|
5277
5331
|
}
|
|
5278
5332
|
),
|
|
5279
|
-
assistantCta ? /* @__PURE__ */
|
|
5333
|
+
assistantCta ? /* @__PURE__ */ jsx52(ScAskAgentSlot, { cta: assistantCta, collapsed: true }) : null,
|
|
5280
5334
|
preFooterContent,
|
|
5281
|
-
config.bottomItems?.length ? /* @__PURE__ */
|
|
5335
|
+
config.bottomItems?.length ? /* @__PURE__ */ jsx52(
|
|
5282
5336
|
"div",
|
|
5283
5337
|
{
|
|
5284
5338
|
className: "flex flex-col items-center justify-center shrink-0 w-full",
|
|
@@ -5298,8 +5352,8 @@ function StreamoidSidebar({
|
|
|
5298
5352
|
)
|
|
5299
5353
|
}
|
|
5300
5354
|
) : null,
|
|
5301
|
-
/* @__PURE__ */
|
|
5302
|
-
appIdentity ? /* @__PURE__ */
|
|
5355
|
+
/* @__PURE__ */ jsx52(HDivider, { edgeToEdge: true }),
|
|
5356
|
+
appIdentity ? /* @__PURE__ */ jsx52(
|
|
5303
5357
|
"button",
|
|
5304
5358
|
{
|
|
5305
5359
|
type: "button",
|
|
@@ -5318,7 +5372,7 @@ function StreamoidSidebar({
|
|
|
5318
5372
|
"aria-label": appIdentity.ariaLabel ?? "Switch apps",
|
|
5319
5373
|
children: appIdentity.content
|
|
5320
5374
|
}
|
|
5321
|
-
) : profile ? /* @__PURE__ */
|
|
5375
|
+
) : profile ? /* @__PURE__ */ jsx52(
|
|
5322
5376
|
"div",
|
|
5323
5377
|
{
|
|
5324
5378
|
className: "flex items-center justify-center shrink-0 cursor-pointer",
|
|
@@ -5347,7 +5401,7 @@ function StreamoidSidebar({
|
|
|
5347
5401
|
width: 56
|
|
5348
5402
|
},
|
|
5349
5403
|
children: [
|
|
5350
|
-
/* @__PURE__ */
|
|
5404
|
+
/* @__PURE__ */ jsx52(
|
|
5351
5405
|
"div",
|
|
5352
5406
|
{
|
|
5353
5407
|
className: "flex items-center cursor-pointer",
|
|
@@ -5359,7 +5413,7 @@ function StreamoidSidebar({
|
|
|
5359
5413
|
children: resolveToggleIcon(toggleIcon, false)
|
|
5360
5414
|
}
|
|
5361
5415
|
),
|
|
5362
|
-
versionText ? /* @__PURE__ */
|
|
5416
|
+
versionText ? /* @__PURE__ */ jsx52(
|
|
5363
5417
|
"p",
|
|
5364
5418
|
{
|
|
5365
5419
|
className: "text-text-xs-regular text-center truncate",
|
|
@@ -5428,7 +5482,7 @@ var ScSidebarShell_default = {
|
|
|
5428
5482
|
};
|
|
5429
5483
|
|
|
5430
5484
|
// src/SC-SidebarShell/ScSidebarShell.tsx
|
|
5431
|
-
import { Fragment as Fragment16, jsx as
|
|
5485
|
+
import { Fragment as Fragment16, jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5432
5486
|
function ScSidebarWorkspaceTrigger({
|
|
5433
5487
|
workspaceName,
|
|
5434
5488
|
workspaceImage,
|
|
@@ -5449,7 +5503,7 @@ function ScSidebarWorkspaceTrigger({
|
|
|
5449
5503
|
className: `${ScSidebarShell_default.workspaceTrigger} ${expanded ? ScSidebarShell_default.workspaceTriggerExpanded : ScSidebarShell_default.workspaceTriggerCollapsed}${className ? ` ${className}` : ""}`,
|
|
5450
5504
|
style,
|
|
5451
5505
|
children: [
|
|
5452
|
-
/* @__PURE__ */
|
|
5506
|
+
/* @__PURE__ */ jsx53(
|
|
5453
5507
|
ScDp,
|
|
5454
5508
|
{
|
|
5455
5509
|
type: workspaceImage ? "image" : "initial",
|
|
@@ -5460,8 +5514,8 @@ function ScSidebarWorkspaceTrigger({
|
|
|
5460
5514
|
}
|
|
5461
5515
|
),
|
|
5462
5516
|
expanded ? /* @__PURE__ */ jsxs42(Fragment16, { children: [
|
|
5463
|
-
/* @__PURE__ */
|
|
5464
|
-
/* @__PURE__ */
|
|
5517
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.workspaceName, children: workspaceName }),
|
|
5518
|
+
/* @__PURE__ */ jsx53(
|
|
5465
5519
|
SiconDoubleArrow,
|
|
5466
5520
|
{
|
|
5467
5521
|
size: 16,
|
|
@@ -5489,7 +5543,7 @@ function ScSidebarSearchTrigger({
|
|
|
5489
5543
|
onClick,
|
|
5490
5544
|
className: `${ScSidebarShell_default.searchTrigger} ${expanded ? ScSidebarShell_default.searchTriggerExpanded : ScSidebarShell_default.searchTriggerCollapsed}${className ? ` ${className}` : ""}`,
|
|
5491
5545
|
children: [
|
|
5492
|
-
/* @__PURE__ */
|
|
5546
|
+
/* @__PURE__ */ jsx53(
|
|
5493
5547
|
SiconSearch,
|
|
5494
5548
|
{
|
|
5495
5549
|
size: expanded ? 16 : 18,
|
|
@@ -5497,15 +5551,15 @@ function ScSidebarSearchTrigger({
|
|
|
5497
5551
|
}
|
|
5498
5552
|
),
|
|
5499
5553
|
expanded ? /* @__PURE__ */ jsxs42(Fragment16, { children: [
|
|
5500
|
-
/* @__PURE__ */
|
|
5501
|
-
shortcut ? /* @__PURE__ */
|
|
5554
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.searchLabel, children: label }),
|
|
5555
|
+
shortcut ? /* @__PURE__ */ jsx53("kbd", { className: ScSidebarShell_default.shortcut, children: shortcut }) : null
|
|
5502
5556
|
] }) : null
|
|
5503
5557
|
]
|
|
5504
5558
|
}
|
|
5505
5559
|
);
|
|
5506
5560
|
}
|
|
5507
5561
|
function AppGridIcon() {
|
|
5508
|
-
return /* @__PURE__ */
|
|
5562
|
+
return /* @__PURE__ */ jsx53("span", { "aria-hidden": true, className: ScSidebarShell_default.appGridIcon, children: Array.from({ length: 9 }, (_, index) => /* @__PURE__ */ jsx53("span", {}, index)) });
|
|
5509
5563
|
}
|
|
5510
5564
|
var COMPACT_APP_LABELS = {
|
|
5511
5565
|
// `cxo` is the product; `"streamoid"` (the company) is handled separately
|
|
@@ -5525,22 +5579,22 @@ function ScSidebarAppIdentity({
|
|
|
5525
5579
|
className
|
|
5526
5580
|
}) {
|
|
5527
5581
|
const appLabel = label ?? (product === "streamoid" ? "Streamoid" : product);
|
|
5528
|
-
return /* @__PURE__ */
|
|
5582
|
+
return /* @__PURE__ */ jsx53(
|
|
5529
5583
|
"span",
|
|
5530
5584
|
{
|
|
5531
5585
|
"aria-label": `Switch Apps. Current app: ${appLabel}`,
|
|
5532
5586
|
title: "Switch Apps",
|
|
5533
5587
|
className: `${ScSidebarShell_default.appIdentity} ${expanded ? ScSidebarShell_default.appIdentityExpanded : ScSidebarShell_default.appIdentityCollapsed}${className ? ` ${className}` : ""}`,
|
|
5534
5588
|
children: expanded ? /* @__PURE__ */ jsxs42(Fragment16, { children: [
|
|
5535
|
-
/* @__PURE__ */
|
|
5589
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.appWordmark, children: product === "streamoid" ? /* @__PURE__ */ jsx53(ScStreamoidWordmark, { width: 110, height: 16 }) : /* @__PURE__ */ jsx53(
|
|
5536
5590
|
ScAppcardLogos,
|
|
5537
5591
|
{
|
|
5538
5592
|
product,
|
|
5539
5593
|
style: { height: 16 }
|
|
5540
5594
|
}
|
|
5541
5595
|
) }),
|
|
5542
|
-
/* @__PURE__ */
|
|
5543
|
-
] }) : collapsedMark ?? (product === "streamoid" ? /* @__PURE__ */
|
|
5596
|
+
/* @__PURE__ */ jsx53(AppGridIcon, {})
|
|
5597
|
+
] }) : collapsedMark ?? (product === "streamoid" ? /* @__PURE__ */ jsx53(ScStreamoidMascot, { size: 40 }) : /* @__PURE__ */ jsx53("span", { "aria-hidden": true, className: ScSidebarShell_default.collapsedProductMark, children: collapsedLabel ?? COMPACT_APP_LABELS[product] }))
|
|
5544
5598
|
}
|
|
5545
5599
|
);
|
|
5546
5600
|
}
|
|
@@ -5553,12 +5607,12 @@ function MenuActionRow({
|
|
|
5553
5607
|
ariaLabel
|
|
5554
5608
|
}) {
|
|
5555
5609
|
const content = /* @__PURE__ */ jsxs42(Fragment16, { children: [
|
|
5556
|
-
/* @__PURE__ */
|
|
5557
|
-
/* @__PURE__ */
|
|
5558
|
-
value != null ? /* @__PURE__ */
|
|
5559
|
-
trailing ? /* @__PURE__ */
|
|
5610
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.rowIcon, children: icon }),
|
|
5611
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.rowLabel, children: label }),
|
|
5612
|
+
value != null ? /* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.rowValue, children: value }) : null,
|
|
5613
|
+
trailing ? /* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.rowTrailing, children: trailing }) : null
|
|
5560
5614
|
] });
|
|
5561
|
-
return onClick ? /* @__PURE__ */
|
|
5615
|
+
return onClick ? /* @__PURE__ */ jsx53(
|
|
5562
5616
|
"button",
|
|
5563
5617
|
{
|
|
5564
5618
|
type: "button",
|
|
@@ -5567,13 +5621,13 @@ function MenuActionRow({
|
|
|
5567
5621
|
className: ScSidebarShell_default.actionRow,
|
|
5568
5622
|
children: content
|
|
5569
5623
|
}
|
|
5570
|
-
) : /* @__PURE__ */
|
|
5624
|
+
) : /* @__PURE__ */ jsx53("div", { className: `${ScSidebarShell_default.actionRow} ${ScSidebarShell_default.actionRowStatic}`, children: content });
|
|
5571
5625
|
}
|
|
5572
5626
|
function SectionTitle({ children }) {
|
|
5573
|
-
return /* @__PURE__ */
|
|
5627
|
+
return /* @__PURE__ */ jsx53("h2", { className: ScSidebarShell_default.sectionTitle, children });
|
|
5574
5628
|
}
|
|
5575
5629
|
function ChevronRight() {
|
|
5576
|
-
return /* @__PURE__ */
|
|
5630
|
+
return /* @__PURE__ */ jsx53("span", { "aria-hidden": true, className: ScSidebarShell_default.chevronRight, children: "\u203A" });
|
|
5577
5631
|
}
|
|
5578
5632
|
function ScWorkspaceAccountMenu({
|
|
5579
5633
|
workspaceName,
|
|
@@ -5613,7 +5667,7 @@ function ScWorkspaceAccountMenu({
|
|
|
5613
5667
|
...props,
|
|
5614
5668
|
children: [
|
|
5615
5669
|
/* @__PURE__ */ jsxs42("section", { className: ScSidebarShell_default.section, children: [
|
|
5616
|
-
/* @__PURE__ */
|
|
5670
|
+
/* @__PURE__ */ jsx53(SectionTitle, { children: "Workspace" }),
|
|
5617
5671
|
/* @__PURE__ */ jsxs42(
|
|
5618
5672
|
"button",
|
|
5619
5673
|
{
|
|
@@ -5622,7 +5676,7 @@ function ScWorkspaceAccountMenu({
|
|
|
5622
5676
|
onClick: onSwitchWorkspace,
|
|
5623
5677
|
className: ScSidebarShell_default.identityRow,
|
|
5624
5678
|
children: [
|
|
5625
|
-
/* @__PURE__ */
|
|
5679
|
+
/* @__PURE__ */ jsx53(
|
|
5626
5680
|
ScDp,
|
|
5627
5681
|
{
|
|
5628
5682
|
type: workspaceImage ? "image" : "initial",
|
|
@@ -5633,52 +5687,52 @@ function ScWorkspaceAccountMenu({
|
|
|
5633
5687
|
}
|
|
5634
5688
|
),
|
|
5635
5689
|
/* @__PURE__ */ jsxs42("span", { className: ScSidebarShell_default.identityText, children: [
|
|
5636
|
-
/* @__PURE__ */
|
|
5690
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.identityName, children: workspaceName }),
|
|
5637
5691
|
/* @__PURE__ */ jsxs42("span", { className: ScSidebarShell_default.identitySubtitle, children: [
|
|
5638
5692
|
normalizedRole,
|
|
5639
5693
|
" \xB7 Switch or create"
|
|
5640
5694
|
] })
|
|
5641
5695
|
] }),
|
|
5642
|
-
/* @__PURE__ */
|
|
5696
|
+
/* @__PURE__ */ jsx53(ChevronRight, {})
|
|
5643
5697
|
]
|
|
5644
5698
|
}
|
|
5645
5699
|
),
|
|
5646
|
-
/* @__PURE__ */
|
|
5700
|
+
/* @__PURE__ */ jsx53(
|
|
5647
5701
|
MenuActionRow,
|
|
5648
5702
|
{
|
|
5649
|
-
icon: /* @__PURE__ */
|
|
5703
|
+
icon: /* @__PURE__ */ jsx53(SiconTeam4, { size: 20, color: primaryIcon }),
|
|
5650
5704
|
label: "Invite Members",
|
|
5651
5705
|
onClick: onInviteMembers
|
|
5652
5706
|
}
|
|
5653
5707
|
),
|
|
5654
|
-
/* @__PURE__ */
|
|
5708
|
+
/* @__PURE__ */ jsx53(
|
|
5655
5709
|
MenuActionRow,
|
|
5656
5710
|
{
|
|
5657
|
-
icon: /* @__PURE__ */
|
|
5711
|
+
icon: /* @__PURE__ */ jsx53(SiconBilling4, { size: 20, color: primaryIcon }),
|
|
5658
5712
|
label: "Billing & Usage",
|
|
5659
5713
|
value: creditsLabel,
|
|
5660
5714
|
onClick: onBilling
|
|
5661
5715
|
}
|
|
5662
5716
|
)
|
|
5663
5717
|
] }),
|
|
5664
|
-
/* @__PURE__ */
|
|
5718
|
+
/* @__PURE__ */ jsx53("div", { "aria-hidden": true, className: ScSidebarShell_default.divider }),
|
|
5665
5719
|
/* @__PURE__ */ jsxs42("section", { className: ScSidebarShell_default.section, children: [
|
|
5666
|
-
/* @__PURE__ */
|
|
5667
|
-
/* @__PURE__ */
|
|
5720
|
+
/* @__PURE__ */ jsx53(SectionTitle, { children: "Organization" }),
|
|
5721
|
+
/* @__PURE__ */ jsx53(
|
|
5668
5722
|
MenuActionRow,
|
|
5669
5723
|
{
|
|
5670
|
-
icon: /* @__PURE__ */
|
|
5724
|
+
icon: /* @__PURE__ */ jsx53(SiconWorkspace, { size: 20, color: primaryIcon }),
|
|
5671
5725
|
label: organizationName || "No organization",
|
|
5672
5726
|
value: organizationName && organizationRole ? organizationRole : void 0,
|
|
5673
5727
|
ariaLabel: organizationName ? `Open ${organizationName} organization settings` : void 0,
|
|
5674
|
-
trailing: organizationName ? /* @__PURE__ */
|
|
5728
|
+
trailing: organizationName ? /* @__PURE__ */ jsx53(ChevronRight, {}) : void 0,
|
|
5675
5729
|
onClick: organizationName ? onOrganizationClick : void 0
|
|
5676
5730
|
}
|
|
5677
5731
|
)
|
|
5678
5732
|
] }),
|
|
5679
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx53("div", { "aria-hidden": true, className: ScSidebarShell_default.divider }),
|
|
5680
5734
|
/* @__PURE__ */ jsxs42("section", { className: ScSidebarShell_default.section, children: [
|
|
5681
|
-
/* @__PURE__ */
|
|
5735
|
+
/* @__PURE__ */ jsx53(SectionTitle, { children: "Account" }),
|
|
5682
5736
|
/* @__PURE__ */ jsxs42(
|
|
5683
5737
|
"button",
|
|
5684
5738
|
{
|
|
@@ -5687,7 +5741,7 @@ function ScWorkspaceAccountMenu({
|
|
|
5687
5741
|
onClick: onAccountClick,
|
|
5688
5742
|
className: ScSidebarShell_default.identityRow,
|
|
5689
5743
|
children: [
|
|
5690
|
-
/* @__PURE__ */
|
|
5744
|
+
/* @__PURE__ */ jsx53(
|
|
5691
5745
|
ScDp,
|
|
5692
5746
|
{
|
|
5693
5747
|
type: accountImage ? "image" : "initial",
|
|
@@ -5698,16 +5752,16 @@ function ScWorkspaceAccountMenu({
|
|
|
5698
5752
|
}
|
|
5699
5753
|
),
|
|
5700
5754
|
/* @__PURE__ */ jsxs42("span", { className: ScSidebarShell_default.identityText, children: [
|
|
5701
|
-
/* @__PURE__ */
|
|
5702
|
-
accountEmail ? /* @__PURE__ */
|
|
5755
|
+
/* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.identityName, children: accountName }),
|
|
5756
|
+
accountEmail ? /* @__PURE__ */ jsx53("span", { className: ScSidebarShell_default.identitySubtitle, children: accountEmail }) : null
|
|
5703
5757
|
] }),
|
|
5704
|
-
/* @__PURE__ */
|
|
5758
|
+
/* @__PURE__ */ jsx53(ChevronRight, {})
|
|
5705
5759
|
]
|
|
5706
5760
|
}
|
|
5707
5761
|
),
|
|
5708
|
-
/* @__PURE__ */
|
|
5762
|
+
/* @__PURE__ */ jsx53("div", { role: "radiogroup", "aria-label": "Theme", className: ScSidebarShell_default.themePicker, children: themes.map(({ value, label, icon: Icon }) => {
|
|
5709
5763
|
const selected = themeMode === value;
|
|
5710
|
-
return /* @__PURE__ */
|
|
5764
|
+
return /* @__PURE__ */ jsx53(
|
|
5711
5765
|
"button",
|
|
5712
5766
|
{
|
|
5713
5767
|
type: "button",
|
|
@@ -5717,7 +5771,7 @@ function ScWorkspaceAccountMenu({
|
|
|
5717
5771
|
title: label,
|
|
5718
5772
|
onClick: () => onThemeModeChange?.(value),
|
|
5719
5773
|
className: `${ScSidebarShell_default.themeButton}${selected ? ` ${ScSidebarShell_default.themeButtonSelected}` : ""}`,
|
|
5720
|
-
children: /* @__PURE__ */
|
|
5774
|
+
children: /* @__PURE__ */ jsx53(
|
|
5721
5775
|
Icon,
|
|
5722
5776
|
{
|
|
5723
5777
|
size: 20,
|
|
@@ -6104,45 +6158,6 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
|
|
|
6104
6158
|
return position;
|
|
6105
6159
|
}
|
|
6106
6160
|
|
|
6107
|
-
// src/SC-SidebarShell/ScPopoverArrow.tsx
|
|
6108
|
-
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
6109
|
-
function ScPopoverArrow({
|
|
6110
|
-
arrow,
|
|
6111
|
-
background = "var(--alias-surface-base, #101010)",
|
|
6112
|
-
borderColor = "var(--alias-border-default, #3e3e3e)",
|
|
6113
|
-
size = 12,
|
|
6114
|
-
style
|
|
6115
|
-
}) {
|
|
6116
|
-
if (!arrow) return null;
|
|
6117
|
-
const half = size / 2;
|
|
6118
|
-
const onLeftEdge = arrow.side === "left";
|
|
6119
|
-
return /* @__PURE__ */ jsx53(
|
|
6120
|
-
"span",
|
|
6121
|
-
{
|
|
6122
|
-
"aria-hidden": true,
|
|
6123
|
-
"data-streamoid-popover-arrow": arrow.side,
|
|
6124
|
-
style: {
|
|
6125
|
-
position: "absolute",
|
|
6126
|
-
top: arrow.top - half,
|
|
6127
|
-
[onLeftEdge ? "left" : "right"]: -half,
|
|
6128
|
-
width: size,
|
|
6129
|
-
height: size,
|
|
6130
|
-
background,
|
|
6131
|
-
/* Only the two edges that face away from the card. The other two sit
|
|
6132
|
-
under it, where a border would draw a line across the card's own
|
|
6133
|
-
edge. */
|
|
6134
|
-
borderTop: onLeftEdge ? "none" : `1px solid ${borderColor}`,
|
|
6135
|
-
borderRight: onLeftEdge ? "none" : `1px solid ${borderColor}`,
|
|
6136
|
-
borderBottom: onLeftEdge ? `1px solid ${borderColor}` : "none",
|
|
6137
|
-
borderLeft: onLeftEdge ? `1px solid ${borderColor}` : "none",
|
|
6138
|
-
transform: "rotate(45deg)",
|
|
6139
|
-
pointerEvents: "none",
|
|
6140
|
-
...style
|
|
6141
|
-
}
|
|
6142
|
-
}
|
|
6143
|
-
);
|
|
6144
|
-
}
|
|
6145
|
-
|
|
6146
6161
|
// src/SC-SidebarShell/useStreamoidSidebarPopoverPosition.ts
|
|
6147
6162
|
import {
|
|
6148
6163
|
useLayoutEffect as useLayoutEffect2,
|