react-os-shell 4.21.1 → 4.31.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.
Files changed (54) hide show
  1. package/dist/{Browser-2GQLOOS7.js → Browser-63NYU74S.js} +6 -6
  2. package/dist/{Browser-2GQLOOS7.js.map → Browser-63NYU74S.js.map} +1 -1
  3. package/dist/{Calculator-QCAJ6ITI.js → Calculator-XERXEV35.js} +5 -5
  4. package/dist/{Calculator-QCAJ6ITI.js.map → Calculator-XERXEV35.js.map} +1 -1
  5. package/dist/ConfirmDialog-EEH4CWSW.js +3 -0
  6. package/dist/{ConfirmDialog-WAM5OKAV.js.map → ConfirmDialog-EEH4CWSW.js.map} +1 -1
  7. package/dist/{CurrencyConverter-PCYC6RL5.js → CurrencyConverter-OSZISLHT.js} +5 -5
  8. package/dist/{CurrencyConverter-PCYC6RL5.js.map → CurrencyConverter-OSZISLHT.js.map} +1 -1
  9. package/dist/{Documents-MOQNF6HE.js → Documents-YP4GBBRF.js} +6 -6
  10. package/dist/{Documents-MOQNF6HE.js.map → Documents-YP4GBBRF.js.map} +1 -1
  11. package/dist/{Files-YBH6XKXE.js → Files-6JWIE3VH.js} +7 -7
  12. package/dist/{Files-YBH6XKXE.js.map → Files-6JWIE3VH.js.map} +1 -1
  13. package/dist/{Notepad-E3L6AOGU.js → Notepad-EHO56UNK.js} +6 -6
  14. package/dist/{Notepad-E3L6AOGU.js.map → Notepad-EHO56UNK.js.map} +1 -1
  15. package/dist/{PomodoroTimer-YABFEPEV.js → PomodoroTimer-5ZSIG7SQ.js} +5 -5
  16. package/dist/{PomodoroTimer-YABFEPEV.js.map → PomodoroTimer-5ZSIG7SQ.js.map} +1 -1
  17. package/dist/{Preview-SNPHS4PS.js → Preview-67IPCMSN.js} +6 -6
  18. package/dist/{Preview-SNPHS4PS.js.map → Preview-67IPCMSN.js.map} +1 -1
  19. package/dist/{Spreadsheet-JXQCWZES.js → Spreadsheet-HVXBAFR7.js} +6 -6
  20. package/dist/{Spreadsheet-JXQCWZES.js.map → Spreadsheet-HVXBAFR7.js.map} +1 -1
  21. package/dist/{Stock-IPLLRUOC.js → Stock-4BORXILI.js} +5 -5
  22. package/dist/{Stock-IPLLRUOC.js.map → Stock-4BORXILI.js.map} +1 -1
  23. package/dist/{Weather-SI5QN7X2.js → Weather-ZPPSEUIY.js} +5 -5
  24. package/dist/{Weather-SI5QN7X2.js.map → Weather-ZPPSEUIY.js.map} +1 -1
  25. package/dist/{WorldClock-WYDSMUWX.js → WorldClock-LBKYWDWE.js} +5 -5
  26. package/dist/{WorldClock-WYDSMUWX.js.map → WorldClock-LBKYWDWE.js.map} +1 -1
  27. package/dist/apps/index.js +16 -16
  28. package/dist/{chunk-XBV7NUZK.js → chunk-7NIFBQUX.js} +343 -74
  29. package/dist/chunk-7NIFBQUX.js.map +1 -0
  30. package/dist/{chunk-XRBJARD7.js → chunk-BT3EQNH3.js} +4 -4
  31. package/dist/{chunk-XRBJARD7.js.map → chunk-BT3EQNH3.js.map} +1 -1
  32. package/dist/{chunk-IGPSRRL7.js → chunk-GUWAKATU.js} +10 -7
  33. package/dist/chunk-GUWAKATU.js.map +1 -0
  34. package/dist/{chunk-HYAW6KIL.js → chunk-HNH7FOYB.js} +16 -4
  35. package/dist/chunk-HNH7FOYB.js.map +1 -0
  36. package/dist/{chunk-L2O6B5KT.js → chunk-OXLLRKBC.js} +24 -4
  37. package/dist/chunk-OXLLRKBC.js.map +1 -0
  38. package/dist/chunk-SGS3IQEL.js +7 -0
  39. package/dist/{chunk-CM2NWGYZ.js.map → chunk-SGS3IQEL.js.map} +1 -1
  40. package/dist/{chunk-Q3AOIJ7B.js → chunk-X6DOWIY2.js} +3 -3
  41. package/dist/{chunk-Q3AOIJ7B.js.map → chunk-X6DOWIY2.js.map} +1 -1
  42. package/dist/{index-Czn1re5M.d.ts → index-CdxMm6Dk.d.ts} +175 -35
  43. package/dist/index.d.ts +53 -29
  44. package/dist/index.js +54 -146
  45. package/dist/index.js.map +1 -1
  46. package/dist/ui/index.d.ts +1 -1
  47. package/dist/ui/index.js +4 -4
  48. package/package.json +1 -1
  49. package/dist/ConfirmDialog-WAM5OKAV.js +0 -3
  50. package/dist/chunk-CM2NWGYZ.js +0 -7
  51. package/dist/chunk-HYAW6KIL.js.map +0 -1
  52. package/dist/chunk-IGPSRRL7.js.map +0 -1
  53. package/dist/chunk-L2O6B5KT.js.map +0 -1
  54. package/dist/chunk-XBV7NUZK.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, LabelHTMLAttributes, ElementType, CSSProperties, RefObject } from 'react';
2
+ import { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, SelectHTMLAttributes, LabelHTMLAttributes, ElementType, MouseEvent, CSSProperties, RefObject } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
 
5
5
  /**
@@ -45,6 +45,26 @@ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'cla
45
45
  }
46
46
  declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
47
47
 
48
+ interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> {
49
+ /** The icon. Sized by the caller — the kit does not resize what it is given. */
50
+ children: ReactNode;
51
+ /**
52
+ * What the button does, in words. Required: there is no text to read, so
53
+ * without this the control is unusable to anyone not looking at it.
54
+ */
55
+ 'aria-label': string;
56
+ /**
57
+ * Defaults to `ghost`, where `Button` defaults to `primary`. An icon with no
58
+ * label is almost always a secondary action — a row's overflow menu, a copy
59
+ * affordance, a close — and a grid of solid blue squares is not what any of
60
+ * those want. Ask for `primary` on the rare icon-only main action.
61
+ */
62
+ variant?: ButtonVariant;
63
+ size?: ButtonSize;
64
+ className?: string;
65
+ }
66
+ declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
67
+
48
68
  /**
49
69
  * Shared form-control styling — the single source of truth for the kit's
50
70
  * text-input look. Promoted out of SearchableSelect so every form control
@@ -125,6 +145,20 @@ declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAtt
125
145
  interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'checked' | 'className'> {
126
146
  checked: boolean;
127
147
  onChange: (checked: boolean) => void;
148
+ /**
149
+ * Neither checked nor unchecked — the "some of the rows below are selected"
150
+ * state on a select-all box.
151
+ *
152
+ * It has to be a prop because it cannot be an attribute: `indeterminate`
153
+ * exists only as a DOM property, so passing it through JSX sets a bogus
154
+ * attribute, logs "Received `true` for a non-boolean attribute", and leaves
155
+ * the box looking unchecked. Set here through a ref instead.
156
+ *
157
+ * A native checkbox in this state reports itself as `mixed` to assistive
158
+ * technology on its own, so no `aria-checked` is added — writing one would
159
+ * risk contradicting the element.
160
+ */
161
+ indeterminate?: boolean;
128
162
  label?: ReactNode;
129
163
  description?: ReactNode;
130
164
  className?: string;
@@ -333,6 +367,29 @@ interface DateRangePickerProps {
333
367
  declare function toISODate(d: Date): string;
334
368
  declare function DateRangePicker({ from, to, onChange, formatDisplay, clearable, placeholder, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
335
369
 
370
+ interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'size' | 'type' | 'value' | 'onChange' | 'min' | 'max'> {
371
+ /** A Date, a `YYYY-MM-DD` string, or nothing. */
372
+ value?: Date | string | null;
373
+ /**
374
+ * The chosen date at local midnight, or `null` when the field is empty.
375
+ *
376
+ * A native date input also reports `''` mid-entry, while a partly typed date
377
+ * is not yet a date. Both arrive here as `null`: "no date yet" and "cleared"
378
+ * are the same thing to a caller storing a value.
379
+ */
380
+ onChange?: (value: Date | null) => void;
381
+ /** Earliest selectable date. */
382
+ min?: Date | string | null;
383
+ /** Latest selectable date. */
384
+ max?: Date | string | null;
385
+ /** Error state — red border + ring, matching Input. */
386
+ invalid?: boolean;
387
+ /** `touch` gives a 56px field for a finger. Defaults to the desktop size. */
388
+ size?: InputSize;
389
+ className?: string;
390
+ }
391
+ declare const DatePicker: react.ForwardRefExoticComponent<DatePickerProps & react.RefAttributes<HTMLInputElement>>;
392
+
336
393
  interface NumericKeypadProps {
337
394
  value: string;
338
395
  onChange: (next: string) => void;
@@ -405,7 +462,7 @@ interface SegmentedProps<T extends string = string> {
405
462
  declare function Segmented<T extends string = string>({ value, onChange, options, name, size, block, label, className, }: SegmentedProps<T>): react_jsx_runtime.JSX.Element;
406
463
 
407
464
  type SwitchSize = 'sm' | 'md' | 'touch';
408
- interface SwitchProps {
465
+ interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'type' | 'className'> {
409
466
  checked: boolean;
410
467
  onChange: (checked: boolean) => void;
411
468
  disabled?: boolean;
@@ -417,7 +474,16 @@ interface SwitchProps {
417
474
  id?: string;
418
475
  className?: string;
419
476
  }
420
- declare function Switch({ checked, onChange, disabled, size, label, hint, id, className, }: SwitchProps): react_jsx_runtime.JSX.Element;
477
+ /**
478
+ * Forwards its ref, and spreads the rest onto the button.
479
+ *
480
+ * A form library hands a field three things: a change handler, a name, and a
481
+ * ref it uses to move focus to the field when validation fails. The first was
482
+ * here; the other two had nowhere to go, so this control could not be a form
483
+ * field at all — which contradicts the kit's own guidance that its controls
484
+ * drop into react-hook-form.
485
+ */
486
+ declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
421
487
 
422
488
  interface InputNumberProps {
423
489
  value: number | null;
@@ -699,7 +765,14 @@ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg';
699
765
  type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
700
766
  interface AvatarProps {
701
767
  src?: string;
702
- /** Used for the initials fallback and the image alt text. */
768
+ /**
769
+ * Who this is. It names the avatar to assistive technology and supplies the
770
+ * initials when there is no usable image.
771
+ *
772
+ * Without it the avatar is hidden from assistive technology rather than
773
+ * announced as "question mark" — an avatar nobody can name carries nothing
774
+ * a screen-reader user needs.
775
+ */
703
776
  name?: string;
704
777
  size?: AvatarSize;
705
778
  status?: AvatarStatus;
@@ -847,6 +920,53 @@ interface EmptyStateProps {
847
920
  */
848
921
  declare function EmptyState({ title, message, description, hint, variant, frameless, icon, children, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
849
922
 
923
+ /**
924
+ * Generic breadcrumb trail. Self-contained and styled with the same Tailwind
925
+ * utilities the shell already ships, so consumers get it for free.
926
+ *
927
+ * Pass an ordered list of `items` from root → current. Every crumb except the
928
+ * last renders as a button when it has an `onClick`; the last crumb is treated
929
+ * as the current location — rendered inert with `aria-current="page"`. When the
930
+ * trail is long, set `maxItems` to collapse the middle into an ellipsis
931
+ * (`first … last-n` ), keeping the first and the tail visible.
932
+ */
933
+ interface BreadcrumbItem {
934
+ /** Visible label. */
935
+ label: ReactNode;
936
+ /** Optional leading icon (typically a 3.5×3.5 svg). */
937
+ icon?: ReactNode;
938
+ /**
939
+ * Navigate to this crumb. Omitted on the current (last) crumb.
940
+ *
941
+ * Receives the event, which is what makes `href` usable from a routed app:
942
+ * the handler calls `preventDefault()` on a plain click and hands the
943
+ * navigation to its router, while ctrl/middle/right clicks fall through to
944
+ * the browser untouched. Without the argument an anchor could only ever do a
945
+ * full page load, which is the thing a single-page app is avoiding.
946
+ */
947
+ onClick?: (event: MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void;
948
+ /**
949
+ * Where this crumb goes, when it is a real destination.
950
+ *
951
+ * A routed app needs this rather than `onClick` alone: an `<a href>` can be
952
+ * middle-clicked into a new tab, copied, and read off the status bar before
953
+ * committing to it — none of which a button offers, however well it behaves
954
+ * once pressed. Given both, the anchor still calls `onClick`, so a client-side
955
+ * router can intercept the plain-click case and leave the rest to the browser.
956
+ */
957
+ href?: string;
958
+ }
959
+ interface BreadcrumbsProps {
960
+ items: BreadcrumbItem[];
961
+ /** Node rendered between crumbs. Defaults to a chevron. */
962
+ separator?: ReactNode;
963
+ /** Collapse the middle to an ellipsis when there are more than this many
964
+ * crumbs. `0` (default) never collapses. */
965
+ maxItems?: number;
966
+ className?: string;
967
+ }
968
+ declare function Breadcrumbs({ items, separator, maxItems, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
969
+
850
970
  interface PageHeaderProps {
851
971
  title: string;
852
972
  /** Muted line under the title. (`subtitle` is an accepted alias.) */
@@ -856,13 +976,27 @@ interface PageHeaderProps {
856
976
  /** Right-aligned actions. (`children` is also accepted.) */
857
977
  actions?: ReactNode;
858
978
  children?: ReactNode;
979
+ /**
980
+ * Icon beside the title — a marker for the page, not a second headline.
981
+ * Rendered muted and at the title's own size, so it labels the words rather
982
+ * than competing with them.
983
+ */
984
+ icon?: ReactNode;
985
+ /**
986
+ * Trail above the title, root → current, rendered with the kit's own
987
+ * `Breadcrumbs`. Not a second implementation: the collapsing behaviour, the
988
+ * `aria-current="page"` on the last crumb and the separator all come from
989
+ * that component, so a trail in a header and a trail anywhere else stay the
990
+ * same thing.
991
+ */
992
+ breadcrumbs?: BreadcrumbItem[];
859
993
  }
860
994
  /**
861
995
  * PageHeader — a page/section title with an optional muted description and a
862
996
  * right-aligned actions slot. Accepts both the `description`/`actions` and the
863
997
  * `subtitle`/`children` prop shapes the portals previously used locally.
864
998
  */
865
- declare function PageHeader({ title, description, subtitle, actions, children }: PageHeaderProps): react_jsx_runtime.JSX.Element;
999
+ declare function PageHeader({ title, description, subtitle, actions, children, icon, breadcrumbs, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
866
1000
 
867
1001
  interface LoadingSpinnerProps {
868
1002
  /** Ring diameter: `sm` = 20px, `md` = 32px (default), `lg` = 48px. */
@@ -1276,35 +1410,6 @@ interface TopNavProps {
1276
1410
  }
1277
1411
  declare function TopNav({ items, activeKey, onSelect, brand, actions, className }: TopNavProps): react_jsx_runtime.JSX.Element;
1278
1412
 
1279
- /**
1280
- * Generic breadcrumb trail. Self-contained and styled with the same Tailwind
1281
- * utilities the shell already ships, so consumers get it for free.
1282
- *
1283
- * Pass an ordered list of `items` from root → current. Every crumb except the
1284
- * last renders as a button when it has an `onClick`; the last crumb is treated
1285
- * as the current location — rendered inert with `aria-current="page"`. When the
1286
- * trail is long, set `maxItems` to collapse the middle into an ellipsis
1287
- * (`first … last-n` ), keeping the first and the tail visible.
1288
- */
1289
- interface BreadcrumbItem {
1290
- /** Visible label. */
1291
- label: ReactNode;
1292
- /** Optional leading icon (typically a 3.5×3.5 svg). */
1293
- icon?: ReactNode;
1294
- /** Navigate to this crumb. Omitted on the current (last) crumb. */
1295
- onClick?: () => void;
1296
- }
1297
- interface BreadcrumbsProps {
1298
- items: BreadcrumbItem[];
1299
- /** Node rendered between crumbs. Defaults to a chevron. */
1300
- separator?: ReactNode;
1301
- /** Collapse the middle to an ellipsis when there are more than this many
1302
- * crumbs. `0` (default) never collapses. */
1303
- maxItems?: number;
1304
- className?: string;
1305
- }
1306
- declare function Breadcrumbs({ items, separator, maxItems, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element | null;
1307
-
1308
1413
  /**
1309
1414
  * Unified popup menu component — used for all context menus, dropdowns, and flyouts.
1310
1415
  * Reads --menu-density CSS variable: 'tight', 'normal' (default), or 'large'.
@@ -1501,6 +1606,41 @@ declare function ConfirmProvider({ children }: {
1501
1606
  children: React.ReactNode;
1502
1607
  }): react_jsx_runtime.JSX.Element;
1503
1608
 
1609
+ interface SearchResult {
1610
+ /** Category label, e.g. "Sales Order". */
1611
+ type: string;
1612
+ /** Primary text shown in the result row. */
1613
+ label: string;
1614
+ /** Optional secondary line. */
1615
+ sub?: string;
1616
+ /** Window-registry key passed to openEntity. */
1617
+ entity_type: string;
1618
+ entity_id: string;
1619
+ }
1620
+ /** A search provider — given a query, returns matching results. The shell
1621
+ * calls every provider in parallel and concatenates the responses. */
1622
+ type SearchProvider = (query: string) => Promise<SearchResult[]>;
1623
+ /** Bundle of search-related consumer config. */
1624
+ interface SearchConfig {
1625
+ providers: SearchProvider[];
1626
+ /** Per-result-type icon (SVG path `d` attribute). Unmatched types fall
1627
+ * back to a generic magnifier glyph. */
1628
+ typeIcons?: Record<string, string>;
1629
+ placeholder?: string;
1630
+ }
1631
+ interface GlobalSearchProps extends Partial<SearchConfig> {
1632
+ /**
1633
+ * What to do with the chosen result. Called after the overlay closes.
1634
+ *
1635
+ * Supplied by whoever renders the overlay, not by the consumer's
1636
+ * `SearchConfig`: inside the desktop shell `Layout` passes `openEntity`, and
1637
+ * a routed app passes its own navigation. Omitted, selecting a result just
1638
+ * closes the overlay — which is what a search with nowhere to go should do.
1639
+ */
1640
+ onSelect?: (result: SearchResult) => void;
1641
+ }
1642
+ declare function GlobalSearch({ providers, typeIcons, placeholder, onSelect }?: GlobalSearchProps): react_jsx_runtime.JSX.Element | null;
1643
+
1504
1644
  interface GridColumn {
1505
1645
  key: string;
1506
1646
  title: string;
@@ -1936,4 +2076,4 @@ declare const ALT_SHIFT_N: string;
1936
2076
  * string when the source is consumed without a build (e.g. tests). */
1937
2077
  declare const VERSION: string;
1938
2078
 
1939
- export { type CountBadgeTone as $, ALT as A, Banner as B, type ColumnDef as C, type ButtonVariant as D, CMD_A as E, CMD_DOT as F, CMD_ENTER as G, CMD_K as H, CMD_S as I, Card as J, type CardPadding as K, type CardProps as L, type CellStyle as M, ChatTemplate as N, Checkbox as O, type PaginatedResponse as P, type CheckboxProps as Q, CheckoutTemplate as R, type SortState as S, ColoredBadge as T, type ColoredBadgeProps as U, ConfirmProvider as V, ContainerFillChart as W, type ContainerFillChartProps as X, type ContainerFillItem as Y, CountBadge as Z, type CountBadgeProps as _, ALT_SHIFT_D as a, ListFooter as a$, DashboardTemplate as a0, DataTable as a1, type DataTableColumn as a2, DataTablePage as a3, type DataTableProps as a4, DateRangePicker as a5, type DateRangePickerProps as a6, type DescriptionColumns as a7, type DescriptionItem as a8, DescriptionList as a9, FormLayoutPage as aA, GLASS_DIVIDER as aB, GLASS_INPUT_BG as aC, GalleryTemplate as aD, type Gap as aE, Grid as aF, type GridCols as aG, type GridColumn as aH, type GridProps as aI, HelpCenter as aJ, type HelpCenterDoc as aK, type HelpCenterProps as aL, INPUT_BASE as aM, INPUT_SIZES as aN, Inline as aO, type InlineProps as aP, Input as aQ, InputNumber as aR, type InputNumberProps as aS, type InputProps as aT, type InputSize as aU, type Justify as aV, Kanban as aW, type KanbanColumn as aX, type KanbanProps as aY, Label as aZ, type LabelProps as a_, type DescriptionListProps as aa, Dialog as ab, type DialogProps as ac, type DialogSize as ad, Divider as ae, type DividerProps as af, type DividerSpacing as ag, DonutChart as ah, type DonutChartProps as ai, type DonutSegment as aj, Drawer as ak, type DrawerProps as al, type DrawerSide as am, type DrawerSize as an, ENTER as ao, EditableGrid as ap, type EditableGridProps as aq, EmailTemplate as ar, EmptyState as as, type EmptyStateProps as at, ErrorPage as au, type ErrorPageProps as av, FilePicker as aw, type FilePickerProps as ax, FormField as ay, type FormFieldProps as az, ALT_SHIFT_E as b, Stack as b$, ListLoadError as b0, type ListLoadErrorProps as b1, LoadingSpinner as b2, type LoadingSpinnerProps as b3, MAX_FRACTION_DIGITS as b4, MOD as b5, Markdown as b6, type MarkdownProps as b7, MediaUploadField as b8, type MediaUploadFieldProps as b9, type ResultStatus as bA, SHIFT as bB, type SearchableOption as bC, SearchableSelect as bD, type SearchableSelectProps as bE, Segmented as bF, type SegmentedOption as bG, type SegmentedProps as bH, type SegmentedSize as bI, Select as bJ, type SelectOption as bK, type SelectProps as bL, type SemanticGroup as bM, type SeverityTone as bN, type ShellPrefsAdapter as bO, ShellPrefsProvider as bP, SidebarActionButton as bQ, type SidebarActionButtonProps as bR, SidebarGroupLabel as bS, SidebarLayout as bT, type SidebarLayoutProps as bU, SidebarNavItem as bV, Skeleton as bW, type SkeletonProps as bX, type SkeletonVariant as bY, Sparkline as bZ, type SparklineProps as b_, MediaUploadGrid as ba, type MediaUploadGridItem as bb, type MediaUploadGridProps as bc, MetricBar as bd, type MetricBarProps as be, type Milestone as bf, type MilestoneKind as bg, MilestoneTimeline as bh, type MilestoneTimelineProps as bi, NativeSelect as bj, NumericKeypad as bk, type NumericKeypadProps as bl, PageHeader as bm, type PageHeaderProps as bn, Pagination as bo, type PaginationProps as bp, Paragraph as bq, type ParagraphProps as br, PopupMenu as bs, PopupMenuDivider as bt, PopupMenuItem as bu, PopupMenuLabel as bv, Radio as bw, type RadioProps as bx, Result as by, type ResultProps as bz, ALT_SHIFT_N as c, type StackProps as c0, StatCard as c1, type StatCardProps as c2, Statistic as c3, type StatisticProps as c4, type StatisticSize as c5, type StatisticTone as c6, StatusBadge as c7, StatusBadgeProvider as c8, Switch as c9, VERSION as cA, appendKey as cB, applyThemePrefs as cC, backspace as cD, confirm as cE, confirmDestructive as cF, formatDate as cG, glassStyle as cH, inputClasses as cI, isMac as cJ, isSeverityTone as cK, mediaFileName as cL, prompt as cM, resolveTheme as cN, severityOf as cO, toISODate as cP, toast as cQ, useClickOutside as cR, useConfirm as cS, useFocusTrap as cT, useIsMobile as cU, useLocalStoragePrefs as cV, useScrollLock as cW, useShellPrefs as cX, useTheme as cY, type SwitchProps as ca, type SwitchSize as cb, type TabItem as cc, Tabs as cd, type TabsProps as ce, Text as cf, type TextProps as cg, type TextSize as ch, type TextTone as ci, type TextWeight as cj, Textarea as ck, type TextareaProps as cl, type Theme as cm, TileButton as cn, type TileButtonProps as co, type TileSize as cp, Title as cq, type TitleLevel as cr, type TitleProps as cs, type ToastOptions as ct, type ToastPlacement as cu, Tooltip as cv, type TooltipProps as cw, TopNav as cx, type TopNavItem as cy, type TopNavProps as cz, Accordion as d, type AccordionItem as e, type AccordionProps as f, type Align as g, AuthScreen as h, type AuthScreenProps as i, Avatar as j, AvatarGroup as k, type AvatarGroupProps as l, type AvatarProps as m, type AvatarSize as n, type AvatarStatus as o, type BannerEmphasis as p, type BannerProps as q, type BannerTone as r, BarChart as s, type BarChartProps as t, type BreadcrumbItem as u, Breadcrumbs as v, type BreadcrumbsProps as w, Button as x, type ButtonProps as y, type ButtonSize as z };
2079
+ export { type CountBadgeProps as $, ALT as A, Banner as B, type ColumnDef as C, type ButtonSize as D, type ButtonVariant as E, CMD_A as F, CMD_DOT as G, CMD_ENTER as H, CMD_K as I, CMD_S as J, Card as K, type CardPadding as L, type CardProps as M, type CellStyle as N, ChatTemplate as O, type PaginatedResponse as P, Checkbox as Q, type CheckboxProps as R, type SearchConfig as S, CheckoutTemplate as T, ColoredBadge as U, type ColoredBadgeProps as V, ConfirmProvider as W, ContainerFillChart as X, type ContainerFillChartProps as Y, type ContainerFillItem as Z, CountBadge as _, type SortState as a, type InputSize as a$, type CountBadgeTone as a0, DashboardTemplate as a1, DataTable as a2, type DataTableColumn as a3, DataTablePage as a4, type DataTableProps as a5, DatePicker as a6, type DatePickerProps as a7, DateRangePicker as a8, type DateRangePickerProps as a9, type FilePickerProps as aA, FormField as aB, type FormFieldProps as aC, FormLayoutPage as aD, GLASS_DIVIDER as aE, GLASS_INPUT_BG as aF, GalleryTemplate as aG, type Gap as aH, GlobalSearch as aI, type GlobalSearchProps as aJ, Grid as aK, type GridCols as aL, type GridColumn as aM, type GridProps as aN, HelpCenter as aO, type HelpCenterDoc as aP, type HelpCenterProps as aQ, INPUT_BASE as aR, INPUT_SIZES as aS, IconButton as aT, type IconButtonProps as aU, Inline as aV, type InlineProps as aW, Input as aX, InputNumber as aY, type InputNumberProps as aZ, type InputProps as a_, type DescriptionColumns as aa, type DescriptionItem as ab, DescriptionList as ac, type DescriptionListProps as ad, Dialog as ae, type DialogProps as af, type DialogSize as ag, Divider as ah, type DividerProps as ai, type DividerSpacing as aj, DonutChart as ak, type DonutChartProps as al, type DonutSegment as am, Drawer as an, type DrawerProps as ao, type DrawerSide as ap, type DrawerSize as aq, ENTER as ar, EditableGrid as as, type EditableGridProps as at, EmailTemplate as au, EmptyState as av, type EmptyStateProps as aw, ErrorPage as ax, type ErrorPageProps as ay, FilePicker as az, ALT_SHIFT_D as b, SidebarGroupLabel as b$, type Justify as b0, Kanban as b1, type KanbanColumn as b2, type KanbanProps as b3, Label as b4, type LabelProps as b5, ListFooter as b6, ListLoadError as b7, type ListLoadErrorProps as b8, LoadingSpinner as b9, PopupMenuDivider as bA, PopupMenuItem as bB, PopupMenuLabel as bC, Radio as bD, type RadioProps as bE, Result as bF, type ResultProps as bG, type ResultStatus as bH, SHIFT as bI, type SearchProvider as bJ, type SearchResult as bK, type SearchableOption as bL, SearchableSelect as bM, type SearchableSelectProps as bN, Segmented as bO, type SegmentedOption as bP, type SegmentedProps as bQ, type SegmentedSize as bR, Select as bS, type SelectOption as bT, type SelectProps as bU, type SemanticGroup as bV, type SeverityTone as bW, type ShellPrefsAdapter as bX, ShellPrefsProvider as bY, SidebarActionButton as bZ, type SidebarActionButtonProps as b_, type LoadingSpinnerProps as ba, MAX_FRACTION_DIGITS as bb, MOD as bc, Markdown as bd, type MarkdownProps as be, MediaUploadField as bf, type MediaUploadFieldProps as bg, MediaUploadGrid as bh, type MediaUploadGridItem as bi, type MediaUploadGridProps as bj, MetricBar as bk, type MetricBarProps as bl, type Milestone as bm, type MilestoneKind as bn, MilestoneTimeline as bo, type MilestoneTimelineProps as bp, NativeSelect as bq, NumericKeypad as br, type NumericKeypadProps as bs, PageHeader as bt, type PageHeaderProps as bu, Pagination as bv, type PaginationProps as bw, Paragraph as bx, type ParagraphProps as by, PopupMenu as bz, ALT_SHIFT_E as c, useConfirm as c$, SidebarLayout as c0, type SidebarLayoutProps as c1, SidebarNavItem as c2, Skeleton as c3, type SkeletonProps as c4, type SkeletonVariant as c5, Sparkline as c6, type SparklineProps as c7, Stack as c8, type StackProps as c9, type TitleLevel as cA, type TitleProps as cB, type ToastOptions as cC, type ToastPlacement as cD, Tooltip as cE, type TooltipProps as cF, TopNav as cG, type TopNavItem as cH, type TopNavProps as cI, VERSION as cJ, appendKey as cK, applyThemePrefs as cL, backspace as cM, confirm as cN, confirmDestructive as cO, formatDate as cP, glassStyle as cQ, inputClasses as cR, isMac as cS, isSeverityTone as cT, mediaFileName as cU, prompt as cV, resolveTheme as cW, severityOf as cX, toISODate as cY, toast as cZ, useClickOutside as c_, StatCard as ca, type StatCardProps as cb, Statistic as cc, type StatisticProps as cd, type StatisticSize as ce, type StatisticTone as cf, StatusBadge as cg, StatusBadgeProvider as ch, Switch as ci, type SwitchProps as cj, type SwitchSize as ck, type TabItem as cl, Tabs as cm, type TabsProps as cn, Text as co, type TextProps as cp, type TextSize as cq, type TextTone as cr, type TextWeight as cs, Textarea as ct, type TextareaProps as cu, type Theme as cv, TileButton as cw, type TileButtonProps as cx, type TileSize as cy, Title as cz, ALT_SHIFT_N as d, useFocusTrap as d0, useIsMobile as d1, useLocalStoragePrefs as d2, useScrollLock as d3, useShellPrefs as d4, useTheme as d5, Accordion as e, type AccordionItem as f, type AccordionProps as g, type Align as h, AuthScreen as i, type AuthScreenProps as j, Avatar as k, AvatarGroup as l, type AvatarGroupProps as m, type AvatarProps as n, type AvatarSize as o, type AvatarStatus as p, type BannerEmphasis as q, type BannerProps as r, type BannerTone as s, BarChart as t, type BarChartProps as u, type BreadcrumbItem as v, Breadcrumbs as w, type BreadcrumbsProps as x, Button as y, type ButtonProps as z };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as ColumnDef, S as SortState, P as PaginatedResponse } from './index-Czn1re5M.js';
2
- export { A as ALT, a as ALT_SHIFT_D, b as ALT_SHIFT_E, c as ALT_SHIFT_N, d as Accordion, e as AccordionItem, f as AccordionProps, g as Align, h as AuthScreen, i as AuthScreenProps, j as Avatar, k as AvatarGroup, l as AvatarGroupProps, m as AvatarProps, n as AvatarSize, o as AvatarStatus, B as Banner, p as BannerEmphasis, q as BannerProps, r as BannerTone, s as BarChart, t as BarChartProps, u as BreadcrumbItem, v as Breadcrumbs, w as BreadcrumbsProps, x as Button, y as ButtonProps, z as ButtonSize, D as ButtonVariant, E as CMD_A, F as CMD_DOT, G as CMD_ENTER, H as CMD_K, I as CMD_S, J as Card, K as CardPadding, L as CardProps, M as CellStyle, N as ChatTemplate, O as Checkbox, Q as CheckboxProps, R as CheckoutTemplate, T as ColoredBadge, U as ColoredBadgeProps, V as ConfirmProvider, W as ContainerFillChart, X as ContainerFillChartProps, Y as ContainerFillItem, Z as CountBadge, _ as CountBadgeProps, $ as CountBadgeTone, a0 as DashboardTemplate, a1 as DataTable, a2 as DataTableColumn, a3 as DataTablePage, a4 as DataTableProps, a5 as DateRangePicker, a6 as DateRangePickerProps, a7 as DescriptionColumns, a8 as DescriptionItem, a9 as DescriptionList, aa as DescriptionListProps, ab as Dialog, ac as DialogProps, ad as DialogSize, ae as Divider, af as DividerProps, ag as DividerSpacing, ah as DonutChart, ai as DonutChartProps, aj as DonutSegment, ak as Drawer, al as DrawerProps, am as DrawerSide, an as DrawerSize, ao as ENTER, ap as EditableGrid, aq as EditableGridProps, ar as EmailTemplate, as as EmptyState, at as EmptyStateProps, au as ErrorPage, av as ErrorPageProps, aw as FilePicker, ax as FilePickerProps, ay as FormField, az as FormFieldProps, aA as FormLayoutPage, aB as GLASS_DIVIDER, aC as GLASS_INPUT_BG, aD as GalleryTemplate, aE as Gap, aF as Grid, aG as GridCols, aH as GridColumn, aI as GridProps, aJ as HelpCenter, aK as HelpCenterDoc, aL as HelpCenterProps, aM as INPUT_BASE, aN as INPUT_SIZES, aO as Inline, aP as InlineProps, aQ as Input, aR as InputNumber, aS as InputNumberProps, aT as InputProps, aU as InputSize, aV as Justify, aW as Kanban, aX as KanbanColumn, aY as KanbanProps, aZ as Label, a_ as LabelProps, a$ as ListFooter, b0 as ListLoadError, b1 as ListLoadErrorProps, b2 as LoadingSpinner, b3 as LoadingSpinnerProps, b4 as MAX_FRACTION_DIGITS, b5 as MOD, b6 as Markdown, b7 as MarkdownProps, b8 as MediaUploadField, b9 as MediaUploadFieldProps, ba as MediaUploadGrid, bb as MediaUploadGridItem, bc as MediaUploadGridProps, bd as MetricBar, be as MetricBarProps, bf as Milestone, bg as MilestoneKind, bh as MilestoneTimeline, bi as MilestoneTimelineProps, bj as NativeSelect, bk as NumericKeypad, bl as NumericKeypadProps, bm as PageHeader, bn as PageHeaderProps, bo as Pagination, bp as PaginationProps, bq as Paragraph, br as ParagraphProps, bs as PopupMenu, bt as PopupMenuDivider, bu as PopupMenuItem, bv as PopupMenuLabel, bw as Radio, bx as RadioProps, by as Result, bz as ResultProps, bA as ResultStatus, bB as SHIFT, bC as SearchableOption, bD as SearchableSelect, bE as SearchableSelectProps, bF as Segmented, bG as SegmentedOption, bH as SegmentedProps, bI as SegmentedSize, bJ as Select, bK as SelectOption, bL as SelectProps, bM as SemanticGroup, bN as SeverityTone, bO as ShellPrefsAdapter, bP as ShellPrefsProvider, bQ as SidebarActionButton, bR as SidebarActionButtonProps, bS as SidebarGroupLabel, bT as SidebarLayout, bU as SidebarLayoutProps, bV as SidebarNavItem, bW as Skeleton, bX as SkeletonProps, bY as SkeletonVariant, bZ as Sparkline, b_ as SparklineProps, b$ as Stack, c0 as StackProps, c1 as StatCard, c2 as StatCardProps, c3 as Statistic, c4 as StatisticProps, c5 as StatisticSize, c6 as StatisticTone, c7 as StatusBadge, c8 as StatusBadgeProvider, c9 as Switch, ca as SwitchProps, cb as SwitchSize, cc as TabItem, cd as Tabs, ce as TabsProps, cf as Text, cg as TextProps, ch as TextSize, ci as TextTone, cj as TextWeight, ck as Textarea, cl as TextareaProps, cm as Theme, cn as TileButton, co as TileButtonProps, cp as TileSize, cq as Title, cr as TitleLevel, cs as TitleProps, ct as ToastOptions, cu as ToastPlacement, cv as Tooltip, cw as TooltipProps, cx as TopNav, cy as TopNavItem, cz as TopNavProps, cA as VERSION, cB as appendKey, cC as applyThemePrefs, cD as backspace, cE as confirm, cF as confirmDestructive, cG as formatDate, cH as glassStyle, cI as inputClasses, cJ as isMac, cK as isSeverityTone, cL as mediaFileName, cM as prompt, cN as resolveTheme, cO as severityOf, cP as toISODate, cQ as toast, cR as useClickOutside, cS as useConfirm, cT as useFocusTrap, cU as useIsMobile, cV as useLocalStoragePrefs, cW as useScrollLock, cX as useShellPrefs, cY as useTheme } from './index-Czn1re5M.js';
1
+ import { S as SearchConfig, C as ColumnDef, a as SortState, P as PaginatedResponse } from './index-CdxMm6Dk.js';
2
+ export { A as ALT, b as ALT_SHIFT_D, c as ALT_SHIFT_E, d as ALT_SHIFT_N, e as Accordion, f as AccordionItem, g as AccordionProps, h as Align, i as AuthScreen, j as AuthScreenProps, k as Avatar, l as AvatarGroup, m as AvatarGroupProps, n as AvatarProps, o as AvatarSize, p as AvatarStatus, B as Banner, q as BannerEmphasis, r as BannerProps, s as BannerTone, t as BarChart, u as BarChartProps, v as BreadcrumbItem, w as Breadcrumbs, x as BreadcrumbsProps, y as Button, z as ButtonProps, D as ButtonSize, E as ButtonVariant, F as CMD_A, G as CMD_DOT, H as CMD_ENTER, I as CMD_K, J as CMD_S, K as Card, L as CardPadding, M as CardProps, N as CellStyle, O as ChatTemplate, Q as Checkbox, R as CheckboxProps, T as CheckoutTemplate, U as ColoredBadge, V as ColoredBadgeProps, W as ConfirmProvider, X as ContainerFillChart, Y as ContainerFillChartProps, Z as ContainerFillItem, _ as CountBadge, $ as CountBadgeProps, a0 as CountBadgeTone, a1 as DashboardTemplate, a2 as DataTable, a3 as DataTableColumn, a4 as DataTablePage, a5 as DataTableProps, a6 as DatePicker, a7 as DatePickerProps, a8 as DateRangePicker, a9 as DateRangePickerProps, aa as DescriptionColumns, ab as DescriptionItem, ac as DescriptionList, ad as DescriptionListProps, ae as Dialog, af as DialogProps, ag as DialogSize, ah as Divider, ai as DividerProps, aj as DividerSpacing, ak as DonutChart, al as DonutChartProps, am as DonutSegment, an as Drawer, ao as DrawerProps, ap as DrawerSide, aq as DrawerSize, ar as ENTER, as as EditableGrid, at as EditableGridProps, au as EmailTemplate, av as EmptyState, aw as EmptyStateProps, ax as ErrorPage, ay as ErrorPageProps, az as FilePicker, aA as FilePickerProps, aB as FormField, aC as FormFieldProps, aD as FormLayoutPage, aE as GLASS_DIVIDER, aF as GLASS_INPUT_BG, aG as GalleryTemplate, aH as Gap, aI as GlobalSearch, aJ as GlobalSearchProps, aK as Grid, aL as GridCols, aM as GridColumn, aN as GridProps, aO as HelpCenter, aP as HelpCenterDoc, aQ as HelpCenterProps, aR as INPUT_BASE, aS as INPUT_SIZES, aT as IconButton, aU as IconButtonProps, aV as Inline, aW as InlineProps, aX as Input, aY as InputNumber, aZ as InputNumberProps, a_ as InputProps, a$ as InputSize, b0 as Justify, b1 as Kanban, b2 as KanbanColumn, b3 as KanbanProps, b4 as Label, b5 as LabelProps, b6 as ListFooter, b7 as ListLoadError, b8 as ListLoadErrorProps, b9 as LoadingSpinner, ba as LoadingSpinnerProps, bb as MAX_FRACTION_DIGITS, bc as MOD, bd as Markdown, be as MarkdownProps, bf as MediaUploadField, bg as MediaUploadFieldProps, bh as MediaUploadGrid, bi as MediaUploadGridItem, bj as MediaUploadGridProps, bk as MetricBar, bl as MetricBarProps, bm as Milestone, bn as MilestoneKind, bo as MilestoneTimeline, bp as MilestoneTimelineProps, bq as NativeSelect, br as NumericKeypad, bs as NumericKeypadProps, bt as PageHeader, bu as PageHeaderProps, bv as Pagination, bw as PaginationProps, bx as Paragraph, by as ParagraphProps, bz as PopupMenu, bA as PopupMenuDivider, bB as PopupMenuItem, bC as PopupMenuLabel, bD as Radio, bE as RadioProps, bF as Result, bG as ResultProps, bH as ResultStatus, bI as SHIFT, bJ as SearchProvider, bK as SearchResult, bL as SearchableOption, bM as SearchableSelect, bN as SearchableSelectProps, bO as Segmented, bP as SegmentedOption, bQ as SegmentedProps, bR as SegmentedSize, bS as Select, bT as SelectOption, bU as SelectProps, bV as SemanticGroup, bW as SeverityTone, bX as ShellPrefsAdapter, bY as ShellPrefsProvider, bZ as SidebarActionButton, b_ as SidebarActionButtonProps, b$ as SidebarGroupLabel, c0 as SidebarLayout, c1 as SidebarLayoutProps, c2 as SidebarNavItem, c3 as Skeleton, c4 as SkeletonProps, c5 as SkeletonVariant, c6 as Sparkline, c7 as SparklineProps, c8 as Stack, c9 as StackProps, ca as StatCard, cb as StatCardProps, cc as Statistic, cd as StatisticProps, ce as StatisticSize, cf as StatisticTone, cg as StatusBadge, ch as StatusBadgeProvider, ci as Switch, cj as SwitchProps, ck as SwitchSize, cl as TabItem, cm as Tabs, cn as TabsProps, co as Text, cp as TextProps, cq as TextSize, cr as TextTone, cs as TextWeight, ct as Textarea, cu as TextareaProps, cv as Theme, cw as TileButton, cx as TileButtonProps, cy as TileSize, cz as Title, cA as TitleLevel, cB as TitleProps, cC as ToastOptions, cD as ToastPlacement, cE as Tooltip, cF as TooltipProps, cG as TopNav, cH as TopNavItem, cI as TopNavProps, cJ as VERSION, cK as appendKey, cL as applyThemePrefs, cM as backspace, cN as confirm, cO as confirmDestructive, cP as formatDate, cQ as glassStyle, cR as inputClasses, cS as isMac, cT as isSeverityTone, cU as mediaFileName, cV as prompt, cW as resolveTheme, cX as severityOf, cY as toISODate, cZ as toast, c_ as useClickOutside, c$ as useConfirm, d0 as useFocusTrap, d1 as useIsMobile, d2 as useLocalStoragePrefs, d3 as useScrollLock, d4 as useShellPrefs, d5 as useTheme } from './index-CdxMm6Dk.js';
3
3
  import { W as WindowRegistry } from './types-BHVq95fp.js';
4
4
  export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-BHVq95fp.js';
5
5
  import * as react from 'react';
@@ -120,6 +120,20 @@ declare function useWindowTitle(_title: string): void;
120
120
  declare function CopyButton({ text }: {
121
121
  text: string;
122
122
  }): react_jsx_runtime.JSX.Element;
123
+ /**
124
+ * The id of the `<Modal>` this component is rendered inside, or `''` outside one.
125
+ *
126
+ * This is the PRIVATE per-mount id (`modal-xxxxxx`) that `activationOrder` and
127
+ * the window-scoped CustomEvents carry — not the caller-supplied `windowKey`.
128
+ * Same context `useWindowMenuItem` and `useWidgetSettings` already read, and it
129
+ * reaches portal window content the same way theirs does.
130
+ *
131
+ * Use it to answer "was this event meant for MY window?", which
132
+ * {@link useModalActive} cannot: that asks "is the frontmost modal mine", and
133
+ * every nested dialog a form opens pushes itself onto `activationOrder`, so a
134
+ * form with a child dialog open reads as inactive.
135
+ */
136
+ declare function useEnclosingModalId(): string;
123
137
  /** Hook to check if the current modal is active (frontmost) */
124
138
  declare function useModalActive(): boolean;
125
139
  declare function ModalActions({ children, position }: {
@@ -413,32 +427,6 @@ declare class WindowErrorBoundary extends Component<WindowErrorBoundaryProps, {
413
427
  render(): string | number | boolean | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
414
428
  }
415
429
 
416
- interface SearchResult {
417
- /** Category label, e.g. "Sales Order". */
418
- type: string;
419
- /** Primary text shown in the result row. */
420
- label: string;
421
- /** Optional secondary line. */
422
- sub?: string;
423
- /** Window-registry key passed to openEntity. */
424
- entity_type: string;
425
- entity_id: string;
426
- }
427
- /** A search provider — given a query, returns matching results. The shell
428
- * calls every provider in parallel and concatenates the responses. */
429
- type SearchProvider = (query: string) => Promise<SearchResult[]>;
430
- /** Bundle of search-related consumer config. */
431
- interface SearchConfig {
432
- providers: SearchProvider[];
433
- /** Per-result-type icon (SVG path `d` attribute). Unmatched types fall
434
- * back to a generic magnifier glyph. */
435
- typeIcons?: Record<string, string>;
436
- placeholder?: string;
437
- }
438
- interface GlobalSearchProps extends Partial<SearchConfig> {
439
- }
440
- declare function GlobalSearch({ providers, typeIcons, placeholder }?: GlobalSearchProps): react_jsx_runtime.JSX.Element | null;
441
-
442
430
  declare function ShortcutHelp(): react_jsx_runtime.JSX.Element;
443
431
 
444
432
  /** Generic notification shape consumed by the shell. Consumer-specific
@@ -1960,6 +1948,42 @@ declare function useNewHotkey(callback: () => void): void;
1960
1948
  */
1961
1949
  declare function useEditHotkey(callback: (() => void) | null): void;
1962
1950
 
1951
+ /**
1952
+ * Registers a handler for the Cmd+S "save and stay" event dispatched by Modal.
1953
+ * The callback should save the form data WITHOUT closing the modal.
1954
+ *
1955
+ * Fires ONLY for the window the keystroke was aimed at. Modal restricts the
1956
+ * dispatch to the topmost modal, but the event goes to `document`, so without
1957
+ * this match every mounted window's hook answered one keypress — and with two
1958
+ * forms open, a single Cmd+S saved both. Depending on each form's mode that
1959
+ * either PATCHed a background record or CREATEd a brand new one, each with its
1960
+ * own success toast, so the user saw the write and misread which window it came
1961
+ * from.
1962
+ *
1963
+ * The match is on the originating modal's id rather than on
1964
+ * {@link useModalActive}, which asks a different question: "is the frontmost
1965
+ * modal mine". Every nested dialog a form opens pushes itself onto the
1966
+ * activation order, so a form with a child dialog open would read as inactive
1967
+ * and Cmd+S would silently do nothing where it used to save.
1968
+ *
1969
+ * An event with no `detail.modalId` is treated as "for me", so a consumer on a
1970
+ * newer package than the shell that dispatched it keeps working exactly as
1971
+ * before rather than losing Cmd+S entirely.
1972
+ */
1973
+ declare function useModalSave(callback: (() => void) | null): void;
1974
+
1975
+ /**
1976
+ * Registers a handler for the Alt+Shift+D "save as new / duplicate" event
1977
+ * dispatched by Modal. The callback should save the form data as a NEW record
1978
+ * (ignoring the current ID).
1979
+ *
1980
+ * Window-scoped for the same reason as {@link useModalSave}, and the stakes are
1981
+ * higher here: an unscoped duplicate created a second record from every open
1982
+ * form at once, and one consumer closes its window on success, so a background
1983
+ * window vanished as well.
1984
+ */
1985
+ declare function useModalDuplicate(callback: (() => void) | null): void;
1986
+
1963
1987
  interface UndoProviderProps {
1964
1988
  children: React.ReactNode;
1965
1989
  /**
@@ -2140,4 +2164,4 @@ interface UndoState {
2140
2164
  future: UndoStep[];
2141
2165
  }
2142
2166
 
2143
- export { type ActivityKind, type AsyncEnvironment, BLOCKED_PCT_CPU, type BatteryInfo, BehaviorPanel, type BottleneckKind, type BulkColumn, type BulkColumnKind, BulkImportGrid, type BulkImportGridProps, type BulkRow, CancelButton, ChangePasswordForm, type ChangePasswordFormProps, type ChangelogEntry, type ClockCalendarConfig, ColumnDef, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, type DuplicateGroup, type EntityFetcher, EntityList, type EntityListColumn, type EntityListContextAction, type EntityListProps, FilterBar, type FilterOption, type FpsGroup, GlobalSearch, type HealthCheckResult, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, LOG_CAP, Layout, type LayoutProps, type LogSummary, MIN_EVENT_SAMPLES, MIN_GROUP_SAMPLES, type MenuLayer, type MergeBulkOptions, type MergeBulkResult, type MobileAppConfig, Modal, ModalActions, NotificationBell, type NotificationsConfig, PaginatedResponse, PdfActionButton, type PdfActionButtonProps, type PerfEnvironment, type PerfLogRecord, type PerfReading, type PerfReport, PerfStats, type PerfStatsProps, type PlatformHints, ResizableTable, SMOOTH_FPS, type SearchConfig, type SearchProvider, type SearchResult, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, ShortcutHelp, SortState, SoundsPanel, type StagedTarget, StartMenu, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, UndoControls, type UndoControlsApi, type UndoControlsProps, UndoProvider, type UndoProviderProps, type UndoSnapshot, type UndoState, type UndoStep, type UndoableOptions, type Verdict, WidgetManager, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowRegistry, type WindowTarget, type WindowTargetOptions, WindowTitle, appendRecord as appendPerfRecord, applyDevTitle, beginWindowGesture, classifyActivity, classify as classifyPerf, commitExposeHighlight, createWindowRegistry, createWindowTarget, describeMachine, describePerfReport, exitExposeMode, findDuplicateKeys, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isDevEnv, isInteracting, markMenuOpen, mergeBulkItems, toCsv as perfLogToCsv, perfReportFile, readEnvironment as readPerfEnvironment, registerModalEscapeInterceptor, requestAsyncEnvironment, requestWindowFront, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, summariseFrames, summariseLog as summarisePerfLog, toggleExposeMode, useColumnConfig, useDesktopHost, useEditHotkey, useFilters, useInfiniteScroll, useIsActiveWindow, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useSort, useTableNav, useUndo, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTarget, useWindowTitle };
2167
+ export { type ActivityKind, type AsyncEnvironment, BLOCKED_PCT_CPU, type BatteryInfo, BehaviorPanel, type BottleneckKind, type BulkColumn, type BulkColumnKind, BulkImportGrid, type BulkImportGridProps, type BulkRow, CancelButton, ChangePasswordForm, type ChangePasswordFormProps, type ChangelogEntry, type ClockCalendarConfig, ColumnDef, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, type DuplicateGroup, type EntityFetcher, EntityList, type EntityListColumn, type EntityListContextAction, type EntityListProps, FilterBar, type FilterOption, type FpsGroup, type HealthCheckResult, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, LOG_CAP, Layout, type LayoutProps, type LogSummary, MIN_EVENT_SAMPLES, MIN_GROUP_SAMPLES, type MenuLayer, type MergeBulkOptions, type MergeBulkResult, type MobileAppConfig, Modal, ModalActions, NotificationBell, type NotificationsConfig, PaginatedResponse, PdfActionButton, type PdfActionButtonProps, type PerfEnvironment, type PerfLogRecord, type PerfReading, type PerfReport, PerfStats, type PerfStatsProps, type PlatformHints, ResizableTable, SMOOTH_FPS, SearchConfig, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, ShortcutHelp, SortState, SoundsPanel, type StagedTarget, StartMenu, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, UndoControls, type UndoControlsApi, type UndoControlsProps, UndoProvider, type UndoProviderProps, type UndoSnapshot, type UndoState, type UndoStep, type UndoableOptions, type Verdict, WidgetManager, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowRegistry, type WindowTarget, type WindowTargetOptions, WindowTitle, appendRecord as appendPerfRecord, applyDevTitle, beginWindowGesture, classifyActivity, classify as classifyPerf, commitExposeHighlight, createWindowRegistry, createWindowTarget, describeMachine, describePerfReport, exitExposeMode, findDuplicateKeys, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isDevEnv, isInteracting, markMenuOpen, mergeBulkItems, toCsv as perfLogToCsv, perfReportFile, readEnvironment as readPerfEnvironment, registerModalEscapeInterceptor, requestAsyncEnvironment, requestWindowFront, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, summariseFrames, summariseLog as summarisePerfLog, toggleExposeMode, useColumnConfig, useDesktopHost, useEditHotkey, useEnclosingModalId, useFilters, useInfiniteScroll, useIsActiveWindow, useModalActive, useModalDuplicate, useModalSave, useNewHotkey, useShellAuth, useShellEntityFetcher, useSort, useTableNav, useUndo, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTarget, useWindowTitle };