grist-widget-sdk 0.3.17 → 0.3.25

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 (40) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/advanced.cjs +1 -5
  3. package/dist/advanced.cjs.map +1 -1
  4. package/dist/advanced.d.cts +6 -4
  5. package/dist/advanced.d.ts +6 -4
  6. package/dist/advanced.js +2 -2
  7. package/dist/{chunk-OTIHUVSE.js → chunk-EPEBKXVN.js} +3 -7
  8. package/dist/chunk-EPEBKXVN.js.map +1 -0
  9. package/dist/{chunk-D5GBS2NT.js → chunk-TZB3OZA6.js} +1 -1
  10. package/dist/chunk-TZB3OZA6.js.map +1 -0
  11. package/dist/{create-grist-emulator-DBS6gmiI.d.cts → create-grist-emulator-K-iUKUCZ.d.cts} +4 -3
  12. package/dist/{create-grist-emulator-C_0I4wax.d.ts → create-grist-emulator-_3_JK7Rr.d.ts} +4 -3
  13. package/dist/emulator/devtools.d.cts +6 -4
  14. package/dist/emulator/devtools.d.ts +6 -4
  15. package/dist/emulator/testing.d.cts +6 -5
  16. package/dist/emulator/testing.d.ts +6 -5
  17. package/dist/emulator/testing.js +1 -1
  18. package/dist/emulator/transports.d.cts +5 -4
  19. package/dist/emulator/transports.d.ts +5 -4
  20. package/dist/emulator.d.cts +9 -7
  21. package/dist/emulator.d.ts +9 -7
  22. package/dist/index.cjs +1 -5
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +13 -7
  25. package/dist/index.d.ts +13 -7
  26. package/dist/index.js +2 -2
  27. package/dist/index.js.map +1 -1
  28. package/dist/{inline-QitZwXKP.d.ts → inline-A8yaddmp.d.cts} +3 -2
  29. package/dist/{inline-CRwQQ-GW.d.cts → inline-B7QQeWul.d.ts} +3 -2
  30. package/dist/{templates-DBq719O_.d.cts → templates-CB_VwjEU.d.cts} +1 -1
  31. package/dist/{templates-BC7FoSdW.d.ts → templates-pRIXc2RR.d.ts} +1 -1
  32. package/dist/{types-Fb2wplkv.d.ts → types-YcRfo7oy.d.cts} +1 -1
  33. package/dist/{types-Fb2wplkv.d.cts → types-YcRfo7oy.d.ts} +1 -1
  34. package/dist/{use-grist-widget-options-from-context-BFhQBGRY.d.ts → use-grist-widget-options-from-context-Bbd5-f39.d.cts} +5 -6
  35. package/dist/{use-grist-widget-options-from-context-qpFMdoBJ.d.cts → use-grist-widget-options-from-context-hl-NwOwP.d.ts} +5 -6
  36. package/package.json +9 -6
  37. package/tsconfig/app.json +38 -0
  38. package/tsconfig/node.json +36 -0
  39. package/dist/chunk-D5GBS2NT.js.map +0 -1
  40. package/dist/chunk-OTIHUVSE.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,7 +1,8 @@
1
- import { d as GristDocApi, g as GristFormulaKind, j as GristReplicaColumn, k as GristReplicaDocument, n as GristReplicaTable, l as GristReplicaRow, b as GristColumnsToMap, w as GristWidgetColumnMap, p as GristRowRecord, y as GristWidgetInteraction, s as GristTableOperations, G as GristApplyUserActionsOptions, f as GristFetchSelectedOptions, c as GristCursorPos, i as GristReadyOptions, o as GristRequiredAccess, e as GristDocumentMode } from './types-Fb2wplkv.cjs';
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
- 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
- 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';
1
+ import { l as GristDocApi, m as GristFormulaKind, c as GristReplicaColumn, b as GristReplicaDocument, a as GristReplicaTable, n as GristReplicaRow, o as GristColumnsToMap, d as GristWidgetColumnMap, G as GristRowRecord, f as GristWidgetInteraction, k as GristTableOperations, p as GristApplyUserActionsOptions, j as GristFetchSelectedOptions, e as GristCursorPos, i as GristReadyOptions, q as GristRequiredAccess, r as GristDocumentMode } from './types-YcRfo7oy.cjs';
2
+ export { s as GristColumnToMap, t as GristMinimalRecord, g as GristReplicaSelection, u as GristTableNewRecord, v as GristTableOpOptions, w as GristTableUpdateRecord, x as GristTableUpsertOptions, y as GristTableUpsertRecord, h as GristWidgetConfiguration, z as GristWidgetLinkingInfo } from './types-YcRfo7oy.cjs';
3
+ import { a as GristWidgetStatus, b as GristUserActionTuple, U as UseGristCoreResult, c as UseGristCoreOptions, d as GristCapabilities, e as GristColumnarTable, F as FetchGristTableRowsOptions, S as SafeParseGristTableDataOptions, f as GristSafeParseCellResult, L as ListTablesOptions, g as ListColumnsOptions, h as GristColumnInfo, i as GristAccessToken, j as GristNoiseColumnsOptions } from './use-grist-widget-options-from-context-Bbd5-f39.cjs';
4
+ import { GristWidgetSnapshot } from './advanced.cjs';
5
+ export { k as GristCellValue, l as GristColumnLike, m as GristSafeParseIssue, n as GristSafeParseIssueCode, o as GristSafeRefListValue, p as GristSafeRefValue, q as GristSafeTableCellIssue, r as GristSafeTableCellMeta, s as GristTableRowsOrder, t as SafeParseGristTableDataResult, u as SafeParseGristValuesOptions, v as UseGristWidgetOptionsFromContextConfig, w as UseGristWidgetOptionsFromContextResult, x as computeRowCount, y as decodeColumnarToReplicaRows, z as fetchGristRow, A as fetchGristTableRows, B as fetchWithGristAuth, C as findRowIndexById, D as getGristAccessToken, E as gristAddColumnAction, H as gristAddRecordAction, I as gristAddTableAction, J as gristAddVisibleColumnAction, K as gristBulkAddRecordAction, M as gristBulkRemoveRecordAction, N as gristBulkUpdateRecordAction, O as gristCellValueSchema, P as gristDuplicateTableAction, Q as gristModifyColumnAction, R as gristRemoveColumnAction, T as gristRemoveRecordAction, V as gristRemoveTableAction, W as gristRenameColumnAction, X as gristRenameTableAction, Y as gristReplaceTableDataAction, Z as gristSafeRefListValueSchema, _ as gristSafeRefValueSchema, $ as gristSetDocumentInfoAction, a0 as gristUpdateRecordAction, a1 as inferDisplayHelpersByRef, a2 as isGristNoiseColumn, a3 as materializeGristRowsFromColumnar, a4 as rowAtIndex, a5 as safeParseGristTableData, a6 as safeParseGristValues, a7 as safeParseRowsToDisplayRows, a8 as sortRowsByGristOrder, a9 as tableDataToRows, aa as useGristWidgetOptionsFromContext } from './use-grist-widget-options-from-context-Bbd5-f39.cjs';
5
6
  import * as react from 'react';
6
7
  import { ReactNode } from 'react';
7
8
  import 'zod';
@@ -462,6 +463,10 @@ type ComposeGristWidgetOptions = UseGristCoreOptions & UseGristSelectionOptions
462
463
  };
463
464
 
464
465
  type UseGristOptions = ComposeGristWidgetOptions;
466
+ /** Return type of `useGristStatus()`: connection state plus current-table info. */
467
+ type UseGristStatusResult = GristStatusSliceValue;
468
+ /** Return type of `useGristWrites()`. */
469
+ type UseGristWritesResult = UseGristTableOpsBoundResult;
465
470
  /**
466
471
  * The full Grist widget state and API surface.
467
472
  *
@@ -686,7 +691,7 @@ declare function useGrist<TRow = Record<string, unknown>, TMapped = Record<strin
686
691
  * Must be called inside `<GristWidgetProvider>` — for standalone usage use
687
692
  * `useGrist()` directly.
688
693
  */
689
- declare function useGristStatus(): GristStatusSliceValue;
694
+ declare function useGristStatus(): UseGristStatusResult;
690
695
  /**
691
696
  * Slice subscriber for the selection / mappings / widget-options stream.
692
697
  * Must be called inside `<GristWidgetProvider>`.
@@ -696,7 +701,7 @@ declare function useGristSelection<TRow = Record<string, unknown>, TMapped = Rec
696
701
  * Slice subscriber for writes (`table`, `getTable`, `applyActions`, `actionStatus`).
697
702
  * Must be called inside `<GristWidgetProvider>`.
698
703
  */
699
- declare function useGristWrites(): UseGristTableOpsBoundResult;
704
+ declare function useGristWrites(): UseGristWritesResult;
700
705
  /**
701
706
  * Slice subscriber for the host theme. Must be called inside `<GristWidgetProvider>`.
702
707
  */
@@ -822,4 +827,5 @@ type UseWidgetMetadataInput = {
822
827
  };
823
828
  declare function useWidgetMetadata(input?: UseWidgetMetadataInput | null): void;
824
829
 
825
- export { type BuildReplicaDocumentFromDocApiOptions, FetchGristTableRowsOptions, GRIST_BOUNDARY_PREPARING_COPY, type GetGristSdkAlertDescriptorsOptions, GristAccessToken, GristApplyUserActionsOptions, type GristAttachmentUploadResult, GristBoundary, type GristBoundaryActions, type GristBoundaryBlockingKind, type GristBoundaryBootPhase, type GristBoundaryGate, type GristBoundaryProps, GristBoundaryScreen, type GristBoundaryView, GristCapabilities, type GristChoiceListEntry, GristColumnInfo, GristColumnarTable, GristColumnsToMap, GristCursorPos, type GristDecodedValue, GristDocApi, GristDocumentMode, type GristEncodedAttachmentList, type GristEncodedBareRef, type GristEncodedDate, type GristEncodedDateTime, type GristEncodedError, type GristEncodedList, type GristEncodedPending, type GristEncodedRef, GristFetchSelectedOptions, type GristFetchedAttachment, type GristFetchedAttachmentBlob, GristFormulaKind, GristNoiseColumnsOptions, GristReadyOptions, GristReplicaColumn, GristReplicaDocument, GristReplicaRow, GristReplicaTable, GristRequiredAccess, GristRowRecord, GristSafeParseCellResult, type GristSchemaTableView, type GristSdkAlertDescriptor, type GristSdkAlertKind, type GristSdkAlertSeverity, type GristSdkAlertsWidgetSlice, GristTableOperations, type GristTheme, GristUserActionTuple, type GristWidgetActionStatus, GristWidgetColumnMap, GristWidgetInteraction, type GristWidgetMode, GristWidgetProvider, type GristWidgetProviderProps, GristWidgetStatus, ListColumnsOptions, ListTablesOptions, type ReplicaDocumentJsonOptions, type ReplicaJsonIncludeRows, type ReplicaTableColumnMetaLite, SafeParseGristTableDataOptions, type UseGristOptions, type UseGristResult, type UseGristSchemaOptions, type UseGristSchemaResult, type UseWidgetMetadataInput, type ValidateColumnMappingsResult, buildReplicaColumnsFromColumnar, buildReplicaDocumentFromDocApi, buildReplicaJsonPayload, coerceGristDocApiRefRowId, decodeGristValue, deriveBoundaryBootLabel, deriveBoundaryBootPhase, deriveBoundaryView, encodeGristValue, extractAttachmentIdsFromUploadPayload, extractFirstAttachmentIdFromUploadPayload, extractGristAttachmentId, extractGristAttachmentIdsFromCell, fetchAttachmentBase64, fetchAttachmentBase64ForCell, fetchAttachmentBlob, formatAccessInsufficientMessage, formatBoundaryUserMessage, formatColumnMappingAlertMessage, formatLinkStaleAlertMessage, formatMappingPendingAlertMessage, formatMappingUnreportedAlertMessage, formatSectionNotLinkedAlertMessage, formatSourceNotWiredAlertMessage, getAttachmentDownloadUrl, getAttachmentDownloadUrlForCell, getGristSdkAlertDescriptors, getGristSdkAlertSeverity, getGristSdkAlertTitle, gristAttachmentCellValue, gristAttachmentCellValues, inferGristFormulaKind, isAccessInsufficientError, isGristCellError, isWidgetSectionNotLinked, loadColumnMetadataByTable, mergeGristAttachmentCellValue, normalizeGristChoiceListEntries, normalizeReplicaDocumentInput, normalizeReplicaTableInput, orderedColumnIds, parseGristAttachmentUploadResponse, parseGristAttachmentUploadResponseIds, parseGristWidgetOptionsCell, resolveGristFormulaKind, serializeJsonFriendly, uploadGristAttachment, useGrist, useGristContext, useGristOptional, useGristSchema, useGristSdkAlertDescriptors, useGristSelection, useGristStatus, useGristTheme, useGristWrites, useWidgetMetadata, validateColumnMappings };
830
+ export { FetchGristTableRowsOptions, GRIST_BOUNDARY_PREPARING_COPY, GristAccessToken, GristApplyUserActionsOptions, GristBoundary, GristBoundaryScreen, GristCapabilities, GristColumnInfo, GristColumnarTable, GristColumnsToMap, GristCursorPos, GristDocApi, GristDocumentMode, GristFetchSelectedOptions, GristFormulaKind, GristNoiseColumnsOptions, GristReadyOptions, GristReplicaColumn, GristReplicaDocument, GristReplicaRow, GristReplicaTable, GristRequiredAccess, GristRowRecord, GristSafeParseCellResult, GristTableOperations, GristUserActionTuple, GristWidgetColumnMap, GristWidgetInteraction, GristWidgetProvider, GristWidgetStatus, ListColumnsOptions, ListTablesOptions, SafeParseGristTableDataOptions, UseGristCoreOptions, UseGristCoreResult, buildReplicaColumnsFromColumnar, buildReplicaDocumentFromDocApi, buildReplicaJsonPayload, coerceGristDocApiRefRowId, decodeGristValue, deriveBoundaryBootLabel, deriveBoundaryBootPhase, deriveBoundaryView, encodeGristValue, extractAttachmentIdsFromUploadPayload, extractFirstAttachmentIdFromUploadPayload, extractGristAttachmentId, extractGristAttachmentIdsFromCell, fetchAttachmentBase64, fetchAttachmentBase64ForCell, fetchAttachmentBlob, formatAccessInsufficientMessage, formatBoundaryUserMessage, formatColumnMappingAlertMessage, formatLinkStaleAlertMessage, formatMappingPendingAlertMessage, formatMappingUnreportedAlertMessage, formatSectionNotLinkedAlertMessage, formatSourceNotWiredAlertMessage, getAttachmentDownloadUrl, getAttachmentDownloadUrlForCell, getGristSdkAlertDescriptors, getGristSdkAlertSeverity, getGristSdkAlertTitle, gristAttachmentCellValue, gristAttachmentCellValues, inferGristFormulaKind, isAccessInsufficientError, isGristCellError, isWidgetSectionNotLinked, loadColumnMetadataByTable, mergeGristAttachmentCellValue, normalizeGristChoiceListEntries, normalizeReplicaDocumentInput, normalizeReplicaTableInput, orderedColumnIds, parseGristAttachmentUploadResponse, parseGristAttachmentUploadResponseIds, parseGristWidgetOptionsCell, resolveGristFormulaKind, serializeJsonFriendly, uploadGristAttachment, useGrist, useGristContext, useGristOptional, useGristSchema, useGristSdkAlertDescriptors, useGristSelection, useGristStatus, useGristTheme, useGristWrites, useWidgetMetadata, validateColumnMappings };
831
+ export type { BuildReplicaDocumentFromDocApiOptions, GetGristSdkAlertDescriptorsOptions, GristAttachmentUploadResult, GristBoundaryActions, GristBoundaryBlockingKind, GristBoundaryBootPhase, GristBoundaryGate, GristBoundaryProps, GristBoundaryView, GristChoiceListEntry, GristDecodedValue, GristEncodedAttachmentList, GristEncodedBareRef, GristEncodedDate, GristEncodedDateTime, GristEncodedError, GristEncodedList, GristEncodedPending, GristEncodedRef, GristFetchedAttachment, GristFetchedAttachmentBlob, GristSchemaTableView, GristSdkAlertDescriptor, GristSdkAlertKind, GristSdkAlertSeverity, GristSdkAlertsWidgetSlice, GristTheme, GristWidgetActionStatus, GristWidgetMode, GristWidgetProviderProps, ReplicaDocumentJsonOptions, ReplicaJsonIncludeRows, ReplicaTableColumnMetaLite, UseGristOptions, UseGristResult, UseGristSchemaOptions, UseGristSchemaResult, UseGristSelectionResult, UseGristStatusResult, UseGristThemeResult, UseGristWritesResult, UseWidgetMetadataInput, ValidateColumnMappingsResult };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { d as GristDocApi, g as GristFormulaKind, j as GristReplicaColumn, k as GristReplicaDocument, n as GristReplicaTable, l as GristReplicaRow, b as GristColumnsToMap, w as GristWidgetColumnMap, p as GristRowRecord, y as GristWidgetInteraction, s as GristTableOperations, G as GristApplyUserActionsOptions, f as GristFetchSelectedOptions, c as GristCursorPos, i as GristReadyOptions, o as GristRequiredAccess, e as GristDocumentMode } from './types-Fb2wplkv.js';
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
- 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
- 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';
1
+ import { l as GristDocApi, m as GristFormulaKind, c as GristReplicaColumn, b as GristReplicaDocument, a as GristReplicaTable, n as GristReplicaRow, o as GristColumnsToMap, d as GristWidgetColumnMap, G as GristRowRecord, f as GristWidgetInteraction, k as GristTableOperations, p as GristApplyUserActionsOptions, j as GristFetchSelectedOptions, e as GristCursorPos, i as GristReadyOptions, q as GristRequiredAccess, r as GristDocumentMode } from './types-YcRfo7oy.js';
2
+ export { s as GristColumnToMap, t as GristMinimalRecord, g as GristReplicaSelection, u as GristTableNewRecord, v as GristTableOpOptions, w as GristTableUpdateRecord, x as GristTableUpsertOptions, y as GristTableUpsertRecord, h as GristWidgetConfiguration, z as GristWidgetLinkingInfo } from './types-YcRfo7oy.js';
3
+ import { a as GristWidgetStatus, b as GristUserActionTuple, U as UseGristCoreResult, c as UseGristCoreOptions, d as GristCapabilities, e as GristColumnarTable, F as FetchGristTableRowsOptions, S as SafeParseGristTableDataOptions, f as GristSafeParseCellResult, L as ListTablesOptions, g as ListColumnsOptions, h as GristColumnInfo, i as GristAccessToken, j as GristNoiseColumnsOptions } from './use-grist-widget-options-from-context-hl-NwOwP.js';
4
+ import { GristWidgetSnapshot } from './advanced.js';
5
+ export { k as GristCellValue, l as GristColumnLike, m as GristSafeParseIssue, n as GristSafeParseIssueCode, o as GristSafeRefListValue, p as GristSafeRefValue, q as GristSafeTableCellIssue, r as GristSafeTableCellMeta, s as GristTableRowsOrder, t as SafeParseGristTableDataResult, u as SafeParseGristValuesOptions, v as UseGristWidgetOptionsFromContextConfig, w as UseGristWidgetOptionsFromContextResult, x as computeRowCount, y as decodeColumnarToReplicaRows, z as fetchGristRow, A as fetchGristTableRows, B as fetchWithGristAuth, C as findRowIndexById, D as getGristAccessToken, E as gristAddColumnAction, H as gristAddRecordAction, I as gristAddTableAction, J as gristAddVisibleColumnAction, K as gristBulkAddRecordAction, M as gristBulkRemoveRecordAction, N as gristBulkUpdateRecordAction, O as gristCellValueSchema, P as gristDuplicateTableAction, Q as gristModifyColumnAction, R as gristRemoveColumnAction, T as gristRemoveRecordAction, V as gristRemoveTableAction, W as gristRenameColumnAction, X as gristRenameTableAction, Y as gristReplaceTableDataAction, Z as gristSafeRefListValueSchema, _ as gristSafeRefValueSchema, $ as gristSetDocumentInfoAction, a0 as gristUpdateRecordAction, a1 as inferDisplayHelpersByRef, a2 as isGristNoiseColumn, a3 as materializeGristRowsFromColumnar, a4 as rowAtIndex, a5 as safeParseGristTableData, a6 as safeParseGristValues, a7 as safeParseRowsToDisplayRows, a8 as sortRowsByGristOrder, a9 as tableDataToRows, aa as useGristWidgetOptionsFromContext } from './use-grist-widget-options-from-context-hl-NwOwP.js';
5
6
  import * as react from 'react';
6
7
  import { ReactNode } from 'react';
7
8
  import 'zod';
@@ -462,6 +463,10 @@ type ComposeGristWidgetOptions = UseGristCoreOptions & UseGristSelectionOptions
462
463
  };
463
464
 
464
465
  type UseGristOptions = ComposeGristWidgetOptions;
466
+ /** Return type of `useGristStatus()`: connection state plus current-table info. */
467
+ type UseGristStatusResult = GristStatusSliceValue;
468
+ /** Return type of `useGristWrites()`. */
469
+ type UseGristWritesResult = UseGristTableOpsBoundResult;
465
470
  /**
466
471
  * The full Grist widget state and API surface.
467
472
  *
@@ -686,7 +691,7 @@ declare function useGrist<TRow = Record<string, unknown>, TMapped = Record<strin
686
691
  * Must be called inside `<GristWidgetProvider>` — for standalone usage use
687
692
  * `useGrist()` directly.
688
693
  */
689
- declare function useGristStatus(): GristStatusSliceValue;
694
+ declare function useGristStatus(): UseGristStatusResult;
690
695
  /**
691
696
  * Slice subscriber for the selection / mappings / widget-options stream.
692
697
  * Must be called inside `<GristWidgetProvider>`.
@@ -696,7 +701,7 @@ declare function useGristSelection<TRow = Record<string, unknown>, TMapped = Rec
696
701
  * Slice subscriber for writes (`table`, `getTable`, `applyActions`, `actionStatus`).
697
702
  * Must be called inside `<GristWidgetProvider>`.
698
703
  */
699
- declare function useGristWrites(): UseGristTableOpsBoundResult;
704
+ declare function useGristWrites(): UseGristWritesResult;
700
705
  /**
701
706
  * Slice subscriber for the host theme. Must be called inside `<GristWidgetProvider>`.
702
707
  */
@@ -822,4 +827,5 @@ type UseWidgetMetadataInput = {
822
827
  };
823
828
  declare function useWidgetMetadata(input?: UseWidgetMetadataInput | null): void;
824
829
 
825
- export { type BuildReplicaDocumentFromDocApiOptions, FetchGristTableRowsOptions, GRIST_BOUNDARY_PREPARING_COPY, type GetGristSdkAlertDescriptorsOptions, GristAccessToken, GristApplyUserActionsOptions, type GristAttachmentUploadResult, GristBoundary, type GristBoundaryActions, type GristBoundaryBlockingKind, type GristBoundaryBootPhase, type GristBoundaryGate, type GristBoundaryProps, GristBoundaryScreen, type GristBoundaryView, GristCapabilities, type GristChoiceListEntry, GristColumnInfo, GristColumnarTable, GristColumnsToMap, GristCursorPos, type GristDecodedValue, GristDocApi, GristDocumentMode, type GristEncodedAttachmentList, type GristEncodedBareRef, type GristEncodedDate, type GristEncodedDateTime, type GristEncodedError, type GristEncodedList, type GristEncodedPending, type GristEncodedRef, GristFetchSelectedOptions, type GristFetchedAttachment, type GristFetchedAttachmentBlob, GristFormulaKind, GristNoiseColumnsOptions, GristReadyOptions, GristReplicaColumn, GristReplicaDocument, GristReplicaRow, GristReplicaTable, GristRequiredAccess, GristRowRecord, GristSafeParseCellResult, type GristSchemaTableView, type GristSdkAlertDescriptor, type GristSdkAlertKind, type GristSdkAlertSeverity, type GristSdkAlertsWidgetSlice, GristTableOperations, type GristTheme, GristUserActionTuple, type GristWidgetActionStatus, GristWidgetColumnMap, GristWidgetInteraction, type GristWidgetMode, GristWidgetProvider, type GristWidgetProviderProps, GristWidgetStatus, ListColumnsOptions, ListTablesOptions, type ReplicaDocumentJsonOptions, type ReplicaJsonIncludeRows, type ReplicaTableColumnMetaLite, SafeParseGristTableDataOptions, type UseGristOptions, type UseGristResult, type UseGristSchemaOptions, type UseGristSchemaResult, type UseWidgetMetadataInput, type ValidateColumnMappingsResult, buildReplicaColumnsFromColumnar, buildReplicaDocumentFromDocApi, buildReplicaJsonPayload, coerceGristDocApiRefRowId, decodeGristValue, deriveBoundaryBootLabel, deriveBoundaryBootPhase, deriveBoundaryView, encodeGristValue, extractAttachmentIdsFromUploadPayload, extractFirstAttachmentIdFromUploadPayload, extractGristAttachmentId, extractGristAttachmentIdsFromCell, fetchAttachmentBase64, fetchAttachmentBase64ForCell, fetchAttachmentBlob, formatAccessInsufficientMessage, formatBoundaryUserMessage, formatColumnMappingAlertMessage, formatLinkStaleAlertMessage, formatMappingPendingAlertMessage, formatMappingUnreportedAlertMessage, formatSectionNotLinkedAlertMessage, formatSourceNotWiredAlertMessage, getAttachmentDownloadUrl, getAttachmentDownloadUrlForCell, getGristSdkAlertDescriptors, getGristSdkAlertSeverity, getGristSdkAlertTitle, gristAttachmentCellValue, gristAttachmentCellValues, inferGristFormulaKind, isAccessInsufficientError, isGristCellError, isWidgetSectionNotLinked, loadColumnMetadataByTable, mergeGristAttachmentCellValue, normalizeGristChoiceListEntries, normalizeReplicaDocumentInput, normalizeReplicaTableInput, orderedColumnIds, parseGristAttachmentUploadResponse, parseGristAttachmentUploadResponseIds, parseGristWidgetOptionsCell, resolveGristFormulaKind, serializeJsonFriendly, uploadGristAttachment, useGrist, useGristContext, useGristOptional, useGristSchema, useGristSdkAlertDescriptors, useGristSelection, useGristStatus, useGristTheme, useGristWrites, useWidgetMetadata, validateColumnMappings };
830
+ export { FetchGristTableRowsOptions, GRIST_BOUNDARY_PREPARING_COPY, GristAccessToken, GristApplyUserActionsOptions, GristBoundary, GristBoundaryScreen, GristCapabilities, GristColumnInfo, GristColumnarTable, GristColumnsToMap, GristCursorPos, GristDocApi, GristDocumentMode, GristFetchSelectedOptions, GristFormulaKind, GristNoiseColumnsOptions, GristReadyOptions, GristReplicaColumn, GristReplicaDocument, GristReplicaRow, GristReplicaTable, GristRequiredAccess, GristRowRecord, GristSafeParseCellResult, GristTableOperations, GristUserActionTuple, GristWidgetColumnMap, GristWidgetInteraction, GristWidgetProvider, GristWidgetStatus, ListColumnsOptions, ListTablesOptions, SafeParseGristTableDataOptions, UseGristCoreOptions, UseGristCoreResult, buildReplicaColumnsFromColumnar, buildReplicaDocumentFromDocApi, buildReplicaJsonPayload, coerceGristDocApiRefRowId, decodeGristValue, deriveBoundaryBootLabel, deriveBoundaryBootPhase, deriveBoundaryView, encodeGristValue, extractAttachmentIdsFromUploadPayload, extractFirstAttachmentIdFromUploadPayload, extractGristAttachmentId, extractGristAttachmentIdsFromCell, fetchAttachmentBase64, fetchAttachmentBase64ForCell, fetchAttachmentBlob, formatAccessInsufficientMessage, formatBoundaryUserMessage, formatColumnMappingAlertMessage, formatLinkStaleAlertMessage, formatMappingPendingAlertMessage, formatMappingUnreportedAlertMessage, formatSectionNotLinkedAlertMessage, formatSourceNotWiredAlertMessage, getAttachmentDownloadUrl, getAttachmentDownloadUrlForCell, getGristSdkAlertDescriptors, getGristSdkAlertSeverity, getGristSdkAlertTitle, gristAttachmentCellValue, gristAttachmentCellValues, inferGristFormulaKind, isAccessInsufficientError, isGristCellError, isWidgetSectionNotLinked, loadColumnMetadataByTable, mergeGristAttachmentCellValue, normalizeGristChoiceListEntries, normalizeReplicaDocumentInput, normalizeReplicaTableInput, orderedColumnIds, parseGristAttachmentUploadResponse, parseGristAttachmentUploadResponseIds, parseGristWidgetOptionsCell, resolveGristFormulaKind, serializeJsonFriendly, uploadGristAttachment, useGrist, useGristContext, useGristOptional, useGristSchema, useGristSdkAlertDescriptors, useGristSelection, useGristStatus, useGristTheme, useGristWrites, useWidgetMetadata, validateColumnMappings };
831
+ export type { BuildReplicaDocumentFromDocApiOptions, GetGristSdkAlertDescriptorsOptions, GristAttachmentUploadResult, GristBoundaryActions, GristBoundaryBlockingKind, GristBoundaryBootPhase, GristBoundaryGate, GristBoundaryProps, GristBoundaryView, GristChoiceListEntry, GristDecodedValue, GristEncodedAttachmentList, GristEncodedBareRef, GristEncodedDate, GristEncodedDateTime, GristEncodedError, GristEncodedList, GristEncodedPending, GristEncodedRef, GristFetchedAttachment, GristFetchedAttachmentBlob, GristSchemaTableView, GristSdkAlertDescriptor, GristSdkAlertKind, GristSdkAlertSeverity, GristSdkAlertsWidgetSlice, GristTheme, GristWidgetActionStatus, GristWidgetMode, GristWidgetProviderProps, ReplicaDocumentJsonOptions, ReplicaJsonIncludeRows, ReplicaTableColumnMetaLite, UseGristOptions, UseGristResult, UseGristSchemaOptions, UseGristSchemaResult, UseGristSelectionResult, UseGristStatusResult, UseGristThemeResult, UseGristWritesResult, UseWidgetMetadataInput, ValidateColumnMappingsResult };
package/dist/index.js CHANGED
@@ -26,7 +26,7 @@ import {
26
26
  useGristWidgetOptionsFromContext,
27
27
  useGristWritesContext,
28
28
  useRpcHeartbeatCoalesce
29
- } from "./chunk-OTIHUVSE.js";
29
+ } from "./chunk-EPEBKXVN.js";
30
30
  import {
31
31
  createGristHandshakeManager,
32
32
  deriveCapabilities,
@@ -41,7 +41,7 @@ import {
41
41
  recordEvent,
42
42
  recordsEvent,
43
43
  validateColumnMappings
44
- } from "./chunk-D5GBS2NT.js";
44
+ } from "./chunk-TZB3OZA6.js";
45
45
  import {
46
46
  buildReplicaJsonPayload,
47
47
  normalizeReplicaDocumentInput,