@colixsystems/widget-sdk 0.288.0 → 0.289.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 +5 -1
- package/dist/contract.cjs +4 -2
- package/dist/contract.js +4 -2
- package/dist/index.d.ts +1 -1
- package/dist/manifest.cjs +2 -2
- package/dist/manifest.js +2 -2
- package/package.json +1 -1
- package/src/contract.js +4 -2
package/README.md
CHANGED
|
@@ -90,7 +90,11 @@ See the design reference for the full architecture: [`docs/architecture/widget-m
|
|
|
90
90
|
|
|
91
91
|
## Status
|
|
92
92
|
|
|
93
|
-
`v0.
|
|
93
|
+
`v0.289.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**.
|
|
94
|
+
|
|
95
|
+
### What's new in 0.289.0 (contract 1.237.0)
|
|
96
|
+
|
|
97
|
+
**`manifest.translations` may declare up to 500 keys (was 200).** A widget with many screens, or one that ships every label of a large form, no longer runs out of keys. Widening: every manifest that validated before still does.
|
|
94
98
|
|
|
95
99
|
### What's new in 0.288.0 (contract 1.236.0)
|
|
96
100
|
|
package/dist/contract.cjs
CHANGED
|
@@ -4176,7 +4176,7 @@ const MANIFEST_SCHEMA = {
|
|
|
4176
4176
|
type: "object",
|
|
4177
4177
|
required: false,
|
|
4178
4178
|
description:
|
|
4179
|
-
"Optional (REQ-L10N-WIDGET). Translation strings the widget ships. Shape { <key>: { en: string, <locale>?: string, ... } } — `en` is REQUIRED per key. At install the host merges these into the tenant's localization dictionary under a per-widget namespace (`widget.<manifest.id>.<key>`); `useI18n().t(\"<key>\")` resolves the namespaced key automatically, so authors never type the prefix. Non-destructive: an existing admin-edited value is never overwritten, and a language the tenant has not added is never created (values for absent locales are dropped; the widget's `en` seeds the tenant's base language so every key renders). Keys persist across uninstalls; admins prune them from the Translations admin (bulk delete by `widget.<id>.` prefix). Limits: ≤
|
|
4179
|
+
"Optional (REQ-L10N-WIDGET). Translation strings the widget ships. Shape { <key>: { en: string, <locale>?: string, ... } } — `en` is REQUIRED per key. At install the host merges these into the tenant's localization dictionary under a per-widget namespace (`widget.<manifest.id>.<key>`); `useI18n().t(\"<key>\")` resolves the namespaced key automatically, so authors never type the prefix. Non-destructive: an existing admin-edited value is never overwritten, and a language the tenant has not added is never created (values for absent locales are dropped; the widget's `en` seeds the tenant's base language so every key renders). Keys persist across uninstalls; admins prune them from the Translations admin (bulk delete by `widget.<id>.` prefix). Limits: ≤500 keys; each key matches /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/; each value ≤1 KB; the namespaced key must fit the dictionary key cap (128 chars).",
|
|
4180
4180
|
default: {},
|
|
4181
4181
|
},
|
|
4182
4182
|
};
|
|
@@ -6749,7 +6749,9 @@ const CONTRACT = deepFreeze({
|
|
|
6749
6749
|
// `order: { table_id, record_id }` the server marks paid on settlement,
|
|
6750
6750
|
// a template column may declare `paymentStatus: true`, and four new
|
|
6751
6751
|
// PaymentError codes.
|
|
6752
|
-
|
|
6752
|
+
// 1.237.0: widening — `manifest.translations` may declare up to 500 keys
|
|
6753
|
+
// (was 200).
|
|
6754
|
+
version: "1.237.0",
|
|
6753
6755
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6754
6756
|
hooks: HOOKS,
|
|
6755
6757
|
primitives: PRIMITIVES,
|
package/dist/contract.js
CHANGED
|
@@ -4172,7 +4172,7 @@ const MANIFEST_SCHEMA = {
|
|
|
4172
4172
|
type: "object",
|
|
4173
4173
|
required: false,
|
|
4174
4174
|
description:
|
|
4175
|
-
"Optional (REQ-L10N-WIDGET). Translation strings the widget ships. Shape { <key>: { en: string, <locale>?: string, ... } } — `en` is REQUIRED per key. At install the host merges these into the tenant's localization dictionary under a per-widget namespace (`widget.<manifest.id>.<key>`); `useI18n().t(\"<key>\")` resolves the namespaced key automatically, so authors never type the prefix. Non-destructive: an existing admin-edited value is never overwritten, and a language the tenant has not added is never created (values for absent locales are dropped; the widget's `en` seeds the tenant's base language so every key renders). Keys persist across uninstalls; admins prune them from the Translations admin (bulk delete by `widget.<id>.` prefix). Limits: ≤
|
|
4175
|
+
"Optional (REQ-L10N-WIDGET). Translation strings the widget ships. Shape { <key>: { en: string, <locale>?: string, ... } } — `en` is REQUIRED per key. At install the host merges these into the tenant's localization dictionary under a per-widget namespace (`widget.<manifest.id>.<key>`); `useI18n().t(\"<key>\")` resolves the namespaced key automatically, so authors never type the prefix. Non-destructive: an existing admin-edited value is never overwritten, and a language the tenant has not added is never created (values for absent locales are dropped; the widget's `en` seeds the tenant's base language so every key renders). Keys persist across uninstalls; admins prune them from the Translations admin (bulk delete by `widget.<id>.` prefix). Limits: ≤500 keys; each key matches /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/; each value ≤1 KB; the namespaced key must fit the dictionary key cap (128 chars).",
|
|
4176
4176
|
default: {},
|
|
4177
4177
|
},
|
|
4178
4178
|
};
|
|
@@ -6745,7 +6745,9 @@ const CONTRACT = deepFreeze({
|
|
|
6745
6745
|
// `order: { table_id, record_id }` the server marks paid on settlement,
|
|
6746
6746
|
// a template column may declare `paymentStatus: true`, and four new
|
|
6747
6747
|
// PaymentError codes.
|
|
6748
|
-
|
|
6748
|
+
// 1.237.0: widening — `manifest.translations` may declare up to 500 keys
|
|
6749
|
+
// (was 200).
|
|
6750
|
+
version: "1.237.0",
|
|
6749
6751
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6750
6752
|
hooks: HOOKS,
|
|
6751
6753
|
primitives: PRIMITIVES,
|
package/dist/index.d.ts
CHANGED
|
@@ -474,7 +474,7 @@ export interface WidgetManifest {
|
|
|
474
474
|
* under a per-widget namespace (`widget.<id>.<key>`), so `useI18n().t(key)`
|
|
475
475
|
* resolves the namespaced key automatically — the author never types the
|
|
476
476
|
* prefix. Non-destructive (admin edits win; absent languages are not
|
|
477
|
-
* created) and persists across uninstalls. Caps: ≤
|
|
477
|
+
* created) and persists across uninstalls. Caps: ≤500 keys, key matches
|
|
478
478
|
* /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/, value ≤1 KB.
|
|
479
479
|
*/
|
|
480
480
|
translations?: Record<string, { en: string } & Record<string, string>>;
|
package/dist/manifest.cjs
CHANGED
|
@@ -47,8 +47,8 @@ const VALID_PLATFORMS = new Set(["web", "native"]);
|
|
|
47
47
|
// backend/src/core/services/l10n.service.js). The locale pattern mirrors that
|
|
48
48
|
// service's LANG_CODE_RE so a manifest can't declare a locale the dictionary
|
|
49
49
|
// would reject.
|
|
50
|
-
//
|
|
51
|
-
const TRANSLATIONS_MAX_KEYS =
|
|
50
|
+
// Bounds one package's rows in a workspace's translation dictionary.
|
|
51
|
+
const TRANSLATIONS_MAX_KEYS = 500;
|
|
52
52
|
const TRANSLATION_VALUE_MAX_BYTES = 1024;
|
|
53
53
|
const TRANSLATION_KEY_RE = /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/;
|
|
54
54
|
const TRANSLATION_LOCALE_RE = /^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/;
|
package/dist/manifest.js
CHANGED
|
@@ -42,8 +42,8 @@ const VALID_PLATFORMS = new Set(["web", "native"]);
|
|
|
42
42
|
// backend/src/core/services/l10n.service.js). The locale pattern mirrors that
|
|
43
43
|
// service's LANG_CODE_RE so a manifest can't declare a locale the dictionary
|
|
44
44
|
// would reject.
|
|
45
|
-
//
|
|
46
|
-
const TRANSLATIONS_MAX_KEYS =
|
|
45
|
+
// Bounds one package's rows in a workspace's translation dictionary.
|
|
46
|
+
const TRANSLATIONS_MAX_KEYS = 500;
|
|
47
47
|
const TRANSLATION_VALUE_MAX_BYTES = 1024;
|
|
48
48
|
const TRANSLATION_KEY_RE = /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/;
|
|
49
49
|
const TRANSLATION_LOCALE_RE = /^[a-z]{2,3}(-[A-Za-z0-9]{2,8})?$/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.289.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"homepage": "https://github.com/Colix-AB/AppStudio",
|
|
6
6
|
"type": "module",
|
package/src/contract.js
CHANGED
|
@@ -4172,7 +4172,7 @@ const MANIFEST_SCHEMA = {
|
|
|
4172
4172
|
type: "object",
|
|
4173
4173
|
required: false,
|
|
4174
4174
|
description:
|
|
4175
|
-
"Optional (REQ-L10N-WIDGET). Translation strings the widget ships. Shape { <key>: { en: string, <locale>?: string, ... } } — `en` is REQUIRED per key. At install the host merges these into the tenant's localization dictionary under a per-widget namespace (`widget.<manifest.id>.<key>`); `useI18n().t(\"<key>\")` resolves the namespaced key automatically, so authors never type the prefix. Non-destructive: an existing admin-edited value is never overwritten, and a language the tenant has not added is never created (values for absent locales are dropped; the widget's `en` seeds the tenant's base language so every key renders). Keys persist across uninstalls; admins prune them from the Translations admin (bulk delete by `widget.<id>.` prefix). Limits: ≤
|
|
4175
|
+
"Optional (REQ-L10N-WIDGET). Translation strings the widget ships. Shape { <key>: { en: string, <locale>?: string, ... } } — `en` is REQUIRED per key. At install the host merges these into the tenant's localization dictionary under a per-widget namespace (`widget.<manifest.id>.<key>`); `useI18n().t(\"<key>\")` resolves the namespaced key automatically, so authors never type the prefix. Non-destructive: an existing admin-edited value is never overwritten, and a language the tenant has not added is never created (values for absent locales are dropped; the widget's `en` seeds the tenant's base language so every key renders). Keys persist across uninstalls; admins prune them from the Translations admin (bulk delete by `widget.<id>.` prefix). Limits: ≤500 keys; each key matches /^[A-Za-z][A-Za-z0-9_.-]{0,63}$/; each value ≤1 KB; the namespaced key must fit the dictionary key cap (128 chars).",
|
|
4176
4176
|
default: {},
|
|
4177
4177
|
},
|
|
4178
4178
|
};
|
|
@@ -6745,7 +6745,9 @@ const CONTRACT = deepFreeze({
|
|
|
6745
6745
|
// `order: { table_id, record_id }` the server marks paid on settlement,
|
|
6746
6746
|
// a template column may declare `paymentStatus: true`, and four new
|
|
6747
6747
|
// PaymentError codes.
|
|
6748
|
-
|
|
6748
|
+
// 1.237.0: widening — `manifest.translations` may declare up to 500 keys
|
|
6749
|
+
// (was 200).
|
|
6750
|
+
version: "1.237.0",
|
|
6749
6751
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6750
6752
|
hooks: HOOKS,
|
|
6751
6753
|
primitives: PRIMITIVES,
|