@octane-xplat/patches 0.11.1 → 0.13.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 CHANGED
@@ -1,8 +1,9 @@
1
1
  # @octane-xplat/patches
2
2
 
3
- This package carries the pnpm patch files used by freshly scaffolded
4
- Octane-xplat apps. It is installed as a pnpm `configDependencies` package so
5
- the patches are available before regular app dependencies are installed.
3
+ The pnpm patch files used by freshly scaffolded Octane-xplat apps. Apps do not
4
+ install this package directly — create templates declare it as a pnpm
5
+ `configDependencies` package so the patches are in place before regular app
6
+ dependencies install.
6
7
 
7
8
  The canonical patch files and their rationale live in
8
9
  `packages/cli/patches/manifest.json`. `pnpm sync:patches` generates this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octane-xplat/patches",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "pnpm config dependency carrying the framework patch files",
5
5
  "keywords": [
6
6
  "framework",
@@ -21,5 +21,6 @@
21
21
  ],
22
22
  "publishConfig": {
23
23
  "access": "public"
24
- }
24
+ },
25
+ "scripts": {}
25
26
  }
@@ -1,8 +1,8 @@
1
1
  diff --git a/css/css-tree-parser.js b/css/css-tree-parser.js
2
- index 0c13e7e67a8eb306248d738bb73189b772b4a409..7ce38a9ba8f1f9aef709136b46f8e5b2435ba714 100644
2
+ index ee888000bf860ec2a376926f05b64cb5999c3b4f..6098f60b5281ca64c9255b16642046f25266af0d 100644
3
3
  --- a/css/css-tree-parser.js
4
4
  +++ b/css/css-tree-parser.js
5
- @@ -66,6 +66,10 @@ function transformAst(node, css, type = null) {
5
+ @@ -70,6 +70,10 @@ function transformAst(node, css, type = null) {
6
6
  atrule.keyframes = transformAst(node.block, css, 'keyframe');
7
7
  atrule.vendor = undefined;
8
8
  }
@@ -156,7 +156,7 @@ index 24292e7aa38a0e915e19843551121d336d39d477..47307b90625d2dc09b3ca00b91882d7d
156
156
  +export type { Pair, TranslatePair, Transformation, TransformationType, TransformationValue, TransformFunctionsInfo, Point3D, AnimationPromise, Cancelable } from './animation-types';
157
157
  export { KeyframeAnimation, KeyframeAnimationInfo, KeyframeDeclaration, KeyframeInfo } from './keyframe-animation';
158
158
  import type { AnimationDefinition, AnimationPromise } from './animation-types';
159
-
159
+
160
160
  diff --git a/ui/animation/index.ios.js b/ui/animation/index.ios.js
161
161
  index 25f3c19349a389341676963351b6315f9181c1fc..f2d0eeb42ac12daa0fa4dd5ce1c704103501a736 100644
162
162
  --- a/ui/animation/index.ios.js
@@ -217,7 +217,7 @@ index 3be12d5c382176ca302bc318f8d24e0434e00f51..7e34c4329780fb0cc623dbf28934b176
217
217
  rotate?: {
218
218
  x: number;
219
219
  diff --git a/ui/core/view/index.android.d.ts b/ui/core/view/index.android.d.ts
220
- index d540ec1993b7745ac600bc1bb542779024d1bcfa..867345daa6f5a8ded5f3a0ae0655562a3581870e 100644
220
+ index d5780663fe6823ad2be0bb44e682358e86c272eb..a82a8e052a0588e449728733b4e943268009ac47 100644
221
221
  --- a/ui/core/view/index.android.d.ts
222
222
  +++ b/ui/core/view/index.android.d.ts
223
223
  @@ -58,8 +58,8 @@ export declare class View extends ViewCommon {
@@ -232,10 +232,10 @@ index d540ec1993b7745ac600bc1bb542779024d1bcfa..867345daa6f5a8ded5f3a0ae0655562a
232
232
  [zIndexProperty.setNative]: (value: number) => void;
233
233
  [backgroundInternalProperty.getDefault]: () => android.graphics.drawable.Drawable;
234
234
  diff --git a/ui/core/view/index.android.js b/ui/core/view/index.android.js
235
- index b17d5f174ff636be2ac5a18ad06e7986a177f3bc..50bd1c764244d3cb8d7fd5ad8ae7bbcd234c152e 100644
235
+ index 7fd9d50a663a053535c29c071a0308c7d78c3303..adb2295f7fb0606335debb41a1eb5d136f51c1c7 100644
236
236
  --- a/ui/core/view/index.android.js
237
237
  +++ b/ui/core/view/index.android.js
238
- @@ -6,6 +6,8 @@ import { Trace } from '../../../trace';
238
+ @@ -7,6 +7,8 @@ import { Trace } from '../../../trace';
239
239
  import { hiddenProperty } from '../view-base';
240
240
  import { isCssWideKeyword } from '../properties/property-shared';
241
241
  import { perspectiveProperty, visibilityProperty, opacityProperty, horizontalAlignmentProperty, verticalAlignmentProperty, minWidthProperty, minHeightProperty, maxWidthProperty, maxHeightProperty, widthProperty, heightProperty, marginLeftProperty, marginTopProperty, marginRightProperty, marginBottomProperty, rotateProperty, rotateXProperty, rotateYProperty, scaleXProperty, scaleYProperty, translateXProperty, translateYProperty, zIndexProperty, backgroundInternalProperty, androidElevationProperty, androidDynamicElevationOffsetProperty } from '../../styling/style-properties';
@@ -244,7 +244,7 @@ index b17d5f174ff636be2ac5a18ad06e7986a177f3bc..50bd1c764244d3cb8d7fd5ad8ae7bbcd
244
244
  import { CoreTypes } from '../../../core-types';
245
245
  import { Background, refreshBorderDrawable } from '../../styling/background';
246
246
  import { profile } from '../../../profiling';
247
- @@ -694,8 +696,16 @@ export class View extends ViewCommon {
247
+ @@ -718,8 +720,16 @@ export class View extends ViewCommon {
248
248
  return false;
249
249
  }
250
250
  layoutNativeView(left, top, right, bottom) {
@@ -263,7 +263,7 @@ index b17d5f174ff636be2ac5a18ad06e7986a177f3bc..50bd1c764244d3cb8d7fd5ad8ae7bbcd
263
263
  }
264
264
  }
265
265
  requestLayout() {
266
- @@ -1272,10 +1282,10 @@ export class View extends ViewCommon {
266
+ @@ -1296,10 +1306,10 @@ export class View extends ViewCommon {
267
267
  org.nativescript.widgets.ViewHelper.setScaleY(this.nativeViewProtected, float(value));
268
268
  }
269
269
  [translateXProperty.setNative](value) {
@@ -282,7 +282,7 @@ index f5cc0e283779eb9049932b99fd9c8285526c05f9..af4b295ebed3886b31c0678b2d6e5103
282
282
  +++ b/ui/core/view/index.d.ts
283
283
  @@ -549,18 +549,20 @@ export abstract class View extends ViewCommon {
284
284
  perspective: number;
285
-
285
+
286
286
  /**
287
287
  - * Gets or sets the translateX affine transform of the view in device independent pixels.
288
288
  + * Gets or sets the translateX affine transform of the view.
@@ -292,7 +292,7 @@ index f5cc0e283779eb9049932b99fd9c8285526c05f9..af4b295ebed3886b31c0678b2d6e5103
292
292
  */
293
293
  - translateX: CoreTypes.dip;
294
294
  + translateX: CoreTypes.PercentLengthType;
295
-
295
+
296
296
  /**
297
297
  - * Gets or sets the translateY affine transform of the view in device independent pixels.
298
298
  + * Gets or sets the translateY affine transform of the view.
@@ -302,11 +302,11 @@ index f5cc0e283779eb9049932b99fd9c8285526c05f9..af4b295ebed3886b31c0678b2d6e5103
302
302
  */
303
303
  - translateY: CoreTypes.dip;
304
304
  + translateY: CoreTypes.PercentLengthType;
305
-
305
+
306
306
  /**
307
307
  * Gets or sets the scaleX affine transform of the view.
308
308
  diff --git a/ui/core/view/index.ios.d.ts b/ui/core/view/index.ios.d.ts
309
- index a63b36db5e1be012ba5595fa54e624a9bc13d196..9b19fbc49efbb93e6e185e0f1abab36992029377 100644
309
+ index ce122eb22174264e5840dccbaa053ae96a3cf16d..fc203e7744833f9e311510926c58c83d4a787745 100644
310
310
  --- a/ui/core/view/index.ios.d.ts
311
311
  +++ b/ui/core/view/index.ios.d.ts
312
312
  @@ -51,9 +51,9 @@ export declare class View extends ViewCommon {
@@ -322,7 +322,7 @@ index a63b36db5e1be012ba5595fa54e624a9bc13d196..9b19fbc49efbb93e6e185e0f1abab369
322
322
  [zIndexProperty.setNative]: (value: number) => void;
323
323
  [backgroundInternalProperty.getDefault]: () => UIColor;
324
324
  diff --git a/ui/core/view/index.ios.js b/ui/core/view/index.ios.js
325
- index 9a2ed977caa7e80dd03ae2738620bbeb7972d236..c55989f928aaf9582f82d9a8f5f5a6d8c9679ac1 100644
325
+ index 63f0ed7f7bbb587e5f081f7fc6c9cb80df81127d..8e9d901af0801df8b1a174691b2882c01164ebe4 100644
326
326
  --- a/ui/core/view/index.ios.js
327
327
  +++ b/ui/core/view/index.ios.js
328
328
  @@ -8,6 +8,7 @@ import { SDK_VERSION, supportsGlass } from '../../../utils/constants';
@@ -333,7 +333,7 @@ index 9a2ed977caa7e80dd03ae2738620bbeb7972d236..c55989f928aaf9582f82d9a8f5f5a6d8
333
333
  import { profile } from '../../../profiling';
334
334
  import { accessibilityEnabledProperty, accessibilityHiddenProperty, accessibilityHintProperty, accessibilityIdentifierProperty, accessibilityLabelProperty, accessibilityLanguageProperty, accessibilityLiveRegionProperty, accessibilityMediaSessionProperty, accessibilityRoleProperty, accessibilityStateProperty, accessibilityValueProperty, accessibilityIgnoresInvertColorsProperty } from '../../../accessibility/accessibility-properties';
335
335
  import { IOSPostAccessibilityNotificationType } from '../../../accessibility';
336
- @@ -332,6 +333,10 @@ export class View extends ViewCommon {
336
+ @@ -352,6 +353,10 @@ export class View extends ViewCommon {
337
337
  if (this._nativeBackgroundState === 'invalid' || (this._nativeBackgroundState === 'drawn' && backgroundDependsOnSize)) {
338
338
  this._redrawNativeBackground(background);
339
339
  }
@@ -344,7 +344,7 @@ index 9a2ed977caa7e80dd03ae2738620bbeb7972d236..c55989f928aaf9582f82d9a8f5f5a6d8
344
344
  }
345
345
  updateNativeTransform() {
346
346
  const scaleX = this.scaleX || 1e-6;
347
- @@ -343,7 +348,8 @@ export class View extends ViewCommon {
347
+ @@ -363,7 +368,8 @@ export class View extends ViewCommon {
348
348
  if (this.rotateX || this.rotateY) {
349
349
  transform.m34 = -1 / perspective;
350
350
  }
@@ -373,122 +373,6 @@ index e08bd0515f328334feb43be5c0a608099cc7efd3..5ab1064575441d664a6854f15d92b79d
373
373
  get scaleX(): number;
374
374
  set scaleX(value: number);
375
375
  get scaleY(): number;
376
- diff --git a/ui/core/view-base/index.d.ts b/ui/core/view-base/index.d.ts
377
- index e60308ab6e5bdfd05f9ed4173933496b96e23e33..1aee75a717bc61eed76ed2882517ed33fef5c570 100644
378
- --- a/ui/core/view-base/index.d.ts
379
- +++ b/ui/core/view-base/index.d.ts
380
- @@ -497,6 +497,12 @@ export declare abstract class ViewBase extends Observable {
381
- * @param view to unload.
382
- */
383
- unloadView(view: ViewBase): void;
384
- + /**
385
- + * Whether a child is the one currently shown. Containers that keep several children
386
- + * alive but show one at a time (a TabView's items) override it for the hidden ones.
387
- + * @param child A direct child of this view.
388
- + */
389
- + _isChildPresented(child: ViewBase): boolean;
390
- /**
391
- * Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
392
- */
393
- diff --git a/ui/core/view-base/index.js b/ui/core/view-base/index.js
394
- index 0c25671db43f74551878c67a38a0b276e10880d4..524dfd7892bae5d8484dd86ae7153a95b8d1a6e3 100644
395
- --- a/ui/core/view-base/index.js
396
- +++ b/ui/core/view-base/index.js
397
- @@ -633,6 +633,14 @@ export class ViewBase extends Observable {
398
- view.callUnloaded();
399
- }
400
- }
401
- + /**
402
- + * Whether a child is the one currently shown. Containers that keep several children
403
- + * alive but show one at a time (a TabView's items) override it for the hidden ones.
404
- + * @param child A direct child of this view.
405
- + */
406
- + _isChildPresented(child) {
407
- + return true;
408
- + }
409
- /**
410
- * Core logic for removing a child view from this instance. Used by the framework to handle lifecycle events more centralized. Do not use outside the UI Stack implementation.
411
- */
412
- diff --git a/ui/frame/frame-common.js b/ui/frame/frame-common.js
413
- index f678538745fbc3b3fd78edf46ea702d8cc4e641b..28b261eafd9560a656a5549e4f718b77016af437 100644
414
- --- a/ui/frame/frame-common.js
415
- +++ b/ui/frame/frame-common.js
416
- @@ -3,7 +3,7 @@ import { NavigationType } from './frame-interfaces';
417
- import { CustomLayoutView, CSSType } from '../core/view';
418
- import { Property } from '../core/properties';
419
- import { Trace } from '../../trace';
420
- -import { frameStack, topmost as frameStackTopmost, _pushInFrameStack, _popFromFrameStack, _removeFromFrameStack, _isFrameStackEmpty } from './frame-stack';
421
- +import { frameStack, topmost as frameStackTopmost, _pushInFrameStack, _insertAtFrameStackBottom, _popFromFrameStack, _removeFromFrameStack, _isFrameStackEmpty } from './frame-stack';
422
- import { viewMatchesModuleContext } from '../core/view/view-common';
423
- import { getAncestor } from '../core/view-base';
424
- import { Builder } from '../builder';
425
- @@ -12,6 +12,19 @@ import { profile } from '../../profiling';
426
- import { FRAME_SYMBOL } from './frame-helpers';
427
- import { SharedTransition } from '../transition/shared-transition';
428
- export { NavigationType } from './frame-interfaces';
429
- +/**
430
- + * A view is presented while every ancestor shows the child leading to it; a frame in an
431
- + * unselected tab is loaded on Android but must never outrank the tab that is shown.
432
- + */
433
- +function isPresented(view) {
434
- + while (view.parent) {
435
- + if (!view.parent._isChildPresented(view)) {
436
- + return false;
437
- + }
438
- + view = view.parent;
439
- + }
440
- + return true;
441
- +}
442
- function buildEntryFromArgs(arg) {
443
- let entry;
444
- if (typeof arg === 'string') {
445
- @@ -466,7 +479,12 @@ let FrameBase = FrameBase_1 = class FrameBase extends CustomLayoutView {
446
- return _isFrameStackEmpty();
447
- }
448
- _pushInFrameStack() {
449
- - _pushInFrameStack(this);
450
- + if (isPresented(this)) {
451
- + _pushInFrameStack(this);
452
- + }
453
- + else {
454
- + _insertAtFrameStackBottom(this);
455
- + }
456
- }
457
- _popFromFrameStack() {
458
- _popFromFrameStack(this);
459
- diff --git a/ui/frame/frame-stack.d.ts b/ui/frame/frame-stack.d.ts
460
- index 8387e6202380ec502adbc577c8de73e354ced9a9..0c874161af12d69ea4ced8f43d3e8a4d92032dcd 100644
461
- --- a/ui/frame/frame-stack.d.ts
462
- +++ b/ui/frame/frame-stack.d.ts
463
- @@ -19,5 +19,6 @@ export declare function topmostForWindow(window: WindowBase): FrameBase | undefi
464
- export declare function topmost(window?: WindowBase): FrameBase;
465
- export declare function _isFrameStackEmpty(): boolean;
466
- export declare function _pushInFrameStack(frame: FrameBase): void;
467
- +export declare function _insertAtFrameStackBottom(frame: FrameBase): void;
468
- export declare function _popFromFrameStack(frame: FrameBase): void;
469
- export declare function _removeFromFrameStack(frame: FrameBase): void;
470
- diff --git a/ui/frame/frame-stack.js b/ui/frame/frame-stack.js
471
- index 9ded225f53e4c4af92166a3e019671a1a65a2db2..9a9f5d5f9f891c9bcf6035b0345f4bb21c72831c 100644
472
- --- a/ui/frame/frame-stack.js
473
- +++ b/ui/frame/frame-stack.js
474
- @@ -46,6 +46,17 @@ export function _pushInFrameStack(frame) {
475
- frameStack.push(frame);
476
- frame._isInFrameStack = true;
477
- }
478
- +/**
479
- + * Keeps a frame in the stack without making it topmost: the frame stays findable by id,
480
- + * while every frame that is actually shown outranks it.
481
- + */
482
- +export function _insertAtFrameStackBottom(frame) {
483
- + if (frame._isInFrameStack) {
484
- + return;
485
- + }
486
- + frameStack.unshift(frame);
487
- + frame._isInFrameStack = true;
488
- +}
489
- export function _popFromFrameStack(frame) {
490
- if (!frame._isInFrameStack) {
491
- return;
492
376
  diff --git a/ui/index.d.ts b/ui/index.d.ts
493
377
  index ef5209d97b83fadf0da672fc2677faa1d56199b6..b2eac9a30234e05ca859c0f664b77ca40f06793c 100644
494
378
  --- a/ui/index.d.ts
@@ -593,51 +477,18 @@ index ed354fddfe1caf982e73b603798cb8f5bf0d3501..7191092e40ba07c3dc3e6555059dbda0
593
477
  child.nativeViewProtected.setLayoutParams(lp);
594
478
  }
595
479
  _setChildMinWidthNative(child, value) {
596
- diff --git a/ui/layouts/flexbox-layout/index.ios.js b/ui/layouts/flexbox-layout/index.ios.js
597
- index d391d4213240cab9a5088f9d7937fab17e7c7e54..112a3dc9ca31471c7cbceb94f6ee22bc86181955 100644
598
- --- a/ui/layouts/flexbox-layout/index.ios.js
599
- +++ b/ui/layouts/flexbox-layout/index.ios.js
600
- @@ -222,8 +222,8 @@ export class FlexboxLayout extends FlexboxLayoutBase {
601
- if (FlexBasisPercent.DEFAULT /*lp.flexBasisPercent*/ !== FlexBasisPercent.DEFAULT && widthMode === EXACTLY) {
602
- childWidth = Math.round(widthSize * FlexBasisPercent.DEFAULT /*lp.flexBasisPercent*/);
603
- }
604
- - const childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(widthMeasureSpec, lp.effectivePaddingLeft + lp.effectivePaddingRight + lp.effectiveMarginLeft + lp.effectiveMarginRight, childWidth < 0 ? WRAP_CONTENT : childWidth);
605
- - const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(heightMeasureSpec, lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
606
- + const childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(widthMeasureSpec, this.effectivePaddingLeft + this.effectivePaddingRight + lp.effectiveMarginLeft + lp.effectiveMarginRight, childWidth < 0 ? WRAP_CONTENT : childWidth);
607
- + const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(heightMeasureSpec, this.effectivePaddingTop + this.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
608
- child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
609
- this._checkSizeConstraints(child);
610
- childState = View.combineMeasuredStates(childState, child.getMeasuredState());
611
- @@ -547,7 +547,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
612
- // might result in increased height e.g. text that could be shown on one line for larger
613
- // width needs to be wrapped in two when width is reduced.
614
- // As a result we cannot unconditionally measure with EXACTLY the current measured height
615
- - const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentHeightMeasureSpec, lp.effectivePaddingTop + lp.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
616
- + const childHeightMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentHeightMeasureSpec, this.effectivePaddingTop + this.effectivePaddingBottom + lp.effectiveMarginTop + lp.effectiveMarginBottom, lp.effectiveHeight < 0 ? WRAP_CONTENT : lp.effectiveHeight);
617
- child.measure(childWidthMeasureSpec, childHeightMeasureSpec);
618
- child.effectiveMinWidth = minWidth;
619
- // make sure crossSize is up-to-date as child calculated height might have increased
620
- @@ -758,7 +758,7 @@ export class FlexboxLayout extends FlexboxLayoutBase {
621
- let newHeight = crossSize - view.effectiveMarginTop - view.effectiveMarginBottom;
622
- newHeight = Math.max(newHeight, 0);
623
- const originalMeasuredWidth = view.getMeasuredWidth();
624
- - let childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentWidthMeasureSpec, view.effectivePaddingLeft + view.effectivePaddingRight + view.effectiveMarginLeft + view.effectiveMarginRight, view.effectiveWidth < 0 ? WRAP_CONTENT : Math.min(view.effectiveWidth, originalMeasuredWidth));
625
- + let childWidthMeasureSpec = FlexboxLayout.getChildMeasureSpec(this._currentWidthMeasureSpec, this.effectivePaddingLeft + this.effectivePaddingRight + view.effectiveMarginLeft + view.effectiveMarginRight, view.effectiveWidth < 0 ? WRAP_CONTENT : Math.min(view.effectiveWidth, originalMeasuredWidth));
626
- view.measure(childWidthMeasureSpec, makeMeasureSpec(newHeight, EXACTLY));
627
- if (originalMeasuredWidth > view.getMeasuredWidth()) {
628
- childWidthMeasureSpec = makeMeasureSpec(originalMeasuredWidth, EXACTLY);
629
480
  diff --git a/ui/layouts/liquid-glass-container/index.ios.js b/ui/layouts/liquid-glass-container/index.ios.js
630
- index f72d4a1f66520c71f4830abcb6f908ef04d00ad6..78e97694657babd46fd4900db2dda0b7906ab25c 100644
481
+ index 6b3a474048271321d450e6c12a4c23215ac6efc2..5001783b44ab83f68829265b4e61d6a6f2f12081 100644
631
482
  --- a/ui/layouts/liquid-glass-container/index.ios.js
632
483
  +++ b/ui/layouts/liquid-glass-container/index.ios.js
633
484
  @@ -1,5 +1,6 @@
634
485
  import { supportsGlass } from '../../../utils/constants';
635
- import { iosGlassEffectProperty } from '../../core/view';
486
+ import { iosGlassEffectProperty, IOSHelper } from '../../core/view';
636
487
  +import { resolveTranslate } from '../../styling/css-transform';
637
488
  import { LiquidGlassContainerCommon } from './liquid-glass-container-common';
638
489
  import { toUIGlassStyle } from '../liquid-glass';
639
490
  export class LiquidGlassContainer extends LiquidGlassContainerCommon {
640
- @@ -123,13 +124,14 @@ export class LiquidGlassContainer extends LiquidGlassContainerCommon {
491
+ @@ -118,13 +119,14 @@ export class LiquidGlassContainer extends LiquidGlassContainerCommon {
641
492
  const child = this.getChildAt(i);
642
493
  if (!child)
643
494
  continue;
@@ -657,7 +508,7 @@ index f72d4a1f66520c71f4830abcb6f908ef04d00ad6..78e97694657babd46fd4900db2dda0b7
657
508
  if (!force) {
658
509
  const keys = native.layer.animationKeys ? native.layer.animationKeys() : null;
659
510
  diff --git a/ui/styling/background.ios.js b/ui/styling/background.ios.js
660
- index ed4b6883680229ffd1aa92a7bbcba2d36f1efebc..3882cad9a8d17fb5b8a80a4795b0161bc2f82e28 100644
511
+ index 810720f038afa5a76efd00b04af80b13afeac50e..1c7fb37ee0376ac55501e7b3e5f11c7350c6a703 100644
661
512
  --- a/ui/styling/background.ios.js
662
513
  +++ b/ui/styling/background.ios.js
663
514
  @@ -197,8 +197,8 @@ export var ios;
@@ -1329,87 +1180,3 @@ index e75c7c8010e23917a7138c7351243aab0bad1f49..7cf9244c0290a76b186c15f13cc94ca7
1329
1180
  function isRule(node) {
1330
1181
  return node.type === 'rule';
1331
1182
  }
1332
- diff --git a/ui/tab-view/index.android.js b/ui/tab-view/index.android.js
1333
- index e195b7564af964c333870fbb027c9aaac3335751..7df6fcb99fc0341afb137be4a297337f4fa7bf3e 100644
1334
- --- a/ui/tab-view/index.android.js
1335
- +++ b/ui/tab-view/index.android.js
1336
- @@ -368,7 +368,10 @@ export class TabView extends TabViewBase {
1337
- onItemsChanged(oldItems, newItems) {
1338
- super.onItemsChanged(oldItems, newItems);
1339
- if (oldItems) {
1340
- - oldItems.forEach((item, i, arr) => {
1341
- + oldItems.forEach((item) => {
1342
- + if (newItems && newItems.indexOf(item) >= 0) {
1343
- + return;
1344
- + }
1345
- item.index = 0;
1346
- item.tabItemSpec = null;
1347
- item.setNativeView(null);
1348
- diff --git a/ui/tab-view/index.ios.js b/ui/tab-view/index.ios.js
1349
- index c25ff0c66166b9dedd8b284981fc566ad5aa0230..e162b5d59e358965ae88e9b31ad1d1378a595995 100644
1350
- --- a/ui/tab-view/index.ios.js
1351
- +++ b/ui/tab-view/index.ios.js
1352
- @@ -622,6 +622,11 @@ export class TabView extends TabViewBase {
1353
- [itemsProperty.setNative](value) {
1354
- this.setViewControllers(value);
1355
- selectedIndexProperty.coerce(this);
1356
- + // Items added to a loaded TabView were loaded before their controllers existed.
1357
- + const selectedItem = value === null || value === void 0 ? void 0 : value[this.selectedIndex];
1358
- + if (selectedItem) {
1359
- + selectedItem.loadView(selectedItem.view);
1360
- + }
1361
- }
1362
- [tabTextFontSizeProperty.getDefault]() {
1363
- return null;
1364
- diff --git a/ui/tab-view/tab-view-common.d.ts b/ui/tab-view/tab-view-common.d.ts
1365
- index 35d1ba1f2479bbbf64cd4b1acb9563e0f823fd4e..e96b3085d75549d06d2c2e9cae183887e8e1adcc 100644
1366
- --- a/ui/tab-view/tab-view-common.d.ts
1367
- +++ b/ui/tab-view/tab-view-common.d.ts
1368
- @@ -66,6 +66,7 @@ export declare class TabViewBase extends View implements TabViewDefinition, AddC
1369
- eachChild(callback: (child: ViewBase) => boolean): void;
1370
- eachChildView(callback: (child: View) => boolean): void;
1371
- onItemsChanged(oldItems: TabViewItemDefinition[], newItems: TabViewItemDefinition[]): void;
1372
- + _isChildPresented(child: ViewBase): boolean;
1373
- onSelectedIndexChanged(oldIndex: number, newIndex: number): void;
1374
- }
1375
- export interface TabViewBase {
1376
- diff --git a/ui/tab-view/tab-view-common.js b/ui/tab-view/tab-view-common.js
1377
- index 66672f1fa5ccb31f06a83a2a21bfe1e5c668712f..1eb3676f0346d7ee21ab7ff1c1b78292da641463 100644
1378
- --- a/ui/tab-view/tab-view-common.js
1379
- +++ b/ui/tab-view/tab-view-common.js
1380
- @@ -144,21 +144,33 @@ let TabViewBase = TabViewBase_1 = class TabViewBase extends View {
1381
- }
1382
- onItemsChanged(oldItems, newItems) {
1383
- if (oldItems) {
1384
- - oldItems.forEach((item) => this._removeView(item));
1385
- + oldItems.forEach((item) => {
1386
- + if (!newItems || newItems.indexOf(item) < 0) {
1387
- + this._removeView(item);
1388
- + }
1389
- + });
1390
- }
1391
- if (newItems) {
1392
- newItems.forEach((item) => {
1393
- if (!item.view) {
1394
- throw new Error(`TabViewItem must have a view.`);
1395
- }
1396
- + // An item kept across the change stays loaded; tearing it down would unload its view.
1397
- + if (item.parent === this) {
1398
- + return;
1399
- + }
1400
- // A view can only have one parent, and _addView throws if it already has one.
1401
- - if (item.parent && item.parent !== this) {
1402
- + if (item.parent) {
1403
- item.parent._removeView(item);
1404
- }
1405
- this._addView(item);
1406
- });
1407
- }
1408
- }
1409
- + _isChildPresented(child) {
1410
- + const items = this.items;
1411
- + return !items || items[this.selectedIndex] === child;
1412
- + }
1413
- onSelectedIndexChanged(oldIndex, newIndex) {
1414
- // to be overridden in platform specific files
1415
- this.notify({
@@ -167,10 +167,124 @@ index 71574c48f655183af0c9601b020fd1febd63ccb3..0061d9c9e9fe9c6034576eae8449831d
167
167
  return code;
168
168
  }
169
169
  diff --git a/hmr/server/rewrite-imports.js b/hmr/server/rewrite-imports.js
170
- index 4a6575cb00a6aeecbbb7ac5ccac3268cb10d7f54..dc70055007e26117b76fbb9d2f4f17fabfd8db00 100644
170
+ index 4a6575cb00a6aeecbbb7ac5ccac3268cb10d7f54..ea97dfe6c895bb6b80b0c0403c86663046c65496 100644
171
171
  --- a/hmr/server/rewrite-imports.js
172
172
  +++ b/hmr/server/rewrite-imports.js
173
- @@ -253,11 +253,29 @@ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, proje
173
+ @@ -12,7 +12,93 @@ import { resolveAngularCoreHmrImportSource, rewriteAngularEntryRegisterOnly } fr
174
+ import { isNativeScriptCoreModule, isNativeScriptPluginModule, normalizeNativeScriptCoreSpecifier, normalizeNodeModulesSpecifier, resolveNodeModulesPackageBoundary, resolveVendorRouting, rewriteFsAbsoluteToNsM, shouldPreserveBareRuntimePluginSubpathImport } from './websocket-module-specifiers.js';
175
+ import { ensureDynamicHmrImportHelper } from './websocket-served-module-helpers.js';
176
+ import { collectMixedRuntimePluginHttpRootPackages, findDependencyFileName, getProjectRelativeImportPath, isApplicationImport, normalizeImportPath, stripToProjectRelative, toAppModuleBaseId, toNodeModulesHttpModuleId } from './device-transform-helpers.js';
177
+ +import { resolvePlatform } from '../../helpers/cli-flags.js';
178
+ const APP_ROOT_DIR = getProjectAppPath();
179
+ +// ── Package `imports` field (`#specifier`) resolution ─────────────────────
180
+ +// A `#`-prefixed specifier resolves through the `imports` field of the
181
+ +// importer's own package.json (Node "package imports" — e.g. octane's
182
+ +// `#octane/dist/signal-actions/graph`). Served node_modules files are raw-read
183
+ +// by the /ns/m route without Vite import analysis, and the bare-npm fallback
184
+ +// below rejects `#` outright (bareNpmRe requires an alphanumeric first char),
185
+ +// so the literal specifier reached the device loader as "Cannot find module".
186
+ +// Device-visible conditions: `import` (ESM), `native`, the active platform —
187
+ +// `node`, `require`, and build-time conditions like `octane-islands` are
188
+ +// intentionally absent.
189
+ +function resolveImportsConditionalTarget(value, conditions) {
190
+ + while (value !== null && typeof value === 'object' && !Array.isArray(value)) {
191
+ + let next;
192
+ + for (const condition of Object.keys(value)) {
193
+ + if (condition === 'default' || conditions.has(condition)) {
194
+ + next = value[condition];
195
+ + break;
196
+ + }
197
+ + }
198
+ + value = next;
199
+ + }
200
+ + return typeof value === 'string' ? value : null;
201
+ +}
202
+ +function resolvePackageImportsSpecifier(spec, importerPath, projectRoot, verbose) {
203
+ + let importerAbs;
204
+ + if (importerPath.startsWith('/@fs/')) {
205
+ + importerAbs = importerPath.slice('/@fs'.length);
206
+ + }
207
+ + else if (importerPath.startsWith('/')) {
208
+ + importerAbs = path.join(projectRoot, `.${importerPath}`);
209
+ + }
210
+ + else {
211
+ + return null;
212
+ + }
213
+ + try {
214
+ + importerAbs = importerAbs.replace(PAT.QUERY_PATTERN, '');
215
+ + let dir = path.dirname(importerAbs);
216
+ + // The `imports` field is scoped to the importer's nearest enclosing
217
+ + // package.json — the same lookup Node performs.
218
+ + for (;;) {
219
+ + const packageJsonPath = path.join(dir, 'package.json');
220
+ + if (existsSync(packageJsonPath)) {
221
+ + const pkgJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
222
+ + const importsField = pkgJson.imports;
223
+ + if (!importsField || typeof importsField !== 'object' || Array.isArray(importsField) || !pkgJson.name)
224
+ + return null;
225
+ + const conditions = new Set(['default', 'import', 'native', resolvePlatform()].filter(Boolean));
226
+ + const exactMatch = Object.hasOwn(importsField, spec);
227
+ + let target = exactMatch
228
+ + ? resolveImportsConditionalTarget(importsField[spec], conditions)
229
+ + : null;
230
+ + if (!exactMatch && target === null) {
231
+ + for (const key of Object.keys(importsField)) {
232
+ + const star = key.indexOf('*');
233
+ + if (star === -1)
234
+ + continue;
235
+ + const pre = key.slice(0, star);
236
+ + const post = key.slice(star + 1);
237
+ + if (spec.length < pre.length + post.length || !spec.startsWith(pre) || !spec.endsWith(post))
238
+ + continue;
239
+ + const matched = spec.slice(pre.length, spec.length - post.length);
240
+ + const patternTarget = resolveImportsConditionalTarget(importsField[key], conditions);
241
+ + target = typeof patternTarget === 'string' ? patternTarget.replaceAll('*', matched) : null;
242
+ + break;
243
+ + }
244
+ + }
245
+ + // Only `./`-relative targets can be expressed as a device URL
246
+ + // (bare-specifier targets are rare and keep falling through).
247
+ + if (typeof target !== 'string' || !target.startsWith('./'))
248
+ + return null;
249
+ + const out = `/ns/m/node_modules/${pkgJson.name}/${target.slice(2)}`;
250
+ + if (verbose)
251
+ + console.log(`[rewrite] imports-field specifier: ${spec} → ${out}`);
252
+ + return out;
253
+ + }
254
+ + const parent = path.dirname(dir);
255
+ + if (parent === dir)
256
+ + return null;
257
+ + dir = parent;
258
+ + }
259
+ + }
260
+ + catch {
261
+ + return null;
262
+ + }
263
+ +}
264
+ export function prepareAngularEntryForDevice(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose = false, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp = false) {
265
+ const rewrittenCode = rewriteImports(code, importerPath, sfcFileMap, depFileMap, projectRoot, verbose, outputDirOverrideRel, httpOrigin, resolveVendorAsHttp);
266
+ return rewriteAngularEntryRegisterOnly(rewrittenCode, resolveAngularCoreHmrImportSource(rewrittenCode, httpOrigin));
267
+ @@ -236,6 +322,19 @@ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, proje
268
+ }
269
+ return `${prefix}${stub}${suffix}`;
270
+ }
271
+ + // `#`-prefixed package-imports specifier (Node `imports` field, e.g.
272
+ + // octane's `#octane/dist/signal-actions/graph`). Resolved through the
273
+ + // importer's own package.json — the bare-npm branches below reject it.
274
+ + if (spec.startsWith('#')) {
275
+ + const importsOut = resolvePackageImportsSpecifier(spec, importerPath, projectRoot, verbose);
276
+ + if (importsOut) {
277
+ + if (httpOriginSafe) {
278
+ + return `${prefix}${httpOriginSafe}${importsOut}${suffix}`;
279
+ + }
280
+ + return `${prefix}${importsOut}${suffix}`;
281
+ + }
282
+ + return `${prefix}${spec}${suffix}`;
283
+ + }
284
+ spec = normalizeNativeScriptCoreSpecifier(spec);
285
+ // Pull `/@fs/<abs-path>` URLs back into the `/ns/m/` pipeline so they
286
+ // hit our CJS/UMD-wrapping handler. Vite emits `/@fs/...` for any
287
+ @@ -253,11 +352,29 @@ export function rewriteImports(code, importerPath, sfcFileMap, depFileMap, proje
174
288
  }
175
289
  return `${prefix}${rewritten}${suffix}`;
176
290
  }