@streamoid/ui 0.6.55 → 0.6.57
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 +2 -2
- package/dist/docs/ScWorkspaceAccountMenu.md +49 -1
- package/dist/docs/components.json +11 -1
- package/dist/index.d.mts +85 -2
- package/dist/index.d.ts +85 -2
- package/dist/index.js +101 -68
- package/dist/index.mjs +62 -29
- package/package.json +3 -2
package/dist/docs/AGENTS.md
CHANGED
|
@@ -183,8 +183,8 @@ theme-aware (dark on `:root`, light override) — never hardcode a colour.
|
|
|
183
183
|
- **`ScSidebarProfile`** _(legacy)_ — use when never. There is no way to pass a real user through it.
|
|
184
184
|
- **`ScSidebarSwitchMenu`** — use when you're building a "switch to another product" list inside a sidebar and each entry needs a name **and** a subtitle.
|
|
185
185
|
- **`ScVersion`** _(legacy)_ — use when never. `StreamoidSidebar` renders its own version footer inline from `versionText`.
|
|
186
|
-
- **`ScWorkspaceAccountMenu`** — use when building the standard workspace menu opened from the top-left of a Streamoid application sidebar. - Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and `ScSidebarAppIdentity` for the matching constant rail controls. - Use the two preference hooks so theme and expanded/collapsed state survive an app switch across Streamoid subdomains. - Use `useStreamoidSidebarPopoverPosition` for a panel that belongs to the whole rail (the upper-right workspace menu) instead of hard-coded host coordinates. - Use `useStreamoidAnchoredPopoverPosition` for a panel that belongs to a BUTTON — the app switcher's grid trigger, a row's overflow menu. Pinning one of those to the sidebar card's edge leaves it floating mid-canvas with nothing connecting it to what was clicked; in Artifax it landed over the chat composer and its Send button.
|
|
187
|
-
- also documented here: `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, `ScSidebarAppIdentity`, `ScPopoverArrow`, `useStreamoidThemePreference`, `useStreamoidSidebarPreference`, `useStreamoidSidebarPopoverPosition`, `useStreamoidAnchoredPopover`, `useStreamoidAnchoredPopoverPosition`, `resolveAnchoredPopoverArrow`, `resolveAnchoredPopoverPosition`
|
|
186
|
+
- **`ScWorkspaceAccountMenu`** — use when building the standard workspace menu opened from the top-left of a Streamoid application sidebar. - Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and `ScSidebarAppIdentity` for the matching constant rail controls. - Wire `ScSidebarSearchTrigger`'s `onPrefetch` AND `useStreamoidSearchShortcut` whenever the trigger opens a lazily-loaded dialog — which is every product. Without them the `⌘ K` the trigger draws does nothing, and the first click sits on a blank screen while the chunk downloads. - Use the two preference hooks so theme and expanded/collapsed state survive an app switch across Streamoid subdomains. - Use `useStreamoidSidebarPopoverPosition` for a panel that belongs to the whole rail (the upper-right workspace menu) instead of hard-coded host coordinates. - Use `useStreamoidAnchoredPopoverPosition` for a panel that belongs to a BUTTON — the app switcher's grid trigger, a row's overflow menu. Pinning one of those to the sidebar card's edge leaves it floating mid-canvas with nothing connecting it to what was clicked; in Artifax it landed over the chat composer and its Send button.
|
|
187
|
+
- also documented here: `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, `ScSidebarAppIdentity`, `ScPopoverArrow`, `useStreamoidThemePreference`, `useStreamoidSidebarPreference`, `useStreamoidSidebarPopoverPosition`, `useStreamoidAnchoredPopover`, `useStreamoidAnchoredPopoverPosition`, `useStreamoidSearchShortcut`, `matchesStreamoidSearchShortcut`, `resolveAnchoredPopoverArrow`, `resolveAnchoredPopoverPosition`
|
|
188
188
|
- **`StreamoidSidebar`** — use when you are building (or fixing) a desktop app's primary left navigation and you want the same chrome CXO, Photogenix and Catalogix use.
|
|
189
189
|
- also documented here: `ScSidebarResizeHandle`, `advanceSidebarResizeGesture`, `SIDEBAR_RESIZE_THRESHOLD_PX`
|
|
190
190
|
|
|
@@ -9,7 +9,7 @@ related: [StreamoidSidebar, ScArtifaxSidebar, ScAppSwitchPanel, ScProfilePopup]
|
|
|
9
9
|
do_not_confuse_with: [ScProfilePopup, ScWorkspaceSwitcher, ScAppSwitchPanel]
|
|
10
10
|
used_by: [cxo, artifax, catalogix, photogenix]
|
|
11
11
|
required_props: [workspaceName, accountName]
|
|
12
|
-
also_exports: [ScSidebarWorkspaceTrigger, ScSidebarSearchTrigger, ScSidebarAppIdentity, ScPopoverArrow, useStreamoidThemePreference, useStreamoidSidebarPreference, useStreamoidSidebarPopoverPosition, useStreamoidAnchoredPopover, useStreamoidAnchoredPopoverPosition, resolveAnchoredPopoverArrow, resolveAnchoredPopoverPosition]
|
|
12
|
+
also_exports: [ScSidebarWorkspaceTrigger, ScSidebarSearchTrigger, ScSidebarAppIdentity, ScPopoverArrow, useStreamoidThemePreference, useStreamoidSidebarPreference, useStreamoidSidebarPopoverPosition, useStreamoidAnchoredPopover, useStreamoidAnchoredPopoverPosition, useStreamoidSearchShortcut, matchesStreamoidSearchShortcut, resolveAnchoredPopoverArrow, resolveAnchoredPopoverPosition]
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# Shared Streamoid sidebar shell
|
|
@@ -25,6 +25,10 @@ shared popover-position hook keeps the desktop anchors consistent.
|
|
|
25
25
|
top-left of a Streamoid application sidebar.
|
|
26
26
|
- Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and
|
|
27
27
|
`ScSidebarAppIdentity` for the matching constant rail controls.
|
|
28
|
+
- Wire `ScSidebarSearchTrigger`'s `onPrefetch` AND `useStreamoidSearchShortcut`
|
|
29
|
+
whenever the trigger opens a lazily-loaded dialog — which is every product.
|
|
30
|
+
Without them the `⌘ K` the trigger draws does nothing, and the first click
|
|
31
|
+
sits on a blank screen while the chunk downloads.
|
|
28
32
|
- Use the two preference hooks so theme and expanded/collapsed state survive an
|
|
29
33
|
app switch across Streamoid subdomains.
|
|
30
34
|
- Use `useStreamoidSidebarPopoverPosition` for a panel that belongs to the
|
|
@@ -67,6 +71,40 @@ const appSwitcherPosition = useStreamoidAnchoredPopoverPosition(
|
|
|
67
71
|
);
|
|
68
72
|
```
|
|
69
73
|
|
|
74
|
+
### `ScSidebarSearchTrigger` — the two props nobody wired
|
|
75
|
+
|
|
76
|
+
The trigger renders a `⌘ K` hint and opens a dialog the host owns. Both halves
|
|
77
|
+
of that promise need wiring, and for a long time neither was:
|
|
78
|
+
|
|
79
|
+
```tsx
|
|
80
|
+
import {
|
|
81
|
+
ScSidebarSearchTrigger,
|
|
82
|
+
useStreamoidSearchShortcut,
|
|
83
|
+
} from "@streamoid/ui";
|
|
84
|
+
|
|
85
|
+
const [searchOpen, setSearchOpen] = useState(false);
|
|
86
|
+
|
|
87
|
+
// The chord the trigger advertises. A TOGGLE, not an open — every other
|
|
88
|
+
// command palette closes on the same keys that opened it.
|
|
89
|
+
useStreamoidSearchShortcut({ onTrigger: () => setSearchOpen((o) => !o) });
|
|
90
|
+
|
|
91
|
+
<ScSidebarSearchTrigger
|
|
92
|
+
expanded={expanded}
|
|
93
|
+
onClick={() => setSearchOpen(true)}
|
|
94
|
+
// Hover and focus, before the click. In CXO and Artifax this dialog lives in
|
|
95
|
+
// `@streamoid/agent` — 5.3MB behind a `Suspense` fallback of `null` — so the
|
|
96
|
+
// FIRST click looked like it did nothing at all. On intent rather than on
|
|
97
|
+
// idle: most sessions never open it and should not download it.
|
|
98
|
+
onPrefetch={() => void import("@streamoid/agent")}
|
|
99
|
+
/>;
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`ScArtifaxSidebar` forwards the same thing as `header.onSearchPrefetch`.
|
|
103
|
+
|
|
104
|
+
`matchesStreamoidSearchShortcut(event, letter?)` is the hook's chord test,
|
|
105
|
+
exported separately so a host with its own key handling can ask the same
|
|
106
|
+
question rather than re-deriving the modifier rules.
|
|
107
|
+
|
|
70
108
|
### `useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, options)`
|
|
71
109
|
|
|
72
110
|
| Option | Type | Default | Purpose |
|
|
@@ -146,6 +184,16 @@ copies of the same shell.
|
|
|
146
184
|
- Legacy sidebar keys describe the collapsed state, while the hook exposes the
|
|
147
185
|
positive `expanded` state. Both hooks continue mirroring supplied legacy keys
|
|
148
186
|
so older code in the same host stays synchronized during migration.
|
|
187
|
+
- `useStreamoidSearchShortcut` calls `preventDefault`. It has to: Chrome and
|
|
188
|
+
Firefox both send Ctrl+K to the address bar, so without it the rail's own
|
|
189
|
+
search loses to the browser. It also fires while a text field has focus,
|
|
190
|
+
which is deliberate — the chord is how you leave the field.
|
|
191
|
+
- `onPrefetch` fires on EVERY hover, so it must be cheap and idempotent. A bare
|
|
192
|
+
`() => void import("…")` is the intended shape; dynamic imports are cached,
|
|
193
|
+
so the second hover costs nothing. Do not put a fetch behind it.
|
|
194
|
+
- The shortcut matches on `event.key`, not `event.code`. `code` is physical, so
|
|
195
|
+
on AZERTY or Dvorak the key labelled K is not `KeyK` and the shortcut would
|
|
196
|
+
land somewhere other than the `⌘ K` the rail is showing.
|
|
149
197
|
|
|
150
198
|
## In the wild
|
|
151
199
|
|
|
@@ -2829,7 +2829,7 @@
|
|
|
2829
2829
|
"status": "stable",
|
|
2830
2830
|
"renders": "div",
|
|
2831
2831
|
"summary": "Reach for it when:",
|
|
2832
|
-
"reachForWhen": "building the standard workspace menu opened from the top-left of a Streamoid application sidebar. - Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and `ScSidebarAppIdentity` for the matching constant rail controls. - Use the two preference hooks so theme and expanded/collapsed state survive an app switch across Streamoid subdomains. - Use `useStreamoidSidebarPopoverPosition` for a panel that belongs to the whole rail (the upper-right workspace menu) instead of hard-coded host coordinates. - Use `useStreamoidAnchoredPopoverPosition` for a panel that belongs to a BUTTON — the app switcher's grid trigger, a row's overflow menu. Pinning one of those to the sidebar card's edge leaves it floating mid-canvas with nothing connecting it to what was clicked; in Artifax it landed over the chat composer and its Send button.",
|
|
2832
|
+
"reachForWhen": "building the standard workspace menu opened from the top-left of a Streamoid application sidebar. - Use `ScSidebarWorkspaceTrigger`, `ScSidebarSearchTrigger`, and `ScSidebarAppIdentity` for the matching constant rail controls. - Wire `ScSidebarSearchTrigger`'s `onPrefetch` AND `useStreamoidSearchShortcut` whenever the trigger opens a lazily-loaded dialog — which is every product. Without them the `⌘ K` the trigger draws does nothing, and the first click sits on a blank screen while the chunk downloads. - Use the two preference hooks so theme and expanded/collapsed state survive an app switch across Streamoid subdomains. - Use `useStreamoidSidebarPopoverPosition` for a panel that belongs to the whole rail (the upper-right workspace menu) instead of hard-coded host coordinates. - Use `useStreamoidAnchoredPopoverPosition` for a panel that belongs to a BUTTON — the app switcher's grid trigger, a row's overflow menu. Pinning one of those to the sidebar card's edge leaves it floating mid-canvas with nothing connecting it to what was clicked; in Artifax it landed over the chat composer and its Send button.",
|
|
2833
2833
|
"tags": [
|
|
2834
2834
|
"sidebar",
|
|
2835
2835
|
"workspace",
|
|
@@ -2869,6 +2869,8 @@
|
|
|
2869
2869
|
"useStreamoidSidebarPopoverPosition",
|
|
2870
2870
|
"useStreamoidAnchoredPopover",
|
|
2871
2871
|
"useStreamoidAnchoredPopoverPosition",
|
|
2872
|
+
"useStreamoidSearchShortcut",
|
|
2873
|
+
"matchesStreamoidSearchShortcut",
|
|
2872
2874
|
"resolveAnchoredPopoverArrow",
|
|
2873
2875
|
"resolveAnchoredPopoverPosition"
|
|
2874
2876
|
],
|
|
@@ -5133,6 +5135,14 @@
|
|
|
5133
5135
|
"documentedIn": "ScWorkspaceAccountMenu",
|
|
5134
5136
|
"doc": "ScWorkspaceAccountMenu.md"
|
|
5135
5137
|
},
|
|
5138
|
+
"useStreamoidSearchShortcut": {
|
|
5139
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
5140
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
5141
|
+
},
|
|
5142
|
+
"matchesStreamoidSearchShortcut": {
|
|
5143
|
+
"documentedIn": "ScWorkspaceAccountMenu",
|
|
5144
|
+
"doc": "ScWorkspaceAccountMenu.md"
|
|
5145
|
+
},
|
|
5136
5146
|
"resolveAnchoredPopoverArrow": {
|
|
5137
5147
|
"documentedIn": "ScWorkspaceAccountMenu",
|
|
5138
5148
|
"doc": "ScWorkspaceAccountMenu.md"
|
package/dist/index.d.mts
CHANGED
|
@@ -998,9 +998,26 @@ interface ScSidebarSearchTriggerProps {
|
|
|
998
998
|
label?: string;
|
|
999
999
|
shortcut?: string;
|
|
1000
1000
|
onClick?: () => void;
|
|
1001
|
+
/**
|
|
1002
|
+
* Hover or keyboard-focus, BEFORE the click — the host's cue to start
|
|
1003
|
+
* fetching whatever the search dialog needs.
|
|
1004
|
+
*
|
|
1005
|
+
* Every product opens this trigger onto a lazily-loaded dialog, and in CXO
|
|
1006
|
+
* and Artifax that dialog lives in `@streamoid/agent`: 5.3MB, behind a
|
|
1007
|
+
* `Suspense` fallback of `null`. So the FIRST click looked like it did
|
|
1008
|
+
* nothing at all while the chunk downloaded. Hovering is a strong enough
|
|
1009
|
+
* signal to pay for the same bytes the click needs a moment later, and it is
|
|
1010
|
+
* the reason this is on hover rather than on idle — most sessions never open
|
|
1011
|
+
* the dialog and should not download it.
|
|
1012
|
+
*
|
|
1013
|
+
* Must be cheap and idempotent: it fires on EVERY hover. A bare
|
|
1014
|
+
* `() => void import('@streamoid/agent')` is the intended shape — dynamic
|
|
1015
|
+
* imports are cached, so the second call costs nothing.
|
|
1016
|
+
*/
|
|
1017
|
+
onPrefetch?: () => void;
|
|
1001
1018
|
className?: string;
|
|
1002
1019
|
}
|
|
1003
|
-
declare function ScSidebarSearchTrigger({ expanded, label, shortcut, onClick, className, }: ScSidebarSearchTriggerProps): JSX.Element;
|
|
1020
|
+
declare function ScSidebarSearchTrigger({ expanded, label, shortcut, onClick, onPrefetch, className, }: ScSidebarSearchTriggerProps): JSX.Element;
|
|
1004
1021
|
interface ScSidebarAppIdentityProps {
|
|
1005
1022
|
expanded: boolean;
|
|
1006
1023
|
product?: AppcardProduct | "streamoid";
|
|
@@ -1043,6 +1060,67 @@ interface ScWorkspaceAccountMenuProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
1043
1060
|
/** Shared workspace/account menu used by every Streamoid application sidebar. */
|
|
1044
1061
|
declare function ScWorkspaceAccountMenu({ workspaceName, workspaceRole, workspaceImage, credits, onSwitchWorkspace, onInviteMembers, onBilling, organizationName, organizationRole, onOrganizationClick, accountName, accountEmail, accountImage, onAccountClick, themeMode, onThemeModeChange, className, ...props }: ScWorkspaceAccountMenuProps): JSX.Element;
|
|
1045
1062
|
|
|
1063
|
+
/** The shape `matchesStreamoidSearchShortcut` needs — a subset of
|
|
1064
|
+
* `KeyboardEvent`, so the predicate is testable without a DOM. */
|
|
1065
|
+
interface StreamoidSearchShortcutEvent {
|
|
1066
|
+
key: string;
|
|
1067
|
+
metaKey: boolean;
|
|
1068
|
+
ctrlKey: boolean;
|
|
1069
|
+
altKey: boolean;
|
|
1070
|
+
/** `true` on the `keydown`s the OS synthesises while the chord is HELD.
|
|
1071
|
+
* Optional so a caller hand-building an event object does not have to know
|
|
1072
|
+
* about it; absent reads as a first press. */
|
|
1073
|
+
repeat?: boolean;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Is this keydown the search chord?
|
|
1077
|
+
*
|
|
1078
|
+
* Pure and exported so the decision can be tested without a DOM, the same way
|
|
1079
|
+
* `resolvePanelResize` is split out of the resize handle.
|
|
1080
|
+
*
|
|
1081
|
+
* - `metaKey` OR `ctrlKey`, so one binding serves macOS and everything else.
|
|
1082
|
+
* - `altKey` is excluded, so ⌥⌘K and Ctrl+Alt+K stay with the browser.
|
|
1083
|
+
* - `event.key` and not `event.code`: `key` carries the CHARACTER, already
|
|
1084
|
+
* resolved through the keyboard layout. `code` is physical, so on AZERTY or
|
|
1085
|
+
* Dvorak the key labelled K is not `KeyK` and the shortcut would land under
|
|
1086
|
+
* a different letter than the `⌘ K` hint promises.
|
|
1087
|
+
* - A REPEAT IS NOT A SECOND PRESS. Auto-repeat fires `keydown` every few
|
|
1088
|
+
* tens of ms once the OS delay passes, and the hook drives a TOGGLE — so
|
|
1089
|
+
* without this, holding the chord flickers the dialog open and shut for as
|
|
1090
|
+
* long as the key is down. Found by review on cxo-dashboard, where the
|
|
1091
|
+
* hand-rolled listener this replaces had exactly that bug.
|
|
1092
|
+
*/
|
|
1093
|
+
declare function matchesStreamoidSearchShortcut(event: StreamoidSearchShortcutEvent, letter?: string): boolean;
|
|
1094
|
+
interface StreamoidSearchShortcutOptions {
|
|
1095
|
+
/** Fired on ⌘K / Ctrl+K. Its identity does not matter — it is read through a
|
|
1096
|
+
* ref, so an inline arrow will not rebind the listener each render. */
|
|
1097
|
+
onTrigger: () => void;
|
|
1098
|
+
/** Bind the key. `false` unbinds — e.g. while a modal owns the keyboard. */
|
|
1099
|
+
enabled?: boolean;
|
|
1100
|
+
/** The letter pressed with the modifier. Case-insensitive. */
|
|
1101
|
+
letter?: string;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* ⌘K / Ctrl+K, for the dialog `ScSidebarSearchTrigger` advertises.
|
|
1105
|
+
*
|
|
1106
|
+
* The trigger has drawn a `⌘ K` hint since it shipped and NO APP EVER BOUND THE
|
|
1107
|
+
* KEY — the one affordance telling people the rail has a command bar did
|
|
1108
|
+
* nothing when used. This lives here so the component that makes the promise
|
|
1109
|
+
* and the hook that keeps it ship together, rather than each product
|
|
1110
|
+
* rediscovering the same eight lines and getting the modifier handling
|
|
1111
|
+
* slightly different.
|
|
1112
|
+
*
|
|
1113
|
+
* The host still owns the dialog's open state, so this reports the chord and
|
|
1114
|
+
* decides nothing. Wire it to a TOGGLE rather than an open: every other command
|
|
1115
|
+
* palette closes on the same chord that opened it.
|
|
1116
|
+
*
|
|
1117
|
+
* It calls `preventDefault`, because Ctrl+K is taken — Chrome and Firefox both
|
|
1118
|
+
* send it to the address bar, and without this the rail's own search loses to
|
|
1119
|
+
* the browser. And it fires even while a text field has focus, which is
|
|
1120
|
+
* deliberate: the chord is how you leave the field.
|
|
1121
|
+
*/
|
|
1122
|
+
declare function useStreamoidSearchShortcut({ onTrigger, enabled, letter, }: StreamoidSearchShortcutOptions): void;
|
|
1123
|
+
|
|
1046
1124
|
interface StreamoidThemePreferenceOptions {
|
|
1047
1125
|
defaultMode?: ScShellThemeMode;
|
|
1048
1126
|
legacyStorageKeys?: string[];
|
|
@@ -1322,6 +1400,11 @@ interface AppSidebarHeader {
|
|
|
1322
1400
|
searchLabel?: string;
|
|
1323
1401
|
searchShortcut?: string;
|
|
1324
1402
|
onSearchClick?: () => void;
|
|
1403
|
+
/** Hover/focus on the search trigger, so the host can start loading the
|
|
1404
|
+
* dialog before it is clicked. See `ScSidebarSearchTriggerProps.onPrefetch`
|
|
1405
|
+
* — the dialog is a 5.3MB lazy chunk in CXO and Artifax, and without this
|
|
1406
|
+
* the first click looks inert while it downloads. */
|
|
1407
|
+
onSearchPrefetch?: () => void;
|
|
1325
1408
|
/** Omit the search field entirely — a product that has no search yet. */
|
|
1326
1409
|
hideSearch?: boolean;
|
|
1327
1410
|
}
|
|
@@ -2691,4 +2774,4 @@ interface IScProfilePopupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
2691
2774
|
*/
|
|
2692
2775
|
declare const ScProfilePopup: React$1.ForwardRefExoticComponent<IScProfilePopupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2693
2776
|
|
|
2694
|
-
export { type AppSidebarAppIdentity, type AppSidebarAssistantCta, type AppSidebarCreditWarning, type AppSidebarHeader, type AppSidebarIconContext, type AppSidebarIconMap, type AppSidebarIconRenderer, type AppSidebarMenuItem, type AppSidebarProfile, type AppSidebarSection, type AppcardProduct, type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAppIdentity, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, type AssistantCta, type CatalogixNavItem, type CatalogixSidebarCreditWarning, type CatalogixSidebarIconContext, type CatalogixSidebarIconMap, type CatalogixSidebarIconRenderer, type CatalogixSidebarProfile, type CatalogixSwitchApp, CreditWarningBanner, type CreditWarningBannerProps, type DescriptionVisibility, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAnnotatedError, type IScAppCardForCopilotProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScAppSidebarProps, type IScAppSwitchPanelProps, type IScAppcardLogosProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScAskAgentButtonProps, type IScBadgesProps, type IScBeaconProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCatalogixSidebarProps, type IScCatalogixStoreHeaderProps, type IScCatalogixStoreTableListProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCounterProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScCxoCopilotLogoProps, type IScCxoWordmarkProps, type IScDefaultCardProps, type IScDrawerProps, type IScErrorBoundaryProps, type IScErrorReport, type IScErrorReporterClient, type IScFieldButtonProps, type IScFileFieldProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScInChatListProps, type IScInChatMessageProps, type IScInfoPopupProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMappingCardProps, type IScMediaApprovalProps, type IScMediaSelectProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScModalProps, type IScNewVersionNoticeProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPaginationProps, type IScPairtextProps, type IScPanelResizeHandleProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanComparisonProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScPopoverArrowProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfilePopupProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSelectOption, type IScSelectProps, type IScSelectionListProps, type IScSelectionPillGroupProps, type IScSelectionPillOption, type IScSelectionPillProps, type IScSelectionProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarPopoverProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSidebarSwitchMenuProps, type IScSliderProps, type IScStoreCardProps, type IScStrLogoProps, type IScStreamoidMascotProps, type IScStreamoidWordmarkProps, type IScSubAgentProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTabsProps, type IScTaxonomyPillProps, type IScTextAreaProps, type IScTextFieldProps, type IScThinkingStepIconProps, type IScTodoItem, type IScTodoListProps, type IScToggleSwitchProps, type IScVDividerProps, type IScValueMappingL1Props, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, type IUseNewVersionAvailableOptions, type IcListIconState, InvoiceHistoryMobile, NscWorkspaceSwitch, PANEL_RESIZE_STEP_PX, type PanelResizeEdge, type PanelResizeGesture, type PanelWidthBounds, type PlanComparisonRow, type PlanComparisonSection, type PlanFeatureSection, ProductCollapsedMark, ProductWordmark, SC_APP_SWITCH_PANEL_WIDTH, SC_WORKSPACE_MENU_WIDTH, SIDEBAR_RESIZE_THRESHOLD_PX, STREAMOID_CHANGELOG_URL, STREAMOID_CHANGELOG_URLS, STREAMOID_STATUS_PAGE_URL, ScAccess, ScAppCard, ScAppCardForCopilot, ScAppCardV3, ScAppField, ScAppListingCard, ScAppSidebar, type ScAppSwitchItem, ScAppSwitchPanel, ScAppSwitchRow, type ScAppSwitchSystemItem, type ScAppSwitchUtilities, ScAppcardLogos, ScArtifaxInvite, ScArtifaxSidebar, ScAskAgentButton, ScAskAgentSlot, ScBadges, ScBeacon, type ScBeaconTone, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCatalogixSidebar, ScCatalogixStoreHeader, ScCatalogixStoreTableList, ScCheckField, ScCheckbox, ScCounter, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScCxoCopilotLogo, ScCxoWordmark, ScDefaultCard, ScDp, type ScDpProps, ScDrawer, ScErrorBoundary, type ScErrorReporter, ScFieldButton, ScFileField, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScInChatList, ScInChatMessage, ScInfoPopup, ScIntialProfileCover, ScLogoUnit, ScMappingCard, ScMediaApproval, ScMediaSelect, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScModal, ScNewVersionNotice, ScOnlyField, ScOnlyIcon, ScPagination, ScPairtext, ScPanelResizeHandle, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanComparison, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScPopoverArrow, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfilePopup, type ScProfilePopupThemeMode, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSelect, ScSelection, ScSelectionList, ScSelectionPill, ScSelectionPillGroup, ScSettingsNav, ScSettingsTabComp, type ScShellThemeMode, ScSideBarLogoUnit, ScSidebar, ScSidebarAppIdentity, type ScSidebarAppIdentityProps, ScSidebarIcons, ScSidebarMenu, ScSidebarPopover, ScSidebarProfile, ScSidebarResizeHandle, type ScSidebarResizeHandleProps, ScSidebarSearchTrigger, type ScSidebarSearchTriggerProps, ScSidebarSwitchMenu, ScSidebarWorkspaceTrigger, type ScSidebarWorkspaceTriggerProps, ScSlider, ScStoreCard, ScStrLogo, ScStreamoidMascot, ScStreamoidWordmark, ScSubAgent, type ScTab, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTabs, ScTaxonomyPill, ScTextArea, ScTextField, ScThinkingStepIcon, ScTodoList, ScToggleSwitch, ScVDivider, ScValueMappingL1, ScVersion, ScWorkspaceAccountMenu, type ScWorkspaceAccountMenuProps, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SelectionListState, type SidebarAppIdentityConfig, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProduct, type SidebarProfileConfig, type SidebarResizeGestureResult, type SidebarResizeGestureState, type SidebarSectionConfig, type StreamoidAnchorRect, type StreamoidAnchoredPopover, type StreamoidAnchoredPopoverArrow, type StreamoidAnchoredPopoverGeometry, type StreamoidAnchoredPopoverPosition, type StreamoidAnchoredPopoverPositionOptions, type StreamoidAppSwitchGroup, type StreamoidAppSwitchOptions, type StreamoidAppSwitchProduct, type StreamoidPanelWidthOptions, type StreamoidPanelWidthState, StreamoidSidebar, type StreamoidSidebarPopoverPlacement, type StreamoidSidebarPopoverPosition, type StreamoidSidebarPopoverPositionOptions, type StreamoidSidebarPreferenceOptions, type StreamoidSidebarPreferenceState, type StreamoidSidebarProps, type StreamoidThemePreferenceOptions, type StreamoidThemePreferenceState, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, UsageHistoryMobile, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem, advanceSidebarResizeGesture, clampPanelWidth, createStreamoidAppSwitchUtilities, formatStreamoidAppVersion, formatSubAgentLabel, hasCollapsedMark, parseVersionManifest, resolveAnchoredPopoverArrow, resolveAnchoredPopoverPosition, resolvePanelResize, resolvePanelResizeKey, scAppSwitchOrder, scCreatePostHogReporter, scGetErrorRef, shouldPromptForNewVersion, streamoidAppSwitchGroups, streamoidAppSwitchTagline, streamoidChangelogUrl, useNewVersionAvailable, useStreamoidAnchoredPopover, useStreamoidAnchoredPopoverPosition, useStreamoidPanelWidth, useStreamoidSidebarPopoverPosition, useStreamoidSidebarPreference, useStreamoidThemePreference };
|
|
2777
|
+
export { type AppSidebarAppIdentity, type AppSidebarAssistantCta, type AppSidebarCreditWarning, type AppSidebarHeader, type AppSidebarIconContext, type AppSidebarIconMap, type AppSidebarIconRenderer, type AppSidebarMenuItem, type AppSidebarProfile, type AppSidebarSection, type AppcardProduct, type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAppIdentity, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, type AssistantCta, type CatalogixNavItem, type CatalogixSidebarCreditWarning, type CatalogixSidebarIconContext, type CatalogixSidebarIconMap, type CatalogixSidebarIconRenderer, type CatalogixSidebarProfile, type CatalogixSwitchApp, CreditWarningBanner, type CreditWarningBannerProps, type DescriptionVisibility, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAnnotatedError, type IScAppCardForCopilotProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScAppSidebarProps, type IScAppSwitchPanelProps, type IScAppcardLogosProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScAskAgentButtonProps, type IScBadgesProps, type IScBeaconProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCatalogixSidebarProps, type IScCatalogixStoreHeaderProps, type IScCatalogixStoreTableListProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCounterProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScCxoCopilotLogoProps, type IScCxoWordmarkProps, type IScDefaultCardProps, type IScDrawerProps, type IScErrorBoundaryProps, type IScErrorReport, type IScErrorReporterClient, type IScFieldButtonProps, type IScFileFieldProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScInChatListProps, type IScInChatMessageProps, type IScInfoPopupProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMappingCardProps, type IScMediaApprovalProps, type IScMediaSelectProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScModalProps, type IScNewVersionNoticeProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPaginationProps, type IScPairtextProps, type IScPanelResizeHandleProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanComparisonProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScPopoverArrowProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfilePopupProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSelectOption, type IScSelectProps, type IScSelectionListProps, type IScSelectionPillGroupProps, type IScSelectionPillOption, type IScSelectionPillProps, type IScSelectionProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarPopoverProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSidebarSwitchMenuProps, type IScSliderProps, type IScStoreCardProps, type IScStrLogoProps, type IScStreamoidMascotProps, type IScStreamoidWordmarkProps, type IScSubAgentProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTabsProps, type IScTaxonomyPillProps, type IScTextAreaProps, type IScTextFieldProps, type IScThinkingStepIconProps, type IScTodoItem, type IScTodoListProps, type IScToggleSwitchProps, type IScVDividerProps, type IScValueMappingL1Props, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, type IUseNewVersionAvailableOptions, type IcListIconState, InvoiceHistoryMobile, NscWorkspaceSwitch, PANEL_RESIZE_STEP_PX, type PanelResizeEdge, type PanelResizeGesture, type PanelWidthBounds, type PlanComparisonRow, type PlanComparisonSection, type PlanFeatureSection, ProductCollapsedMark, ProductWordmark, SC_APP_SWITCH_PANEL_WIDTH, SC_WORKSPACE_MENU_WIDTH, SIDEBAR_RESIZE_THRESHOLD_PX, STREAMOID_CHANGELOG_URL, STREAMOID_CHANGELOG_URLS, STREAMOID_STATUS_PAGE_URL, ScAccess, ScAppCard, ScAppCardForCopilot, ScAppCardV3, ScAppField, ScAppListingCard, ScAppSidebar, type ScAppSwitchItem, ScAppSwitchPanel, ScAppSwitchRow, type ScAppSwitchSystemItem, type ScAppSwitchUtilities, ScAppcardLogos, ScArtifaxInvite, ScArtifaxSidebar, ScAskAgentButton, ScAskAgentSlot, ScBadges, ScBeacon, type ScBeaconTone, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCatalogixSidebar, ScCatalogixStoreHeader, ScCatalogixStoreTableList, ScCheckField, ScCheckbox, ScCounter, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScCxoCopilotLogo, ScCxoWordmark, ScDefaultCard, ScDp, type ScDpProps, ScDrawer, ScErrorBoundary, type ScErrorReporter, ScFieldButton, ScFileField, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScInChatList, ScInChatMessage, ScInfoPopup, ScIntialProfileCover, ScLogoUnit, ScMappingCard, ScMediaApproval, ScMediaSelect, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScModal, ScNewVersionNotice, ScOnlyField, ScOnlyIcon, ScPagination, ScPairtext, ScPanelResizeHandle, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanComparison, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScPopoverArrow, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfilePopup, type ScProfilePopupThemeMode, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSelect, ScSelection, ScSelectionList, ScSelectionPill, ScSelectionPillGroup, ScSettingsNav, ScSettingsTabComp, type ScShellThemeMode, ScSideBarLogoUnit, ScSidebar, ScSidebarAppIdentity, type ScSidebarAppIdentityProps, ScSidebarIcons, ScSidebarMenu, ScSidebarPopover, ScSidebarProfile, ScSidebarResizeHandle, type ScSidebarResizeHandleProps, ScSidebarSearchTrigger, type ScSidebarSearchTriggerProps, ScSidebarSwitchMenu, ScSidebarWorkspaceTrigger, type ScSidebarWorkspaceTriggerProps, ScSlider, ScStoreCard, ScStrLogo, ScStreamoidMascot, ScStreamoidWordmark, ScSubAgent, type ScTab, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTabs, ScTaxonomyPill, ScTextArea, ScTextField, ScThinkingStepIcon, ScTodoList, ScToggleSwitch, ScVDivider, ScValueMappingL1, ScVersion, ScWorkspaceAccountMenu, type ScWorkspaceAccountMenuProps, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SelectionListState, type SidebarAppIdentityConfig, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProduct, type SidebarProfileConfig, type SidebarResizeGestureResult, type SidebarResizeGestureState, type SidebarSectionConfig, type StreamoidAnchorRect, type StreamoidAnchoredPopover, type StreamoidAnchoredPopoverArrow, type StreamoidAnchoredPopoverGeometry, type StreamoidAnchoredPopoverPosition, type StreamoidAnchoredPopoverPositionOptions, type StreamoidAppSwitchGroup, type StreamoidAppSwitchOptions, type StreamoidAppSwitchProduct, type StreamoidPanelWidthOptions, type StreamoidPanelWidthState, type StreamoidSearchShortcutEvent, type StreamoidSearchShortcutOptions, StreamoidSidebar, type StreamoidSidebarPopoverPlacement, type StreamoidSidebarPopoverPosition, type StreamoidSidebarPopoverPositionOptions, type StreamoidSidebarPreferenceOptions, type StreamoidSidebarPreferenceState, type StreamoidSidebarProps, type StreamoidThemePreferenceOptions, type StreamoidThemePreferenceState, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, UsageHistoryMobile, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem, advanceSidebarResizeGesture, clampPanelWidth, createStreamoidAppSwitchUtilities, formatStreamoidAppVersion, formatSubAgentLabel, hasCollapsedMark, matchesStreamoidSearchShortcut, parseVersionManifest, resolveAnchoredPopoverArrow, resolveAnchoredPopoverPosition, resolvePanelResize, resolvePanelResizeKey, scAppSwitchOrder, scCreatePostHogReporter, scGetErrorRef, shouldPromptForNewVersion, streamoidAppSwitchGroups, streamoidAppSwitchTagline, streamoidChangelogUrl, useNewVersionAvailable, useStreamoidAnchoredPopover, useStreamoidAnchoredPopoverPosition, useStreamoidPanelWidth, useStreamoidSearchShortcut, useStreamoidSidebarPopoverPosition, useStreamoidSidebarPreference, useStreamoidThemePreference };
|
package/dist/index.d.ts
CHANGED
|
@@ -998,9 +998,26 @@ interface ScSidebarSearchTriggerProps {
|
|
|
998
998
|
label?: string;
|
|
999
999
|
shortcut?: string;
|
|
1000
1000
|
onClick?: () => void;
|
|
1001
|
+
/**
|
|
1002
|
+
* Hover or keyboard-focus, BEFORE the click — the host's cue to start
|
|
1003
|
+
* fetching whatever the search dialog needs.
|
|
1004
|
+
*
|
|
1005
|
+
* Every product opens this trigger onto a lazily-loaded dialog, and in CXO
|
|
1006
|
+
* and Artifax that dialog lives in `@streamoid/agent`: 5.3MB, behind a
|
|
1007
|
+
* `Suspense` fallback of `null`. So the FIRST click looked like it did
|
|
1008
|
+
* nothing at all while the chunk downloaded. Hovering is a strong enough
|
|
1009
|
+
* signal to pay for the same bytes the click needs a moment later, and it is
|
|
1010
|
+
* the reason this is on hover rather than on idle — most sessions never open
|
|
1011
|
+
* the dialog and should not download it.
|
|
1012
|
+
*
|
|
1013
|
+
* Must be cheap and idempotent: it fires on EVERY hover. A bare
|
|
1014
|
+
* `() => void import('@streamoid/agent')` is the intended shape — dynamic
|
|
1015
|
+
* imports are cached, so the second call costs nothing.
|
|
1016
|
+
*/
|
|
1017
|
+
onPrefetch?: () => void;
|
|
1001
1018
|
className?: string;
|
|
1002
1019
|
}
|
|
1003
|
-
declare function ScSidebarSearchTrigger({ expanded, label, shortcut, onClick, className, }: ScSidebarSearchTriggerProps): JSX.Element;
|
|
1020
|
+
declare function ScSidebarSearchTrigger({ expanded, label, shortcut, onClick, onPrefetch, className, }: ScSidebarSearchTriggerProps): JSX.Element;
|
|
1004
1021
|
interface ScSidebarAppIdentityProps {
|
|
1005
1022
|
expanded: boolean;
|
|
1006
1023
|
product?: AppcardProduct | "streamoid";
|
|
@@ -1043,6 +1060,67 @@ interface ScWorkspaceAccountMenuProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
1043
1060
|
/** Shared workspace/account menu used by every Streamoid application sidebar. */
|
|
1044
1061
|
declare function ScWorkspaceAccountMenu({ workspaceName, workspaceRole, workspaceImage, credits, onSwitchWorkspace, onInviteMembers, onBilling, organizationName, organizationRole, onOrganizationClick, accountName, accountEmail, accountImage, onAccountClick, themeMode, onThemeModeChange, className, ...props }: ScWorkspaceAccountMenuProps): JSX.Element;
|
|
1045
1062
|
|
|
1063
|
+
/** The shape `matchesStreamoidSearchShortcut` needs — a subset of
|
|
1064
|
+
* `KeyboardEvent`, so the predicate is testable without a DOM. */
|
|
1065
|
+
interface StreamoidSearchShortcutEvent {
|
|
1066
|
+
key: string;
|
|
1067
|
+
metaKey: boolean;
|
|
1068
|
+
ctrlKey: boolean;
|
|
1069
|
+
altKey: boolean;
|
|
1070
|
+
/** `true` on the `keydown`s the OS synthesises while the chord is HELD.
|
|
1071
|
+
* Optional so a caller hand-building an event object does not have to know
|
|
1072
|
+
* about it; absent reads as a first press. */
|
|
1073
|
+
repeat?: boolean;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Is this keydown the search chord?
|
|
1077
|
+
*
|
|
1078
|
+
* Pure and exported so the decision can be tested without a DOM, the same way
|
|
1079
|
+
* `resolvePanelResize` is split out of the resize handle.
|
|
1080
|
+
*
|
|
1081
|
+
* - `metaKey` OR `ctrlKey`, so one binding serves macOS and everything else.
|
|
1082
|
+
* - `altKey` is excluded, so ⌥⌘K and Ctrl+Alt+K stay with the browser.
|
|
1083
|
+
* - `event.key` and not `event.code`: `key` carries the CHARACTER, already
|
|
1084
|
+
* resolved through the keyboard layout. `code` is physical, so on AZERTY or
|
|
1085
|
+
* Dvorak the key labelled K is not `KeyK` and the shortcut would land under
|
|
1086
|
+
* a different letter than the `⌘ K` hint promises.
|
|
1087
|
+
* - A REPEAT IS NOT A SECOND PRESS. Auto-repeat fires `keydown` every few
|
|
1088
|
+
* tens of ms once the OS delay passes, and the hook drives a TOGGLE — so
|
|
1089
|
+
* without this, holding the chord flickers the dialog open and shut for as
|
|
1090
|
+
* long as the key is down. Found by review on cxo-dashboard, where the
|
|
1091
|
+
* hand-rolled listener this replaces had exactly that bug.
|
|
1092
|
+
*/
|
|
1093
|
+
declare function matchesStreamoidSearchShortcut(event: StreamoidSearchShortcutEvent, letter?: string): boolean;
|
|
1094
|
+
interface StreamoidSearchShortcutOptions {
|
|
1095
|
+
/** Fired on ⌘K / Ctrl+K. Its identity does not matter — it is read through a
|
|
1096
|
+
* ref, so an inline arrow will not rebind the listener each render. */
|
|
1097
|
+
onTrigger: () => void;
|
|
1098
|
+
/** Bind the key. `false` unbinds — e.g. while a modal owns the keyboard. */
|
|
1099
|
+
enabled?: boolean;
|
|
1100
|
+
/** The letter pressed with the modifier. Case-insensitive. */
|
|
1101
|
+
letter?: string;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* ⌘K / Ctrl+K, for the dialog `ScSidebarSearchTrigger` advertises.
|
|
1105
|
+
*
|
|
1106
|
+
* The trigger has drawn a `⌘ K` hint since it shipped and NO APP EVER BOUND THE
|
|
1107
|
+
* KEY — the one affordance telling people the rail has a command bar did
|
|
1108
|
+
* nothing when used. This lives here so the component that makes the promise
|
|
1109
|
+
* and the hook that keeps it ship together, rather than each product
|
|
1110
|
+
* rediscovering the same eight lines and getting the modifier handling
|
|
1111
|
+
* slightly different.
|
|
1112
|
+
*
|
|
1113
|
+
* The host still owns the dialog's open state, so this reports the chord and
|
|
1114
|
+
* decides nothing. Wire it to a TOGGLE rather than an open: every other command
|
|
1115
|
+
* palette closes on the same chord that opened it.
|
|
1116
|
+
*
|
|
1117
|
+
* It calls `preventDefault`, because Ctrl+K is taken — Chrome and Firefox both
|
|
1118
|
+
* send it to the address bar, and without this the rail's own search loses to
|
|
1119
|
+
* the browser. And it fires even while a text field has focus, which is
|
|
1120
|
+
* deliberate: the chord is how you leave the field.
|
|
1121
|
+
*/
|
|
1122
|
+
declare function useStreamoidSearchShortcut({ onTrigger, enabled, letter, }: StreamoidSearchShortcutOptions): void;
|
|
1123
|
+
|
|
1046
1124
|
interface StreamoidThemePreferenceOptions {
|
|
1047
1125
|
defaultMode?: ScShellThemeMode;
|
|
1048
1126
|
legacyStorageKeys?: string[];
|
|
@@ -1322,6 +1400,11 @@ interface AppSidebarHeader {
|
|
|
1322
1400
|
searchLabel?: string;
|
|
1323
1401
|
searchShortcut?: string;
|
|
1324
1402
|
onSearchClick?: () => void;
|
|
1403
|
+
/** Hover/focus on the search trigger, so the host can start loading the
|
|
1404
|
+
* dialog before it is clicked. See `ScSidebarSearchTriggerProps.onPrefetch`
|
|
1405
|
+
* — the dialog is a 5.3MB lazy chunk in CXO and Artifax, and without this
|
|
1406
|
+
* the first click looks inert while it downloads. */
|
|
1407
|
+
onSearchPrefetch?: () => void;
|
|
1325
1408
|
/** Omit the search field entirely — a product that has no search yet. */
|
|
1326
1409
|
hideSearch?: boolean;
|
|
1327
1410
|
}
|
|
@@ -2691,4 +2774,4 @@ interface IScProfilePopupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
2691
2774
|
*/
|
|
2692
2775
|
declare const ScProfilePopup: React$1.ForwardRefExoticComponent<IScProfilePopupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2693
2776
|
|
|
2694
|
-
export { type AppSidebarAppIdentity, type AppSidebarAssistantCta, type AppSidebarCreditWarning, type AppSidebarHeader, type AppSidebarIconContext, type AppSidebarIconMap, type AppSidebarIconRenderer, type AppSidebarMenuItem, type AppSidebarProfile, type AppSidebarSection, type AppcardProduct, type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAppIdentity, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, type AssistantCta, type CatalogixNavItem, type CatalogixSidebarCreditWarning, type CatalogixSidebarIconContext, type CatalogixSidebarIconMap, type CatalogixSidebarIconRenderer, type CatalogixSidebarProfile, type CatalogixSwitchApp, CreditWarningBanner, type CreditWarningBannerProps, type DescriptionVisibility, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAnnotatedError, type IScAppCardForCopilotProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScAppSidebarProps, type IScAppSwitchPanelProps, type IScAppcardLogosProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScAskAgentButtonProps, type IScBadgesProps, type IScBeaconProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCatalogixSidebarProps, type IScCatalogixStoreHeaderProps, type IScCatalogixStoreTableListProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCounterProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScCxoCopilotLogoProps, type IScCxoWordmarkProps, type IScDefaultCardProps, type IScDrawerProps, type IScErrorBoundaryProps, type IScErrorReport, type IScErrorReporterClient, type IScFieldButtonProps, type IScFileFieldProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScInChatListProps, type IScInChatMessageProps, type IScInfoPopupProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMappingCardProps, type IScMediaApprovalProps, type IScMediaSelectProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScModalProps, type IScNewVersionNoticeProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPaginationProps, type IScPairtextProps, type IScPanelResizeHandleProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanComparisonProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScPopoverArrowProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfilePopupProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSelectOption, type IScSelectProps, type IScSelectionListProps, type IScSelectionPillGroupProps, type IScSelectionPillOption, type IScSelectionPillProps, type IScSelectionProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarPopoverProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSidebarSwitchMenuProps, type IScSliderProps, type IScStoreCardProps, type IScStrLogoProps, type IScStreamoidMascotProps, type IScStreamoidWordmarkProps, type IScSubAgentProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTabsProps, type IScTaxonomyPillProps, type IScTextAreaProps, type IScTextFieldProps, type IScThinkingStepIconProps, type IScTodoItem, type IScTodoListProps, type IScToggleSwitchProps, type IScVDividerProps, type IScValueMappingL1Props, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, type IUseNewVersionAvailableOptions, type IcListIconState, InvoiceHistoryMobile, NscWorkspaceSwitch, PANEL_RESIZE_STEP_PX, type PanelResizeEdge, type PanelResizeGesture, type PanelWidthBounds, type PlanComparisonRow, type PlanComparisonSection, type PlanFeatureSection, ProductCollapsedMark, ProductWordmark, SC_APP_SWITCH_PANEL_WIDTH, SC_WORKSPACE_MENU_WIDTH, SIDEBAR_RESIZE_THRESHOLD_PX, STREAMOID_CHANGELOG_URL, STREAMOID_CHANGELOG_URLS, STREAMOID_STATUS_PAGE_URL, ScAccess, ScAppCard, ScAppCardForCopilot, ScAppCardV3, ScAppField, ScAppListingCard, ScAppSidebar, type ScAppSwitchItem, ScAppSwitchPanel, ScAppSwitchRow, type ScAppSwitchSystemItem, type ScAppSwitchUtilities, ScAppcardLogos, ScArtifaxInvite, ScArtifaxSidebar, ScAskAgentButton, ScAskAgentSlot, ScBadges, ScBeacon, type ScBeaconTone, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCatalogixSidebar, ScCatalogixStoreHeader, ScCatalogixStoreTableList, ScCheckField, ScCheckbox, ScCounter, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScCxoCopilotLogo, ScCxoWordmark, ScDefaultCard, ScDp, type ScDpProps, ScDrawer, ScErrorBoundary, type ScErrorReporter, ScFieldButton, ScFileField, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScInChatList, ScInChatMessage, ScInfoPopup, ScIntialProfileCover, ScLogoUnit, ScMappingCard, ScMediaApproval, ScMediaSelect, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScModal, ScNewVersionNotice, ScOnlyField, ScOnlyIcon, ScPagination, ScPairtext, ScPanelResizeHandle, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanComparison, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScPopoverArrow, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfilePopup, type ScProfilePopupThemeMode, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSelect, ScSelection, ScSelectionList, ScSelectionPill, ScSelectionPillGroup, ScSettingsNav, ScSettingsTabComp, type ScShellThemeMode, ScSideBarLogoUnit, ScSidebar, ScSidebarAppIdentity, type ScSidebarAppIdentityProps, ScSidebarIcons, ScSidebarMenu, ScSidebarPopover, ScSidebarProfile, ScSidebarResizeHandle, type ScSidebarResizeHandleProps, ScSidebarSearchTrigger, type ScSidebarSearchTriggerProps, ScSidebarSwitchMenu, ScSidebarWorkspaceTrigger, type ScSidebarWorkspaceTriggerProps, ScSlider, ScStoreCard, ScStrLogo, ScStreamoidMascot, ScStreamoidWordmark, ScSubAgent, type ScTab, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTabs, ScTaxonomyPill, ScTextArea, ScTextField, ScThinkingStepIcon, ScTodoList, ScToggleSwitch, ScVDivider, ScValueMappingL1, ScVersion, ScWorkspaceAccountMenu, type ScWorkspaceAccountMenuProps, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SelectionListState, type SidebarAppIdentityConfig, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProduct, type SidebarProfileConfig, type SidebarResizeGestureResult, type SidebarResizeGestureState, type SidebarSectionConfig, type StreamoidAnchorRect, type StreamoidAnchoredPopover, type StreamoidAnchoredPopoverArrow, type StreamoidAnchoredPopoverGeometry, type StreamoidAnchoredPopoverPosition, type StreamoidAnchoredPopoverPositionOptions, type StreamoidAppSwitchGroup, type StreamoidAppSwitchOptions, type StreamoidAppSwitchProduct, type StreamoidPanelWidthOptions, type StreamoidPanelWidthState, StreamoidSidebar, type StreamoidSidebarPopoverPlacement, type StreamoidSidebarPopoverPosition, type StreamoidSidebarPopoverPositionOptions, type StreamoidSidebarPreferenceOptions, type StreamoidSidebarPreferenceState, type StreamoidSidebarProps, type StreamoidThemePreferenceOptions, type StreamoidThemePreferenceState, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, UsageHistoryMobile, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem, advanceSidebarResizeGesture, clampPanelWidth, createStreamoidAppSwitchUtilities, formatStreamoidAppVersion, formatSubAgentLabel, hasCollapsedMark, parseVersionManifest, resolveAnchoredPopoverArrow, resolveAnchoredPopoverPosition, resolvePanelResize, resolvePanelResizeKey, scAppSwitchOrder, scCreatePostHogReporter, scGetErrorRef, shouldPromptForNewVersion, streamoidAppSwitchGroups, streamoidAppSwitchTagline, streamoidChangelogUrl, useNewVersionAvailable, useStreamoidAnchoredPopover, useStreamoidAnchoredPopoverPosition, useStreamoidPanelWidth, useStreamoidSidebarPopoverPosition, useStreamoidSidebarPreference, useStreamoidThemePreference };
|
|
2777
|
+
export { type AppSidebarAppIdentity, type AppSidebarAssistantCta, type AppSidebarCreditWarning, type AppSidebarHeader, type AppSidebarIconContext, type AppSidebarIconMap, type AppSidebarIconRenderer, type AppSidebarMenuItem, type AppSidebarProfile, type AppSidebarSection, type AppcardProduct, type ArtifaxMenuItem, type ArtifaxSection, type ArtifaxSidebarAppIdentity, type ArtifaxSidebarAssistantCta, type ArtifaxSidebarCreditWarning, type ArtifaxSidebarIconContext, type ArtifaxSidebarIconMap, type ArtifaxSidebarIconRenderer, type ArtifaxSidebarProfile, type AssistantCta, type CatalogixNavItem, type CatalogixSidebarCreditWarning, type CatalogixSidebarIconContext, type CatalogixSidebarIconMap, type CatalogixSidebarIconRenderer, type CatalogixSidebarProfile, type CatalogixSwitchApp, CreditWarningBanner, type CreditWarningBannerProps, type DescriptionVisibility, type IInvoiceHistoryMobileProps, type IScAccessProps, type IScAnnotatedError, type IScAppCardForCopilotProps, type IScAppCardProps, type IScAppCardV3Props, type IScAppFieldProps, type IScAppListingCardProps, type IScAppSidebarProps, type IScAppSwitchPanelProps, type IScAppcardLogosProps, type IScArtifaxInviteProps, type IScArtifaxSidebarProps, type IScAskAgentButtonProps, type IScBadgesProps, type IScBeaconProps, type IScBillingHistoryHeaderProps, type IScBillingHistoryTableListProps, type IScBillingLogsTableHeaderProps, type IScBillingLogsTableListProps, type IScBriefCardProps, type IScButtonProps, type IScCalendarDateCompsProps, type IScCalendarProps, type IScCatalogixInviteProps, type IScCatalogixSidebarProps, type IScCatalogixStoreHeaderProps, type IScCatalogixStoreTableListProps, type IScCheckFieldProps, type IScCheckboxProps, type IScCounterProps, type IScCreditsUsageCardMobileProps, type IScCreditsUsageCardProps, type IScCxoCopilotLogoProps, type IScCxoWordmarkProps, type IScDefaultCardProps, type IScDrawerProps, type IScErrorBoundaryProps, type IScErrorReport, type IScErrorReporterClient, type IScFieldButtonProps, type IScFileFieldProps, type IScGoogleSignInProps, type IScGuideProps, type IScHDividerProps, type IScHeaderProps, type IScImageFieldProps, type IScInChatListProps, type IScInChatMessageProps, type IScInfoPopupProps, type IScIntialProfileCoverProps, type IScLogoUnitProps, type IScMappingCardProps, type IScMediaApprovalProps, type IScMediaSelectProps, type IScMenuOptionsProps, type IScMobileBottomActionProps, type IScMobileTopNavProps, type IScModalProps, type IScNewVersionNoticeProps, type IScOnlyFieldProps, type IScOnlyIconProps, type IScPaginationProps, type IScPairtextProps, type IScPanelResizeHandleProps, type IScPendingActionProps, type IScPhtogenixInviteProps, type IScPlanCardProps, type IScPlanComparisonProps, type IScPlanDetailsCardMobileProps, type IScPlanDetailsCardProps, type IScPopUpMenuProps, type IScPopoverArrowProps, type IScProfileImageUpdateProps, type IScProfileOptionsProps, type IScProfilePopupProps, type IScProfileProps, type IScProfileSettingsCompProps, type IScProfileV2MobileProps, type IScProgressBarProps, type IScQuickPromptProps, type IScRadioProps, type IScReferralCardMobileProps, type IScReferralTableHeaderProps, type IScReferralTableListProps, type IScRoleMobileProps, type IScRoleProps, type IScSelectOption, type IScSelectProps, type IScSelectionListProps, type IScSelectionPillGroupProps, type IScSelectionPillOption, type IScSelectionPillProps, type IScSelectionProps, type IScSettingsNavProps, type IScSettingsTabCompProps, type IScSideBarLogoUnitProps, type IScSidebarIconsProps, type IScSidebarMenuProps, type IScSidebarPopoverProps, type IScSidebarProfileProps, type IScSidebarProps, type IScSidebarSwitchMenuProps, type IScSliderProps, type IScStoreCardProps, type IScStrLogoProps, type IScStreamoidMascotProps, type IScStreamoidWordmarkProps, type IScSubAgentProps, type IScTabCompProps, type IScTabFieldProps, type IScTabSwitcherProps, type IScTableHeaderProps, type IScTableListMobileProps, type IScTableListProps, type IScTabsProps, type IScTaxonomyPillProps, type IScTextAreaProps, type IScTextFieldProps, type IScThinkingStepIconProps, type IScTodoItem, type IScTodoListProps, type IScToggleSwitchProps, type IScVDividerProps, type IScValueMappingL1Props, type IScVersionProps, type IScWorkspaceCardProps, type IScWorkspaceSettingsMobileProps, type IScWorkspaceSwitchMobileProps, type IScWorkspaceSwitchMobileV2Props, type IUsageHistoryMobileProps, type IUseNewVersionAvailableOptions, type IcListIconState, InvoiceHistoryMobile, NscWorkspaceSwitch, PANEL_RESIZE_STEP_PX, type PanelResizeEdge, type PanelResizeGesture, type PanelWidthBounds, type PlanComparisonRow, type PlanComparisonSection, type PlanFeatureSection, ProductCollapsedMark, ProductWordmark, SC_APP_SWITCH_PANEL_WIDTH, SC_WORKSPACE_MENU_WIDTH, SIDEBAR_RESIZE_THRESHOLD_PX, STREAMOID_CHANGELOG_URL, STREAMOID_CHANGELOG_URLS, STREAMOID_STATUS_PAGE_URL, ScAccess, ScAppCard, ScAppCardForCopilot, ScAppCardV3, ScAppField, ScAppListingCard, ScAppSidebar, type ScAppSwitchItem, ScAppSwitchPanel, ScAppSwitchRow, type ScAppSwitchSystemItem, type ScAppSwitchUtilities, ScAppcardLogos, ScArtifaxInvite, ScArtifaxSidebar, ScAskAgentButton, ScAskAgentSlot, ScBadges, ScBeacon, type ScBeaconTone, ScBillingHistoryHeader, ScBillingHistoryTableList, ScBillingLogsTableHeader, ScBillingLogsTableList, ScBriefCard, ScButton, ScCalendar, ScCalendarDateComps, ScCatalogixInvite, ScCatalogixSidebar, ScCatalogixStoreHeader, ScCatalogixStoreTableList, ScCheckField, ScCheckbox, ScCounter, ScCreditsUsageCard, ScCreditsUsageCardMobile, ScCxoCopilotLogo, ScCxoWordmark, ScDefaultCard, ScDp, type ScDpProps, ScDrawer, ScErrorBoundary, type ScErrorReporter, ScFieldButton, ScFileField, ScGoogleSignIn, ScGuide, ScHDivider, ScHeader, ScImageField, ScInChatList, ScInChatMessage, ScInfoPopup, ScIntialProfileCover, ScLogoUnit, ScMappingCard, ScMediaApproval, ScMediaSelect, ScMenuOptions, ScMobileBottomAction, ScMobileTopNav, ScModal, ScNewVersionNotice, ScOnlyField, ScOnlyIcon, ScPagination, ScPairtext, ScPanelResizeHandle, ScPendingAction, ScPhtogenixInvite, ScPlanCard, ScPlanComparison, ScPlanDetailsCard, ScPlanDetailsCardMobile, ScPopUpMenu, ScPopoverArrow, ScProfile, ScProfileImageUpdate, ScProfileOptions, ScProfilePopup, type ScProfilePopupThemeMode, ScProfileSettingsComp, ScProfileV2Mobile, ScProgressBar, ScQuickPrompt, ScRadio, ScReferralCardMobile, ScReferralTableHeader, ScReferralTableList, ScRole, ScRoleMobile, ScSelect, ScSelection, ScSelectionList, ScSelectionPill, ScSelectionPillGroup, ScSettingsNav, ScSettingsTabComp, type ScShellThemeMode, ScSideBarLogoUnit, ScSidebar, ScSidebarAppIdentity, type ScSidebarAppIdentityProps, ScSidebarIcons, ScSidebarMenu, ScSidebarPopover, ScSidebarProfile, ScSidebarResizeHandle, type ScSidebarResizeHandleProps, ScSidebarSearchTrigger, type ScSidebarSearchTriggerProps, ScSidebarSwitchMenu, ScSidebarWorkspaceTrigger, type ScSidebarWorkspaceTriggerProps, ScSlider, ScStoreCard, ScStrLogo, ScStreamoidMascot, ScStreamoidWordmark, ScSubAgent, type ScTab, ScTabComp, ScTabField, ScTabSwitcher, ScTableHeader, ScTableList, ScTableListMobile, ScTabs, ScTaxonomyPill, ScTextArea, ScTextField, ScThinkingStepIcon, ScTodoList, ScToggleSwitch, ScVDivider, ScValueMappingL1, ScVersion, ScWorkspaceAccountMenu, type ScWorkspaceAccountMenuProps, ScWorkspaceCard, ScWorkspaceSettingsMobile, ScWorkspaceSwitchCard, type ScWorkspaceSwitchCardProps, ScWorkspaceSwitchMobile, ScWorkspaceSwitchMobileV2, type SelectionListState, type SidebarAppIdentityConfig, type SidebarConfig, type SidebarIconContext, type SidebarIconMap, type SidebarIconRenderer, type SidebarMenuItemConfig, type SidebarProduct, type SidebarProfileConfig, type SidebarResizeGestureResult, type SidebarResizeGestureState, type SidebarSectionConfig, type StreamoidAnchorRect, type StreamoidAnchoredPopover, type StreamoidAnchoredPopoverArrow, type StreamoidAnchoredPopoverGeometry, type StreamoidAnchoredPopoverPosition, type StreamoidAnchoredPopoverPositionOptions, type StreamoidAppSwitchGroup, type StreamoidAppSwitchOptions, type StreamoidAppSwitchProduct, type StreamoidPanelWidthOptions, type StreamoidPanelWidthState, type StreamoidSearchShortcutEvent, type StreamoidSearchShortcutOptions, StreamoidSidebar, type StreamoidSidebarPopoverPlacement, type StreamoidSidebarPopoverPosition, type StreamoidSidebarPopoverPositionOptions, type StreamoidSidebarPreferenceOptions, type StreamoidSidebarPreferenceState, type StreamoidSidebarProps, type StreamoidThemePreferenceOptions, type StreamoidThemePreferenceState, StreamoidWorkspaceSwitcher, type StreamoidWorkspaceSwitcherProps, UsageHistoryMobile, type WorkspaceSwitcherConfig, type WorkspaceSwitcherItem, advanceSidebarResizeGesture, clampPanelWidth, createStreamoidAppSwitchUtilities, formatStreamoidAppVersion, formatSubAgentLabel, hasCollapsedMark, matchesStreamoidSearchShortcut, parseVersionManifest, resolveAnchoredPopoverArrow, resolveAnchoredPopoverPosition, resolvePanelResize, resolvePanelResizeKey, scAppSwitchOrder, scCreatePostHogReporter, scGetErrorRef, shouldPromptForNewVersion, streamoidAppSwitchGroups, streamoidAppSwitchTagline, streamoidChangelogUrl, useNewVersionAvailable, useStreamoidAnchoredPopover, useStreamoidAnchoredPopoverPosition, useStreamoidPanelWidth, useStreamoidSearchShortcut, useStreamoidSidebarPopoverPosition, useStreamoidSidebarPreference, useStreamoidThemePreference };
|
package/dist/index.js
CHANGED
|
@@ -173,6 +173,7 @@ __export(index_exports, {
|
|
|
173
173
|
formatStreamoidAppVersion: () => formatStreamoidAppVersion,
|
|
174
174
|
formatSubAgentLabel: () => formatSubAgentLabel,
|
|
175
175
|
hasCollapsedMark: () => hasCollapsedMark,
|
|
176
|
+
matchesStreamoidSearchShortcut: () => matchesStreamoidSearchShortcut,
|
|
176
177
|
parseVersionManifest: () => parseVersionManifest,
|
|
177
178
|
resolveAnchoredPopoverArrow: () => resolveAnchoredPopoverArrow,
|
|
178
179
|
resolveAnchoredPopoverPosition: () => resolveAnchoredPopoverPosition,
|
|
@@ -189,6 +190,7 @@ __export(index_exports, {
|
|
|
189
190
|
useStreamoidAnchoredPopover: () => useStreamoidAnchoredPopover,
|
|
190
191
|
useStreamoidAnchoredPopoverPosition: () => useStreamoidAnchoredPopoverPosition,
|
|
191
192
|
useStreamoidPanelWidth: () => useStreamoidPanelWidth,
|
|
193
|
+
useStreamoidSearchShortcut: () => useStreamoidSearchShortcut,
|
|
192
194
|
useStreamoidSidebarPopoverPosition: () => useStreamoidSidebarPopoverPosition,
|
|
193
195
|
useStreamoidSidebarPreference: () => useStreamoidSidebarPreference,
|
|
194
196
|
useStreamoidThemePreference: () => useStreamoidThemePreference
|
|
@@ -5920,6 +5922,7 @@ function ScSidebarSearchTrigger({
|
|
|
5920
5922
|
label = "Search or Ask CXO",
|
|
5921
5923
|
shortcut = "\u2318 K",
|
|
5922
5924
|
onClick,
|
|
5925
|
+
onPrefetch,
|
|
5923
5926
|
className
|
|
5924
5927
|
}) {
|
|
5925
5928
|
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
@@ -5928,6 +5931,8 @@ function ScSidebarSearchTrigger({
|
|
|
5928
5931
|
type: "button",
|
|
5929
5932
|
"aria-label": label,
|
|
5930
5933
|
onClick,
|
|
5934
|
+
onPointerEnter: onPrefetch,
|
|
5935
|
+
onFocus: onPrefetch,
|
|
5931
5936
|
className: `${ScSidebarShell_default.searchTrigger} ${expanded ? ScSidebarShell_default.searchTriggerExpanded : ScSidebarShell_default.searchTriggerCollapsed}${className ? ` ${className}` : ""}`,
|
|
5932
5937
|
children: [
|
|
5933
5938
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
@@ -6176,8 +6181,35 @@ function ScWorkspaceAccountMenu({
|
|
|
6176
6181
|
);
|
|
6177
6182
|
}
|
|
6178
6183
|
|
|
6179
|
-
// src/SC-SidebarShell/
|
|
6184
|
+
// src/SC-SidebarShell/useStreamoidSearchShortcut.ts
|
|
6180
6185
|
var import_react19 = require("react");
|
|
6186
|
+
function matchesStreamoidSearchShortcut(event, letter = "k") {
|
|
6187
|
+
if (event.altKey) return false;
|
|
6188
|
+
if (event.repeat) return false;
|
|
6189
|
+
if (!event.metaKey && !event.ctrlKey) return false;
|
|
6190
|
+
return event.key.toLowerCase() === letter.toLowerCase();
|
|
6191
|
+
}
|
|
6192
|
+
function useStreamoidSearchShortcut({
|
|
6193
|
+
onTrigger,
|
|
6194
|
+
enabled = true,
|
|
6195
|
+
letter = "k"
|
|
6196
|
+
}) {
|
|
6197
|
+
const handler = (0, import_react19.useRef)(onTrigger);
|
|
6198
|
+
handler.current = onTrigger;
|
|
6199
|
+
(0, import_react19.useEffect)(() => {
|
|
6200
|
+
if (!enabled) return;
|
|
6201
|
+
const onKeyDown = (event) => {
|
|
6202
|
+
if (!matchesStreamoidSearchShortcut(event, letter)) return;
|
|
6203
|
+
event.preventDefault();
|
|
6204
|
+
handler.current();
|
|
6205
|
+
};
|
|
6206
|
+
document.addEventListener("keydown", onKeyDown);
|
|
6207
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6208
|
+
}, [enabled, letter]);
|
|
6209
|
+
}
|
|
6210
|
+
|
|
6211
|
+
// src/SC-SidebarShell/useStreamoidShellPreferences.ts
|
|
6212
|
+
var import_react20 = require("react");
|
|
6181
6213
|
var THEME_COOKIE = "streamoid_theme";
|
|
6182
6214
|
var SIDEBAR_COOKIE = "streamoid_sidebar";
|
|
6183
6215
|
var THEME_STORAGE_KEY = "streamoid.shell.theme";
|
|
@@ -6259,7 +6291,7 @@ function readExpanded(options) {
|
|
|
6259
6291
|
}
|
|
6260
6292
|
function useStreamoidThemePreference(options = {}) {
|
|
6261
6293
|
const legacyKeySignature = (options.legacyStorageKeys ?? []).join("\0");
|
|
6262
|
-
const stableOptions = (0,
|
|
6294
|
+
const stableOptions = (0, import_react20.useMemo)(
|
|
6263
6295
|
() => ({
|
|
6264
6296
|
defaultMode: options.defaultMode,
|
|
6265
6297
|
legacyStorageKeys: legacyKeySignature ? legacyKeySignature.split("\0") : [],
|
|
@@ -6267,31 +6299,31 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6267
6299
|
}),
|
|
6268
6300
|
[options.defaultMode, options.applyToDocument, legacyKeySignature]
|
|
6269
6301
|
);
|
|
6270
|
-
const [preference, setPreferenceState] = (0,
|
|
6302
|
+
const [preference, setPreferenceState] = (0, import_react20.useState)(
|
|
6271
6303
|
() => readTheme(stableOptions)
|
|
6272
6304
|
);
|
|
6273
|
-
const [systemDark, setSystemDark] = (0,
|
|
6305
|
+
const [systemDark, setSystemDark] = (0, import_react20.useState)(
|
|
6274
6306
|
() => canUseDom() && window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
6275
6307
|
);
|
|
6276
|
-
const setPreference = (0,
|
|
6308
|
+
const setPreference = (0, import_react20.useCallback)((mode) => {
|
|
6277
6309
|
setPreferenceState(mode);
|
|
6278
6310
|
writeStorage(THEME_STORAGE_KEY, mode);
|
|
6279
6311
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, mode));
|
|
6280
6312
|
writeCookie(THEME_COOKIE, mode);
|
|
6281
6313
|
}, [stableOptions]);
|
|
6282
|
-
(0,
|
|
6314
|
+
(0, import_react20.useEffect)(() => {
|
|
6283
6315
|
writeStorage(THEME_STORAGE_KEY, preference);
|
|
6284
6316
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, preference));
|
|
6285
6317
|
writeCookie(THEME_COOKIE, preference);
|
|
6286
6318
|
}, [preference, stableOptions]);
|
|
6287
|
-
(0,
|
|
6319
|
+
(0, import_react20.useEffect)(() => {
|
|
6288
6320
|
if (!canUseDom()) return;
|
|
6289
6321
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6290
6322
|
const onChange = (event) => setSystemDark(event.matches);
|
|
6291
6323
|
media.addEventListener("change", onChange);
|
|
6292
6324
|
return () => media.removeEventListener("change", onChange);
|
|
6293
6325
|
}, []);
|
|
6294
|
-
(0,
|
|
6326
|
+
(0, import_react20.useEffect)(() => {
|
|
6295
6327
|
if (!canUseDom()) return;
|
|
6296
6328
|
const sync = () => setPreferenceState(readTheme(stableOptions));
|
|
6297
6329
|
const onStorage = (event) => {
|
|
@@ -6307,7 +6339,7 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6307
6339
|
};
|
|
6308
6340
|
}, [stableOptions]);
|
|
6309
6341
|
const resolved = preference === "system" ? systemDark ? "dark" : "light" : preference;
|
|
6310
|
-
(0,
|
|
6342
|
+
(0, import_react20.useEffect)(() => {
|
|
6311
6343
|
if (!canUseDom() || !stableOptions.applyToDocument) return;
|
|
6312
6344
|
const root = document.documentElement;
|
|
6313
6345
|
root.setAttribute("data-theme", resolved === "light" ? "Light" : "Dark");
|
|
@@ -6317,15 +6349,15 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6317
6349
|
}
|
|
6318
6350
|
function useStreamoidSidebarPreference(options = {}) {
|
|
6319
6351
|
const legacyKeySignature = (options.legacyCollapsedKeys ?? []).join("\0");
|
|
6320
|
-
const stableOptions = (0,
|
|
6352
|
+
const stableOptions = (0, import_react20.useMemo)(
|
|
6321
6353
|
() => ({
|
|
6322
6354
|
defaultExpanded: options.defaultExpanded,
|
|
6323
6355
|
legacyCollapsedKeys: legacyKeySignature ? legacyKeySignature.split("\0") : []
|
|
6324
6356
|
}),
|
|
6325
6357
|
[options.defaultExpanded, legacyKeySignature]
|
|
6326
6358
|
);
|
|
6327
|
-
const [expanded, setExpandedState] = (0,
|
|
6328
|
-
const setExpanded = (0,
|
|
6359
|
+
const [expanded, setExpandedState] = (0, import_react20.useState)(() => readExpanded(stableOptions));
|
|
6360
|
+
const setExpanded = (0, import_react20.useCallback)((nextExpanded) => {
|
|
6329
6361
|
setExpandedState(nextExpanded);
|
|
6330
6362
|
const serialized = nextExpanded ? "expanded" : "collapsed";
|
|
6331
6363
|
writeStorage(SIDEBAR_STORAGE_KEY, serialized);
|
|
@@ -6334,7 +6366,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6334
6366
|
);
|
|
6335
6367
|
writeCookie(SIDEBAR_COOKIE, serialized);
|
|
6336
6368
|
}, [stableOptions]);
|
|
6337
|
-
const toggle = (0,
|
|
6369
|
+
const toggle = (0, import_react20.useCallback)(() => {
|
|
6338
6370
|
setExpandedState((current) => {
|
|
6339
6371
|
const next = !current;
|
|
6340
6372
|
const serialized = next ? "expanded" : "collapsed";
|
|
@@ -6346,7 +6378,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6346
6378
|
return next;
|
|
6347
6379
|
});
|
|
6348
6380
|
}, [stableOptions]);
|
|
6349
|
-
(0,
|
|
6381
|
+
(0, import_react20.useEffect)(() => {
|
|
6350
6382
|
const serialized = expanded ? "expanded" : "collapsed";
|
|
6351
6383
|
writeStorage(SIDEBAR_STORAGE_KEY, serialized);
|
|
6352
6384
|
stableOptions.legacyCollapsedKeys.forEach(
|
|
@@ -6354,7 +6386,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6354
6386
|
);
|
|
6355
6387
|
writeCookie(SIDEBAR_COOKIE, serialized);
|
|
6356
6388
|
}, [expanded, stableOptions]);
|
|
6357
|
-
(0,
|
|
6389
|
+
(0, import_react20.useEffect)(() => {
|
|
6358
6390
|
if (!canUseDom()) return;
|
|
6359
6391
|
const sync = () => setExpandedState(readExpanded(stableOptions));
|
|
6360
6392
|
const onStorage = (event) => {
|
|
@@ -6373,7 +6405,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6373
6405
|
}
|
|
6374
6406
|
|
|
6375
6407
|
// src/SC-SidebarShell/useStreamoidAnchoredPopoverPosition.ts
|
|
6376
|
-
var
|
|
6408
|
+
var import_react21 = require("react");
|
|
6377
6409
|
var ARROW_EDGE_INSET = 18;
|
|
6378
6410
|
function resolveAnchoredPopoverArrow({
|
|
6379
6411
|
anchor,
|
|
@@ -6428,7 +6460,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
|
|
|
6428
6460
|
inset = DEFAULT_INSET,
|
|
6429
6461
|
alignRef
|
|
6430
6462
|
}) {
|
|
6431
|
-
const [state, setState] = (0,
|
|
6463
|
+
const [state, setState] = (0, import_react21.useState)({
|
|
6432
6464
|
style: {
|
|
6433
6465
|
position: "fixed",
|
|
6434
6466
|
left: 0,
|
|
@@ -6440,7 +6472,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
|
|
|
6440
6472
|
},
|
|
6441
6473
|
arrow: null
|
|
6442
6474
|
});
|
|
6443
|
-
(0,
|
|
6475
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
6444
6476
|
const anchor = anchorRef.current;
|
|
6445
6477
|
if (!anchor || typeof window === "undefined") return;
|
|
6446
6478
|
const measure = () => {
|
|
@@ -6491,7 +6523,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
|
|
|
6491
6523
|
return state;
|
|
6492
6524
|
}
|
|
6493
6525
|
function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap = DEFAULT_GAP, inset = DEFAULT_INSET }) {
|
|
6494
|
-
const [position, setPosition] = (0,
|
|
6526
|
+
const [position, setPosition] = (0, import_react21.useState)({
|
|
6495
6527
|
position: "fixed",
|
|
6496
6528
|
left: 0,
|
|
6497
6529
|
top: 0,
|
|
@@ -6500,7 +6532,7 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
|
|
|
6500
6532
|
maxHeight: `calc(100dvh - ${inset * 2}px)`,
|
|
6501
6533
|
visibility: "hidden"
|
|
6502
6534
|
});
|
|
6503
|
-
(0,
|
|
6535
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
6504
6536
|
const anchor = anchorRef.current;
|
|
6505
6537
|
if (!anchor || typeof window === "undefined") return;
|
|
6506
6538
|
const measure = () => {
|
|
@@ -6544,7 +6576,7 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
|
|
|
6544
6576
|
}
|
|
6545
6577
|
|
|
6546
6578
|
// src/SC-SidebarShell/useStreamoidSidebarPopoverPosition.ts
|
|
6547
|
-
var
|
|
6579
|
+
var import_react22 = require("react");
|
|
6548
6580
|
var VIEWPORT_INSET = 16;
|
|
6549
6581
|
function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
6550
6582
|
placement,
|
|
@@ -6552,7 +6584,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6552
6584
|
gap = 8,
|
|
6553
6585
|
inset = 0
|
|
6554
6586
|
}) {
|
|
6555
|
-
const [position, setPosition] = (0,
|
|
6587
|
+
const [position, setPosition] = (0, import_react22.useState)({
|
|
6556
6588
|
position: "fixed",
|
|
6557
6589
|
left: 0,
|
|
6558
6590
|
top: 0,
|
|
@@ -6561,7 +6593,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6561
6593
|
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
6562
6594
|
visibility: "hidden"
|
|
6563
6595
|
});
|
|
6564
|
-
(0,
|
|
6596
|
+
(0, import_react22.useLayoutEffect)(() => {
|
|
6565
6597
|
const sidebar = sidebarRef.current;
|
|
6566
6598
|
if (!sidebar || typeof window === "undefined") return;
|
|
6567
6599
|
const findCard = () => (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
|
|
@@ -6622,7 +6654,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6622
6654
|
}
|
|
6623
6655
|
|
|
6624
6656
|
// src/SC-SidebarShell/ScSidebarPopover.tsx
|
|
6625
|
-
var
|
|
6657
|
+
var import_react23 = require("react");
|
|
6626
6658
|
var import_react_dom2 = require("react-dom");
|
|
6627
6659
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6628
6660
|
var SURFACE = "var(--sc-sidebar-popover-surface, var(--alias-surface-base, #101010))";
|
|
@@ -6641,13 +6673,13 @@ function ScSidebarPopover({
|
|
|
6641
6673
|
className,
|
|
6642
6674
|
style
|
|
6643
6675
|
}) {
|
|
6644
|
-
const panelRef = (0,
|
|
6676
|
+
const panelRef = (0, import_react23.useRef)(null);
|
|
6645
6677
|
const { style: position, arrow } = useStreamoidAnchoredPopover(
|
|
6646
6678
|
anchorRef,
|
|
6647
6679
|
panelRef,
|
|
6648
6680
|
{ width, alignRef }
|
|
6649
6681
|
);
|
|
6650
|
-
(0,
|
|
6682
|
+
(0, import_react23.useEffect)(() => {
|
|
6651
6683
|
const onKeyDown = (event) => {
|
|
6652
6684
|
if (event.key === "Escape") onClose();
|
|
6653
6685
|
};
|
|
@@ -6698,7 +6730,7 @@ function ScSidebarPopover({
|
|
|
6698
6730
|
}
|
|
6699
6731
|
|
|
6700
6732
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
|
|
6701
|
-
var
|
|
6733
|
+
var import_react24 = require("react");
|
|
6702
6734
|
|
|
6703
6735
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
|
|
6704
6736
|
var ScArtifaxSidebar_default = {
|
|
@@ -6805,7 +6837,8 @@ function SidebarHeader({
|
|
|
6805
6837
|
expanded,
|
|
6806
6838
|
label: header.searchLabel,
|
|
6807
6839
|
shortcut: header.searchShortcut,
|
|
6808
|
-
onClick: header.onSearchClick
|
|
6840
|
+
onClick: header.onSearchClick,
|
|
6841
|
+
onPrefetch: header.onSearchPrefetch
|
|
6809
6842
|
}
|
|
6810
6843
|
),
|
|
6811
6844
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ScHDivider, { fullBleed: true, className: ScArtifaxSidebar_default.headerDivider })
|
|
@@ -6814,8 +6847,8 @@ function SidebarHeader({
|
|
|
6814
6847
|
);
|
|
6815
6848
|
}
|
|
6816
6849
|
function useScrolled() {
|
|
6817
|
-
const [scrolled, setScrolled] = (0,
|
|
6818
|
-
const onScroll = (0,
|
|
6850
|
+
const [scrolled, setScrolled] = (0, import_react24.useState)(false);
|
|
6851
|
+
const onScroll = (0, import_react24.useCallback)((event) => {
|
|
6819
6852
|
const next = event.currentTarget.scrollTop > 0;
|
|
6820
6853
|
setScrolled((prev) => prev === next ? prev : next);
|
|
6821
6854
|
}, []);
|
|
@@ -6856,7 +6889,7 @@ var ScAppSidebar = ({
|
|
|
6856
6889
|
};
|
|
6857
6890
|
const isControlled = !!openSections;
|
|
6858
6891
|
const { scrolled, onScroll } = useScrolled();
|
|
6859
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
6892
|
+
const [internalOpen, setInternalOpen] = (0, import_react24.useState)(
|
|
6860
6893
|
() => {
|
|
6861
6894
|
const init = {};
|
|
6862
6895
|
sections.forEach((s) => {
|
|
@@ -6866,7 +6899,7 @@ var ScAppSidebar = ({
|
|
|
6866
6899
|
}
|
|
6867
6900
|
);
|
|
6868
6901
|
const isSectionOpen = (id) => isControlled ? !!openSections?.[id] : !!internalOpen[id];
|
|
6869
|
-
const handleSectionToggle = (0,
|
|
6902
|
+
const handleSectionToggle = (0, import_react24.useCallback)(
|
|
6870
6903
|
(id) => {
|
|
6871
6904
|
const next = !isSectionOpen(id);
|
|
6872
6905
|
if (isControlled) {
|
|
@@ -7100,7 +7133,7 @@ var ScAppSidebar = ({
|
|
|
7100
7133
|
var ScArtifaxSidebar = ScAppSidebar;
|
|
7101
7134
|
|
|
7102
7135
|
// src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
|
|
7103
|
-
var
|
|
7136
|
+
var import_react25 = require("react");
|
|
7104
7137
|
|
|
7105
7138
|
// src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
|
|
7106
7139
|
var ScSidebarSwitchMenu_default = {
|
|
@@ -7742,7 +7775,7 @@ var ScCatalogixSidebar = ({
|
|
|
7742
7775
|
className,
|
|
7743
7776
|
style
|
|
7744
7777
|
}) => {
|
|
7745
|
-
const [appListOpen, setAppListOpen] = (0,
|
|
7778
|
+
const [appListOpen, setAppListOpen] = (0, import_react25.useState)(false);
|
|
7746
7779
|
const handleSwitch = () => {
|
|
7747
7780
|
setAppListOpen((prev) => !prev);
|
|
7748
7781
|
onLogoClick?.();
|
|
@@ -7985,7 +8018,7 @@ var ScSlider = ({
|
|
|
7985
8018
|
};
|
|
7986
8019
|
|
|
7987
8020
|
// src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
|
|
7988
|
-
var
|
|
8021
|
+
var import_react26 = require("react");
|
|
7989
8022
|
var import_icons42 = require("@streamoid/icons");
|
|
7990
8023
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7991
8024
|
var PRIMARY_ICON = "var(--alias-text---icons-primary)";
|
|
@@ -8176,12 +8209,12 @@ function StreamoidWorkspaceSwitcher({
|
|
|
8176
8209
|
onSwitchWorkspace,
|
|
8177
8210
|
config
|
|
8178
8211
|
}) {
|
|
8179
|
-
const modalRef = (0,
|
|
8212
|
+
const modalRef = (0, import_react26.useRef)(null);
|
|
8180
8213
|
const title = config?.title || "Switch workspace";
|
|
8181
8214
|
const loadingText = config?.loadingText || "Loading workspaces\u2026";
|
|
8182
8215
|
const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
|
|
8183
8216
|
const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
|
|
8184
|
-
(0,
|
|
8217
|
+
(0, import_react26.useEffect)(() => {
|
|
8185
8218
|
if (!open) return;
|
|
8186
8219
|
function handleKeyDown(e) {
|
|
8187
8220
|
if (e.key === "Escape") onClose();
|
|
@@ -9592,7 +9625,7 @@ var ScWorkspaceCard = ({
|
|
|
9592
9625
|
};
|
|
9593
9626
|
|
|
9594
9627
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
9595
|
-
var
|
|
9628
|
+
var import_react27 = require("react");
|
|
9596
9629
|
var import_icons62 = require("@streamoid/icons");
|
|
9597
9630
|
|
|
9598
9631
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
@@ -9633,7 +9666,7 @@ function ScWorkspaceSwitchCard({
|
|
|
9633
9666
|
onSettings,
|
|
9634
9667
|
onLeave
|
|
9635
9668
|
}) {
|
|
9636
|
-
const [internalHover, setInternalHover] = (0,
|
|
9669
|
+
const [internalHover, setInternalHover] = (0, import_react27.useState)(false);
|
|
9637
9670
|
const isHover = hover !== void 0 ? hover : internalHover;
|
|
9638
9671
|
const isCurrent = type === "currentWS";
|
|
9639
9672
|
const isOther = type === "otherWS";
|
|
@@ -9761,7 +9794,7 @@ function ScWorkspaceSwitchCard({
|
|
|
9761
9794
|
var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
|
|
9762
9795
|
|
|
9763
9796
|
// src/SC-Modal/ScModal.tsx
|
|
9764
|
-
var
|
|
9797
|
+
var import_react28 = require("react");
|
|
9765
9798
|
var import_react_dom3 = require("react-dom");
|
|
9766
9799
|
|
|
9767
9800
|
// src/SC-Modal/ScModal.module.css
|
|
@@ -9783,7 +9816,7 @@ var ScModal = ({
|
|
|
9783
9816
|
closeOnBackdrop = true,
|
|
9784
9817
|
closeOnEsc = true
|
|
9785
9818
|
}) => {
|
|
9786
|
-
(0,
|
|
9819
|
+
(0, import_react28.useEffect)(() => {
|
|
9787
9820
|
if (!open || !closeOnEsc) return;
|
|
9788
9821
|
const onKey = (e) => {
|
|
9789
9822
|
if (e.key === "Escape") onClose?.();
|
|
@@ -9816,7 +9849,7 @@ var ScModal = ({
|
|
|
9816
9849
|
};
|
|
9817
9850
|
|
|
9818
9851
|
// src/SC-Drawer/ScDrawer.tsx
|
|
9819
|
-
var
|
|
9852
|
+
var import_react29 = require("react");
|
|
9820
9853
|
var import_react_dom4 = require("react-dom");
|
|
9821
9854
|
|
|
9822
9855
|
// src/SC-Drawer/ScDrawer.module.css
|
|
@@ -9844,8 +9877,8 @@ var ScDrawer = ({
|
|
|
9844
9877
|
backdrop = false,
|
|
9845
9878
|
zIndex
|
|
9846
9879
|
}) => {
|
|
9847
|
-
const panelRef = (0,
|
|
9848
|
-
(0,
|
|
9880
|
+
const panelRef = (0, import_react29.useRef)(null);
|
|
9881
|
+
(0, import_react29.useEffect)(() => {
|
|
9849
9882
|
if (!open) return;
|
|
9850
9883
|
const onKey = (e) => {
|
|
9851
9884
|
if (closeOnEsc && e.key === "Escape") onClose?.();
|
|
@@ -9943,7 +9976,7 @@ var ScTabs = ({
|
|
|
9943
9976
|
};
|
|
9944
9977
|
|
|
9945
9978
|
// src/SC-Counter/ScCounter.tsx
|
|
9946
|
-
var
|
|
9979
|
+
var import_react30 = require("react");
|
|
9947
9980
|
var import_icons63 = require("@streamoid/icons");
|
|
9948
9981
|
|
|
9949
9982
|
// src/SC-Counter/ScCounter.module.css
|
|
@@ -9965,7 +9998,7 @@ var ScCounter = ({
|
|
|
9965
9998
|
className,
|
|
9966
9999
|
style
|
|
9967
10000
|
}) => {
|
|
9968
|
-
const [showInput, setShowInput] = (0,
|
|
10001
|
+
const [showInput, setShowInput] = (0, import_react30.useState)(false);
|
|
9969
10002
|
const set = (n) => {
|
|
9970
10003
|
let v = n;
|
|
9971
10004
|
if (min !== void 0) v = Math.max(min, v);
|
|
@@ -11054,7 +11087,7 @@ var ScSelectionList = ({
|
|
|
11054
11087
|
};
|
|
11055
11088
|
|
|
11056
11089
|
// src/SC-textArea/ScTextArea.tsx
|
|
11057
|
-
var
|
|
11090
|
+
var import_react31 = require("react");
|
|
11058
11091
|
|
|
11059
11092
|
// src/SC-textArea/ScTextArea.module.css
|
|
11060
11093
|
var ScTextArea_default = {
|
|
@@ -11084,7 +11117,7 @@ var ScTextArea = ({
|
|
|
11084
11117
|
style,
|
|
11085
11118
|
...props
|
|
11086
11119
|
}) => {
|
|
11087
|
-
const [focused, setFocused] = (0,
|
|
11120
|
+
const [focused, setFocused] = (0, import_react31.useState)(false);
|
|
11088
11121
|
const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
|
|
11089
11122
|
const stateClass = ScTextArea_default["state-" + derivedState];
|
|
11090
11123
|
const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
|
|
@@ -11126,7 +11159,7 @@ var ScTextArea = ({
|
|
|
11126
11159
|
};
|
|
11127
11160
|
|
|
11128
11161
|
// src/SC-select/ScSelect.tsx
|
|
11129
|
-
var
|
|
11162
|
+
var import_react32 = require("react");
|
|
11130
11163
|
|
|
11131
11164
|
// src/SC-select/ScSelect.module.css
|
|
11132
11165
|
var ScSelect_default = {
|
|
@@ -11163,9 +11196,9 @@ var ScSelect = (props) => {
|
|
|
11163
11196
|
disabled = false,
|
|
11164
11197
|
className
|
|
11165
11198
|
} = props;
|
|
11166
|
-
const [open, setOpen] = (0,
|
|
11167
|
-
const rootRef = (0,
|
|
11168
|
-
(0,
|
|
11199
|
+
const [open, setOpen] = (0, import_react32.useState)(false);
|
|
11200
|
+
const rootRef = (0, import_react32.useRef)(null);
|
|
11201
|
+
(0, import_react32.useEffect)(() => {
|
|
11169
11202
|
if (!open) return;
|
|
11170
11203
|
const handleClick = (e) => {
|
|
11171
11204
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -11256,7 +11289,7 @@ var ScSelect = (props) => {
|
|
|
11256
11289
|
};
|
|
11257
11290
|
|
|
11258
11291
|
// src/SC-fileField/ScFileField.tsx
|
|
11259
|
-
var
|
|
11292
|
+
var import_react33 = require("react");
|
|
11260
11293
|
|
|
11261
11294
|
// src/SC-fileField/ScFileField.module.css
|
|
11262
11295
|
var ScFileField_default = {
|
|
@@ -11294,7 +11327,7 @@ var ScFileField = (props) => {
|
|
|
11294
11327
|
label,
|
|
11295
11328
|
className
|
|
11296
11329
|
} = props;
|
|
11297
|
-
const inputRef = (0,
|
|
11330
|
+
const inputRef = (0, import_react33.useRef)(null);
|
|
11298
11331
|
const hasFile = Boolean(fileName);
|
|
11299
11332
|
const isUploading = Boolean(uploading);
|
|
11300
11333
|
const clampedProgress = Math.max(0, Math.min(100, progress));
|
|
@@ -11413,7 +11446,7 @@ var ScFileField = (props) => {
|
|
|
11413
11446
|
};
|
|
11414
11447
|
|
|
11415
11448
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
11416
|
-
var
|
|
11449
|
+
var import_react34 = require("react");
|
|
11417
11450
|
|
|
11418
11451
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
11419
11452
|
var ScMediaApproval_default = {
|
|
@@ -11460,9 +11493,9 @@ var ScMediaApproval = (props) => {
|
|
|
11460
11493
|
className
|
|
11461
11494
|
} = props;
|
|
11462
11495
|
const total = mediaUrls.length;
|
|
11463
|
-
const [index, setIndex] = (0,
|
|
11464
|
-
const [mediaLoading, setMediaLoading] = (0,
|
|
11465
|
-
(0,
|
|
11496
|
+
const [index, setIndex] = (0, import_react34.useState)(activeIndex ?? 0);
|
|
11497
|
+
const [mediaLoading, setMediaLoading] = (0, import_react34.useState)(false);
|
|
11498
|
+
(0, import_react34.useEffect)(() => {
|
|
11466
11499
|
if (typeof activeIndex === "number") {
|
|
11467
11500
|
setIndex(activeIndex);
|
|
11468
11501
|
}
|
|
@@ -11597,7 +11630,7 @@ var ScMediaApproval = (props) => {
|
|
|
11597
11630
|
};
|
|
11598
11631
|
|
|
11599
11632
|
// src/SC-mediaSelect/ScMediaSelect.tsx
|
|
11600
|
-
var
|
|
11633
|
+
var import_react35 = require("react");
|
|
11601
11634
|
|
|
11602
11635
|
// src/SC-mediaSelect/ScMediaSelect.module.css
|
|
11603
11636
|
var ScMediaSelect_default = {
|
|
@@ -11653,7 +11686,7 @@ var ScMediaSelect = (props) => {
|
|
|
11653
11686
|
} = props;
|
|
11654
11687
|
const total = items.length;
|
|
11655
11688
|
const resolvedMax = typeof max === "number" ? max : total;
|
|
11656
|
-
const selectedSet = (0,
|
|
11689
|
+
const selectedSet = (0, import_react35.useMemo)(() => new Set(selected), [selected]);
|
|
11657
11690
|
const selectedCount = selectedSet.size;
|
|
11658
11691
|
let countLabel = selectedCount + " of " + total + " selected";
|
|
11659
11692
|
if (min > 0) countLabel += " (min " + min + ")";
|
|
@@ -11722,7 +11755,7 @@ var ScMediaSelect = (props) => {
|
|
|
11722
11755
|
};
|
|
11723
11756
|
|
|
11724
11757
|
// src/SC-todoList/ScTodoList.tsx
|
|
11725
|
-
var
|
|
11758
|
+
var import_react36 = require("react");
|
|
11726
11759
|
|
|
11727
11760
|
// src/SC-todoList/ScTodoList.module.css
|
|
11728
11761
|
var ScTodoList_default = {
|
|
@@ -11755,9 +11788,9 @@ var ScTodoList = ({
|
|
|
11755
11788
|
addPlaceholder = "Add an item",
|
|
11756
11789
|
className
|
|
11757
11790
|
}) => {
|
|
11758
|
-
const [editingId, setEditingId] = (0,
|
|
11759
|
-
const [editValue, setEditValue] = (0,
|
|
11760
|
-
const [newValue, setNewValue] = (0,
|
|
11791
|
+
const [editingId, setEditingId] = (0, import_react36.useState)(null);
|
|
11792
|
+
const [editValue, setEditValue] = (0, import_react36.useState)("");
|
|
11793
|
+
const [newValue, setNewValue] = (0, import_react36.useState)("");
|
|
11761
11794
|
const total = items.length;
|
|
11762
11795
|
const completed = items.filter((i) => i.status === "completed").length;
|
|
11763
11796
|
const startEditing = (item) => {
|
|
@@ -12611,7 +12644,7 @@ var ScWorkspaceSwitchMobileV2 = ({
|
|
|
12611
12644
|
};
|
|
12612
12645
|
|
|
12613
12646
|
// src/SC-imageField/ScImageField.tsx
|
|
12614
|
-
var
|
|
12647
|
+
var import_react37 = require("react");
|
|
12615
12648
|
|
|
12616
12649
|
// src/SC-imageField/ScImageField.module.css
|
|
12617
12650
|
var ScImageField_default = {
|
|
@@ -12638,7 +12671,7 @@ var ScImageField = ({
|
|
|
12638
12671
|
onRemove,
|
|
12639
12672
|
className
|
|
12640
12673
|
}) => {
|
|
12641
|
-
const inputRef = (0,
|
|
12674
|
+
const inputRef = (0, import_react37.useRef)(null);
|
|
12642
12675
|
const hasImage = !!imagePreview;
|
|
12643
12676
|
function handleClick() {
|
|
12644
12677
|
if (!hasImage) {
|
|
@@ -12874,7 +12907,7 @@ var ScPlanDetailsCardMobile = ({
|
|
|
12874
12907
|
};
|
|
12875
12908
|
|
|
12876
12909
|
// src/SC-ProfilePopup/ScProfilePopup.tsx
|
|
12877
|
-
var
|
|
12910
|
+
var import_react38 = require("react");
|
|
12878
12911
|
|
|
12879
12912
|
// src/SC-ProfilePopup/ScProfilePopup.module.css
|
|
12880
12913
|
var ScProfilePopup_default = {
|
|
@@ -12908,7 +12941,7 @@ var activateOnKey = (handler) => (event) => {
|
|
|
12908
12941
|
handler();
|
|
12909
12942
|
}
|
|
12910
12943
|
};
|
|
12911
|
-
var ScProfilePopup = (0,
|
|
12944
|
+
var ScProfilePopup = (0, import_react38.forwardRef)(
|
|
12912
12945
|
({
|
|
12913
12946
|
name = "Chris Hemsworth",
|
|
12914
12947
|
email = "chris@kepler.com",
|
package/dist/index.mjs
CHANGED
|
@@ -5732,6 +5732,7 @@ function ScSidebarSearchTrigger({
|
|
|
5732
5732
|
label = "Search or Ask CXO",
|
|
5733
5733
|
shortcut = "\u2318 K",
|
|
5734
5734
|
onClick,
|
|
5735
|
+
onPrefetch,
|
|
5735
5736
|
className
|
|
5736
5737
|
}) {
|
|
5737
5738
|
return /* @__PURE__ */ jsxs43(
|
|
@@ -5740,6 +5741,8 @@ function ScSidebarSearchTrigger({
|
|
|
5740
5741
|
type: "button",
|
|
5741
5742
|
"aria-label": label,
|
|
5742
5743
|
onClick,
|
|
5744
|
+
onPointerEnter: onPrefetch,
|
|
5745
|
+
onFocus: onPrefetch,
|
|
5743
5746
|
className: `${ScSidebarShell_default.searchTrigger} ${expanded ? ScSidebarShell_default.searchTriggerExpanded : ScSidebarShell_default.searchTriggerCollapsed}${className ? ` ${className}` : ""}`,
|
|
5744
5747
|
children: [
|
|
5745
5748
|
/* @__PURE__ */ jsx54(
|
|
@@ -5988,8 +5991,35 @@ function ScWorkspaceAccountMenu({
|
|
|
5988
5991
|
);
|
|
5989
5992
|
}
|
|
5990
5993
|
|
|
5994
|
+
// src/SC-SidebarShell/useStreamoidSearchShortcut.ts
|
|
5995
|
+
import { useEffect as useEffect5, useRef as useRef6 } from "react";
|
|
5996
|
+
function matchesStreamoidSearchShortcut(event, letter = "k") {
|
|
5997
|
+
if (event.altKey) return false;
|
|
5998
|
+
if (event.repeat) return false;
|
|
5999
|
+
if (!event.metaKey && !event.ctrlKey) return false;
|
|
6000
|
+
return event.key.toLowerCase() === letter.toLowerCase();
|
|
6001
|
+
}
|
|
6002
|
+
function useStreamoidSearchShortcut({
|
|
6003
|
+
onTrigger,
|
|
6004
|
+
enabled = true,
|
|
6005
|
+
letter = "k"
|
|
6006
|
+
}) {
|
|
6007
|
+
const handler = useRef6(onTrigger);
|
|
6008
|
+
handler.current = onTrigger;
|
|
6009
|
+
useEffect5(() => {
|
|
6010
|
+
if (!enabled) return;
|
|
6011
|
+
const onKeyDown = (event) => {
|
|
6012
|
+
if (!matchesStreamoidSearchShortcut(event, letter)) return;
|
|
6013
|
+
event.preventDefault();
|
|
6014
|
+
handler.current();
|
|
6015
|
+
};
|
|
6016
|
+
document.addEventListener("keydown", onKeyDown);
|
|
6017
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6018
|
+
}, [enabled, letter]);
|
|
6019
|
+
}
|
|
6020
|
+
|
|
5991
6021
|
// src/SC-SidebarShell/useStreamoidShellPreferences.ts
|
|
5992
|
-
import { useCallback as useCallback2, useEffect as
|
|
6022
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useMemo, useState as useState14 } from "react";
|
|
5993
6023
|
var THEME_COOKIE = "streamoid_theme";
|
|
5994
6024
|
var SIDEBAR_COOKIE = "streamoid_sidebar";
|
|
5995
6025
|
var THEME_STORAGE_KEY = "streamoid.shell.theme";
|
|
@@ -6091,19 +6121,19 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6091
6121
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, mode));
|
|
6092
6122
|
writeCookie(THEME_COOKIE, mode);
|
|
6093
6123
|
}, [stableOptions]);
|
|
6094
|
-
|
|
6124
|
+
useEffect6(() => {
|
|
6095
6125
|
writeStorage(THEME_STORAGE_KEY, preference);
|
|
6096
6126
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, preference));
|
|
6097
6127
|
writeCookie(THEME_COOKIE, preference);
|
|
6098
6128
|
}, [preference, stableOptions]);
|
|
6099
|
-
|
|
6129
|
+
useEffect6(() => {
|
|
6100
6130
|
if (!canUseDom()) return;
|
|
6101
6131
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6102
6132
|
const onChange = (event) => setSystemDark(event.matches);
|
|
6103
6133
|
media.addEventListener("change", onChange);
|
|
6104
6134
|
return () => media.removeEventListener("change", onChange);
|
|
6105
6135
|
}, []);
|
|
6106
|
-
|
|
6136
|
+
useEffect6(() => {
|
|
6107
6137
|
if (!canUseDom()) return;
|
|
6108
6138
|
const sync = () => setPreferenceState(readTheme(stableOptions));
|
|
6109
6139
|
const onStorage = (event) => {
|
|
@@ -6119,7 +6149,7 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6119
6149
|
};
|
|
6120
6150
|
}, [stableOptions]);
|
|
6121
6151
|
const resolved = preference === "system" ? systemDark ? "dark" : "light" : preference;
|
|
6122
|
-
|
|
6152
|
+
useEffect6(() => {
|
|
6123
6153
|
if (!canUseDom() || !stableOptions.applyToDocument) return;
|
|
6124
6154
|
const root = document.documentElement;
|
|
6125
6155
|
root.setAttribute("data-theme", resolved === "light" ? "Light" : "Dark");
|
|
@@ -6158,7 +6188,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6158
6188
|
return next;
|
|
6159
6189
|
});
|
|
6160
6190
|
}, [stableOptions]);
|
|
6161
|
-
|
|
6191
|
+
useEffect6(() => {
|
|
6162
6192
|
const serialized = expanded ? "expanded" : "collapsed";
|
|
6163
6193
|
writeStorage(SIDEBAR_STORAGE_KEY, serialized);
|
|
6164
6194
|
stableOptions.legacyCollapsedKeys.forEach(
|
|
@@ -6166,7 +6196,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6166
6196
|
);
|
|
6167
6197
|
writeCookie(SIDEBAR_COOKIE, serialized);
|
|
6168
6198
|
}, [expanded, stableOptions]);
|
|
6169
|
-
|
|
6199
|
+
useEffect6(() => {
|
|
6170
6200
|
if (!canUseDom()) return;
|
|
6171
6201
|
const sync = () => setExpandedState(readExpanded(stableOptions));
|
|
6172
6202
|
const onStorage = (event) => {
|
|
@@ -6441,8 +6471,8 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6441
6471
|
|
|
6442
6472
|
// src/SC-SidebarShell/ScSidebarPopover.tsx
|
|
6443
6473
|
import {
|
|
6444
|
-
useEffect as
|
|
6445
|
-
useRef as
|
|
6474
|
+
useEffect as useEffect7,
|
|
6475
|
+
useRef as useRef7
|
|
6446
6476
|
} from "react";
|
|
6447
6477
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6448
6478
|
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
@@ -6462,13 +6492,13 @@ function ScSidebarPopover({
|
|
|
6462
6492
|
className,
|
|
6463
6493
|
style
|
|
6464
6494
|
}) {
|
|
6465
|
-
const panelRef =
|
|
6495
|
+
const panelRef = useRef7(null);
|
|
6466
6496
|
const { style: position, arrow } = useStreamoidAnchoredPopover(
|
|
6467
6497
|
anchorRef,
|
|
6468
6498
|
panelRef,
|
|
6469
6499
|
{ width, alignRef }
|
|
6470
6500
|
);
|
|
6471
|
-
|
|
6501
|
+
useEffect7(() => {
|
|
6472
6502
|
const onKeyDown = (event) => {
|
|
6473
6503
|
if (event.key === "Escape") onClose();
|
|
6474
6504
|
};
|
|
@@ -6629,7 +6659,8 @@ function SidebarHeader({
|
|
|
6629
6659
|
expanded,
|
|
6630
6660
|
label: header.searchLabel,
|
|
6631
6661
|
shortcut: header.searchShortcut,
|
|
6632
|
-
onClick: header.onSearchClick
|
|
6662
|
+
onClick: header.onSearchClick,
|
|
6663
|
+
onPrefetch: header.onSearchPrefetch
|
|
6633
6664
|
}
|
|
6634
6665
|
),
|
|
6635
6666
|
/* @__PURE__ */ jsx56(ScHDivider, { fullBleed: true, className: ScArtifaxSidebar_default.headerDivider })
|
|
@@ -7815,7 +7846,7 @@ var ScSlider = ({
|
|
|
7815
7846
|
};
|
|
7816
7847
|
|
|
7817
7848
|
// src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
|
|
7818
|
-
import { useEffect as
|
|
7849
|
+
import { useEffect as useEffect8, useRef as useRef8 } from "react";
|
|
7819
7850
|
import {
|
|
7820
7851
|
SiconClose as SiconClose3,
|
|
7821
7852
|
SiconTeam as SiconTeam5,
|
|
@@ -8011,12 +8042,12 @@ function StreamoidWorkspaceSwitcher({
|
|
|
8011
8042
|
onSwitchWorkspace,
|
|
8012
8043
|
config
|
|
8013
8044
|
}) {
|
|
8014
|
-
const modalRef =
|
|
8045
|
+
const modalRef = useRef8(null);
|
|
8015
8046
|
const title = config?.title || "Switch workspace";
|
|
8016
8047
|
const loadingText = config?.loadingText || "Loading workspaces\u2026";
|
|
8017
8048
|
const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
|
|
8018
8049
|
const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
|
|
8019
|
-
|
|
8050
|
+
useEffect8(() => {
|
|
8020
8051
|
if (!open) return;
|
|
8021
8052
|
function handleKeyDown(e) {
|
|
8022
8053
|
if (e.key === "Escape") onClose();
|
|
@@ -9601,7 +9632,7 @@ function ScWorkspaceSwitchCard({
|
|
|
9601
9632
|
var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
|
|
9602
9633
|
|
|
9603
9634
|
// src/SC-Modal/ScModal.tsx
|
|
9604
|
-
import { useEffect as
|
|
9635
|
+
import { useEffect as useEffect9 } from "react";
|
|
9605
9636
|
import { createPortal as createPortal3 } from "react-dom";
|
|
9606
9637
|
|
|
9607
9638
|
// src/SC-Modal/ScModal.module.css
|
|
@@ -9623,7 +9654,7 @@ var ScModal = ({
|
|
|
9623
9654
|
closeOnBackdrop = true,
|
|
9624
9655
|
closeOnEsc = true
|
|
9625
9656
|
}) => {
|
|
9626
|
-
|
|
9657
|
+
useEffect9(() => {
|
|
9627
9658
|
if (!open || !closeOnEsc) return;
|
|
9628
9659
|
const onKey = (e) => {
|
|
9629
9660
|
if (e.key === "Escape") onClose?.();
|
|
@@ -9656,7 +9687,7 @@ var ScModal = ({
|
|
|
9656
9687
|
};
|
|
9657
9688
|
|
|
9658
9689
|
// src/SC-Drawer/ScDrawer.tsx
|
|
9659
|
-
import { useEffect as
|
|
9690
|
+
import { useEffect as useEffect10, useRef as useRef9 } from "react";
|
|
9660
9691
|
import { createPortal as createPortal4 } from "react-dom";
|
|
9661
9692
|
|
|
9662
9693
|
// src/SC-Drawer/ScDrawer.module.css
|
|
@@ -9684,8 +9715,8 @@ var ScDrawer = ({
|
|
|
9684
9715
|
backdrop = false,
|
|
9685
9716
|
zIndex
|
|
9686
9717
|
}) => {
|
|
9687
|
-
const panelRef =
|
|
9688
|
-
|
|
9718
|
+
const panelRef = useRef9(null);
|
|
9719
|
+
useEffect10(() => {
|
|
9689
9720
|
if (!open) return;
|
|
9690
9721
|
const onKey = (e) => {
|
|
9691
9722
|
if (closeOnEsc && e.key === "Escape") onClose?.();
|
|
@@ -10972,7 +11003,7 @@ var ScTextArea = ({
|
|
|
10972
11003
|
};
|
|
10973
11004
|
|
|
10974
11005
|
// src/SC-select/ScSelect.tsx
|
|
10975
|
-
import { useState as useState22, useRef as
|
|
11006
|
+
import { useState as useState22, useRef as useRef10, useEffect as useEffect11 } from "react";
|
|
10976
11007
|
|
|
10977
11008
|
// src/SC-select/ScSelect.module.css
|
|
10978
11009
|
var ScSelect_default = {
|
|
@@ -11010,8 +11041,8 @@ var ScSelect = (props) => {
|
|
|
11010
11041
|
className
|
|
11011
11042
|
} = props;
|
|
11012
11043
|
const [open, setOpen] = useState22(false);
|
|
11013
|
-
const rootRef =
|
|
11014
|
-
|
|
11044
|
+
const rootRef = useRef10(null);
|
|
11045
|
+
useEffect11(() => {
|
|
11015
11046
|
if (!open) return;
|
|
11016
11047
|
const handleClick = (e) => {
|
|
11017
11048
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -11102,7 +11133,7 @@ var ScSelect = (props) => {
|
|
|
11102
11133
|
};
|
|
11103
11134
|
|
|
11104
11135
|
// src/SC-fileField/ScFileField.tsx
|
|
11105
|
-
import { useRef as
|
|
11136
|
+
import { useRef as useRef11 } from "react";
|
|
11106
11137
|
|
|
11107
11138
|
// src/SC-fileField/ScFileField.module.css
|
|
11108
11139
|
var ScFileField_default = {
|
|
@@ -11140,7 +11171,7 @@ var ScFileField = (props) => {
|
|
|
11140
11171
|
label,
|
|
11141
11172
|
className
|
|
11142
11173
|
} = props;
|
|
11143
|
-
const inputRef =
|
|
11174
|
+
const inputRef = useRef11(null);
|
|
11144
11175
|
const hasFile = Boolean(fileName);
|
|
11145
11176
|
const isUploading = Boolean(uploading);
|
|
11146
11177
|
const clampedProgress = Math.max(0, Math.min(100, progress));
|
|
@@ -11259,7 +11290,7 @@ var ScFileField = (props) => {
|
|
|
11259
11290
|
};
|
|
11260
11291
|
|
|
11261
11292
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
11262
|
-
import { useState as useState23, useEffect as
|
|
11293
|
+
import { useState as useState23, useEffect as useEffect12 } from "react";
|
|
11263
11294
|
|
|
11264
11295
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
11265
11296
|
var ScMediaApproval_default = {
|
|
@@ -11308,7 +11339,7 @@ var ScMediaApproval = (props) => {
|
|
|
11308
11339
|
const total = mediaUrls.length;
|
|
11309
11340
|
const [index, setIndex] = useState23(activeIndex ?? 0);
|
|
11310
11341
|
const [mediaLoading, setMediaLoading] = useState23(false);
|
|
11311
|
-
|
|
11342
|
+
useEffect12(() => {
|
|
11312
11343
|
if (typeof activeIndex === "number") {
|
|
11313
11344
|
setIndex(activeIndex);
|
|
11314
11345
|
}
|
|
@@ -12457,7 +12488,7 @@ var ScWorkspaceSwitchMobileV2 = ({
|
|
|
12457
12488
|
};
|
|
12458
12489
|
|
|
12459
12490
|
// src/SC-imageField/ScImageField.tsx
|
|
12460
|
-
import { useRef as
|
|
12491
|
+
import { useRef as useRef12 } from "react";
|
|
12461
12492
|
|
|
12462
12493
|
// src/SC-imageField/ScImageField.module.css
|
|
12463
12494
|
var ScImageField_default = {
|
|
@@ -12484,7 +12515,7 @@ var ScImageField = ({
|
|
|
12484
12515
|
onRemove,
|
|
12485
12516
|
className
|
|
12486
12517
|
}) => {
|
|
12487
|
-
const inputRef =
|
|
12518
|
+
const inputRef = useRef12(null);
|
|
12488
12519
|
const hasImage = !!imagePreview;
|
|
12489
12520
|
function handleClick() {
|
|
12490
12521
|
if (!hasImage) {
|
|
@@ -13102,6 +13133,7 @@ export {
|
|
|
13102
13133
|
formatStreamoidAppVersion,
|
|
13103
13134
|
formatSubAgentLabel,
|
|
13104
13135
|
hasCollapsedMark,
|
|
13136
|
+
matchesStreamoidSearchShortcut,
|
|
13105
13137
|
parseVersionManifest,
|
|
13106
13138
|
resolveAnchoredPopoverArrow,
|
|
13107
13139
|
resolveAnchoredPopoverPosition,
|
|
@@ -13118,6 +13150,7 @@ export {
|
|
|
13118
13150
|
useStreamoidAnchoredPopover,
|
|
13119
13151
|
useStreamoidAnchoredPopoverPosition,
|
|
13120
13152
|
useStreamoidPanelWidth,
|
|
13153
|
+
useStreamoidSearchShortcut,
|
|
13121
13154
|
useStreamoidSidebarPopoverPosition,
|
|
13122
13155
|
useStreamoidSidebarPreference,
|
|
13123
13156
|
useStreamoidThemePreference
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamoid/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.57",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"watch:dts": "tsup src/index.ts --dts-only --watch",
|
|
22
22
|
"dev": "sh -c 'npm run watch:js & npm run watch:dts & wait'",
|
|
23
23
|
"lint": "eslint src/",
|
|
24
|
-
"test:panel-resize": "npm run build:js && node --test tests/panel-resize.test.mjs"
|
|
24
|
+
"test:panel-resize": "npm run build:js && node --test tests/panel-resize.test.mjs",
|
|
25
|
+
"test:search-shortcut": "npm run build:js && node --test tests/search-shortcut.test.mjs"
|
|
25
26
|
},
|
|
26
27
|
"peerDependencies": {
|
|
27
28
|
"react": "^18.0.0 || ^19.0.0",
|