@streamoid/ui 0.6.55 → 0.6.56
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 +76 -2
- package/dist/index.d.ts +76 -2
- package/dist/index.js +100 -68
- package/dist/index.mjs +61 -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,58 @@ 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
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Is this keydown the search chord?
|
|
1073
|
+
*
|
|
1074
|
+
* Pure and exported so the decision can be tested without a DOM, the same way
|
|
1075
|
+
* `resolvePanelResize` is split out of the resize handle.
|
|
1076
|
+
*
|
|
1077
|
+
* - `metaKey` OR `ctrlKey`, so one binding serves macOS and everything else.
|
|
1078
|
+
* - `altKey` is excluded, so ⌥⌘K and Ctrl+Alt+K stay with the browser.
|
|
1079
|
+
* - `event.key` and not `event.code`: `key` carries the CHARACTER, already
|
|
1080
|
+
* resolved through the keyboard layout. `code` is physical, so on AZERTY or
|
|
1081
|
+
* Dvorak the key labelled K is not `KeyK` and the shortcut would land under
|
|
1082
|
+
* a different letter than the `⌘ K` hint promises.
|
|
1083
|
+
*/
|
|
1084
|
+
declare function matchesStreamoidSearchShortcut(event: StreamoidSearchShortcutEvent, letter?: string): boolean;
|
|
1085
|
+
interface StreamoidSearchShortcutOptions {
|
|
1086
|
+
/** Fired on ⌘K / Ctrl+K. Its identity does not matter — it is read through a
|
|
1087
|
+
* ref, so an inline arrow will not rebind the listener each render. */
|
|
1088
|
+
onTrigger: () => void;
|
|
1089
|
+
/** Bind the key. `false` unbinds — e.g. while a modal owns the keyboard. */
|
|
1090
|
+
enabled?: boolean;
|
|
1091
|
+
/** The letter pressed with the modifier. Case-insensitive. */
|
|
1092
|
+
letter?: string;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* ⌘K / Ctrl+K, for the dialog `ScSidebarSearchTrigger` advertises.
|
|
1096
|
+
*
|
|
1097
|
+
* The trigger has drawn a `⌘ K` hint since it shipped and NO APP EVER BOUND THE
|
|
1098
|
+
* KEY — the one affordance telling people the rail has a command bar did
|
|
1099
|
+
* nothing when used. This lives here so the component that makes the promise
|
|
1100
|
+
* and the hook that keeps it ship together, rather than each product
|
|
1101
|
+
* rediscovering the same eight lines and getting the modifier handling
|
|
1102
|
+
* slightly different.
|
|
1103
|
+
*
|
|
1104
|
+
* The host still owns the dialog's open state, so this reports the chord and
|
|
1105
|
+
* decides nothing. Wire it to a TOGGLE rather than an open: every other command
|
|
1106
|
+
* palette closes on the same chord that opened it.
|
|
1107
|
+
*
|
|
1108
|
+
* It calls `preventDefault`, because Ctrl+K is taken — Chrome and Firefox both
|
|
1109
|
+
* send it to the address bar, and without this the rail's own search loses to
|
|
1110
|
+
* the browser. And it fires even while a text field has focus, which is
|
|
1111
|
+
* deliberate: the chord is how you leave the field.
|
|
1112
|
+
*/
|
|
1113
|
+
declare function useStreamoidSearchShortcut({ onTrigger, enabled, letter, }: StreamoidSearchShortcutOptions): void;
|
|
1114
|
+
|
|
1046
1115
|
interface StreamoidThemePreferenceOptions {
|
|
1047
1116
|
defaultMode?: ScShellThemeMode;
|
|
1048
1117
|
legacyStorageKeys?: string[];
|
|
@@ -1322,6 +1391,11 @@ interface AppSidebarHeader {
|
|
|
1322
1391
|
searchLabel?: string;
|
|
1323
1392
|
searchShortcut?: string;
|
|
1324
1393
|
onSearchClick?: () => void;
|
|
1394
|
+
/** Hover/focus on the search trigger, so the host can start loading the
|
|
1395
|
+
* dialog before it is clicked. See `ScSidebarSearchTriggerProps.onPrefetch`
|
|
1396
|
+
* — the dialog is a 5.3MB lazy chunk in CXO and Artifax, and without this
|
|
1397
|
+
* the first click looks inert while it downloads. */
|
|
1398
|
+
onSearchPrefetch?: () => void;
|
|
1325
1399
|
/** Omit the search field entirely — a product that has no search yet. */
|
|
1326
1400
|
hideSearch?: boolean;
|
|
1327
1401
|
}
|
|
@@ -2691,4 +2765,4 @@ interface IScProfilePopupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
2691
2765
|
*/
|
|
2692
2766
|
declare const ScProfilePopup: React$1.ForwardRefExoticComponent<IScProfilePopupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2693
2767
|
|
|
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 };
|
|
2768
|
+
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,58 @@ 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
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Is this keydown the search chord?
|
|
1073
|
+
*
|
|
1074
|
+
* Pure and exported so the decision can be tested without a DOM, the same way
|
|
1075
|
+
* `resolvePanelResize` is split out of the resize handle.
|
|
1076
|
+
*
|
|
1077
|
+
* - `metaKey` OR `ctrlKey`, so one binding serves macOS and everything else.
|
|
1078
|
+
* - `altKey` is excluded, so ⌥⌘K and Ctrl+Alt+K stay with the browser.
|
|
1079
|
+
* - `event.key` and not `event.code`: `key` carries the CHARACTER, already
|
|
1080
|
+
* resolved through the keyboard layout. `code` is physical, so on AZERTY or
|
|
1081
|
+
* Dvorak the key labelled K is not `KeyK` and the shortcut would land under
|
|
1082
|
+
* a different letter than the `⌘ K` hint promises.
|
|
1083
|
+
*/
|
|
1084
|
+
declare function matchesStreamoidSearchShortcut(event: StreamoidSearchShortcutEvent, letter?: string): boolean;
|
|
1085
|
+
interface StreamoidSearchShortcutOptions {
|
|
1086
|
+
/** Fired on ⌘K / Ctrl+K. Its identity does not matter — it is read through a
|
|
1087
|
+
* ref, so an inline arrow will not rebind the listener each render. */
|
|
1088
|
+
onTrigger: () => void;
|
|
1089
|
+
/** Bind the key. `false` unbinds — e.g. while a modal owns the keyboard. */
|
|
1090
|
+
enabled?: boolean;
|
|
1091
|
+
/** The letter pressed with the modifier. Case-insensitive. */
|
|
1092
|
+
letter?: string;
|
|
1093
|
+
}
|
|
1094
|
+
/**
|
|
1095
|
+
* ⌘K / Ctrl+K, for the dialog `ScSidebarSearchTrigger` advertises.
|
|
1096
|
+
*
|
|
1097
|
+
* The trigger has drawn a `⌘ K` hint since it shipped and NO APP EVER BOUND THE
|
|
1098
|
+
* KEY — the one affordance telling people the rail has a command bar did
|
|
1099
|
+
* nothing when used. This lives here so the component that makes the promise
|
|
1100
|
+
* and the hook that keeps it ship together, rather than each product
|
|
1101
|
+
* rediscovering the same eight lines and getting the modifier handling
|
|
1102
|
+
* slightly different.
|
|
1103
|
+
*
|
|
1104
|
+
* The host still owns the dialog's open state, so this reports the chord and
|
|
1105
|
+
* decides nothing. Wire it to a TOGGLE rather than an open: every other command
|
|
1106
|
+
* palette closes on the same chord that opened it.
|
|
1107
|
+
*
|
|
1108
|
+
* It calls `preventDefault`, because Ctrl+K is taken — Chrome and Firefox both
|
|
1109
|
+
* send it to the address bar, and without this the rail's own search loses to
|
|
1110
|
+
* the browser. And it fires even while a text field has focus, which is
|
|
1111
|
+
* deliberate: the chord is how you leave the field.
|
|
1112
|
+
*/
|
|
1113
|
+
declare function useStreamoidSearchShortcut({ onTrigger, enabled, letter, }: StreamoidSearchShortcutOptions): void;
|
|
1114
|
+
|
|
1046
1115
|
interface StreamoidThemePreferenceOptions {
|
|
1047
1116
|
defaultMode?: ScShellThemeMode;
|
|
1048
1117
|
legacyStorageKeys?: string[];
|
|
@@ -1322,6 +1391,11 @@ interface AppSidebarHeader {
|
|
|
1322
1391
|
searchLabel?: string;
|
|
1323
1392
|
searchShortcut?: string;
|
|
1324
1393
|
onSearchClick?: () => void;
|
|
1394
|
+
/** Hover/focus on the search trigger, so the host can start loading the
|
|
1395
|
+
* dialog before it is clicked. See `ScSidebarSearchTriggerProps.onPrefetch`
|
|
1396
|
+
* — the dialog is a 5.3MB lazy chunk in CXO and Artifax, and without this
|
|
1397
|
+
* the first click looks inert while it downloads. */
|
|
1398
|
+
onSearchPrefetch?: () => void;
|
|
1325
1399
|
/** Omit the search field entirely — a product that has no search yet. */
|
|
1326
1400
|
hideSearch?: boolean;
|
|
1327
1401
|
}
|
|
@@ -2691,4 +2765,4 @@ interface IScProfilePopupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
2691
2765
|
*/
|
|
2692
2766
|
declare const ScProfilePopup: React$1.ForwardRefExoticComponent<IScProfilePopupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
2693
2767
|
|
|
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 };
|
|
2768
|
+
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,34 @@ 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.metaKey && !event.ctrlKey) return false;
|
|
6189
|
+
return event.key.toLowerCase() === letter.toLowerCase();
|
|
6190
|
+
}
|
|
6191
|
+
function useStreamoidSearchShortcut({
|
|
6192
|
+
onTrigger,
|
|
6193
|
+
enabled = true,
|
|
6194
|
+
letter = "k"
|
|
6195
|
+
}) {
|
|
6196
|
+
const handler = (0, import_react19.useRef)(onTrigger);
|
|
6197
|
+
handler.current = onTrigger;
|
|
6198
|
+
(0, import_react19.useEffect)(() => {
|
|
6199
|
+
if (!enabled) return;
|
|
6200
|
+
const onKeyDown = (event) => {
|
|
6201
|
+
if (!matchesStreamoidSearchShortcut(event, letter)) return;
|
|
6202
|
+
event.preventDefault();
|
|
6203
|
+
handler.current();
|
|
6204
|
+
};
|
|
6205
|
+
document.addEventListener("keydown", onKeyDown);
|
|
6206
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6207
|
+
}, [enabled, letter]);
|
|
6208
|
+
}
|
|
6209
|
+
|
|
6210
|
+
// src/SC-SidebarShell/useStreamoidShellPreferences.ts
|
|
6211
|
+
var import_react20 = require("react");
|
|
6181
6212
|
var THEME_COOKIE = "streamoid_theme";
|
|
6182
6213
|
var SIDEBAR_COOKIE = "streamoid_sidebar";
|
|
6183
6214
|
var THEME_STORAGE_KEY = "streamoid.shell.theme";
|
|
@@ -6259,7 +6290,7 @@ function readExpanded(options) {
|
|
|
6259
6290
|
}
|
|
6260
6291
|
function useStreamoidThemePreference(options = {}) {
|
|
6261
6292
|
const legacyKeySignature = (options.legacyStorageKeys ?? []).join("\0");
|
|
6262
|
-
const stableOptions = (0,
|
|
6293
|
+
const stableOptions = (0, import_react20.useMemo)(
|
|
6263
6294
|
() => ({
|
|
6264
6295
|
defaultMode: options.defaultMode,
|
|
6265
6296
|
legacyStorageKeys: legacyKeySignature ? legacyKeySignature.split("\0") : [],
|
|
@@ -6267,31 +6298,31 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6267
6298
|
}),
|
|
6268
6299
|
[options.defaultMode, options.applyToDocument, legacyKeySignature]
|
|
6269
6300
|
);
|
|
6270
|
-
const [preference, setPreferenceState] = (0,
|
|
6301
|
+
const [preference, setPreferenceState] = (0, import_react20.useState)(
|
|
6271
6302
|
() => readTheme(stableOptions)
|
|
6272
6303
|
);
|
|
6273
|
-
const [systemDark, setSystemDark] = (0,
|
|
6304
|
+
const [systemDark, setSystemDark] = (0, import_react20.useState)(
|
|
6274
6305
|
() => canUseDom() && window.matchMedia("(prefers-color-scheme: dark)").matches
|
|
6275
6306
|
);
|
|
6276
|
-
const setPreference = (0,
|
|
6307
|
+
const setPreference = (0, import_react20.useCallback)((mode) => {
|
|
6277
6308
|
setPreferenceState(mode);
|
|
6278
6309
|
writeStorage(THEME_STORAGE_KEY, mode);
|
|
6279
6310
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, mode));
|
|
6280
6311
|
writeCookie(THEME_COOKIE, mode);
|
|
6281
6312
|
}, [stableOptions]);
|
|
6282
|
-
(0,
|
|
6313
|
+
(0, import_react20.useEffect)(() => {
|
|
6283
6314
|
writeStorage(THEME_STORAGE_KEY, preference);
|
|
6284
6315
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, preference));
|
|
6285
6316
|
writeCookie(THEME_COOKIE, preference);
|
|
6286
6317
|
}, [preference, stableOptions]);
|
|
6287
|
-
(0,
|
|
6318
|
+
(0, import_react20.useEffect)(() => {
|
|
6288
6319
|
if (!canUseDom()) return;
|
|
6289
6320
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6290
6321
|
const onChange = (event) => setSystemDark(event.matches);
|
|
6291
6322
|
media.addEventListener("change", onChange);
|
|
6292
6323
|
return () => media.removeEventListener("change", onChange);
|
|
6293
6324
|
}, []);
|
|
6294
|
-
(0,
|
|
6325
|
+
(0, import_react20.useEffect)(() => {
|
|
6295
6326
|
if (!canUseDom()) return;
|
|
6296
6327
|
const sync = () => setPreferenceState(readTheme(stableOptions));
|
|
6297
6328
|
const onStorage = (event) => {
|
|
@@ -6307,7 +6338,7 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6307
6338
|
};
|
|
6308
6339
|
}, [stableOptions]);
|
|
6309
6340
|
const resolved = preference === "system" ? systemDark ? "dark" : "light" : preference;
|
|
6310
|
-
(0,
|
|
6341
|
+
(0, import_react20.useEffect)(() => {
|
|
6311
6342
|
if (!canUseDom() || !stableOptions.applyToDocument) return;
|
|
6312
6343
|
const root = document.documentElement;
|
|
6313
6344
|
root.setAttribute("data-theme", resolved === "light" ? "Light" : "Dark");
|
|
@@ -6317,15 +6348,15 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6317
6348
|
}
|
|
6318
6349
|
function useStreamoidSidebarPreference(options = {}) {
|
|
6319
6350
|
const legacyKeySignature = (options.legacyCollapsedKeys ?? []).join("\0");
|
|
6320
|
-
const stableOptions = (0,
|
|
6351
|
+
const stableOptions = (0, import_react20.useMemo)(
|
|
6321
6352
|
() => ({
|
|
6322
6353
|
defaultExpanded: options.defaultExpanded,
|
|
6323
6354
|
legacyCollapsedKeys: legacyKeySignature ? legacyKeySignature.split("\0") : []
|
|
6324
6355
|
}),
|
|
6325
6356
|
[options.defaultExpanded, legacyKeySignature]
|
|
6326
6357
|
);
|
|
6327
|
-
const [expanded, setExpandedState] = (0,
|
|
6328
|
-
const setExpanded = (0,
|
|
6358
|
+
const [expanded, setExpandedState] = (0, import_react20.useState)(() => readExpanded(stableOptions));
|
|
6359
|
+
const setExpanded = (0, import_react20.useCallback)((nextExpanded) => {
|
|
6329
6360
|
setExpandedState(nextExpanded);
|
|
6330
6361
|
const serialized = nextExpanded ? "expanded" : "collapsed";
|
|
6331
6362
|
writeStorage(SIDEBAR_STORAGE_KEY, serialized);
|
|
@@ -6334,7 +6365,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6334
6365
|
);
|
|
6335
6366
|
writeCookie(SIDEBAR_COOKIE, serialized);
|
|
6336
6367
|
}, [stableOptions]);
|
|
6337
|
-
const toggle = (0,
|
|
6368
|
+
const toggle = (0, import_react20.useCallback)(() => {
|
|
6338
6369
|
setExpandedState((current) => {
|
|
6339
6370
|
const next = !current;
|
|
6340
6371
|
const serialized = next ? "expanded" : "collapsed";
|
|
@@ -6346,7 +6377,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6346
6377
|
return next;
|
|
6347
6378
|
});
|
|
6348
6379
|
}, [stableOptions]);
|
|
6349
|
-
(0,
|
|
6380
|
+
(0, import_react20.useEffect)(() => {
|
|
6350
6381
|
const serialized = expanded ? "expanded" : "collapsed";
|
|
6351
6382
|
writeStorage(SIDEBAR_STORAGE_KEY, serialized);
|
|
6352
6383
|
stableOptions.legacyCollapsedKeys.forEach(
|
|
@@ -6354,7 +6385,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6354
6385
|
);
|
|
6355
6386
|
writeCookie(SIDEBAR_COOKIE, serialized);
|
|
6356
6387
|
}, [expanded, stableOptions]);
|
|
6357
|
-
(0,
|
|
6388
|
+
(0, import_react20.useEffect)(() => {
|
|
6358
6389
|
if (!canUseDom()) return;
|
|
6359
6390
|
const sync = () => setExpandedState(readExpanded(stableOptions));
|
|
6360
6391
|
const onStorage = (event) => {
|
|
@@ -6373,7 +6404,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6373
6404
|
}
|
|
6374
6405
|
|
|
6375
6406
|
// src/SC-SidebarShell/useStreamoidAnchoredPopoverPosition.ts
|
|
6376
|
-
var
|
|
6407
|
+
var import_react21 = require("react");
|
|
6377
6408
|
var ARROW_EDGE_INSET = 18;
|
|
6378
6409
|
function resolveAnchoredPopoverArrow({
|
|
6379
6410
|
anchor,
|
|
@@ -6428,7 +6459,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
|
|
|
6428
6459
|
inset = DEFAULT_INSET,
|
|
6429
6460
|
alignRef
|
|
6430
6461
|
}) {
|
|
6431
|
-
const [state, setState] = (0,
|
|
6462
|
+
const [state, setState] = (0, import_react21.useState)({
|
|
6432
6463
|
style: {
|
|
6433
6464
|
position: "fixed",
|
|
6434
6465
|
left: 0,
|
|
@@ -6440,7 +6471,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
|
|
|
6440
6471
|
},
|
|
6441
6472
|
arrow: null
|
|
6442
6473
|
});
|
|
6443
|
-
(0,
|
|
6474
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
6444
6475
|
const anchor = anchorRef.current;
|
|
6445
6476
|
if (!anchor || typeof window === "undefined") return;
|
|
6446
6477
|
const measure = () => {
|
|
@@ -6491,7 +6522,7 @@ function useStreamoidAnchoredPopover(anchorRef, panelRef, {
|
|
|
6491
6522
|
return state;
|
|
6492
6523
|
}
|
|
6493
6524
|
function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap = DEFAULT_GAP, inset = DEFAULT_INSET }) {
|
|
6494
|
-
const [position, setPosition] = (0,
|
|
6525
|
+
const [position, setPosition] = (0, import_react21.useState)({
|
|
6495
6526
|
position: "fixed",
|
|
6496
6527
|
left: 0,
|
|
6497
6528
|
top: 0,
|
|
@@ -6500,7 +6531,7 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
|
|
|
6500
6531
|
maxHeight: `calc(100dvh - ${inset * 2}px)`,
|
|
6501
6532
|
visibility: "hidden"
|
|
6502
6533
|
});
|
|
6503
|
-
(0,
|
|
6534
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
6504
6535
|
const anchor = anchorRef.current;
|
|
6505
6536
|
if (!anchor || typeof window === "undefined") return;
|
|
6506
6537
|
const measure = () => {
|
|
@@ -6544,7 +6575,7 @@ function useStreamoidAnchoredPopoverPosition(anchorRef, panelRef, { width, gap =
|
|
|
6544
6575
|
}
|
|
6545
6576
|
|
|
6546
6577
|
// src/SC-SidebarShell/useStreamoidSidebarPopoverPosition.ts
|
|
6547
|
-
var
|
|
6578
|
+
var import_react22 = require("react");
|
|
6548
6579
|
var VIEWPORT_INSET = 16;
|
|
6549
6580
|
function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
6550
6581
|
placement,
|
|
@@ -6552,7 +6583,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6552
6583
|
gap = 8,
|
|
6553
6584
|
inset = 0
|
|
6554
6585
|
}) {
|
|
6555
|
-
const [position, setPosition] = (0,
|
|
6586
|
+
const [position, setPosition] = (0, import_react22.useState)({
|
|
6556
6587
|
position: "fixed",
|
|
6557
6588
|
left: 0,
|
|
6558
6589
|
top: 0,
|
|
@@ -6561,7 +6592,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6561
6592
|
maxHeight: `calc(100dvh - ${VIEWPORT_INSET * 2}px)`,
|
|
6562
6593
|
visibility: "hidden"
|
|
6563
6594
|
});
|
|
6564
|
-
(0,
|
|
6595
|
+
(0, import_react22.useLayoutEffect)(() => {
|
|
6565
6596
|
const sidebar = sidebarRef.current;
|
|
6566
6597
|
if (!sidebar || typeof window === "undefined") return;
|
|
6567
6598
|
const findCard = () => (sidebar.matches("[data-streamoid-sidebar-card]") ? sidebar : sidebar.querySelector(
|
|
@@ -6622,7 +6653,7 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6622
6653
|
}
|
|
6623
6654
|
|
|
6624
6655
|
// src/SC-SidebarShell/ScSidebarPopover.tsx
|
|
6625
|
-
var
|
|
6656
|
+
var import_react23 = require("react");
|
|
6626
6657
|
var import_react_dom2 = require("react-dom");
|
|
6627
6658
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
6628
6659
|
var SURFACE = "var(--sc-sidebar-popover-surface, var(--alias-surface-base, #101010))";
|
|
@@ -6641,13 +6672,13 @@ function ScSidebarPopover({
|
|
|
6641
6672
|
className,
|
|
6642
6673
|
style
|
|
6643
6674
|
}) {
|
|
6644
|
-
const panelRef = (0,
|
|
6675
|
+
const panelRef = (0, import_react23.useRef)(null);
|
|
6645
6676
|
const { style: position, arrow } = useStreamoidAnchoredPopover(
|
|
6646
6677
|
anchorRef,
|
|
6647
6678
|
panelRef,
|
|
6648
6679
|
{ width, alignRef }
|
|
6649
6680
|
);
|
|
6650
|
-
(0,
|
|
6681
|
+
(0, import_react23.useEffect)(() => {
|
|
6651
6682
|
const onKeyDown = (event) => {
|
|
6652
6683
|
if (event.key === "Escape") onClose();
|
|
6653
6684
|
};
|
|
@@ -6698,7 +6729,7 @@ function ScSidebarPopover({
|
|
|
6698
6729
|
}
|
|
6699
6730
|
|
|
6700
6731
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.tsx
|
|
6701
|
-
var
|
|
6732
|
+
var import_react24 = require("react");
|
|
6702
6733
|
|
|
6703
6734
|
// src/SC-Artifax-Sidebar/ScArtifaxSidebar.module.css
|
|
6704
6735
|
var ScArtifaxSidebar_default = {
|
|
@@ -6805,7 +6836,8 @@ function SidebarHeader({
|
|
|
6805
6836
|
expanded,
|
|
6806
6837
|
label: header.searchLabel,
|
|
6807
6838
|
shortcut: header.searchShortcut,
|
|
6808
|
-
onClick: header.onSearchClick
|
|
6839
|
+
onClick: header.onSearchClick,
|
|
6840
|
+
onPrefetch: header.onSearchPrefetch
|
|
6809
6841
|
}
|
|
6810
6842
|
),
|
|
6811
6843
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ScHDivider, { fullBleed: true, className: ScArtifaxSidebar_default.headerDivider })
|
|
@@ -6814,8 +6846,8 @@ function SidebarHeader({
|
|
|
6814
6846
|
);
|
|
6815
6847
|
}
|
|
6816
6848
|
function useScrolled() {
|
|
6817
|
-
const [scrolled, setScrolled] = (0,
|
|
6818
|
-
const onScroll = (0,
|
|
6849
|
+
const [scrolled, setScrolled] = (0, import_react24.useState)(false);
|
|
6850
|
+
const onScroll = (0, import_react24.useCallback)((event) => {
|
|
6819
6851
|
const next = event.currentTarget.scrollTop > 0;
|
|
6820
6852
|
setScrolled((prev) => prev === next ? prev : next);
|
|
6821
6853
|
}, []);
|
|
@@ -6856,7 +6888,7 @@ var ScAppSidebar = ({
|
|
|
6856
6888
|
};
|
|
6857
6889
|
const isControlled = !!openSections;
|
|
6858
6890
|
const { scrolled, onScroll } = useScrolled();
|
|
6859
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
6891
|
+
const [internalOpen, setInternalOpen] = (0, import_react24.useState)(
|
|
6860
6892
|
() => {
|
|
6861
6893
|
const init = {};
|
|
6862
6894
|
sections.forEach((s) => {
|
|
@@ -6866,7 +6898,7 @@ var ScAppSidebar = ({
|
|
|
6866
6898
|
}
|
|
6867
6899
|
);
|
|
6868
6900
|
const isSectionOpen = (id) => isControlled ? !!openSections?.[id] : !!internalOpen[id];
|
|
6869
|
-
const handleSectionToggle = (0,
|
|
6901
|
+
const handleSectionToggle = (0, import_react24.useCallback)(
|
|
6870
6902
|
(id) => {
|
|
6871
6903
|
const next = !isSectionOpen(id);
|
|
6872
6904
|
if (isControlled) {
|
|
@@ -7100,7 +7132,7 @@ var ScAppSidebar = ({
|
|
|
7100
7132
|
var ScArtifaxSidebar = ScAppSidebar;
|
|
7101
7133
|
|
|
7102
7134
|
// src/SC-Catalogix-Sidebar/ScCatalogixSidebar.tsx
|
|
7103
|
-
var
|
|
7135
|
+
var import_react25 = require("react");
|
|
7104
7136
|
|
|
7105
7137
|
// src/SC-Sidebar Switch menu/ScSidebarSwitchMenu.module.css
|
|
7106
7138
|
var ScSidebarSwitchMenu_default = {
|
|
@@ -7742,7 +7774,7 @@ var ScCatalogixSidebar = ({
|
|
|
7742
7774
|
className,
|
|
7743
7775
|
style
|
|
7744
7776
|
}) => {
|
|
7745
|
-
const [appListOpen, setAppListOpen] = (0,
|
|
7777
|
+
const [appListOpen, setAppListOpen] = (0, import_react25.useState)(false);
|
|
7746
7778
|
const handleSwitch = () => {
|
|
7747
7779
|
setAppListOpen((prev) => !prev);
|
|
7748
7780
|
onLogoClick?.();
|
|
@@ -7985,7 +8017,7 @@ var ScSlider = ({
|
|
|
7985
8017
|
};
|
|
7986
8018
|
|
|
7987
8019
|
// src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
|
|
7988
|
-
var
|
|
8020
|
+
var import_react26 = require("react");
|
|
7989
8021
|
var import_icons42 = require("@streamoid/icons");
|
|
7990
8022
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
7991
8023
|
var PRIMARY_ICON = "var(--alias-text---icons-primary)";
|
|
@@ -8176,12 +8208,12 @@ function StreamoidWorkspaceSwitcher({
|
|
|
8176
8208
|
onSwitchWorkspace,
|
|
8177
8209
|
config
|
|
8178
8210
|
}) {
|
|
8179
|
-
const modalRef = (0,
|
|
8211
|
+
const modalRef = (0, import_react26.useRef)(null);
|
|
8180
8212
|
const title = config?.title || "Switch workspace";
|
|
8181
8213
|
const loadingText = config?.loadingText || "Loading workspaces\u2026";
|
|
8182
8214
|
const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
|
|
8183
8215
|
const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
|
|
8184
|
-
(0,
|
|
8216
|
+
(0, import_react26.useEffect)(() => {
|
|
8185
8217
|
if (!open) return;
|
|
8186
8218
|
function handleKeyDown(e) {
|
|
8187
8219
|
if (e.key === "Escape") onClose();
|
|
@@ -9592,7 +9624,7 @@ var ScWorkspaceCard = ({
|
|
|
9592
9624
|
};
|
|
9593
9625
|
|
|
9594
9626
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.tsx
|
|
9595
|
-
var
|
|
9627
|
+
var import_react27 = require("react");
|
|
9596
9628
|
var import_icons62 = require("@streamoid/icons");
|
|
9597
9629
|
|
|
9598
9630
|
// src/SC-WorkspaceSwitchCard/ScWorkspaceSwitchCard.module.css
|
|
@@ -9633,7 +9665,7 @@ function ScWorkspaceSwitchCard({
|
|
|
9633
9665
|
onSettings,
|
|
9634
9666
|
onLeave
|
|
9635
9667
|
}) {
|
|
9636
|
-
const [internalHover, setInternalHover] = (0,
|
|
9668
|
+
const [internalHover, setInternalHover] = (0, import_react27.useState)(false);
|
|
9637
9669
|
const isHover = hover !== void 0 ? hover : internalHover;
|
|
9638
9670
|
const isCurrent = type === "currentWS";
|
|
9639
9671
|
const isOther = type === "otherWS";
|
|
@@ -9761,7 +9793,7 @@ function ScWorkspaceSwitchCard({
|
|
|
9761
9793
|
var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
|
|
9762
9794
|
|
|
9763
9795
|
// src/SC-Modal/ScModal.tsx
|
|
9764
|
-
var
|
|
9796
|
+
var import_react28 = require("react");
|
|
9765
9797
|
var import_react_dom3 = require("react-dom");
|
|
9766
9798
|
|
|
9767
9799
|
// src/SC-Modal/ScModal.module.css
|
|
@@ -9783,7 +9815,7 @@ var ScModal = ({
|
|
|
9783
9815
|
closeOnBackdrop = true,
|
|
9784
9816
|
closeOnEsc = true
|
|
9785
9817
|
}) => {
|
|
9786
|
-
(0,
|
|
9818
|
+
(0, import_react28.useEffect)(() => {
|
|
9787
9819
|
if (!open || !closeOnEsc) return;
|
|
9788
9820
|
const onKey = (e) => {
|
|
9789
9821
|
if (e.key === "Escape") onClose?.();
|
|
@@ -9816,7 +9848,7 @@ var ScModal = ({
|
|
|
9816
9848
|
};
|
|
9817
9849
|
|
|
9818
9850
|
// src/SC-Drawer/ScDrawer.tsx
|
|
9819
|
-
var
|
|
9851
|
+
var import_react29 = require("react");
|
|
9820
9852
|
var import_react_dom4 = require("react-dom");
|
|
9821
9853
|
|
|
9822
9854
|
// src/SC-Drawer/ScDrawer.module.css
|
|
@@ -9844,8 +9876,8 @@ var ScDrawer = ({
|
|
|
9844
9876
|
backdrop = false,
|
|
9845
9877
|
zIndex
|
|
9846
9878
|
}) => {
|
|
9847
|
-
const panelRef = (0,
|
|
9848
|
-
(0,
|
|
9879
|
+
const panelRef = (0, import_react29.useRef)(null);
|
|
9880
|
+
(0, import_react29.useEffect)(() => {
|
|
9849
9881
|
if (!open) return;
|
|
9850
9882
|
const onKey = (e) => {
|
|
9851
9883
|
if (closeOnEsc && e.key === "Escape") onClose?.();
|
|
@@ -9943,7 +9975,7 @@ var ScTabs = ({
|
|
|
9943
9975
|
};
|
|
9944
9976
|
|
|
9945
9977
|
// src/SC-Counter/ScCounter.tsx
|
|
9946
|
-
var
|
|
9978
|
+
var import_react30 = require("react");
|
|
9947
9979
|
var import_icons63 = require("@streamoid/icons");
|
|
9948
9980
|
|
|
9949
9981
|
// src/SC-Counter/ScCounter.module.css
|
|
@@ -9965,7 +9997,7 @@ var ScCounter = ({
|
|
|
9965
9997
|
className,
|
|
9966
9998
|
style
|
|
9967
9999
|
}) => {
|
|
9968
|
-
const [showInput, setShowInput] = (0,
|
|
10000
|
+
const [showInput, setShowInput] = (0, import_react30.useState)(false);
|
|
9969
10001
|
const set = (n) => {
|
|
9970
10002
|
let v = n;
|
|
9971
10003
|
if (min !== void 0) v = Math.max(min, v);
|
|
@@ -11054,7 +11086,7 @@ var ScSelectionList = ({
|
|
|
11054
11086
|
};
|
|
11055
11087
|
|
|
11056
11088
|
// src/SC-textArea/ScTextArea.tsx
|
|
11057
|
-
var
|
|
11089
|
+
var import_react31 = require("react");
|
|
11058
11090
|
|
|
11059
11091
|
// src/SC-textArea/ScTextArea.module.css
|
|
11060
11092
|
var ScTextArea_default = {
|
|
@@ -11084,7 +11116,7 @@ var ScTextArea = ({
|
|
|
11084
11116
|
style,
|
|
11085
11117
|
...props
|
|
11086
11118
|
}) => {
|
|
11087
|
-
const [focused, setFocused] = (0,
|
|
11119
|
+
const [focused, setFocused] = (0, import_react31.useState)(false);
|
|
11088
11120
|
const derivedState = state ?? (props.disabled ? "disabled" : focused ? "active" : (props.value !== void 0 ? String(props.value).length > 0 : false) ? "filled" : "default");
|
|
11089
11121
|
const stateClass = ScTextArea_default["state-" + derivedState];
|
|
11090
11122
|
const labelGroupClass = ScTextArea_default["label-group-" + (labelGroup || "none")];
|
|
@@ -11126,7 +11158,7 @@ var ScTextArea = ({
|
|
|
11126
11158
|
};
|
|
11127
11159
|
|
|
11128
11160
|
// src/SC-select/ScSelect.tsx
|
|
11129
|
-
var
|
|
11161
|
+
var import_react32 = require("react");
|
|
11130
11162
|
|
|
11131
11163
|
// src/SC-select/ScSelect.module.css
|
|
11132
11164
|
var ScSelect_default = {
|
|
@@ -11163,9 +11195,9 @@ var ScSelect = (props) => {
|
|
|
11163
11195
|
disabled = false,
|
|
11164
11196
|
className
|
|
11165
11197
|
} = props;
|
|
11166
|
-
const [open, setOpen] = (0,
|
|
11167
|
-
const rootRef = (0,
|
|
11168
|
-
(0,
|
|
11198
|
+
const [open, setOpen] = (0, import_react32.useState)(false);
|
|
11199
|
+
const rootRef = (0, import_react32.useRef)(null);
|
|
11200
|
+
(0, import_react32.useEffect)(() => {
|
|
11169
11201
|
if (!open) return;
|
|
11170
11202
|
const handleClick = (e) => {
|
|
11171
11203
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -11256,7 +11288,7 @@ var ScSelect = (props) => {
|
|
|
11256
11288
|
};
|
|
11257
11289
|
|
|
11258
11290
|
// src/SC-fileField/ScFileField.tsx
|
|
11259
|
-
var
|
|
11291
|
+
var import_react33 = require("react");
|
|
11260
11292
|
|
|
11261
11293
|
// src/SC-fileField/ScFileField.module.css
|
|
11262
11294
|
var ScFileField_default = {
|
|
@@ -11294,7 +11326,7 @@ var ScFileField = (props) => {
|
|
|
11294
11326
|
label,
|
|
11295
11327
|
className
|
|
11296
11328
|
} = props;
|
|
11297
|
-
const inputRef = (0,
|
|
11329
|
+
const inputRef = (0, import_react33.useRef)(null);
|
|
11298
11330
|
const hasFile = Boolean(fileName);
|
|
11299
11331
|
const isUploading = Boolean(uploading);
|
|
11300
11332
|
const clampedProgress = Math.max(0, Math.min(100, progress));
|
|
@@ -11413,7 +11445,7 @@ var ScFileField = (props) => {
|
|
|
11413
11445
|
};
|
|
11414
11446
|
|
|
11415
11447
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
11416
|
-
var
|
|
11448
|
+
var import_react34 = require("react");
|
|
11417
11449
|
|
|
11418
11450
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
11419
11451
|
var ScMediaApproval_default = {
|
|
@@ -11460,9 +11492,9 @@ var ScMediaApproval = (props) => {
|
|
|
11460
11492
|
className
|
|
11461
11493
|
} = props;
|
|
11462
11494
|
const total = mediaUrls.length;
|
|
11463
|
-
const [index, setIndex] = (0,
|
|
11464
|
-
const [mediaLoading, setMediaLoading] = (0,
|
|
11465
|
-
(0,
|
|
11495
|
+
const [index, setIndex] = (0, import_react34.useState)(activeIndex ?? 0);
|
|
11496
|
+
const [mediaLoading, setMediaLoading] = (0, import_react34.useState)(false);
|
|
11497
|
+
(0, import_react34.useEffect)(() => {
|
|
11466
11498
|
if (typeof activeIndex === "number") {
|
|
11467
11499
|
setIndex(activeIndex);
|
|
11468
11500
|
}
|
|
@@ -11597,7 +11629,7 @@ var ScMediaApproval = (props) => {
|
|
|
11597
11629
|
};
|
|
11598
11630
|
|
|
11599
11631
|
// src/SC-mediaSelect/ScMediaSelect.tsx
|
|
11600
|
-
var
|
|
11632
|
+
var import_react35 = require("react");
|
|
11601
11633
|
|
|
11602
11634
|
// src/SC-mediaSelect/ScMediaSelect.module.css
|
|
11603
11635
|
var ScMediaSelect_default = {
|
|
@@ -11653,7 +11685,7 @@ var ScMediaSelect = (props) => {
|
|
|
11653
11685
|
} = props;
|
|
11654
11686
|
const total = items.length;
|
|
11655
11687
|
const resolvedMax = typeof max === "number" ? max : total;
|
|
11656
|
-
const selectedSet = (0,
|
|
11688
|
+
const selectedSet = (0, import_react35.useMemo)(() => new Set(selected), [selected]);
|
|
11657
11689
|
const selectedCount = selectedSet.size;
|
|
11658
11690
|
let countLabel = selectedCount + " of " + total + " selected";
|
|
11659
11691
|
if (min > 0) countLabel += " (min " + min + ")";
|
|
@@ -11722,7 +11754,7 @@ var ScMediaSelect = (props) => {
|
|
|
11722
11754
|
};
|
|
11723
11755
|
|
|
11724
11756
|
// src/SC-todoList/ScTodoList.tsx
|
|
11725
|
-
var
|
|
11757
|
+
var import_react36 = require("react");
|
|
11726
11758
|
|
|
11727
11759
|
// src/SC-todoList/ScTodoList.module.css
|
|
11728
11760
|
var ScTodoList_default = {
|
|
@@ -11755,9 +11787,9 @@ var ScTodoList = ({
|
|
|
11755
11787
|
addPlaceholder = "Add an item",
|
|
11756
11788
|
className
|
|
11757
11789
|
}) => {
|
|
11758
|
-
const [editingId, setEditingId] = (0,
|
|
11759
|
-
const [editValue, setEditValue] = (0,
|
|
11760
|
-
const [newValue, setNewValue] = (0,
|
|
11790
|
+
const [editingId, setEditingId] = (0, import_react36.useState)(null);
|
|
11791
|
+
const [editValue, setEditValue] = (0, import_react36.useState)("");
|
|
11792
|
+
const [newValue, setNewValue] = (0, import_react36.useState)("");
|
|
11761
11793
|
const total = items.length;
|
|
11762
11794
|
const completed = items.filter((i) => i.status === "completed").length;
|
|
11763
11795
|
const startEditing = (item) => {
|
|
@@ -12611,7 +12643,7 @@ var ScWorkspaceSwitchMobileV2 = ({
|
|
|
12611
12643
|
};
|
|
12612
12644
|
|
|
12613
12645
|
// src/SC-imageField/ScImageField.tsx
|
|
12614
|
-
var
|
|
12646
|
+
var import_react37 = require("react");
|
|
12615
12647
|
|
|
12616
12648
|
// src/SC-imageField/ScImageField.module.css
|
|
12617
12649
|
var ScImageField_default = {
|
|
@@ -12638,7 +12670,7 @@ var ScImageField = ({
|
|
|
12638
12670
|
onRemove,
|
|
12639
12671
|
className
|
|
12640
12672
|
}) => {
|
|
12641
|
-
const inputRef = (0,
|
|
12673
|
+
const inputRef = (0, import_react37.useRef)(null);
|
|
12642
12674
|
const hasImage = !!imagePreview;
|
|
12643
12675
|
function handleClick() {
|
|
12644
12676
|
if (!hasImage) {
|
|
@@ -12874,7 +12906,7 @@ var ScPlanDetailsCardMobile = ({
|
|
|
12874
12906
|
};
|
|
12875
12907
|
|
|
12876
12908
|
// src/SC-ProfilePopup/ScProfilePopup.tsx
|
|
12877
|
-
var
|
|
12909
|
+
var import_react38 = require("react");
|
|
12878
12910
|
|
|
12879
12911
|
// src/SC-ProfilePopup/ScProfilePopup.module.css
|
|
12880
12912
|
var ScProfilePopup_default = {
|
|
@@ -12908,7 +12940,7 @@ var activateOnKey = (handler) => (event) => {
|
|
|
12908
12940
|
handler();
|
|
12909
12941
|
}
|
|
12910
12942
|
};
|
|
12911
|
-
var ScProfilePopup = (0,
|
|
12943
|
+
var ScProfilePopup = (0, import_react38.forwardRef)(
|
|
12912
12944
|
({
|
|
12913
12945
|
name = "Chris Hemsworth",
|
|
12914
12946
|
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,34 @@ 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.metaKey && !event.ctrlKey) return false;
|
|
5999
|
+
return event.key.toLowerCase() === letter.toLowerCase();
|
|
6000
|
+
}
|
|
6001
|
+
function useStreamoidSearchShortcut({
|
|
6002
|
+
onTrigger,
|
|
6003
|
+
enabled = true,
|
|
6004
|
+
letter = "k"
|
|
6005
|
+
}) {
|
|
6006
|
+
const handler = useRef6(onTrigger);
|
|
6007
|
+
handler.current = onTrigger;
|
|
6008
|
+
useEffect5(() => {
|
|
6009
|
+
if (!enabled) return;
|
|
6010
|
+
const onKeyDown = (event) => {
|
|
6011
|
+
if (!matchesStreamoidSearchShortcut(event, letter)) return;
|
|
6012
|
+
event.preventDefault();
|
|
6013
|
+
handler.current();
|
|
6014
|
+
};
|
|
6015
|
+
document.addEventListener("keydown", onKeyDown);
|
|
6016
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
6017
|
+
}, [enabled, letter]);
|
|
6018
|
+
}
|
|
6019
|
+
|
|
5991
6020
|
// src/SC-SidebarShell/useStreamoidShellPreferences.ts
|
|
5992
|
-
import { useCallback as useCallback2, useEffect as
|
|
6021
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useMemo, useState as useState14 } from "react";
|
|
5993
6022
|
var THEME_COOKIE = "streamoid_theme";
|
|
5994
6023
|
var SIDEBAR_COOKIE = "streamoid_sidebar";
|
|
5995
6024
|
var THEME_STORAGE_KEY = "streamoid.shell.theme";
|
|
@@ -6091,19 +6120,19 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6091
6120
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, mode));
|
|
6092
6121
|
writeCookie(THEME_COOKIE, mode);
|
|
6093
6122
|
}, [stableOptions]);
|
|
6094
|
-
|
|
6123
|
+
useEffect6(() => {
|
|
6095
6124
|
writeStorage(THEME_STORAGE_KEY, preference);
|
|
6096
6125
|
stableOptions.legacyStorageKeys.forEach((key) => writeStorage(key, preference));
|
|
6097
6126
|
writeCookie(THEME_COOKIE, preference);
|
|
6098
6127
|
}, [preference, stableOptions]);
|
|
6099
|
-
|
|
6128
|
+
useEffect6(() => {
|
|
6100
6129
|
if (!canUseDom()) return;
|
|
6101
6130
|
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
|
6102
6131
|
const onChange = (event) => setSystemDark(event.matches);
|
|
6103
6132
|
media.addEventListener("change", onChange);
|
|
6104
6133
|
return () => media.removeEventListener("change", onChange);
|
|
6105
6134
|
}, []);
|
|
6106
|
-
|
|
6135
|
+
useEffect6(() => {
|
|
6107
6136
|
if (!canUseDom()) return;
|
|
6108
6137
|
const sync = () => setPreferenceState(readTheme(stableOptions));
|
|
6109
6138
|
const onStorage = (event) => {
|
|
@@ -6119,7 +6148,7 @@ function useStreamoidThemePreference(options = {}) {
|
|
|
6119
6148
|
};
|
|
6120
6149
|
}, [stableOptions]);
|
|
6121
6150
|
const resolved = preference === "system" ? systemDark ? "dark" : "light" : preference;
|
|
6122
|
-
|
|
6151
|
+
useEffect6(() => {
|
|
6123
6152
|
if (!canUseDom() || !stableOptions.applyToDocument) return;
|
|
6124
6153
|
const root = document.documentElement;
|
|
6125
6154
|
root.setAttribute("data-theme", resolved === "light" ? "Light" : "Dark");
|
|
@@ -6158,7 +6187,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6158
6187
|
return next;
|
|
6159
6188
|
});
|
|
6160
6189
|
}, [stableOptions]);
|
|
6161
|
-
|
|
6190
|
+
useEffect6(() => {
|
|
6162
6191
|
const serialized = expanded ? "expanded" : "collapsed";
|
|
6163
6192
|
writeStorage(SIDEBAR_STORAGE_KEY, serialized);
|
|
6164
6193
|
stableOptions.legacyCollapsedKeys.forEach(
|
|
@@ -6166,7 +6195,7 @@ function useStreamoidSidebarPreference(options = {}) {
|
|
|
6166
6195
|
);
|
|
6167
6196
|
writeCookie(SIDEBAR_COOKIE, serialized);
|
|
6168
6197
|
}, [expanded, stableOptions]);
|
|
6169
|
-
|
|
6198
|
+
useEffect6(() => {
|
|
6170
6199
|
if (!canUseDom()) return;
|
|
6171
6200
|
const sync = () => setExpandedState(readExpanded(stableOptions));
|
|
6172
6201
|
const onStorage = (event) => {
|
|
@@ -6441,8 +6470,8 @@ function useStreamoidSidebarPopoverPosition(sidebarRef, {
|
|
|
6441
6470
|
|
|
6442
6471
|
// src/SC-SidebarShell/ScSidebarPopover.tsx
|
|
6443
6472
|
import {
|
|
6444
|
-
useEffect as
|
|
6445
|
-
useRef as
|
|
6473
|
+
useEffect as useEffect7,
|
|
6474
|
+
useRef as useRef7
|
|
6446
6475
|
} from "react";
|
|
6447
6476
|
import { createPortal as createPortal2 } from "react-dom";
|
|
6448
6477
|
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
@@ -6462,13 +6491,13 @@ function ScSidebarPopover({
|
|
|
6462
6491
|
className,
|
|
6463
6492
|
style
|
|
6464
6493
|
}) {
|
|
6465
|
-
const panelRef =
|
|
6494
|
+
const panelRef = useRef7(null);
|
|
6466
6495
|
const { style: position, arrow } = useStreamoidAnchoredPopover(
|
|
6467
6496
|
anchorRef,
|
|
6468
6497
|
panelRef,
|
|
6469
6498
|
{ width, alignRef }
|
|
6470
6499
|
);
|
|
6471
|
-
|
|
6500
|
+
useEffect7(() => {
|
|
6472
6501
|
const onKeyDown = (event) => {
|
|
6473
6502
|
if (event.key === "Escape") onClose();
|
|
6474
6503
|
};
|
|
@@ -6629,7 +6658,8 @@ function SidebarHeader({
|
|
|
6629
6658
|
expanded,
|
|
6630
6659
|
label: header.searchLabel,
|
|
6631
6660
|
shortcut: header.searchShortcut,
|
|
6632
|
-
onClick: header.onSearchClick
|
|
6661
|
+
onClick: header.onSearchClick,
|
|
6662
|
+
onPrefetch: header.onSearchPrefetch
|
|
6633
6663
|
}
|
|
6634
6664
|
),
|
|
6635
6665
|
/* @__PURE__ */ jsx56(ScHDivider, { fullBleed: true, className: ScArtifaxSidebar_default.headerDivider })
|
|
@@ -7815,7 +7845,7 @@ var ScSlider = ({
|
|
|
7815
7845
|
};
|
|
7816
7846
|
|
|
7817
7847
|
// src/SC-WorkspaceSwitcher/streamoid-workspace-switcher.tsx
|
|
7818
|
-
import { useEffect as
|
|
7848
|
+
import { useEffect as useEffect8, useRef as useRef8 } from "react";
|
|
7819
7849
|
import {
|
|
7820
7850
|
SiconClose as SiconClose3,
|
|
7821
7851
|
SiconTeam as SiconTeam5,
|
|
@@ -8011,12 +8041,12 @@ function StreamoidWorkspaceSwitcher({
|
|
|
8011
8041
|
onSwitchWorkspace,
|
|
8012
8042
|
config
|
|
8013
8043
|
}) {
|
|
8014
|
-
const modalRef =
|
|
8044
|
+
const modalRef = useRef8(null);
|
|
8015
8045
|
const title = config?.title || "Switch workspace";
|
|
8016
8046
|
const loadingText = config?.loadingText || "Loading workspaces\u2026";
|
|
8017
8047
|
const currentWorkspaceText = config?.currentWorkspaceText || "Current workspace";
|
|
8018
8048
|
const switchWorkspaceText = config?.switchWorkspaceText || "Switch workspace";
|
|
8019
|
-
|
|
8049
|
+
useEffect8(() => {
|
|
8020
8050
|
if (!open) return;
|
|
8021
8051
|
function handleKeyDown(e) {
|
|
8022
8052
|
if (e.key === "Escape") onClose();
|
|
@@ -9601,7 +9631,7 @@ function ScWorkspaceSwitchCard({
|
|
|
9601
9631
|
var NscWorkspaceSwitch = ScWorkspaceSwitchCard;
|
|
9602
9632
|
|
|
9603
9633
|
// src/SC-Modal/ScModal.tsx
|
|
9604
|
-
import { useEffect as
|
|
9634
|
+
import { useEffect as useEffect9 } from "react";
|
|
9605
9635
|
import { createPortal as createPortal3 } from "react-dom";
|
|
9606
9636
|
|
|
9607
9637
|
// src/SC-Modal/ScModal.module.css
|
|
@@ -9623,7 +9653,7 @@ var ScModal = ({
|
|
|
9623
9653
|
closeOnBackdrop = true,
|
|
9624
9654
|
closeOnEsc = true
|
|
9625
9655
|
}) => {
|
|
9626
|
-
|
|
9656
|
+
useEffect9(() => {
|
|
9627
9657
|
if (!open || !closeOnEsc) return;
|
|
9628
9658
|
const onKey = (e) => {
|
|
9629
9659
|
if (e.key === "Escape") onClose?.();
|
|
@@ -9656,7 +9686,7 @@ var ScModal = ({
|
|
|
9656
9686
|
};
|
|
9657
9687
|
|
|
9658
9688
|
// src/SC-Drawer/ScDrawer.tsx
|
|
9659
|
-
import { useEffect as
|
|
9689
|
+
import { useEffect as useEffect10, useRef as useRef9 } from "react";
|
|
9660
9690
|
import { createPortal as createPortal4 } from "react-dom";
|
|
9661
9691
|
|
|
9662
9692
|
// src/SC-Drawer/ScDrawer.module.css
|
|
@@ -9684,8 +9714,8 @@ var ScDrawer = ({
|
|
|
9684
9714
|
backdrop = false,
|
|
9685
9715
|
zIndex
|
|
9686
9716
|
}) => {
|
|
9687
|
-
const panelRef =
|
|
9688
|
-
|
|
9717
|
+
const panelRef = useRef9(null);
|
|
9718
|
+
useEffect10(() => {
|
|
9689
9719
|
if (!open) return;
|
|
9690
9720
|
const onKey = (e) => {
|
|
9691
9721
|
if (closeOnEsc && e.key === "Escape") onClose?.();
|
|
@@ -10972,7 +11002,7 @@ var ScTextArea = ({
|
|
|
10972
11002
|
};
|
|
10973
11003
|
|
|
10974
11004
|
// src/SC-select/ScSelect.tsx
|
|
10975
|
-
import { useState as useState22, useRef as
|
|
11005
|
+
import { useState as useState22, useRef as useRef10, useEffect as useEffect11 } from "react";
|
|
10976
11006
|
|
|
10977
11007
|
// src/SC-select/ScSelect.module.css
|
|
10978
11008
|
var ScSelect_default = {
|
|
@@ -11010,8 +11040,8 @@ var ScSelect = (props) => {
|
|
|
11010
11040
|
className
|
|
11011
11041
|
} = props;
|
|
11012
11042
|
const [open, setOpen] = useState22(false);
|
|
11013
|
-
const rootRef =
|
|
11014
|
-
|
|
11043
|
+
const rootRef = useRef10(null);
|
|
11044
|
+
useEffect11(() => {
|
|
11015
11045
|
if (!open) return;
|
|
11016
11046
|
const handleClick = (e) => {
|
|
11017
11047
|
if (rootRef.current && !rootRef.current.contains(e.target)) {
|
|
@@ -11102,7 +11132,7 @@ var ScSelect = (props) => {
|
|
|
11102
11132
|
};
|
|
11103
11133
|
|
|
11104
11134
|
// src/SC-fileField/ScFileField.tsx
|
|
11105
|
-
import { useRef as
|
|
11135
|
+
import { useRef as useRef11 } from "react";
|
|
11106
11136
|
|
|
11107
11137
|
// src/SC-fileField/ScFileField.module.css
|
|
11108
11138
|
var ScFileField_default = {
|
|
@@ -11140,7 +11170,7 @@ var ScFileField = (props) => {
|
|
|
11140
11170
|
label,
|
|
11141
11171
|
className
|
|
11142
11172
|
} = props;
|
|
11143
|
-
const inputRef =
|
|
11173
|
+
const inputRef = useRef11(null);
|
|
11144
11174
|
const hasFile = Boolean(fileName);
|
|
11145
11175
|
const isUploading = Boolean(uploading);
|
|
11146
11176
|
const clampedProgress = Math.max(0, Math.min(100, progress));
|
|
@@ -11259,7 +11289,7 @@ var ScFileField = (props) => {
|
|
|
11259
11289
|
};
|
|
11260
11290
|
|
|
11261
11291
|
// src/SC-mediaApproval/ScMediaApproval.tsx
|
|
11262
|
-
import { useState as useState23, useEffect as
|
|
11292
|
+
import { useState as useState23, useEffect as useEffect12 } from "react";
|
|
11263
11293
|
|
|
11264
11294
|
// src/SC-mediaApproval/ScMediaApproval.module.css
|
|
11265
11295
|
var ScMediaApproval_default = {
|
|
@@ -11308,7 +11338,7 @@ var ScMediaApproval = (props) => {
|
|
|
11308
11338
|
const total = mediaUrls.length;
|
|
11309
11339
|
const [index, setIndex] = useState23(activeIndex ?? 0);
|
|
11310
11340
|
const [mediaLoading, setMediaLoading] = useState23(false);
|
|
11311
|
-
|
|
11341
|
+
useEffect12(() => {
|
|
11312
11342
|
if (typeof activeIndex === "number") {
|
|
11313
11343
|
setIndex(activeIndex);
|
|
11314
11344
|
}
|
|
@@ -12457,7 +12487,7 @@ var ScWorkspaceSwitchMobileV2 = ({
|
|
|
12457
12487
|
};
|
|
12458
12488
|
|
|
12459
12489
|
// src/SC-imageField/ScImageField.tsx
|
|
12460
|
-
import { useRef as
|
|
12490
|
+
import { useRef as useRef12 } from "react";
|
|
12461
12491
|
|
|
12462
12492
|
// src/SC-imageField/ScImageField.module.css
|
|
12463
12493
|
var ScImageField_default = {
|
|
@@ -12484,7 +12514,7 @@ var ScImageField = ({
|
|
|
12484
12514
|
onRemove,
|
|
12485
12515
|
className
|
|
12486
12516
|
}) => {
|
|
12487
|
-
const inputRef =
|
|
12517
|
+
const inputRef = useRef12(null);
|
|
12488
12518
|
const hasImage = !!imagePreview;
|
|
12489
12519
|
function handleClick() {
|
|
12490
12520
|
if (!hasImage) {
|
|
@@ -13102,6 +13132,7 @@ export {
|
|
|
13102
13132
|
formatStreamoidAppVersion,
|
|
13103
13133
|
formatSubAgentLabel,
|
|
13104
13134
|
hasCollapsedMark,
|
|
13135
|
+
matchesStreamoidSearchShortcut,
|
|
13105
13136
|
parseVersionManifest,
|
|
13106
13137
|
resolveAnchoredPopoverArrow,
|
|
13107
13138
|
resolveAnchoredPopoverPosition,
|
|
@@ -13118,6 +13149,7 @@ export {
|
|
|
13118
13149
|
useStreamoidAnchoredPopover,
|
|
13119
13150
|
useStreamoidAnchoredPopoverPosition,
|
|
13120
13151
|
useStreamoidPanelWidth,
|
|
13152
|
+
useStreamoidSearchShortcut,
|
|
13121
13153
|
useStreamoidSidebarPopoverPosition,
|
|
13122
13154
|
useStreamoidSidebarPreference,
|
|
13123
13155
|
useStreamoidThemePreference
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamoid/ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.56",
|
|
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",
|