@colixsystems/widget-sdk 0.343.1 → 0.344.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.
@@ -26,7 +26,7 @@
26
26
  // consumed so an escaped quote (`"\""`) doesn't end the literal early.
27
27
  function stripNonCode(
28
28
  source,
29
- { keepStrings = false, keepTemplates = keepStrings } = {},
29
+ { keepStrings = false, keepTemplates = keepStrings, keepHoleBraces = false } = {},
30
30
  ) {
31
31
  const n = source.length;
32
32
  // Code units, not `out += ch`: a per-character rope costs superlinear GC.
@@ -92,7 +92,9 @@ function stripNonCode(
92
92
  ) {
93
93
  tmplStack.pop();
94
94
  mode = "tmpl";
95
- str(ch);
95
+ // Kept on request, so a bracket matcher pairs `${` with its `}`.
96
+ if (keepHoleBraces) keep(ch);
97
+ else str(ch);
96
98
  } else {
97
99
  keep(ch);
98
100
  }
@@ -22,7 +22,7 @@
22
22
  // consumed so an escaped quote (`"\""`) doesn't end the literal early.
23
23
  export function stripNonCode(
24
24
  source,
25
- { keepStrings = false, keepTemplates = keepStrings } = {},
25
+ { keepStrings = false, keepTemplates = keepStrings, keepHoleBraces = false } = {},
26
26
  ) {
27
27
  const n = source.length;
28
28
  // Code units, not `out += ch`: a per-character rope costs superlinear GC.
@@ -88,7 +88,9 @@ export function stripNonCode(
88
88
  ) {
89
89
  tmplStack.pop();
90
90
  mode = "tmpl";
91
- str(ch);
91
+ // Kept on request, so a bracket matcher pairs `${` with its `}`.
92
+ if (keepHoleBraces) keep(ch);
93
+ else str(ch);
92
94
  } else {
93
95
  keep(ch);
94
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.343.1",
3
+ "version": "0.344.0",
4
4
  "description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/contract.js CHANGED
@@ -7144,7 +7144,11 @@ const CONTRACT = deepFreeze({
7144
7144
  // 1.280.0: additive (sc-18010) — connections.add and connections.signIn
7145
7145
  // may reject SIGN_IN_NEEDS_SETUP (422): the server's sign-in needs the
7146
7146
  // app's administrator to register it first. No token fixes it.
7147
- version: "1.280.0",
7147
+ // 1.281.0: stricter lint (sc-18484) — a date shown with a fixed pattern or
7148
+ // locale (date-fns format(d, "dd/MM/yyyy"), toLocaleDateString("en-GB"),
7149
+ // a hand-built getDate()/getMonth() string) is the `date-shown-fixed-format`
7150
+ // warning; the widget agent's publish gate blocks on it.
7151
+ version: "1.281.0",
7148
7152
  sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
7149
7153
  hooks: HOOKS,
7150
7154
  primitives: PRIMITIVES,