@triniwiz/nativescript-masonkit 1.0.0-beta.87 → 1.0.0-beta.89

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 (113) hide show
  1. package/DOCS.md +16 -4
  2. package/angular/README.md +204 -0
  3. package/angular/fesm2022/triniwiz-nativescript-masonkit-angular.mjs +496 -0
  4. package/angular/fesm2022/triniwiz-nativescript-masonkit-angular.mjs.map +1 -0
  5. package/angular/package.json +19 -0
  6. package/angular/types/triniwiz-nativescript-masonkit-angular.d.ts +181 -0
  7. package/button/index.android.d.ts +2 -1
  8. package/button/index.ios.d.ts +2 -1
  9. package/button/index.windows.d.ts +2 -1
  10. package/common.d.ts +102 -1
  11. package/common.js +93 -2
  12. package/common.js.map +1 -1
  13. package/img/index.android.d.ts +2 -1
  14. package/img/index.ios.d.ts +2 -1
  15. package/img/index.windows.d.ts +2 -1
  16. package/index.d.ts +21 -10
  17. package/input/index.android.d.ts +5 -1
  18. package/input/index.android.js +12 -1
  19. package/input/index.android.js.map +1 -1
  20. package/input/index.ios.d.ts +7 -1
  21. package/input/index.ios.js +12 -1
  22. package/input/index.ios.js.map +1 -1
  23. package/input/index.windows.d.ts +6 -1
  24. package/package.json +3 -1
  25. package/platforms/android/masonkit-release.aar +0 -0
  26. package/platforms/ios/Mason.xcframework/Info.plist +0 -34
  27. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +32 -0
  28. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +27 -2
  29. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
  30. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  31. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +2837 -826
  32. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +43 -1
  33. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  34. package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +43 -1
  35. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  36. package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8477 -8378
  37. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +64 -0
  38. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +27 -2
  39. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
  40. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  41. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  42. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +2837 -826
  43. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +43 -1
  44. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  45. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +43 -1
  46. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +2837 -826
  47. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +43 -1
  48. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  49. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +43 -1
  50. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +28 -28
  51. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  52. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8472 -8373
  53. package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +8110 -8017
  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 +4 -0
  59. package/properties.js +58 -15
  60. package/properties.js.map +1 -1
  61. package/style.d.ts +38 -37
  62. package/style.js +333 -110
  63. package/style.js.map +1 -1
  64. package/text/index.android.d.ts +3 -1
  65. package/text/index.ios.d.ts +3 -1
  66. package/text/index.windows.d.ts +2 -1
  67. package/textarea/index.android.d.ts +6 -2
  68. package/textarea/index.ios.d.ts +6 -2
  69. package/textarea/index.windows.d.ts +6 -2
  70. package/tree/index.android.js +8 -4
  71. package/tree/index.android.js.map +1 -1
  72. package/tree/index.ios.js +11 -0
  73. package/tree/index.ios.js.map +1 -1
  74. package/utils/index.android.d.ts +15 -6
  75. package/utils/index.android.js +83 -2
  76. package/utils/index.android.js.map +1 -1
  77. package/utils/index.ios.d.ts +15 -6
  78. package/utils/index.ios.js +83 -2
  79. package/utils/index.ios.js.map +1 -1
  80. package/utils/index.windows.d.ts +11 -2
  81. package/utils/index.windows.js +9 -0
  82. package/utils/index.windows.js.map +1 -1
  83. package/view/index.ios.js +14 -1
  84. package/view/index.ios.js.map +1 -1
  85. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason-Swift.h +0 -1982
  86. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason.h +0 -25
  87. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/mason_native.h +0 -499
  88. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Info.plist +0 -0
  89. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
  90. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
  91. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +0 -98937
  92. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.private.swiftinterface +0 -3475
  93. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftdoc +0 -0
  94. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftinterface +0 -3475
  95. package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/module.modulemap +0 -10
  96. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Info.plist +0 -20
  97. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  98. package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +0 -2134
  99. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason-Swift.h +0 -1982
  100. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason.h +0 -25
  101. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/mason_native.h +0 -499
  102. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Info.plist +0 -0
  103. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
  104. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
  105. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +0 -98937
  106. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.private.swiftinterface +0 -3475
  107. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftdoc +0 -0
  108. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftinterface +0 -3475
  109. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/module.modulemap +0 -10
  110. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +0 -212
  111. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Info.plist +0 -20
  112. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
  113. package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +0 -2134
@@ -0,0 +1,496 @@
1
+ import { Frame, Page, ProxyViewContainer, View as View$1, ActionBar } from '@nativescript/core';
2
+ import { PageRouterOutlet, registerElement, ɵViewUtil as _ViewUtil, isKnownView, EmulatedRenderer } from '@nativescript/angular';
3
+ import { View, Text, Scroll, Img, Button, Input, TextArea, Br, Ul, Ol, Li } from '@triniwiz/nativescript-masonkit';
4
+ import * as MasonKitWeb from '@triniwiz/nativescript-masonkit/web';
5
+
6
+ /**
7
+ * Index of `child` in the parent's raw `_children` list, or -1.
8
+ *
9
+ * Deliberately *not* `parent.getChildIndex()`: that walks `_viewChildren`, which
10
+ * filters out text nodes and placeholders, so its indices drift from the ones
11
+ * `insertChild()` splices into as soon as a container mixes views and text. The
12
+ * only index `insertChild` accepts is a `_children` index, so that is what we
13
+ * compute. `getChildIndex` stays as the fallback for a container that predates
14
+ * `_children` or overrides the lookup.
15
+ */
16
+ function rawChildIndex(parent, child) {
17
+ if (child == null) {
18
+ return -1;
19
+ }
20
+ const children = parent._children;
21
+ if (Array.isArray(children)) {
22
+ return children.indexOf(child);
23
+ }
24
+ return typeof parent.getChildIndex === 'function' ? parent.getChildIndex(child) : -1;
25
+ }
26
+ /**
27
+ * `ViewClassMeta` that routes Angular's visual-tree mutations through MasonKit's
28
+ * own child bookkeeping.
29
+ *
30
+ * ## Why every MasonKit element needs this
31
+ *
32
+ * MasonKit's `ViewBase` extends `CustomLayoutView`, **not** `LayoutBase`.
33
+ * `@nativescript/angular`'s `ViewUtil` branches on `view instanceof LayoutBase`,
34
+ * so without a meta a MasonKit container falls into the generic fallbacks:
35
+ *
36
+ * - `addToVisualTree` → `parent._addChildFromBuilder(name, child)`, which is a
37
+ * plain `addChild()` append. The resolved `next` sibling is **discarded**, so
38
+ * anything Angular inserts in the middle of a container (`*ngIf` toggling on,
39
+ * `*ngFor` reordering, a router swap) lands at the end and the Taffy tree ends
40
+ * up in a different order than the template.
41
+ * - `removeFromVisualTree` → core's `parent._removeView(child)`, which bypasses
42
+ * MasonKit's `removeChild()` entirely. The native view detaches but the entry
43
+ * stays in `_children`, and since `_children` is what drives native insertion
44
+ * indices (`_nativeIndexFor`), every later insert into that container is
45
+ * misplaced - the classic "nested components lay out wrong" symptom.
46
+ *
47
+ * Routing through `insertChild`/`addChild`/`removeChild` keeps the Taffy tree,
48
+ * the `_children` bookkeeping and the native view tree in step. This is the same
49
+ * contract `frameMeta`/`formattedStringMeta` use for their containers.
50
+ *
51
+ * ## Why `insertChild` must not throw
52
+ *
53
+ * `next` is whatever `ViewUtil.findNextVisual()` resolved to, which is not
54
+ * guaranteed to be a node MasonKit ever tracked. MasonKit's own `insertBefore()`
55
+ * throws `NotFoundError` for an unknown reference; thrown from here that would
56
+ * abort the component's change detection and blank it. An unknown reference
57
+ * simply degrades to an append, exactly as `insertToLayout` does for classic
58
+ * layouts.
59
+ *
60
+ * Invisible nodes (Angular's `CommentNode`/`TextNode`) are intentionally left to
61
+ * `ViewUtil`'s default handling: it assigns `parent.text`, which MasonKit's
62
+ * `textProperty.setNative` already reconciles into real native text nodes.
63
+ */
64
+ const masonMeta = {
65
+ insertChild(parent, child, next) {
66
+ const index = rawChildIndex(parent, next);
67
+ if (index > -1) {
68
+ parent.insertChild(child, index);
69
+ }
70
+ else {
71
+ parent.addChild(child);
72
+ }
73
+ },
74
+ removeChild(parent, child) {
75
+ parent.removeChild(child);
76
+ },
77
+ };
78
+
79
+ /**
80
+ * Internal element name the host container is registered under. Every component
81
+ * host is created from this entry and then re-stamped with its original tag, so
82
+ * this name never appears in a template.
83
+ */
84
+ const COMPONENT_HOST_TAG = 'mason-component-host';
85
+ /**
86
+ * Framework router outlets, which must stay transparent.
87
+ *
88
+ * They host a classic `Frame`/`Page` that fills its parent by classic
89
+ * measurement. A `ProxyViewContainer` is a logical passthrough - its child is
90
+ * hoisted into the nearest real native ancestor and measured with an exact,
91
+ * fill-parent size. A MasonKit host is instead a real Taffy box, and Taffy
92
+ * *content-sizes* a foreign (non-MasonKit) child, so the `Frame` collapses to
93
+ * ~0 and nothing from the outlet down renders.
94
+ *
95
+ * Most `@nativescript/angular` views (`ActionBar`, `ActionItem`, ...) are
96
+ * already `registerElement`'d, so only the outlets reach us as unregistered
97
+ * elements.
98
+ */
99
+ const DEFAULT_PASSTHROUGH_ELEMENTS = ['page-router-outlet', 'ns-empty-outlet', 'router-outlet'];
100
+ /**
101
+ * Live configuration, read at element-creation time rather than captured at
102
+ * install time so a later `installMasonKit()` call can still adjust it.
103
+ *
104
+ * `passthrough` is not mirrored here: matchers are compiled straight into
105
+ * {@link passthroughNames} / {@link passthroughTests} when they arrive.
106
+ */
107
+ const config = {
108
+ enabled: true,
109
+ autoDetectPassthrough: true,
110
+ rootAsPassthrough: true,
111
+ };
112
+ /** Lowercased string matchers, kept separate for O(1) lookup. */
113
+ const passthroughNames = new Set(DEFAULT_PASSTHROUGH_ELEMENTS);
114
+ /** Regex and predicate matchers. */
115
+ const passthroughTests = [];
116
+ let installed = false;
117
+ let elementsCreated = 0;
118
+ /**
119
+ * Set while `PageRouterOutlet` is building a routed component, so the host
120
+ * element it creates can be recognised as a page root at creation time.
121
+ * See {@link patchPageRouterOutlet}.
122
+ */
123
+ let creatingPageRoot = false;
124
+ /**
125
+ * The real native container behind every component host element.
126
+ *
127
+ * MasonKit's `View` is a `CustomLayoutView` backed by the Taffy layout engine;
128
+ * it embeds in classic NativeScript layouts and hosts both MasonKit and classic
129
+ * NativeScript children. Making a component's host element one of these gives
130
+ * it the same mental model as the web: the host is a real box in the layout,
131
+ * with the full style surface, and `flex`/`grid` on a component element does
132
+ * what it says.
133
+ */
134
+ class MasonComponentHost extends View {
135
+ /** The element name from the template, kept for diagnostics and auto-detect. */
136
+ masonHostElementName;
137
+ addChild(child) {
138
+ inspectChild(this, child);
139
+ super.addChild(child);
140
+ }
141
+ insertChild(child, atIndex) {
142
+ inspectChild(this, child);
143
+ super.insertChild(child, atIndex);
144
+ }
145
+ }
146
+ /**
147
+ * True when `child` cannot lay out under a Taffy box at all, so its host has to
148
+ * become transparent.
149
+ *
150
+ * `Frame` and `Page` fill their parent by classic measurement, and Taffy
151
+ * content-sizes a foreign (non-MasonKit) child, so under a MasonKit host they
152
+ * collapse to ~0 and nothing below them renders. No styling an app can apply
153
+ * works around that, which is what makes forcing a passthrough right.
154
+ */
155
+ function needsTransparentParent(child) {
156
+ if (child instanceof Frame || child instanceof Page) {
157
+ return true;
158
+ }
159
+ // A proxy hoists its own children, so look through it for the view it is
160
+ // standing in for.
161
+ if (child instanceof ProxyViewContainer) {
162
+ const count = child.getChildrenCount();
163
+ for (let i = 0; i < count; i++) {
164
+ if (needsTransparentParent(child.getChildAt(i))) {
165
+ return true;
166
+ }
167
+ }
168
+ }
169
+ return false;
170
+ }
171
+ function inspectChild(host, child) {
172
+ if (!config.autoDetectPassthrough || !host.masonHostElementName) {
173
+ return;
174
+ }
175
+ if (!(child instanceof View$1)) {
176
+ return;
177
+ }
178
+ // An ActionBar means this component is a page root: its siblings are
179
+ // page-level content that fills the `Page` by classic measurement, and a
180
+ // Taffy box between the two content-sizes them away.
181
+ //
182
+ // This is the backstop for the outlet hook in `patchPageRouterOutlet()`. If
183
+ // that hook stops firing - a different routing path, an upstream refactor -
184
+ // this still catches the case, one render late.
185
+ if (needsTransparentParent(child) || child instanceof ActionBar) {
186
+ learnPassthroughElement(host.masonHostElementName);
187
+ }
188
+ }
189
+ /**
190
+ * Record an element name as a passthrough after the fact, and say so.
191
+ *
192
+ * The host that triggered detection already exists and cannot change class:
193
+ * Angular's `ViewUtil` holds it in a sibling linked list, so swapping it
194
+ * mid-render would corrupt that list. Every *later* creation of the element
195
+ * becomes a proxy, so the second render onwards is correct - and the log names
196
+ * the selector to put in `passthrough` to fix the first render too.
197
+ */
198
+ function learnPassthroughElement(elementName) {
199
+ const name = elementName.toLowerCase();
200
+ if (passthroughNames.has(name)) {
201
+ return;
202
+ }
203
+ passthroughNames.add(name);
204
+ console.log(`[masonkit/angular] <${elementName}> holds a page-level view (Frame, Page or ActionBar) that Taffy cannot size as a Mason box. ` + `It will be created as a transparent ProxyViewContainer from now on. Add '${elementName}' to the ` + `passthrough option to apply this from the first render too.`);
205
+ }
206
+ function isPassthrough(elementName) {
207
+ if (passthroughNames.has(elementName.toLowerCase())) {
208
+ return true;
209
+ }
210
+ for (const test of passthroughTests) {
211
+ if (test instanceof RegExp ? test.test(elementName) : test(elementName)) {
212
+ return true;
213
+ }
214
+ }
215
+ return false;
216
+ }
217
+ /**
218
+ * Recognise routed components at creation time, so the very first render of a
219
+ * route is correct rather than being repaired afterwards.
220
+ *
221
+ * A routed component is a page root: `PageRouterOutlet` creates it, then moves
222
+ * its host element to be the `Page`'s content. Page-level content (a
223
+ * fill-parent `ScrollView` or layout) sizes itself against the `Page` by
224
+ * classic measurement, so a Taffy box in between content-sizes it to nothing -
225
+ * the ActionBar still renders because it is hoisted onto the `Page`, and
226
+ * everything below it disappears.
227
+ *
228
+ * Detection alone cannot fix that, because by the time a host reports an
229
+ * ActionBar child the host exists and cannot change class. `activateOnGoForward`
230
+ * closes the gap: it builds the routed component inside its own call, so the
231
+ * first unregistered element created while it runs *is* the route's host
232
+ * element. Bracketing it gives `createView` the one piece of information it was
233
+ * missing, with no per-app configuration.
234
+ *
235
+ * Nothing is lost by making these transparent: a page root is a full-screen
236
+ * container, not a box anyone styles. Components *below* it stay real MasonKit
237
+ * hosts, which is where component-host mode earns its keep.
238
+ */
239
+ function patchPageRouterOutlet() {
240
+ // `activateOnGoForward` is private on the class, so reach it through an
241
+ // untyped view of the prototype.
242
+ const proto = PageRouterOutlet?.prototype;
243
+ const original = proto?.['activateOnGoForward'];
244
+ if (!proto || typeof original !== 'function') {
245
+ // Different version, different internals. The ActionBar backstop in
246
+ // `inspectChild` still covers it from the second render on.
247
+ return;
248
+ }
249
+ proto['activateOnGoForward'] = function (...args) {
250
+ creatingPageRoot = true;
251
+ try {
252
+ return original.apply(this, args);
253
+ }
254
+ finally {
255
+ creatingPageRoot = false;
256
+ }
257
+ };
258
+ }
259
+ function applyOptions(options) {
260
+ if (options.enabled !== undefined) {
261
+ config.enabled = options.enabled;
262
+ }
263
+ if (options.autoDetectPassthrough !== undefined) {
264
+ config.autoDetectPassthrough = options.autoDetectPassthrough;
265
+ }
266
+ if (options.rootAsPassthrough !== undefined) {
267
+ config.rootAsPassthrough = options.rootAsPassthrough;
268
+ }
269
+ for (const matcher of options.passthrough ?? []) {
270
+ if (typeof matcher === 'string') {
271
+ passthroughNames.add(matcher.toLowerCase());
272
+ }
273
+ else {
274
+ passthroughTests.push(matcher);
275
+ }
276
+ }
277
+ }
278
+ /**
279
+ * Turn every Angular component host element into a real MasonKit view.
280
+ *
281
+ * Stock `@nativescript/angular` creates a `ProxyViewContainer` for every element
282
+ * that is not `registerElement`'d - i.e. every Angular component selector. That
283
+ * container creates no native view, so anything placed on a component element
284
+ * (`backgroundColor`, `margin`, `class="..."`, host bindings) is set on an
285
+ * invisible logical wrapper with no visual effect, and the component is
286
+ * transparent to layout. Nesting components then produces layouts that do not
287
+ * match the template, because the boxes the template implies do not exist.
288
+ *
289
+ * This replaces that fallback with a {@link MasonComponentHost}, so a component
290
+ * host element is a real box, as on the web.
291
+ *
292
+ * Idempotent: repeated calls only update the configuration.
293
+ *
294
+ * Trade-off: an unknown element name (a typo, a component that was never
295
+ * declared) becomes a host instead of throwing "No known component for element
296
+ * X". Set `enabled: false` to keep the stock behaviour.
297
+ */
298
+ function enableMasonComponentHosts(options = {}) {
299
+ applyOptions(options);
300
+ if (installed) {
301
+ return;
302
+ }
303
+ installed = true;
304
+ registerElement(COMPONENT_HOST_TAG, () => MasonComponentHost, masonMeta);
305
+ patchPageRouterOutlet();
306
+ // Patch point 1 of 2: `ViewUtil.createView` substitutes 'ProxyViewContainer'
307
+ // for unregistered elements. `ɵViewUtil` is a frozen namespace, but the
308
+ // `ViewUtil` prototype itself is mutable.
309
+ const { ViewUtil } = _ViewUtil;
310
+ const originalCreateView = ViewUtil.prototype.createView;
311
+ ViewUtil.prototype.createView = function (name) {
312
+ const isFirstElement = elementsCreated === 0;
313
+ const unregistered = !isKnownView(name);
314
+ if (unregistered) {
315
+ elementsCreated++;
316
+ }
317
+ // The first unregistered element created while `PageRouterOutlet` is
318
+ // building a routed component is that route's host element. Consume the
319
+ // flag so only that element claims it, and remember the name so later
320
+ // creations of the same component match without needing the bracket.
321
+ let isPageRoot = false;
322
+ if (unregistered && creatingPageRoot) {
323
+ creatingPageRoot = false;
324
+ isPageRoot = true;
325
+ passthroughNames.add(name.toLowerCase());
326
+ }
327
+ if (!config.enabled || !unregistered || isPageRoot || isPassthrough(name) || (config.rootAsPassthrough && isFirstElement)) {
328
+ // Known element, or one we deliberately keep as a transparent
329
+ // ProxyViewContainer. `originalCreateView` substitutes the proxy for
330
+ // unregistered names but does not record the original tag (the renderer
331
+ // normally does that), so stamp it here to keep CSS type selectors and
332
+ // debugging output working on this path too.
333
+ const view = originalCreateView.call(this, name);
334
+ if (unregistered) {
335
+ view.customCSSName = name;
336
+ }
337
+ return view;
338
+ }
339
+ const host = originalCreateView.call(this, COMPONENT_HOST_TAG);
340
+ // Preserve the original tag for CSS type selectors, for debugging, and for
341
+ // Angular's `rootElement.tagName.toLowerCase()` bootstrap check.
342
+ host.nodeName = name;
343
+ host.tagName = name;
344
+ host.cssType = name;
345
+ host.customCSSName = name;
346
+ host.masonHostElementName = name;
347
+ return host;
348
+ };
349
+ // Patch point 2 of 2: `NativeScriptRenderer.createElement` performs the same
350
+ // 'ProxyViewContainer' substitution *before* delegating to `createView`, so
351
+ // the patch above would never see the original tag. Route it through the
352
+ // patched `createView` with the tag intact. The renderer class is not
353
+ // exported, but `EmulatedRenderer` extends it and delegates via
354
+ // `super.createElement()`, so patching the shared base prototype covers both.
355
+ const rendererProto = Object.getPrototypeOf(EmulatedRenderer.prototype);
356
+ const originalCreateElement = rendererProto.createElement;
357
+ rendererProto.createElement = function (name, namespace) {
358
+ if (isKnownView(name)) {
359
+ // Nothing to intercept - keep the stock path, including its tracing.
360
+ return originalCreateElement.call(this, name, namespace);
361
+ }
362
+ // Unregistered: hand the *original* tag to the patched `createView`, which
363
+ // decides between a host and a proxy and stamps `customCSSName` either way.
364
+ return this.viewUtil.createView(name);
365
+ };
366
+ }
367
+
368
+ /**
369
+ * Element names this package has already registered, so a second call (module
370
+ * re-import, HMR) is a no-op rather than a duplicate registration.
371
+ */
372
+ const registered = new Set();
373
+ /**
374
+ * True when the class manages children through MasonKit's own child list, i.e.
375
+ * when {@link masonMeta} is the right contract for it.
376
+ *
377
+ * `Br` is the notable exception: it is a placeholder that extends core's
378
+ * `ViewBase` and attaches straight to the Mason tree, so it has no child API and
379
+ * must keep the default meta.
380
+ */
381
+ function isMasonContainer(cls) {
382
+ const proto = cls?.prototype;
383
+ return !!proto && typeof proto.insertChild === 'function' && typeof proto.addChild === 'function' && typeof proto.removeChild === 'function';
384
+ }
385
+ function register(name, cls) {
386
+ // Compared lowercase: `registerElement` stores every spelling of a name, so
387
+ // registering `Ul` after `/web` already claimed `ul` would silently overwrite
388
+ // it. Case-insensitive dedupe is what makes "first registration wins" real.
389
+ const key = name?.toLowerCase();
390
+ if (!key || registered.has(key)) {
391
+ return;
392
+ }
393
+ registered.add(key);
394
+ // `registerElement` also stores the lowercase and kebab-case spellings, so a
395
+ // single call covers `<View>`, `<view>` and `<text-area>`.
396
+ registerElement(name, () => cls, isMasonContainer(cls) ? masonMeta : undefined);
397
+ }
398
+ /**
399
+ * MasonKit's own elements, in the spelling the templates use.
400
+ *
401
+ * Registered *after* the `/web` elements on purpose: `/web` also exports `Ul`,
402
+ * `Ol` and `Li`, and where the two overlap the rule is "the more specific one
403
+ * wins" - `/web`'s `Li` is an inline `Text` subclass, so `<li>` stays inline,
404
+ * while `<view>`, `<img>`, `<button>`, `<input>` and `<br>` resolve to the base
405
+ * package's fully-featured widgets.
406
+ */
407
+ const MASON_ELEMENTS = [
408
+ ['View', View],
409
+ ['Text', Text],
410
+ ['Scroll', Scroll],
411
+ ['Img', Img],
412
+ ['Button', Button],
413
+ ['Input', Input],
414
+ ['TextArea', TextArea],
415
+ ['Br', Br],
416
+ ['Ul', Ul],
417
+ ['Ol', Ol],
418
+ ['Li', Li],
419
+ ];
420
+ /**
421
+ * Register MasonKit's elements with `@nativescript/angular`, each with the child
422
+ * bookkeeping meta it needs (see {@link masonMeta}).
423
+ *
424
+ * Safe to call more than once - later calls skip names already registered here.
425
+ *
426
+ * ## Shadowing
427
+ *
428
+ * `registerElement` overwrites silently, and `@nativescript/angular` registers
429
+ * every element under its original, lowercase and kebab spellings. MasonKit's
430
+ * `Button`, `Img` and `/web`'s `Span` therefore *replace* core's `Button`,
431
+ * `img` (`Image`) and `Span` for Angular templates. That is the intent - these
432
+ * are the MasonKit-laid-out equivalents - but it is why `mason`/`web` can each
433
+ * be turned off if an app wants to keep the classic widgets.
434
+ */
435
+ function registerMasonKitElements(options = {}) {
436
+ const { mason = true, web = true } = options;
437
+ if (web) {
438
+ for (const exported of Object.values(MasonKitWeb)) {
439
+ if (typeof exported !== 'function' || !exported.prototype) {
440
+ continue;
441
+ }
442
+ // Every `/web` class carries its tag via `@CSSType('div')`, which the
443
+ // decorator stamps onto the prototype. Reading it there - rather than
444
+ // `constructor.name` - survives the demo's `uglify: true` release build,
445
+ // where class names are mangled to single letters.
446
+ register(exported.prototype.cssType, exported);
447
+ }
448
+ }
449
+ if (mason) {
450
+ for (const [name, cls] of MASON_ELEMENTS) {
451
+ register(name, cls);
452
+ }
453
+ }
454
+ }
455
+
456
+ /**
457
+ * Install MasonKit's Angular integration.
458
+ *
459
+ * Call this in `main.ts` **before** `runNativeScriptAngularApp()`:
460
+ *
461
+ * ```ts
462
+ * import { installMasonKit } from '@triniwiz/nativescript-masonkit/angular';
463
+ *
464
+ * installMasonKit();
465
+ *
466
+ * runNativeScriptAngularApp({
467
+ * appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule),
468
+ * });
469
+ * ```
470
+ *
471
+ * It has to run before the bootstrap, not as part of it: the element map and
472
+ * the renderer patch must be in place before Angular creates the root
473
+ * component's host element, and an `NgModule` import or an `APP_INITIALIZER`
474
+ * would both be too late for some of that. A plain function call at the top of
475
+ * the entry file is unambiguous about when it happens.
476
+ *
477
+ * Idempotent - element registration is deduplicated and the component-host
478
+ * patches are installed once, then only reconfigured.
479
+ */
480
+ function installMasonKit(options = {}) {
481
+ registerMasonKitElements(options);
482
+ const { componentHosts = true } = options;
483
+ if (componentHosts === false) {
484
+ enableMasonComponentHosts({ enabled: false });
485
+ }
486
+ else {
487
+ enableMasonComponentHosts(componentHosts === true ? {} : componentHosts);
488
+ }
489
+ }
490
+
491
+ /**
492
+ * Generated bundle index. Do not edit.
493
+ */
494
+
495
+ export { enableMasonComponentHosts, installMasonKit, masonMeta, registerMasonKitElements };
496
+ //# sourceMappingURL=triniwiz-nativescript-masonkit-angular.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triniwiz-nativescript-masonkit-angular.mjs","sources":["../../../../../packages/nativescript-masonkit/angular/src/mason-meta.ts","../../../../../packages/nativescript-masonkit/angular/src/component-host.ts","../../../../../packages/nativescript-masonkit/angular/src/element-registry.ts","../../../../../packages/nativescript-masonkit/angular/src/install.ts","../../../../../packages/nativescript-masonkit/angular/triniwiz-nativescript-masonkit-angular.ts"],"sourcesContent":["import type { ViewClassMeta } from '@nativescript/angular';\n\n/**\n * The subset of MasonKit's `ViewBase` child API this meta drives.\n *\n * Typed structurally rather than against the real class so the meta can also be\n * attached to subclasses declared outside this package (e.g. an app's own\n * `View` subclass) without a nominal dependency.\n */\ninterface MasonChildOps {\n /**\n * MasonKit's raw child list. Unlike `_viewChildren` it includes text-node and\n * placeholder (`<br>`) entries, and it is the list `insertChild` splices into.\n */\n _children: unknown[];\n getChildIndex(child: unknown): number;\n insertChild(child: unknown, atIndex: number): void;\n addChild(child: unknown): void;\n removeChild(child: unknown): void;\n}\n\n/**\n * Index of `child` in the parent's raw `_children` list, or -1.\n *\n * Deliberately *not* `parent.getChildIndex()`: that walks `_viewChildren`, which\n * filters out text nodes and placeholders, so its indices drift from the ones\n * `insertChild()` splices into as soon as a container mixes views and text. The\n * only index `insertChild` accepts is a `_children` index, so that is what we\n * compute. `getChildIndex` stays as the fallback for a container that predates\n * `_children` or overrides the lookup.\n */\nfunction rawChildIndex(parent: MasonChildOps, child: unknown): number {\n if (child == null) {\n return -1;\n }\n const children = parent._children;\n if (Array.isArray(children)) {\n return children.indexOf(child);\n }\n return typeof parent.getChildIndex === 'function' ? parent.getChildIndex(child) : -1;\n}\n\n/**\n * `ViewClassMeta` that routes Angular's visual-tree mutations through MasonKit's\n * own child bookkeeping.\n *\n * ## Why every MasonKit element needs this\n *\n * MasonKit's `ViewBase` extends `CustomLayoutView`, **not** `LayoutBase`.\n * `@nativescript/angular`'s `ViewUtil` branches on `view instanceof LayoutBase`,\n * so without a meta a MasonKit container falls into the generic fallbacks:\n *\n * - `addToVisualTree` → `parent._addChildFromBuilder(name, child)`, which is a\n * plain `addChild()` append. The resolved `next` sibling is **discarded**, so\n * anything Angular inserts in the middle of a container (`*ngIf` toggling on,\n * `*ngFor` reordering, a router swap) lands at the end and the Taffy tree ends\n * up in a different order than the template.\n * - `removeFromVisualTree` → core's `parent._removeView(child)`, which bypasses\n * MasonKit's `removeChild()` entirely. The native view detaches but the entry\n * stays in `_children`, and since `_children` is what drives native insertion\n * indices (`_nativeIndexFor`), every later insert into that container is\n * misplaced - the classic \"nested components lay out wrong\" symptom.\n *\n * Routing through `insertChild`/`addChild`/`removeChild` keeps the Taffy tree,\n * the `_children` bookkeeping and the native view tree in step. This is the same\n * contract `frameMeta`/`formattedStringMeta` use for their containers.\n *\n * ## Why `insertChild` must not throw\n *\n * `next` is whatever `ViewUtil.findNextVisual()` resolved to, which is not\n * guaranteed to be a node MasonKit ever tracked. MasonKit's own `insertBefore()`\n * throws `NotFoundError` for an unknown reference; thrown from here that would\n * abort the component's change detection and blank it. An unknown reference\n * simply degrades to an append, exactly as `insertToLayout` does for classic\n * layouts.\n *\n * Invisible nodes (Angular's `CommentNode`/`TextNode`) are intentionally left to\n * `ViewUtil`'s default handling: it assigns `parent.text`, which MasonKit's\n * `textProperty.setNative` already reconciles into real native text nodes.\n */\nexport const masonMeta: ViewClassMeta = {\n insertChild(parent: MasonChildOps, child: unknown, next?: unknown): void {\n const index = rawChildIndex(parent, next);\n if (index > -1) {\n parent.insertChild(child, index);\n } else {\n parent.addChild(child);\n }\n },\n removeChild(parent: MasonChildOps, child: unknown): void {\n parent.removeChild(child);\n },\n};\n","import { ActionBar, Frame, Page, ProxyViewContainer, View as NSView } from '@nativescript/core';\nimport { EmulatedRenderer, PageRouterOutlet, isKnownView, registerElement, ɵViewUtil } from '@nativescript/angular';\nimport { View } from '@triniwiz/nativescript-masonkit';\n\nimport { masonMeta } from './mason-meta';\n\n/**\n * Internal element name the host container is registered under. Every component\n * host is created from this entry and then re-stamped with its original tag, so\n * this name never appears in a template.\n */\nconst COMPONENT_HOST_TAG = 'mason-component-host';\n\n/** How a passthrough element can be identified. */\nexport type PassthroughMatcher = string | RegExp | ((elementName: string) => boolean);\n\n/**\n * Framework router outlets, which must stay transparent.\n *\n * They host a classic `Frame`/`Page` that fills its parent by classic\n * measurement. A `ProxyViewContainer` is a logical passthrough - its child is\n * hoisted into the nearest real native ancestor and measured with an exact,\n * fill-parent size. A MasonKit host is instead a real Taffy box, and Taffy\n * *content-sizes* a foreign (non-MasonKit) child, so the `Frame` collapses to\n * ~0 and nothing from the outlet down renders.\n *\n * Most `@nativescript/angular` views (`ActionBar`, `ActionItem`, ...) are\n * already `registerElement`'d, so only the outlets reach us as unregistered\n * elements.\n */\nconst DEFAULT_PASSTHROUGH_ELEMENTS = ['page-router-outlet', 'ns-empty-outlet', 'router-outlet'];\n\nexport interface ComponentHostOptions {\n /**\n * Turn component-host mode off entirely while keeping element registration.\n *\n * @default true\n */\n enabled?: boolean;\n /**\n * Extra elements to keep as a transparent `ProxyViewContainer`. Strings are\n * compared case-insensitively; regexes and predicates receive the raw element\n * name.\n *\n * Routed components are handled automatically, so this is only needed for a\n * component whose template root is a classic fill-parent view that this\n * cannot see coming - another router outlet, a `Frame`, a `Page`.\n */\n passthrough?: PassthroughMatcher[];\n /**\n * Recognise page roots automatically: routed components at creation time, and\n * any host that turns out to hold a `Frame`, `Page` or `ActionBar`.\n *\n * @default true\n */\n autoDetectPassthrough?: boolean;\n /**\n * Keep the Angular root component's host element a `ProxyViewContainer`.\n *\n * `AppHostView` only wraps the root in its full-screen root `GridLayout` when\n * that root *is* a `ProxyViewContainer`, so the root element has to stay a\n * passthrough for the tree below it to have a viewport-sized ancestor to\n * resolve `height: 100%` against.\n *\n * Detected rather than hardcoded: Angular creates the root component's host\n * element before anything in its template, so the first unregistered element\n * this package is asked to create is the root.\n *\n * @default true\n */\n rootAsPassthrough?: boolean;\n}\n\n/**\n * Live configuration, read at element-creation time rather than captured at\n * install time so a later `installMasonKit()` call can still adjust it.\n *\n * `passthrough` is not mirrored here: matchers are compiled straight into\n * {@link passthroughNames} / {@link passthroughTests} when they arrive.\n */\nconst config = {\n enabled: true,\n autoDetectPassthrough: true,\n rootAsPassthrough: true,\n};\n\n/** Lowercased string matchers, kept separate for O(1) lookup. */\nconst passthroughNames = new Set<string>(DEFAULT_PASSTHROUGH_ELEMENTS);\n/** Regex and predicate matchers. */\nconst passthroughTests: Array<RegExp | ((name: string) => boolean)> = [];\n\nlet installed = false;\nlet elementsCreated = 0;\n\n/**\n * Set while `PageRouterOutlet` is building a routed component, so the host\n * element it creates can be recognised as a page root at creation time.\n * See {@link patchPageRouterOutlet}.\n */\nlet creatingPageRoot = false;\n\n/**\n * The real native container behind every component host element.\n *\n * MasonKit's `View` is a `CustomLayoutView` backed by the Taffy layout engine;\n * it embeds in classic NativeScript layouts and hosts both MasonKit and classic\n * NativeScript children. Making a component's host element one of these gives\n * it the same mental model as the web: the host is a real box in the layout,\n * with the full style surface, and `flex`/`grid` on a component element does\n * what it says.\n */\nclass MasonComponentHost extends View {\n /** The element name from the template, kept for diagnostics and auto-detect. */\n masonHostElementName?: string;\n\n addChild(child: unknown): void {\n inspectChild(this, child);\n super.addChild(child);\n }\n\n insertChild(child: unknown, atIndex: number): void {\n inspectChild(this, child);\n super.insertChild(child, atIndex);\n }\n}\n\n/**\n * True when `child` cannot lay out under a Taffy box at all, so its host has to\n * become transparent.\n *\n * `Frame` and `Page` fill their parent by classic measurement, and Taffy\n * content-sizes a foreign (non-MasonKit) child, so under a MasonKit host they\n * collapse to ~0 and nothing below them renders. No styling an app can apply\n * works around that, which is what makes forcing a passthrough right.\n */\nfunction needsTransparentParent(child: unknown): boolean {\n if (child instanceof Frame || child instanceof Page) {\n return true;\n }\n // A proxy hoists its own children, so look through it for the view it is\n // standing in for.\n if (child instanceof ProxyViewContainer) {\n const count = child.getChildrenCount();\n for (let i = 0; i < count; i++) {\n if (needsTransparentParent(child.getChildAt(i))) {\n return true;\n }\n }\n }\n return false;\n}\n\nfunction inspectChild(host: MasonComponentHost, child: unknown): void {\n if (!config.autoDetectPassthrough || !host.masonHostElementName) {\n return;\n }\n if (!(child instanceof NSView)) {\n return;\n }\n // An ActionBar means this component is a page root: its siblings are\n // page-level content that fills the `Page` by classic measurement, and a\n // Taffy box between the two content-sizes them away.\n //\n // This is the backstop for the outlet hook in `patchPageRouterOutlet()`. If\n // that hook stops firing - a different routing path, an upstream refactor -\n // this still catches the case, one render late.\n if (needsTransparentParent(child) || child instanceof ActionBar) {\n learnPassthroughElement(host.masonHostElementName);\n }\n}\n\n/**\n * Record an element name as a passthrough after the fact, and say so.\n *\n * The host that triggered detection already exists and cannot change class:\n * Angular's `ViewUtil` holds it in a sibling linked list, so swapping it\n * mid-render would corrupt that list. Every *later* creation of the element\n * becomes a proxy, so the second render onwards is correct - and the log names\n * the selector to put in `passthrough` to fix the first render too.\n */\nfunction learnPassthroughElement(elementName: string): void {\n const name = elementName.toLowerCase();\n if (passthroughNames.has(name)) {\n return;\n }\n passthroughNames.add(name);\n console.log(`[masonkit/angular] <${elementName}> holds a page-level view (Frame, Page or ActionBar) that Taffy cannot size as a Mason box. ` + `It will be created as a transparent ProxyViewContainer from now on. Add '${elementName}' to the ` + `passthrough option to apply this from the first render too.`);\n}\n\nfunction isPassthrough(elementName: string): boolean {\n if (passthroughNames.has(elementName.toLowerCase())) {\n return true;\n }\n for (const test of passthroughTests) {\n if (test instanceof RegExp ? test.test(elementName) : test(elementName)) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * Recognise routed components at creation time, so the very first render of a\n * route is correct rather than being repaired afterwards.\n *\n * A routed component is a page root: `PageRouterOutlet` creates it, then moves\n * its host element to be the `Page`'s content. Page-level content (a\n * fill-parent `ScrollView` or layout) sizes itself against the `Page` by\n * classic measurement, so a Taffy box in between content-sizes it to nothing -\n * the ActionBar still renders because it is hoisted onto the `Page`, and\n * everything below it disappears.\n *\n * Detection alone cannot fix that, because by the time a host reports an\n * ActionBar child the host exists and cannot change class. `activateOnGoForward`\n * closes the gap: it builds the routed component inside its own call, so the\n * first unregistered element created while it runs *is* the route's host\n * element. Bracketing it gives `createView` the one piece of information it was\n * missing, with no per-app configuration.\n *\n * Nothing is lost by making these transparent: a page root is a full-screen\n * container, not a box anyone styles. Components *below* it stay real MasonKit\n * hosts, which is where component-host mode earns its keep.\n */\nfunction patchPageRouterOutlet(): void {\n // `activateOnGoForward` is private on the class, so reach it through an\n // untyped view of the prototype.\n const proto = PageRouterOutlet?.prototype as unknown as undefined | Record<string, unknown>;\n const original = proto?.['activateOnGoForward'];\n if (!proto || typeof original !== 'function') {\n // Different version, different internals. The ActionBar backstop in\n // `inspectChild` still covers it from the second render on.\n return;\n }\n\n proto['activateOnGoForward'] = function (this: unknown, ...args: unknown[]) {\n creatingPageRoot = true;\n try {\n return original.apply(this, args);\n } finally {\n creatingPageRoot = false;\n }\n };\n}\n\nfunction applyOptions(options: ComponentHostOptions): void {\n if (options.enabled !== undefined) {\n config.enabled = options.enabled;\n }\n if (options.autoDetectPassthrough !== undefined) {\n config.autoDetectPassthrough = options.autoDetectPassthrough;\n }\n if (options.rootAsPassthrough !== undefined) {\n config.rootAsPassthrough = options.rootAsPassthrough;\n }\n for (const matcher of options.passthrough ?? []) {\n if (typeof matcher === 'string') {\n passthroughNames.add(matcher.toLowerCase());\n } else {\n passthroughTests.push(matcher);\n }\n }\n}\n\n/**\n * Turn every Angular component host element into a real MasonKit view.\n *\n * Stock `@nativescript/angular` creates a `ProxyViewContainer` for every element\n * that is not `registerElement`'d - i.e. every Angular component selector. That\n * container creates no native view, so anything placed on a component element\n * (`backgroundColor`, `margin`, `class=\"...\"`, host bindings) is set on an\n * invisible logical wrapper with no visual effect, and the component is\n * transparent to layout. Nesting components then produces layouts that do not\n * match the template, because the boxes the template implies do not exist.\n *\n * This replaces that fallback with a {@link MasonComponentHost}, so a component\n * host element is a real box, as on the web.\n *\n * Idempotent: repeated calls only update the configuration.\n *\n * Trade-off: an unknown element name (a typo, a component that was never\n * declared) becomes a host instead of throwing \"No known component for element\n * X\". Set `enabled: false` to keep the stock behaviour.\n */\nexport function enableMasonComponentHosts(options: ComponentHostOptions = {}): void {\n applyOptions(options);\n\n if (installed) {\n return;\n }\n installed = true;\n\n registerElement(COMPONENT_HOST_TAG, () => MasonComponentHost, masonMeta);\n\n patchPageRouterOutlet();\n\n // Patch point 1 of 2: `ViewUtil.createView` substitutes 'ProxyViewContainer'\n // for unregistered elements. `ɵViewUtil` is a frozen namespace, but the\n // `ViewUtil` prototype itself is mutable.\n const { ViewUtil } = ɵViewUtil;\n const originalCreateView = ViewUtil.prototype.createView;\n ViewUtil.prototype.createView = function (name: string) {\n const isFirstElement = elementsCreated === 0;\n const unregistered = !isKnownView(name);\n if (unregistered) {\n elementsCreated++;\n }\n\n // The first unregistered element created while `PageRouterOutlet` is\n // building a routed component is that route's host element. Consume the\n // flag so only that element claims it, and remember the name so later\n // creations of the same component match without needing the bracket.\n let isPageRoot = false;\n if (unregistered && creatingPageRoot) {\n creatingPageRoot = false;\n isPageRoot = true;\n passthroughNames.add(name.toLowerCase());\n }\n\n if (!config.enabled || !unregistered || isPageRoot || isPassthrough(name) || (config.rootAsPassthrough && isFirstElement)) {\n // Known element, or one we deliberately keep as a transparent\n // ProxyViewContainer. `originalCreateView` substitutes the proxy for\n // unregistered names but does not record the original tag (the renderer\n // normally does that), so stamp it here to keep CSS type selectors and\n // debugging output working on this path too.\n const view = originalCreateView.call(this, name);\n if (unregistered) {\n view.customCSSName = name;\n }\n return view;\n }\n\n const host = originalCreateView.call(this, COMPONENT_HOST_TAG) as MasonComponentHost & { nodeName: string; tagName: string; cssType: string; customCSSName: string };\n // Preserve the original tag for CSS type selectors, for debugging, and for\n // Angular's `rootElement.tagName.toLowerCase()` bootstrap check.\n host.nodeName = name;\n host.tagName = name;\n host.cssType = name;\n host.customCSSName = name;\n host.masonHostElementName = name;\n return host;\n };\n\n // Patch point 2 of 2: `NativeScriptRenderer.createElement` performs the same\n // 'ProxyViewContainer' substitution *before* delegating to `createView`, so\n // the patch above would never see the original tag. Route it through the\n // patched `createView` with the tag intact. The renderer class is not\n // exported, but `EmulatedRenderer` extends it and delegates via\n // `super.createElement()`, so patching the shared base prototype covers both.\n const rendererProto = Object.getPrototypeOf(EmulatedRenderer.prototype) as {\n createElement(this: { viewUtil: InstanceType<typeof ViewUtil> }, name: string, namespace?: string): unknown;\n };\n const originalCreateElement = rendererProto.createElement;\n rendererProto.createElement = function (name: string, namespace?: string) {\n if (isKnownView(name)) {\n // Nothing to intercept - keep the stock path, including its tracing.\n return originalCreateElement.call(this, name, namespace);\n }\n // Unregistered: hand the *original* tag to the patched `createView`, which\n // decides between a host and a proxy and stamps `customCSSName` either way.\n return this.viewUtil.createView(name);\n };\n}\n","import { registerElement } from '@nativescript/angular';\nimport { Br, Button, Img, Input, Li, Ol, Scroll, Text, TextArea, Ul, View } from '@triniwiz/nativescript-masonkit';\nimport * as MasonKitWeb from '@triniwiz/nativescript-masonkit/web';\n\nimport { masonMeta } from './mason-meta';\n\n/** Anything constructible; the element resolvers are all `() => SomeViewClass`. */\ntype ElementClass = { new (...args: any[]): any; prototype: any };\n\nexport interface RegisterElementsOptions {\n /**\n * Register MasonKit's own elements: `View`, `Text`, `Scroll`, `Img`, `Button`,\n * `Input`, `TextArea`, `Br`, `Ul`, `Ol`, `Li`.\n *\n * @default true\n */\n mason?: boolean;\n /**\n * Register the HTML-shaped elements from `@triniwiz/nativescript-masonkit/web`\n * (`div`, `section`, `p`, `span`, `h1`–`h6`, `blockquote`, `code`, `a`, ...).\n *\n * @default true\n */\n web?: boolean;\n}\n\n/**\n * Element names this package has already registered, so a second call (module\n * re-import, HMR) is a no-op rather than a duplicate registration.\n */\nconst registered = new Set<string>();\n\n/**\n * True when the class manages children through MasonKit's own child list, i.e.\n * when {@link masonMeta} is the right contract for it.\n *\n * `Br` is the notable exception: it is a placeholder that extends core's\n * `ViewBase` and attaches straight to the Mason tree, so it has no child API and\n * must keep the default meta.\n */\nfunction isMasonContainer(cls: ElementClass): boolean {\n const proto = cls?.prototype;\n return !!proto && typeof proto.insertChild === 'function' && typeof proto.addChild === 'function' && typeof proto.removeChild === 'function';\n}\n\nfunction register(name: string, cls: ElementClass): void {\n // Compared lowercase: `registerElement` stores every spelling of a name, so\n // registering `Ul` after `/web` already claimed `ul` would silently overwrite\n // it. Case-insensitive dedupe is what makes \"first registration wins\" real.\n const key = name?.toLowerCase();\n if (!key || registered.has(key)) {\n return;\n }\n registered.add(key);\n // `registerElement` also stores the lowercase and kebab-case spellings, so a\n // single call covers `<View>`, `<view>` and `<text-area>`.\n registerElement(name, () => cls, isMasonContainer(cls) ? masonMeta : undefined);\n}\n\n/**\n * MasonKit's own elements, in the spelling the templates use.\n *\n * Registered *after* the `/web` elements on purpose: `/web` also exports `Ul`,\n * `Ol` and `Li`, and where the two overlap the rule is \"the more specific one\n * wins\" - `/web`'s `Li` is an inline `Text` subclass, so `<li>` stays inline,\n * while `<view>`, `<img>`, `<button>`, `<input>` and `<br>` resolve to the base\n * package's fully-featured widgets.\n */\nconst MASON_ELEMENTS: Array<[string, ElementClass]> = [\n ['View', View],\n ['Text', Text],\n ['Scroll', Scroll],\n ['Img', Img],\n ['Button', Button],\n ['Input', Input],\n ['TextArea', TextArea],\n ['Br', Br],\n ['Ul', Ul],\n ['Ol', Ol],\n ['Li', Li],\n];\n\n/**\n * Register MasonKit's elements with `@nativescript/angular`, each with the child\n * bookkeeping meta it needs (see {@link masonMeta}).\n *\n * Safe to call more than once - later calls skip names already registered here.\n *\n * ## Shadowing\n *\n * `registerElement` overwrites silently, and `@nativescript/angular` registers\n * every element under its original, lowercase and kebab spellings. MasonKit's\n * `Button`, `Img` and `/web`'s `Span` therefore *replace* core's `Button`,\n * `img` (`Image`) and `Span` for Angular templates. That is the intent - these\n * are the MasonKit-laid-out equivalents - but it is why `mason`/`web` can each\n * be turned off if an app wants to keep the classic widgets.\n */\nexport function registerMasonKitElements(options: RegisterElementsOptions = {}): void {\n const { mason = true, web = true } = options;\n\n if (web) {\n for (const exported of Object.values(MasonKitWeb) as ElementClass[]) {\n if (typeof exported !== 'function' || !exported.prototype) {\n continue;\n }\n // Every `/web` class carries its tag via `@CSSType('div')`, which the\n // decorator stamps onto the prototype. Reading it there - rather than\n // `constructor.name` - survives the demo's `uglify: true` release build,\n // where class names are mangled to single letters.\n register(exported.prototype.cssType, exported);\n }\n }\n\n if (mason) {\n for (const [name, cls] of MASON_ELEMENTS) {\n register(name, cls);\n }\n }\n}\n","import { ComponentHostOptions, enableMasonComponentHosts } from './component-host';\nimport { RegisterElementsOptions, registerMasonKitElements } from './element-registry';\n\nexport interface InstallMasonKitOptions extends RegisterElementsOptions {\n /**\n * Component-host mode: make every Angular component host element a real\n * MasonKit view instead of an invisible `ProxyViewContainer`.\n *\n * On by default - installing this is taken as the statement that MasonKit is\n * how the app lays out. Pass `false`, or an options object with\n * `enabled: false`, to opt out and keep stock `@nativescript/angular`\n * behaviour while still getting the element registrations.\n *\n * @default true\n */\n componentHosts?: boolean | ComponentHostOptions;\n}\n\n/**\n * Install MasonKit's Angular integration.\n *\n * Call this in `main.ts` **before** `runNativeScriptAngularApp()`:\n *\n * ```ts\n * import { installMasonKit } from '@triniwiz/nativescript-masonkit/angular';\n *\n * installMasonKit();\n *\n * runNativeScriptAngularApp({\n * appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule),\n * });\n * ```\n *\n * It has to run before the bootstrap, not as part of it: the element map and\n * the renderer patch must be in place before Angular creates the root\n * component's host element, and an `NgModule` import or an `APP_INITIALIZER`\n * would both be too late for some of that. A plain function call at the top of\n * the entry file is unambiguous about when it happens.\n *\n * Idempotent - element registration is deduplicated and the component-host\n * patches are installed once, then only reconfigured.\n */\nexport function installMasonKit(options: InstallMasonKitOptions = {}): void {\n registerMasonKitElements(options);\n\n const { componentHosts = true } = options;\n if (componentHosts === false) {\n enableMasonComponentHosts({ enabled: false });\n } else {\n enableMasonComponentHosts(componentHosts === true ? {} : componentHosts);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["NSView","ɵViewUtil"],"mappings":";;;;;AAqBA;;;;;;;;;AASG;AACH,SAAS,aAAa,CAAC,MAAqB,EAAE,KAAc,EAAA;AAC1D,IAAA,IAAI,KAAK,IAAI,IAAI,EAAE;QACjB,OAAO,CAAC,CAAC;IACX;AACA,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS;AACjC,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AAC3B,QAAA,OAAO,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC;IAChC;IACA,OAAO,OAAO,MAAM,CAAC,aAAa,KAAK,UAAU,GAAG,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG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IAAI,MAAM,CAAC,MAAM,CAAC,WAAW,CAAmB,EAAE;YACnE,IAAI,OAAO,QAAQ,KAAK,UAAU,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;gBACzD;YACF;;;;;YAKA,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC;QAChD;IACF;IAEA,IAAI,KAAK,EAAE;QACT,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,cAAc,EAAE;AACxC,YAAA,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;QACrB;IACF;AACF;;ACpGA;;;;;;;;;;;;;;;;;;;;;;;AAuBG;AACG,SAAU,eAAe,CAAC,OAAA,GAAkC,EAAE,EAAA;IAClE,wBAAwB,CAAC,OAAO,CAAC;AAEjC,IAAA,MAAM,EAAE,cAAc,GAAG,IAAI,EAAE,GAAG,OAAO;AACzC,IAAA,IAAI,cAAc,KAAK,KAAK,EAAE;AAC5B,QAAA,yBAAyB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC/C;SAAO;AACL,QAAA,yBAAyB,CAAC,cAAc,KAAK,IAAI,GAAG,EAAE,GAAG,cAAc,CAAC;IAC1E;AACF;;ACnDA;;AAEG;;;;"}
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@triniwiz/nativescript-masonkit-angular",
3
+ "sideEffects": true,
4
+ "module": "fesm2022/triniwiz-nativescript-masonkit-angular.mjs",
5
+ "typings": "types/triniwiz-nativescript-masonkit-angular.d.ts",
6
+ "exports": {
7
+ "./package.json": {
8
+ "default": "./package.json"
9
+ },
10
+ ".": {
11
+ "types": "./types/triniwiz-nativescript-masonkit-angular.d.ts",
12
+ "default": "./fesm2022/triniwiz-nativescript-masonkit-angular.mjs"
13
+ }
14
+ },
15
+ "type": "module",
16
+ "dependencies": {
17
+ "tslib": "^2.3.0"
18
+ }
19
+ }