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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# grist-widget-sdk
|
|
2
2
|
|
|
3
|
+
## 0.3.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 91c1ca6: Refresh dependencies: `zod` 4.6 at runtime; dev tooling moves to vite 8, @vitejs/plugin-react 6, eslint 10, jsdom 30 and @testing-library/jest-dom 7. The "attachment upload was blocked by the Grist host (CORS)" error now carries the original fetch failure as `error.cause`.
|
|
8
|
+
|
|
9
|
+
## 0.3.15
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 80b2ed1: Routine dependency updates via Dependabot (PR #141). See the PR diff for the exact version bumps.
|
|
14
|
+
|
|
3
15
|
## 0.3.14
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
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.cjs
CHANGED
|
@@ -542,7 +542,8 @@ async function uploadGristAttachment(docApi, file, options) {
|
|
|
542
542
|
if (/failed to fetch/i.test(msg)) {
|
|
543
543
|
const widgetOrigin = typeof globalThis.location !== "undefined" ? globalThis.location.origin : "this widget origin";
|
|
544
544
|
throw new Error(
|
|
545
|
-
`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)
|
|
545
|
+
`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).`,
|
|
546
|
+
{ cause: err }
|
|
546
547
|
);
|
|
547
548
|
}
|
|
548
549
|
throw err;
|