grist-widget-sdk 0.2.1 → 0.2.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # grist-widget-sdk
2
2
 
3
+ ## 0.2.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 3e98894: Fix a race that could silently override a widget's real declared `requiredAccess`/`columns` on Grist's side — Grist's Creator Panel would never show the Column Mapping section, and would offer only "read" access instead of "full", even though the widget's own code correctly declared them (its local on-page alerts still showed the correct values, since those only echo local config).
8
+
9
+ Root cause: both `<GristHandshakeProvider>` (mounted internally by `<GristStatusChip>` with no options) and standalone `useGristHandshake()` built their manager directly via `createGristHandshakeManager()`, bypassing the page-level `ensureGristReady()` singleton that `<GristWidgetProvider>` uses. That let either one call the real `grist.ready()` **directly**, with a bare default `{requiredAccess: "read table", columns: []}` payload — and since Grist only honors a widget's first `ready()` call, that default could win the race against the real widget's manager.
10
+
11
+ Three changes:
12
+ - `<GristHandshakeProvider>` and `useGristHandshake()` now default `negotiate.readyImpl` to `ensureGristReady()` (callers can still override), so they can no longer bypass the dedupe.
13
+ - `ensureGristReady()`'s reinit check now also compares declared columns, not just access-level rank — previously a widget that kept the default `"read table"` access but declared real `columns` would still lose them if a bare fallback call (same access rank) won the race first.
14
+ - New `useAmbientGristHandshake()` (`grist-widget-sdk/advanced`) observes whatever handshake manager a `<GristWidgetProvider>` ancestor already published, without ever creating a new one. `<GristStatusChip>` (the template's own component) now uses this instead of mounting its own `<GristHandshakeProvider>`, and must be nested inside `<GristWidgetProvider>` — eliminating the race for that case structurally rather than just deduping it.
15
+
3
16
  ## 0.2.1
4
17
 
5
18
  ### Patch Changes