@triniwiz/nativescript-masonkit 1.0.0-beta.115 → 1.0.0-beta.117

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 (67) hide show
  1. package/common.d.ts +4 -1
  2. package/common.js +25 -2
  3. package/common.js.map +1 -1
  4. package/input/common.d.ts +9 -0
  5. package/input/common.js +33 -5
  6. package/input/common.js.map +1 -1
  7. package/package.json +1 -1
  8. package/platforms/android/masonkit-release.aar +0 -0
  9. package/platforms/ios/Mason.xcframework/Info.plist +11 -11
  10. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +4 -0
  11. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  12. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  13. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +13794 -4323
  14. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +4 -0
  15. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  16. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +4 -0
  17. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  18. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +9154 -9145
  19. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +8 -0
  20. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  21. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  22. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  23. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +13794 -4323
  24. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +4 -0
  25. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  26. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +4 -0
  27. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +13794 -4323
  28. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +4 -0
  29. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  30. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +4 -0
  31. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +26 -26
  32. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +2 -2
  33. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +9148 -9139
  34. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +8723 -8715
  35. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason-Swift.h +4 -0
  36. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
  37. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
  38. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +13794 -4323
  39. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.private.swiftinterface +4 -0
  40. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftdoc +0 -0
  41. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftinterface +4 -0
  42. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  43. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8644 -8635
  44. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason-Swift.h +4 -0
  45. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
  46. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
  47. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +13794 -4323
  48. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.private.swiftinterface +4 -0
  49. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftdoc +0 -0
  50. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftinterface +4 -0
  51. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +14 -14
  52. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  53. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8643 -8634
  54. package/platforms/windows/arm64/NativeScript.Mason.dll +0 -0
  55. package/platforms/windows/arm64/NativeScript.Mason.winmd +0 -0
  56. package/platforms/windows/x64/NativeScript.Mason.dll +0 -0
  57. package/platforms/windows/x64/NativeScript.Mason.winmd +0 -0
  58. package/properties.d.ts +7 -0
  59. package/properties.js +41 -1
  60. package/properties.js.map +1 -1
  61. package/symbols.d.ts +1 -0
  62. package/symbols.js +1 -0
  63. package/symbols.js.map +1 -1
  64. package/textarea/index.windows.d.ts +3 -1
  65. package/textarea/index.windows.js +27 -2
  66. package/textarea/index.windows.js.map +1 -1
  67. package/typings/windows.d.ts +2 -0
package/common.d.ts CHANGED
@@ -5,7 +5,7 @@ import { fontInternalProperty, backgroundInternalProperty, borderTopLeftRadiusPr
5
5
  import { originXProperty, originYProperty } from '@nativescript/core/ui/core/view';
6
6
  import { Style } from './style';
7
7
  import { alignContentProperty, aspectRatioProperty, backgroundProperty, borderProperty, borderLeftProperty, borderTopProperty, borderRightProperty, borderBottomProperty, borderRadiusProperty, bottomProperty, boxSizingProperty, clearProperty, columnGapProperty, cornerShapeProperty, displayProperty, filterProperty, flexBasisProperty, floatProperty, gridAreaProperty, gridAutoColumnsProperty, gridAutoFlowProperty, gridAutoRowsProperty, gridColumnEndProperty, gridColumnProperty, gridColumnStartProperty, gridRowEndProperty, gridRowProperty, gridRowStartProperty, gridTemplateAreasProperty, gridTemplateColumnsProperty, gridTemplateRowsProperty, justifyItemsProperty, justifySelfProperty, leftProperty, marginProperty, maxHeightProperty, maxWidthProperty, overflowXProperty, overflowYProperty, paddingProperty, positionProperty, rightProperty, rowGapProperty, scrollBarWidthProperty, textOverFlowProperty, textProperty, textWrapProperty, topProperty, verticalAlignProperty, boxShadowProperty, transformProperty, borderColorProperty, borderStyleProperty, backgroundImageProperty, listStyleTypeProperty, listStylePositionProperty } from './properties';
8
- import { isMasonView_, isTextChild_, isText_, native_, pseudoStyles_, eventType_ } from './symbols';
8
+ import { isMasonView_, isTextChild_, isText_, native_, pseudoStyles_, eventType_, touchAction_ } from './symbols';
9
9
  import { TextNode } from './text-node';
10
10
  export interface MasonChild extends ViewBase {
11
11
  }
@@ -241,6 +241,9 @@ export declare class ViewBase extends CustomLayoutView implements AddChildFromBu
241
241
  }>;
242
242
  _registerNativeEvent(arg: string, callback: any, thisArg?: any): void;
243
243
  _unregisterNativeEvent(arg: string, callback: any, thisArg?: any): void;
244
+ [touchAction_]: number | undefined;
245
+ /** Hands `touch-action` to the native node, where the scroll views read it. */
246
+ _applyTouchAction(): void;
244
247
  initNativeView(): void;
245
248
  _setNativeViewFrame(nativeView: any, frame: CGRect): void;
246
249
  /**
package/common.js CHANGED
@@ -15,7 +15,7 @@ import { Style, nodeHelper, cssLengthToDip } from './style';
15
15
  import { encodeBoxShadows, parseBoxShadows } from './box-shadow';
16
16
  import { parseCssTransform } from './css-transform';
17
17
  import { alignContentProperty, aspectRatioProperty, backgroundProperty, borderProperty, borderLeftProperty, borderTopProperty, borderRightProperty, borderBottomProperty, borderRadiusProperty, bottomProperty, boxSizingProperty, clearProperty, columnGapProperty, cornerShapeProperty, displayProperty, filterProperty, flexBasisProperty, floatProperty, gridAreaProperty, gridAutoColumnsProperty, gridAutoFlowProperty, gridAutoRowsProperty, gridColumnEndProperty, gridColumnProperty, gridColumnStartProperty, gridRowEndProperty, gridRowProperty, gridRowStartProperty, gridTemplateAreasProperty, gridTemplateColumnsProperty, gridTemplateRowsProperty, justifyItemsProperty, justifySelfProperty, leftProperty, marginProperty, maxHeightProperty, maxWidthProperty, overflowXProperty, overflowYProperty, paddingProperty, positionProperty, rightProperty, rowGapProperty, scrollBarWidthProperty, textOverFlowProperty, textProperty, textWrapProperty, topProperty, verticalAlignProperty, boxShadowProperty, transformProperty, borderColorProperty, borderStyleProperty, backgroundImageProperty, listStyleTypeProperty, listStylePositionProperty, installMasonSizeUnits, } from './properties';
18
- import { isMasonView_, isTextChild_, isText_, isPlaceholder_, text_, native_, textNode_, textNodeIndex_, textNodeProxied_, pseudoStyles_, emptyTextNode_, breakRun_, anonymousText_, windowsFontSource_, hostsRuns_, needsAnonymousText_, borderRadiusCorners_, borderSideColors_, eventType_, runMember_, runsInline_, runsSettled_, blockified_ } from './symbols';
18
+ import { isMasonView_, isTextChild_, isText_, isPlaceholder_, text_, native_, textNode_, textNodeIndex_, textNodeProxied_, pseudoStyles_, emptyTextNode_, breakRun_, anonymousText_, windowsFontSource_, hostsRuns_, needsAnonymousText_, borderRadiusCorners_, borderSideColors_, eventType_, runMember_, runsInline_, runsSettled_, blockified_, touchAction_ } from './symbols';
19
19
  import { Tree } from './tree';
20
20
  import { masonEngine, removeNativeChild } from './windows-panel-helpers';
21
21
  import { TextNode } from './text-node';
@@ -183,8 +183,13 @@ function windowsBreakRun(child) {
183
183
  * again at the new size. Like core views, it raises `layoutChanged` when the frame changes.
184
184
  */
185
185
  export function setRootNativeViewFrame(view, nativeView, frame) {
186
+ // Place the view before adjusting, as core does: the safe-area math reads its
187
+ // position on screen, and a stale one applied the insets twice.
188
+ nativeView.frame = frame;
186
189
  const adjusted = view.applySafeAreaInsets(frame) ?? frame;
187
- nativeView.frame = adjusted;
190
+ if (!CGRectEqualToRect(adjusted, frame)) {
191
+ nativeView.frame = adjusted;
192
+ }
188
193
  if (!CGRectEqualToRect(adjusted, frame)) {
189
194
  // Each measure pass lays the root out at the safe-area size again, so check the
190
195
  // computed size rather than whether the frame changed.
@@ -351,6 +356,13 @@ export class ViewBase extends CustomLayoutView {
351
356
  if (__ANDROID__) {
352
357
  this._isPaddingRelative = false;
353
358
  }
359
+ // Core's ContainerView defaults this to true: the view extends under the
360
+ // status bar and home indicator, and core layouts pad their children by
361
+ // the insets. Mason lays children out from its own style, so a root kept
362
+ // that default drew its content under the bars. As on the web, content
363
+ // stays in the safe area; set it to true for a full-bleed root (like
364
+ // `viewport-fit=cover`) and pad it yourself.
365
+ this.iosOverflowSafeArea = false;
354
366
  }
355
367
  get innerHTML() {
356
368
  if (__WINDOWS__)
@@ -585,8 +597,19 @@ export class ViewBase extends CustomLayoutView {
585
597
  }
586
598
  }
587
599
  }
600
+ /** Hands `touch-action` to the native node, where the scroll views read it. */
601
+ _applyTouchAction() {
602
+ const flags = this[touchAction_];
603
+ const native = this[native_];
604
+ if (flags === undefined || !native)
605
+ return;
606
+ const node = native.node ?? (__IOS__ ? this.ios?.node : undefined);
607
+ if (node)
608
+ node.touchAction = flags;
609
+ }
588
610
  initNativeView() {
589
611
  super.initNativeView();
612
+ this._applyTouchAction();
590
613
  if (this._pendingEventsRegistration.length > 0) {
591
614
  const pending = this._pendingEventsRegistration.splice(0);
592
615
  for (const registration of pending) {