@colixsystems/widget-sdk 0.134.0 → 0.134.2

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.
@@ -100,8 +100,11 @@ export function makeMarkdownLinkDialog(rn, Overlay) {
100
100
  {
101
101
  key,
102
102
  onPress: () => setMode(key),
103
- accessibilityRole: "button",
104
- accessibilityState: { selected: mode === key },
103
+ // RNW 0.21.2 drops the a11y state prop, so the chosen tab was
104
+ // legible only as a fill colour (sc-6350). role + aria-* announces
105
+ // on both hosts; aria-selected needs role="tab", not "button".
106
+ accessibilityRole: "tab",
107
+ "aria-selected": mode === key,
105
108
  testID: testID ? `${testID}-mode-${key}` : undefined,
106
109
  style: {
107
110
  paddingVertical: tokens.markerGap,
@@ -189,7 +192,10 @@ export function makeMarkdownLinkDialog(rn, Overlay) {
189
192
  canPickPage
190
193
  ? React.createElement(
191
194
  View,
192
- { style: { flexDirection: "row", marginBottom: tokens.blockGap } },
195
+ {
196
+ accessibilityRole: "tablist",
197
+ style: { flexDirection: "row", marginBottom: tokens.blockGap },
198
+ },
193
199
  tab("page", "A page in this app"),
194
200
  tab("url", "An external URL"),
195
201
  )
@@ -202,6 +208,7 @@ export function makeMarkdownLinkDialog(rn, Overlay) {
202
208
  React.createElement(
203
209
  ScrollView,
204
210
  {
211
+ accessibilityRole: "radiogroup",
205
212
  style: {
206
213
  maxHeight: PAGE_LIST_MAX_HEIGHT,
207
214
  borderWidth: 1,
@@ -216,8 +223,8 @@ export function makeMarkdownLinkDialog(rn, Overlay) {
216
223
  {
217
224
  key: page.id,
218
225
  onPress: () => setPageId(page.id),
219
- accessibilityRole: "button",
220
- accessibilityState: { selected: pageId === page.id },
226
+ accessibilityRole: "radio",
227
+ "aria-checked": pageId === page.id,
221
228
  style: {
222
229
  padding: tokens.markerGap,
223
230
  ...(pageId === page.id
@@ -329,6 +329,21 @@ function cloneDefault(value) {
329
329
  return JSON.parse(JSON.stringify(value));
330
330
  }
331
331
 
332
+ // sc-6996: a schema key naming the prototype slot would make `out[k] = …` a
333
+ // SETTER rather than a write. Define it so the default lands as own data.
334
+ function setResolved(target, key, value) {
335
+ if (key === "__proto__") {
336
+ Object.defineProperty(target, key, {
337
+ value,
338
+ writable: true,
339
+ enumerable: true,
340
+ configurable: true,
341
+ });
342
+ return;
343
+ }
344
+ target[key] = value;
345
+ }
346
+
332
347
  function resolveLeaf(def, value) {
333
348
  if (!isPlainObject(def)) return value;
334
349
  if (value === undefined || value === null) {
@@ -341,7 +356,9 @@ function resolveLeaf(def, value) {
341
356
  ) {
342
357
  const out = { ...value };
343
358
  for (const [k, child] of Object.entries(def.properties)) {
344
- out[k] = resolveLeaf(child, value[k]);
359
+ // Unreachable for "__proto__" here (value[k] reads the prototype, never
360
+ // undefined, so no default applies) — kept so both sinks stay one rule.
361
+ setResolved(out, k, resolveLeaf(child, value[k]));
345
362
  }
346
363
  return out;
347
364
  }
@@ -370,7 +387,7 @@ export function resolveProps(schema, props) {
370
387
  if (!isPlainObject(schema)) return input;
371
388
  const out = { ...input };
372
389
  for (const [k, def] of Object.entries(schema)) {
373
- out[k] = resolveLeaf(def, input[k]);
390
+ setResolved(out, k, resolveLeaf(def, input[k]));
374
391
  }
375
392
  return out;
376
393
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colixsystems/widget-sdk",
3
- "version": "0.134.0",
3
+ "version": "0.134.2",
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",