grist-widget-sdk 0.5.0 → 0.6.0
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 +29 -0
- package/dist/actions.cjs +96 -0
- package/dist/actions.cjs.map +1 -0
- package/dist/actions.d.cts +36 -0
- package/dist/actions.d.ts +36 -0
- package/dist/actions.js +29 -0
- package/dist/actions.js.map +1 -0
- package/dist/app.cjs +49 -8
- package/dist/app.cjs.map +1 -1
- package/dist/app.d.cts +3 -2
- package/dist/app.d.ts +3 -2
- package/dist/app.js +4 -3
- package/dist/{chunk-4ZGVKGDF.js → chunk-A4KFKOEQ.js} +2 -58
- package/dist/chunk-A4KFKOEQ.js.map +1 -0
- package/dist/{chunk-OXA2VITC.js → chunk-CMN4M4S3.js} +6 -4
- package/dist/{chunk-OXA2VITC.js.map → chunk-CMN4M4S3.js.map} +1 -1
- package/dist/{chunk-MAPAWVQC.js → chunk-DKCRFNAW.js} +104 -17
- package/dist/chunk-DKCRFNAW.js.map +1 -0
- package/dist/{chunk-LSALXIGM.js → chunk-TUPCTWE5.js} +7 -3
- package/dist/chunk-TUPCTWE5.js.map +1 -0
- package/dist/chunk-YGQXH2P5.js +81 -0
- package/dist/chunk-YGQXH2P5.js.map +1 -0
- package/dist/{define-widget-B1FIvI-h.d.cts → define-widget-CYYdqRmB.d.cts} +39 -29
- package/dist/{define-widget-B9gEtJP0.d.ts → define-widget-D-NmSglS.d.ts} +39 -29
- package/dist/emulator/testing.cjs +49 -8
- package/dist/emulator/testing.cjs.map +1 -1
- package/dist/emulator/testing.d.cts +1 -0
- package/dist/emulator/testing.d.ts +1 -0
- package/dist/emulator/testing.js +8 -6
- package/dist/emulator/testing.js.map +1 -1
- package/dist/emulator.cjs.map +1 -1
- package/dist/emulator.js +3 -2
- package/dist/index.cjs +128 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -3
- package/dist/index.d.ts +30 -3
- package/dist/index.js +12 -11
- package/dist/{mount-grist-widget-Dtelqao_.d.cts → mount-grist-widget-D0mr__ga.d.cts} +1 -1
- package/dist/{mount-grist-widget-CkB-3iG_.d.ts → mount-grist-widget-DVcFl5Ys.d.ts} +1 -1
- package/package.json +11 -1
- package/dist/chunk-4ZGVKGDF.js.map +0 -1
- package/dist/chunk-LSALXIGM.js.map +0 -1
- package/dist/chunk-MAPAWVQC.js.map +0 -1
package/dist/app.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { D as DeployChannel, a as DeployPath, G as GristWidgetApp, b as GristWidgetAppProps, c as GristWidgetEntry, M as MountGristWidgetConfig, d as MountedGristWidget, e as deployChannelLabel, f as entryProps, m as mountGristWidget, p as parseDeployPath } from './mount-grist-widget-
|
|
1
|
+
export { D as DeployChannel, a as DeployPath, G as GristWidgetApp, b as GristWidgetAppProps, c as GristWidgetEntry, M as MountGristWidgetConfig, d as MountedGristWidget, e as deployChannelLabel, f as entryProps, m as mountGristWidget, p as parseDeployPath } from './mount-grist-widget-D0mr__ga.cjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './define-widget-
|
|
3
|
+
import './define-widget-CYYdqRmB.cjs';
|
|
4
4
|
import './types-DBStn0Dk.cjs';
|
|
5
|
+
import './actions.cjs';
|
|
5
6
|
|
|
6
7
|
type WidgetTheme = "light" | "dark" | "system";
|
|
7
8
|
type ResolvedWidgetTheme = "light" | "dark";
|
package/dist/app.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { D as DeployChannel, a as DeployPath, G as GristWidgetApp, b as GristWidgetAppProps, c as GristWidgetEntry, M as MountGristWidgetConfig, d as MountedGristWidget, e as deployChannelLabel, f as entryProps, m as mountGristWidget, p as parseDeployPath } from './mount-grist-widget-
|
|
1
|
+
export { D as DeployChannel, a as DeployPath, G as GristWidgetApp, b as GristWidgetAppProps, c as GristWidgetEntry, M as MountGristWidgetConfig, d as MountedGristWidget, e as deployChannelLabel, f as entryProps, m as mountGristWidget, p as parseDeployPath } from './mount-grist-widget-DVcFl5Ys.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './define-widget-
|
|
3
|
+
import './define-widget-D-NmSglS.js';
|
|
4
4
|
import './types-DBStn0Dk.js';
|
|
5
|
+
import './actions.js';
|
|
5
6
|
|
|
6
7
|
type WidgetTheme = "light" | "dark" | "system";
|
|
7
8
|
type ResolvedWidgetTheme = "light" | "dark";
|
package/dist/app.js
CHANGED
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
parseDeployPath,
|
|
7
7
|
useReleasedVersions,
|
|
8
8
|
useTheme
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-TUPCTWE5.js";
|
|
10
|
+
import "./chunk-DKCRFNAW.js";
|
|
11
|
+
import "./chunk-A4KFKOEQ.js";
|
|
12
|
+
import "./chunk-YGQXH2P5.js";
|
|
12
13
|
export {
|
|
13
14
|
GristWidgetApp,
|
|
14
15
|
deployChannelLabel,
|
|
@@ -107,50 +107,6 @@ function encodeGristValue(value, column) {
|
|
|
107
107
|
return value;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// src/sdk/helpers/grist-user-actions.ts
|
|
111
|
-
function gristUpdateRecordAction(tableId, rowId, patch) {
|
|
112
|
-
return ["UpdateRecord", tableId, rowId, patch];
|
|
113
|
-
}
|
|
114
|
-
function gristAddRecordAction(tableId, values) {
|
|
115
|
-
return ["AddRecord", tableId, null, values];
|
|
116
|
-
}
|
|
117
|
-
function gristRemoveRecordAction(tableId, rowId) {
|
|
118
|
-
return ["RemoveRecord", tableId, rowId];
|
|
119
|
-
}
|
|
120
|
-
function gristBulkUpdateRecordAction(tableId, rowIds, columnarPatch) {
|
|
121
|
-
return ["BulkUpdateRecord", tableId, rowIds, columnarPatch];
|
|
122
|
-
}
|
|
123
|
-
function gristBulkAddRecordAction(tableId, values, rowIds) {
|
|
124
|
-
const length = inferBulkLength(values);
|
|
125
|
-
const ids = rowIds ?? new Array(length).fill(null);
|
|
126
|
-
return ["BulkAddRecord", tableId, ids, values];
|
|
127
|
-
}
|
|
128
|
-
function gristBulkRemoveRecordAction(tableId, rowIds) {
|
|
129
|
-
return ["BulkRemoveRecord", tableId, rowIds];
|
|
130
|
-
}
|
|
131
|
-
function gristAddColumnAction(tableId, colId, colInfo) {
|
|
132
|
-
return ["AddColumn", tableId, colId, colInfo];
|
|
133
|
-
}
|
|
134
|
-
function gristAddVisibleColumnAction(tableId, colId, colInfo) {
|
|
135
|
-
return ["AddVisibleColumn", tableId, colId, colInfo];
|
|
136
|
-
}
|
|
137
|
-
function gristRenameColumnAction(tableId, colId, newColId) {
|
|
138
|
-
return ["RenameColumn", tableId, colId, newColId];
|
|
139
|
-
}
|
|
140
|
-
function gristModifyColumnAction(tableId, colId, colInfo) {
|
|
141
|
-
return ["ModifyColumn", tableId, colId, colInfo];
|
|
142
|
-
}
|
|
143
|
-
function gristRemoveColumnAction(tableId, colId) {
|
|
144
|
-
return ["RemoveColumn", tableId, colId];
|
|
145
|
-
}
|
|
146
|
-
function gristAddTableAction(tableId, tableInfo) {
|
|
147
|
-
return ["AddTable", tableId, tableInfo];
|
|
148
|
-
}
|
|
149
|
-
function inferBulkLength(values) {
|
|
150
|
-
for (const arr of Object.values(values)) if (Array.isArray(arr)) return arr.length;
|
|
151
|
-
return 0;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
110
|
// src/sdk/helpers/replica-normalize.ts
|
|
155
111
|
function normalizeReplicaTableInput(table) {
|
|
156
112
|
return { ...table, rows: table.rows ?? [] };
|
|
@@ -187,18 +143,6 @@ export {
|
|
|
187
143
|
isGristCellError,
|
|
188
144
|
encodeGristValue,
|
|
189
145
|
normalizeReplicaDocumentInput,
|
|
190
|
-
buildReplicaJsonPayload
|
|
191
|
-
gristUpdateRecordAction,
|
|
192
|
-
gristAddRecordAction,
|
|
193
|
-
gristRemoveRecordAction,
|
|
194
|
-
gristBulkUpdateRecordAction,
|
|
195
|
-
gristBulkAddRecordAction,
|
|
196
|
-
gristBulkRemoveRecordAction,
|
|
197
|
-
gristAddColumnAction,
|
|
198
|
-
gristAddVisibleColumnAction,
|
|
199
|
-
gristRenameColumnAction,
|
|
200
|
-
gristModifyColumnAction,
|
|
201
|
-
gristRemoveColumnAction,
|
|
202
|
-
gristAddTableAction
|
|
146
|
+
buildReplicaJsonPayload
|
|
203
147
|
};
|
|
204
|
-
//# sourceMappingURL=chunk-
|
|
148
|
+
//# sourceMappingURL=chunk-A4KFKOEQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sdk/helpers/grist-value-codec.ts","../src/sdk/helpers/replica-normalize.ts"],"sourcesContent":["/**\n * Encoding helpers for Grist cell values.\n *\n * Grist sends some types as marshalled tuples or numeric epochs. This file\n * exposes pure decode/encode functions so widget code never has to spelunk\n * Grist's wire format.\n *\n * References: Grist `grist/RowRecord` and `grist/DocActions` typings.\n */\n\nimport type { GristReplicaColumn } from \"../types\"\n\n/** `[\"E\", \"ErrorClass\", \"message\", traceback?]` — Grist error sentinel. */\nexport type GristEncodedError = [\"E\", string, string?, string?]\n/** `[\"L\", ...items]` — list (used for ChoiceList, RefList, Attachments). */\nexport type GristEncodedList = [\"L\", ...unknown[]]\n/** `[\"D\", epochSeconds, \"tz/Name\"]` — DateTime with timezone. */\nexport type GristEncodedDateTime = [\"D\", number, string]\n/** `[\"d\", epochSeconds]` — Date (no time). */\nexport type GristEncodedDate = [\"d\", number]\n/** `[\"R\", tableId, rowId]` — explicit reference. */\nexport type GristEncodedRef = [\"R\", string, number]\n/** `[\"r\", rowId]` — bare reference (when table is contextual). */\nexport type GristEncodedBareRef = [\"r\", number]\n/** `[\"P\", encoded]` — pending marker. */\nexport type GristEncodedPending = [\"P\"]\n\nexport type GristDecodedValue =\n | null\n | string\n | number\n | boolean\n | Date\n | GristDecodedValue[]\n | { __error: true; type: string; message?: string; traceback?: string }\n | { __ref: true; tableId?: string; rowId: number }\n\nconst MARSHALLED_TAGS = new Set([\"E\", \"L\", \"D\", \"d\", \"R\", \"r\", \"P\"])\n\nfunction isMarshalledTuple(value: unknown): value is unknown[] {\n return (\n Array.isArray(value) &&\n typeof value[0] === \"string\" &&\n value[0].length <= 2 &&\n MARSHALLED_TAGS.has(value[0])\n )\n}\n\n/**\n * Normalises a Grist `fetchTable` cell that points at a row in another table.\n * Most payloads use a bare numeric row id, but `Ref:*` values may appear as\n * `[\"R\", tableId, rowId]` or `[\"r\", rowId]` (same shape as {@link decodeGristValue}).\n */\nexport function coerceGristDocApiRefRowId(value: unknown): number | undefined {\n if (typeof value === \"number\" && Number.isFinite(value)) return value\n if (!Array.isArray(value) || value.length < 2) return undefined\n const tag = value[0]\n if (tag === \"R\" && typeof value[2] === \"number\" && Number.isFinite(value[2])) return value[2]\n if (tag === \"r\" && typeof value[1] === \"number\" && Number.isFinite(value[1])) return value[1]\n return undefined\n}\n\nfunction looksLikeAttachmentColumn(column?: GristReplicaColumn): boolean {\n return column?.type === \"Attachments\"\n}\n\nfunction looksLikeChoiceListColumn(column?: GristReplicaColumn): boolean {\n return column?.type === \"ChoiceList\"\n}\n\nfunction looksLikeRefListColumn(column?: GristReplicaColumn): boolean {\n return typeof column?.type === \"string\" && column.type.startsWith(\"RefList:\")\n}\n\nfunction looksLikeRefColumn(column?: GristReplicaColumn): boolean {\n return typeof column?.type === \"string\" && column.type.startsWith(\"Ref:\")\n}\n\nfunction looksLikeDateColumn(column?: GristReplicaColumn): boolean {\n return column?.type === \"Date\"\n}\n\nfunction looksLikeDateTimeColumn(column?: GristReplicaColumn): boolean {\n return typeof column?.type === \"string\" && column.type.startsWith(\"DateTime\")\n}\n\n/**\n * Decodes a Grist cell value into an idiomatic JS value.\n *\n * Pass the column's metadata (from `useGristSchema` or `_grist_Tables_column`)\n * for type-aware decoding (e.g. `Date` columns return `Date` even when stored as a number).\n */\nexport function decodeGristValue(value: unknown, column?: GristReplicaColumn): GristDecodedValue {\n if (value === null || value === undefined) return null\n\n if (isMarshalledTuple(value)) {\n const tag = value[0] as string\n switch (tag) {\n case \"E\":\n return {\n __error: true,\n type: typeof value[1] === \"string\" ? value[1] : \"Error\",\n message: typeof value[2] === \"string\" ? value[2] : undefined,\n traceback: typeof value[3] === \"string\" ? value[3] : undefined,\n }\n case \"L\":\n return value.slice(1).map((v) => decodeGristValue(v, undefined)) as GristDecodedValue[]\n case \"D\":\n if (typeof value[1] === \"number\") return new Date(value[1] * 1000)\n return null\n case \"d\":\n if (typeof value[1] === \"number\") return new Date(value[1] * 1000)\n return null\n case \"R\":\n return {\n __ref: true,\n tableId: typeof value[1] === \"string\" ? value[1] : undefined,\n rowId: typeof value[2] === \"number\" ? value[2] : 0,\n }\n case \"r\":\n return { __ref: true, rowId: typeof value[1] === \"number\" ? value[1] : 0 }\n case \"P\":\n return null\n default:\n return null\n }\n }\n\n if (looksLikeDateColumn(column) || looksLikeDateTimeColumn(column)) {\n if (typeof value === \"number\" && Number.isFinite(value)) return new Date(value * 1000)\n }\n\n if (looksLikeRefColumn(column) && typeof value === \"number\") {\n return { __ref: true, rowId: value }\n }\n\n if ((looksLikeRefListColumn(column) || looksLikeChoiceListColumn(column) || looksLikeAttachmentColumn(column)) && Array.isArray(value)) {\n return value.map((v) => decodeGristValue(v, undefined)) as GristDecodedValue[]\n }\n\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") return value\n if (Array.isArray(value)) return value.map((v) => decodeGristValue(v, undefined)) as GristDecodedValue[]\n return null\n}\n\n/** Convenience: true when the cell is a Grist error sentinel. */\nexport function isGristCellError(value: unknown): value is GristEncodedError {\n return Array.isArray(value) && value[0] === \"E\"\n}\n\n/**\n * Encodes a JS value into Grist's expected wire form for a given column type.\n *\n * Use before passing values to `applyUserActions` or `TableOperations.update`\n * for `Date`, `DateTime`, `Ref`, `RefList`, and `ChoiceList` columns.\n */\nexport function encodeGristValue(value: unknown, column?: GristReplicaColumn): unknown {\n if (value === null || value === undefined) return null\n\n if (looksLikeDateColumn(column) || looksLikeDateTimeColumn(column)) {\n if (value instanceof Date) return Math.floor(value.getTime() / 1000)\n if (typeof value === \"string\") {\n const parsed = Date.parse(value)\n if (!Number.isNaN(parsed)) return Math.floor(parsed / 1000)\n }\n if (typeof value === \"number\") return Math.floor(value)\n }\n\n if (looksLikeRefColumn(column)) {\n if (typeof value === \"number\") return value\n if (value && typeof value === \"object\" && \"rowId\" in value) {\n return (value as { rowId: number }).rowId\n }\n }\n\n if (looksLikeRefListColumn(column) || looksLikeChoiceListColumn(column) || looksLikeAttachmentColumn(column)) {\n if (Array.isArray(value)) {\n const items = value.map((v) => {\n if (v && typeof v === \"object\" && \"rowId\" in v) return (v as { rowId: number }).rowId\n return v\n })\n return [\"L\", ...items]\n }\n }\n\n return value\n}\n","import type { GristReplicaDocument, GristReplicaRow, GristReplicaTable } from \"../replica-document\"\n\n/**\n * Ensure `rows` is a concrete array for emulator / merge logic.\n * Call at host boundaries (`createDocument`, tests); JSON may still omit `rows` for schema-only.\n */\nexport function normalizeReplicaTableInput<T extends GristReplicaTable>(table: T): T & { rows: GristReplicaRow[] } {\n return { ...table, rows: table.rows ?? [] }\n}\n\n/** Apply {@link normalizeReplicaTableInput} to every table; shallow-copies the document shell. */\nexport function normalizeReplicaDocumentInput<T extends GristReplicaDocument>(doc: T): T {\n return {\n ...doc,\n tables: Object.fromEntries(\n Object.entries(doc.tables).map(([tableId, t]) => [tableId, normalizeReplicaTableInput(t)])\n ),\n } as T\n}\n\n/** How row arrays appear in serialized replica JSON from {@link buildReplicaJsonPayload}. */\nexport type ReplicaJsonIncludeRows = \"none\" | \"samples\" | \"full\"\n\n/**\n * Clone a replica document for JSON output: strip rows, cap to first N, or pass through.\n * Does not mutate the source document.\n */\nexport function buildReplicaJsonPayload(\n doc: GristReplicaDocument,\n options: { includeRows: ReplicaJsonIncludeRows; sampleRowLimit?: number }\n): GristReplicaDocument {\n const limit = options.sampleRowLimit ?? 10\n const tables = Object.fromEntries(\n Object.entries(doc.tables).map(([tid, t]) => {\n if (options.includeRows === \"none\") {\n const { rows: _r, ...rest } = t\n return [tid, rest]\n }\n if (options.includeRows === \"samples\") {\n const r = t.rows ?? []\n return [tid, { ...t, rows: r.slice(0, limit) }]\n }\n return [tid, { ...t, rows: t.rows }]\n })\n ) as GristReplicaDocument[\"tables\"]\n return { ...doc, tables }\n}\n"],"mappings":";AAqCA,IAAM,kBAAkB,oBAAI,IAAI,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,KAAK,GAAG,CAAC;AAEnE,SAAS,kBAAkB,OAAoC;AAC7D,SACE,MAAM,QAAQ,KAAK,KACnB,OAAO,MAAM,CAAC,MAAM,YACpB,MAAM,CAAC,EAAE,UAAU,KACnB,gBAAgB,IAAI,MAAM,CAAC,CAAC;AAEhC;AAOO,SAAS,0BAA0B,OAAoC;AAC5E,MAAI,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,EAAG,QAAO;AAChE,MAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,MAAM,SAAS,EAAG,QAAO;AACtD,QAAM,MAAM,MAAM,CAAC;AACnB,MAAI,QAAQ,OAAO,OAAO,MAAM,CAAC,MAAM,YAAY,OAAO,SAAS,MAAM,CAAC,CAAC,EAAG,QAAO,MAAM,CAAC;AAC5F,MAAI,QAAQ,OAAO,OAAO,MAAM,CAAC,MAAM,YAAY,OAAO,SAAS,MAAM,CAAC,CAAC,EAAG,QAAO,MAAM,CAAC;AAC5F,SAAO;AACT;AAEA,SAAS,0BAA0B,QAAsC;AACvE,SAAO,QAAQ,SAAS;AAC1B;AAEA,SAAS,0BAA0B,QAAsC;AACvE,SAAO,QAAQ,SAAS;AAC1B;AAEA,SAAS,uBAAuB,QAAsC;AACpE,SAAO,OAAO,QAAQ,SAAS,YAAY,OAAO,KAAK,WAAW,UAAU;AAC9E;AAEA,SAAS,mBAAmB,QAAsC;AAChE,SAAO,OAAO,QAAQ,SAAS,YAAY,OAAO,KAAK,WAA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E,GAAG,GAAG,MAAM,EAAE,KAAK,CAAC;AAAA,IACrC,CAAC;AAAA,EACH;AACA,SAAO,EAAE,GAAG,KAAK,OAAO;AAC1B;","names":[]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coerceGristDocApiRefRowId,
|
|
3
|
+
normalizeReplicaDocumentInput
|
|
4
|
+
} from "./chunk-A4KFKOEQ.js";
|
|
5
|
+
import {
|
|
3
6
|
gristAddRecordAction,
|
|
4
7
|
gristBulkAddRecordAction,
|
|
5
8
|
gristBulkRemoveRecordAction,
|
|
6
9
|
gristBulkUpdateRecordAction,
|
|
7
10
|
gristRemoveRecordAction,
|
|
8
|
-
gristUpdateRecordAction
|
|
9
|
-
|
|
10
|
-
} from "./chunk-4ZGVKGDF.js";
|
|
11
|
+
gristUpdateRecordAction
|
|
12
|
+
} from "./chunk-YGQXH2P5.js";
|
|
11
13
|
|
|
12
14
|
// src/emulator/core/mappings.ts
|
|
13
15
|
function resolveMappings(state) {
|
|
@@ -1537,4 +1539,4 @@ export {
|
|
|
1537
1539
|
createGristEmulator,
|
|
1538
1540
|
presets
|
|
1539
1541
|
};
|
|
1540
|
-
//# sourceMappingURL=chunk-
|
|
1542
|
+
//# sourceMappingURL=chunk-CMN4M4S3.js.map
|