grist-widget-sdk 0.3.14 → 0.3.16
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 +12 -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.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +16 -16
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/dist/index.js
CHANGED
|
@@ -351,7 +351,8 @@ async function uploadGristAttachment(docApi, file, options) {
|
|
|
351
351
|
if (/failed to fetch/i.test(msg)) {
|
|
352
352
|
const widgetOrigin = typeof globalThis.location !== "undefined" ? globalThis.location.origin : "this widget origin";
|
|
353
353
|
throw new Error(
|
|
354
|
-
`Attachment upload was blocked by the Grist host (CORS). The browser could not POST from ${widgetOrigin} to the document API. If upload worked from a dev URL (e.g. ngrok) but fails after deploy, add the new widget URL to your Grist server CORS allowlist (see grist-core#2040)
|
|
354
|
+
`Attachment upload was blocked by the Grist host (CORS). The browser could not POST from ${widgetOrigin} to the document API. If upload worked from a dev URL (e.g. ngrok) but fails after deploy, add the new widget URL to your Grist server CORS allowlist (see grist-core#2040).`,
|
|
355
|
+
{ cause: err }
|
|
355
356
|
);
|
|
356
357
|
}
|
|
357
358
|
throw err;
|