grist-widget-sdk 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/advanced.d.cts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/emulator/devtools.d.cts +2 -2
- package/dist/emulator/devtools.d.ts +2 -2
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
package/dist/advanced.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as GristTerminationReason, i as GristGeneration, p as GristMappingSource, U as UseGristCoreOptions, E as GristWidgetSnapshot, I as GristWidgetStatus, b as GristCapabilities, D as GristUserActionTuple, G as GristAccessToken, f as GristColumnarTable } from './use-grist-widget-options-from-context-qpFMdoBJ.cjs';
|
|
2
2
|
export { a as GristAuthz, d as GristColumnInfo, g as GristConfig, h as GristCurrentTableState, j as GristLifecycle, k as GristLifecyclePhase, l as GristLink, m as GristLinkState, n as GristMappingComplete, o as GristMappingIncomplete, q as GristMappingState, z as GristStreamFreshness, A as GristSync, L as ListColumnsOptions, J as ListTablesOptions, O as UseGristWidgetOptionsFromContextConfig, P as UseGristWidgetOptionsFromContextResult, aq as useGristWidgetOptionsFromContext } from './use-grist-widget-options-from-context-qpFMdoBJ.cjs';
|
|
3
3
|
import { o as GristRequiredAccess, b as GristColumnsToMap, w as GristWidgetColumnMap, i as GristReadyOptions, d as GristDocApi, G as GristApplyUserActionsOptions, q as GristTableNewRecord, r as GristTableOpOptions, h as GristMinimalRecord, t as GristTableUpdateRecord, v as GristTableUpsertRecord, u as GristTableUpsertOptions, p as GristRowRecord, f as GristFetchSelectedOptions } from './types-Fb2wplkv.cjs';
|
|
4
|
-
import * as
|
|
4
|
+
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
@@ -566,7 +566,7 @@ type GristHandshakeProviderProps = {
|
|
|
566
566
|
* captured at that time. To re-create the manager with new options, unmount
|
|
567
567
|
* and re-mount the provider (e.g. via a `key`).
|
|
568
568
|
*/
|
|
569
|
-
declare function GristHandshakeProvider({ options, children }: GristHandshakeProviderProps):
|
|
569
|
+
declare function GristHandshakeProvider({ options, children }: GristHandshakeProviderProps): react.JSX.Element;
|
|
570
570
|
/**
|
|
571
571
|
* Read the handshake context. Throws if no `<GristHandshakeProvider>` is
|
|
572
572
|
* mounted in the tree.
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as GristTerminationReason, i as GristGeneration, p as GristMappingSource, U as UseGristCoreOptions, E as GristWidgetSnapshot, I as GristWidgetStatus, b as GristCapabilities, D as GristUserActionTuple, G as GristAccessToken, f as GristColumnarTable } from './use-grist-widget-options-from-context-BFhQBGRY.js';
|
|
2
2
|
export { a as GristAuthz, d as GristColumnInfo, g as GristConfig, h as GristCurrentTableState, j as GristLifecycle, k as GristLifecyclePhase, l as GristLink, m as GristLinkState, n as GristMappingComplete, o as GristMappingIncomplete, q as GristMappingState, z as GristStreamFreshness, A as GristSync, L as ListColumnsOptions, J as ListTablesOptions, O as UseGristWidgetOptionsFromContextConfig, P as UseGristWidgetOptionsFromContextResult, aq as useGristWidgetOptionsFromContext } from './use-grist-widget-options-from-context-BFhQBGRY.js';
|
|
3
3
|
import { o as GristRequiredAccess, b as GristColumnsToMap, w as GristWidgetColumnMap, i as GristReadyOptions, d as GristDocApi, G as GristApplyUserActionsOptions, q as GristTableNewRecord, r as GristTableOpOptions, h as GristMinimalRecord, t as GristTableUpdateRecord, v as GristTableUpsertRecord, u as GristTableUpsertOptions, p as GristRowRecord, f as GristFetchSelectedOptions } from './types-Fb2wplkv.js';
|
|
4
|
-
import * as
|
|
4
|
+
import * as react from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
|
@@ -566,7 +566,7 @@ type GristHandshakeProviderProps = {
|
|
|
566
566
|
* captured at that time. To re-create the manager with new options, unmount
|
|
567
567
|
* and re-mount the provider (e.g. via a `key`).
|
|
568
568
|
*/
|
|
569
|
-
declare function GristHandshakeProvider({ options, children }: GristHandshakeProviderProps):
|
|
569
|
+
declare function GristHandshakeProvider({ options, children }: GristHandshakeProviderProps): react.JSX.Element;
|
|
570
570
|
/**
|
|
571
571
|
* Read the handshake context. Throws if no `<GristHandshakeProvider>` is
|
|
572
572
|
* mounted in the tree.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { G as GristEmulator } from '../create-grist-emulator-DBS6gmiI.cjs';
|
|
3
3
|
import { p as GristRowRecord, n as GristReplicaTable, k as GristReplicaDocument, j as GristReplicaColumn } from '../types-Fb2wplkv.cjs';
|
|
4
4
|
import { b as EmulatorDocumentState, c as EmulatorEvent } from '../inline-CRwQQ-GW.cjs';
|
|
@@ -10,7 +10,7 @@ type EmulatorInspectorProps = {
|
|
|
10
10
|
/** Default `true`. Set to `false` to render only the toolbar. */
|
|
11
11
|
showTimeline?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare function EmulatorInspector({ emulator, className, showTimeline }: EmulatorInspectorProps):
|
|
13
|
+
declare function EmulatorInspector({ emulator, className, showTimeline }: EmulatorInspectorProps): react.JSX.Element;
|
|
14
14
|
|
|
15
15
|
type UseEmulatorRowsResult<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
16
16
|
rows: GristRowRecord<T>[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
2
|
import { G as GristEmulator } from '../create-grist-emulator-C_0I4wax.js';
|
|
3
3
|
import { p as GristRowRecord, n as GristReplicaTable, k as GristReplicaDocument, j as GristReplicaColumn } from '../types-Fb2wplkv.js';
|
|
4
4
|
import { b as EmulatorDocumentState, c as EmulatorEvent } from '../inline-QitZwXKP.js';
|
|
@@ -10,7 +10,7 @@ type EmulatorInspectorProps = {
|
|
|
10
10
|
/** Default `true`. Set to `false` to render only the toolbar. */
|
|
11
11
|
showTimeline?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare function EmulatorInspector({ emulator, className, showTimeline }: EmulatorInspectorProps):
|
|
13
|
+
declare function EmulatorInspector({ emulator, className, showTimeline }: EmulatorInspectorProps): react.JSX.Element;
|
|
14
14
|
|
|
15
15
|
type UseEmulatorRowsResult<T extends Record<string, unknown> = Record<string, unknown>> = {
|
|
16
16
|
rows: GristRowRecord<T>[];
|
package/dist/index.d.cts
CHANGED
|
@@ -2,7 +2,7 @@ import { d as GristDocApi, g as GristFormulaKind, j as GristReplicaColumn, k as
|
|
|
2
2
|
export { a as GristColumnToMap, h as GristMinimalRecord, m as GristReplicaSelection, q as GristTableNewRecord, r as GristTableOpOptions, t as GristTableUpdateRecord, u as GristTableUpsertOptions, v as GristTableUpsertRecord, x as GristWidgetConfiguration, z as GristWidgetLinkingInfo } from './types-Fb2wplkv.cjs';
|
|
3
3
|
import { E as GristWidgetSnapshot, H as GristWidgetStatus, D as GristUserActionTuple, N as UseGristCoreResult, U as UseGristCoreOptions, b as GristCapabilities, f as GristColumnarTable, F as FetchGristTableRowsOptions, S as SafeParseGristTableDataOptions, s as GristSafeParseCellResult, J as ListTablesOptions, L as ListColumnsOptions, d as GristColumnInfo, G as GristAccessToken, r as GristNoiseColumnsOptions } from './use-grist-widget-options-from-context-qpFMdoBJ.cjs';
|
|
4
4
|
export { c as GristCellValue, e as GristColumnLike, t as GristSafeParseIssue, u as GristSafeParseIssueCode, v as GristSafeRefListValue, w as GristSafeRefValue, x as GristSafeTableCellIssue, y as GristSafeTableCellMeta, B as GristTableRowsOrder, K as SafeParseGristTableDataResult, M as SafeParseGristValuesOptions, O as UseGristWidgetOptionsFromContextConfig, P as UseGristWidgetOptionsFromContextResult, Q as computeRowCount, R as decodeColumnarToReplicaRows, T as fetchGristRow, V as fetchGristTableRows, W as fetchWithGristAuth, X as findRowIndexById, Y as getGristAccessToken, Z as gristAddColumnAction, _ as gristAddRecordAction, $ as gristAddTableAction, a0 as gristAddVisibleColumnAction, a1 as gristBulkAddRecordAction, a2 as gristBulkRemoveRecordAction, a3 as gristBulkUpdateRecordAction, a4 as gristCellValueSchema, a5 as gristDuplicateTableAction, a6 as gristModifyColumnAction, a7 as gristRemoveColumnAction, a8 as gristRemoveRecordAction, a9 as gristRemoveTableAction, aa as gristRenameColumnAction, ab as gristRenameTableAction, ac as gristReplaceTableDataAction, ad as gristSafeRefListValueSchema, ae as gristSafeRefValueSchema, af as gristSetDocumentInfoAction, ag as gristUpdateRecordAction, ah as inferDisplayHelpersByRef, ai as isGristNoiseColumn, aj as materializeGristRowsFromColumnar, ak as rowAtIndex, al as safeParseGristTableData, am as safeParseGristValues, an as safeParseRowsToDisplayRows, ao as sortRowsByGristOrder, ap as tableDataToRows, aq as useGristWidgetOptionsFromContext } from './use-grist-widget-options-from-context-qpFMdoBJ.cjs';
|
|
5
|
-
import * as
|
|
5
|
+
import * as react from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
@@ -661,7 +661,7 @@ type GristWidgetProviderProps = {
|
|
|
661
661
|
* tree underneath it so `useRpcHeartbeatCoalesce()` in slice hooks sees the manager
|
|
662
662
|
* (ordering required — see `tests/sdk/handshake-rpc-coalesce.test.tsx`).
|
|
663
663
|
*/
|
|
664
|
-
declare function GristWidgetProvider({ options, children }: GristWidgetProviderProps):
|
|
664
|
+
declare function GristWidgetProvider({ options, children }: GristWidgetProviderProps): react.JSX.Element;
|
|
665
665
|
/**
|
|
666
666
|
* Access the full `UseGristResult` from inside a `<GristWidgetProvider>`.
|
|
667
667
|
*
|
|
@@ -744,7 +744,7 @@ type GristBoundaryScreenProps = {
|
|
|
744
744
|
retryBusyLabel?: string;
|
|
745
745
|
};
|
|
746
746
|
/** Centered full-viewport chrome for booting / unavailable / error states. */
|
|
747
|
-
declare function GristBoundaryScreen({ title, message, tone, showRetry, actions, retryLabel, retryBusyLabel, }: GristBoundaryScreenProps):
|
|
747
|
+
declare function GristBoundaryScreen({ title, message, tone, showRetry, actions, retryLabel, retryBusyLabel, }: GristBoundaryScreenProps): react.JSX.Element;
|
|
748
748
|
/**
|
|
749
749
|
* Standardised loading / unavailable / error chrome for a Grist widget.
|
|
750
750
|
*
|
|
@@ -756,7 +756,7 @@ declare function GristBoundaryScreen({ title, message, tone, showRetry, actions,
|
|
|
756
756
|
* </GristWidgetProvider>
|
|
757
757
|
* ```
|
|
758
758
|
*/
|
|
759
|
-
declare function GristBoundary({ widget, gate, bootingFallback, preparingFallback, unavailableFallback, errorFallback, unavailableGraceMs, children, }: GristBoundaryProps):
|
|
759
|
+
declare function GristBoundary({ widget, gate, bootingFallback, preparingFallback, unavailableFallback, errorFallback, unavailableGraceMs, children, }: GristBoundaryProps): react.JSX.Element;
|
|
760
760
|
|
|
761
761
|
type ColumnExcludeContext = {
|
|
762
762
|
tableId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { d as GristDocApi, g as GristFormulaKind, j as GristReplicaColumn, k as
|
|
|
2
2
|
export { a as GristColumnToMap, h as GristMinimalRecord, m as GristReplicaSelection, q as GristTableNewRecord, r as GristTableOpOptions, t as GristTableUpdateRecord, u as GristTableUpsertOptions, v as GristTableUpsertRecord, x as GristWidgetConfiguration, z as GristWidgetLinkingInfo } from './types-Fb2wplkv.js';
|
|
3
3
|
import { E as GristWidgetSnapshot, H as GristWidgetStatus, D as GristUserActionTuple, N as UseGristCoreResult, U as UseGristCoreOptions, b as GristCapabilities, f as GristColumnarTable, F as FetchGristTableRowsOptions, S as SafeParseGristTableDataOptions, s as GristSafeParseCellResult, J as ListTablesOptions, L as ListColumnsOptions, d as GristColumnInfo, G as GristAccessToken, r as GristNoiseColumnsOptions } from './use-grist-widget-options-from-context-BFhQBGRY.js';
|
|
4
4
|
export { c as GristCellValue, e as GristColumnLike, t as GristSafeParseIssue, u as GristSafeParseIssueCode, v as GristSafeRefListValue, w as GristSafeRefValue, x as GristSafeTableCellIssue, y as GristSafeTableCellMeta, B as GristTableRowsOrder, K as SafeParseGristTableDataResult, M as SafeParseGristValuesOptions, O as UseGristWidgetOptionsFromContextConfig, P as UseGristWidgetOptionsFromContextResult, Q as computeRowCount, R as decodeColumnarToReplicaRows, T as fetchGristRow, V as fetchGristTableRows, W as fetchWithGristAuth, X as findRowIndexById, Y as getGristAccessToken, Z as gristAddColumnAction, _ as gristAddRecordAction, $ as gristAddTableAction, a0 as gristAddVisibleColumnAction, a1 as gristBulkAddRecordAction, a2 as gristBulkRemoveRecordAction, a3 as gristBulkUpdateRecordAction, a4 as gristCellValueSchema, a5 as gristDuplicateTableAction, a6 as gristModifyColumnAction, a7 as gristRemoveColumnAction, a8 as gristRemoveRecordAction, a9 as gristRemoveTableAction, aa as gristRenameColumnAction, ab as gristRenameTableAction, ac as gristReplaceTableDataAction, ad as gristSafeRefListValueSchema, ae as gristSafeRefValueSchema, af as gristSetDocumentInfoAction, ag as gristUpdateRecordAction, ah as inferDisplayHelpersByRef, ai as isGristNoiseColumn, aj as materializeGristRowsFromColumnar, ak as rowAtIndex, al as safeParseGristTableData, am as safeParseGristValues, an as safeParseRowsToDisplayRows, ao as sortRowsByGristOrder, ap as tableDataToRows, aq as useGristWidgetOptionsFromContext } from './use-grist-widget-options-from-context-BFhQBGRY.js';
|
|
5
|
-
import * as
|
|
5
|
+
import * as react from 'react';
|
|
6
6
|
import { ReactNode } from 'react';
|
|
7
7
|
import 'zod';
|
|
8
8
|
|
|
@@ -661,7 +661,7 @@ type GristWidgetProviderProps = {
|
|
|
661
661
|
* tree underneath it so `useRpcHeartbeatCoalesce()` in slice hooks sees the manager
|
|
662
662
|
* (ordering required — see `tests/sdk/handshake-rpc-coalesce.test.tsx`).
|
|
663
663
|
*/
|
|
664
|
-
declare function GristWidgetProvider({ options, children }: GristWidgetProviderProps):
|
|
664
|
+
declare function GristWidgetProvider({ options, children }: GristWidgetProviderProps): react.JSX.Element;
|
|
665
665
|
/**
|
|
666
666
|
* Access the full `UseGristResult` from inside a `<GristWidgetProvider>`.
|
|
667
667
|
*
|
|
@@ -744,7 +744,7 @@ type GristBoundaryScreenProps = {
|
|
|
744
744
|
retryBusyLabel?: string;
|
|
745
745
|
};
|
|
746
746
|
/** Centered full-viewport chrome for booting / unavailable / error states. */
|
|
747
|
-
declare function GristBoundaryScreen({ title, message, tone, showRetry, actions, retryLabel, retryBusyLabel, }: GristBoundaryScreenProps):
|
|
747
|
+
declare function GristBoundaryScreen({ title, message, tone, showRetry, actions, retryLabel, retryBusyLabel, }: GristBoundaryScreenProps): react.JSX.Element;
|
|
748
748
|
/**
|
|
749
749
|
* Standardised loading / unavailable / error chrome for a Grist widget.
|
|
750
750
|
*
|
|
@@ -756,7 +756,7 @@ declare function GristBoundaryScreen({ title, message, tone, showRetry, actions,
|
|
|
756
756
|
* </GristWidgetProvider>
|
|
757
757
|
* ```
|
|
758
758
|
*/
|
|
759
|
-
declare function GristBoundary({ widget, gate, bootingFallback, preparingFallback, unavailableFallback, errorFallback, unavailableGraceMs, children, }: GristBoundaryProps):
|
|
759
|
+
declare function GristBoundary({ widget, gate, bootingFallback, preparingFallback, unavailableFallback, errorFallback, unavailableGraceMs, children, }: GristBoundaryProps): react.JSX.Element;
|
|
760
760
|
|
|
761
761
|
type ColumnExcludeContext = {
|
|
762
762
|
tableId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grist-widget-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
4
4
|
"description": "React hooks and helpers for Grist custom widgets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -106,13 +106,13 @@
|
|
|
106
106
|
"@testing-library/jest-dom": "^6",
|
|
107
107
|
"@testing-library/react": "^16.3.2",
|
|
108
108
|
"@types/node": "^24.12.0",
|
|
109
|
-
"@types/react": "^19.2.
|
|
110
|
-
"@types/react-dom": "^19.2.
|
|
109
|
+
"@types/react": "^19.2.18",
|
|
110
|
+
"@types/react-dom": "^19.2.4",
|
|
111
111
|
"@vitejs/plugin-react": "^6.0.1",
|
|
112
112
|
"@vitest/coverage-v8": "^4.1.10",
|
|
113
113
|
"eslint": "^9.39.4",
|
|
114
114
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
115
|
-
"fast-check": "^4.
|
|
115
|
+
"fast-check": "^4.9.0",
|
|
116
116
|
"globals": "^16.5.0",
|
|
117
117
|
"grist-plugin-api": "^0.0.1",
|
|
118
118
|
"jsdom": "^29.0.2",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"typescript": "^5.9.3",
|
|
121
121
|
"typescript-eslint": "^8.59.3",
|
|
122
122
|
"vite": "^8.0.9",
|
|
123
|
-
"vitest": "^4.1.
|
|
123
|
+
"vitest": "^4.1.10"
|
|
124
124
|
},
|
|
125
125
|
"dependencies": {
|
|
126
126
|
"grain-rpc": "^0.1.7",
|