@triniwiz/nativescript-masonkit 1.0.0-beta.87 → 1.0.0-beta.88
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.
- package/DOCS.md +16 -4
- package/angular/README.md +204 -0
- package/angular/fesm2022/triniwiz-nativescript-masonkit-angular.mjs +496 -0
- package/angular/fesm2022/triniwiz-nativescript-masonkit-angular.mjs.map +1 -0
- package/angular/package.json +19 -0
- package/angular/types/triniwiz-nativescript-masonkit-angular.d.ts +181 -0
- package/button/index.android.d.ts +2 -1
- package/button/index.ios.d.ts +2 -1
- package/button/index.windows.d.ts +2 -1
- package/common.d.ts +102 -1
- package/common.js +93 -2
- package/common.js.map +1 -1
- package/img/index.android.d.ts +2 -1
- package/img/index.ios.d.ts +2 -1
- package/img/index.windows.d.ts +2 -1
- package/index.d.ts +21 -10
- package/input/index.android.d.ts +5 -1
- package/input/index.ios.d.ts +7 -1
- package/input/index.windows.d.ts +6 -1
- package/package.json +3 -1
- package/platforms/android/masonkit-release.aar +0 -0
- package/platforms/ios/Mason.xcframework/Info.plist +2 -36
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/Mason-Swift.h +26 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Headers/mason_native.h +27 -2
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.abi.json +2630 -979
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.private.swiftinterface +37 -1
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios.swiftinterface +37 -1
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8457 -8378
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/Mason-Swift.h +52 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Headers/mason_native.h +27 -2
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.abi.json +2630 -979
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +37 -1
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-ios-simulator.swiftinterface +37 -1
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.abi.json +2630 -979
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +37 -1
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/Modules/Mason.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +37 -1
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/Mason.framework/_CodeSignature/CodeResources +28 -28
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +8452 -8373
- package/platforms/ios/Mason.xcframework/ios-arm64_x86_64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/x86_64/Mason.yml +8090 -8017
- package/platforms/windows/arm64/NativeScript.Mason.dll +0 -0
- package/platforms/windows/arm64/NativeScript.Mason.winmd +0 -0
- package/platforms/windows/x64/NativeScript.Mason.dll +0 -0
- package/platforms/windows/x64/NativeScript.Mason.winmd +0 -0
- package/properties.d.ts +4 -0
- package/properties.js +58 -15
- package/properties.js.map +1 -1
- package/style.d.ts +37 -37
- package/style.js +299 -110
- package/style.js.map +1 -1
- package/text/index.android.d.ts +3 -1
- package/text/index.ios.d.ts +3 -1
- package/text/index.windows.d.ts +2 -1
- package/textarea/index.android.d.ts +6 -2
- package/textarea/index.ios.d.ts +6 -2
- package/textarea/index.windows.d.ts +6 -2
- package/utils/index.android.d.ts +15 -6
- package/utils/index.android.js +83 -2
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.d.ts +15 -6
- package/utils/index.ios.js +83 -2
- package/utils/index.ios.js.map +1 -1
- package/utils/index.windows.d.ts +11 -2
- package/utils/index.windows.js +9 -0
- package/utils/index.windows.js.map +1 -1
- package/view/index.ios.js +14 -1
- package/view/index.ios.js.map +1 -1
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason-Swift.h +0 -1982
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/Mason.h +0 -25
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Headers/mason_native.h +0 -499
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.abi.json +0 -98937
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.private.swiftinterface +0 -3475
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros.swiftinterface +0 -3475
- package/platforms/ios/Mason.xcframework/xros-arm64/Mason.framework/Modules/module.modulemap +0 -10
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +0 -2134
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason-Swift.h +0 -1982
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/Mason.h +0 -25
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Headers/mason_native.h +0 -499
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Info.plist +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/Project/arm64-apple-xros-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.abi.json +0 -98937
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.private.swiftinterface +0 -3475
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftdoc +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/Mason.swiftmodule/arm64-apple-xros-simulator.swiftinterface +0 -3475
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/Modules/module.modulemap +0 -10
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/Mason.framework/_CodeSignature/CodeResources +0 -212
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Info.plist +0 -20
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/DWARF/Mason +0 -0
- package/platforms/ios/Mason.xcframework/xros-arm64-simulator/dSYMs/Mason.framework.dSYM/Contents/Resources/Relocations/aarch64/Mason.yml +0 -2134
package/DOCS.md
CHANGED
|
@@ -392,8 +392,8 @@ Length values support `px`, `%`, `dip`, and `auto` (for margins).
|
|
|
392
392
|
|
|
393
393
|
| Property | Type | Description |
|
|
394
394
|
|----------|------|-------------|
|
|
395
|
-
| `width` | `
|
|
396
|
-
| `height` | `
|
|
395
|
+
| `width` | `DimensionLength` | Element width |
|
|
396
|
+
| `height` | `DimensionLength` | Element height |
|
|
397
397
|
| `minWidth` | `LengthAuto` | Minimum width |
|
|
398
398
|
| `minHeight` | `LengthAuto` | Minimum height |
|
|
399
399
|
| `maxWidth` | `LengthAuto` | Maximum width |
|
|
@@ -492,7 +492,7 @@ If you want transforms to be driven from the native style buffer (Rust) and casc
|
|
|
492
492
|
|
|
493
493
|
**FlexDirection values:** `'row'` | `'column'` | `'row-reverse'` | `'column-reverse'`
|
|
494
494
|
|
|
495
|
-
**FlexWrap values:** `'no-wrap'` | `'wrap'` | `'wrap-reverse'`
|
|
495
|
+
**FlexWrap values:** `'no-wrap'` | `'wrap'` | `'wrap-reverse'` | `'balance'` | `'balance-reverse'`
|
|
496
496
|
|
|
497
497
|
**Alignment values:** `'normal'` | `'flex-start'` | `'flex-end'` | `'start'` | `'end'` | `'center'` | `'baseline'` | `'stretch'`
|
|
498
498
|
|
|
@@ -793,6 +793,18 @@ type Length =
|
|
|
793
793
|
type LengthAuto = Length | 'auto';
|
|
794
794
|
```
|
|
795
795
|
|
|
796
|
+
### DimensionLength
|
|
797
|
+
|
|
798
|
+
```typescript
|
|
799
|
+
type DimensionLength = LengthAuto
|
|
800
|
+
| 'min-content'
|
|
801
|
+
| 'max-content'
|
|
802
|
+
| 'fit-content'
|
|
803
|
+
| `fit-content(${string})`
|
|
804
|
+
| 'stretch'
|
|
805
|
+
| 'content';
|
|
806
|
+
```
|
|
807
|
+
|
|
796
808
|
### Display
|
|
797
809
|
|
|
798
810
|
```typescript
|
|
@@ -827,7 +839,7 @@ type FlexDirection = 'column' | 'row' | 'column-reverse' | 'row-reverse';
|
|
|
827
839
|
### FlexWrap
|
|
828
840
|
|
|
829
841
|
```typescript
|
|
830
|
-
type FlexWrap = 'no-wrap' | 'wrap' | 'wrap-reverse';
|
|
842
|
+
type FlexWrap = 'no-wrap' | 'wrap' | 'wrap-reverse' | 'balance' | 'balance-reverse';
|
|
831
843
|
```
|
|
832
844
|
|
|
833
845
|
### AlignItems / AlignSelf
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# @triniwiz/nativescript-masonkit/angular
|
|
2
|
+
|
|
3
|
+
Angular support for MasonKit. Registers every MasonKit element with
|
|
4
|
+
`@nativescript/angular`, and makes your Angular components lay out like they do
|
|
5
|
+
on the web.
|
|
6
|
+
|
|
7
|
+
## Setup
|
|
8
|
+
|
|
9
|
+
MasonKit ships this entry point, so there is nothing extra to install. Call
|
|
10
|
+
`installMasonKit()` in `main.ts`, before the bootstrap:
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
// main.ts
|
|
14
|
+
import { bootstrapApplication, provideNativeScriptRouter, runNativeScriptAngularApp } from '@nativescript/angular';
|
|
15
|
+
import { installMasonKit } from '@triniwiz/nativescript-masonkit/angular';
|
|
16
|
+
|
|
17
|
+
import { AppComponent } from './app.component';
|
|
18
|
+
import { routes } from './app.routes';
|
|
19
|
+
|
|
20
|
+
installMasonKit();
|
|
21
|
+
|
|
22
|
+
runNativeScriptAngularApp({
|
|
23
|
+
appModuleBootstrap: () =>
|
|
24
|
+
bootstrapApplication(AppComponent, {
|
|
25
|
+
providers: [provideNativeScriptRouter(routes)],
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
It must run before Angular bootstraps, so an `NgModule` import or an
|
|
31
|
+
`APP_INITIALIZER` is too late. Calling it again is safe.
|
|
32
|
+
|
|
33
|
+
Requires `@nativescript/angular` 19 or later. Works with both NgModule and
|
|
34
|
+
standalone apps.
|
|
35
|
+
|
|
36
|
+
## Using the elements
|
|
37
|
+
|
|
38
|
+
Everything is registered for you - no `registerElement` calls, no `imports`
|
|
39
|
+
entry. Add `NO_ERRORS_SCHEMA` to your component as you would for any
|
|
40
|
+
NativeScript element:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
@Component({
|
|
44
|
+
selector: 'app-story',
|
|
45
|
+
schemas: [NO_ERRORS_SCHEMA],
|
|
46
|
+
template: `
|
|
47
|
+
<div class="card">
|
|
48
|
+
<h3 class="title">{{ story.title }}</h3>
|
|
49
|
+
<span class="domain">{{ story.domain }}</span>
|
|
50
|
+
</div>
|
|
51
|
+
`,
|
|
52
|
+
})
|
|
53
|
+
export class StoryComponent {}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```scss
|
|
57
|
+
.card {
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: column;
|
|
60
|
+
gap: 4;
|
|
61
|
+
padding: 10;
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
> **Lengths:** use unitless values. In NativeScript `px` means _physical device
|
|
66
|
+
> pixels_, so `padding: 12px` lands at ~4 on a 3x screen. Unitless is the dip
|
|
67
|
+
> value, which is what matches a CSS pixel in a browser.
|
|
68
|
+
|
|
69
|
+
### Available elements
|
|
70
|
+
|
|
71
|
+
| From | Elements |
|
|
72
|
+
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| `@triniwiz/nativescript-masonkit` | `View`, `Text`, `Scroll`, `Img`, `Button`, `Input`, `TextArea`, `Br`, `Ul`, `Ol`, `Li` |
|
|
74
|
+
| `@triniwiz/nativescript-masonkit/web` | `div`, `section`, `header`, `footer`, `article`, `main`, `nav`, `aside`, `span`, `code`, `h1`-`h6`, `p`, `ul`, `li`, `blockquote`, `b`, `strong`, `a` |
|
|
75
|
+
|
|
76
|
+
Each name works in its original, lowercase and kebab-case spelling, so `<View>`,
|
|
77
|
+
`<view>` and `<text-area>` all resolve.
|
|
78
|
+
|
|
79
|
+
Note that these **replace** some core elements in Angular templates: `<Button>`,
|
|
80
|
+
`<img>` and `<Span>` resolve to MasonKit's versions rather than core's `Button`,
|
|
81
|
+
`Image` and `Span`. Turn off either set if you would rather keep the classic
|
|
82
|
+
widgets:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
installMasonKit({ web: false }); // MasonKit elements only
|
|
86
|
+
installMasonKit({ mason: false }); // HTML-shaped elements only
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Component hosts
|
|
90
|
+
|
|
91
|
+
By default, your component's own element is a real MasonKit box. That means
|
|
92
|
+
styling a component from the outside works the way it does on the web:
|
|
93
|
+
|
|
94
|
+
```html
|
|
95
|
+
<app-story class="card"></app-story>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```scss
|
|
99
|
+
app-story,
|
|
100
|
+
.card {
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
background-color: #fff;
|
|
104
|
+
border-radius: 8;
|
|
105
|
+
padding: 10;
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Without this, Angular component elements produce no native view at all, so
|
|
110
|
+
`class`, `backgroundColor`, `margin` and host bindings on them are silently
|
|
111
|
+
dropped and the component is invisible to layout. Nesting components then gives
|
|
112
|
+
you a layout that doesn't match your template.
|
|
113
|
+
|
|
114
|
+
Turn it off if you want stock `@nativescript/angular` behaviour and only the
|
|
115
|
+
element registrations:
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
installMasonKit({ componentHosts: false });
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Page-level components
|
|
122
|
+
|
|
123
|
+
Components that a router outlet loads are page roots - their template is an
|
|
124
|
+
`<ActionBar>` plus content that fills the `Page`. Those need to stay transparent,
|
|
125
|
+
and they are detected automatically, but detection can only correct things from
|
|
126
|
+
the second render onwards. List them to get the first render right too:
|
|
127
|
+
|
|
128
|
+
```ts
|
|
129
|
+
installMasonKit({
|
|
130
|
+
componentHosts: {
|
|
131
|
+
passthrough: ['app-feed', 'app-detail', /-page$/],
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Components _below_ a page root are unaffected and stay real MasonKit boxes.
|
|
137
|
+
|
|
138
|
+
## Options
|
|
139
|
+
|
|
140
|
+
`installMasonKit(options?)`
|
|
141
|
+
|
|
142
|
+
| Option | Type | Default | Description |
|
|
143
|
+
| ---------------- | --------------------------------- | ------- | --------------------------------------------- |
|
|
144
|
+
| `mason` | `boolean` | `true` | Register MasonKit's own elements |
|
|
145
|
+
| `web` | `boolean` | `true` | Register the HTML-shaped elements from `/web` |
|
|
146
|
+
| `componentHosts` | `boolean \| ComponentHostOptions` | `true` | Make component elements real MasonKit boxes |
|
|
147
|
+
|
|
148
|
+
`componentHosts` options
|
|
149
|
+
|
|
150
|
+
| Option | Type | Default | Description |
|
|
151
|
+
| ----------------------- | ---------------------- | ------- | ------------------------------------------------------------------------- |
|
|
152
|
+
| `enabled` | `boolean` | `true` | Turn host mode off, keeping element registration |
|
|
153
|
+
| `passthrough` | `PassthroughMatcher[]` | `[]` | Elements to keep transparent. Strings, regexes or predicates |
|
|
154
|
+
| `autoDetectPassthrough` | `boolean` | `true` | Recognise page roots automatically |
|
|
155
|
+
| `rootAsPassthrough` | `boolean` | `true` | Keep the app's root component transparent so the tree gets a sized parent |
|
|
156
|
+
|
|
157
|
+
Router outlets (`page-router-outlet`, `ns-empty-outlet`, `router-outlet`) are
|
|
158
|
+
always transparent; your `passthrough` entries are added to that list.
|
|
159
|
+
|
|
160
|
+
## API
|
|
161
|
+
|
|
162
|
+
| Export | Purpose |
|
|
163
|
+
| ------------------------------------- | ---------------------------------------------------------- |
|
|
164
|
+
| `installMasonKit(options?)` | The whole integration. Call before bootstrap |
|
|
165
|
+
| `registerMasonKitElements(options?)` | Element registration only |
|
|
166
|
+
| `enableMasonComponentHosts(options?)` | Component-host mode only |
|
|
167
|
+
| `masonMeta` | `ViewClassMeta` for registering your own MasonKit subclass |
|
|
168
|
+
|
|
169
|
+
Registering your own MasonKit subclass:
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import { registerElement } from '@nativescript/angular';
|
|
173
|
+
import { masonMeta } from '@triniwiz/nativescript-masonkit/angular';
|
|
174
|
+
|
|
175
|
+
registerElement('MyBox', () => MyBox, masonMeta);
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
`masonMeta` is what keeps Angular's view updates (`@if`, `@for`, router changes)
|
|
179
|
+
in step with MasonKit's own child tracking. Without it, children are appended
|
|
180
|
+
rather than inserted in position, and removals leave stale entries behind.
|
|
181
|
+
|
|
182
|
+
## Troubleshooting
|
|
183
|
+
|
|
184
|
+
**A routed screen shows only its ActionBar, everything else is blank.**
|
|
185
|
+
That component is a page root whose host box collapsed. Add its selector to
|
|
186
|
+
`passthrough`. Check the console - auto-detection logs the name.
|
|
187
|
+
|
|
188
|
+
**Everything looks cramped, but the text size is right.**
|
|
189
|
+
Lengths are in `px`. In NativeScript that means physical pixels. Drop the unit.
|
|
190
|
+
|
|
191
|
+
**A component's `class` or `backgroundColor` does nothing.**
|
|
192
|
+
Component host mode is off, or that element is in `passthrough`.
|
|
193
|
+
|
|
194
|
+
**`No known component for element X`.**
|
|
195
|
+
With host mode on this error can't occur - unknown names silently become boxes,
|
|
196
|
+
so a typo'd element renders as an empty box instead of throwing.
|
|
197
|
+
|
|
198
|
+
## See also
|
|
199
|
+
|
|
200
|
+
- [`apps/demo-angular`](../../../apps/demo-angular) - a small Hacker News client
|
|
201
|
+
plus a layout stress screen covering insertion order, conditional siblings and
|
|
202
|
+
nested hosts
|
|
203
|
+
- [`apps/hn-reference.html`](../../../apps/hn-reference.html) - the same screens
|
|
204
|
+
in a browser, for side-by-side comparison
|