@qontinui/ui-bridge-native 0.7.0 → 0.8.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.
@@ -11,6 +11,164 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
11
11
  throw Error('Dynamic require of "' + x + '" is not supported');
12
12
  });
13
13
 
14
+ // src/core/sha256.ts
15
+ var K = new Uint32Array([
16
+ 1116352408,
17
+ 1899447441,
18
+ 3049323471,
19
+ 3921009573,
20
+ 961987163,
21
+ 1508970993,
22
+ 2453635748,
23
+ 2870763221,
24
+ 3624381080,
25
+ 310598401,
26
+ 607225278,
27
+ 1426881987,
28
+ 1925078388,
29
+ 2162078206,
30
+ 2614888103,
31
+ 3248222580,
32
+ 3835390401,
33
+ 4022224774,
34
+ 264347078,
35
+ 604807628,
36
+ 770255983,
37
+ 1249150122,
38
+ 1555081692,
39
+ 1996064986,
40
+ 2554220882,
41
+ 2821834349,
42
+ 2952996808,
43
+ 3210313671,
44
+ 3336571891,
45
+ 3584528711,
46
+ 113926993,
47
+ 338241895,
48
+ 666307205,
49
+ 773529912,
50
+ 1294757372,
51
+ 1396182291,
52
+ 1695183700,
53
+ 1986661051,
54
+ 2177026350,
55
+ 2456956037,
56
+ 2730485921,
57
+ 2820302411,
58
+ 3259730800,
59
+ 3345764771,
60
+ 3516065817,
61
+ 3600352804,
62
+ 4094571909,
63
+ 275423344,
64
+ 430227734,
65
+ 506948616,
66
+ 659060556,
67
+ 883997877,
68
+ 958139571,
69
+ 1322822218,
70
+ 1537002063,
71
+ 1747873779,
72
+ 1955562222,
73
+ 2024104815,
74
+ 2227730452,
75
+ 2361852424,
76
+ 2428436474,
77
+ 2756734187,
78
+ 3204031479,
79
+ 3329325298
80
+ ]);
81
+ var H0 = [
82
+ 1779033703,
83
+ 3144134277,
84
+ 1013904242,
85
+ 2773480762,
86
+ 1359893119,
87
+ 2600822924,
88
+ 528734635,
89
+ 1541459225
90
+ ];
91
+ function utf8Bytes(input) {
92
+ const out = [];
93
+ for (let i = 0; i < input.length; i++) {
94
+ let cp = input.charCodeAt(i);
95
+ if (cp >= 55296 && cp <= 56319) {
96
+ const next = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;
97
+ if (next >= 56320 && next <= 57343) {
98
+ cp = 65536 + (cp - 55296 << 10) + (next - 56320);
99
+ i++;
100
+ } else {
101
+ cp = 65533;
102
+ }
103
+ } else if (cp >= 56320 && cp <= 57343) {
104
+ cp = 65533;
105
+ }
106
+ if (cp < 128) {
107
+ out.push(cp);
108
+ } else if (cp < 2048) {
109
+ out.push(192 | cp >> 6, 128 | cp & 63);
110
+ } else if (cp < 65536) {
111
+ out.push(224 | cp >> 12, 128 | cp >> 6 & 63, 128 | cp & 63);
112
+ } else {
113
+ out.push(
114
+ 240 | cp >> 18,
115
+ 128 | cp >> 12 & 63,
116
+ 128 | cp >> 6 & 63,
117
+ 128 | cp & 63
118
+ );
119
+ }
120
+ }
121
+ return Uint8Array.from(out);
122
+ }
123
+ var rotr = (x, n) => x >>> n | x << 32 - n;
124
+ function sha256Hex(input) {
125
+ const bytes = utf8Bytes(input);
126
+ const blockBytes = Math.ceil((bytes.length + 9) / 64) * 64;
127
+ const buffer = new Uint8Array(blockBytes);
128
+ buffer.set(bytes);
129
+ buffer[bytes.length] = 128;
130
+ const view = new DataView(buffer.buffer);
131
+ const bitLength = bytes.length * 8;
132
+ view.setUint32(blockBytes - 8, Math.floor(bitLength / 4294967296));
133
+ view.setUint32(blockBytes - 4, bitLength >>> 0);
134
+ const h = H0.slice();
135
+ const w = new Uint32Array(64);
136
+ for (let block = 0; block < blockBytes; block += 64) {
137
+ for (let t = 0; t < 16; t++) w[t] = view.getUint32(block + t * 4);
138
+ for (let t = 16; t < 64; t++) {
139
+ const s0 = rotr(w[t - 15], 7) ^ rotr(w[t - 15], 18) ^ w[t - 15] >>> 3;
140
+ const s1 = rotr(w[t - 2], 17) ^ rotr(w[t - 2], 19) ^ w[t - 2] >>> 10;
141
+ w[t] = w[t - 16] + s0 + w[t - 7] + s1;
142
+ }
143
+ let [a, b, c, d, e, f, g, hh] = h;
144
+ for (let t = 0; t < 64; t++) {
145
+ const S1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
146
+ const ch = e & f ^ ~e & g;
147
+ const t1 = hh + S1 + ch + K[t] + w[t] | 0;
148
+ const S0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
149
+ const maj = a & b ^ a & c ^ b & c;
150
+ const t2 = S0 + maj | 0;
151
+ hh = g;
152
+ g = f;
153
+ f = e;
154
+ e = d + t1 | 0;
155
+ d = c;
156
+ c = b;
157
+ b = a;
158
+ a = t1 + t2 | 0;
159
+ }
160
+ h[0] = h[0] + a | 0;
161
+ h[1] = h[1] + b | 0;
162
+ h[2] = h[2] + c | 0;
163
+ h[3] = h[3] + d | 0;
164
+ h[4] = h[4] + e | 0;
165
+ h[5] = h[5] + f | 0;
166
+ h[6] = h[6] + g | 0;
167
+ h[7] = h[7] + hh | 0;
168
+ }
169
+ return h.map((word) => (word >>> 0).toString(16).padStart(8, "0")).join("");
170
+ }
171
+
14
172
  // src/core/vision-fields.ts
15
173
  var INTERACTIVE_HANDLER_NAMES = /* @__PURE__ */ new Set([
16
174
  "onPress",
@@ -94,13 +252,18 @@ var NAMED_COLORS = {
94
252
  gray: { r: 128, g: 128, b: 128 },
95
253
  grey: { r: 128, g: 128, b: 128 },
96
254
  silver: { r: 192, g: 192, b: 192 },
97
- transparent: { r: 0, g: 0, b: 0 },
98
255
  orange: { r: 255, g: 165, b: 0 },
99
256
  yellow: { r: 255, g: 255, b: 0 },
100
257
  purple: { r: 128, g: 0, b: 128 },
101
258
  navy: { r: 0, g: 0, b: 128 }
102
259
  };
103
260
  var clamp255 = (n) => Math.max(0, Math.min(255, Math.round(n)));
261
+ function parseAlpha(p) {
262
+ const pct = p.endsWith("%");
263
+ const n = parseFloat(pct ? p.slice(0, -1) : p);
264
+ if (!Number.isFinite(n)) return void 0;
265
+ return Math.min(1, pct ? n / 100 : n);
266
+ }
104
267
  function parseColorToRgb(input) {
105
268
  if (typeof input !== "string") return void 0;
106
269
  const raw = input.trim().toLowerCase();
@@ -111,6 +274,7 @@ function parseColorToRgb(input) {
111
274
  if (raw.startsWith("#")) {
112
275
  const hex = raw.slice(1);
113
276
  if (hex.length === 3 || hex.length === 4) {
277
+ if (hex.length === 4 && hex[3] !== "f") return void 0;
114
278
  const r = parseInt(hex[0] + hex[0], 16);
115
279
  const g = parseInt(hex[1] + hex[1], 16);
116
280
  const b = parseInt(hex[2] + hex[2], 16);
@@ -118,6 +282,7 @@ function parseColorToRgb(input) {
118
282
  return void 0;
119
283
  }
120
284
  if (hex.length === 6 || hex.length === 8) {
285
+ if (hex.length === 8 && hex.slice(6, 8) !== "ff") return void 0;
121
286
  const r = parseInt(hex.slice(0, 2), 16);
122
287
  const g = parseInt(hex.slice(2, 4), 16);
123
288
  const b = parseInt(hex.slice(4, 6), 16);
@@ -129,7 +294,11 @@ function parseColorToRgb(input) {
129
294
  const rgbMatch = raw.match(/^rgba?\(([^)]+)\)$/);
130
295
  if (rgbMatch) {
131
296
  const parts = rgbMatch[1].split(",").map((p) => p.trim());
132
- if (parts.length < 3) return void 0;
297
+ if (parts.length < 3 || parts.length > 4) return void 0;
298
+ if (parts.length === 4) {
299
+ const alpha = parseAlpha(parts[3]);
300
+ if (alpha === void 0 || alpha < 1) return void 0;
301
+ }
133
302
  const channel = (p) => {
134
303
  if (p.endsWith("%")) {
135
304
  const pct = parseFloat(p.slice(0, -1));
@@ -161,13 +330,87 @@ function parseFontSizePx(input) {
161
330
  }
162
331
  return void 0;
163
332
  }
333
+ var ASCII_WHITESPACE_EDGES = /^[\t\n\f\r ]+|[\t\n\f\r ]+$/g;
334
+ function nonEmptyString(v) {
335
+ return typeof v === "string" && v.length > 0 ? v : void 0;
336
+ }
337
+ var OBJECT_FIT_TO_RESIZE_MODE = /* @__PURE__ */ new Map([
338
+ ["contain", "contain"],
339
+ ["cover", "cover"],
340
+ ["fill", "stretch"],
341
+ ["scale-down", "contain"],
342
+ ["none", "none"]
343
+ ]);
344
+ var RESIZE_MODE_TO_OBJECT_FIT = /* @__PURE__ */ new Map([
345
+ ["cover", "cover"],
346
+ ["contain", "contain"],
347
+ ["stretch", "fill"],
348
+ ["center", "scale-down"],
349
+ ["none", "none"]
350
+ ]);
351
+ function resolveObjectFit(props, flatStyle) {
352
+ const styleFit = nonEmptyString(flatStyle?.objectFit);
353
+ const mode = (styleFit !== void 0 ? OBJECT_FIT_TO_RESIZE_MODE.get(styleFit) : void 0) ?? nonEmptyString(props?.resizeMode) ?? nonEmptyString(flatStyle?.resizeMode);
354
+ return mode !== void 0 ? RESIZE_MODE_TO_OBJECT_FIT.get(mode) : void 0;
355
+ }
356
+ function resolveImageSource(props) {
357
+ if (!props) return void 0;
358
+ if (props.srcSet !== void 0 && props.srcSet !== null) return void 0;
359
+ const src = nonEmptyString(props.src);
360
+ if (src !== void 0) return src;
361
+ const source = props.source;
362
+ const one = Array.isArray(source) ? source.length === 1 ? source[0] : void 0 : source;
363
+ if (one && typeof one === "object") {
364
+ return nonEmptyString(one.uri);
365
+ }
366
+ return void 0;
367
+ }
368
+ function isHiddenFromAccessibility(props) {
369
+ if (!props) return false;
370
+ return props.accessible === false && props.alt === void 0 || props.importantForAccessibility === "no" || props.importantForAccessibility === "no-hide-descendants" || props.accessibilityElementsHidden === true;
371
+ }
372
+ function resolveImageLabel(props, registryLabel) {
373
+ if (props === void 0) return registryLabel;
374
+ const own = props["aria-label"] ?? props.accessibilityLabel ?? props.alt;
375
+ return typeof own === "string" ? own : void 0;
376
+ }
377
+ function projectMedia(args) {
378
+ const { layout, props, flatStyle, accessibilityLabel, inViewport } = args;
379
+ const media = { kind: "img" };
380
+ if (layout && Number.isFinite(layout.width) && Number.isFinite(layout.height) && layout.width >= 0 && layout.height >= 0) {
381
+ media.rendered_px = { w: layout.width, h: layout.height };
382
+ }
383
+ const objectFit = resolveObjectFit(props, flatStyle);
384
+ if (objectFit !== void 0) media.object_fit = objectFit;
385
+ if (isHiddenFromAccessibility(props)) {
386
+ media.alt = { decorative: true };
387
+ } else {
388
+ const label = resolveImageLabel(props, accessibilityLabel);
389
+ const text = label?.replace(ASCII_WHITESPACE_EDGES, "");
390
+ if (text) media.alt = { decorative: false, text };
391
+ }
392
+ const src = resolveImageSource(props);
393
+ if (src !== void 0) media.src_digest = sha256Hex(src);
394
+ if (inViewport !== void 0) media.in_viewport = inViewport;
395
+ return media;
396
+ }
164
397
  function projectVisionFields(args) {
165
398
  const { type, label, handlerNames, state, flatStyle } = args;
166
399
  const fields = {
167
400
  interactable: deriveInteractable(type, handlerNames)
168
401
  };
169
- const text = deriveText(state, label);
170
- if (text !== void 0) fields.text = text;
402
+ if (type === "image") {
403
+ fields.media = projectMedia({
404
+ layout: state.layout,
405
+ props: args.props,
406
+ flatStyle,
407
+ accessibilityLabel: args.accessibilityLabel,
408
+ inViewport: args.inViewport
409
+ });
410
+ } else {
411
+ const text = deriveText(state, label);
412
+ if (text !== void 0) fields.text = text;
413
+ }
171
414
  const role = roleForType(type);
172
415
  if (role !== void 0) fields.role = role;
173
416
  if (flatStyle) {
@@ -307,11 +550,17 @@ function computeVisibility(state, clip) {
307
550
  if (!rect) {
308
551
  return { visibility: "visible" };
309
552
  }
310
- if (isEmptyRect(clip)) {
311
- return { visibility: "hidden", visibilityReason: "off-screen" };
312
- }
313
- const onScreen = spansOverlap(rect.left, rect.right, clip.left, clip.right) && spansOverlap(rect.top, rect.bottom, clip.top, clip.bottom);
314
- return onScreen ? { visibility: "visible" } : { visibility: "hidden", visibilityReason: "off-screen" };
553
+ return rectReachesClip(rect, clip) ? { visibility: "visible" } : { visibility: "hidden", visibilityReason: "off-screen" };
554
+ }
555
+ function rectReachesClip(rect, clip) {
556
+ if (isEmptyRect(clip)) return false;
557
+ return spansOverlap(rect.left, rect.right, clip.left, clip.right) && spansOverlap(rect.top, rect.bottom, clip.top, clip.bottom);
558
+ }
559
+ function computeInViewport(state, clip) {
560
+ if (!state.visible || !clip) return void 0;
561
+ const rect = pageRectOf(state);
562
+ if (!rect) return void 0;
563
+ return rectReachesClip(rect, clip);
315
564
  }
316
565
  function copyRouteInfo(info) {
317
566
  const copy = { ...info };
@@ -1254,10 +1503,9 @@ var NativeUIBridgeRegistry = class {
1254
1503
  elements: elements.map((e) => {
1255
1504
  const handlers = extractHandlerNames(e.props);
1256
1505
  const state = e.getState();
1257
- const { visibility, visibilityReason } = computeVisibility(
1258
- state,
1259
- this.getClipRectFor(e, viewport)
1260
- );
1506
+ const identifier = e.getIdentifier();
1507
+ const clip = this.getClipRectFor(e, viewport);
1508
+ const { visibility, visibilityReason } = computeVisibility(state, clip);
1261
1509
  const bbox = projectBbox(state, visibility, this.pixelRatio);
1262
1510
  const vision = projectVisionFields({
1263
1511
  type: e.type,
@@ -1268,13 +1516,16 @@ var NativeUIBridgeRegistry = class {
1268
1516
  // using it would mark plain text/view nodes interactable.
1269
1517
  handlerNames: handlers,
1270
1518
  state,
1271
- flatStyle: e.flatStyle
1519
+ flatStyle: e.flatStyle,
1520
+ props: e.props,
1521
+ accessibilityLabel: identifier.accessibilityLabel,
1522
+ inViewport: computeInViewport(state, clip)
1272
1523
  });
1273
1524
  return {
1274
1525
  id: e.id,
1275
1526
  type: e.type,
1276
1527
  label: e.label,
1277
- identifier: e.getIdentifier(),
1528
+ identifier,
1278
1529
  state,
1279
1530
  actions: e.actions,
1280
1531
  customActions: serializeElementCustomActions(e.customActions),
@@ -3361,7 +3612,7 @@ var NATIVE_PAGE_HEALTH_PRODUCER_ID = "sdk-native/page-health";
3361
3612
  function defaultProducer() {
3362
3613
  return {
3363
3614
  id: NATIVE_PAGE_HEALTH_PRODUCER_ID,
3364
- version: "0.7.0"
3615
+ version: "0.8.0"
3365
3616
  };
3366
3617
  }
3367
3618
  function pageHealthUnknown(code, detail, options = {}) {
@@ -3403,14 +3654,7 @@ var LOADING_PHRASES = [
3403
3654
  "initializing",
3404
3655
  "fetching"
3405
3656
  ];
3406
- var EMPTY_PHRASES = [
3407
- "no data",
3408
- "no results",
3409
- "nothing here",
3410
- "empty",
3411
- "no items",
3412
- "get started"
3413
- ];
3657
+ var EMPTY_PHRASES = ["no data", "no results", "nothing here", "empty", "no items", "get started"];
3414
3658
  function severityRank(s) {
3415
3659
  if (s === "CRITICAL") return 3;
3416
3660
  if (s === "WARNING") return 2;
@@ -3485,20 +3729,44 @@ function observe(input, producer, evaluatedAt) {
3485
3729
  }
3486
3730
  return analyze(elements, viewport, base);
3487
3731
  }
3732
+ function nothingOnScreenDetail(elements, visibleCount, visibilityUnstated) {
3733
+ if (visibilityUnstated === 0 && visibleCount > 0) {
3734
+ return `all ${visibleCount} visible element(s) have no measured layout yet, so spatial coverage, layout regions and visual anomalies cannot be measured`;
3735
+ }
3736
+ if (visibilityUnstated > 0) {
3737
+ const geometry = visibleCount > 0 ? ` and none of the ${visibleCount} visible one(s) has a measured layout` : "";
3738
+ return `${visibilityUnstated} of ${elements.length} element(s) carry no boolean \`state.visible\`${geometry}, so no element can be placed on screen; spatial coverage, layout regions and visual anomalies cannot be measured`;
3739
+ }
3740
+ const unmounted = elements.filter((el) => el.state?.mounted === false).length;
3741
+ return `all ${elements.length} registered element(s) report visible: false (unmounted=${unmounted}, off-screen route or otherwise=${elements.length - unmounted}), so whatever is on screen is not a registered element and there is nothing on screen to measure; this says nothing about whether the screen is blank`;
3742
+ }
3488
3743
  function analyze(elements, viewport, base) {
3489
3744
  const findings = [];
3490
- const considered = elements.filter((el) => el.state.visible);
3491
- const visible = considered.flatMap((el) => {
3745
+ const onScreen = elements.filter((el) => el.state?.visible === true);
3746
+ const visibilityUnstated = elements.filter(
3747
+ (el) => typeof el.state?.visible !== "boolean"
3748
+ ).length;
3749
+ const visible = onScreen.flatMap((el) => {
3492
3750
  const rect = normalizeRect(el.state, viewport);
3493
3751
  return rect ? [{ el, rect }] : [];
3494
3752
  });
3495
- const withoutGeometry = considered.length - visible.length;
3496
- const unmeasured = withoutGeometry > 0 ? [{ dimension: "geometry", count: withoutGeometry, code: "input_missing" }] : [];
3497
- const coverage = { considered: considered.length, measured: visible.length, unmeasured };
3498
- if (considered.length > 0 && visible.length === 0) {
3753
+ const withoutGeometry = onScreen.length - visible.length;
3754
+ const unmeasured = [];
3755
+ if (withoutGeometry > 0) {
3756
+ unmeasured.push({ dimension: "geometry", count: withoutGeometry, code: "input_missing" });
3757
+ }
3758
+ if (visibilityUnstated > 0) {
3759
+ unmeasured.push({ dimension: "visibility", count: visibilityUnstated, code: "input_missing" });
3760
+ }
3761
+ const coverage = {
3762
+ considered: onScreen.length + visibilityUnstated,
3763
+ measured: visible.length,
3764
+ unmeasured
3765
+ };
3766
+ if (elements.length > 0 && visible.length === 0) {
3499
3767
  return Observation.unknown(
3500
3768
  "input_missing",
3501
- `all ${considered.length} visible element(s) have no measured layout yet, so spatial coverage, layout regions and visual anomalies cannot be measured`,
3769
+ nothingOnScreenDetail(elements, onScreen.length, visibilityUnstated),
3502
3770
  Observation.provenance({ ...base, coverage })
3503
3771
  );
3504
3772
  }
@@ -3588,7 +3856,7 @@ function analyze(elements, viewport, base) {
3588
3856
  for (const el of elements) {
3589
3857
  const elType = el.type ?? "";
3590
3858
  if (SKIP_TEXT_TYPES.has(elType)) continue;
3591
- const text = (el.state.textContent ?? "").toString();
3859
+ const text = (el.state?.textContent ?? "").toString();
3592
3860
  if (!text) continue;
3593
3861
  const textLower = text.toLowerCase();
3594
3862
  for (const p of ERROR_PHRASES) {
@@ -3629,7 +3897,7 @@ function analyze(elements, viewport, base) {
3629
3897
  for (const el of elements) {
3630
3898
  if (!INTERACTIVE_TYPES2.has(el.type)) continue;
3631
3899
  interactiveTotal++;
3632
- if (el.state.enabled === false) interactiveDisabled++;
3900
+ if (el.state?.enabled === false) interactiveDisabled++;
3633
3901
  }
3634
3902
  const interactiveSeverity = interactiveTotal > 0 && interactiveDisabled / interactiveTotal > 0.5 ? "WARNING" : "OK";
3635
3903
  findings.push({
@@ -3653,9 +3921,7 @@ function analyze(elements, viewport, base) {
3653
3921
  detail: `zero_size=${zeroSize}, outside_viewport=${outsideViewport} (horizontal-overflow only; below/above-fold scrollable content is not an anomaly)`,
3654
3922
  data: { zero_size: zeroSize, outside_viewport: outsideViewport }
3655
3923
  });
3656
- const heatmap = grid.map(
3657
- (row) => row.map((cell) => cell ? "#" : ".").join("")
3658
- );
3924
+ const heatmap = grid.map((row) => row.map((cell) => cell ? "#" : ".").join(""));
3659
3925
  return Observation.measured(
3660
3926
  {
3661
3927
  summary: worstSeverity(findings),
@@ -3915,10 +4181,9 @@ function createServerHandlers(registry, executor, config) {
3915
4181
  const elements = allElements.map((e) => {
3916
4182
  const handlers = extractHandlerNames(e.props);
3917
4183
  const state = e.getState();
3918
- const { visibility, visibilityReason } = computeVisibility(
3919
- state,
3920
- registry.getClipRectFor(e, viewport)
3921
- );
4184
+ const identifier = e.getIdentifier();
4185
+ const clip = registry.getClipRectFor(e, viewport);
4186
+ const { visibility, visibilityReason } = computeVisibility(state, clip);
3922
4187
  const bbox = projectBbox(state, visibility, registry.getPixelRatio());
3923
4188
  const vision = projectVisionFields({
3924
4189
  type: e.type,
@@ -3927,13 +4192,16 @@ function createServerHandlers(registry, executor, config) {
3927
4192
  // synthesize press/click onto every element. See projectVisionFields.
3928
4193
  handlerNames: handlers,
3929
4194
  state,
3930
- flatStyle: e.flatStyle
4195
+ flatStyle: e.flatStyle,
4196
+ props: e.props,
4197
+ accessibilityLabel: identifier.accessibilityLabel,
4198
+ inViewport: computeInViewport(state, clip)
3931
4199
  });
3932
4200
  return {
3933
4201
  id: e.id,
3934
4202
  type: e.type,
3935
4203
  label: e.label,
3936
- identifier: e.getIdentifier(),
4204
+ identifier,
3937
4205
  state,
3938
4206
  actions: e.actions,
3939
4207
  customActions: serializeElementCustomActions(e.customActions),
@@ -4641,7 +4909,7 @@ function createServerHandlers(registry, executor, config) {
4641
4909
  };
4642
4910
  if (config?.appInfo) {
4643
4911
  response.uiBridge = {
4644
- version: "0.7.0",
4912
+ version: "0.8.0",
4645
4913
  ...config.appInfo,
4646
4914
  capabilities: ["elements", "components", "actions", "design"],
4647
4915
  elementCount: stats.elements,
@@ -8204,7 +8472,9 @@ function TransitionTo(props) {
8204
8472
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.children });
8205
8473
  }
8206
8474
  function effectiveInfo(info, unmatched) {
8207
- return unmatched ? { ...info, pattern: null, params: void 0 } : info;
8475
+ if (!unmatched) return info;
8476
+ const { params: _dropped, ...rest } = info;
8477
+ return { ...rest, pattern: null };
8208
8478
  }
8209
8479
  function useRouteAwareness(info, options = {}) {
8210
8480
  const bridge = useUIBridgeNativeOptional();