@gridsheet/react-core 3.3.0 → 3.4.1

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.
@@ -0,0 +1,14 @@
1
+ export type AsyncProgressHandle = {
2
+ setProgress: (ratio: number) => void;
3
+ };
4
+ /**
5
+ * Determinate progress overlay for a chunked async mutation (large fill/paste). Its progress
6
+ * is driven IMPERATIVELY (via the ref) so that a progress tick re-renders only this small
7
+ * component — not the whole grid. Routing progress through the store instead made every tick
8
+ * re-render the (expensive, at deep scroll) grid, so a million-cell fill spent most of its
9
+ * time re-rendering. The visuals come from the shared ProgressOverlay.
10
+ */
11
+ export declare const AsyncProgressOverlay: import('react').ForwardRefExoticComponent<{
12
+ label: string;
13
+ } & import('react').RefAttributes<AsyncProgressHandle>>;
14
+ //# sourceMappingURL=AsyncProgressOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsyncProgressOverlay.d.ts","sourceRoot":"","sources":["../../src/components/AsyncProgressOverlay.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB;WAA4C,MAAM;uDAIjF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CellStateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CellStateOverlay.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,UAAU,CAAC;AAwBnE,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAmEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CAyRtC,CAAC"}
1
+ {"version":3,"file":"CellStateOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CellStateOverlay.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,UAAU,CAAC;AAwBnE,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAmEF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CA+RtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ColumnMenu.d.ts","sourceRoot":"","sources":["../../src/components/ColumnMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAqC,MAAM,OAAO,CAAC;AAWnE,OAAO,2BAA2B,CAAC;AACnC,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAElC,eAAO,MAAM,UAAU,EAAE,EA0GxB,CAAC"}
1
+ {"version":3,"file":"ColumnMenu.d.ts","sourceRoot":"","sources":["../../src/components/ColumnMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAqC,MAAM,OAAO,CAAC;AAWnE,OAAO,2BAA2B,CAAC;AACnC,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAElC,eAAO,MAAM,UAAU,EAAE,EA4ExB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/ContextMenu.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,WAAW,0BAgEvB,CAAC"}
1
+ {"version":3,"file":"ContextMenu.d.ts","sourceRoot":"","sources":["../../src/components/ContextMenu.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,WAAW,0BAmCvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/components/Editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA0ChC,OAAO,EAA4C,QAAQ,EAAE,MAAM,UAAU,CAAC;AAK9E,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,KAAK,CAutB5B,CAAC;AA2BF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,gBAgEvC,CAAC"}
1
+ {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/components/Editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA6ChC,OAAO,EAA4C,QAAQ,EAAE,MAAM,UAAU,CAAC;AAK9E,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,KAAK,CA+vB5B,CAAC;AA2BF,eAAO,MAAM,WAAW,GAAI,MAAM,MAAM,gBAgEvC,CAAC"}
@@ -3,5 +3,5 @@ export declare const createSheetRef: () => import('react').RefObject<SheetHandle
3
3
  export declare const useSheetRef: () => import('react').MutableRefObject<SheetHandle | null>;
4
4
  export declare const createStoreRef: () => import('react').RefObject<StoreHandle | null>;
5
5
  export declare const useStoreRef: () => import('react').MutableRefObject<StoreHandle | null>;
6
- export declare function GridSheet({ initialCells, sheetName, sheetRef: initialSheetRef, storeRef: initialStoreRef, options, className, style, book: initialBook, }: Props): JSX.Element;
6
+ export declare function GridSheet({ initialCells, sheetName, sheetRef: initialSheetRef, storeRef: initialStoreRef, options, className, style, book: initialBook, loading: loadingProp, }: Props): JSX.Element;
7
7
  //# sourceMappingURL=GridSheet.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../src/components/GridSheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmC,WAAW,EAAE,WAAW,EAAe,KAAK,EAAa,MAAM,UAAU,CAAC;AA+BzH,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAElE,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,SAAc,EACd,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,EACzB,OAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EAAE,WAAW,GAClB,EAAE,KAAK,eAoSP"}
1
+ {"version":3,"file":"GridSheet.d.ts","sourceRoot":"","sources":["../../src/components/GridSheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmC,WAAW,EAAE,WAAW,EAAe,KAAK,EAAa,MAAM,UAAU,CAAC;AAiCzH,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAClE,eAAO,MAAM,cAAc,qDAAwC,CAAC;AACpE,eAAO,MAAM,WAAW,4DAAyC,CAAC;AAElE,wBAAgB,SAAS,CAAC,EACxB,YAAY,EACZ,SAAc,EACd,QAAQ,EAAE,eAAe,EACzB,QAAQ,EAAE,eAAe,EACzB,OAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,WAAW,GACrB,EAAE,KAAK,eAgXP"}
@@ -0,0 +1,28 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { MenuContext } from '../lib/menu';
3
+ export type MenuNode = {
4
+ type?: 'item' | 'divider' | 'component' | 'submenu';
5
+ id?: string;
6
+ componentId?: string;
7
+ label?: string | ((ctx: MenuContext, ...args: any[]) => string);
8
+ shortcuts?: string[] | ((ctx: MenuContext, ...args: any[]) => string[]);
9
+ visible?: (ctx: MenuContext, ...args: any[]) => boolean;
10
+ disabled?: (ctx: MenuContext, ...args: any[]) => boolean;
11
+ checked?: (ctx: MenuContext, ...args: any[]) => boolean;
12
+ onClick?: (ctx: MenuContext, ...args: any[]) => void | Promise<void>;
13
+ children?: MenuNode[];
14
+ };
15
+ type MenuNodesProps = {
16
+ items: MenuNode[];
17
+ ctx: MenuContext;
18
+ /** Trailing coordinate args passed after ctx to every callback: [] | [x] | [y]. */
19
+ args: number[];
20
+ /** Called after a leaf item is chosen, to close the whole menu. */
21
+ onSelect: () => void;
22
+ /** Renders a `type: 'component'` descriptor (e.g. the column menu's sort/filter sections). */
23
+ renderComponent?: (componentId: string, key: number) => ReactNode;
24
+ };
25
+ /** Renders a list of menu descriptors (with nested submenu support) as `<li>` rows. */
26
+ export declare const MenuNodes: FC<MenuNodesProps>;
27
+ export {};
28
+ //# sourceMappingURL=MenuNodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuNodes.d.ts","sourceRoot":"","sources":["../../src/components/MenuNodes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAqC,MAAM,OAAO,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAO/C,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;IACpD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,CAAC,CAAC;IAChE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,MAAM,EAAE,CAAC,CAAC;IACxE,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;IACxD,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;IACzD,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;IACxD,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,GAAG,EAAE,WAAW,CAAC;IACjB,mFAAmF;IACnF,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mEAAmE;IACnE,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,SAAS,CAAC;CACnE,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAuDxC,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ export type ProgressOverlayProps = {
3
+ /** 0..1 for a determinate bar; null/undefined for an indeterminate spinner. */
4
+ progress?: number | null;
5
+ /** Text shown before the percentage (e.g. "Loading", "Saving", "Pasting"). */
6
+ label?: string;
7
+ };
8
+ /**
9
+ * Shared progress overlay: a centered card with a spinner + label, plus a determinate bar
10
+ * when `progress` is given. One component for initial loading, save, and chunked async
11
+ * mutations so every progress indicator looks and behaves the same. It spans its (positioned)
12
+ * container to capture pointer events — blocking interaction while work runs — but does NOT
13
+ * dim, so the grid stays visible behind it. Drive it with a prop for cheap/occasional updates
14
+ * (load/save); for a high-frequency mutation tick use AsyncProgressOverlay's imperative handle
15
+ * so a tick re-renders only the overlay, not the grid.
16
+ */
17
+ export declare const ProgressOverlay: FC<ProgressOverlayProps>;
18
+ //# sourceMappingURL=ProgressOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProgressOverlay.d.ts","sourceRoot":"","sources":["../../src/components/ProgressOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,MAAM,oBAAoB,GAAG;IACjC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAkBpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RowMenu.d.ts","sourceRoot":"","sources":["../../src/components/RowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AA8C5C,eAAO,MAAM,OAAO,EAAE,EAmCrB,CAAC"}
1
+ {"version":3,"file":"RowMenu.d.ts","sourceRoot":"","sources":["../../src/components/RowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAc,MAAM,OAAO,CAAC;AAQ5C,eAAO,MAAM,OAAO,EAAE,EAmCrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tabular.d.ts","sourceRoot":"","sources":["../../src/components/Tabular.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,OAAO,0BAyRnB,CAAC"}
1
+ {"version":3,"file":"Tabular.d.ts","sourceRoot":"","sources":["../../src/components/Tabular.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,OAAO,0BA2RnB,CAAC"}