@colixsystems/widget-sdk 0.105.0 → 0.106.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/README.md +19 -2
- package/dist/contract.cjs +12 -2
- package/dist/contract.js +12 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,24 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
68
68
|
|
|
69
69
|
## Status
|
|
70
70
|
|
|
71
|
-
`v0.
|
|
71
|
+
`v0.106.0` — pre-publish. The package surface (types, function names, export paths) is the v1 contract; runtime behaviour for some hooks is stubbed (each hook documents what's wired and what isn't). It is **not yet published to npm**.
|
|
72
|
+
|
|
73
|
+
### What's new in 0.106.0 (contract 1.80.0)
|
|
74
|
+
|
|
75
|
+
**A `required` `tableRef` can now say the table is the APP'S, not the widget's — `sharedTable: true` (sc-5982).** sc-2791's publish gate `manifest.requiredTableRefsHaveTemplate` counted only two kinds of satisfying table: one the widget seeds via `datastoreTemplate`, and one the host hands in when the in-Studio agent delegates a build. A widget that legitimately reads a table it does not own — a chart, a metric, a map, a manager view over another widget's table — could satisfy neither when publishing on its own, so the only way through the gate was to drop `required`. That trades a publish error for a worse runtime one: an unbound widget renders an empty tile and the author gets no warning. (In this repo it also took down every first-party publish for twelve days.)
|
|
76
|
+
|
|
77
|
+
`sharedTable: true` on a `tableRef` property says "required, but the author supplies the table; I seed nothing for it". It exempts the property from the seeding duty only — the property stays `required`, the author must still bind a table, and the host still refuses to place the widget unbound. Pick between the two shapes by asking who owns the data:
|
|
78
|
+
|
|
79
|
+
```js
|
|
80
|
+
propertySchema: {
|
|
81
|
+
// The widget owns its data → seed it.
|
|
82
|
+
messagesTableId: { type: "tableRef", label: "Messages", required: true },
|
|
83
|
+
// The app owns the data, the author points at it → declare it shared.
|
|
84
|
+
sourceTableId: { type: "tableRef", label: "Source table", required: true, sharedTable: true },
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Leaving a `required` `tableRef` with neither a seeded table nor `sharedTable` is still rejected at publish, and the rejection still names the offending properties. Additive: every manifest that passed before passes now.
|
|
72
89
|
|
|
73
90
|
### What's new in 0.105.0 (contract unchanged)
|
|
74
91
|
|
|
@@ -547,7 +564,7 @@ useEffect(() => {
|
|
|
547
564
|
|
|
548
565
|
### What's new in 0.57.0
|
|
549
566
|
|
|
550
|
-
**A `required: true` `tableRef` must ship a matching `datastoreTemplate` table (sc-2791).** A widget property that the author cannot skip — a `tableRef` you mark `required: true` — must have a table to bind on install, or the end user has nothing to pick and the widget can't load its data. The marketplace analyzer now enforces this at publish: the check `manifest.requiredTableRefsHaveTemplate` rejects a manifest whose `datastoreTemplate.tables` count is fewer than its `required` `tableRef` property count, naming the offending properties. Two ways to clear it: seed a `datastoreTemplate` table for each required `tableRef` (the default — the widget owns its data), OR
|
|
567
|
+
**A `required: true` `tableRef` must ship a matching `datastoreTemplate` table (sc-2791).** A widget property that the author cannot skip — a `tableRef` you mark `required: true` — must have a table to bind on install, or the end user has nothing to pick and the widget can't load its data. The marketplace analyzer now enforces this at publish: the check `manifest.requiredTableRefsHaveTemplate` rejects a manifest whose `datastoreTemplate.tables` count is fewer than its `required` `tableRef` property count, naming the offending properties. Two ways to clear it: seed a `datastoreTemplate` table for each required `tableRef` (the default — the widget owns its data), OR mark the property `sharedTable: true` when it binds a table the app already owns (0.106.0 — it stays `required`, so the author must still bind one). Dropping `required` also clears the gate but is the wrong fix: an optional table prop lets the widget ship unbound and render an empty tile. This tightens the existing "always ship a `datastoreTemplate` for a data widget" guidance into an enforced rule for the `required` case. No export, type, or hook changed shape — additive publish-gate + documentation. `CONTRACT` is unchanged (no new field).
|
|
551
568
|
|
|
552
569
|
### What's new in 0.55.0
|
|
553
570
|
|
package/dist/contract.cjs
CHANGED
|
@@ -1903,7 +1903,7 @@ const MANIFEST_SCHEMA = {
|
|
|
1903
1903
|
type: "object",
|
|
1904
1904
|
required: false,
|
|
1905
1905
|
description:
|
|
1906
|
-
"Optional. Tables the widget needs, seeded into the workspace at install time. Authors wire them into the widget's `tableRef` properties via the Properties Panel — the SDK does not auto-bind. Limits: 8 tables, 24 columns per table. RELATION columns address siblings by `targetSuffix` (must be declared earlier in the array). Tables persist across uninstalls.",
|
|
1906
|
+
"Optional. Tables the widget needs, seeded into the workspace at install time. Authors wire them into the widget's `tableRef` properties via the Properties Panel — the SDK does not auto-bind. Limits: 8 tables, 24 columns per table. RELATION columns address siblings by `targetSuffix` (must be declared earlier in the array). Tables persist across uninstalls. A `tableRef` property may also carry `sharedTable: true`, declaring that the table is the APP'S OWN — the author picks an existing table and the widget seeds nothing for it. That is the correct shape for a widget that reads data it does not own (a chart, a metric, a manager view over another widget's table). `sharedTable` exempts the property from needing a seeded table at publish (`manifest.requiredTableRefsHaveTemplate`) WITHOUT making it optional: the author must still bind one, and the host still refuses to place the widget unbound. Use it instead of dropping `required` — a widget that silently renders an empty tile is the defect it looks like a fix for.",
|
|
1907
1907
|
},
|
|
1908
1908
|
translations: {
|
|
1909
1909
|
type: "object",
|
|
@@ -3301,7 +3301,17 @@ const CONTRACT = deepFreeze({
|
|
|
3301
3301
|
// per-scalar limits never stated, so the worst-case unauthenticated
|
|
3302
3302
|
// payload is SMALLER than before. `__proto__`-style keys are refused at
|
|
3303
3303
|
// every level. Additive: every value accepted before is accepted now.
|
|
3304
|
-
|
|
3304
|
+
// 1.80.0: additive (sc-5982) — a `tableRef` property may declare
|
|
3305
|
+
// `sharedTable: true`: "required, but the author supplies the table; the
|
|
3306
|
+
// widget seeds nothing." The publish gate
|
|
3307
|
+
// `manifest.requiredTableRefsHaveTemplate` counted only seeded
|
|
3308
|
+
// `datastoreTemplate` tables and Mason-supplied bound tables, so a widget
|
|
3309
|
+
// that legitimately reads an app-owned table (Chart, Metric, Map, a
|
|
3310
|
+
// manager view) could never satisfy it when publishing standalone — which
|
|
3311
|
+
// blocked every first-party publish for twelve days. The flag separates
|
|
3312
|
+
// who PROVIDES the table from whether the author may skip it; `required`
|
|
3313
|
+
// still means required.
|
|
3314
|
+
version: "1.80.0",
|
|
3305
3315
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
3306
3316
|
hooks: HOOKS,
|
|
3307
3317
|
primitives: PRIMITIVES,
|
package/dist/contract.js
CHANGED
|
@@ -1903,7 +1903,7 @@ const MANIFEST_SCHEMA = {
|
|
|
1903
1903
|
type: "object",
|
|
1904
1904
|
required: false,
|
|
1905
1905
|
description:
|
|
1906
|
-
"Optional. Tables the widget needs, seeded into the workspace at install time. Authors wire them into the widget's `tableRef` properties via the Properties Panel — the SDK does not auto-bind. Limits: 8 tables, 24 columns per table. RELATION columns address siblings by `targetSuffix` (must be declared earlier in the array). Tables persist across uninstalls.",
|
|
1906
|
+
"Optional. Tables the widget needs, seeded into the workspace at install time. Authors wire them into the widget's `tableRef` properties via the Properties Panel — the SDK does not auto-bind. Limits: 8 tables, 24 columns per table. RELATION columns address siblings by `targetSuffix` (must be declared earlier in the array). Tables persist across uninstalls. A `tableRef` property may also carry `sharedTable: true`, declaring that the table is the APP'S OWN — the author picks an existing table and the widget seeds nothing for it. That is the correct shape for a widget that reads data it does not own (a chart, a metric, a manager view over another widget's table). `sharedTable` exempts the property from needing a seeded table at publish (`manifest.requiredTableRefsHaveTemplate`) WITHOUT making it optional: the author must still bind one, and the host still refuses to place the widget unbound. Use it instead of dropping `required` — a widget that silently renders an empty tile is the defect it looks like a fix for.",
|
|
1907
1907
|
},
|
|
1908
1908
|
translations: {
|
|
1909
1909
|
type: "object",
|
|
@@ -3301,7 +3301,17 @@ const CONTRACT = deepFreeze({
|
|
|
3301
3301
|
// per-scalar limits never stated, so the worst-case unauthenticated
|
|
3302
3302
|
// payload is SMALLER than before. `__proto__`-style keys are refused at
|
|
3303
3303
|
// every level. Additive: every value accepted before is accepted now.
|
|
3304
|
-
|
|
3304
|
+
// 1.80.0: additive (sc-5982) — a `tableRef` property may declare
|
|
3305
|
+
// `sharedTable: true`: "required, but the author supplies the table; the
|
|
3306
|
+
// widget seeds nothing." The publish gate
|
|
3307
|
+
// `manifest.requiredTableRefsHaveTemplate` counted only seeded
|
|
3308
|
+
// `datastoreTemplate` tables and Mason-supplied bound tables, so a widget
|
|
3309
|
+
// that legitimately reads an app-owned table (Chart, Metric, Map, a
|
|
3310
|
+
// manager view) could never satisfy it when publishing standalone — which
|
|
3311
|
+
// blocked every first-party publish for twelve days. The flag separates
|
|
3312
|
+
// who PROVIDES the table from whether the author may skip it; `required`
|
|
3313
|
+
// still means required.
|
|
3314
|
+
version: "1.80.0",
|
|
3305
3315
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
3306
3316
|
hooks: HOOKS,
|
|
3307
3317
|
primitives: PRIMITIVES,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.106.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|