@triniwiz/nativescript-masonkit 1.0.0-beta.120 → 1.0.0-beta.121

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 (142) hide show
  1. package/README.md +67 -27
  2. package/angular/README.md +7 -9
  3. package/button/index.windows.js +1 -1
  4. package/button/index.windows.js.map +1 -1
  5. package/common.d.ts +8 -2
  6. package/common.js +45 -30
  7. package/common.js.map +1 -1
  8. package/css-shorthands.js +14 -2
  9. package/css-shorthands.js.map +1 -1
  10. package/display-density.d.ts +9 -0
  11. package/display-density.js +21 -0
  12. package/display-density.js.map +1 -0
  13. package/foreign-layout.js +1 -1
  14. package/foreign-layout.js.map +1 -1
  15. package/gradient-stops.d.ts +17 -0
  16. package/gradient-stops.js +66 -0
  17. package/gradient-stops.js.map +1 -1
  18. package/index.d.ts +6 -3
  19. package/index.ios.d.ts +3 -0
  20. package/index.ios.js +3 -0
  21. package/index.ios.js.map +1 -1
  22. package/index.windows.d.ts +1 -1
  23. package/index.windows.js +1 -1
  24. package/index.windows.js.map +1 -1
  25. package/{html-windows.js → inner-html.windows.js} +6 -1
  26. package/inner-html.windows.js.map +1 -0
  27. package/input/index.ios.d.ts +2 -0
  28. package/input/index.ios.js +7 -0
  29. package/input/index.ios.js.map +1 -1
  30. package/input/index.windows.js +1 -1
  31. package/input/index.windows.js.map +1 -1
  32. package/li/index.windows.js +1 -1
  33. package/li/index.windows.js.map +1 -1
  34. package/list/index.windows.js +1 -1
  35. package/list/index.windows.js.map +1 -1
  36. package/mask.d.ts +54 -0
  37. package/mask.js +27 -0
  38. package/mask.js.map +1 -0
  39. package/{windows-mask.d.ts → mask.windows.d.ts} +24 -30
  40. package/{windows-mask.js → mask.windows.js} +97 -11
  41. package/mask.windows.js.map +1 -0
  42. package/nativescript.webpack.js +35 -0
  43. package/package.json +1 -1
  44. package/panel-helpers.d.ts +3 -0
  45. package/panel-helpers.js +9 -0
  46. package/panel-helpers.js.map +1 -0
  47. package/{windows-panel-helpers.js → panel-helpers.windows.js} +1 -1
  48. package/{windows-panel-helpers.js.map → panel-helpers.windows.js.map} +1 -1
  49. package/platforms/android/masonkit-release.aar +0 -0
  50. package/platforms/ios/Mason.xcframework/Info.plist +4 -4
  51. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +11 -2
  52. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +10 -0
  53. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  54. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  55. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +7069 -15103
  56. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +17 -5
  57. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  58. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +17 -5
  59. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  60. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +9735 -9456
  61. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +22 -4
  62. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +10 -0
  63. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  64. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  65. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  66. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +7069 -15103
  67. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +17 -5
  68. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  69. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +17 -5
  70. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +7069 -15103
  71. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +17 -5
  72. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  73. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +17 -5
  74. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +28 -28
  75. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +2 -2
  76. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +9729 -9450
  77. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +9286 -9010
  78. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason-Swift.h +10 -2
  79. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/mason_native.h +10 -0
  80. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
  81. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
  82. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +6726 -14794
  83. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.private.swiftinterface +16 -5
  84. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftdoc +0 -0
  85. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftinterface +16 -5
  86. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  87. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +9218 -8945
  88. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason-Swift.h +10 -2
  89. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/mason_native.h +10 -0
  90. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
  91. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
  92. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +6726 -14794
  93. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.private.swiftinterface +16 -5
  94. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftdoc +0 -0
  95. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftinterface +16 -5
  96. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +16 -16
  97. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  98. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +9217 -8944
  99. package/platforms/windows/arm64/NativeScript.Mason.dll +0 -0
  100. package/platforms/windows/arm64/NativeScript.Mason.winmd +0 -0
  101. package/platforms/windows/x64/NativeScript.Mason.dll +0 -0
  102. package/platforms/windows/x64/NativeScript.Mason.winmd +0 -0
  103. package/postcss-guard.js +64 -0
  104. package/properties.d.ts +6 -2
  105. package/properties.js +78 -13
  106. package/properties.js.map +1 -1
  107. package/scroll/index.windows.js +1 -1
  108. package/scroll/index.windows.js.map +1 -1
  109. package/style.d.ts +40 -11
  110. package/style.js +364 -52
  111. package/style.js.map +1 -1
  112. package/svg-path.windows.d.ts +8 -0
  113. package/svg-path.windows.js +204 -0
  114. package/svg-path.windows.js.map +1 -0
  115. package/text/index.windows.js +1 -1
  116. package/text/index.windows.js.map +1 -1
  117. package/textarea/index.ios.d.ts +2 -0
  118. package/textarea/index.ios.js +7 -0
  119. package/textarea/index.ios.js.map +1 -1
  120. package/tree/index.android.js +14 -3
  121. package/tree/index.android.js.map +1 -1
  122. package/tree/index.ios.js +11 -3
  123. package/tree/index.ios.js.map +1 -1
  124. package/tree/index.windows.js +20 -0
  125. package/tree/index.windows.js.map +1 -1
  126. package/typings/android.d.ts +13 -0
  127. package/typings/objc!Mason.d.ts +6 -0
  128. package/units.d.ts +7 -0
  129. package/units.js +30 -2
  130. package/units.js.map +1 -1
  131. package/utils/index.android.js +28 -27
  132. package/utils/index.android.js.map +1 -1
  133. package/utils/index.ios.d.ts +1 -1
  134. package/view/index.windows.js +1 -1
  135. package/view/index.windows.js.map +1 -1
  136. package/vue/README.md +12 -7
  137. package/web.js +4 -3
  138. package/web.js.map +1 -1
  139. package/html-windows.js.map +0 -1
  140. package/windows-mask.js.map +0 -1
  141. /package/{html-windows.d.ts → inner-html.windows.d.ts} +0 -0
  142. /package/{windows-panel-helpers.d.ts → panel-helpers.windows.d.ts} +0 -0
package/README.md CHANGED
@@ -1,48 +1,88 @@
1
1
  # @triniwiz/nativescript-masonkit
2
2
 
3
- ```javascript
3
+ [![npm](https://img.shields.io/npm/v/@triniwiz/nativescript-masonkit/beta?label=npm)](https://www.npmjs.com/package/@triniwiz/nativescript-masonkit)
4
+ [![docs](https://img.shields.io/badge/docs-github%20pages-3d5afe)](https://triniwiz.github.io/nativescript-mason/)
5
+ [![license](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/triniwiz/nativescript-mason/blob/main/LICENSE)
6
+
7
+ Web layout for NativeScript. MasonKit brings flexbox, grid, block and inline flow, positioning and HTML-shaped elements (`div`, `p`, `span`, `h1`, `ul`, `img`, `input`, ...) to iOS, Android and Windows. Every element is a real native view; layout runs in a Rust core built on [taffy](https://github.com/DioxusLabs/taffy).
8
+
9
+ **Documentation: https://triniwiz.github.io/nativescript-mason/**
10
+
11
+ ## Install
12
+
13
+ ```bash
4
14
  ns plugin add @triniwiz/nativescript-masonkit
5
15
  ```
6
16
 
7
17
  ## Usage
8
18
 
9
- ## Framework integrations
10
-
11
- The main package works with any NativeScript flavour. For Angular, Vue 3 and
12
- Svelte Native, dedicated entry points register every MasonKit element for you — including the
13
- HTML-shaped elements from `/web` — and wire up child-order bookkeeping:
19
+ Register the elements once in your app entry, then write markup and CSS the way you would for the web.
14
20
 
15
- - **Angular** — `@triniwiz/nativescript-masonkit/angular`:
16
- call `installMasonKit()` in `main.ts` before bootstrap. See
17
- [angular/README.md](angular/README.md).
18
- - **Vue 3** — `@triniwiz/nativescript-masonkit/vue`:
19
- call `installMasonKit()` in the app entry before `createApp(App).start()`.
20
- See [vue/README.md](vue/README.md).
21
- - **Svelte Native** — `@triniwiz/nativescript-masonkit/svelte`:
22
- call `installMasonKit()` in the app entry before `svelteNative(App)`.
23
- See [svelte/README.md](svelte/README.md).
21
+ | Flavour | Setup |
22
+ | --- | --- |
23
+ | Plain NativeScript (XML / TS) | [XML namespaces or imports](https://triniwiz.github.io/nativescript-mason/frameworks/core) |
24
+ | Angular | `installMasonKit()` from `@triniwiz/nativescript-masonkit/angular` ([guide](https://triniwiz.github.io/nativescript-mason/frameworks/angular)) |
25
+ | Vue 3 | `installMasonKit()` from `@triniwiz/nativescript-masonkit/vue` ([guide](https://triniwiz.github.io/nativescript-mason/frameworks/vue)) |
26
+ | Svelte Native | `installMasonKit()` from `@triniwiz/nativescript-masonkit/svelte` ([guide](https://triniwiz.github.io/nativescript-mason/frameworks/svelte)) |
27
+ | React, Solid | register `getMasonKitElements()` with your renderer ([React](https://triniwiz.github.io/nativescript-mason/frameworks/react), [Solid](https://triniwiz.github.io/nativescript-mason/frameworks/solid)) |
24
28
 
25
- All three entry points ship in this package, so no extra dependency is required.
29
+ Vue 3 example:
26
30
 
27
- ## Rust
31
+ ```ts
32
+ // app.ts
33
+ import { createApp } from 'nativescript-vue';
34
+ import { installMasonKit } from '@triniwiz/nativescript-masonkit/vue';
35
+ import App from './App.vue';
28
36
 
29
- For building the iOS and Android packages the following targets are required
30
-
31
- ### Android
37
+ installMasonKit();
38
+ createApp(App).start();
39
+ ```
32
40
 
33
- `rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android`
41
+ ```vue
42
+ <template>
43
+ <div class="card">
44
+ <h2>{{ title }}</h2>
45
+ <p>Styled with <strong>real</strong> CSS.</p>
46
+ </div>
47
+ </template>
48
+
49
+ <style>
50
+ .card {
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 8px;
54
+ padding: 1rem;
55
+ border-radius: 12px;
56
+ background-color: #3d5afe;
57
+ color: white;
58
+ }
59
+ </style>
60
+ ```
34
61
 
35
- To run the project in Android Studio you will need to install the NDK.
62
+ Plain NativeScript XML:
36
63
 
37
- To build the aar to be used by NativeScript you can run `./gradlew masonkit:assembleRelease` then copy the aar build located in `packages/nativescript-masonkit/src-native/mason-android/masonkit/build/outputs/aar` to the `packages/nativescript-masonkit/platforms/android` directory
64
+ ```xml
65
+ <Page xmlns="http://schemas.nativescript.org/tns.xsd"
66
+ xmlns:web="@triniwiz/nativescript-masonkit/web">
67
+ <web:Div class="card">
68
+ <web:H2 text="Hello Mason" />
69
+ <web:P text="Styled with real CSS." />
70
+ </web:Div>
71
+ </Page>
72
+ ```
38
73
 
39
- ### iOS
74
+ ## Highlights
40
75
 
41
- `rustup target add aarch64-apple-ios x86_64-apple-ios`
76
+ - **CSS that means what it means on the web.** `px` is a CSS pixel, and `rem`, `em`, `vw`, `vh`, `calc()`, `min()`, `max()` and `clamp()` resolve. [Units](https://triniwiz.github.io/nativescript-mason/styling/units)
77
+ - **Flexbox, grid, block, inline, float, `position: fixed` and `sticky`.** [Styling](https://triniwiz.github.io/nativescript-mason/styling/)
78
+ - **Rich visuals:** gradients, box shadows, border images, corner shapes, filters, backdrop filters, masks, clip paths and transforms. [Effects](https://triniwiz.github.io/nativescript-mason/styling/effects)
79
+ - **Scrollable block containers** with a web-shaped scroll API (`scrollTop`, `scrollTo`, `scrollIntoView`). [Scrolling](https://triniwiz.github.io/nativescript-mason/guide/scrolling)
80
+ - **Mixes with existing NativeScript views** in both directions. [Mixing views](https://triniwiz.github.io/nativescript-mason/guide/mixing-views)
81
+ - **CSS diagnostics** that report what was dropped and why. [Diagnostics](https://triniwiz.github.io/nativescript-mason/guide/diagnostics)
42
82
 
43
- To build the rust source to be used by xcode you can run `yarn nx run nativescript-masonkit:build.native.ios.release`.
83
+ ## Contributing
44
84
 
45
- To build the xcframework to be used by NativeScript you can run `yarn nx run nativescript-masonkit:build.native.ios.framework.release`
85
+ Building the native libraries from source, running the tests and the repo layout are covered in the [contributing guide](https://triniwiz.github.io/nativescript-mason/contributing/).
46
86
 
47
87
  ## License
48
88
 
package/angular/README.md CHANGED
@@ -62,23 +62,24 @@ export class StoryComponent {}
62
62
  }
63
63
  ```
64
64
 
65
- > **Lengths:** use unitless values. In NativeScript `px` means _physical device
66
- > pixels_, so `padding: 12px` lands at ~4 on a 3x screen. Unitless is the dip
67
- > value, which is what matches a CSS pixel in a browser.
65
+ > **Lengths:** on MasonKit elements `px` is a CSS pixel, as in a browser, and a
66
+ > unitless value is the same size. Plain NativeScript views keep core's meaning,
67
+ > where `px` is a device pixel.
68
68
 
69
69
  ### Available elements
70
70
 
71
71
  | From | Elements |
72
72
  | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
73
73
  | `@triniwiz/nativescript-masonkit` | `View`, `Text`, `Scroll`, `Img`, `Button`, `Input`, `TextArea`, `Br`, `Ul`, `Ol`, `Li` |
74
- | `@triniwiz/nativescript-masonkit/web` | `div`, `section`, `header`, `footer`, `article`, `main`, `nav`, `aside`, `span`, `code`, `h1`-`h6`, `p`, `ul`, `li`, `blockquote`, `b`, `strong`, `a` |
74
+ | `@triniwiz/nativescript-masonkit/web` | Every HTML-shaped element: `div`, `section`, `p`, `span`, `h1`-`h6`, `ul`, `ol`, `li`, `a`, `details`, `summary`, `label` and [more](https://triniwiz.github.io/nativescript-mason/elements/html) |
75
75
 
76
76
  Each name works in its original, lowercase and kebab-case spelling, so `<View>`,
77
77
  `<view>` and `<text-area>` all resolve.
78
78
 
79
79
  Note that these **replace** some core elements in Angular templates: `<Button>`,
80
- `<img>` and `<Span>` resolve to MasonKit's versions rather than core's `Button`,
81
- `Image` and `Span`. Turn off either set if you would rather keep the classic
80
+ `<button>` and `<img>` resolve to MasonKit's versions rather than core's `Button`
81
+ and `Image`, and so do lowercase `<span>` and `<label>`. The exact spellings
82
+ `<Span>` and `<Label>` stay core's, which `<FormattedString>` needs. Turn off either set if you would rather keep the classic
82
83
  widgets:
83
84
 
84
85
  ```ts
@@ -185,9 +186,6 @@ rather than inserted in position, and removals leave stale entries behind.
185
186
  That component is a page root whose host box collapsed. Add its selector to
186
187
  `passthrough`. Check the console - auto-detection logs the name.
187
188
 
188
- **Everything looks cramped, but the text size is right.**
189
- Lengths are in `px`. In NativeScript that means physical pixels. Drop the unit.
190
-
191
189
  **A component's `class` or `backgroundColor` does nothing.**
192
190
  Component host mode is off, or that element is in `passthrough`.
193
191
 
@@ -3,7 +3,7 @@ import { ButtonBase, textContentProperty } from '../common';
3
3
  import { Style } from '../style';
4
4
  import { Tree } from '../tree';
5
5
  import { style_, isText_, isMasonView_, native_, runMember_ } from '../symbols';
6
- import { removeNativeChild } from '../windows-panel-helpers';
6
+ import { removeNativeChild } from '../panel-helpers';
7
7
  let Button = class Button extends ButtonBase {
8
8
  constructor() {
9
9
  super();
@@ -1 +1 @@
1
- {"version":3,"file":"index.windows.js","sourceRoot":"","sources":["../../../../packages/nativescript-masonkit/button/index.windows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CA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,CAAC,KAAK;QACnC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;QAC9B,IAAI,UAAU,EAAE,CAAC;YACf,UAAU,CAAC,OAAO,GAAG,KAAK,IAAI,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;CACF,CAAA;AA1GY,MAAM;IADlB,OAAO,CAAC,QAAQ,CAAC;;GACL,MAAM,CA0GlB"}
1
+ {"version":3,"file":"index.windows.js","sourceRoot":"","sources":["../../../../packages/nativescript-masonkit/button/index.windows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAG9C,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAGpC;QACE,KAAK,EAAE,CAAC;QAFV,aAAQ,GAAG,KAAK,CAAC;QAGf,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IAC5B,CAAC;IAED,IAAI,KAAK;QACP,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,gBAAgB,EAAW,CAAC;QAC5D,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAqC,CAAC;IAC3D,CAAC;IAED,aAAa;IACb,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;IAED,I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CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC7D,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACzC,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;QAC9B,CAAC;aAAM,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,KAAK,KAAK,EAAE,CAAC;YACzC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,KAAK,CAAC,mBAAmB,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;YACrE,KAAK,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;YAC9B,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACvC,CAAC;QACD,KAAK,CAAC,+BAA+B,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IAED,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,KAAK;QACnC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;QAC9B,IAAI,UAAU,EAAE,CAAC;YACf,UAAU,CAAC,OAAO,GAAG,KAAK,IAAI,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;CACF,CAAA;AA1GY,MAAM;IADlB,OAAO,CAAC,QAAQ,CAAC;;GACL,MAAM,CA0GlB"}
package/common.d.ts CHANGED
@@ -431,8 +431,8 @@ export declare class ViewBase extends CustomLayoutView implements AddChildFromBu
431
431
  set boxSizing(value: BoxSizing);
432
432
  get display(): Display;
433
433
  set display(value: Display);
434
- get overflow(): Overflow | "auto auto" | "auto hidden" | "auto scroll" | "auto clip" | "auto visible" | "hidden auto" | "hidden hidden" | "hidden scroll" | "hidden clip" | "hidden visible" | "scroll auto" | "scroll hidden" | "scroll scroll" | "scroll clip" | "scroll visible" | "clip auto" | "clip hidden" | "clip scroll" | "clip clip" | "clip visible" | "visible auto" | "visible hidden" | "visible scroll" | "visible clip" | "visible visible";
435
- set overflow(value: Overflow | "auto auto" | "auto hidden" | "auto scroll" | "auto clip" | "auto visible" | "hidden auto" | "hidden hidden" | "hidden scroll" | "hidden clip" | "hidden visible" | "scroll auto" | "scroll hidden" | "scroll scroll" | "scroll clip" | "scroll visible" | "clip auto" | "clip hidden" | "clip scroll" | "clip clip" | "clip visible" | "visible auto" | "visible hidden" | "visible scroll" | "visible clip" | "visible visible");
434
+ get overflow(): Overflow | "auto auto" | "auto visible" | "auto hidden" | "auto scroll" | "auto clip" | "visible auto" | "visible visible" | "visible hidden" | "visible scroll" | "visible clip" | "hidden auto" | "hidden visible" | "hidden hidden" | "hidden scroll" | "hidden clip" | "scroll auto" | "scroll visible" | "scroll hidden" | "scroll scroll" | "scroll clip" | "clip auto" | "clip visible" | "clip hidden" | "clip scroll" | "clip clip";
435
+ set overflow(value: Overflow | "auto auto" | "auto visible" | "auto hidden" | "auto scroll" | "auto clip" | "visible auto" | "visible visible" | "visible hidden" | "visible scroll" | "visible clip" | "hidden auto" | "hidden visible" | "hidden hidden" | "hidden scroll" | "hidden clip" | "scroll auto" | "scroll visible" | "scroll hidden" | "scroll scroll" | "scroll clip" | "clip auto" | "clip visible" | "clip hidden" | "clip scroll" | "clip clip");
436
436
  get overflowX(): Overflow;
437
437
  set overflowX(value: Overflow);
438
438
  get overflowY(): Overflow;
@@ -500,6 +500,12 @@ export declare class ViewBase extends CustomLayoutView implements AddChildFromBu
500
500
  set textOverFlow(value: CoreTypes.TextOverflowType);
501
501
  get textOverFlow(): CoreTypes.TextOverflowType;
502
502
  updateNativeTransform(): any;
503
+ _windowsTransformOrigin(native: any): {
504
+ x: number;
505
+ y: number;
506
+ };
507
+ _windowsTransformValue: unknown;
508
+ _applyWindowsTransform(value?: unknown): void;
503
509
  animate(options: any): any;
504
510
  }
505
511
  export declare function windowsFontSource(font: any): string;
package/common.js CHANGED
@@ -15,10 +15,11 @@ import { adoptForeignLayout, releaseForeignLayout } from './foreign-layout';
15
15
  import { Style, nodeHelper, cssLengthToDip, resolveCssMathIn } from './style';
16
16
  import { encodeBoxShadows, parseBoxShadows } from './box-shadow';
17
17
  import { parseCssTransform } from './css-transform';
18
- import { alignContentProperty, aspectRatioProperty, backgroundProperty, 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, borderTopStyleProperty, borderRightStyleProperty, borderBottomStyleProperty, borderLeftStyleProperty, backgroundImageProperty, listStyleTypeProperty, listStylePositionProperty, installMasonSizeUnits, } from './properties';
18
+ import { alignContentProperty, aspectRatioProperty, backgroundProperty, 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, borderTopStyleProperty, borderRightStyleProperty, borderBottomStyleProperty, borderLeftStyleProperty, backgroundImageProperty, listStyleTypeProperty, listStylePositionProperty, installMasonSizeUnits, masonRawDeclaration, } from './properties';
19
+ import { masonLayout } from './display-density';
19
20
  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';
20
21
  import { Tree } from './tree';
21
- import { masonEngine, removeNativeChild } from './windows-panel-helpers';
22
+ import { masonEngine, removeNativeChild } from './panel-helpers';
22
23
  import { TextNode } from './text-node';
23
24
  import { compile } from './pseudo';
24
25
  import { frameworkRegistry } from './framework-registry';
@@ -78,7 +79,7 @@ function nativeScrollOffset(view, vertical) {
78
79
  return 0;
79
80
  if (__ANDROID__) {
80
81
  const scroll = org.nativescript.mason.masonkit.WebScroll;
81
- return Utils.layout.toDeviceIndependentPixels(vertical ? scroll.scrollTop(native) : scroll.scrollLeft(native));
82
+ return masonLayout.toDeviceIndependentPixels(vertical ? scroll.scrollTop(native) : scroll.scrollLeft(native));
82
83
  }
83
84
  if (__APPLE__) {
84
85
  return (vertical ? native.mason_scrollTop : native.mason_scrollLeft) ?? 0;
@@ -94,7 +95,7 @@ function nativeScrollMetric(view, metric) {
94
95
  return 0;
95
96
  let value = 0;
96
97
  if (__ANDROID__) {
97
- value = Utils.layout.toDeviceIndependentPixels(org.nativescript.mason.masonkit.WebScroll[metric](native));
98
+ value = masonLayout.toDeviceIndependentPixels(org.nativescript.mason.masonkit.WebScroll[metric](native));
98
99
  }
99
100
  else if (__APPLE__) {
100
101
  value = native[`mason_${metric}`];
@@ -118,7 +119,7 @@ function nativeScrollTo(view, left, top, smooth) {
118
119
  return;
119
120
  }
120
121
  if (__ANDROID__) {
121
- org.nativescript.mason.masonkit.WebScroll.scrollTo(native, isNaN(left) ? NaN : Utils.layout.toDevicePixels(left), isNaN(top) ? NaN : Utils.layout.toDevicePixels(top), smooth);
122
+ org.nativescript.mason.masonkit.WebScroll.scrollTo(native, isNaN(left) ? NaN : masonLayout.toDevicePixels(left), isNaN(top) ? NaN : masonLayout.toDevicePixels(top), smooth);
122
123
  }
123
124
  else if (__APPLE__) {
124
125
  native.mason_scrollTo(left, top, smooth);
@@ -258,8 +259,8 @@ export function setRootNativeViewFrame(view, nativeView, frame) {
258
259
  if (!CGRectEqualToRect(adjusted, frame)) {
259
260
  // Each measure pass lays the root out at the safe-area size again, so check the
260
261
  // computed size rather than whether the frame changed.
261
- const width = Utils.layout.toDevicePixels(adjusted.size.width);
262
- const height = Utils.layout.toDevicePixels(adjusted.size.height);
262
+ const width = masonLayout.toDevicePixels(adjusted.size.width);
263
+ const height = masonLayout.toDevicePixels(adjusted.size.height);
263
264
  const layout = view.ios.node.computedLayout;
264
265
  if (Math.round(layout.width) !== Math.round(width) || Math.round(layout.height) !== Math.round(height)) {
265
266
  view.ios.mason_computeWithSize(width, height);
@@ -494,7 +495,7 @@ export class ViewBase extends CustomLayoutView {
494
495
  let nativeHit = null;
495
496
  if (__ANDROID__ && typeof nativeView.elementFromPoint === 'function') {
496
497
  // Android views hit-test in device pixels.
497
- nativeHit = nativeView.elementFromPoint(Utils.layout.toDevicePixels(x), Utils.layout.toDevicePixels(y));
498
+ nativeHit = nativeView.elementFromPoint(masonLayout.toDevicePixels(x), masonLayout.toDevicePixels(y));
498
499
  }
499
500
  else if (__APPLE__) {
500
501
  const hitTest = nativeView.mason_elementFromPointY ?? nativeView.mason_elementFromPoint ?? nativeView.elementFromPoint;
@@ -1132,13 +1133,13 @@ export class ViewBase extends CustomLayoutView {
1132
1133
  }
1133
1134
  getMeasuredWidth() {
1134
1135
  if (this._masonPlacedNatively && this.nativeViewProtected) {
1135
- return Math.round(Utils.layout.toDevicePixels(this.nativeViewProtected.frame.size.width));
1136
+ return Math.round(masonLayout.toDevicePixels(this.nativeViewProtected.frame.size.width));
1136
1137
  }
1137
1138
  return super.getMeasuredWidth();
1138
1139
  }
1139
1140
  getMeasuredHeight() {
1140
1141
  if (this._masonPlacedNatively && this.nativeViewProtected) {
1141
- return Math.round(Utils.layout.toDevicePixels(this.nativeViewProtected.frame.size.height));
1142
+ return Math.round(masonLayout.toDevicePixels(this.nativeViewProtected.frame.size.height));
1142
1143
  }
1143
1144
  return super.getMeasuredHeight();
1144
1145
  }
@@ -2526,14 +2527,14 @@ export class ViewBase extends CustomLayoutView {
2526
2527
  const style = this._styleHelper;
2527
2528
  // @ts-ignore
2528
2529
  if (style)
2529
- style.lineHeight = value;
2530
+ style.lineHeight = masonRawDeclaration(this.style, 'lineHeight', value);
2530
2531
  }
2531
2532
  [letterSpacingProperty.setNative](value) {
2532
2533
  // @ts-ignore
2533
2534
  const style = this._styleHelper;
2534
2535
  // @ts-ignore
2535
2536
  if (style)
2536
- style.letterSpacing = value;
2537
+ style.letterSpacing = masonRawDeclaration(this.style, 'letterSpacing', value);
2537
2538
  }
2538
2539
  [textAlignmentProperty.setNative](value) {
2539
2540
  // @ts-ignore
@@ -3385,7 +3386,35 @@ export class ViewBase extends CustomLayoutView {
3385
3386
  if (!native)
3386
3387
  return;
3387
3388
  const self = this;
3388
- NativeScript.Mason.Css.SetTransforms(native, typeof self.scaleX === 'number' ? self.scaleX : 1, typeof self.scaleY === 'number' ? self.scaleY : 1, self.rotate || 0, self.translateX || 0, self.translateY || 0, self.originX ?? 0.5, self.originY ?? 0.5);
3389
+ const origin = this._windowsTransformOrigin(native);
3390
+ NativeScript.Mason.Css.SetTransforms(native, typeof self.scaleX === 'number' ? self.scaleX : 1, typeof self.scaleY === 'number' ? self.scaleY : 1, self.rotate || 0, self.translateX || 0, self.translateY || 0, origin.x, origin.y);
3391
+ }
3392
+ // CSS transform-origin when set, else core's originX/originY. RenderTransformOrigin is shared
3393
+ // by every part of the element's transform.
3394
+ _windowsTransformOrigin(native) {
3395
+ const self = this;
3396
+ // @ts-ignore
3397
+ const css = this._styleHelper?.transformOriginFraction?.(native?.ActualWidth ?? 0, native?.ActualHeight ?? 0);
3398
+ return css ?? { x: self.originX ?? 0.5, y: self.originY ?? 0.5 };
3399
+ }
3400
+ _applyWindowsTransform(value = this._windowsTransformValue) {
3401
+ // @ts-ignore
3402
+ const style = this._styleHelper;
3403
+ const nv = this.nativeViewProtected ?? this._view;
3404
+ this._windowsTransformValue = value;
3405
+ if (!style || !nv)
3406
+ return;
3407
+ try {
3408
+ const size = { width: nv.ActualWidth ?? 0, height: nv.ActualHeight ?? 0 };
3409
+ const m = parseCssTransform(typeof value === 'string' ? value : '', (token) => cssLengthToDip(token, style.emBasisFor(token)), size);
3410
+ const origin = this._windowsTransformOrigin(nv);
3411
+ if (!m)
3412
+ NativeScript.Mason.Css.ClearTransform(nv);
3413
+ else
3414
+ NativeScript.Mason.Css.ApplyTransform(nv, m[0], m[1], m[2], m[3], m[4], m[5]);
3415
+ NativeScript.Mason.Css.SetTransformOrigin(nv, origin.x, origin.y);
3416
+ }
3417
+ catch (_) { }
3389
3418
  }
3390
3419
  animate(options) {
3391
3420
  if (!__WINDOWS__ || !options || !('rotate' in options || 'scale' in options || 'translate' in options)) {
@@ -3422,23 +3451,9 @@ export class ViewBase extends CustomLayoutView {
3422
3451
  if (style) {
3423
3452
  // @ts-ignore
3424
3453
  style.transform = value;
3425
- if (__WINDOWS__) {
3426
- // transform isn't a Mason buffer prop — apply it to the FrameworkElement via Composition,
3427
- // like @nativescript/core does on its own panels (the plugin's View is a custom Panel core
3428
- // doesn't drive transforms on). Parse the CSS string to a matrix and set RenderTransform.
3429
- const nv = this.nativeViewProtected ?? this._view;
3430
- try {
3431
- const size = { width: nv?.ActualWidth ?? 0, height: nv?.ActualHeight ?? 0 };
3432
- const m = parseCssTransform(typeof value === 'string' ? value : '', (token) => cssLengthToDip(token, style.emBasisFor(token)), size);
3433
- if (!m)
3434
- NativeScript.Mason.Css.ClearTransform(nv);
3435
- else {
3436
- NativeScript.Mason.Css.ApplyTransform(nv, m[0], m[1], m[2], m[3], m[4], m[5]);
3437
- NativeScript.Mason.Css.SetTransformOrigin(nv, this.originX ?? 0.5, this.originY ?? 0.5);
3438
- }
3439
- }
3440
- catch (_) { }
3441
- }
3454
+ // Windows: transform isn't read from the buffer; it becomes the panel's RenderTransform.
3455
+ if (__WINDOWS__)
3456
+ this._applyWindowsTransform(value);
3442
3457
  }
3443
3458
  }
3444
3459
  }