@meetreeve/ui 0.25.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ElementType, RefObject, CSSProperties, MouseEventHandler } from 'react';
3
+ export { u as usePrefersReducedMotion } from './use-prefers-reduced-motion-CRlBJxhu.mjs';
3
4
  import { z } from 'zod';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
6
 
5
7
  declare const REEVE_ACCENT = "#FF6B2B";
6
8
 
@@ -205,6 +207,34 @@ declare function ResponsiveHeader({ brand, search, nav, brandHref, linkComponent
205
207
  */
206
208
  declare function useResponsivePlaceholder(desktop: string, mobile?: string): string;
207
209
 
210
+ /**
211
+ * HowToClip (DEV-19372) — the one player for every how-to clip: a few silent,
212
+ * looping seconds of the other app's screen, shown where a step sends someone
213
+ * there. Generalised from the Docs share strip's ShareClip (DEV-18388).
214
+ *
215
+ * Muted and looping; reduced motion never starts it (and turning it on
216
+ * mid-loop pauses it), so the poster and the native controls carry it
217
+ * instead. A browser that refuses autoplay (iOS Low Power Mode) gets the
218
+ * controls too, until a later play() succeeds. A browser whose play() returns
219
+ * no promise (or has no play()) is judged by whether the clip actually left
220
+ * the paused state.
221
+ *
222
+ * While it autoplays, a corner toggle pauses and resumes it (DEV-19403, WCAG
223
+ * 2.2.2). The toggle shows only while the native controls are off, so there is
224
+ * never a second set; a pause made with the toggle outlasts a reduced-motion
225
+ * change but not a new clip.
226
+ */
227
+ interface HowToClipProps {
228
+ /** File stem: `${clipBaseUrl}/${slug}.webm|.mp4` and `${clipBaseUrl}/${slug}-poster.jpg`. Must match /^[a-z0-9-]{1,64}$/ or nothing renders. */
229
+ slug: string;
230
+ /** aria-label naming the step, e.g. "Sharing a Google Doc with reeve@meetreeve.com as Editor, in Google Docs". */
231
+ label: string;
232
+ /** Where the clip files are served from, e.g. "/how-to" or "https://cdn.example/how-to" (no query or hash). Omitted or blank → renders null. A trailing slash is dropped. */
233
+ clipBaseUrl?: string;
234
+ className?: string;
235
+ }
236
+ declare function HowToClip({ slug, label, clipBaseUrl, className }: HowToClipProps): react.JSX.Element | null;
237
+
208
238
  interface SiteFooterLink {
209
239
  href: string;
210
240
  label: string;
@@ -828,10 +858,15 @@ interface ConnectorCredentialField {
828
858
  * submitted as-is when the customer doesn't change it. */
829
859
  defaultValue?: string | null;
830
860
  }
831
- /** One numbered step of a setup guide; `copyable` is a literal to paste. */
861
+ /**
862
+ * One numbered step of a setup guide; `copyable` is a literal to paste.
863
+ * `clip` names a how-to clip (DEV-19372) shown under the step, the slug a
864
+ * `HowToClip` takes; it renders only when the host passes `clipBaseUrl`.
865
+ */
832
866
  interface ConnectorGuideStep {
833
867
  text: string;
834
868
  copyable?: string | null;
869
+ clip?: string | null;
835
870
  }
836
871
  /**
837
872
  * A fully-rendered setup guide as the server returns it (SG-1). The backend
@@ -1040,8 +1075,14 @@ interface ConnectorPickerProps {
1040
1075
  lens?: ConnectorPickerLens;
1041
1076
  layout?: "tiles" | "list";
1042
1077
  onConnected?: (entry: ConnectableEntry) => void;
1078
+ /**
1079
+ * Where how-to clip files are served from, e.g. "/how-to" (DEV-19372). A
1080
+ * guide step with a `clip` shows it only when this is set; hosts that
1081
+ * don't serve the clips leave it out and render exactly as before.
1082
+ */
1083
+ clipBaseUrl?: string;
1043
1084
  }
1044
- declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
1085
+ declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, clipBaseUrl, }: ConnectorPickerProps): react.JSX.Element | null;
1045
1086
 
1046
1087
  interface LockedValueProps {
1047
1088
  /** The value's shape: `#` is a digit, everything else is kept (`"$#,###,###"`, `"##%"`). */
@@ -1128,11 +1169,16 @@ declare const CHAT_MIN_PX = 480;
1128
1169
  declare const SPLIT_MIN_PANES_PX = 960;
1129
1170
  /** The chat column's max width in Chat mode. */
1130
1171
  declare const CHAT_COLUMN_MAX_PX = 720;
1131
- declare const DEFAULT_SPLIT_PCT = 50;
1172
+ /** Split opens with the canvas at 2/3 and the chat at 1/3 (DEV-19522). */
1173
+ declare const DEFAULT_SPLIT_PCT = 67;
1132
1174
  declare const SPLIT_MIN_PCT = 30;
1133
1175
  declare const SPLIT_MAX_PCT = 75;
1134
- /** A release within this many points of 50 snaps to 50/50. */
1135
- declare const SNAP_CENTER_WINDOW = 8;
1176
+ /**
1177
+ * A release within this many points of the default snaps to the default
1178
+ * (63..71 around 67). Kept narrow so free drag still reaches widths on both
1179
+ * sides of it, up to SPLIT_MAX_PCT (DEV-19522).
1180
+ */
1181
+ declare const SNAP_CENTER_WINDOW = 4;
1136
1182
  /** A release past this canvas share snaps to Dashboard. */
1137
1183
  declare const SNAP_DASHBOARD_ABOVE = 85;
1138
1184
  /** A release below this canvas share snaps to Chat. */
@@ -1267,6 +1313,161 @@ interface PageSurfaceProps {
1267
1313
  */
1268
1314
  declare function PageSurface({ children, className, as: Tag, bleed }: PageSurfaceProps): react.JSX.Element;
1269
1315
 
1316
+ /** Copy for the confirm step an action asks for before it runs. */
1317
+ interface ActionConfirm {
1318
+ title: string;
1319
+ body?: ReactNode;
1320
+ /** Defaults to the action's label. */
1321
+ confirmLabel?: string;
1322
+ }
1323
+ interface ActionBase {
1324
+ /** Unique within one PageActions / RowActions (a React key, and the in-flight guard's key). */
1325
+ id: string;
1326
+ label: string;
1327
+ icon?: ReactNode;
1328
+ disabled?: boolean;
1329
+ /**
1330
+ * Renders last, after a separator, in the destructive tone, and always
1331
+ * confirms first. On an action with `options`, every option inherits it.
1332
+ */
1333
+ destructive?: boolean;
1334
+ /**
1335
+ * Ask before running. A destructive action without one confirms with
1336
+ * "<label>?". On an action with `options`, it is each option's default.
1337
+ */
1338
+ confirm?: ActionConfirm;
1339
+ }
1340
+ /**
1341
+ * One thing a user can do, rendered by PageActions and RowActions (DEV-19236).
1342
+ * Either it runs (`onSelect`), or it opens a menu of `options` (a split
1343
+ * button such as "New campaign ▾" → Blank / Draft with AI). A promise from
1344
+ * `onSelect` keeps a confirm dialog pending and shows its error there; an
1345
+ * unconfirmed action is not re-run while its promise is pending, and owns its
1346
+ * own error UI.
1347
+ */
1348
+ type Action = ActionBase & ({
1349
+ onSelect: () => void | Promise<void>;
1350
+ options?: never;
1351
+ } | {
1352
+ options: Action[];
1353
+ onSelect?: never;
1354
+ });
1355
+
1356
+ interface PageActionsProps {
1357
+ /** The page's one dominant action, painted with the action tokens. */
1358
+ primary?: Action;
1359
+ /** Everything else, behind one ⋯ menu. */
1360
+ more?: Action[];
1361
+ /** Accessible name of the ⋯ trigger. Defaults to "More actions". */
1362
+ moreLabel?: string;
1363
+ className?: string;
1364
+ }
1365
+ /**
1366
+ * A page's actions (DEV-19236): at most one `action` button (`destructive`
1367
+ * when the primary is destructive) and one ⋯ menu.
1368
+ * A primary with `options` is one trigger that opens a menu of them (a split
1369
+ * button: "New campaign ▾" → Blank / Draft with AI). Plugging it into the
1370
+ * canvas header slot is the app's job (DEV-19268).
1371
+ */
1372
+ declare function PageActions({ primary, more, moreLabel, className }: PageActionsProps): react.JSX.Element | null;
1373
+
1374
+ interface RowActionsProps {
1375
+ items: Action[];
1376
+ /** Accessible name of the ⋯ trigger. Defaults to "Row actions". */
1377
+ label?: string;
1378
+ className?: string;
1379
+ }
1380
+ /**
1381
+ * The ⋯ menu at the end of a row (DEV-19236): a 32px ghost icon trigger
1382
+ * (44px hit area) that opens a DropdownMenu. Destructive items render last,
1383
+ * after a separator, and confirm through ConfirmDialog.
1384
+ *
1385
+ * Clicks and key presses (down and up) stop here, including those from the portaled menu
1386
+ * and dialog (React events bubble through portals), so using the menu never
1387
+ * opens the row it sits in.
1388
+ *
1389
+ * Key it by its scope (`key={record.id}`, or the scope query that picked the
1390
+ * rows). An open confirmation belongs to the instance that asked it, and
1391
+ * RowActions has no scope of its own: an instance that stays mounted while
1392
+ * its `items` swap to another record would keep the previous record's
1393
+ * dialog, and confirming it would run the previous record's `onSelect`. A
1394
+ * new key remounts it and drops the question.
1395
+ */
1396
+ declare function RowActions({ items, label, className }: RowActionsProps): react.JSX.Element | null;
1397
+
1398
+ interface ToolbarProps {
1399
+ search?: ReactNode;
1400
+ filters?: ReactNode;
1401
+ /** Right-aligned: view toggles, export, the page's secondary controls. */
1402
+ end?: ReactNode;
1403
+ className?: string;
1404
+ }
1405
+ /**
1406
+ * The row above a list (DEV-19236): search, filters, then `end` on the right.
1407
+ * One 32px row with no card chrome that wraps when it runs out of width; on
1408
+ * touch screens the gaps open up so the controls' 44px hit areas don't
1409
+ * overlap. The slots take any node: Records' FilterBar stays in the app and
1410
+ * plugs into `filters`.
1411
+ */
1412
+ declare function Toolbar({ search, filters, end, className }: ToolbarProps): react.JSX.Element | null;
1413
+
1414
+ interface ConfirmDialogProps {
1415
+ open: boolean;
1416
+ onOpenChange: (open: boolean) => void;
1417
+ title: string;
1418
+ body?: react.ReactNode;
1419
+ /** Defaults to "Confirm". */
1420
+ confirmLabel?: string;
1421
+ /** Defaults to "Cancel". */
1422
+ cancelLabel?: string;
1423
+ /** Paints the confirm button in the destructive tone. */
1424
+ destructive?: boolean;
1425
+ /**
1426
+ * Runs once per confirm. A returned promise keeps the dialog open and busy
1427
+ * until it settles: it closes on resolve and shows the error on reject.
1428
+ */
1429
+ onConfirm: () => void | Promise<void>;
1430
+ /**
1431
+ * Where focus goes when the dialog closes. Pass the control that opened it
1432
+ * when that control is not a Dialog trigger (a menu item, for example):
1433
+ * Radix can only restore focus to an element that is still mounted.
1434
+ * Omitted, focus returns to whatever had it when the dialog opened.
1435
+ */
1436
+ returnFocusRef?: react.RefObject<HTMLElement | null>;
1437
+ }
1438
+ /**
1439
+ * The shared confirm step (DEV-19236): a title, an optional body, Cancel and
1440
+ * a confirm button, on Radix Dialog with role="alertdialog". Cancel comes
1441
+ * first in the tab order, so Enter on open never confirms a destructive
1442
+ * action. While an async confirm is pending, Escape, the overlay and Cancel
1443
+ * can't close it, and the disabled confirm button can't fire it twice.
1444
+ */
1445
+ declare function ConfirmDialog({ open, onOpenChange, title, body, confirmLabel, cancelLabel, destructive, onConfirm, returnFocusRef, }: ConfirmDialogProps): react.JSX.Element;
1446
+
1447
+ /**
1448
+ * The package's Radix DropdownMenu wrapper. Started as ContextSwitcher's
1449
+ * internal menu (DEV-4408); DEV-19236 extended it in place with the pieces
1450
+ * the control primitives (PageActions, RowActions) need: a destructive item
1451
+ * variant, Separator, Group and Sub menus, and exported it from the package.
1452
+ *
1453
+ * Not a full port of reeve-frontend's shadcn `components/ui/dropdown-menu.tsx`
1454
+ * (no Checkbox/Radio items or Shortcut). Styling mirrors that wrapper's
1455
+ * Tailwind theme tokens (bg-popover, border-border, destructive-subtle, etc.)
1456
+ * so a host app's existing shadcn theme renders this identically.
1457
+ */
1458
+ declare function DropdownMenu(props: react.ComponentProps<typeof DropdownMenuPrimitive.Root>): react.JSX.Element;
1459
+ declare function DropdownMenuTrigger(props: react.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react.JSX.Element;
1460
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: react.ComponentProps<typeof DropdownMenuPrimitive.Content>): react.JSX.Element;
1461
+ declare function DropdownMenuItem({ className, variant, ...props }: react.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
1462
+ variant?: "default" | "destructive";
1463
+ }): react.JSX.Element;
1464
+ declare const DropdownMenuGroup: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1465
+ declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1466
+ declare function DropdownMenuSub(props: react.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react.JSX.Element;
1467
+ declare const DropdownMenuSubTrigger: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1468
+ declare const DropdownMenuSubContent: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1469
+ declare function DropdownMenuLabel({ className, ...props }: react.ComponentProps<typeof DropdownMenuPrimitive.Label>): react.JSX.Element;
1470
+
1270
1471
  /** One page tab in the canvas header. */
1271
1472
  interface CanvasTab {
1272
1473
  /** The tab's value; passed to `onSelect`. */
@@ -1325,4 +1526,4 @@ declare function useCanvasPage(slot: CanvasPageSlot): boolean;
1325
1526
  /** `useCanvasPage` as a component, for server-rendered pages. Renders nothing. */
1326
1527
  declare function CanvasPage(props: CanvasPageSlot): null;
1327
1528
 
1328
- export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarRecent, type AppSidebarRecentItem, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, CANVAS_LAYOUT_SHORTCUTS, CHAT_COLUMN_MAX_PX, CHAT_MIN_PX, type CanvasLayout, type CanvasLayoutMode, CanvasLayoutSwitch, CanvasPage, type CanvasPageSlot, type CanvasPageTabs, type CanvasTab, ChatCanvasShell, type ChatCanvasShellProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherBadge, type ContextSwitcherBadgeTone, type ContextSwitcherItem, type ContextSwitcherProps, DEFAULT_CHAT_CANVAS_STORAGE_KEY, DEFAULT_LEGAL_LINKS, DEFAULT_SPLIT_PCT, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKED_BLUR_STYLE, LOCKUP_GAP, LOCKUP_ROW, LockedBlock, type LockedBlockProps, LockedValue, type LockedValueProps, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, PageSurface, type PageSurfaceProps, REEVE_ACCENT, type ReleaseResult, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, SNAP_CENTER_WINDOW, SNAP_CHAT_BELOW, SNAP_DASHBOARD_ABOVE, SNAP_DURATION_MS, SNAP_EASING, SPLIT_MAX_PCT, SPLIT_MIN_PANES_PX, SPLIT_MIN_PCT, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, SiteFooter, type SiteFooterLink, type SiteFooterProps, UnlockCta, type UnlockCtaProps, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, placeholder, reconcileLadder, resolveLadder, resolveRelease, useCanvasLayout, useCanvasLayoutOptional, useCanvasPage, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
1529
+ export { type Action, type ActionConfirm, type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarRecent, type AppSidebarRecentItem, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, CANVAS_LAYOUT_SHORTCUTS, CHAT_COLUMN_MAX_PX, CHAT_MIN_PX, type CanvasLayout, type CanvasLayoutMode, CanvasLayoutSwitch, CanvasPage, type CanvasPageSlot, type CanvasPageTabs, type CanvasTab, ChatCanvasShell, type ChatCanvasShellProps, ConfirmDialog, type ConfirmDialogProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherBadge, type ContextSwitcherBadgeTone, type ContextSwitcherItem, type ContextSwitcherProps, DEFAULT_CHAT_CANVAS_STORAGE_KEY, DEFAULT_LEGAL_LINKS, DEFAULT_SPLIT_PCT, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, HowToClip, type HowToClipProps, InfoTip, type InfoTipProps, LOCKED_BLUR_STYLE, LOCKUP_GAP, LOCKUP_ROW, LockedBlock, type LockedBlockProps, LockedValue, type LockedValueProps, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, PageActions, type PageActionsProps, PageSurface, type PageSurfaceProps, REEVE_ACCENT, type ReleaseResult, ResponsiveHeader, type ResponsiveHeaderProps, RowActions, type RowActionsProps, type RungItem, SNAP_CENTER_WINDOW, SNAP_CHAT_BELOW, SNAP_DASHBOARD_ABOVE, SNAP_DURATION_MS, SNAP_EASING, SPLIT_MAX_PCT, SPLIT_MIN_PANES_PX, SPLIT_MIN_PCT, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, SiteFooter, type SiteFooterLink, type SiteFooterProps, Toolbar, type ToolbarProps, UnlockCta, type UnlockCtaProps, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, placeholder, reconcileLadder, resolveLadder, resolveRelease, useCanvasLayout, useCanvasLayoutOptional, useCanvasPage, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode, ElementType, RefObject, CSSProperties, MouseEventHandler } from 'react';
3
+ export { u as usePrefersReducedMotion } from './use-prefers-reduced-motion-CRlBJxhu.js';
3
4
  import { z } from 'zod';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
6
 
5
7
  declare const REEVE_ACCENT = "#FF6B2B";
6
8
 
@@ -205,6 +207,34 @@ declare function ResponsiveHeader({ brand, search, nav, brandHref, linkComponent
205
207
  */
206
208
  declare function useResponsivePlaceholder(desktop: string, mobile?: string): string;
207
209
 
210
+ /**
211
+ * HowToClip (DEV-19372) — the one player for every how-to clip: a few silent,
212
+ * looping seconds of the other app's screen, shown where a step sends someone
213
+ * there. Generalised from the Docs share strip's ShareClip (DEV-18388).
214
+ *
215
+ * Muted and looping; reduced motion never starts it (and turning it on
216
+ * mid-loop pauses it), so the poster and the native controls carry it
217
+ * instead. A browser that refuses autoplay (iOS Low Power Mode) gets the
218
+ * controls too, until a later play() succeeds. A browser whose play() returns
219
+ * no promise (or has no play()) is judged by whether the clip actually left
220
+ * the paused state.
221
+ *
222
+ * While it autoplays, a corner toggle pauses and resumes it (DEV-19403, WCAG
223
+ * 2.2.2). The toggle shows only while the native controls are off, so there is
224
+ * never a second set; a pause made with the toggle outlasts a reduced-motion
225
+ * change but not a new clip.
226
+ */
227
+ interface HowToClipProps {
228
+ /** File stem: `${clipBaseUrl}/${slug}.webm|.mp4` and `${clipBaseUrl}/${slug}-poster.jpg`. Must match /^[a-z0-9-]{1,64}$/ or nothing renders. */
229
+ slug: string;
230
+ /** aria-label naming the step, e.g. "Sharing a Google Doc with reeve@meetreeve.com as Editor, in Google Docs". */
231
+ label: string;
232
+ /** Where the clip files are served from, e.g. "/how-to" or "https://cdn.example/how-to" (no query or hash). Omitted or blank → renders null. A trailing slash is dropped. */
233
+ clipBaseUrl?: string;
234
+ className?: string;
235
+ }
236
+ declare function HowToClip({ slug, label, clipBaseUrl, className }: HowToClipProps): react.JSX.Element | null;
237
+
208
238
  interface SiteFooterLink {
209
239
  href: string;
210
240
  label: string;
@@ -828,10 +858,15 @@ interface ConnectorCredentialField {
828
858
  * submitted as-is when the customer doesn't change it. */
829
859
  defaultValue?: string | null;
830
860
  }
831
- /** One numbered step of a setup guide; `copyable` is a literal to paste. */
861
+ /**
862
+ * One numbered step of a setup guide; `copyable` is a literal to paste.
863
+ * `clip` names a how-to clip (DEV-19372) shown under the step, the slug a
864
+ * `HowToClip` takes; it renders only when the host passes `clipBaseUrl`.
865
+ */
832
866
  interface ConnectorGuideStep {
833
867
  text: string;
834
868
  copyable?: string | null;
869
+ clip?: string | null;
835
870
  }
836
871
  /**
837
872
  * A fully-rendered setup guide as the server returns it (SG-1). The backend
@@ -1040,8 +1075,14 @@ interface ConnectorPickerProps {
1040
1075
  lens?: ConnectorPickerLens;
1041
1076
  layout?: "tiles" | "list";
1042
1077
  onConnected?: (entry: ConnectableEntry) => void;
1078
+ /**
1079
+ * Where how-to clip files are served from, e.g. "/how-to" (DEV-19372). A
1080
+ * guide step with a `clip` shows it only when this is set; hosts that
1081
+ * don't serve the clips leave it out and render exactly as before.
1082
+ */
1083
+ clipBaseUrl?: string;
1043
1084
  }
1044
- declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
1085
+ declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, clipBaseUrl, }: ConnectorPickerProps): react.JSX.Element | null;
1045
1086
 
1046
1087
  interface LockedValueProps {
1047
1088
  /** The value's shape: `#` is a digit, everything else is kept (`"$#,###,###"`, `"##%"`). */
@@ -1128,11 +1169,16 @@ declare const CHAT_MIN_PX = 480;
1128
1169
  declare const SPLIT_MIN_PANES_PX = 960;
1129
1170
  /** The chat column's max width in Chat mode. */
1130
1171
  declare const CHAT_COLUMN_MAX_PX = 720;
1131
- declare const DEFAULT_SPLIT_PCT = 50;
1172
+ /** Split opens with the canvas at 2/3 and the chat at 1/3 (DEV-19522). */
1173
+ declare const DEFAULT_SPLIT_PCT = 67;
1132
1174
  declare const SPLIT_MIN_PCT = 30;
1133
1175
  declare const SPLIT_MAX_PCT = 75;
1134
- /** A release within this many points of 50 snaps to 50/50. */
1135
- declare const SNAP_CENTER_WINDOW = 8;
1176
+ /**
1177
+ * A release within this many points of the default snaps to the default
1178
+ * (63..71 around 67). Kept narrow so free drag still reaches widths on both
1179
+ * sides of it, up to SPLIT_MAX_PCT (DEV-19522).
1180
+ */
1181
+ declare const SNAP_CENTER_WINDOW = 4;
1136
1182
  /** A release past this canvas share snaps to Dashboard. */
1137
1183
  declare const SNAP_DASHBOARD_ABOVE = 85;
1138
1184
  /** A release below this canvas share snaps to Chat. */
@@ -1267,6 +1313,161 @@ interface PageSurfaceProps {
1267
1313
  */
1268
1314
  declare function PageSurface({ children, className, as: Tag, bleed }: PageSurfaceProps): react.JSX.Element;
1269
1315
 
1316
+ /** Copy for the confirm step an action asks for before it runs. */
1317
+ interface ActionConfirm {
1318
+ title: string;
1319
+ body?: ReactNode;
1320
+ /** Defaults to the action's label. */
1321
+ confirmLabel?: string;
1322
+ }
1323
+ interface ActionBase {
1324
+ /** Unique within one PageActions / RowActions (a React key, and the in-flight guard's key). */
1325
+ id: string;
1326
+ label: string;
1327
+ icon?: ReactNode;
1328
+ disabled?: boolean;
1329
+ /**
1330
+ * Renders last, after a separator, in the destructive tone, and always
1331
+ * confirms first. On an action with `options`, every option inherits it.
1332
+ */
1333
+ destructive?: boolean;
1334
+ /**
1335
+ * Ask before running. A destructive action without one confirms with
1336
+ * "<label>?". On an action with `options`, it is each option's default.
1337
+ */
1338
+ confirm?: ActionConfirm;
1339
+ }
1340
+ /**
1341
+ * One thing a user can do, rendered by PageActions and RowActions (DEV-19236).
1342
+ * Either it runs (`onSelect`), or it opens a menu of `options` (a split
1343
+ * button such as "New campaign ▾" → Blank / Draft with AI). A promise from
1344
+ * `onSelect` keeps a confirm dialog pending and shows its error there; an
1345
+ * unconfirmed action is not re-run while its promise is pending, and owns its
1346
+ * own error UI.
1347
+ */
1348
+ type Action = ActionBase & ({
1349
+ onSelect: () => void | Promise<void>;
1350
+ options?: never;
1351
+ } | {
1352
+ options: Action[];
1353
+ onSelect?: never;
1354
+ });
1355
+
1356
+ interface PageActionsProps {
1357
+ /** The page's one dominant action, painted with the action tokens. */
1358
+ primary?: Action;
1359
+ /** Everything else, behind one ⋯ menu. */
1360
+ more?: Action[];
1361
+ /** Accessible name of the ⋯ trigger. Defaults to "More actions". */
1362
+ moreLabel?: string;
1363
+ className?: string;
1364
+ }
1365
+ /**
1366
+ * A page's actions (DEV-19236): at most one `action` button (`destructive`
1367
+ * when the primary is destructive) and one ⋯ menu.
1368
+ * A primary with `options` is one trigger that opens a menu of them (a split
1369
+ * button: "New campaign ▾" → Blank / Draft with AI). Plugging it into the
1370
+ * canvas header slot is the app's job (DEV-19268).
1371
+ */
1372
+ declare function PageActions({ primary, more, moreLabel, className }: PageActionsProps): react.JSX.Element | null;
1373
+
1374
+ interface RowActionsProps {
1375
+ items: Action[];
1376
+ /** Accessible name of the ⋯ trigger. Defaults to "Row actions". */
1377
+ label?: string;
1378
+ className?: string;
1379
+ }
1380
+ /**
1381
+ * The ⋯ menu at the end of a row (DEV-19236): a 32px ghost icon trigger
1382
+ * (44px hit area) that opens a DropdownMenu. Destructive items render last,
1383
+ * after a separator, and confirm through ConfirmDialog.
1384
+ *
1385
+ * Clicks and key presses (down and up) stop here, including those from the portaled menu
1386
+ * and dialog (React events bubble through portals), so using the menu never
1387
+ * opens the row it sits in.
1388
+ *
1389
+ * Key it by its scope (`key={record.id}`, or the scope query that picked the
1390
+ * rows). An open confirmation belongs to the instance that asked it, and
1391
+ * RowActions has no scope of its own: an instance that stays mounted while
1392
+ * its `items` swap to another record would keep the previous record's
1393
+ * dialog, and confirming it would run the previous record's `onSelect`. A
1394
+ * new key remounts it and drops the question.
1395
+ */
1396
+ declare function RowActions({ items, label, className }: RowActionsProps): react.JSX.Element | null;
1397
+
1398
+ interface ToolbarProps {
1399
+ search?: ReactNode;
1400
+ filters?: ReactNode;
1401
+ /** Right-aligned: view toggles, export, the page's secondary controls. */
1402
+ end?: ReactNode;
1403
+ className?: string;
1404
+ }
1405
+ /**
1406
+ * The row above a list (DEV-19236): search, filters, then `end` on the right.
1407
+ * One 32px row with no card chrome that wraps when it runs out of width; on
1408
+ * touch screens the gaps open up so the controls' 44px hit areas don't
1409
+ * overlap. The slots take any node: Records' FilterBar stays in the app and
1410
+ * plugs into `filters`.
1411
+ */
1412
+ declare function Toolbar({ search, filters, end, className }: ToolbarProps): react.JSX.Element | null;
1413
+
1414
+ interface ConfirmDialogProps {
1415
+ open: boolean;
1416
+ onOpenChange: (open: boolean) => void;
1417
+ title: string;
1418
+ body?: react.ReactNode;
1419
+ /** Defaults to "Confirm". */
1420
+ confirmLabel?: string;
1421
+ /** Defaults to "Cancel". */
1422
+ cancelLabel?: string;
1423
+ /** Paints the confirm button in the destructive tone. */
1424
+ destructive?: boolean;
1425
+ /**
1426
+ * Runs once per confirm. A returned promise keeps the dialog open and busy
1427
+ * until it settles: it closes on resolve and shows the error on reject.
1428
+ */
1429
+ onConfirm: () => void | Promise<void>;
1430
+ /**
1431
+ * Where focus goes when the dialog closes. Pass the control that opened it
1432
+ * when that control is not a Dialog trigger (a menu item, for example):
1433
+ * Radix can only restore focus to an element that is still mounted.
1434
+ * Omitted, focus returns to whatever had it when the dialog opened.
1435
+ */
1436
+ returnFocusRef?: react.RefObject<HTMLElement | null>;
1437
+ }
1438
+ /**
1439
+ * The shared confirm step (DEV-19236): a title, an optional body, Cancel and
1440
+ * a confirm button, on Radix Dialog with role="alertdialog". Cancel comes
1441
+ * first in the tab order, so Enter on open never confirms a destructive
1442
+ * action. While an async confirm is pending, Escape, the overlay and Cancel
1443
+ * can't close it, and the disabled confirm button can't fire it twice.
1444
+ */
1445
+ declare function ConfirmDialog({ open, onOpenChange, title, body, confirmLabel, cancelLabel, destructive, onConfirm, returnFocusRef, }: ConfirmDialogProps): react.JSX.Element;
1446
+
1447
+ /**
1448
+ * The package's Radix DropdownMenu wrapper. Started as ContextSwitcher's
1449
+ * internal menu (DEV-4408); DEV-19236 extended it in place with the pieces
1450
+ * the control primitives (PageActions, RowActions) need: a destructive item
1451
+ * variant, Separator, Group and Sub menus, and exported it from the package.
1452
+ *
1453
+ * Not a full port of reeve-frontend's shadcn `components/ui/dropdown-menu.tsx`
1454
+ * (no Checkbox/Radio items or Shortcut). Styling mirrors that wrapper's
1455
+ * Tailwind theme tokens (bg-popover, border-border, destructive-subtle, etc.)
1456
+ * so a host app's existing shadcn theme renders this identically.
1457
+ */
1458
+ declare function DropdownMenu(props: react.ComponentProps<typeof DropdownMenuPrimitive.Root>): react.JSX.Element;
1459
+ declare function DropdownMenuTrigger(props: react.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react.JSX.Element;
1460
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: react.ComponentProps<typeof DropdownMenuPrimitive.Content>): react.JSX.Element;
1461
+ declare function DropdownMenuItem({ className, variant, ...props }: react.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
1462
+ variant?: "default" | "destructive";
1463
+ }): react.JSX.Element;
1464
+ declare const DropdownMenuGroup: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1465
+ declare const DropdownMenuSeparator: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1466
+ declare function DropdownMenuSub(props: react.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react.JSX.Element;
1467
+ declare const DropdownMenuSubTrigger: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1468
+ declare const DropdownMenuSubContent: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
1469
+ declare function DropdownMenuLabel({ className, ...props }: react.ComponentProps<typeof DropdownMenuPrimitive.Label>): react.JSX.Element;
1470
+
1270
1471
  /** One page tab in the canvas header. */
1271
1472
  interface CanvasTab {
1272
1473
  /** The tab's value; passed to `onSelect`. */
@@ -1325,4 +1526,4 @@ declare function useCanvasPage(slot: CanvasPageSlot): boolean;
1325
1526
  /** `useCanvasPage` as a component, for server-rendered pages. Renders nothing. */
1326
1527
  declare function CanvasPage(props: CanvasPageSlot): null;
1327
1528
 
1328
- export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarRecent, type AppSidebarRecentItem, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, CANVAS_LAYOUT_SHORTCUTS, CHAT_COLUMN_MAX_PX, CHAT_MIN_PX, type CanvasLayout, type CanvasLayoutMode, CanvasLayoutSwitch, CanvasPage, type CanvasPageSlot, type CanvasPageTabs, type CanvasTab, ChatCanvasShell, type ChatCanvasShellProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherBadge, type ContextSwitcherBadgeTone, type ContextSwitcherItem, type ContextSwitcherProps, DEFAULT_CHAT_CANVAS_STORAGE_KEY, DEFAULT_LEGAL_LINKS, DEFAULT_SPLIT_PCT, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKED_BLUR_STYLE, LOCKUP_GAP, LOCKUP_ROW, LockedBlock, type LockedBlockProps, LockedValue, type LockedValueProps, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, PageSurface, type PageSurfaceProps, REEVE_ACCENT, type ReleaseResult, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, SNAP_CENTER_WINDOW, SNAP_CHAT_BELOW, SNAP_DASHBOARD_ABOVE, SNAP_DURATION_MS, SNAP_EASING, SPLIT_MAX_PCT, SPLIT_MIN_PANES_PX, SPLIT_MIN_PCT, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, SiteFooter, type SiteFooterLink, type SiteFooterProps, UnlockCta, type UnlockCtaProps, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, placeholder, reconcileLadder, resolveLadder, resolveRelease, useCanvasLayout, useCanvasLayoutOptional, useCanvasPage, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
1529
+ export { type Action, type ActionConfirm, type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarRecent, type AppSidebarRecentItem, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, CANVAS_LAYOUT_SHORTCUTS, CHAT_COLUMN_MAX_PX, CHAT_MIN_PX, type CanvasLayout, type CanvasLayoutMode, CanvasLayoutSwitch, CanvasPage, type CanvasPageSlot, type CanvasPageTabs, type CanvasTab, ChatCanvasShell, type ChatCanvasShellProps, ConfirmDialog, type ConfirmDialogProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherBadge, type ContextSwitcherBadgeTone, type ContextSwitcherItem, type ContextSwitcherProps, DEFAULT_CHAT_CANVAS_STORAGE_KEY, DEFAULT_LEGAL_LINKS, DEFAULT_SPLIT_PCT, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, HowToClip, type HowToClipProps, InfoTip, type InfoTipProps, LOCKED_BLUR_STYLE, LOCKUP_GAP, LOCKUP_ROW, LockedBlock, type LockedBlockProps, LockedValue, type LockedValueProps, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, PageActions, type PageActionsProps, PageSurface, type PageSurfaceProps, REEVE_ACCENT, type ReleaseResult, ResponsiveHeader, type ResponsiveHeaderProps, RowActions, type RowActionsProps, type RungItem, SNAP_CENTER_WINDOW, SNAP_CHAT_BELOW, SNAP_DASHBOARD_ABOVE, SNAP_DURATION_MS, SNAP_EASING, SPLIT_MAX_PCT, SPLIT_MIN_PANES_PX, SPLIT_MIN_PCT, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, SiteFooter, type SiteFooterLink, type SiteFooterProps, Toolbar, type ToolbarProps, UnlockCta, type UnlockCtaProps, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, placeholder, reconcileLadder, resolveLadder, resolveRelease, useCanvasLayout, useCanvasLayoutOptional, useCanvasPage, useLadderRung, useResponsivePlaceholder, zSidebarLadder };