efficient-shell 10.23.0 → 10.24.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 (101) hide show
  1. package/README.md +14 -3
  2. package/dist/{Browser-GTQKXJQ6.js → Browser-KUFFOGYK.js} +14 -14
  3. package/dist/Calculator-LENRW34X.js +29 -0
  4. package/dist/CurrencyConverter-7UMHQS2V.js +21 -0
  5. package/dist/{Documents-MTCJXTXY.js → Documents-ODZ4AAOY.js} +16 -16
  6. package/dist/{Files-XMZ3XBP4.js → Files-BRGTTI2J.js} +25 -25
  7. package/dist/Notepad-RMRDEGGU.js +24 -0
  8. package/dist/{PomodoroTimer-5ELVNJEU.js → PomodoroTimer-4566W4F7.js} +40 -40
  9. package/dist/{Preview-QCA6XUDU.js → Preview-7POJP7PB.js} +33 -33
  10. package/dist/Sidebar-TU4QCKYJ.js +44 -0
  11. package/dist/Spreadsheet-7T4VT5IO.js +37 -0
  12. package/dist/{Stock-TRG6CAZJ.js → Stock-H73C4R3N.js} +3 -3
  13. package/dist/{Weather-YGTT7UWR.js → Weather-WF56QCBI.js} +19 -19
  14. package/dist/{WorldClock-UCX5LCJB.js → WorldClock-5QJNZYYS.js} +6 -6
  15. package/dist/ai/index.js +1 -1
  16. package/dist/api/shellHttp.d.ts +52 -0
  17. package/dist/api/shellHttp.js +1 -0
  18. package/dist/apps/index.js +1 -1
  19. package/dist/bin/media-host-check.js +1 -1
  20. package/dist/bin/ui-check.js +1 -1
  21. package/dist/chunk-2QY5BJLA.js +2 -0
  22. package/dist/chunk-3C5NKOVF.js +1 -0
  23. package/dist/chunk-3FBDLIQW.js +99 -0
  24. package/dist/chunk-4LXCCZDM.js +1 -0
  25. package/dist/chunk-5DIGYJHD.js +1 -0
  26. package/dist/{chunk-U2RFKQVA.js → chunk-5H4SWQGM.js} +1 -1
  27. package/dist/{chunk-75UD5ZMP.js → chunk-6IOFNPR6.js} +3 -3
  28. package/dist/{chunk-YOZGW2RB.js → chunk-7FW2BQTV.js} +1 -1
  29. package/dist/{chunk-RV2FGSGH.js → chunk-ALTBTO3Z.js} +2 -2
  30. package/dist/chunk-ATMJ5ZPK.js +1 -0
  31. package/dist/{chunk-XJPKDTQN.js → chunk-BUO7XCYR.js} +12 -12
  32. package/dist/{chunk-JET2TKEQ.js → chunk-DOF56HTO.js} +5 -5
  33. package/dist/chunk-E6FDUFPH.js +1 -0
  34. package/dist/chunk-EH2BNSG3.js +13 -0
  35. package/dist/chunk-F3ZOO23R.js +1 -0
  36. package/dist/chunk-HNVSVTNC.js +16 -0
  37. package/dist/{chunk-E6LQY6TB.js → chunk-IHNOWRTP.js} +2 -2
  38. package/dist/{chunk-E5QPXEKN.js → chunk-JFBL4PR3.js} +1 -1
  39. package/dist/{chunk-O52BQ5DP.js → chunk-NZ7BFYCM.js} +1 -1
  40. package/dist/chunk-O3MBPAWZ.js +2 -0
  41. package/dist/{chunk-DBL7MFCB.js → chunk-PVDZG2U2.js} +4 -4
  42. package/dist/{chunk-G7BBSHDF.js → chunk-QRU55BUS.js} +1 -1
  43. package/dist/{chunk-5RQJRD2E.js → chunk-RSOBUPLK.js} +1 -1
  44. package/dist/{chunk-VCCGS6Q2.js → chunk-S5DYR75A.js} +8 -8
  45. package/dist/chunk-STKJA4PV.js +1 -0
  46. package/dist/{chunk-ZTV2BA3P.js → chunk-U6LKNGC6.js} +1 -1
  47. package/dist/chunk-UKBXQXDZ.js +1 -0
  48. package/dist/chunk-ULJQYXHB.js +1 -0
  49. package/dist/{chunk-I4DLYOPO.js → chunk-V2J2AHDW.js} +4 -4
  50. package/dist/{chunk-Z46MSUTP.js → chunk-WLYYC3AP.js} +1 -1
  51. package/dist/{chunk-OGU5JE52.js → chunk-WOAMPTZI.js} +6 -6
  52. package/dist/{chunk-GCZU4XFA.js → chunk-Z6GQFTLJ.js} +1 -1
  53. package/dist/data/DataTable.js +1 -1
  54. package/dist/data/EntityList.d.ts +125 -0
  55. package/dist/data/EntityList.js +2 -0
  56. package/dist/data/ResizableTable.d.ts +31 -0
  57. package/dist/data/ResizableTable.js +2 -0
  58. package/dist/data/useColumnConfig.d.ts +68 -0
  59. package/dist/data/useColumnConfig.js +2 -0
  60. package/dist/data/useSort.d.ts +55 -0
  61. package/dist/data/useSort.js +2 -0
  62. package/dist/data/useTableNav.d.ts +28 -0
  63. package/dist/data/useTableNav.js +2 -0
  64. package/dist/format/index.js +1 -1
  65. package/dist/forms/BorderInput.js +1 -1
  66. package/dist/forms/BrandAssetEditor.js +1 -1
  67. package/dist/forms/ColorPicker.js +1 -1
  68. package/dist/forms/CornersInput.js +1 -1
  69. package/dist/forms/InputNumber.js +1 -1
  70. package/dist/forms/LinkPicker.js +1 -1
  71. package/dist/forms/MediaLibrary.js +1 -1
  72. package/dist/forms/MediaUploadGrid.js +1 -1
  73. package/dist/forms/PositionInput.js +1 -1
  74. package/dist/forms/SidesInput.js +1 -1
  75. package/dist/forms/Slider.js +1 -1
  76. package/dist/forms/WidthsBar.js +1 -1
  77. package/dist/icons/efficient-glyphs.js +1 -1
  78. package/dist/icons/efficient-looks.js +1 -1
  79. package/dist/icons/efficient.js +1 -1
  80. package/dist/icons/looks/map.js +1 -1
  81. package/dist/icons/payment.js +1 -1
  82. package/dist/icons/sets.js +1 -1
  83. package/dist/index.d.ts +13 -317
  84. package/dist/index.js +667 -694
  85. package/dist/shell/LanguageSelect.js +1 -1
  86. package/dist/telemetry/index.js +1 -1
  87. package/dist/templates/DataTablePage.js +1 -1
  88. package/dist/ui/index.d.ts +6 -0
  89. package/dist/ui/index.js +1 -1
  90. package/dist/version.js +1 -1
  91. package/package.json +1 -1
  92. package/dist/Calculator-PM4TYWTE.js +0 -29
  93. package/dist/CurrencyConverter-4I2ENTSX.js +0 -21
  94. package/dist/Notepad-QIJN7VDZ.js +0 -24
  95. package/dist/Sidebar-7LN3ZEF4.js +0 -44
  96. package/dist/Spreadsheet-EKYP6XIX.js +0 -37
  97. package/dist/chunk-7IY47EKR.js +0 -1
  98. package/dist/chunk-CY5N5OA3.js +0 -2
  99. package/dist/chunk-I3XM2PSQ.js +0 -100
  100. package/dist/chunk-OFCHJWM2.js +0 -1
  101. /package/dist/{chunk-CSA6CGXS.js → chunk-RKLZDVAO.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -143,7 +143,14 @@ export { default as Pagination, PaginationProps } from './data/Pagination.js';
143
143
  export { default as DataTable, DataTableColumn, DataTableColumnGroup, DataTableHeader, DataTableProps, DataTableRowLink, DataTableRowProps } from './data/DataTable.js';
144
144
  export { default as ListFooter } from './data/ListFooter.js';
145
145
  export { default as ListLoadError, ListLoadErrorProps } from './data/ListLoadError.js';
146
- import { ColumnDef, SortState, PaginatedResponse } from './data/types.js';
146
+ import { PaginatedResponse } from './data/types.js';
147
+ export { ColumnDef, SortState } from './data/types.js';
148
+ export { default as EntityList, EntityListColumn, EntityListContextAction, EntityListProps } from './data/EntityList.js';
149
+ export { default as ResizableTable } from './data/ResizableTable.js';
150
+ export { default as useTableNav } from './data/useTableNav.js';
151
+ export { useColumnConfig } from './data/useColumnConfig.js';
152
+ export { SortableColumn, useSort } from './data/useSort.js';
153
+ export { ShellHttp, ShellHttpConfig, ShellHttpResponse, setShellApiClient } from './api/shellHttp.js';
147
154
  export { default as Sparkline } from './charts/Sparkline.js';
148
155
  export { BoxPlotBox, BoxPlotChartProps, Candle, CandlestickChartProps, ChartBackgroundVariant, ChartBrushProps, ChartCurve, ChartDotProps, ChartDotVariant, ChartFillVariant, ChartFrameProps, ChartLegendEntry, ChartLegendSwatch, ChartRange, ChartReferenceLine, ChartRevealDirection, ChartSkeletonProps, ChartStatusTone, ChartStrokeVariant, ChartTooltipProps, ChartTooltipRow, ChordChartProps, ColumnChartProps, ColumnSeries, FunnelChartProps, FunnelStage, HeatmapChartProps, HistogramBin, HistogramChartProps, MeterProps, PieChartProps, PieSegment, RadarAxis, RadarChartProps, RadarSeries, RadialBarChartProps, RadialBarRow, RangeChartProps, RangeRow, RankedBarsProps, RankedBarsRow, SankeyChartProps, SankeyLink, SankeyNode, ScatterChartProps, ScatterPoint, ScatterSeries, SparklineProps, StatTileProps, SunburstChartProps, SunburstNode, TimeSeriesChartProps, TimeSeriesSeries, TreemapChartProps, WaterfallChartProps, WaterfallStep } from './charts/types.js';
149
156
  export { default as DashboardTemplate } from './templates/DashboardTemplate.js';
@@ -217,10 +224,9 @@ export { VERSION } from './version.js';
217
224
  import { W as WindowRegistry, E as EditState } from './types-ClT92-8Z.js';
218
225
  export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-ClT92-8Z.js';
219
226
  import * as react from 'react';
220
- import react__default, { ReactNode, Component, ErrorInfo, Dispatch, SetStateAction, RefObject, useLayoutEffect } from 'react';
227
+ import { ReactNode, Component, ErrorInfo, useLayoutEffect } from 'react';
221
228
  import * as react_jsx_runtime from 'react/jsx-runtime';
222
229
  import * as _tanstack_query_core from '@tanstack/query-core';
223
- import { AxiosInstance } from 'axios';
224
230
  export { A as AnonymousClientTelemetryConfig, C as ClientTelemetry, a as ClientTelemetryConfig, S as SignedInClientTelemetryConfig, s as startClientTelemetry } from './client-DZeDEyG1.js';
225
231
  import './moveGrip-sB7jfCia.js';
226
232
  import 'web-vitals';
@@ -332,6 +338,9 @@ declare function CopyButton({ text }: {
332
338
  text: string;
333
339
  }): react_jsx_runtime.JSX.Element;
334
340
 
341
+ /** Hook to check if the current modal is active (frontmost) */
342
+ declare function useModalActive(): boolean;
343
+
335
344
  /**
336
345
  * What Cmd/Ctrl+Enter clicks when a window has no `<form>` to `requestSubmit()`.
337
346
  *
@@ -385,8 +394,6 @@ declare function useWindowTitle(_title: string): void;
385
394
  * form with a child dialog open reads as inactive.
386
395
  */
387
396
  declare function useEnclosingModalId(): string;
388
- /** Hook to check if the current modal is active (frontmost) */
389
- declare function useModalActive(): boolean;
390
397
  declare function ModalActions({ children, position, quiet }: {
391
398
  children: React.ReactNode;
392
399
  position?: 'left' | 'right';
@@ -1844,243 +1851,6 @@ interface ImageAnnotatorProps {
1844
1851
  }
1845
1852
  declare const ImageAnnotator: react.ForwardRefExoticComponent<ImageAnnotatorProps & react.RefAttributes<ImageAnnotatorHandle>>;
1846
1853
 
1847
- interface EntityListColumn {
1848
- key: string;
1849
- label: string;
1850
- /** The heading this column takes in a CSV export, when it should differ
1851
- * from what the grid shows. The export request carries a heading per
1852
- * column; a host whose interface is translated but whose exported files
1853
- * stay in one language for whoever opens them passes that language's
1854
- * heading here. Omitted, the export uses `label`. */
1855
- exportLabel?: string;
1856
- defaultWidth?: number;
1857
- minWidth?: number;
1858
- defaultHidden?: boolean;
1859
- sortField?: string;
1860
- headerNode?: ReactNode;
1861
- }
1862
- /** A page-supplied entry in the right-click bulk menu (e.g. invoice Post /
1863
- * Cancel). `onClick` receives the currently-selected rows. Set `divider` to
1864
- * render a separator above the item, `danger` for a destructive tint. */
1865
- interface EntityListContextAction<T = unknown> {
1866
- label: string;
1867
- onClick: (items: T[]) => void;
1868
- danger?: boolean;
1869
- disabled?: boolean;
1870
- divider?: boolean;
1871
- }
1872
- interface EntityListProps<T> {
1873
- items: T[];
1874
- isLoading: boolean;
1875
- emptyState: ReactNode;
1876
- totalCount?: number;
1877
- /** When true and no rows have loaded yet, render {@link ListLoadError}
1878
- * (with a retry) instead of `emptyState` — so a failed fetch reads as an
1879
- * error, not "nothing here". Wire `useInfiniteScroll`'s `isError`. A
1880
- * mid-scroll next-page failure (rows already loaded) keeps the list.
1881
- * Defaults to unset → behaviour unchanged for existing callers. */
1882
- isError?: boolean;
1883
- /** Retry handler for the error state — wire the data source's `refetch`.
1884
- * It also backs the row menu's Refresh item. */
1885
- onRetry?: () => void;
1886
- /** Heading for the error state, e.g. "Couldn't load candidates". Omit for
1887
- * {@link ListLoadError}'s generic "Couldn't load this list" — name the
1888
- * entity where the list has one, so an outage reads as *this* list failing. */
1889
- errorTitle?: string;
1890
- /** Explanatory line under {@link EntityListProps.errorTitle}. Omit for
1891
- * ListLoadError's generic connection/retry message. */
1892
- errorMessage?: string;
1893
- tableId: string;
1894
- columns: EntityListColumn[];
1895
- renderCell: (item: T, colKey: string) => ReactNode;
1896
- getRowId?: (item: T) => string | number;
1897
- sort?: {
1898
- field: string;
1899
- direction: 'asc' | 'desc';
1900
- };
1901
- onSort?: (field: string) => void;
1902
- /** The ticked row ids. The set is the caller's, and it may hold ids that are
1903
- * not among `items`: rows ticked before a search or a filter changed. The
1904
- * list keeps those. The header box, Ctrl/Cmd+A and Select all move only the
1905
- * rows on screen, the count says how many are not shown, and every row
1906
- * action — Copy rows, the export, `contextActions` — gets the ticked rows
1907
- * on screen. Clear selection, and a right-click on an unticked row, drop
1908
- * them. */
1909
- selected: Set<string | number>;
1910
- setSelected: Dispatch<SetStateAction<Set<string | number>>>;
1911
- onRowClick: (item: T) => void;
1912
- onRowHover?: (item: T) => void;
1913
- getRowClassName?: (item: T) => string;
1914
- footerLabel: string;
1915
- footerExtra?: ReactNode;
1916
- sentinelRef?: RefObject<any>;
1917
- isFetchingNextPage?: boolean;
1918
- /** Perm codenames that gate "Save as default for all users" in the column
1919
- * picker. Defaults to `['change_numberingconfig']` (admin-portal's proxy
1920
- * for admin access). Pass `[]` to hide the link entirely. */
1921
- saveDefaultPerms?: string[];
1922
- /** Right-click row menu. Every list has one, with nothing to wire: Open (the
1923
- * row right-clicked), Copy for text selected under the pointer, Copy
1924
- * `<first column>` and Copy rows (the ticked rows as a table of the visible
1925
- * columns in their on-screen order, which pastes into a spreadsheet as
1926
- * cells), Select all, Clear selection, and Refresh when `onRetry` is wired.
1927
- * Provide `exportEndpoint` (a list's `<base>/export_csv/` path, relative to
1928
- * the api base) to add "Export selected to CSV", which downloads just the
1929
- * ticked rows on screen (`?ids=`, honouring the visible/ordered columns),
1930
- * the same rows `contextActions` receives. Provide
1931
- * `contextActions` for domain actions (e.g. invoice Post / Cancel); they sit
1932
- * between the copy items and the selection items. */
1933
- exportEndpoint?: string;
1934
- exportFilename?: string;
1935
- contextActions?: (items: T[]) => EntityListContextAction<T>[];
1936
- }
1937
- /**
1938
- * The canonical pageless data grid for both portals. Wraps `<ResizableTable>`
1939
- * with selection-checkbox logic, keyboard navigation, the standardized list
1940
- * footer, an infinite-scroll sentinel hook-up, and a right-click row menu.
1941
- *
1942
- * Usage:
1943
- *
1944
- * const { sort, onSort } = useSort('mid', 'asc', 'suppliers');
1945
- * const { items, totalCount, isLoading, isFetchingNextPage, sentinelRef } =
1946
- * useInfiniteScroll<Supplier>({ queryKey: ['suppliers', filters],
1947
- * fetchFn: (p) => getSuppliers(p) });
1948
- *
1949
- * <EntityList
1950
- * items={items}
1951
- * totalCount={totalCount}
1952
- * isLoading={isLoading}
1953
- * sentinelRef={sentinelRef}
1954
- * isFetchingNextPage={isFetchingNextPage}
1955
- * tableId="suppliers"
1956
- * columns={SUPPLIER_COLUMNS}
1957
- * renderCell={(s, k) => …}
1958
- * sort={sort} onSort={onSort}
1959
- * selected={selected} setSelected={setSelected}
1960
- * onRowClick={(s) => openEntity('supplier', s.id, s, s.mid, '/suppliers')}
1961
- * exportEndpoint="/suppliers/export_csv/" exportFilename="Suppliers.csv"
1962
- * footerLabel="suppliers"
1963
- * emptyState={<EmptyState message="No suppliers yet." />}
1964
- * />
1965
- */
1966
- declare function EntityList<T>(props: EntityListProps<T>): react_jsx_runtime.JSX.Element;
1967
-
1968
- interface ResizableTableProps {
1969
- tableId: string;
1970
- columns: ColumnDef[];
1971
- sort?: SortState;
1972
- onSort?: (field: string) => void;
1973
- footer?: React.ReactNode;
1974
- afterBody?: React.ReactNode;
1975
- /** Permission codename(s) that gate the "Save as default for all users" link
1976
- * in the column picker. The shell's `useShellAuth().hasAnyPerm` is queried
1977
- * against this list. Defaults to a single placeholder permission; consumers
1978
- * with no admin gate can pass `[]` to hide the link entirely. */
1979
- saveDefaultPerms?: string[];
1980
- children: (orderedColumns: (ColumnDef & {
1981
- width: number;
1982
- })[]) => React.ReactNode;
1983
- }
1984
- /**
1985
- * Sticky-header, scrollable-body table primitive with:
1986
- * - drag-to-reorder columns (with a blue drop-indicator line)
1987
- * - resize columns by the right-edge handle
1988
- * - hide/show columns via a glass popover picker
1989
- * - admin-only "Save as default for all users" link in the picker
1990
- * - per-user persistence (via the shell-registered apiClient)
1991
- * - mobile-aware selection mode toggle
1992
- */
1993
- declare function ResizableTable({ tableId, columns, sort, onSort, footer, afterBody, saveDefaultPerms, children, }: ResizableTableProps): react_jsx_runtime.JSX.Element;
1994
-
1995
- /**
1996
- * Keyboard + shift-click navigation for table rows.
1997
- *
1998
- * - J/K or Arrow keys to move focus
1999
- * - Enter to open the focused row (calls `onSelect`)
2000
- * - Space to toggle the focused row's checkbox (calls `onToggle`)
2001
- * — neither while the keyboard focus is on a button or a link the user moved
2002
- * it to: there the key is that control's. One the focus was only left on by
2003
- * a mouse click gives both keys back to the row at the next J/K; see the
2004
- * key handler
2005
- * - Shift+J/K to extend selection while moving
2006
- * - Shift+click to range-select (calls `onSelectRange`, which must ADD the range
2007
- * rather than toggle it — the clicked checkbox is ticked on that assumption)
2008
- * - Cmd/Ctrl+A to select/deselect all (calls `onSelectAll`)
2009
- *
2010
- * Each list instance gates its document-level listeners on `useModalActive`
2011
- * so two open lists don't both react to the same shift-click.
2012
- *
2013
- * `container` is the element that holds this list's rows. Row indices repeat
2014
- * from one list to the next, so without it the row J/K scrolls into view is the
2015
- * first `data-row-idx` match in the document — with two lists open, a row of
2016
- * the one behind.
2017
- */
2018
- declare function useTableNav<T>(items: T[], onSelect: (item: T) => void, onToggle?: (item: T) => void, onSelectAll?: () => void, onSelectRange?: (from: number, to: number) => void, container?: RefObject<HTMLElement | null>): number;
2019
-
2020
- /**
2021
- * Resizable + reorderable + hideable column state for `<ResizableTable>`.
2022
- *
2023
- * Reads and persists per-user through the `<ShellPrefsProvider>` adapter
2024
- * (`prefs.columns_{tableId}`), with a 1-second debounce on the save, and reads
2025
- * per-viewport admin defaults through the shared
2026
- * `GET /auth/default-columns/{tableId}?viewport=…` probe.
2027
- *
2028
- * The prefs half used to be a raw `GET /auth/me/` fired from a `[tableId]`
2029
- * effect, outside react-query — so every list mount re-fetched the whole user
2030
- * profile (~1.5 MB on prod), on a client with no cache adapter and no in-flight
2031
- * dedupe, and a screen that also renders a column-aware CSV export paid for it
2032
- * twice. The adapter already holds that profile in one cached query, which is
2033
- * the same object the raw GET was reading `preferences` off (SG#00590).
2034
- *
2035
- * Three consequences worth knowing, because this is NOT behaviour-preserving:
2036
- *
2037
- * - **A `<ShellPrefsProvider>` is now required for server-side persistence.**
2038
- * Without one, `useShellPrefs()` reads empty and drops saves, so column
2039
- * config degrades to localStorage-only. All three consumers that render
2040
- * `<EntityList>`/`<ResizableTable>` mount the provider.
2041
- * - **Prefs and admin defaults resolve independently**, where the raw pair was
2042
- * a single `Promise.all`. If the admin default lands while prefs are still
2043
- * loading it applies first and the user's own config replaces it a beat
2044
- * later, rather than never showing. `useSort` has always behaved this way;
2045
- * the two hooks now agree. The precedence that used to be one `if/else if`
2046
- * is now the `userSavedRef` guard below plus the order the two effects fire
2047
- * in — `tests/columnConfigDefaultsPrecedence.test.tsx` pins both directions.
2048
- * - **A failed save is silent here.** The old `useMutation` let a rejected
2049
- * `PATCH` reach a consumer's global `MutationCache({ onError })` — the admin
2050
- * portal toasted it. The adapter's `save` owns its own failures now, so a
2051
- * consumer that wants that toast raises it inside the adapter.
2052
- *
2053
- * What it does NOT require is a `<QueryClientProvider>` — it used to, for the
2054
- * `useMutation`. `useDefaultColumnConfig` falls back to a client the package
2055
- * owns when no provider is mounted.
2056
- */
2057
- declare function useColumnConfig(tableId: string, defaultColumns: ColumnDef[]): {
2058
- orderedColumns: {
2059
- width: number;
2060
- key: string;
2061
- label: string;
2062
- defaultWidth?: number;
2063
- minWidth?: number;
2064
- defaultHidden?: boolean;
2065
- headerNode?: react__default.ReactNode;
2066
- sortField?: string;
2067
- }[];
2068
- allColumns: {
2069
- key: string;
2070
- label: string;
2071
- hidden: boolean;
2072
- }[];
2073
- onResizeStart: (idx: number, e: react__default.MouseEvent) => void;
2074
- onDragStart: (idx: number) => void;
2075
- onDragOver: (visIdx: number, e: react__default.DragEvent) => void;
2076
- onDrop: (_visIdx: number, e: react__default.DragEvent) => void;
2077
- onDragEnd: () => void;
2078
- toggleColumn: (key: string) => void;
2079
- resetColumns: () => void;
2080
- draggedIdx: number | null;
2081
- dropGap: number | null;
2082
- };
2083
-
2084
1854
  interface UseInfiniteScrollOptions<T> {
2085
1855
  /** queryKey segments — arbitrary cache shapes (filters often include booleans,
2086
1856
  * dates, undefined). Callers pass their natural filter shape. */
@@ -2111,58 +1881,6 @@ declare function useInfiniteScroll<T>({ queryKey, fetchFn, extraParams, pageSize
2111
1881
  refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<_tanstack_query_core.InfiniteData<PaginatedResponse<T>, unknown>, Error>>;
2112
1882
  };
2113
1883
 
2114
- /** The part of a column `useSort` reads — `ColumnDef` and `EntityList`'s own
2115
- * column both fit.
2116
- *
2117
- * Not `DataTable`: its columns nest inside groups and it offers a sort on
2118
- * `sortable`, not on `sortField ?? key`. `DataTableColumn` satisfies this
2119
- * interface structurally, so passing one typechecks and then drops sorts the
2120
- * table does offer. `DataTable` owns its own sort state through
2121
- * `onSortChange`. */
2122
- interface SortableColumn {
2123
- key: string;
2124
- sortField?: string;
2125
- }
2126
- /**
2127
- * Sort-state hook used by list pages. Returns:
2128
- * - `sort` — current `{ field, direction }`
2129
- * - `onSort(field)` — toggle direction if same field, else activate asc
2130
- * - `ordering` — DRF-style string (`'-mid'` for desc, `'mid'` for asc) ready
2131
- * to drop into a query-string param.
2132
- *
2133
- * Pass `tableId` (the same id the list gives `<ResizableTable>`/`<EntityList>`)
2134
- * to persist the user's choice alongside their column config. Restore order:
2135
- * per-user pref (`prefs.sort_{tableId}` via the ShellPrefs adapter) → the
2136
- * admin-saved default on `/auth/default-columns/{tableId}/` → the page's
2137
- * `defaultField`/`defaultDir`. localStorage mirrors the last-applied value so
2138
- * the first render (before async prefs arrive) already uses the last-known
2139
- * sort instead of flashing the default and refetching. Without `tableId` the
2140
- * hook is pure in-memory state, exactly as before.
2141
- *
2142
- * The admin default is read through `useDefaultColumnConfig`, shared with
2143
- * `useColumnConfig` so a list page fetches that row once rather than twice
2144
- * (SG#00590). That probe is a react-query query, but this hook still needs no
2145
- * `<QueryClientProvider>` in either form: with no provider above it the probe
2146
- * falls back to a client the package owns (see `useDefaultColumnConfig`), and
2147
- * the `tableId`-less form issues no request at all, as before.
2148
- *
2149
- * Pass `options.columns` (the same array the table gets) and a sort the
2150
- * columns do not offer is replaced by the page default in `sort` and
2151
- * `ordering` — a save on a column since given `sortField: ''`, or on a key
2152
- * whose column now sorts on another `sortField`. Without it that stale save
2153
- * goes out as `?ordering=` on every open; DRF drops a term it cannot order by,
2154
- * so the list comes back unsorted for good. Without `columns` — or while the
2155
- * array is still empty, which is a list page whose columns are not built yet
2156
- * rather than a table that offers no sort — nothing is checked, as before.
2157
- */
2158
- declare function useSort(defaultField: string, defaultDir?: 'asc' | 'desc', tableId?: string, options?: {
2159
- columns?: ReadonlyArray<SortableColumn>;
2160
- }): {
2161
- sort: SortState;
2162
- onSort: (field: string) => void;
2163
- ordering: string;
2164
- };
2165
-
2166
1884
  interface FilterOption {
2167
1885
  label: string;
2168
1886
  field: string;
@@ -2551,28 +2269,6 @@ declare function ShellEntityFetcherProvider({ value, children, }: {
2551
2269
  * misconfiguration surfaces synchronously rather than at click-time. */
2552
2270
  declare function useShellEntityFetcher(): EntityFetcher;
2553
2271
 
2554
- /**
2555
- * INTERNAL stub — bridges legacy `apiClient.get/patch('/auth/me/', ...)` calls
2556
- * inside the shell to the new <ShellPrefsProvider> contract. This keeps the
2557
- * package's copied source compiling without rewriting every call site at
2558
- * once; consumer-supplied prefs flow through `<ShellPrefsProvider>`.
2559
- *
2560
- * Outside calls (anything not hitting `/auth/me/`) need the consumer to mount
2561
- * <ShellEntityFetcherProvider> and wire `entityFetcher` on <WindowManager>.
2562
- *
2563
- * When `setShellApiClient` has not been called, HTTP methods resolve with an
2564
- * empty payload instead of throwing — so consumers without a backend (the
2565
- * Pages demo, for instance) can still mount the shell. A one-time console
2566
- * warning surfaces the missing wiring without crashing the app.
2567
- *
2568
- * Long-term this file is removed when each call site migrates to
2569
- * `useShellPrefs()` directly.
2570
- */
2571
-
2572
- /** Consumer registers their own axios instance — typically the same one
2573
- * they use elsewhere. The package only delegates HTTP to this. */
2574
- declare function setShellApiClient(instance: AxiosInstance): void;
2575
-
2576
2272
  /**
2577
2273
  * Shared task data model — used by the TodoList app, the Pomodoro widget,
2578
2274
  * and the Calendar app. Stored in `shellPrefs.todo_tasks` (a single array)
@@ -2936,4 +2632,4 @@ declare function useUndoable<T>(value: T, apply: (next: T) => void, opts: Undoab
2936
2632
  */
2937
2633
  declare function useUndoableState<T>(initial: T | (() => T), opts: UndoableOptions): [T, React.Dispatch<React.SetStateAction<T>>];
2938
2634
 
2939
- 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, EditState, type EntityFetcher, EntityList, type EntityListColumn, type EntityListContextAction, type EntityListProps, EntityWindowFallback, type EntityWindowFallbackProps, EntityWindowLoading, EntityWindowState, type EntityWindowStateProps, FilterBar, type FilterOption, type FpsGroup, type HealthCheckResult, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, LOG_CAP, Layout, type LayoutMode, type LayoutProps, type LogSummary, MIN_EVENT_SAMPLES, MIN_GROUP_SAMPLES, MODAL_SUBMIT_SELECTOR, type MenuLayer, type MergeBulkOptions, type MergeBulkResult, type MobileAppConfig, Modal, ModalActions, type ModalEdit, NotificationBell, type NotificationsConfig, type OpenPageOptions, 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, type ShellBranding, ShellContextMenu, type ShellContextMenuProps, ShellEntityFetcherProvider, type ShellNotification, ShortcutHelp, SortState, type SortableColumn, SoundsPanel, type StagedTarget, StartMenu, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TitleParts, type TitleRole, 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, activateWindowById, appendRecord as appendPerfRecord, applyDevTitle, beginWindowGesture, classifyActivity, classify as classifyPerf, commitExposeHighlight, copyToClipboard, createWindowRegistry, createWindowTarget, describeMachine, describePerfReport, exitExposeMode, findDuplicateKeys, getActiveWindowRoute, getExposeHighlight, getWindowPosition, installThemeIconSets, isDevEnv, isInteracting, layoutModeOf, markMenuOpen, mergeBulkItems, notificationRowParts, toCsv as perfLogToCsv, perfReportFile, readEnvironment as readPerfEnvironment, requestAsyncEnvironment, requestWindowFront, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, splitTitle, subscribeExposeHighlight, summariseFrames, summariseLog as summarisePerfLog, toggleExposeMode, useBrowserLayoutEffect, useColumnConfig, useCurrentTabKey, useDesktopHost, useEditHotkey, useEnclosingModalId, useFilters, useInfiniteScroll, useIsActiveWindow, useModalActive, useModalDuplicate, useModalSave, useNewHotkey, usePageSearch, useSetLayoutMode, useShellAuth, useShellEntityFetcher, useSort, useTableNav, useUndo, useUndoCanEdit, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTarget, useWindowTitle };
2635
+ 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, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, type CustomizationSection, DEV_BANNER_TEXT, Desktop, type DesktopContextMenuItem, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, type DuplicateGroup, EditState, type EntityFetcher, EntityWindowFallback, type EntityWindowFallbackProps, EntityWindowLoading, EntityWindowState, type EntityWindowStateProps, FilterBar, type FilterOption, type FpsGroup, type HealthCheckResult, ImageAnnotator, type ImageAnnotatorHandle, type ImageAnnotatorProps, LOG_CAP, Layout, type LayoutMode, type LayoutProps, type LogSummary, MIN_EVENT_SAMPLES, MIN_GROUP_SAMPLES, MODAL_SUBMIT_SELECTOR, type MenuLayer, type MergeBulkOptions, type MergeBulkResult, type MobileAppConfig, Modal, ModalActions, type ModalEdit, NotificationBell, type NotificationsConfig, type OpenPageOptions, PaginatedResponse, PdfActionButton, type PdfActionButtonProps, type PerfEnvironment, type PerfLogRecord, type PerfReading, type PerfReport, PerfStats, type PerfStatsProps, type PlatformHints, SMOOTH_FPS, SearchConfig, ServerStatusIndicator, type ServerStatusIndicatorProps, type ServerStatusUser, type ShellAuth, ShellAuthProvider, type ShellBranding, ShellContextMenu, type ShellContextMenuProps, ShellEntityFetcherProvider, type ShellNotification, ShortcutHelp, SoundsPanel, type StagedTarget, StartMenu, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TitleParts, type TitleRole, 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, activateWindowById, appendRecord as appendPerfRecord, applyDevTitle, beginWindowGesture, classifyActivity, classify as classifyPerf, commitExposeHighlight, copyToClipboard, createWindowRegistry, createWindowTarget, describeMachine, describePerfReport, exitExposeMode, findDuplicateKeys, getActiveWindowRoute, getExposeHighlight, getWindowPosition, installThemeIconSets, isDevEnv, isInteracting, layoutModeOf, markMenuOpen, mergeBulkItems, notificationRowParts, toCsv as perfLogToCsv, perfReportFile, readEnvironment as readPerfEnvironment, requestAsyncEnvironment, requestWindowFront, setExposeHighlight, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, splitTitle, subscribeExposeHighlight, summariseFrames, summariseLog as summarisePerfLog, toggleExposeMode, useBrowserLayoutEffect, useCurrentTabKey, useDesktopHost, useEditHotkey, useEnclosingModalId, useFilters, useInfiniteScroll, useIsActiveWindow, useModalActive, useModalDuplicate, useModalSave, useNewHotkey, usePageSearch, useSetLayoutMode, useShellAuth, useShellEntityFetcher, useUndo, useUndoCanEdit, useUndoable, useUndoableState, useWidgetSettings, useWindowDirty, useWindowManager, useWindowMenuItem, useWindowTarget, useWindowTitle };