@octane-xplat/nativescript-mason-core 0.0.1 → 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +113 -2
  3. package/artifact-inventory.json +746 -0
  4. package/box-shadow.d.ts +10 -0
  5. package/box-shadow.js +48 -0
  6. package/common.d.ts +482 -0
  7. package/common.js +2645 -0
  8. package/css-colors.d.ts +17 -0
  9. package/css-colors.js +54 -0
  10. package/css-filter.d.ts +17 -0
  11. package/css-filter.js +140 -0
  12. package/css-keyframes.d.ts +41 -0
  13. package/css-keyframes.js +437 -0
  14. package/css-math.d.ts +34 -0
  15. package/css-math.js +300 -0
  16. package/css-shorthands.d.ts +65 -0
  17. package/css-shorthands.js +673 -0
  18. package/css-transform.d.ts +6 -0
  19. package/css-transform.js +100 -0
  20. package/diagnostics.d.ts +51 -0
  21. package/diagnostics.js +52 -0
  22. package/display-density.d.ts +9 -0
  23. package/display-density.js +20 -0
  24. package/fonts.d.ts +20 -0
  25. package/fonts.js +88 -0
  26. package/foreign-layout.d.ts +6 -0
  27. package/foreign-layout.js +149 -0
  28. package/gradient-stops.d.ts +25 -0
  29. package/gradient-stops.js +112 -0
  30. package/index.android.d.ts +9 -0
  31. package/index.android.js +8 -0
  32. package/index.d.ts +10 -0
  33. package/index.ios.d.ts +9 -0
  34. package/index.ios.js +8 -0
  35. package/ios-host-README.md +124 -0
  36. package/layout-types.d.ts +192 -0
  37. package/mask.d.ts +54 -0
  38. package/mask.js +26 -0
  39. package/native-types-README.md +51 -0
  40. package/package.json +44 -6
  41. package/panel-helpers.d.ts +3 -0
  42. package/panel-helpers.js +8 -0
  43. package/platforms/android/MasonCore.aar +0 -0
  44. package/platforms/android/include.gradle +6 -0
  45. package/platforms/android/manifest.json +73 -0
  46. package/platforms/ios/FontManager.LICENSE +201 -0
  47. package/platforms/ios/MasonCore.xcframework/Info.plist +43 -0
  48. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Headers/Mason.h +25 -0
  49. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Headers/MasonCore-Swift.h +1739 -0
  50. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Headers/mason_native.h +601 -0
  51. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Info.plist +0 -0
  52. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/MasonCore +0 -0
  53. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Modules/MasonCore.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  54. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios.abi.json +100095 -0
  55. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios.private.swiftinterface +3174 -0
  56. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  57. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios.swiftinterface +3174 -0
  58. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/Modules/module.modulemap +9 -0
  59. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/SDWebImage_SDWebImage.bundle/Info.plist +0 -0
  60. package/platforms/ios/MasonCore.xcframework/ios-arm64/MasonCore.framework/SDWebImage_SDWebImage.bundle/PrivacyInfo.xcprivacy +23 -0
  61. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Headers/Mason.h +25 -0
  62. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Headers/MasonCore-Swift.h +1739 -0
  63. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Headers/mason_native.h +601 -0
  64. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Info.plist +0 -0
  65. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/MasonCore +0 -0
  66. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Modules/MasonCore.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  67. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios-simulator.abi.json +100095 -0
  68. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +3174 -0
  69. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  70. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Modules/MasonCore.swiftmodule/arm64-apple-ios-simulator.swiftinterface +3174 -0
  71. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/Modules/module.modulemap +9 -0
  72. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/SDWebImage_SDWebImage.bundle/Info.plist +0 -0
  73. package/platforms/ios/MasonCore.xcframework/ios-arm64-simulator/MasonCore.framework/SDWebImage_SDWebImage.bundle/PrivacyInfo.xcprivacy +23 -0
  74. package/platforms/ios/Package.resolved +24 -0
  75. package/platforms/ios/SDWebImage.LICENSE +20 -0
  76. package/platforms/ios/build.xcconfig +4 -0
  77. package/platforms/ios/device-manifest.json +213 -0
  78. package/platforms/ios/include/FontManager/NSCFontDescriptors.h +36 -0
  79. package/platforms/ios/include/FontManager/NSCFontFace.h +98 -0
  80. package/platforms/ios/include/FontManager/NSCFontFaceSet.h +73 -0
  81. package/platforms/ios/include/FontManager/NSCFontManagerUmbrella.h +7 -0
  82. package/platforms/ios/include/FontManager/NSCFontParser.h +22 -0
  83. package/platforms/ios/include/FontManager/NSCFontRegex.h +4 -0
  84. package/platforms/ios/include/FontManager/NSCFontResolver.h +43 -0
  85. package/platforms/ios/include/FontManager/NSCFontStyle.h +27 -0
  86. package/platforms/ios/include/FontManager/NSCFontTypes.h +41 -0
  87. package/platforms/ios/include/SDWebImage/NSButton+WebCache.h +340 -0
  88. package/platforms/ios/include/SDWebImage/NSData+ImageContentType.h +63 -0
  89. package/platforms/ios/include/SDWebImage/NSImage+Compatibility.h +67 -0
  90. package/platforms/ios/include/SDWebImage/SDAnimatedImage.h +136 -0
  91. package/platforms/ios/include/SDWebImage/SDAnimatedImagePlayer.h +113 -0
  92. package/platforms/ios/include/SDWebImage/SDAnimatedImageRep.h +33 -0
  93. package/platforms/ios/include/SDWebImage/SDAnimatedImageView+WebCache.h +168 -0
  94. package/platforms/ios/include/SDWebImage/SDAnimatedImageView.h +125 -0
  95. package/platforms/ios/include/SDWebImage/SDCallbackQueue.h +59 -0
  96. package/platforms/ios/include/SDWebImage/SDDiskCache.h +146 -0
  97. package/platforms/ios/include/SDWebImage/SDGraphicsImageRenderer.h +84 -0
  98. package/platforms/ios/include/SDWebImage/SDImageAPNGCoder.h +19 -0
  99. package/platforms/ios/include/SDWebImage/SDImageAWebPCoder.h +23 -0
  100. package/platforms/ios/include/SDWebImage/SDImageCache.h +482 -0
  101. package/platforms/ios/include/SDWebImage/SDImageCacheConfig.h +153 -0
  102. package/platforms/ios/include/SDWebImage/SDImageCacheDefine.h +179 -0
  103. package/platforms/ios/include/SDWebImage/SDImageCachesManager.h +81 -0
  104. package/platforms/ios/include/SDWebImage/SDImageCoder.h +347 -0
  105. package/platforms/ios/include/SDWebImage/SDImageCoderHelper.h +251 -0
  106. package/platforms/ios/include/SDWebImage/SDImageCodersManager.h +58 -0
  107. package/platforms/ios/include/SDWebImage/SDImageFrame.h +44 -0
  108. package/platforms/ios/include/SDWebImage/SDImageGIFCoder.h +22 -0
  109. package/platforms/ios/include/SDWebImage/SDImageGraphics.h +28 -0
  110. package/platforms/ios/include/SDWebImage/SDImageHEICCoder.h +25 -0
  111. package/platforms/ios/include/SDWebImage/SDImageIOAnimatedCoder.h +65 -0
  112. package/platforms/ios/include/SDWebImage/SDImageIOCoder.h +30 -0
  113. package/platforms/ios/include/SDWebImage/SDImageLoader.h +146 -0
  114. package/platforms/ios/include/SDWebImage/SDImageLoadersManager.h +40 -0
  115. package/platforms/ios/include/SDWebImage/SDImageTransformer.h +283 -0
  116. package/platforms/ios/include/SDWebImage/SDMemoryCache.h +78 -0
  117. package/platforms/ios/include/SDWebImage/SDWebImage.h +91 -0
  118. package/platforms/ios/include/SDWebImage/SDWebImageCacheKeyFilter.h +35 -0
  119. package/platforms/ios/include/SDWebImage/SDWebImageCacheSerializer.h +39 -0
  120. package/platforms/ios/include/SDWebImage/SDWebImageCompat.h +102 -0
  121. package/platforms/ios/include/SDWebImage/SDWebImageDefine.h +420 -0
  122. package/platforms/ios/include/SDWebImage/SDWebImageDownloader.h +320 -0
  123. package/platforms/ios/include/SDWebImage/SDWebImageDownloaderConfig.h +113 -0
  124. package/platforms/ios/include/SDWebImage/SDWebImageDownloaderDecryptor.h +52 -0
  125. package/platforms/ios/include/SDWebImage/SDWebImageDownloaderOperation.h +191 -0
  126. package/platforms/ios/include/SDWebImage/SDWebImageDownloaderRequestModifier.h +72 -0
  127. package/platforms/ios/include/SDWebImage/SDWebImageDownloaderResponseModifier.h +72 -0
  128. package/platforms/ios/include/SDWebImage/SDWebImageError.h +33 -0
  129. package/platforms/ios/include/SDWebImage/SDWebImageIndicator.h +119 -0
  130. package/platforms/ios/include/SDWebImage/SDWebImageManager.h +290 -0
  131. package/platforms/ios/include/SDWebImage/SDWebImageOperation.h +27 -0
  132. package/platforms/ios/include/SDWebImage/SDWebImageOptionsProcessor.h +78 -0
  133. package/platforms/ios/include/SDWebImage/SDWebImagePrefetcher.h +168 -0
  134. package/platforms/ios/include/SDWebImage/SDWebImageTransition.h +131 -0
  135. package/platforms/ios/include/SDWebImage/UIButton+WebCache.h +402 -0
  136. package/platforms/ios/include/SDWebImage/UIImage+ExtendedCacheData.h +24 -0
  137. package/platforms/ios/include/SDWebImage/UIImage+ForceDecode.h +52 -0
  138. package/platforms/ios/include/SDWebImage/UIImage+GIF.h +26 -0
  139. package/platforms/ios/include/SDWebImage/UIImage+MemoryCacheCost.h +27 -0
  140. package/platforms/ios/include/SDWebImage/UIImage+Metadata.h +104 -0
  141. package/platforms/ios/include/SDWebImage/UIImage+MultiFormat.h +81 -0
  142. package/platforms/ios/include/SDWebImage/UIImage+Transform.h +164 -0
  143. package/platforms/ios/include/SDWebImage/UIImageView+HighlightedWebCache.h +142 -0
  144. package/platforms/ios/include/SDWebImage/UIImageView+WebCache.h +209 -0
  145. package/platforms/ios/include/SDWebImage/UIView+WebCache.h +131 -0
  146. package/platforms/ios/include/SDWebImage/UIView+WebCacheOperation.h +52 -0
  147. package/platforms/ios/include/SDWebImage/UIView+WebCacheState.h +63 -0
  148. package/platforms/ios/include/module.modulemap +2 -0
  149. package/platforms/ios/manifest.json +132 -0
  150. package/platforms/ios/simulator-manifest.json +213 -0
  151. package/plugin-README.md +197 -0
  152. package/properties.d.ts +154 -0
  153. package/properties.js +2454 -0
  154. package/pseudo.d.ts +9 -0
  155. package/pseudo.js +57 -0
  156. package/scroll/index.android.d.ts +15 -0
  157. package/scroll/index.android.js +72 -0
  158. package/scroll/index.d.ts +5 -0
  159. package/scroll/index.ios.d.ts +18 -0
  160. package/scroll/index.ios.js +106 -0
  161. package/style.d.ts +768 -0
  162. package/style.js +7151 -0
  163. package/symbols.d.ts +25 -0
  164. package/symbols.js +41 -0
  165. package/tree/index.android.d.ts +11 -0
  166. package/tree/index.android.js +42 -0
  167. package/tree/index.d.ts +15 -0
  168. package/tree/index.ios.d.ts +26 -0
  169. package/tree/index.ios.js +53 -0
  170. package/typings/android-declarations.d.ts +4 -0
  171. package/typings/android.d.ts +9730 -0
  172. package/typings/manifest.json +45 -0
  173. package/typings/native.d.ts +5 -0
  174. package/typings/objc!FontManager.d.ts +389 -0
  175. package/typings/objc!MasonCore.d.ts +2472 -0
  176. package/typings/objc!SDWebImage.d.ts +3378 -0
  177. package/units.d.ts +29 -0
  178. package/units.js +44 -0
  179. package/utils/index.android.d.ts +211 -0
  180. package/utils/index.android.js +595 -0
  181. package/utils/index.ios.d.ts +222 -0
  182. package/utils/index.ios.js +790 -0
  183. package/view/index.android.d.ts +13 -0
  184. package/view/index.android.js +74 -0
  185. package/view/index.d.ts +2 -0
  186. package/view/index.ios.d.ts +24 -0
  187. package/view/index.ios.js +157 -0
package/index.ios.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export { View } from './view';
2
+ export { Scroll } from './scroll';
3
+ export { ViewBase, Event } from './common';
4
+ export type { ScrollBehavior, ScrollLogicalPosition, ScrollToOptions, ScrollIntoViewOptions } from './common';
5
+ export { Style } from './style';
6
+ export { setCssDiagnostics, getCssDiagnostics, clearCssDiagnostics, formatCssDiagnostics, cssDiagnosticsEnabled } from './diagnostics';
7
+ export { setCssUnitContext, cssUnits } from './units';
8
+ export { registerAppFontsDirectory } from './fonts';
9
+ export type * from './layout-types';
package/index.ios.js ADDED
@@ -0,0 +1,8 @@
1
+ /// <reference path="./typings/native.d.ts" />
2
+ export { View } from './view';
3
+ export { Scroll } from './scroll';
4
+ export { ViewBase, Event } from './common';
5
+ export { Style } from './style';
6
+ export { setCssDiagnostics, getCssDiagnostics, clearCssDiagnostics, formatCssDiagnostics, cssDiagnosticsEnabled } from './diagnostics';
7
+ export { setCssUnitContext, cssUnits } from './units';
8
+ export { registerAppFontsDirectory } from './fonts';
@@ -0,0 +1,124 @@
1
+ # Core iOS host prototype
2
+
3
+ The core-only simulator framework builds and runs without MasonKit's HTML
4
+ parser, rich-text renderer, or widget classes. It is a native boundary proof;
5
+ NativeScript metadata and npm plugin packaging are separate proofs; see
6
+ `tools/mason-core/plugin-README.md` in the source checkout.
7
+
8
+ ## Build and inspect the artifact
9
+
10
+ On macOS with Xcode and the repository's Rust iOS prerequisites installed:
11
+
12
+ ```sh
13
+ pnpm exec nx run nativescript-mason-core:verify.host.ios.artifact
14
+ ```
15
+
16
+ The target builds the independent Rust engine, generates the core Swift project
17
+ under `tmp/mason-core-ios-host`, and exports
18
+ `dist/native/mason-core/ios-host/release`. Verification copies the artifact to an
19
+ isolated temporary directory, links Swift and Objective-C consumers, verifies
20
+ all 99 declared C functions are exported, and checks native symbols and headers
21
+ for excluded classes.
22
+
23
+ Build and verify the unsigned arm64 device framework separately:
24
+
25
+ ```sh
26
+ pnpm exec nx run nativescript-mason-core:verify.host.ios.device.artifact
27
+ ```
28
+
29
+ This uses `iphoneos`, the device engine archive and separate staging/derived
30
+ folders, exporting `dist/native/mason-core/ios-host/device/release`. The device
31
+ framework and isolated Swift/Objective-C clients compile and link; its Mach-O
32
+ platform and all 99 C exports are verified. This is build evidence only. It does
33
+ not qualify device runtime behavior.
34
+ Both builds require a native-build resource reservation. Assemble the verified
35
+ slices after both builds:
36
+
37
+ ```sh
38
+ pnpm exec nx run nativescript-mason-core:build.host.ios.xcframework
39
+ ```
40
+
41
+ Assembly requires matching source hashes, dependency locks and public headers.
42
+ It exports `dist/native/mason-core/ios-host/universal`, embedding each platform's
43
+ SDWebImage privacy bundle in its own framework slice. The plugin packages this
44
+ XCFramework; resource paths no longer depend on a simulator-only global bundle.
45
+
46
+ The exported framework retains FontManager for styling/font metrics and
47
+ SDWebImage for container backgrounds and nine-slice images. Their code is
48
+ linked into the framework. Their dependency headers and licenses accompany it;
49
+ FontManager's Clang module is required even for a Swift client that imports
50
+ only `MasonCore`. Removing image/text widgets does not remove these remaining
51
+ callers. The export also carries SwiftPM's SDWebImage resource/privacy bundle.
52
+ The separate isolated NativeScript app verifies resource discovery, core class
53
+ metadata, layout and ownership on an arm64 simulator. Independent public native
54
+ declarations are generated independently; device app coverage remains a gate.
55
+
56
+ ## Run native layout tests
57
+
58
+ Build the test bundle first:
59
+
60
+ ```sh
61
+ pnpm exec nx run nativescript-mason-core:build.tests.ios
62
+ ```
63
+
64
+ Prepare a dedicated simulator and record its identifier. This example uses the
65
+ iOS 27 runtime and iPhone 17 Pro device type used for the current proof; inspect
66
+ `xcrun simctl list` for identifiers installed on another machine.
67
+
68
+ ```sh
69
+ test -f tmp/mason-core-ios-test-device.txt || \
70
+ xcrun simctl create 'Mason core extraction' \
71
+ com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro \
72
+ com.apple.CoreSimulator.SimRuntime.iOS-27-0 > tmp/mason-core-ios-test-device.txt
73
+ pnpm exec nx run nativescript-mason-core:test.host.ios
74
+ ```
75
+
76
+ The runner boots only that dedicated device and shuts it down afterward. It
77
+ runs the 11 existing `CoreLayoutInteropTests` unchanged apart from their module
78
+ import, plus four core regressions. It checks the result bundle contains all
79
+ 15 passing tests, with no skips. Results stay under `tmp/mason-core-ios-tests`.
80
+ The tests exercise UIKit directly; they do not capture screenshots.
81
+
82
+ Covered behavior: grid placement, foreign label intrinsic-size invalidation,
83
+ percentage sizing and reset, programmatic scroll clamping, nested roots during
84
+ an outer compute, bounded root measurement, and view/node/listener release.
85
+ Host-driven fixtures give roots explicit bounds and mark their applied compute
86
+ before programmatic seeking, matching the host lifecycle.
87
+
88
+ ## Preserve source and the full package
89
+
90
+ The generated project compiles 39 existing Swift files. Of these, 25 retain
91
+ identical source bytes; 14 have explicit core-only adaptations. The manifest
92
+ records each original and projected hash. The 25 unchanged files now live in
93
+ core after byte-preserving `git mv` moves. The full Xcode project changes only
94
+ those source references; its implementation and remaining files retain their
95
+ bytes. No full-to-core runtime dependency is added.
96
+
97
+ `ios-sources.mjs` uses compiler-derived declaration spans from `swift-source.mjs`
98
+ to remove optional factories, HTML conveniences, text-run reconciliation, and
99
+ widget-specific branches. `ios-node-children.swift` supplies the foreign-view
100
+ and container child operations. Shared measurement methods remain unchanged.
101
+ This projection is temporary prototype wiring, not the final upstream seam.
102
+ The native path mapping and baseline hashes live in `native-relocations.json`.
103
+ Generated projects reconstruct the original source layout; both builds resolve
104
+ one tracked copy through `native-sources.mjs`. Keep future fixes separate from
105
+ source moves and avoid parallel edited copies.
106
+
107
+ Container painting and scrolling remain in core. Background text clipping has
108
+ a small native glyph-provider protocol, allowing a renderer to supply outlines
109
+ without embedding MasonKit's text renderer. Ordinary UIKit/NativeScript labels
110
+ do not acquire glyph-provider support from this extraction. The shared Rust
111
+ engine and C interface still contain inline-layout code and convenience node
112
+ constructors; this proof does not claim those costs have been removed.
113
+
114
+ ## Remaining qualification
115
+
116
+ The native host exports separate arm64 simulator and device frameworks.
117
+ The plugin packages both slices. Its compiled simulator app qualifies bridge
118
+ metadata, framework-local resources and OS input; the unsigned device app build
119
+ checks device metadata and resource selection separately. Physical iOS device
120
+ execution remains unqualified. Simulator bridge types,
121
+ plugin discovery, compiled components and OS input pass separately; see the
122
+ [plugin proof](plugin-README.md). Matching release app size measurements remain. Core and full MasonKit are separate-host choices;
123
+ coinstallation and native ABI compatibility are not qualified. Windows is not
124
+ qualified by this prototype.
@@ -0,0 +1,192 @@
1
+ import type { Color, CoreTypes } from '@nativescript/core';
2
+ import type { LengthPercentage } from '@nativescript/core/css/parser';
3
+
4
+
5
+ /**
6
+ * A CSS length. `px` is a CSS pixel — the same size as a dip, exactly as on the
7
+ * web — and a bare number is also dip. `dppx` is the escape hatch for a literal
8
+ * device pixel; note this differs from `@nativescript/core`, where `px` itself
9
+ * means a device pixel.
10
+ */
11
+ export type Length = CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit | CoreTypes.LengthPercentUnit | `${number}px` | `${number}%` | `${number}dip` | `${number}dppx`;
12
+
13
+
14
+ export type LengthAuto = CoreTypes.dip | CoreTypes.LengthDipUnit | CoreTypes.LengthPxUnit | CoreTypes.LengthPercentUnit | 'auto' | `${number}px` | `${number}%` | `${number}dip` | `${number}dppx`;
15
+
16
+
17
+ export type DimensionKeyword = 'min-content' | 'max-content' | 'fit-content' | 'stretch' | 'content' | `fit-content(${string})`;
18
+
19
+
20
+ export type DimensionLength = LengthAuto | DimensionKeyword;
21
+
22
+
23
+ export type SizeLength = { width: Length; height: Length };
24
+
25
+
26
+ export type Position = 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
27
+
28
+
29
+ export type Display = 'none' | 'flex' | 'grid' | 'block' | 'inline' | 'inline-block' | 'inline-flex' | 'inline-grid';
30
+
31
+
32
+ export type BoxSizing = 'border-box' | 'content-box';
33
+
34
+
35
+ export type Overflow = 'visible' | 'hidden' | 'scroll' | 'clip' | 'auto';
36
+
37
+
38
+ export type FlexWrap = 'nowrap' | 'no-wrap' | 'wrap' | 'wrap-reverse' | 'balance' | 'balance-reverse';
39
+
40
+
41
+ export type FlexDirection = 'column' | 'row' | 'column-reverse' | 'row-reverse';
42
+
43
+
44
+ export type GapTypeUnit = `px` | 'dip' | '%';
45
+
46
+
47
+ export type Gap = Length | `${string}${GapTypeUnit} ${string}${GapTypeUnit}`;
48
+
49
+
50
+ export type AlignItems = 'normal' | 'flex-start' | 'flex-end' | 'start' | 'end' | 'center' | 'baseline' | 'stretch';
51
+
52
+
53
+ export type AlignSelf = 'normal' | 'flex-start' | 'flex-end' | 'start' | 'end' | 'center' | 'baseline' | 'stretch';
54
+
55
+
56
+ export type AlignContent = 'normal' | 'flex-start' | 'flex-end' | 'start' | 'end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'space-evenly';
57
+
58
+
59
+ export type JustifyItems = AlignItems;
60
+
61
+
62
+ export type JustifySelf = AlignSelf;
63
+
64
+
65
+ export type JustifyContent = AlignContent;
66
+
67
+
68
+ export type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense' | 'dense';
69
+
70
+
71
+ export type VerticalAlign = 'baseline' | 'sub' | 'super' | 'text-top' | 'text-bottom' | 'middle' | 'top' | 'bottom' | Length | number;
72
+
73
+
74
+ export type Float = 'left' | 'right' | 'none';
75
+
76
+
77
+ export type Clear = 'left' | 'right' | 'both' | 'none';
78
+
79
+
80
+ declare module '@nativescript/core/ui/styling/style' {
81
+ interface Style {
82
+ boxSizing: BoxSizing;
83
+ display: Display;
84
+ position: Position;
85
+ flexDirection: FlexDirection;
86
+ flexWrap: FlexWrap;
87
+ flex: string | 'auto' | 'none' | number | 'initial';
88
+ flexFlow: string;
89
+ minWidth: LengthAuto;
90
+ minHeight: LengthAuto;
91
+ width: DimensionLength;
92
+ height: DimensionLength;
93
+ maxWidth: LengthAuto;
94
+ maxHeight: LengthAuto;
95
+ left: LengthAuto;
96
+ right: LengthAuto;
97
+ top: LengthAuto;
98
+ bottom: LengthAuto;
99
+ gridGap: Gap;
100
+ gap: Gap;
101
+ rowGap: Length;
102
+ columnGap: Length;
103
+ aspectRatio: number;
104
+ flexBasis: LengthPercentage | DimensionKeyword | string | number;
105
+ alignItems: AlignItems;
106
+ alignSelf: AlignSelf;
107
+ alignContent: AlignContent;
108
+ justifyItems: JustifyItems;
109
+ justifySelf: JustifySelf;
110
+ justifyContent: JustifyContent;
111
+ gridAutoRows: string;
112
+ gridAutoColumns: string;
113
+ gridAutoFlow: GridAutoFlow;
114
+ gridRowGap: Gap;
115
+ gridColumnGap: Gap;
116
+ gridArea: string;
117
+ gridColumn: string;
118
+ gridColumnStart: string;
119
+ gridColumnEnd: string;
120
+ gridRow: string;
121
+ gridRowStart: string;
122
+ gridRowEnd: string;
123
+ gridTemplateRows: string;
124
+ gridTemplateColumns: string;
125
+ gridTemplateAreas: string;
126
+ textOverflow: 'clip' | 'ellipsis' | string;
127
+ textWrap: 'nowrap' | 'wrap' | 'balance';
128
+ textTransform: 'none' | 'capitalize' | 'uppercase' | 'lowercase';
129
+ overflow: Overflow | `${Overflow} ${Overflow}`;
130
+ overflowX: Overflow;
131
+ overflowY: Overflow;
132
+ scrollBarWidth: Length;
133
+ verticalAlign: VerticalAlign;
134
+ cornerShape: string;
135
+ cornerShapeTopLeft: string;
136
+ cornerShapeTopRight: string;
137
+ cornerShapeBottomRight: string;
138
+ cornerShapeBottomLeft: string;
139
+ objectPosition: string;
140
+ borderStyle: string;
141
+ borderLeftStyle: string;
142
+ borderRightStyle: string;
143
+ borderTopStyle: string;
144
+ borderBottomStyle: string;
145
+ borderImage: string;
146
+ fontStretch: string;
147
+ fontFeatureSettings: string;
148
+ wordSpacing: string;
149
+ hyphens: 'none' | 'manual' | 'auto';
150
+ textIndent: string;
151
+ lineClamp: number | 'none';
152
+ transformOrigin: string;
153
+ placeItems: string;
154
+ placeContent: string;
155
+ placeSelf: string;
156
+ listStyle: string;
157
+ marginInline: string;
158
+ marginBlock: string;
159
+ paddingInline: string;
160
+ paddingBlock: string;
161
+ insetInline: string;
162
+ insetBlock: string;
163
+ inlineSize: string;
164
+ blockSize: string;
165
+ writingMode: 'horizontal-tb' | 'vertical-rl' | 'vertical-lr';
166
+ unicodeBidi: 'normal' | 'embed' | 'bidi-override';
167
+ backdropFilter: string;
168
+ maskImage: string;
169
+ maskSize: string;
170
+ maskPosition: string;
171
+ maskRepeat: string;
172
+ maskOrigin: string;
173
+ maskClip: string;
174
+ maskMode: string;
175
+ maskComposite: string;
176
+ clipPath: string;
177
+ maskBorderSource: string;
178
+ maskBorderSlice: string;
179
+ maskBorderWidth: string;
180
+ maskBorderOutset: string;
181
+ maskBorderRepeat: string;
182
+ maskBorderMode: string;
183
+ caretColor: string | Color;
184
+ }
185
+ }
186
+
187
+
188
+ export type ScrollBehavior = 'auto' | 'instant' | 'smooth';
189
+
190
+ export type ScrollLogicalPosition = 'start' | 'center' | 'end' | 'nearest';
191
+
192
+ export type BoxShadowRenderMode = 'auto' | 'render-node' | 'software';
package/mask.d.ts ADDED
@@ -0,0 +1,54 @@
1
+ /** What the encoder needs from the element's style. */
2
+ export interface WindowsMaskContext {
3
+ /** A CSS length (not a percentage) in DIPs, or undefined. */
4
+ length(token: string): number | undefined;
5
+ /** A CSS colour as 0xAARRGGBB, or null. */
6
+ color(value: string): number | null;
7
+ linear(value: string): {
8
+ angle: number;
9
+ corner?: [number, number];
10
+ offsets: number[];
11
+ colors: number[];
12
+ positions?: Array<number | null>;
13
+ lengths?: Array<number | null>;
14
+ } | null;
15
+ radial(value: string): {
16
+ cx: number;
17
+ cy: number;
18
+ rx: number;
19
+ ry: number;
20
+ offsets: number[];
21
+ colors: number[];
22
+ positions?: Array<number | null>;
23
+ lengths?: Array<number | null>;
24
+ circle?: number;
25
+ circleRadius?: number;
26
+ } | null;
27
+ /** A url() target as a path or data URI the native side can load. */
28
+ source(url: string): string;
29
+ }
30
+ /** background-origin / background-clip keywords; the CSS defaults are padding-box and border-box. */
31
+ export interface WindowsBackgroundBoxes {
32
+ origin?: string;
33
+ clip?: string;
34
+ }
35
+ /** The background-* longhands, each a comma-separated per-layer list. */
36
+ export interface WindowsBackgroundLonghands {
37
+ image: string;
38
+ size?: string;
39
+ position?: string;
40
+ repeat?: string;
41
+ origin?: string;
42
+ clip?: string;
43
+ attachment?: string;
44
+ blend?: string;
45
+ }
46
+ export declare const WINDOWS_MASK_PROPERTIES: ReadonlySet<string>;
47
+ export declare function encodeWindowsMask(_css: ReadonlyMap<string, string>, _ctx: WindowsMaskContext): string;
48
+ export declare function encodeWindowsBackground(_url: string, _size: string, _position: string, _repeat: string, _ctx: WindowsMaskContext, _boxes?: WindowsBackgroundBoxes): string;
49
+ export declare function encodeWindowsGradientBackground(_gradient: string, _size: string, _position: string, _repeat: string, _ctx: WindowsMaskContext, _boxes?: WindowsBackgroundBoxes): string;
50
+ export declare function encodeWindowsColorClip(_clip: string, _ctx: WindowsMaskContext): string;
51
+ export declare function needsWindowsBackgroundLayers(_css: WindowsBackgroundLonghands): boolean;
52
+ export declare function encodeWindowsBackgroundLayers(_css: WindowsBackgroundLonghands, _ctx: WindowsMaskContext): string;
53
+ export declare function hasCustomBackgroundBoxes(_boxes: WindowsBackgroundBoxes): boolean;
54
+ export declare function encodeWindowsBorderImage(_value: string, _ctx: WindowsMaskContext): string;
package/mask.js ADDED
@@ -0,0 +1,26 @@
1
+ // Windows only (mask.windows.ts); iOS and Android parse masks natively.
2
+ export const WINDOWS_MASK_PROPERTIES = new Set();
3
+ export function encodeWindowsMask(_css, _ctx) {
4
+ return '';
5
+ }
6
+ export function encodeWindowsBackground(_url, _size, _position, _repeat, _ctx, _boxes = {}) {
7
+ return '';
8
+ }
9
+ export function encodeWindowsGradientBackground(_gradient, _size, _position, _repeat, _ctx, _boxes = {}) {
10
+ return '';
11
+ }
12
+ export function encodeWindowsColorClip(_clip, _ctx) {
13
+ return '';
14
+ }
15
+ export function needsWindowsBackgroundLayers(_css) {
16
+ return false;
17
+ }
18
+ export function encodeWindowsBackgroundLayers(_css, _ctx) {
19
+ return '';
20
+ }
21
+ export function hasCustomBackgroundBoxes(_boxes) {
22
+ return false;
23
+ }
24
+ export function encodeWindowsBorderImage(_value, _ctx) {
25
+ return '';
26
+ }
@@ -0,0 +1,51 @@
1
+ # Independent Mason core bridge types
2
+
3
+ The runtime and plugin prototypes ship their own Android/iOS bridge declarations.
4
+ Their compiler inputs contain the standard NativeScript SDK types and core's
5
+ generated declarations, without full MasonKit native types. This is type/build
6
+ evidence; native ABI compatibility and application behavior have separate checks.
7
+
8
+ ## Regenerate after changing a native host
9
+
10
+ Keep the generated `packages/nativescript-mason-core/typings/` files in Git so
11
+ ordinary JavaScript builds do not require native build tools. To update them,
12
+ first export both core native hosts and install the independent pinned SDK
13
+ tooling. Neither consumer preparation nor a consumer app build is required. Run this
14
+ target from the repository root under a native-build resource reservation:
15
+
16
+ ```sh
17
+ pnpm exec nx run nativescript-mason-core:prepare.native.sdk
18
+ pnpm exec nx run nativescript-mason-core:generate.native.types
19
+ pnpm exec nx run nativescript-mason-core:verify.runtime
20
+ pnpm exec nx run nativescript-mason-core:verify
21
+ ```
22
+
23
+ Generation reads `MasonCore.aar` and the exported iOS Simulator framework directly.
24
+ It preserves SDK header discovery so inherited UIKit members are included, then
25
+ copies only MasonCore and its retained FontManager/SDWebImage declarations.
26
+ The manifest records native artifact hashes, generator provenance and every
27
+ declaration hash. Assembly rejects declarations for different native artifacts.
28
+ Consumers still supply NativeScript's platform ambient types and `skipLibCheck`.
29
+
30
+ ## Android generator adaptation
31
+
32
+ NativeScript Android 9.1.1's declaration generator produces invalid TypeScript
33
+ for this core AAR: Kotlin parameter names can be invalid identifiers, ignored
34
+ generic types can leave unmatched brackets, and nested class namespaces can
35
+ have unmatched braces. Adding dependency JARs does not correct these syntax
36
+ errors. These are declaration-generation findings, not Android runtime failures.
37
+
38
+ The code-generation-only patch at
39
+ `tools/mason-core/patches/android-dts-generator.patch` applies to
40
+ [NativeScript/android-dts-generator at 5fcf6113](https://github.com/NativeScript/android-dts-generator/blob/5fcf611330bd9eb60d9bb45d5b37251980b127ab/dts-generator/src/main/java/com/telerik/dts/DtsApi.java).
41
+ It makes invalid parameter names positional, balances ignored generic types,
42
+ and emits complete nested namespace blocks. Generation verifies both the SDK
43
+ JAR and original source hashes, compiles the adapted class in an ignored staging
44
+ directory, and puts it before the unchanged SDK JAR on the generator classpath.
45
+ It does not modify the installed SDK or ship generator code in the plugin.
46
+ Review or remove this adaptation when adopting an upstream generator correction.
47
+
48
+ Generated files are parsed before use. The packed consumer checks native host
49
+ factories and rejects optional HTML APIs. Runtime compilation records its actual
50
+ input files and rejects full MasonKit declarations. The build-only Windows facade
51
+ is excluded from the archive; no Windows native host is qualified.
package/package.json CHANGED
@@ -1,17 +1,55 @@
1
1
  {
2
2
  "name": "@octane-xplat/nativescript-mason-core",
3
- "version": "0.0.1",
4
- "description": "Bootstrap stub only; no supported API. Use the next tag for Mason core beta releases.",
3
+ "version": "1.0.0-beta.0",
4
+ "description": "Independent NativeScript Mason layout, scrolling and foreign-view hosting",
5
5
  "license": "Apache-2.0",
6
+ "main": "index",
7
+ "types": "./index.d.ts",
8
+ "files": [
9
+ "*.js",
10
+ "*.d.ts",
11
+ "*.md",
12
+ "artifact-inventory.json",
13
+ "LICENSE",
14
+ "typings",
15
+ "utils",
16
+ "view",
17
+ "scroll",
18
+ "tree",
19
+ "platforms"
20
+ ],
6
21
  "repository": {
7
22
  "type": "git",
8
23
  "url": "https://github.com/octane-xplat/nativescript-mason",
9
24
  "directory": "packages/nativescript-mason-core"
10
25
  },
11
- "files": [
12
- "README.md"
13
- ],
26
+ "peerDependencies": {
27
+ "@nativescript/core": "~9.1.2"
28
+ },
14
29
  "publishConfig": {
15
30
  "access": "public"
31
+ },
32
+ "masonCorePrototype": {
33
+ "nativeHosts": true,
34
+ "ios": {
35
+ "architectures": [
36
+ "arm64"
37
+ ],
38
+ "simulatorOnly": false
39
+ },
40
+ "android": {
41
+ "abis": [
42
+ "arm64-v8a"
43
+ ]
44
+ },
45
+ "nativeTypes": true,
46
+ "coinstallationWithFullMasonKit": false,
47
+ "qualification": "Qualified targets and remaining limits are recorded in README; coinstallation with full MasonKit is unsupported."
48
+ },
49
+ "nativescript": {
50
+ "platforms": {
51
+ "ios": "9.1.0",
52
+ "android": "9.1.1"
53
+ }
16
54
  }
17
- }
55
+ }
@@ -0,0 +1,3 @@
1
+ export declare function masonEngine(): NativeScript.Mason.Mason;
2
+ export declare function appendNativeChild(_panel: any, _child: any, _atIndex: number): boolean;
3
+ export declare function removeNativeChild(_panel: any, _child: any): void;
@@ -0,0 +1,8 @@
1
+ // Windows only (panel-helpers.windows.ts); shared callers stay behind __WINDOWS__.
2
+ export function masonEngine() {
3
+ throw new Error('masonEngine is only available on Windows');
4
+ }
5
+ export function appendNativeChild(_panel, _child, _atIndex) {
6
+ return false;
7
+ }
8
+ export function removeNativeChild(_panel, _child) { }
Binary file
@@ -0,0 +1,6 @@
1
+ dependencies {
2
+ implementation 'androidx.core:core-ktx:1.12.0'
3
+ implementation 'com.google.code.gson:gson:2.13.2'
4
+ implementation 'com.github.bumptech.glide:glide:4.16.0'
5
+ implementation 'org.nativescript:fontmanager:1.0.20'
6
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "platform": "Android",
3
+ "abi": "arm64-v8a",
4
+ "minSdk": 21,
5
+ "compileSdk": 36,
6
+ "aarSha256": "bae5a8d02b0fb74de02dddba3b3dce480e3257f2d4227dcad528ff1540552c56",
7
+ "sourcesSha256": "b5fefd27a93de132714d555c755acf7e7d2eab310b73cc16ada93bc705c112c9",
8
+ "jni": {
9
+ "crate": "mason-android",
10
+ "target": "aarch64-linux-android",
11
+ "abi": "arm64-v8a",
12
+ "toolchain": "stable",
13
+ "revision": "055dfa8c3ab6757bcac075bdd826159cd56d35b6",
14
+ "rustc": "rustc 1.99.1 (58cf8f9c3 2026-10-13)\nbinary: rustc\ncommit-hash: 58cf8f9c35b355199727627d07ae34a4e2846d67\ncommit-date: 2026-10-13\nhost: aarch64-apple-darwin\nrelease: 1.99.1\nLLVM version: 23.1.1",
15
+ "ndk": "Pkg.Desc = Android NDK\nPkg.Revision = 28.2.13676358\nPkg.BaseRevision = 28.2.13676358\nPkg.ReleaseName = r28c\n",
16
+ "cargoLockSha256": "1ce12eba45786fce902d730b341c14553696f163f364eea2e80dc63d547f8da5",
17
+ "librarySha256": "72a6067964d8e39b9491bdbea1435e6b8f76afd274a0a2f0d6d1c971410e27af",
18
+ "qualification": "Unchanged JNI binding and shared Rust engine; core Kotlin hosts and Android runtime qualification are separate."
19
+ },
20
+ "retainedDependencies": [
21
+ "androidx.activity:activity:1.8.0",
22
+ "androidx.annotation:annotation-experimental:1.4.0",
23
+ "androidx.annotation:annotation-jvm:1.6.0",
24
+ "androidx.appcompat:appcompat-resources:1.7.1",
25
+ "androidx.appcompat:appcompat:1.7.1",
26
+ "androidx.arch.core:core-common:2.2.0",
27
+ "androidx.arch.core:core-runtime:2.2.0",
28
+ "androidx.collection:collection:1.1.0",
29
+ "androidx.concurrent:concurrent-futures:1.1.0",
30
+ "androidx.core:core-ktx:1.13.1",
31
+ "androidx.core:core:1.13.1",
32
+ "androidx.cursoradapter:cursoradapter:1.0.0",
33
+ "androidx.customview:customview:1.0.0",
34
+ "androidx.drawerlayout:drawerlayout:1.0.0",
35
+ "androidx.emoji2:emoji2-views-helper:1.3.0",
36
+ "androidx.emoji2:emoji2:1.3.0",
37
+ "androidx.exifinterface:exifinterface:1.3.6",
38
+ "androidx.fragment:fragment:1.5.4",
39
+ "androidx.interpolator:interpolator:1.0.0",
40
+ "androidx.lifecycle:lifecycle-common:2.6.2",
41
+ "androidx.lifecycle:lifecycle-livedata-core:2.6.2",
42
+ "androidx.lifecycle:lifecycle-livedata:2.6.2",
43
+ "androidx.lifecycle:lifecycle-process:2.6.2",
44
+ "androidx.lifecycle:lifecycle-runtime:2.6.2",
45
+ "androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.2",
46
+ "androidx.lifecycle:lifecycle-viewmodel:2.6.2",
47
+ "androidx.loader:loader:1.0.0",
48
+ "androidx.profileinstaller:profileinstaller:1.3.1",
49
+ "androidx.resourceinspection:resourceinspection-annotation:1.0.1",
50
+ "androidx.savedstate:savedstate:1.2.1",
51
+ "androidx.startup:startup-runtime:1.1.1",
52
+ "androidx.tracing:tracing:1.0.0",
53
+ "androidx.vectordrawable:vectordrawable-animated:1.1.0",
54
+ "androidx.vectordrawable:vectordrawable:1.1.0",
55
+ "androidx.versionedparcelable:versionedparcelable:1.1.1",
56
+ "androidx.viewpager:viewpager:1.0.0",
57
+ "com.github.bumptech.glide:annotations:4.16.0",
58
+ "com.github.bumptech.glide:disklrucache:4.16.0",
59
+ "com.github.bumptech.glide:gifdecoder:4.16.0",
60
+ "com.github.bumptech.glide:glide:4.16.0",
61
+ "com.google.code.gson:gson:2.13.2",
62
+ "com.google.errorprone:error_prone_annotations:2.41.0",
63
+ "com.google.guava:listenablefuture:1.0",
64
+ "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0",
65
+ "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0",
66
+ "org.jetbrains.kotlin:kotlin-stdlib:2.0.21",
67
+ "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4",
68
+ "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4",
69
+ "org.jetbrains:annotations:13.0",
70
+ "org.nativescript:fontmanager:1.0.20"
71
+ ],
72
+ "qualification": "Core-only Android AAR; device execution, NativeScript bridge metadata/types and plugin packaging are still required."
73
+ }