@triniwiz/nativescript-masonkit 1.0.0-beta.107 → 1.0.0-beta.109

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.
Files changed (134) hide show
  1. package/box-shadow.d.ts +10 -0
  2. package/box-shadow.js +49 -0
  3. package/box-shadow.js.map +1 -0
  4. package/button/index.windows.js +0 -2
  5. package/button/index.windows.js.map +1 -1
  6. package/common.d.ts +36 -9
  7. package/common.js +674 -202
  8. package/common.js.map +1 -1
  9. package/css-filter.d.ts +17 -0
  10. package/css-filter.js +141 -0
  11. package/css-filter.js.map +1 -0
  12. package/css-transform.d.ts +6 -0
  13. package/css-transform.js +101 -0
  14. package/css-transform.js.map +1 -0
  15. package/html-windows.d.ts +1 -0
  16. package/html-windows.js +163 -0
  17. package/html-windows.js.map +1 -0
  18. package/html.d.ts +8 -0
  19. package/html.js +134 -0
  20. package/html.js.map +1 -0
  21. package/img/index.ios.js +1 -1
  22. package/img/index.ios.js.map +1 -1
  23. package/index.d.ts +6 -4
  24. package/index.windows.d.ts +2 -0
  25. package/index.windows.js +2 -0
  26. package/index.windows.js.map +1 -1
  27. package/input/common.d.ts +16 -0
  28. package/input/common.js +45 -3
  29. package/input/common.js.map +1 -1
  30. package/input/index.android.d.ts +8 -3
  31. package/input/index.android.js +24 -7
  32. package/input/index.android.js.map +1 -1
  33. package/input/index.ios.d.ts +7 -3
  34. package/input/index.ios.js +19 -8
  35. package/input/index.ios.js.map +1 -1
  36. package/input/index.windows.d.ts +14 -2
  37. package/input/index.windows.js +143 -4
  38. package/input/index.windows.js.map +1 -1
  39. package/li/index.ios.js +1 -1
  40. package/li/index.ios.js.map +1 -1
  41. package/li/index.windows.js +4 -2
  42. package/li/index.windows.js.map +1 -1
  43. package/list/index.ios.js +2 -2
  44. package/list/index.ios.js.map +1 -1
  45. package/list/index.windows.d.ts +5 -2
  46. package/list/index.windows.js +26 -4
  47. package/list/index.windows.js.map +1 -1
  48. package/package.json +1 -1
  49. package/platforms/android/masonkit-release.aar +0 -0
  50. package/platforms/ios/Mason.xcframework/Info.plist +6 -6
  51. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +16 -1
  52. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  53. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  54. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +1086 -234
  55. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +29 -0
  56. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  57. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +29 -0
  58. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  59. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8873 -8709
  60. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +32 -2
  61. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  62. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  63. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  64. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +1086 -234
  65. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +29 -0
  66. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  67. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +29 -0
  68. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +1086 -234
  69. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +29 -0
  70. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  71. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +29 -0
  72. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +26 -26
  73. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  74. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8867 -8703
  75. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +8466 -8306
  76. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason-Swift.h +16 -1
  77. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
  78. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
  79. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +1086 -234
  80. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.private.swiftinterface +29 -0
  81. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftdoc +0 -0
  82. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftinterface +29 -0
  83. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  84. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8365 -8202
  85. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason-Swift.h +16 -1
  86. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
  87. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
  88. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +1086 -234
  89. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.private.swiftinterface +29 -0
  90. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftdoc +0 -0
  91. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftinterface +29 -0
  92. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +14 -14
  93. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  94. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8364 -8202
  95. package/platforms/windows/arm64/NativeScript.Mason.dll +0 -0
  96. package/platforms/windows/arm64/NativeScript.Mason.winmd +0 -0
  97. package/platforms/windows/x64/NativeScript.Mason.dll +0 -0
  98. package/platforms/windows/x64/NativeScript.Mason.winmd +0 -0
  99. package/properties.js +87 -1
  100. package/properties.js.map +1 -1
  101. package/scroll/index.android.js +3 -1
  102. package/scroll/index.android.js.map +1 -1
  103. package/scroll/index.ios.js +4 -2
  104. package/scroll/index.ios.js.map +1 -1
  105. package/scroll/index.windows.js +4 -2
  106. package/scroll/index.windows.js.map +1 -1
  107. package/style.d.ts +57 -8
  108. package/style.js +542 -262
  109. package/style.js.map +1 -1
  110. package/symbols.d.ts +4 -0
  111. package/symbols.js +6 -2
  112. package/symbols.js.map +1 -1
  113. package/text/index.ios.js +1 -1
  114. package/text/index.ios.js.map +1 -1
  115. package/text/index.windows.d.ts +3 -0
  116. package/text/index.windows.js +39 -10
  117. package/text/index.windows.js.map +1 -1
  118. package/textarea/index.ios.js +1 -1
  119. package/textarea/index.ios.js.map +1 -1
  120. package/textarea/index.windows.d.ts +2 -0
  121. package/textarea/index.windows.js +5 -1
  122. package/textarea/index.windows.js.map +1 -1
  123. package/typings/android.d.ts +3 -0
  124. package/typings/objc!Mason.d.ts +4 -0
  125. package/typings/windows.d.ts +29 -1
  126. package/view/index.windows.js +4 -2
  127. package/view/index.windows.js.map +1 -1
  128. package/vue/src/element-registry.d.ts.map +1 -1
  129. package/vue/src/element-registry.js +4 -1
  130. package/vue/src/element-registry.js.map +1 -1
  131. package/vue/src/v-model.d.ts +27 -0
  132. package/vue/src/v-model.d.ts.map +1 -0
  133. package/vue/src/v-model.js +70 -0
  134. package/vue/src/v-model.js.map +1 -0
package/style.js CHANGED
@@ -3,7 +3,9 @@ import { cssUnits } from './units';
3
3
  import { masonEngine } from './windows-panel-helpers';
4
4
  import { reportCssDiagnostic } from './diagnostics';
5
5
  import { expandColorStops, resolveStopPositions } from './gradient-stops';
6
- import { Color, Length as CoreLength, PercentLength as CorePercentLength, Screen } from '@nativescript/core';
6
+ import { encodeBoxShadows, parseBoxShadows } from './box-shadow';
7
+ import { encodeCssFilter, parseCssFilter } from './css-filter';
8
+ import { Color, Length as CoreLength, PercentLength as CorePercentLength, Screen, knownFolders } from '@nativescript/core';
7
9
  // The Windows shell lays out in XAML DIPs, so its style buffer holds DIPs. Core's Windows density
8
10
  // is 1 until the window has a XamlRoot, so converting stored early styles unscaled and later ones scaled.
9
11
  const layout = __WINDOWS__ ? { ...coreLayout, getDisplayDensity: () => 1, toDevicePixels: (value) => value, toDeviceIndependentPixels: (value) => value } : coreLayout;
@@ -257,7 +259,7 @@ function windowsSetGrid(nativeView, field, value) {
257
259
  // UpdateGrid doesn't mark the node dirty / invalidate XAML measure on its own;
258
260
  // SyncStyle does, so a grid item's placement change re-runs the container layout.
259
261
  try {
260
- nativeView.SyncStyle('0', '0');
262
+ nativeView.SyncStyle(-1, -1, -1, -1);
261
263
  }
262
264
  catch (_) { }
263
265
  }
@@ -493,28 +495,43 @@ function parseLengthPercentage(type, value) {
493
495
  return { value, unit: '%' };
494
496
  }
495
497
  }
498
+ // The 128-bit dirty mask as four signed 32-bit words, low to high (the
499
+ // syncStyleParts argument order). Plain numbers: BigInt ops allocate.
496
500
  class StateKeys {
497
- constructor(bits) {
498
- this.bits = bits;
501
+ constructor(w0, w1, w2, w3) {
502
+ this.w0 = w0;
503
+ this.w1 = w1;
504
+ this.w2 = w2;
505
+ this.w3 = w3;
499
506
  }
500
507
  static flag(n) {
501
- return new StateKeys(1n << BigInt(n));
508
+ const bit = (1 << (n & 31)) | 0;
509
+ switch (n >> 5) {
510
+ case 0:
511
+ return new StateKeys(bit, 0, 0, 0);
512
+ case 1:
513
+ return new StateKeys(0, bit, 0, 0);
514
+ case 2:
515
+ return new StateKeys(0, 0, bit, 0);
516
+ default:
517
+ return new StateKeys(0, 0, 0, bit);
518
+ }
502
519
  }
503
- // compatibility: return low bits when code expects single 64-bit value
504
- get bitsLow() {
505
- return this.bits;
520
+ /** The mask as one unsigned 128-bit value (tests and diagnostics). */
521
+ get bits() {
522
+ return wordsToBigInt(this.w0, this.w1, this.w2, this.w3);
506
523
  }
507
524
  or(other) {
508
- return new StateKeys(this.bits | other.bits);
525
+ return new StateKeys(this.w0 | other.w0, this.w1 | other.w1, this.w2 | other.w2, this.w3 | other.w3);
509
526
  }
510
527
  and(other) {
511
- return new StateKeys(this.bits & other.bits);
528
+ return new StateKeys(this.w0 & other.w0, this.w1 & other.w1, this.w2 & other.w2, this.w3 & other.w3);
512
529
  }
513
530
  hasFlag(flag) {
514
- return (this.bits & flag.bits) !== 0n;
531
+ return (this.w0 & flag.w0) !== 0 || (this.w1 & flag.w1) !== 0 || (this.w2 & flag.w2) !== 0 || (this.w3 & flag.w3) !== 0;
515
532
  }
516
533
  }
517
- StateKeys.NONE = new StateKeys(0n);
534
+ StateKeys.NONE = new StateKeys(0, 0, 0, 0);
518
535
  StateKeys.DISPLAY = StateKeys.flag(0);
519
536
  StateKeys.POSITION = StateKeys.flag(1);
520
537
  StateKeys.DIRECTION = StateKeys.flag(2);
@@ -594,6 +611,12 @@ StateKeys.HYPHENS = StateKeys.flag(75);
594
611
  StateKeys.CARET_COLOR = StateKeys.flag(76);
595
612
  StateKeys.WORD_SPACING = StateKeys.flag(77);
596
613
  StateKeys.FONT_STRETCH = StateKeys.flag(78);
614
+ StateKeys.DISPLAY_AND_MODE = StateKeys.DISPLAY.or(StateKeys.DISPLAY_MODE);
615
+ StateKeys.FLOW_TYPE = StateKeys.DISPLAY.or(StateKeys.DISPLAY_MODE).or(StateKeys.POSITION).or(StateKeys.FLOAT);
616
+ StateKeys.WINDOWS_TEXT = [49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 77, 78].reduce((mask, n) => mask.or(StateKeys.flag(n)), StateKeys.NONE);
617
+ function wordsToBigInt(w0, w1, w2, w3) {
618
+ return BigInt(w0 >>> 0) | (BigInt(w1 >>> 0) << 32n) | (BigInt(w2 >>> 0) << 64n) | (BigInt(w3 >>> 0) << 96n);
619
+ }
597
620
  const getInt8 = (view, offset) => {
598
621
  return view.getInt8(offset);
599
622
  };
@@ -606,19 +629,6 @@ const getUint8 = (view, offset) => {
606
629
  const setUint8 = (view, offset, value) => {
607
630
  view.setUint8(offset, value);
608
631
  };
609
- // Splits the 128-bit dirty mask into four signed 32-bit words (plain {N} int
610
- // marshalling) for Element.syncStyleParts on Android and mason_syncStyleParts on iOS.
611
- const splitBigIntToInt32Parts = (value) => {
612
- const MASK64 = (1n << 64n) - 1n;
613
- const MASK32 = 0xffffffffn;
614
- const LOW = value & MASK64;
615
- const HIGH = (value >> 64n) & MASK64;
616
- const lowLow32 = Number(BigInt.asIntN(32, LOW & MASK32));
617
- const lowHigh32 = Number(BigInt.asIntN(32, (LOW >> 32n) & MASK32));
618
- const highLow32 = Number(BigInt.asIntN(32, HIGH & MASK32));
619
- const highHigh32 = Number(BigInt.asIntN(32, (HIGH >> 32n) & MASK32));
620
- return [lowLow32, lowHigh32, highLow32, highHigh32];
621
- };
622
632
  const getInt16 = (view, offset) => {
623
633
  return view.getInt16(offset, true);
624
634
  };
@@ -739,6 +749,102 @@ export function parseLinearGradientCss(value) {
739
749
  return null;
740
750
  return { angle, offsets: resolveStopPositions(positions), colors, interpolation };
741
751
  }
752
+ const RADIAL_GRADIENT_ARGS = /radial-gradient\s*\(([\s\S]*)\)\s*$/i;
753
+ function positionFraction(token, axis) {
754
+ if (token == null)
755
+ return null;
756
+ const t = token.trim().toLowerCase();
757
+ if (t === 'center')
758
+ return 0.5;
759
+ if (t === (axis === 'x' ? 'left' : 'top'))
760
+ return 0;
761
+ if (t === (axis === 'x' ? 'right' : 'bottom'))
762
+ return 1;
763
+ if (t.endsWith('%')) {
764
+ const n = parseFloat(t);
765
+ return Number.isFinite(n) ? n / 100 : null;
766
+ }
767
+ return null;
768
+ }
769
+ export function parseBoxPosition(value, fallback = 0.5) {
770
+ const parts = value.trim().toLowerCase().split(/\s+/).filter(Boolean);
771
+ let x = null;
772
+ let y = null;
773
+ for (const part of parts) {
774
+ if ((part === 'top' || part === 'bottom') && y == null)
775
+ y = positionFraction(part, 'y');
776
+ else if ((part === 'left' || part === 'right') && x == null)
777
+ x = positionFraction(part, 'x');
778
+ else if (x == null)
779
+ x = positionFraction(part, 'x');
780
+ else if (y == null)
781
+ y = positionFraction(part, 'y');
782
+ }
783
+ if (x != null || y != null)
784
+ return { x: x ?? 0.5, y: y ?? 0.5 };
785
+ return { x: fallback, y: fallback };
786
+ }
787
+ export function parseRadialGradientCss(value) {
788
+ const m = RADIAL_GRADIENT_ARGS.exec(value.trim());
789
+ if (!m)
790
+ return null;
791
+ const parts = splitTopLevelCommas(m[1])
792
+ .map((p) => p.trim())
793
+ .filter(Boolean);
794
+ if (parts.length < 2)
795
+ return null;
796
+ let start = 0;
797
+ let cx = 0.5;
798
+ let cy = 0.5;
799
+ let size = 'farthest-corner';
800
+ let interpolation = '';
801
+ let head = parts[0];
802
+ const method = INTERPOLATION_METHOD.exec(head);
803
+ if (method) {
804
+ interpolation = method[1].toLowerCase().replace(/\s+/g, ' ');
805
+ head = (head.slice(0, method.index) + head.slice(method.index + method[0].length)).trim();
806
+ start = 1;
807
+ }
808
+ if (/\b(circle|ellipse|closest-side|farthest-side|closest-corner|farthest-corner|at)\b/i.test(head)) {
809
+ start = 1;
810
+ const at = /\bat\s+(.+)$/i.exec(head);
811
+ if (at) {
812
+ const p = parseBoxPosition(at[1]);
813
+ cx = p.x;
814
+ cy = p.y;
815
+ }
816
+ const sizeKeyword = /(closest-side|farthest-side|closest-corner|farthest-corner)/i.exec(head);
817
+ if (sizeKeyword)
818
+ size = sizeKeyword[1].toLowerCase();
819
+ }
820
+ const sideX = size.startsWith('closest') ? Math.min(cx, 1 - cx) : Math.max(cx, 1 - cx);
821
+ const sideY = size.startsWith('closest') ? Math.min(cy, 1 - cy) : Math.max(cy, 1 - cy);
822
+ const corner = size.endsWith('corner') ? Math.SQRT2 : 1;
823
+ const colors = [];
824
+ const positions = [];
825
+ for (const stop of expandColorStops(parts.slice(start))) {
826
+ const pos = /\s+(-?[\d.]+)(%|[a-z]+)\s*$/i.exec(stop);
827
+ const colorStr = pos ? stop.slice(0, pos.index).trim() : stop;
828
+ const argb = normalizeColorValue(colorStr);
829
+ if (argb == null)
830
+ continue;
831
+ colors.push(argb >>> 0);
832
+ positions.push(pos && pos[2] === '%' ? parseFloat(pos[1]) / 100 : null);
833
+ }
834
+ if (colors.length < 1)
835
+ return null;
836
+ return { cx, cy, rx: Math.max(sideX * corner, 0.001), ry: Math.max(sideY * corner, 0.001), offsets: resolveStopPositions(positions), colors, interpolation };
837
+ }
838
+ export function backgroundFit(size) {
839
+ const t = (size ?? '').trim().toLowerCase();
840
+ if (t === 'cover')
841
+ return 3;
842
+ if (t === 'contain')
843
+ return 2;
844
+ if (t === '100%' || t === '100% 100%')
845
+ return 1;
846
+ return 0;
847
+ }
742
848
  const SIDE_TOKEN = /^(auto|[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?(px|dip|dppx|rem|em|pt|vw|vh|vmin|vmax|%)?|[a-z-]+\(.*\))$/i;
743
849
  /** 1-4 lengths, percentages or `auto`. Anything else makes the whole declaration invalid, which CSS ignores. */
744
850
  export function isSideList(value) {
@@ -1149,6 +1255,14 @@ function androidWritableStyleBuffer(nativeView) {
1149
1255
  }
1150
1256
  return typeof style.getWritableValue === 'function' ? style.getWritableValue() : style.getValues();
1151
1257
  }
1258
+ let appleWritableStyleValues;
1259
+ // Newer frameworks return the node's own (copied-on-write) buffer in one call.
1260
+ function appleHasWritableStyleValues(nativeView) {
1261
+ if (appleWritableStyleValues === undefined && nativeView) {
1262
+ appleWritableStyleValues = typeof nativeView.mason_writableStyleValues === 'function';
1263
+ }
1264
+ return !!appleWritableStyleValues;
1265
+ }
1152
1266
  function windowsStyleValues(nativeView) {
1153
1267
  if (nativeView?.Node)
1154
1268
  return masonEngine().StyleValues(nativeView);
@@ -1170,7 +1284,13 @@ function cssInitialIfReset(value, initial) {
1170
1284
  }
1171
1285
  export class Style {
1172
1286
  constructor() {
1173
- this.isDirty = -1n;
1287
+ this._bufferRequested = false;
1288
+ // Dirty mask words (StateKeys layout); `_hasDirty` false means clean.
1289
+ this._d0 = 0;
1290
+ this._d1 = 0;
1291
+ this._d2 = 0;
1292
+ this._d3 = 0;
1293
+ this._hasDirty = false;
1174
1294
  this.inBatch = false;
1175
1295
  this._syncScheduled = false;
1176
1296
  // Buffer bytes before this turn's first write. Frameworks often undo and
@@ -1179,41 +1299,89 @@ export class Style {
1179
1299
  // `false` means a write happened without a snapshot, so always sync.
1180
1300
  this._turnSnapshot = undefined;
1181
1301
  this._synced = false;
1302
+ this._windowsCss = new Map();
1182
1303
  }
1183
1304
  static fromView(view, nativeView) {
1184
- //console.time('fromView');
1185
1305
  const ret = new Style();
1186
1306
  ret.view_ = view;
1187
1307
  ret.nativeView = nativeView;
1308
+ return ret;
1309
+ }
1310
+ get style_view() {
1311
+ if (!this._bufferRequested)
1312
+ this.loadBuffer(false);
1313
+ return this._sv;
1314
+ }
1315
+ set style_view(value) {
1316
+ this._bufferRequested = true;
1317
+ this._sv = value;
1318
+ }
1319
+ get i8View() {
1320
+ if (!this._bufferRequested)
1321
+ this.loadBuffer(false);
1322
+ if (this._i8 === undefined && this._sv)
1323
+ this._i8 = new Int8Array(this._sv.buffer, this._sv.byteOffset, this._sv.byteLength);
1324
+ return this._i8;
1325
+ }
1326
+ set i8View(value) {
1327
+ this._i8 = value;
1328
+ }
1329
+ get u8View() {
1330
+ if (!this._bufferRequested)
1331
+ this.loadBuffer(false);
1332
+ if (this._u8 === undefined && this._sv)
1333
+ this._u8 = new Uint8Array(this._sv.buffer, this._sv.byteOffset, this._sv.byteLength);
1334
+ return this._u8;
1335
+ }
1336
+ set u8View(value) {
1337
+ this._u8 = value;
1338
+ }
1339
+ /** The native MasonStyle, fetched once (each `nativeView.style` read is a bridge call). */
1340
+ get appleStyle() {
1341
+ if (this._appleStyle === undefined) {
1342
+ this._appleStyle = (this.nativeView?.style ?? NSCMason.shared.styleForViewOrNode(this.nativeView));
1343
+ }
1344
+ return this._appleStyle;
1345
+ }
1346
+ // The byte views are rarely read, so they are made on demand.
1347
+ setBuffer(buffer) {
1348
+ this._bufferRequested = true;
1349
+ this._sv = new DataView(buffer);
1350
+ this._i8 = undefined;
1351
+ this._u8 = undefined;
1352
+ }
1353
+ // A new node shares the arena's default buffer, so a style whose first use
1354
+ // is a write asks for its own copy up front instead of fetching twice.
1355
+ loadBuffer(writable) {
1356
+ this._bufferRequested = true;
1188
1357
  if (__ANDROID__) {
1189
- const buffer = ArrayBuffer.from(androidWritableStyleBuffer(nativeView));
1190
- ret.style_view = new DataView(buffer);
1191
- ret.i8View = new Int8Array(buffer);
1192
- ret.u8View = new Uint8Array(buffer);
1358
+ this.setBuffer(ArrayBuffer.from(androidWritableStyleBuffer(this.nativeView)));
1193
1359
  }
1194
1360
  else if (__APPLE__) {
1195
- let style = nativeView?.style;
1196
- if (!style) {
1197
- style = NSCMason.shared.styleForViewOrNode(nativeView);
1361
+ const nativeView = this.nativeView;
1362
+ let data = null;
1363
+ if (writable && appleHasWritableStyleValues(nativeView)) {
1364
+ data = nativeView.mason_writableStyleValues();
1198
1365
  }
1199
- const styleBuffer = style.values;
1200
- const buffer = interop.bufferFromData(styleBuffer);
1201
- ret.style_view = new DataView(buffer);
1202
- ret.i8View = new Int8Array(buffer);
1203
- ret.u8View = new Uint8Array(buffer);
1366
+ if (!data) {
1367
+ const style = this.appleStyle;
1368
+ if (writable)
1369
+ style.prepareMut();
1370
+ data = style.values;
1371
+ }
1372
+ this.setBuffer(interop.bufferFromData(data));
1204
1373
  }
1205
1374
  else if (__WINDOWS__) {
1206
1375
  // Live IBuffer over the engine's arena style memory; the @nativescript/windows runtime
1207
1376
  // projects it as a writable ArrayBuffer, so the same StyleKeys-offset writes used on
1208
1377
  // iOS/Android land straight in the node's style.
1209
1378
  //@ts-ignore
1210
- const buffer = NSWinRT.interop.arrayBufferFromBuffer(windowsStyleValues(nativeView));
1211
- ret.style_view = new DataView(buffer);
1212
- ret.i8View = new Int8Array(buffer);
1213
- ret.u8View = new Uint8Array(buffer);
1379
+ this.setBuffer(NSWinRT.interop.arrayBufferFromBuffer(windowsStyleValues(this.nativeView)));
1214
1380
  }
1215
- //console.timeEnd('fromView');
1216
- return ret;
1381
+ }
1382
+ /** The dirty mask as one value, `-1n` when clean (tests and diagnostics). */
1383
+ get isDirty() {
1384
+ return this._hasDirty ? wordsToBigInt(this._d0, this._d1, this._d2, this._d3) : -1n;
1217
1385
  }
1218
1386
  static fromPseudo(pseudo, view, nativeView) {
1219
1387
  var mask = -1;
@@ -1287,13 +1455,11 @@ export class Style {
1287
1455
  const HIGH_OFFSET = StyleKeys.PSEUDO_SET_MASK_HIGH;
1288
1456
  if (this.style_view.byteLength < HIGH_OFFSET + 8)
1289
1457
  return;
1290
- const low = this.style_view.getBigUint64(LOW_OFFSET, true);
1291
- const high = this.style_view.getBigUint64(HIGH_OFFSET, true);
1292
- const MASK64 = (1n << 64n) - 1n;
1293
- const keyLow = key.bits & MASK64;
1294
- const keyHigh = (key.bits >> 64n) & MASK64;
1295
- this.style_view.setBigUint64(LOW_OFFSET, low | keyLow, true);
1296
- this.style_view.setBigUint64(HIGH_OFFSET, high | keyHigh, true);
1458
+ const v = this.style_view;
1459
+ setInt32(v, LOW_OFFSET, getInt32(v, LOW_OFFSET) | key.w0);
1460
+ setInt32(v, LOW_OFFSET + 4, getInt32(v, LOW_OFFSET + 4) | key.w1);
1461
+ setInt32(v, HIGH_OFFSET, getInt32(v, HIGH_OFFSET) | key.w2);
1462
+ setInt32(v, HIGH_OFFSET + 4, getInt32(v, HIGH_OFFSET + 4) | key.w3);
1297
1463
  }
1298
1464
  commitState(value) {
1299
1465
  if (this._pseudo) {
@@ -1334,34 +1500,91 @@ export class Style {
1334
1500
  }
1335
1501
  if (__WINDOWS__) {
1336
1502
  // Android and iOS parse these natively; Windows parses them here into the style buffer.
1503
+ if (!this._pseudo)
1504
+ this._windowsCss.set(name, value);
1337
1505
  this.applyWindowsCssString(name, value);
1338
1506
  }
1339
1507
  }
1508
+ applyWindowsBackground(shorthand) {
1509
+ const v = (this._windowsBackground ?? '').trim();
1510
+ const layer = splitTopLevelCommas(v)[0]?.trim() ?? '';
1511
+ const stopsOf = (g) => g.offsets.map((o, i) => o + ':' + (g.colors[i] >>> 0)).join(',');
1512
+ try {
1513
+ if (/^radial-gradient/i.test(layer)) {
1514
+ const g = parseRadialGradientCss(layer);
1515
+ if (g)
1516
+ NativeScript.Mason.Css.ApplyRadialGradientAt(this.nativeView, g.cx, g.cy, g.rx, g.ry, stopsOf(g), g.interpolation);
1517
+ return;
1518
+ }
1519
+ if (/^linear-gradient/i.test(layer)) {
1520
+ const g = parseLinearGradientCss(layer);
1521
+ if (g && g.colors.length)
1522
+ NativeScript.Mason.Css.ApplyLinearGradient(this.nativeView, g.angle, stopsOf(g), g.interpolation);
1523
+ return;
1524
+ }
1525
+ const url = /url\(\s*(['"]?)(.*?)\1\s*\)/i.exec(layer);
1526
+ if (url) {
1527
+ let source = url[2];
1528
+ if (source.startsWith('~/'))
1529
+ source = source.replace('~/', knownFolders.currentApp().path + '/');
1530
+ const rest = layer.slice(url.index + url[0].length).trim();
1531
+ const keywords = /\b(no-repeat|repeat-x|repeat-y|repeat|space|round|scroll|fixed|local|border-box|padding-box|content-box)\b/gi;
1532
+ const [positionPart, sizePart] = rest.split('/').map((p) => p.replace(keywords, '').trim());
1533
+ const size = shorthand && sizePart ? sizePart.split(/\s+/).slice(0, 2).join(' ') : this._windowsBackgroundSize;
1534
+ const position = parseBoxPosition(shorthand && positionPart ? positionPart : (this._windowsBackgroundPosition ?? '0% 0%'), 0);
1535
+ const align = (f) => (f <= 0.25 ? 0 : f >= 0.75 ? 2 : 1);
1536
+ NativeScript.Mason.Css.ApplyBackgroundImage(this.nativeView, source, backgroundFit(size), align(position.x), align(position.y));
1537
+ return;
1538
+ }
1539
+ if (!ANY_GRADIENT.test(layer)) {
1540
+ NativeScript.Mason.Css.ClearBackground(this.nativeView);
1541
+ if (shorthand && v.length && v.toLowerCase() !== 'none')
1542
+ this.backgroundColor = v;
1543
+ }
1544
+ }
1545
+ catch (_) { }
1546
+ }
1340
1547
  applyWindowsCssString(name, value) {
1341
1548
  // A gradient is a Panel brush from Css that VisualApply leaves over BACKGROUND_COLOR; clearing
1342
1549
  // it lets VisualApply repaint the color.
1343
1550
  if (name === 'background' || name === 'background-image') {
1344
- const v = typeof value === 'string' ? value : String(value ?? '');
1345
- if (LINEAR_GRADIENT.test(v)) {
1346
- const g = parseLinearGradientCss(v);
1347
- if (g && g.colors.length) {
1348
- try {
1349
- // Pass stops as an "offset:argb,..." string — WinRT array_view params don't marshal
1350
- // reliably from the NS-Windows JS runtime (plain arrays -> E_FAIL, typed arrays -> crash).
1351
- const stops = g.offsets.map((o, i) => o + ':' + (g.colors[i] >>> 0)).join(',');
1352
- NativeScript.Mason.Css.ApplyLinearGradient(this.nativeView, g.angle, stops, g.interpolation);
1353
- }
1354
- catch (_) { }
1355
- }
1356
- }
1357
- else if (!ANY_GRADIENT.test(v)) {
1358
- try {
1359
- NativeScript.Mason.Css.ClearBackground(this.nativeView);
1360
- }
1361
- catch (_) { }
1362
- if (name === 'background' && v.trim().length && v.trim().toLowerCase() !== 'none') {
1363
- this.backgroundColor = v;
1364
- }
1551
+ this._windowsBackground = typeof value === 'string' ? value : String(value ?? '');
1552
+ this.applyWindowsBackground(name === 'background');
1553
+ return;
1554
+ }
1555
+ if (name === 'background-size' || name === 'background-position') {
1556
+ if (name === 'background-size')
1557
+ this._windowsBackgroundSize = String(value ?? '');
1558
+ else
1559
+ this._windowsBackgroundPosition = String(value ?? '');
1560
+ if (/url\(/i.test(this._windowsBackground ?? ''))
1561
+ this.applyWindowsBackground(false);
1562
+ return;
1563
+ }
1564
+ if (name === 'filter' || name === 'backdrop-filter') {
1565
+ const view = this.nativeView;
1566
+ if (!view)
1567
+ return;
1568
+ const current = this.color >>> 0 || 0xff000000;
1569
+ const spec = encodeCssFilter(parseCssFilter(typeof value === 'string' ? value : '', (token) => cssLengthToDip(token, this.emBasis())), (color) => (color && color.toLowerCase() !== 'currentcolor' ? (normalizeColorValue(color) ?? current) : current));
1570
+ if (name === 'filter')
1571
+ NativeScript.Mason.Css.SetFilter(view, spec);
1572
+ else
1573
+ NativeScript.Mason.Css.SetBackdropFilter(view, spec);
1574
+ return;
1575
+ }
1576
+ if (name === 'font-feature-settings') {
1577
+ const view = this.nativeView;
1578
+ if (view && typeof view.SetFontFeatureSettings === 'function')
1579
+ view.SetFontFeatureSettings(typeof value === 'string' ? value : '');
1580
+ return;
1581
+ }
1582
+ if (name === 'text-shadow') {
1583
+ const view = this.nativeView;
1584
+ if (view && typeof view.SetTextShadow === 'function') {
1585
+ const current = this.color >>> 0 || 0xff000000;
1586
+ const shadows = parseBoxShadows(typeof value === 'string' ? value : '', (token) => cssLengthToDip(token, this.emBasis()));
1587
+ view.SetTextShadow(encodeBoxShadows(shadows, (color) => (color && color.toLowerCase() !== 'currentcolor' ? (normalizeColorValue(color) ?? current) : current)));
1365
1588
  }
1366
1589
  return;
1367
1590
  }
@@ -1459,6 +1682,9 @@ export class Style {
1459
1682
  case 'text-decoration-color':
1460
1683
  color = parseTextDecorationColor(value);
1461
1684
  break;
1685
+ case 'text-decoration-thickness':
1686
+ thickness = cssLengthToDip(value, this.emBasis()) ?? null;
1687
+ break;
1462
1688
  }
1463
1689
  if (line == null && style == null && color == null && thickness == null)
1464
1690
  return;
@@ -1504,13 +1730,14 @@ export class Style {
1504
1730
  this.commitState(StateKeys.BORDER_COLOR);
1505
1731
  }
1506
1732
  resetState() {
1507
- this.isDirty = -1n;
1733
+ this._hasDirty = false;
1734
+ this._d0 = this._d1 = this._d2 = this._d3 = 0;
1508
1735
  }
1509
1736
  syncStyle() {
1510
1737
  this._synced = true;
1511
1738
  const snapshot = this._turnSnapshot;
1512
1739
  this._turnSnapshot = undefined;
1513
- if (snapshot && this.isDirty !== -1n && bytesEqual(snapshot, this.u8View)) {
1740
+ if (snapshot && this._hasDirty && bytesEqual(snapshot, this.u8View)) {
1514
1741
  this.resetState();
1515
1742
  return;
1516
1743
  }
@@ -1519,47 +1746,60 @@ export class Style {
1519
1746
  }
1520
1747
  _sendSync() {
1521
1748
  if (__ANDROID__) {
1522
- const [lowLow, lowHigh, highLow, highHigh] = splitBigIntToInt32Parts(this.isDirty);
1523
1749
  //@ts-ignore
1524
1750
  const view = this.view?.android ?? this.view._view;
1525
1751
  // @ts-ignore - syncStyleParts is a newer native method; typings regenerate from the AAR separately.
1526
- view.syncStyleParts(lowLow, lowHigh, highLow, highHigh);
1752
+ view.syncStyleParts(this._d0, this._d1, this._d2, this._d3);
1527
1753
  }
1528
1754
  else if (__APPLE__) {
1529
- const [lowLow, lowHigh, highLow, highHigh] = splitBigIntToInt32Parts(this.isDirty);
1530
1755
  //@ts-ignore
1531
1756
  const view = this.view?.ios ?? this.view._view;
1532
1757
  // @ts-ignore
1533
- view.mason_syncStyleParts(lowLow, lowHigh, highLow, highHigh);
1758
+ view.mason_syncStyleParts(this._d0, this._d1, this._d2, this._d3);
1534
1759
  }
1535
1760
  else if (__WINDOWS__) {
1536
- // The Windows elements re-read the whole buffer, so the dirty bits aren't passed.
1537
1761
  // @ts-ignore
1538
1762
  const view = this.view?.windows ?? this.view._view;
1539
- view.SyncStyle('', '');
1540
- this.view?._windowsSyncAnonymousText?.();
1763
+ const all = !this._hasDirty;
1764
+ const d0 = all ? -1 : this._d0;
1765
+ const d1 = all ? -1 : this._d1;
1766
+ const d2 = all ? -1 : this._d2;
1767
+ const d3 = all ? -1 : this._d3;
1768
+ view.SyncStyle(d0, d1, d2, d3);
1769
+ const text = StateKeys.WINDOWS_TEXT;
1770
+ if ((d0 & text.w0) | (d1 & text.w1) | (d2 & text.w2) | (d3 & text.w3)) {
1771
+ this.view?._windowsSyncAnonymousText?.(d0, d1, d2, d3);
1772
+ }
1773
+ const flow = StateKeys.FLOW_TYPE;
1774
+ if (!this._pseudo && (d0 & flow.w0) | (d1 & flow.w1) | (d2 & flow.w2) | (d3 & flow.w3)) {
1775
+ this.view?._windowsFlowTypeChanged?.();
1776
+ }
1541
1777
  }
1542
1778
  }
1543
1779
  /** The anonymous Windows Text holding a container's own runs inherits the container's text styles. */
1544
- copyTextStyleTo(text) {
1780
+ copyTextStyleTo(text, d0 = -1, d1 = -1, d2 = -1, d3 = -1, block = false) {
1545
1781
  if (!__WINDOWS__ || !this.u8View)
1546
1782
  return;
1547
1783
  //@ts-ignore
1548
1784
  const target = new Uint8Array(NSWinRT.interop.arrayBufferFromBuffer(masonEngine().StyleValues(text)));
1549
1785
  target.set(this.u8View.subarray(StyleKeys.FONT_COLOR, StyleKeys.BACKGROUND_COLOR), StyleKeys.FONT_COLOR);
1550
1786
  target.set(this.u8View.subarray(StyleKeys.DECORATION_LINE, StyleKeys.PSEUDO_SET_MASK_LOW), StyleKeys.DECORATION_LINE);
1551
- text.SyncStyle('0', '0');
1787
+ target.set(this.u8View.subarray(StyleKeys.HYPHENS, StyleKeys.FONT_STRETCH_STATE + 1), StyleKeys.HYPHENS);
1788
+ if (block) {
1789
+ target[StyleKeys.DISPLAY] = 3;
1790
+ target[StyleKeys.DISPLAY_MODE] = 0 /* DisplayMode.None */;
1791
+ }
1792
+ text.SyncStyle(d0, d1, d2, d3);
1552
1793
  }
1553
1794
  setOrAppendState(value) {
1554
1795
  if (this._turnSnapshot === undefined) {
1555
1796
  this._turnSnapshot = false;
1556
1797
  }
1557
- if (this.isDirty == -1n) {
1558
- this.isDirty = value.bits;
1559
- }
1560
- else {
1561
- this.isDirty = this.isDirty | value.bits;
1562
- }
1798
+ this._d0 |= value.w0;
1799
+ this._d1 |= value.w1;
1800
+ this._d2 |= value.w2;
1801
+ this._d3 |= value.w3;
1802
+ this._hasDirty = true;
1563
1803
  if (!this.inBatch) {
1564
1804
  // Coalesce rapid-fire property changes (e.g. CSS batch apply) into a
1565
1805
  // single syncStyle() call on the next microtask. This avoids N
@@ -1573,7 +1813,7 @@ export class Style {
1573
1813
  }
1574
1814
  _flushScheduledSync() {
1575
1815
  this._syncScheduled = false;
1576
- if (this.isDirty !== -1n) {
1816
+ if (this._hasDirty) {
1577
1817
  this.syncStyle();
1578
1818
  }
1579
1819
  }
@@ -1602,40 +1842,18 @@ export class Style {
1602
1842
  return own > 0 ? own : cssUnits.rootFontSize;
1603
1843
  }
1604
1844
  prepareMut() {
1605
- // always mut
1606
1845
  if (this._pseudo) {
1607
1846
  return;
1608
1847
  }
1609
- if (this._turnSnapshot === undefined && this.isDirty === -1n && this.u8View) {
1848
+ if (!this._bufferRequested) {
1849
+ this.loadBuffer(true);
1850
+ }
1851
+ if (this._turnSnapshot === undefined && !this._hasDirty && this._sv) {
1610
1852
  this._turnSnapshot = this._synced ? this.u8View.slice() : false;
1611
1853
  }
1612
- const ref = getUint32(this.style_view, StyleKeys.REF_COUNT);
1613
- if (ref !== 1) {
1614
- if (__APPLE__) {
1615
- let style = this.nativeView?.style;
1616
- if (!style) {
1617
- style = NSCMason.shared.styleForViewOrNode(this.nativeView);
1618
- }
1619
- style.prepareMut();
1620
- const styleBuffer = style.values;
1621
- const buffer = interop.bufferFromData(styleBuffer);
1622
- this.style_view = new DataView(buffer);
1623
- this.i8View = new Int8Array(buffer);
1624
- this.u8View = new Uint8Array(buffer);
1625
- }
1626
- if (__ANDROID__) {
1627
- const buffer = ArrayBuffer.from(androidWritableStyleBuffer(this.nativeView));
1628
- this.style_view = new DataView(buffer);
1629
- this.i8View = new Int8Array(buffer);
1630
- this.u8View = new Uint8Array(buffer);
1631
- }
1632
- if (__WINDOWS__) {
1633
- //@ts-ignore
1634
- const buffer = NSWinRT.interop.arrayBufferFromBuffer(windowsStyleValues(this.nativeView));
1635
- this.style_view = new DataView(buffer);
1636
- this.i8View = new Int8Array(buffer);
1637
- this.u8View = new Uint8Array(buffer);
1638
- }
1854
+ if (getUint32(this._sv, StyleKeys.REF_COUNT) !== 1) {
1855
+ // Still the shared buffer (read before the first write): take a copy.
1856
+ this.loadBuffer(true);
1639
1857
  }
1640
1858
  }
1641
1859
  get boxSizing() {
@@ -1662,6 +1880,24 @@ export class Style {
1662
1880
  this.commitState(StateKeys.BOX_SIZING);
1663
1881
  }
1664
1882
  }
1883
+ get direction() {
1884
+ switch (getUint8(this.style_view, StyleKeys.DIRECTION)) {
1885
+ case 1:
1886
+ return 'ltr';
1887
+ case 2:
1888
+ return 'rtl';
1889
+ default:
1890
+ return 'inherit';
1891
+ }
1892
+ }
1893
+ set direction(value) {
1894
+ const direction = value === 'ltr' ? 1 : value === 'rtl' ? 2 : 0;
1895
+ if (getUint8(this.style_view, StyleKeys.DIRECTION) === direction)
1896
+ return;
1897
+ this.prepareMut();
1898
+ setUint8(this.style_view, StyleKeys.DIRECTION, direction);
1899
+ this.commitState(StateKeys.DIRECTION);
1900
+ }
1665
1901
  get listStyleType() {
1666
1902
  switch (getUint8(this.style_view, StyleKeys.LIST_STYLE_TYPE)) {
1667
1903
  case 1:
@@ -1691,6 +1927,18 @@ export class Style {
1691
1927
  setInt8(this.style_view, StyleKeys.LIST_STYLE_TYPE_STATE, 1);
1692
1928
  this.commitState(StateKeys.LIST_STYLE_TYPE);
1693
1929
  }
1930
+ get listStylePosition() {
1931
+ return getUint8(this.style_view, StyleKeys.LIST_STYLE_POSITION) === 1 ? 'inside' : 'outside';
1932
+ }
1933
+ set listStylePosition(value) {
1934
+ if (value !== 'outside' && value !== 'inside') {
1935
+ return;
1936
+ }
1937
+ this.prepareMut();
1938
+ setUint8(this.style_view, StyleKeys.LIST_STYLE_POSITION, value === 'inside' ? 1 : 0);
1939
+ setInt8(this.style_view, StyleKeys.LIST_STYLE_POSITION_STATE, 1);
1940
+ this.commitState(StateKeys.LIST_STYLE_POSITION);
1941
+ }
1694
1942
  get fontSize() {
1695
1943
  if (!this.style_view) {
1696
1944
  // BLACK ?
@@ -1885,6 +2133,12 @@ export class Style {
1885
2133
  }
1886
2134
  const normalized = normalizeColorValue(value);
1887
2135
  if (normalized == null) {
2136
+ // Leaving :active on Windows resets an unset color, which then inherits again.
2137
+ if (__WINDOWS__ && getInt8(this.style_view, StyleKeys.FONT_COLOR_STATE)) {
2138
+ this.prepareMut();
2139
+ setInt8(this.style_view, StyleKeys.FONT_COLOR_STATE, 0);
2140
+ this.commitState(StateKeys.FONT_COLOR);
2141
+ }
1888
2142
  return;
1889
2143
  }
1890
2144
  this.prepareMut();
@@ -1955,6 +2209,15 @@ export class Style {
1955
2209
  get styleView() {
1956
2210
  return this.style_view;
1957
2211
  }
2212
+ get hasBoxStyle() {
2213
+ const view = this.style_view;
2214
+ if (!view)
2215
+ return false;
2216
+ if (getInt8(view, StyleKeys.WIDTH_TYPE) !== 0 || getInt8(view, StyleKeys.HEIGHT_TYPE) !== 0)
2217
+ return true;
2218
+ const sides = [StyleKeys.PADDING_LEFT_VALUE, StyleKeys.PADDING_RIGHT_VALUE, StyleKeys.PADDING_TOP_VALUE, StyleKeys.PADDING_BOTTOM_VALUE, StyleKeys.BORDER_LEFT_VALUE, StyleKeys.BORDER_RIGHT_VALUE, StyleKeys.BORDER_TOP_VALUE, StyleKeys.BORDER_BOTTOM_VALUE];
2219
+ return sides.some((offset) => getFloat32(view, offset) > 0);
2220
+ }
1958
2221
  get display() {
1959
2222
  const mode = getInt8(this.style_view, StyleKeys.DISPLAY_MODE);
1960
2223
  if (mode === 1 /* DisplayMode.Inline */) {
@@ -2021,14 +2284,7 @@ export class Style {
2021
2284
  this.prepareMut();
2022
2285
  setInt8(this.style_view, StyleKeys.DISPLAY, display);
2023
2286
  setInt8(this.style_view, StyleKeys.DISPLAY_MODE, displayMode);
2024
- if (this.isDirty == -1n) {
2025
- this.isDirty = StateKeys.DISPLAY_MODE.bits;
2026
- }
2027
- else {
2028
- this.isDirty = this.isDirty | StateKeys.DISPLAY_MODE.bits;
2029
- }
2030
- // DISPLAY/DISPLAY_MODE are disjoint bits; use .or(), not .and()
2031
- this.commitState(StateKeys.DISPLAY.or(StateKeys.DISPLAY_MODE));
2287
+ this.commitState(StateKeys.DISPLAY_AND_MODE);
2032
2288
  }
2033
2289
  }
2034
2290
  get position() {
@@ -2183,8 +2439,12 @@ export class Style {
2183
2439
  setInt8(this.style_view, StyleKeys.MIN_WIDTH_TYPE, 2);
2184
2440
  setFloat32(this.style_view, StyleKeys.MIN_WIDTH_VALUE, value.value);
2185
2441
  break;
2442
+ default:
2443
+ return;
2186
2444
  }
2187
2445
  break;
2446
+ default:
2447
+ return;
2188
2448
  }
2189
2449
  this.commitState(StateKeys.MIN_SIZE);
2190
2450
  }
@@ -2224,8 +2484,12 @@ export class Style {
2224
2484
  setInt8(this.style_view, StyleKeys.MIN_HEIGHT_TYPE, 2);
2225
2485
  setFloat32(this.style_view, StyleKeys.MIN_HEIGHT_VALUE, value.value);
2226
2486
  break;
2487
+ default:
2488
+ return;
2227
2489
  }
2228
2490
  break;
2491
+ default:
2492
+ return;
2229
2493
  }
2230
2494
  this.commitState(StateKeys.MIN_SIZE);
2231
2495
  }
@@ -2265,8 +2529,12 @@ export class Style {
2265
2529
  setInt8(this.style_view, StyleKeys.WIDTH_TYPE, 2);
2266
2530
  setFloat32(this.style_view, StyleKeys.WIDTH_VALUE, value.value);
2267
2531
  break;
2532
+ default:
2533
+ return;
2268
2534
  }
2269
2535
  break;
2536
+ default:
2537
+ return;
2270
2538
  }
2271
2539
  this.commitState(StateKeys.SIZE);
2272
2540
  }
@@ -2306,8 +2574,12 @@ export class Style {
2306
2574
  setInt8(this.style_view, StyleKeys.HEIGHT_TYPE, 2);
2307
2575
  setFloat32(this.style_view, StyleKeys.HEIGHT_VALUE, value.value);
2308
2576
  break;
2577
+ default:
2578
+ return;
2309
2579
  }
2310
2580
  break;
2581
+ default:
2582
+ return;
2311
2583
  }
2312
2584
  this.commitState(StateKeys.SIZE);
2313
2585
  }
@@ -2347,8 +2619,12 @@ export class Style {
2347
2619
  setInt8(this.style_view, StyleKeys.MAX_WIDTH_TYPE, 2);
2348
2620
  setFloat32(this.style_view, StyleKeys.MAX_WIDTH_VALUE, value.value);
2349
2621
  break;
2622
+ default:
2623
+ return;
2350
2624
  }
2351
2625
  break;
2626
+ default:
2627
+ return;
2352
2628
  }
2353
2629
  this.commitState(StateKeys.MAX_SIZE);
2354
2630
  }
@@ -2388,8 +2664,12 @@ export class Style {
2388
2664
  setInt8(this.style_view, StyleKeys.MAX_HEIGHT_TYPE, 2);
2389
2665
  setFloat32(this.style_view, StyleKeys.MAX_HEIGHT_VALUE, value.value);
2390
2666
  break;
2667
+ default:
2668
+ return;
2391
2669
  }
2392
2670
  break;
2671
+ default:
2672
+ return;
2393
2673
  }
2394
2674
  this.commitState(StateKeys.MAX_SIZE);
2395
2675
  }
@@ -3702,9 +3982,9 @@ export class Style {
3702
3982
  return nodeHelper().getGridAutoRows(this.nativeView);
3703
3983
  }
3704
3984
  if (__APPLE__) {
3705
- return this.nativeView.style.gridAutoRows;
3985
+ return this.appleStyle.gridAutoRows;
3706
3986
  }
3707
- return '';
3987
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridAutoRowsCss ?? '') : '';
3708
3988
  }
3709
3989
  set gridAutoRows(value) {
3710
3990
  if (!this.nativeView) {
@@ -3716,7 +3996,7 @@ export class Style {
3716
3996
  nodeHelper().setGridAutoRows(this.nativeView, value);
3717
3997
  }
3718
3998
  if (__APPLE__) {
3719
- this.nativeView.style.gridAutoRows = value;
3999
+ this.appleStyle.gridAutoRows = value;
3720
4000
  }
3721
4001
  if (__WINDOWS__) {
3722
4002
  windowsSetGrid(this.nativeView, 'gridAutoRows', value);
@@ -3730,9 +4010,9 @@ export class Style {
3730
4010
  return nodeHelper().getGridAutoColumns(this.nativeView);
3731
4011
  }
3732
4012
  if (__APPLE__) {
3733
- return this.nativeView.style.gridAutoColumns;
4013
+ return this.appleStyle.gridAutoColumns;
3734
4014
  }
3735
- return '';
4015
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridAutoColumnsCss ?? '') : '';
3736
4016
  }
3737
4017
  set gridAutoColumns(value) {
3738
4018
  if (!this.nativeView) {
@@ -3744,7 +4024,7 @@ export class Style {
3744
4024
  nodeHelper().setGridAutoColumns(this.nativeView, value);
3745
4025
  }
3746
4026
  if (__APPLE__) {
3747
- this.nativeView.style.gridAutoColumns = value;
4027
+ this.appleStyle.gridAutoColumns = value;
3748
4028
  }
3749
4029
  if (__WINDOWS__) {
3750
4030
  windowsSetGrid(this.nativeView, 'gridAutoColumns', value);
@@ -3792,7 +4072,7 @@ export class Style {
3792
4072
  nodeHelper().setGridColumn(this.nativeView, value);
3793
4073
  }
3794
4074
  if (__APPLE__) {
3795
- this.nativeView.style.gridColumn = value;
4075
+ this.appleStyle.gridColumn = value;
3796
4076
  }
3797
4077
  if (__WINDOWS__) {
3798
4078
  windowsSetGrid(this.nativeView, 'gridColumn', value);
@@ -3806,9 +4086,9 @@ export class Style {
3806
4086
  return nodeHelper().getGridColumn(this.nativeView);
3807
4087
  }
3808
4088
  if (__APPLE__) {
3809
- return this.nativeView.style.gridColumn;
4089
+ return this.appleStyle.gridColumn;
3810
4090
  }
3811
- return '';
4091
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridColumnCss ?? '') : '';
3812
4092
  }
3813
4093
  get gridColumnStart() {
3814
4094
  if (!this.nativeView) {
@@ -3818,9 +4098,9 @@ export class Style {
3818
4098
  return nodeHelper().getGridColumnStart(this.nativeView);
3819
4099
  }
3820
4100
  if (__APPLE__) {
3821
- return this.nativeView.style.gridColumnStart;
4101
+ return this.appleStyle.gridColumnStart;
3822
4102
  }
3823
- return '';
4103
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridColumnStartCss ?? '') : '';
3824
4104
  }
3825
4105
  set gridColumnStart(value) {
3826
4106
  if (!this.nativeView) {
@@ -3832,7 +4112,7 @@ export class Style {
3832
4112
  nodeHelper().setGridColumnStart(this.nativeView, value);
3833
4113
  }
3834
4114
  if (__APPLE__) {
3835
- this.nativeView.style.gridColumnStart = value;
4115
+ this.appleStyle.gridColumnStart = value;
3836
4116
  }
3837
4117
  if (__WINDOWS__) {
3838
4118
  windowsSetGrid(this.nativeView, 'gridColumnStart', value);
@@ -3846,9 +4126,9 @@ export class Style {
3846
4126
  return nodeHelper().getGridColumnEnd(this.nativeView);
3847
4127
  }
3848
4128
  if (__APPLE__) {
3849
- return this.nativeView.style.gridColumnEnd;
4129
+ return this.appleStyle.gridColumnEnd;
3850
4130
  }
3851
- return '';
4131
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridColumnEndCss ?? '') : '';
3852
4132
  }
3853
4133
  set gridColumnEnd(value) {
3854
4134
  if (!this.nativeView) {
@@ -3860,7 +4140,7 @@ export class Style {
3860
4140
  nodeHelper().setGridColumnEnd(this.nativeView, value);
3861
4141
  }
3862
4142
  if (__APPLE__) {
3863
- this.nativeView.style.gridColumnEnd = value;
4143
+ this.appleStyle.gridColumnEnd = value;
3864
4144
  }
3865
4145
  if (__WINDOWS__) {
3866
4146
  windowsSetGrid(this.nativeView, 'gridColumnEnd', value);
@@ -3876,7 +4156,7 @@ export class Style {
3876
4156
  nodeHelper().setGridRow(this.nativeView, value);
3877
4157
  }
3878
4158
  if (__APPLE__) {
3879
- this.nativeView.style.gridRow = value;
4159
+ this.appleStyle.gridRow = value;
3880
4160
  }
3881
4161
  if (__WINDOWS__) {
3882
4162
  windowsSetGrid(this.nativeView, 'gridRow', value);
@@ -3890,9 +4170,9 @@ export class Style {
3890
4170
  return nodeHelper().getGridRow(this.nativeView);
3891
4171
  }
3892
4172
  if (__APPLE__) {
3893
- return this.nativeView.style.gridRow;
4173
+ return this.appleStyle.gridRow;
3894
4174
  }
3895
- return '';
4175
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridRowCss ?? '') : '';
3896
4176
  }
3897
4177
  get gridRowStart() {
3898
4178
  if (!this.nativeView) {
@@ -3902,9 +4182,9 @@ export class Style {
3902
4182
  return nodeHelper().getGridRowStart(this.nativeView);
3903
4183
  }
3904
4184
  if (__APPLE__) {
3905
- return this.nativeView.style.gridRowStart;
4185
+ return this.appleStyle.gridRowStart;
3906
4186
  }
3907
- return '';
4187
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridRowStartCss ?? '') : '';
3908
4188
  }
3909
4189
  set gridRowStart(value) {
3910
4190
  if (!this.nativeView) {
@@ -3916,7 +4196,7 @@ export class Style {
3916
4196
  nodeHelper().setGridRowStart(this.nativeView, value);
3917
4197
  }
3918
4198
  if (__APPLE__) {
3919
- this.nativeView.style.gridRowStart = value;
4199
+ this.appleStyle.gridRowStart = value;
3920
4200
  }
3921
4201
  if (__WINDOWS__) {
3922
4202
  windowsSetGrid(this.nativeView, 'gridRowStart', value);
@@ -3930,9 +4210,9 @@ export class Style {
3930
4210
  return nodeHelper().getGridRowEnd(this.nativeView);
3931
4211
  }
3932
4212
  if (__APPLE__) {
3933
- return this.nativeView.style.gridRowEnd;
4213
+ return this.appleStyle.gridRowEnd;
3934
4214
  }
3935
- return '';
4215
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridRowEndCss ?? '') : '';
3936
4216
  }
3937
4217
  set gridRowEnd(value) {
3938
4218
  if (!this.nativeView) {
@@ -3944,7 +4224,7 @@ export class Style {
3944
4224
  nodeHelper().setGridRowEnd(this.nativeView, value);
3945
4225
  }
3946
4226
  if (__APPLE__) {
3947
- this.nativeView.style.gridRowEnd = value;
4227
+ this.appleStyle.gridRowEnd = value;
3948
4228
  }
3949
4229
  if (__WINDOWS__) {
3950
4230
  windowsSetGrid(this.nativeView, 'gridRowEnd', value);
@@ -3960,7 +4240,7 @@ export class Style {
3960
4240
  nodeHelper().setGridArea(this.nativeView, value);
3961
4241
  }
3962
4242
  if (__APPLE__) {
3963
- this.nativeView.style.gridArea = value;
4243
+ this.appleStyle.gridArea = value;
3964
4244
  }
3965
4245
  if (__WINDOWS__) {
3966
4246
  windowsSetGrid(this.nativeView, 'gridArea', value);
@@ -3974,9 +4254,9 @@ export class Style {
3974
4254
  return nodeHelper().getGridArea(this.nativeView);
3975
4255
  }
3976
4256
  if (__APPLE__) {
3977
- return this.nativeView.style.gridArea;
4257
+ return this.appleStyle.gridArea;
3978
4258
  }
3979
- return '';
4259
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridAreaCss ?? '') : '';
3980
4260
  }
3981
4261
  set gridTemplateRows(value) {
3982
4262
  if (!this.nativeView) {
@@ -3988,7 +4268,7 @@ export class Style {
3988
4268
  nodeHelper().setGridTemplateRows(this.nativeView, value);
3989
4269
  }
3990
4270
  if (__APPLE__) {
3991
- this.nativeView.style.gridTemplateRows = value;
4271
+ this.appleStyle.gridTemplateRows = value;
3992
4272
  }
3993
4273
  if (__WINDOWS__) {
3994
4274
  windowsSetGrid(this.nativeView, 'gridTemplateRows', value);
@@ -4002,9 +4282,9 @@ export class Style {
4002
4282
  return nodeHelper().getGridTemplateRows(this.nativeView);
4003
4283
  }
4004
4284
  if (__APPLE__) {
4005
- return this.nativeView.style.gridTemplateRows;
4285
+ return this.appleStyle.gridTemplateRows;
4006
4286
  }
4007
- return '';
4287
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridTemplateRowsCss ?? '') : '';
4008
4288
  }
4009
4289
  get gridTemplateColumns() {
4010
4290
  if (!this.nativeView) {
@@ -4014,9 +4294,9 @@ export class Style {
4014
4294
  return nodeHelper().getGridTemplateColumns(this.nativeView);
4015
4295
  }
4016
4296
  if (__APPLE__) {
4017
- return this.nativeView.style.gridTemplateColumns;
4297
+ return this.appleStyle.gridTemplateColumns;
4018
4298
  }
4019
- return '';
4299
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridTemplateColumnsCss ?? '') : '';
4020
4300
  }
4021
4301
  set gridTemplateColumns(value) {
4022
4302
  if (!this.nativeView) {
@@ -4028,7 +4308,7 @@ export class Style {
4028
4308
  nodeHelper().setGridTemplateColumns(this.nativeView, value);
4029
4309
  }
4030
4310
  if (__APPLE__) {
4031
- this.nativeView.style.gridTemplateColumns = value;
4311
+ this.appleStyle.gridTemplateColumns = value;
4032
4312
  }
4033
4313
  if (__WINDOWS__) {
4034
4314
  windowsSetGrid(this.nativeView, 'gridTemplateColumns', value);
@@ -4042,9 +4322,9 @@ export class Style {
4042
4322
  return nodeHelper().getGridTemplateAreas(this.nativeView);
4043
4323
  }
4044
4324
  if (__APPLE__) {
4045
- return this.nativeView.style.gridTemplateAreas;
4325
+ return this.appleStyle.gridTemplateAreas;
4046
4326
  }
4047
- return '';
4327
+ return __WINDOWS__ ? (this.nativeView?.Style?.GridTemplateAreasCss ?? '') : '';
4048
4328
  }
4049
4329
  set gridTemplateAreas(value) {
4050
4330
  if (!this.nativeView) {
@@ -4056,7 +4336,7 @@ export class Style {
4056
4336
  nodeHelper().setGridTemplateAreas(this.nativeView, value);
4057
4337
  }
4058
4338
  if (__APPLE__) {
4059
- this.nativeView.style.gridTemplateAreas = value;
4339
+ this.appleStyle.gridTemplateAreas = value;
4060
4340
  }
4061
4341
  if (__WINDOWS__) {
4062
4342
  windowsSetGrid(this.nativeView, 'gridTemplateAreas', value);
@@ -4409,13 +4689,13 @@ export class Style {
4409
4689
  return nodeHelper().getBackground(this.nativeView);
4410
4690
  }
4411
4691
  if (__APPLE__) {
4412
- return this.nativeView.style.background;
4692
+ return this.appleStyle.background;
4413
4693
  }
4414
- return '';
4694
+ return __WINDOWS__ ? (this._windowsCss.get('background') ?? '') : '';
4415
4695
  }
4416
4696
  set background(value) {
4417
4697
  value = this.coerceCssStringValue(value);
4418
- this.setPseudoCssStringValue('background', value, () => nodeHelper().setBackground(this.nativeView, value), () => (this.nativeView.style.background = value));
4698
+ this.setPseudoCssStringValue('background', value, () => nodeHelper().setBackground(this.nativeView, value), () => (this.appleStyle.background = value));
4419
4699
  }
4420
4700
  get backgroundImage() {
4421
4701
  if (!this.nativeView) {
@@ -4425,13 +4705,13 @@ export class Style {
4425
4705
  return nodeHelper().getBackgroundImage(this.nativeView);
4426
4706
  }
4427
4707
  if (__APPLE__) {
4428
- return this.nativeView.style.backgroundImage;
4708
+ return this.appleStyle.backgroundImage;
4429
4709
  }
4430
- return '';
4710
+ return __WINDOWS__ ? (this._windowsCss.get('background-image') ?? '') : '';
4431
4711
  }
4432
4712
  set backgroundImage(value) {
4433
4713
  value = this.coerceCssStringValue(value);
4434
- this.setPseudoCssStringValue('background-image', value, () => nodeHelper().setBackgroundImage(this.nativeView, value), () => (this.nativeView.style.backgroundImage = value));
4714
+ this.setPseudoCssStringValue('background-image', value, () => nodeHelper().setBackgroundImage(this.nativeView, value), () => (this.appleStyle.backgroundImage = value));
4435
4715
  }
4436
4716
  get backgroundRepeat() {
4437
4717
  if (!this.nativeView) {
@@ -4441,13 +4721,13 @@ export class Style {
4441
4721
  return nodeHelper().getBackgroundRepeat(this.nativeView);
4442
4722
  }
4443
4723
  if (__APPLE__) {
4444
- return this.nativeView.style.backgroundRepeat;
4724
+ return this.appleStyle.backgroundRepeat;
4445
4725
  }
4446
- return '';
4726
+ return __WINDOWS__ ? (this._windowsCss.get('background-repeat') ?? '') : '';
4447
4727
  }
4448
4728
  set backgroundRepeat(value) {
4449
4729
  value = this.coerceCssStringValue(value);
4450
- this.setPseudoCssStringValue('background-repeat', value, () => nodeHelper().setBackgroundRepeat(this.nativeView, value), () => (this.nativeView.style.backgroundRepeat = value));
4730
+ this.setPseudoCssStringValue('background-repeat', value, () => nodeHelper().setBackgroundRepeat(this.nativeView, value), () => (this.appleStyle.backgroundRepeat = value));
4451
4731
  }
4452
4732
  get backgroundPosition() {
4453
4733
  if (!this.nativeView) {
@@ -4457,13 +4737,13 @@ export class Style {
4457
4737
  return nodeHelper().getBackgroundPosition(this.nativeView);
4458
4738
  }
4459
4739
  if (__APPLE__) {
4460
- return this.nativeView.style.backgroundPosition;
4740
+ return this.appleStyle.backgroundPosition;
4461
4741
  }
4462
- return '';
4742
+ return __WINDOWS__ ? (this._windowsCss.get('background-position') ?? '') : '';
4463
4743
  }
4464
4744
  set backgroundPosition(value) {
4465
4745
  value = this.coerceCssStringValue(value);
4466
- this.setPseudoCssStringValue('background-position', value, () => nodeHelper().setBackgroundPosition(this.nativeView, value), () => (this.nativeView.style.backgroundPosition = value));
4746
+ this.setPseudoCssStringValue('background-position', value, () => nodeHelper().setBackgroundPosition(this.nativeView, value), () => (this.appleStyle.backgroundPosition = value));
4467
4747
  }
4468
4748
  get backgroundSize() {
4469
4749
  if (!this.nativeView) {
@@ -4473,13 +4753,13 @@ export class Style {
4473
4753
  return nodeHelper().getBackgroundSize(this.nativeView);
4474
4754
  }
4475
4755
  if (__APPLE__) {
4476
- return this.nativeView.style.backgroundSize;
4756
+ return this.appleStyle.backgroundSize;
4477
4757
  }
4478
- return '';
4758
+ return __WINDOWS__ ? (this._windowsCss.get('background-size') ?? '') : '';
4479
4759
  }
4480
4760
  set backgroundSize(value) {
4481
4761
  value = this.coerceCssStringValue(value);
4482
- this.setPseudoCssStringValue('background-size', value, () => nodeHelper().setBackgroundSize(this.nativeView, value), () => (this.nativeView.style.backgroundSize = value));
4762
+ this.setPseudoCssStringValue('background-size', value, () => nodeHelper().setBackgroundSize(this.nativeView, value), () => (this.appleStyle.backgroundSize = value));
4483
4763
  }
4484
4764
  get backgroundClip() {
4485
4765
  if (!this.nativeView) {
@@ -4489,13 +4769,13 @@ export class Style {
4489
4769
  return nodeHelper().getBackgroundClip(this.nativeView);
4490
4770
  }
4491
4771
  if (__APPLE__) {
4492
- return this.nativeView.style.backgroundClip;
4772
+ return this.appleStyle.backgroundClip;
4493
4773
  }
4494
- return '';
4774
+ return __WINDOWS__ ? (this._windowsCss.get('background-clip') ?? '') : '';
4495
4775
  }
4496
4776
  set backgroundClip(value) {
4497
4777
  value = this.coerceCssStringValue(value);
4498
- this.setPseudoCssStringValue('background-clip', value, () => nodeHelper().setBackgroundClip(this.nativeView, value), () => (this.nativeView.style.backgroundClip = value));
4778
+ this.setPseudoCssStringValue('background-clip', value, () => nodeHelper().setBackgroundClip(this.nativeView, value), () => (this.appleStyle.backgroundClip = value));
4499
4779
  }
4500
4780
  get backgroundPositionX() {
4501
4781
  if (!this.nativeView) {
@@ -4505,13 +4785,13 @@ export class Style {
4505
4785
  return nodeHelper().getBackgroundPositionX(this.nativeView);
4506
4786
  }
4507
4787
  if (__APPLE__) {
4508
- return this.nativeView.style.backgroundPositionX;
4788
+ return this.appleStyle.backgroundPositionX;
4509
4789
  }
4510
- return '';
4790
+ return __WINDOWS__ ? (this._windowsCss.get('background-position-x') ?? '') : '';
4511
4791
  }
4512
4792
  set backgroundPositionX(value) {
4513
4793
  value = cssInitialIfReset(this.coerceCssStringValue(value), '0%');
4514
- this.setPseudoCssStringValue('background-position-x', value, () => nodeHelper().setBackgroundPositionX(this.nativeView, value), () => (this.nativeView.style.backgroundPositionX = value));
4794
+ this.setPseudoCssStringValue('background-position-x', value, () => nodeHelper().setBackgroundPositionX(this.nativeView, value), () => (this.appleStyle.backgroundPositionX = value));
4515
4795
  }
4516
4796
  get backgroundPositionY() {
4517
4797
  if (!this.nativeView) {
@@ -4521,13 +4801,13 @@ export class Style {
4521
4801
  return nodeHelper().getBackgroundPositionY(this.nativeView);
4522
4802
  }
4523
4803
  if (__APPLE__) {
4524
- return this.nativeView.style.backgroundPositionY;
4804
+ return this.appleStyle.backgroundPositionY;
4525
4805
  }
4526
- return '';
4806
+ return __WINDOWS__ ? (this._windowsCss.get('background-position-y') ?? '') : '';
4527
4807
  }
4528
4808
  set backgroundPositionY(value) {
4529
4809
  value = cssInitialIfReset(this.coerceCssStringValue(value), '0%');
4530
- this.setPseudoCssStringValue('background-position-y', value, () => nodeHelper().setBackgroundPositionY(this.nativeView, value), () => (this.nativeView.style.backgroundPositionY = value));
4810
+ this.setPseudoCssStringValue('background-position-y', value, () => nodeHelper().setBackgroundPositionY(this.nativeView, value), () => (this.appleStyle.backgroundPositionY = value));
4531
4811
  }
4532
4812
  get backgroundOrigin() {
4533
4813
  if (!this.nativeView) {
@@ -4537,13 +4817,13 @@ export class Style {
4537
4817
  return nodeHelper().getBackgroundOrigin(this.nativeView);
4538
4818
  }
4539
4819
  if (__APPLE__) {
4540
- return this.nativeView.style.backgroundOrigin;
4820
+ return this.appleStyle.backgroundOrigin;
4541
4821
  }
4542
- return '';
4822
+ return __WINDOWS__ ? (this._windowsCss.get('background-origin') ?? '') : '';
4543
4823
  }
4544
4824
  set backgroundOrigin(value) {
4545
4825
  value = cssInitialIfReset(this.coerceCssStringValue(value), 'padding-box');
4546
- this.setPseudoCssStringValue('background-origin', value, () => nodeHelper().setBackgroundOrigin(this.nativeView, value), () => (this.nativeView.style.backgroundOrigin = value));
4826
+ this.setPseudoCssStringValue('background-origin', value, () => nodeHelper().setBackgroundOrigin(this.nativeView, value), () => (this.appleStyle.backgroundOrigin = value));
4547
4827
  }
4548
4828
  get backgroundAttachment() {
4549
4829
  if (!this.nativeView) {
@@ -4553,13 +4833,13 @@ export class Style {
4553
4833
  return nodeHelper().getBackgroundAttachment(this.nativeView);
4554
4834
  }
4555
4835
  if (__APPLE__) {
4556
- return this.nativeView.style.backgroundAttachment;
4836
+ return this.appleStyle.backgroundAttachment;
4557
4837
  }
4558
- return '';
4838
+ return __WINDOWS__ ? (this._windowsCss.get('background-attachment') ?? '') : '';
4559
4839
  }
4560
4840
  set backgroundAttachment(value) {
4561
4841
  value = cssInitialIfReset(this.coerceCssStringValue(value), 'scroll');
4562
- this.setPseudoCssStringValue('background-attachment', value, () => nodeHelper().setBackgroundAttachment(this.nativeView, value), () => (this.nativeView.style.backgroundAttachment = value));
4842
+ this.setPseudoCssStringValue('background-attachment', value, () => nodeHelper().setBackgroundAttachment(this.nativeView, value), () => (this.appleStyle.backgroundAttachment = value));
4563
4843
  }
4564
4844
  get backgroundBlendMode() {
4565
4845
  if (!this.nativeView) {
@@ -4569,13 +4849,13 @@ export class Style {
4569
4849
  return nodeHelper().getBackgroundBlendMode(this.nativeView);
4570
4850
  }
4571
4851
  if (__APPLE__) {
4572
- return this.nativeView.style.backgroundBlendMode;
4852
+ return this.appleStyle.backgroundBlendMode;
4573
4853
  }
4574
- return '';
4854
+ return __WINDOWS__ ? (this._windowsCss.get('background-blend-mode') ?? '') : '';
4575
4855
  }
4576
4856
  set backgroundBlendMode(value) {
4577
4857
  value = cssInitialIfReset(this.coerceCssStringValue(value), 'normal');
4578
- this.setPseudoCssStringValue('background-blend-mode', value, () => nodeHelper().setBackgroundBlendMode(this.nativeView, value), () => (this.nativeView.style.backgroundBlendMode = value));
4858
+ this.setPseudoCssStringValue('background-blend-mode', value, () => nodeHelper().setBackgroundBlendMode(this.nativeView, value), () => (this.appleStyle.backgroundBlendMode = value));
4579
4859
  }
4580
4860
  hasBorderRadius() {
4581
4861
  const view = this.style_view;
@@ -4595,7 +4875,7 @@ export class Style {
4595
4875
  return this._borderRadiusCss ?? nodeHelper().getBorderRadius(this.nativeView);
4596
4876
  }
4597
4877
  if (__APPLE__) {
4598
- return this._borderRadiusCss ?? this.nativeView.style.borderRadius;
4878
+ return this._borderRadiusCss ?? this.appleStyle.borderRadius;
4599
4879
  }
4600
4880
  if (__WINDOWS__ && this.style_view) {
4601
4881
  // Read back so a single corner longhand keeps the other three instead of resetting them to 0.
@@ -4613,7 +4893,7 @@ export class Style {
4613
4893
  }
4614
4894
  if (!this._pseudo)
4615
4895
  this._borderRadiusCss = undefined;
4616
- this.setPseudoCssStringValue('border-radius', value, () => nodeHelper().setBorderRadius(this.nativeView, value), () => (this.nativeView.style.borderRadius = value));
4896
+ this.setPseudoCssStringValue('border-radius', value, () => nodeHelper().setBorderRadius(this.nativeView, value), () => (this.appleStyle.borderRadius = value));
4617
4897
  }
4618
4898
  _writeCornerRadius(corner, radius, shorthand, scale = deviceScale()) {
4619
4899
  if (!this.nativeView || this._pseudo || !this.style_view)
@@ -4677,7 +4957,7 @@ export class Style {
4677
4957
  }
4678
4958
  get objectFit() {
4679
4959
  const map = ['contain', 'cover', 'fill', 'none', 'scale-down'];
4680
- return map[getUint8(this.style_view, StyleKeys.OBJECT_FIT)] ?? 'contain';
4960
+ return map[getUint8(this.style_view, StyleKeys.OBJECT_FIT)] ?? 'fill';
4681
4961
  }
4682
4962
  /** Read by `Img`; previously reachable only through the native HTML parser. */
4683
4963
  set objectFit(value) {
@@ -4724,19 +5004,19 @@ export class Style {
4724
5004
  return nodeHelper().getFontFamily(this.nativeView);
4725
5005
  }
4726
5006
  if (__APPLE__) {
4727
- return this.nativeView.style.fontFamily;
5007
+ return this.appleStyle.fontFamily;
4728
5008
  }
4729
- return '';
5009
+ return __WINDOWS__ ? (this._windowsCss.get('font-family') ?? '') : '';
4730
5010
  }
4731
5011
  // `font-family` is a native Style property (builds a FontFace), not a
4732
5012
  // style-buffer field, so it can't be written through the shared buffer.
4733
5013
  set fontFamily(value) {
4734
5014
  value = this.coerceCssStringValue(value);
4735
- this.setPseudoCssStringValue('font-family', value, () => nodeHelper().setFontFamily(this.nativeView, value), () => (this.nativeView.style.fontFamily = value));
5015
+ this.setPseudoCssStringValue('font-family', value, () => nodeHelper().setFontFamily(this.nativeView, value), () => (this.appleStyle.fontFamily = value));
4736
5016
  }
4737
5017
  set textDecoration(value) {
4738
5018
  value = this.coerceCssStringValue(value);
4739
- this.setPseudoCssStringValue('text-decoration', value, () => nodeHelper().setTextDecoration(this.nativeView, value), () => this.nativeView.style.setTextDecoration(value));
5019
+ this.setPseudoCssStringValue('text-decoration', value, () => nodeHelper().setTextDecoration(this.nativeView, value), () => this.appleStyle.setTextDecoration(value));
4740
5020
  }
4741
5021
  get textDecorationLine() {
4742
5022
  if (!this.nativeView) {
@@ -4746,7 +5026,7 @@ export class Style {
4746
5026
  return nodeHelper().getTextDecorationLine(this.nativeView);
4747
5027
  }
4748
5028
  if (__APPLE__) {
4749
- return this.nativeView.style.textDecorationLine;
5029
+ return this.appleStyle.textDecorationLine;
4750
5030
  }
4751
5031
  if (__WINDOWS__ && this.style_view) {
4752
5032
  return textDecorationLineToCss(getUint8(this.style_view, StyleKeys.DECORATION_LINE));
@@ -4755,7 +5035,7 @@ export class Style {
4755
5035
  }
4756
5036
  set textDecorationLine(value) {
4757
5037
  value = cssInitialIfReset(this.coerceCssStringValue(value), 'none');
4758
- this.setPseudoCssStringValue('text-decoration-line', value, () => nodeHelper().setTextDecorationLine(this.nativeView, value), () => (this.nativeView.style.textDecorationLine = value));
5038
+ this.setPseudoCssStringValue('text-decoration-line', value, () => nodeHelper().setTextDecorationLine(this.nativeView, value), () => (this.appleStyle.textDecorationLine = value));
4759
5039
  }
4760
5040
  get textDecorationStyle() {
4761
5041
  if (!this.nativeView) {
@@ -4765,7 +5045,7 @@ export class Style {
4765
5045
  return nodeHelper().getTextDecorationStyle(this.nativeView);
4766
5046
  }
4767
5047
  if (__APPLE__) {
4768
- return this.nativeView.style.textDecorationStyle;
5048
+ return this.appleStyle.textDecorationStyle;
4769
5049
  }
4770
5050
  if (__WINDOWS__ && this.style_view) {
4771
5051
  return textDecorationStyleToCss(getUint8(this.style_view, StyleKeys.DECORATION_STYLE));
@@ -4774,7 +5054,7 @@ export class Style {
4774
5054
  }
4775
5055
  set textDecorationStyle(value) {
4776
5056
  value = cssInitialIfReset(this.coerceCssStringValue(value), 'solid');
4777
- this.setPseudoCssStringValue('text-decoration-style', value, () => nodeHelper().setTextDecorationStyle(this.nativeView, value), () => (this.nativeView.style.textDecorationStyle = value));
5057
+ this.setPseudoCssStringValue('text-decoration-style', value, () => nodeHelper().setTextDecorationStyle(this.nativeView, value), () => (this.appleStyle.textDecorationStyle = value));
4778
5058
  }
4779
5059
  get textDecorationColor() {
4780
5060
  if (!this.nativeView) {
@@ -4784,7 +5064,7 @@ export class Style {
4784
5064
  return nodeHelper().getTextDecorationColor(this.nativeView);
4785
5065
  }
4786
5066
  if (__APPLE__) {
4787
- return this.nativeView.style.textDecorationColor;
5067
+ return this.appleStyle.textDecorationColor;
4788
5068
  }
4789
5069
  if (__WINDOWS__ && this.style_view) {
4790
5070
  const argb = getUint32(this.style_view, StyleKeys.DECORATION_COLOR);
@@ -4794,7 +5074,7 @@ export class Style {
4794
5074
  }
4795
5075
  set textDecorationColor(value) {
4796
5076
  value = cssInitialIfReset(this.coerceCssStringValue(value), 'currentcolor');
4797
- this.setPseudoCssStringValue('text-decoration-color', value, () => nodeHelper().setTextDecorationColor(this.nativeView, value), () => (this.nativeView.style.textDecorationColor = value));
5077
+ this.setPseudoCssStringValue('text-decoration-color', value, () => nodeHelper().setTextDecorationColor(this.nativeView, value), () => (this.appleStyle.textDecorationColor = value));
4798
5078
  }
4799
5079
  get border() {
4800
5080
  if (!this.nativeView) {
@@ -4804,13 +5084,13 @@ export class Style {
4804
5084
  return nodeHelper().getBorder(this.nativeView);
4805
5085
  }
4806
5086
  if (__APPLE__) {
4807
- return this.nativeView.style.border;
5087
+ return this.appleStyle.border;
4808
5088
  }
4809
- return '';
5089
+ return __WINDOWS__ ? (this._windowsCss.get('border') ?? '') : '';
4810
5090
  }
4811
5091
  set border(value) {
4812
5092
  value = this.coerceCssStringValue(value);
4813
- this.setPseudoCssStringValue('border', value, () => nodeHelper().setBorder(this.nativeView, value), () => (this.nativeView.style.border = value));
5093
+ this.setPseudoCssStringValue('border', value, () => nodeHelper().setBorder(this.nativeView, value), () => (this.appleStyle.border = value));
4814
5094
  }
4815
5095
  get paddingCss() {
4816
5096
  if (!this.nativeView)
@@ -4819,15 +5099,15 @@ export class Style {
4819
5099
  return nodeHelper().getPaddingCssValue(this.nativeView);
4820
5100
  }
4821
5101
  if (__APPLE__) {
4822
- return this.nativeView.style.paddingCss;
5102
+ return this.appleStyle.paddingCss;
4823
5103
  }
4824
- return '';
5104
+ return __WINDOWS__ ? (this._windowsCss.get('padding') ?? '') : '';
4825
5105
  }
4826
5106
  set paddingCss(value) {
4827
5107
  // a bare number is dip, matching other numeric setters; Android's
4828
5108
  // native parser treats "px" as unscaled device pixels, "dip" as scaled
4829
5109
  const strValue = typeof value === 'number' ? `${value}dip` : value;
4830
- this.setPseudoCssStringValue('padding', strValue, () => nodeHelper().setPaddingCss(this.nativeView, strValue), () => (this.nativeView.style.paddingCss = strValue));
5110
+ this.setPseudoCssStringValue('padding', strValue, () => nodeHelper().setPaddingCss(this.nativeView, strValue), () => (this.appleStyle.paddingCss = strValue));
4831
5111
  }
4832
5112
  get marginCss() {
4833
5113
  if (!this.nativeView)
@@ -4836,14 +5116,14 @@ export class Style {
4836
5116
  return nodeHelper().getMarginCssValue(this.nativeView);
4837
5117
  }
4838
5118
  if (__APPLE__) {
4839
- return this.nativeView.style.marginCss;
5119
+ return this.appleStyle.marginCss;
4840
5120
  }
4841
- return '';
5121
+ return __WINDOWS__ ? (this._windowsCss.get('margin') ?? '') : '';
4842
5122
  }
4843
5123
  set marginCss(value) {
4844
5124
  // See the comment on `paddingCss` above — same dip-vs-px mislabeling fix.
4845
5125
  const strValue = typeof value === 'number' ? `${value}dip` : value;
4846
- this.setPseudoCssStringValue('margin', strValue, () => nodeHelper().setMarginCss(this.nativeView, strValue), () => (this.nativeView.style.marginCss = strValue));
5126
+ this.setPseudoCssStringValue('margin', strValue, () => nodeHelper().setMarginCss(this.nativeView, strValue), () => (this.appleStyle.marginCss = strValue));
4847
5127
  }
4848
5128
  get insetCss() {
4849
5129
  if (!this.nativeView)
@@ -4852,42 +5132,42 @@ export class Style {
4852
5132
  return nodeHelper().getInsetCssValue(this.nativeView);
4853
5133
  }
4854
5134
  if (__APPLE__) {
4855
- return this.nativeView.style.insetCss;
5135
+ return this.appleStyle.insetCss;
4856
5136
  }
4857
- return '';
5137
+ return __WINDOWS__ ? (this._windowsCss.get('inset') ?? '') : '';
4858
5138
  }
4859
5139
  set insetCss(value) {
4860
5140
  // See the comment on `paddingCss` above — same dip-vs-px mislabeling fix.
4861
5141
  const strValue = typeof value === 'number' ? `${value}dip` : value;
4862
- this.setPseudoCssStringValue('inset', strValue, () => nodeHelper().setInsetCss(this.nativeView, strValue), () => (this.nativeView.style.insetCss = strValue));
5142
+ this.setPseudoCssStringValue('inset', strValue, () => nodeHelper().setInsetCss(this.nativeView, strValue), () => (this.appleStyle.insetCss = strValue));
4863
5143
  }
4864
5144
  get borderLeft() {
4865
5145
  return '';
4866
5146
  }
4867
5147
  set borderLeft(value) {
4868
5148
  value = this.coerceCssStringValue(value);
4869
- this.setPseudoCssStringValue('border-left', value, () => nodeHelper().setBorderLeft(this.nativeView, value), () => (this.nativeView.style.borderLeft = value));
5149
+ this.setPseudoCssStringValue('border-left', value, () => nodeHelper().setBorderLeft(this.nativeView, value), () => (this.appleStyle.borderLeft = value));
4870
5150
  }
4871
5151
  get borderTop() {
4872
5152
  return '';
4873
5153
  }
4874
5154
  set borderTop(value) {
4875
5155
  value = this.coerceCssStringValue(value);
4876
- this.setPseudoCssStringValue('border-top', value, () => nodeHelper().setBorderTop(this.nativeView, value), () => (this.nativeView.style.borderTop = value));
5156
+ this.setPseudoCssStringValue('border-top', value, () => nodeHelper().setBorderTop(this.nativeView, value), () => (this.appleStyle.borderTop = value));
4877
5157
  }
4878
5158
  get borderRight() {
4879
5159
  return '';
4880
5160
  }
4881
5161
  set borderRight(value) {
4882
5162
  value = this.coerceCssStringValue(value);
4883
- this.setPseudoCssStringValue('border-right', value, () => nodeHelper().setBorderRight(this.nativeView, value), () => (this.nativeView.style.borderRight = value));
5163
+ this.setPseudoCssStringValue('border-right', value, () => nodeHelper().setBorderRight(this.nativeView, value), () => (this.appleStyle.borderRight = value));
4884
5164
  }
4885
5165
  get borderBottom() {
4886
5166
  return '';
4887
5167
  }
4888
5168
  set borderBottom(value) {
4889
5169
  value = this.coerceCssStringValue(value);
4890
- this.setPseudoCssStringValue('border-bottom', value, () => nodeHelper().setBorderBottom(this.nativeView, value), () => (this.nativeView.style.borderBottom = value));
5170
+ this.setPseudoCssStringValue('border-bottom', value, () => nodeHelper().setBorderBottom(this.nativeView, value), () => (this.appleStyle.borderBottom = value));
4891
5171
  }
4892
5172
  get filter() {
4893
5173
  if (!this.nativeView) {
@@ -4897,13 +5177,13 @@ export class Style {
4897
5177
  return nodeHelper().getFilter(this.nativeView);
4898
5178
  }
4899
5179
  if (__APPLE__) {
4900
- return this.nativeView.style.filter;
5180
+ return this.appleStyle.filter;
4901
5181
  }
4902
- return '';
5182
+ return __WINDOWS__ ? (this._windowsCss.get('filter') ?? '') : '';
4903
5183
  }
4904
5184
  set filter(value) {
4905
5185
  value = this.coerceCssStringValue(value);
4906
- this.setPseudoCssStringValue('filter', value, () => nodeHelper().setFilter(this.nativeView, value), () => (this.nativeView.style.filter = value));
5186
+ this.setPseudoCssStringValue('filter', value, () => nodeHelper().setFilter(this.nativeView, value), () => (this.appleStyle.filter = value));
4907
5187
  }
4908
5188
  get boxShadow() {
4909
5189
  if (!this.nativeView) {
@@ -4913,9 +5193,9 @@ export class Style {
4913
5193
  return nodeHelper().getBoxShadow(this.nativeView);
4914
5194
  }
4915
5195
  if (__APPLE__) {
4916
- return this.nativeView.style.boxShadow;
5196
+ return this.appleStyle.boxShadow;
4917
5197
  }
4918
- return '';
5198
+ return __WINDOWS__ ? (this._windowsCss.get('box-shadow') ?? '') : '';
4919
5199
  }
4920
5200
  set 'box-shadow'(value) {
4921
5201
  this.boxShadow = value;
@@ -4925,7 +5205,7 @@ export class Style {
4925
5205
  }
4926
5206
  set boxShadow(value) {
4927
5207
  value = this.coerceCssStringValue(value);
4928
- this.setPseudoCssStringValue('box-shadow', value, () => nodeHelper().setBoxShadow(this.nativeView, value), () => (this.nativeView.style.boxShadow = value));
5208
+ this.setPseudoCssStringValue('box-shadow', value, () => nodeHelper().setBoxShadow(this.nativeView, value), () => (this.appleStyle.boxShadow = value));
4929
5209
  }
4930
5210
  get transform() {
4931
5211
  if (!this.nativeView) {
@@ -4935,13 +5215,13 @@ export class Style {
4935
5215
  return nodeHelper().getTransform(this.nativeView);
4936
5216
  }
4937
5217
  if (__APPLE__) {
4938
- return this.nativeView.style.transform;
5218
+ return this.appleStyle.transform;
4939
5219
  }
4940
- return '';
5220
+ return __WINDOWS__ ? (this._windowsCss.get('transform') ?? '') : '';
4941
5221
  }
4942
5222
  set transform(value) {
4943
5223
  value = this.coerceCssStringValue(value);
4944
- this.setPseudoCssStringValue('transform', value, () => nodeHelper().setTransform(this.nativeView, value), () => (this.nativeView.style.transform = value));
5224
+ this.setPseudoCssStringValue('transform', value, () => nodeHelper().setTransform(this.nativeView, value), () => (this.appleStyle.transform = value));
4945
5225
  }
4946
5226
  get verticalAlign() {
4947
5227
  const isPercent = getUint8(this.style_view, StyleKeys.VERTICAL_ALIGN_IS_PERCENT_OFFSET) == 1;
@@ -5099,13 +5379,13 @@ export class Style {
5099
5379
  return nodeHelper().getTextShadow(this.nativeView);
5100
5380
  }
5101
5381
  if (__APPLE__) {
5102
- return this.nativeView.style.textShadow;
5382
+ return this.appleStyle.textShadow;
5103
5383
  }
5104
- return '';
5384
+ return __WINDOWS__ ? (this._windowsCss.get('text-shadow') ?? '') : '';
5105
5385
  }
5106
5386
  set textShadow(value) {
5107
5387
  value = this.coerceCssStringValue(value);
5108
- this.setPseudoCssStringValue('text-shadow', value, () => nodeHelper().setTextShadow(this.nativeView, value), () => (this.nativeView.style.textShadow = value));
5388
+ this.setPseudoCssStringValue('text-shadow', value, () => nodeHelper().setTextShadow(this.nativeView, value), () => (this.appleStyle.textShadow = value));
5109
5389
  }
5110
5390
  get zIndex() {
5111
5391
  return getInt32(this.style_view, StyleKeys.Z_INDEX);
@@ -5187,7 +5467,7 @@ export class Style {
5187
5467
  }
5188
5468
  set cornerShape(value) {
5189
5469
  value = this.coerceCssStringValue(value);
5190
- this.setPseudoCssStringValue('corner-shape', value, () => nodeHelper().setCornerShape(this.nativeView, value), () => (this.nativeView.style.cornerShape = value));
5470
+ this.setPseudoCssStringValue('corner-shape', value, () => nodeHelper().setCornerShape(this.nativeView, value), () => (this.appleStyle.cornerShape = value));
5191
5471
  }
5192
5472
  get cornerShape() {
5193
5473
  if (!this.nativeView) {
@@ -5197,9 +5477,9 @@ export class Style {
5197
5477
  return nodeHelper().getCornerShape(this.nativeView);
5198
5478
  }
5199
5479
  if (__APPLE__) {
5200
- return this.nativeView.style.cornerShape;
5480
+ return this.appleStyle.cornerShape;
5201
5481
  }
5202
- return '';
5482
+ return __WINDOWS__ ? (this._windowsCss.get('corner-shape') ?? '') : '';
5203
5483
  }
5204
5484
  get cornerShapeTopLeft() {
5205
5485
  if (!this.nativeView)
@@ -5208,13 +5488,13 @@ export class Style {
5208
5488
  return nodeHelper().getCornerShapeTopLeft(this.nativeView);
5209
5489
  }
5210
5490
  if (__APPLE__) {
5211
- return this.nativeView.style.cornerShapeTopLeft;
5491
+ return this.appleStyle.cornerShapeTopLeft;
5212
5492
  }
5213
- return '';
5493
+ return __WINDOWS__ ? (this._windowsCss.get('corner-shape-top-left') ?? '') : '';
5214
5494
  }
5215
5495
  set cornerShapeTopLeft(value) {
5216
5496
  value = this.coerceCssStringValue(value);
5217
- this.setPseudoCssStringValue('corner-shape-top-left', value, () => nodeHelper().setCornerShapeTopLeft(this.nativeView, value), () => (this.nativeView.style.cornerShapeTopLeft = value));
5497
+ this.setPseudoCssStringValue('corner-shape-top-left', value, () => nodeHelper().setCornerShapeTopLeft(this.nativeView, value), () => (this.appleStyle.cornerShapeTopLeft = value));
5218
5498
  }
5219
5499
  get cornerShapeTopRight() {
5220
5500
  if (!this.nativeView)
@@ -5223,13 +5503,13 @@ export class Style {
5223
5503
  return nodeHelper().getCornerShapeTopRight(this.nativeView);
5224
5504
  }
5225
5505
  if (__APPLE__) {
5226
- return this.nativeView.style.cornerShapeTopRight;
5506
+ return this.appleStyle.cornerShapeTopRight;
5227
5507
  }
5228
- return '';
5508
+ return __WINDOWS__ ? (this._windowsCss.get('corner-shape-top-right') ?? '') : '';
5229
5509
  }
5230
5510
  set cornerShapeTopRight(value) {
5231
5511
  value = this.coerceCssStringValue(value);
5232
- this.setPseudoCssStringValue('corner-shape-top-right', value, () => nodeHelper().setCornerShapeTopRight(this.nativeView, value), () => (this.nativeView.style.cornerShapeTopRight = value));
5512
+ this.setPseudoCssStringValue('corner-shape-top-right', value, () => nodeHelper().setCornerShapeTopRight(this.nativeView, value), () => (this.appleStyle.cornerShapeTopRight = value));
5233
5513
  }
5234
5514
  get cornerShapeBottomRight() {
5235
5515
  if (!this.nativeView)
@@ -5238,13 +5518,13 @@ export class Style {
5238
5518
  return nodeHelper().getCornerShapeBottomRight(this.nativeView);
5239
5519
  }
5240
5520
  if (__APPLE__) {
5241
- return this.nativeView.style.cornerShapeBottomRight;
5521
+ return this.appleStyle.cornerShapeBottomRight;
5242
5522
  }
5243
- return '';
5523
+ return __WINDOWS__ ? (this._windowsCss.get('corner-shape-bottom-right') ?? '') : '';
5244
5524
  }
5245
5525
  set cornerShapeBottomRight(value) {
5246
5526
  value = this.coerceCssStringValue(value);
5247
- this.setPseudoCssStringValue('corner-shape-bottom-right', value, () => nodeHelper().setCornerShapeBottomRight(this.nativeView, value), () => (this.nativeView.style.cornerShapeBottomRight = value));
5527
+ this.setPseudoCssStringValue('corner-shape-bottom-right', value, () => nodeHelper().setCornerShapeBottomRight(this.nativeView, value), () => (this.appleStyle.cornerShapeBottomRight = value));
5248
5528
  }
5249
5529
  get cornerShapeBottomLeft() {
5250
5530
  if (!this.nativeView)
@@ -5253,13 +5533,13 @@ export class Style {
5253
5533
  return nodeHelper().getCornerShapeBottomLeft(this.nativeView);
5254
5534
  }
5255
5535
  if (__APPLE__) {
5256
- return this.nativeView.style.cornerShapeBottomLeft;
5536
+ return this.appleStyle.cornerShapeBottomLeft;
5257
5537
  }
5258
- return '';
5538
+ return __WINDOWS__ ? (this._windowsCss.get('corner-shape-bottom-left') ?? '') : '';
5259
5539
  }
5260
5540
  set cornerShapeBottomLeft(value) {
5261
5541
  value = this.coerceCssStringValue(value);
5262
- this.setPseudoCssStringValue('corner-shape-bottom-left', value, () => nodeHelper().setCornerShapeBottomLeft(this.nativeView, value), () => (this.nativeView.style.cornerShapeBottomLeft = value));
5542
+ this.setPseudoCssStringValue('corner-shape-bottom-left', value, () => nodeHelper().setCornerShapeBottomLeft(this.nativeView, value), () => (this.appleStyle.cornerShapeBottomLeft = value));
5263
5543
  }
5264
5544
  get objectPosition() {
5265
5545
  if (!this.style_view)
@@ -5401,13 +5681,13 @@ export class Style {
5401
5681
  return nodeHelper().getBorderImage(this.nativeView);
5402
5682
  }
5403
5683
  if (__APPLE__) {
5404
- return this.nativeView.style.borderImage;
5684
+ return this.appleStyle.borderImage;
5405
5685
  }
5406
- return '';
5686
+ return __WINDOWS__ ? (this._windowsCss.get('border-image') ?? '') : '';
5407
5687
  }
5408
5688
  set borderImage(value) {
5409
5689
  value = this.coerceCssStringValue(value);
5410
- this.setPseudoCssStringValue('border-image', value, () => nodeHelper().setBorderImage(this.nativeView, value), () => (this.nativeView.style.borderImage = value));
5690
+ this.setPseudoCssStringValue('border-image', value, () => nodeHelper().setBorderImage(this.nativeView, value), () => (this.appleStyle.borderImage = value));
5411
5691
  }
5412
5692
  set 'border-image'(value) {
5413
5693
  this.borderImage = value;
@@ -5448,13 +5728,13 @@ export class Style {
5448
5728
  return nodeHelper().getFontFeatureSettings(this.nativeView);
5449
5729
  }
5450
5730
  if (__APPLE__) {
5451
- return this.nativeView.style.fontFeatureSettings;
5731
+ return this.appleStyle.fontFeatureSettings;
5452
5732
  }
5453
- return 'normal';
5733
+ return __WINDOWS__ ? this._windowsCss.get('font-feature-settings') || 'normal' : 'normal';
5454
5734
  }
5455
5735
  set fontFeatureSettings(value) {
5456
5736
  value = this.coerceCssStringValue(value);
5457
- this.setPseudoCssStringValue('font-feature-settings', value, () => nodeHelper().setFontFeatureSettings(this.nativeView, value), () => (this.nativeView.style.fontFeatureSettings = value));
5737
+ this.setPseudoCssStringValue('font-feature-settings', value, () => nodeHelper().setFontFeatureSettings(this.nativeView, value), () => (this.appleStyle.fontFeatureSettings = value));
5458
5738
  }
5459
5739
  set 'font-feature-settings'(value) {
5460
5740
  this.fontFeatureSettings = value;
@@ -5554,13 +5834,13 @@ export class Style {
5554
5834
  return nodeHelper().getBackdropFilter(this.nativeView);
5555
5835
  }
5556
5836
  if (__APPLE__) {
5557
- return this.nativeView.style.backdropFilter;
5837
+ return this.appleStyle.backdropFilter;
5558
5838
  }
5559
- return '';
5839
+ return __WINDOWS__ ? (this._windowsCss.get('backdrop-filter') ?? '') : '';
5560
5840
  }
5561
5841
  set backdropFilter(value) {
5562
5842
  value = this.coerceCssStringValue(value);
5563
- this.setPseudoCssStringValue('backdrop-filter', value, () => nodeHelper().setBackdropFilter(this.nativeView, value), () => (this.nativeView.style.backdropFilter = value));
5843
+ this.setPseudoCssStringValue('backdrop-filter', value, () => nodeHelper().setBackdropFilter(this.nativeView, value), () => (this.appleStyle.backdropFilter = value));
5564
5844
  }
5565
5845
  set 'backdrop-filter'(value) {
5566
5846
  this.backdropFilter = value;