nativescript-web-adapter 0.1.1
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/LICENSE +21 -0
- package/README.md +190 -0
- package/dist/core.cjs +3 -0
- package/dist/core.cjs.map +1 -0
- package/dist/core.js +2 -0
- package/dist/core.js.map +1 -0
- package/dist/index.cjs +240 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +229 -0
- package/dist/index.js.map +1 -0
- package/dist/types/core/index.d.ts +8 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/vue/components/ActionBar.d.ts +5 -0
- package/dist/types/vue/components/Button.d.ts +26 -0
- package/dist/types/vue/components/FlexboxLayout.d.ts +35 -0
- package/dist/types/vue/components/Frame.d.ts +3 -0
- package/dist/types/vue/components/GridLayout.d.ts +27 -0
- package/dist/types/vue/components/ImageCacheIt.d.ts +23 -0
- package/dist/types/vue/components/Label.d.ts +26 -0
- package/dist/types/vue/components/Page.d.ts +5 -0
- package/dist/types/vue/components/StackLayout.d.ts +5 -0
- package/dist/types/vue/index.d.ts +12 -0
- package/dist/types/vue.d.ts +169 -0
- package/dist/vue.cjs +240 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.js +229 -0
- package/dist/vue.js.map +1 -0
- package/package.json +59 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ponzS
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# NativeScript for Web
|
|
2
|
+
|
|
3
|
+
Read this in Chinese: [README_ZH.md](README_ZH.md)
|
|
4
|
+
|
|
5
|
+
Map common NativeScript UI tags to browser-ready Vue 3 components, enabling the same SFC to run on both Native and Web. Inspired by React Native for Web.
|
|
6
|
+
|
|
7
|
+
— Ideal for quickly previewing, debugging, or shipping a simplified web version of existing NativeScript Vue projects.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Same tag names: use `Page`, `ActionBar`, `GridLayout`, `Label`, `Button`, `ImageCacheIt` directly in SFCs.
|
|
12
|
+
- Prop and event mapping: common props/events are translated to DOM (e.g., `tap` → `click`).
|
|
13
|
+
- Lightweight implementation: focuses on frequently used layouts and controls.
|
|
14
|
+
- Pluggable: registered as a Vue plugin; no invasive app changes.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
Install the adapter from npm:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
npm install nativescript-web-adapter
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This package expects `vue` as a peer dependency. If not already present:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
npm install vue@^3.4.0
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quick Start (Web)
|
|
31
|
+
|
|
32
|
+
1) Register the plugin
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
// src/web/main.ts
|
|
36
|
+
import { createApp } from 'vue';
|
|
37
|
+
import { NativeScriptWebPlugin } from 'nativescript-web-adapter';
|
|
38
|
+
import Home from '@/components/Home.vue';
|
|
39
|
+
import '@/app.css';
|
|
40
|
+
|
|
41
|
+
const app = createApp(Home);
|
|
42
|
+
app.use(NativeScriptWebPlugin);
|
|
43
|
+
app.mount('#app');
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
2) Vite aliases (map NS deps to the adapter for browser)
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
// vite.web.config.ts
|
|
50
|
+
import { defineConfig } from 'vite';
|
|
51
|
+
import vue from '@vitejs/plugin-vue';
|
|
52
|
+
import path from 'path';
|
|
53
|
+
|
|
54
|
+
export default defineConfig({
|
|
55
|
+
plugins: [vue()],
|
|
56
|
+
resolve: {
|
|
57
|
+
alias: {
|
|
58
|
+
'@': path.resolve(__dirname, 'src'),
|
|
59
|
+
'~': path.resolve(__dirname, 'src'),
|
|
60
|
+
// map SFC imports of nativescript-vue to browser vue
|
|
61
|
+
'nativescript-vue': 'vue',
|
|
62
|
+
// map @nativescript/core types/APIs to adapter core (browser-only)
|
|
63
|
+
'@nativescript/core': 'nativescript-web-adapter/core'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
3) Start the dev server
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm run dev:web
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Usage Example
|
|
76
|
+
|
|
77
|
+
```vue
|
|
78
|
+
<template>
|
|
79
|
+
<Frame>
|
|
80
|
+
<Page class="bg-[#251353]">
|
|
81
|
+
<ActionBar>
|
|
82
|
+
<Label text="ViteConf 2025" class="font-bold text-lg" />
|
|
83
|
+
</ActionBar>
|
|
84
|
+
|
|
85
|
+
<GridLayout rows="auto,*">
|
|
86
|
+
<ImageCacheIt
|
|
87
|
+
src="https://example.com/cover.jpg"
|
|
88
|
+
stretch="aspectFill"
|
|
89
|
+
class="align-top"
|
|
90
|
+
style="width:100dvw"
|
|
91
|
+
/>
|
|
92
|
+
|
|
93
|
+
<GridLayout row="1" rows="*,auto,*" class="gradient-purple p-6">
|
|
94
|
+
<Label
|
|
95
|
+
class="text-xl align-middle text-center text-[#77c9fa] font-bold"
|
|
96
|
+
text="Hype Counter: 31485"
|
|
97
|
+
/>
|
|
98
|
+
|
|
99
|
+
<Button
|
|
100
|
+
row="1"
|
|
101
|
+
class="p-6 text-white font-bold border-4 border-[#77c9fa] rounded-lg text-xl gradient-light-purple"
|
|
102
|
+
horizontalAlignment="center"
|
|
103
|
+
>
|
|
104
|
+
Enter Now
|
|
105
|
+
</Button>
|
|
106
|
+
</GridLayout>
|
|
107
|
+
</GridLayout>
|
|
108
|
+
</Page>
|
|
109
|
+
</Frame>
|
|
110
|
+
</template>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Component Mapping
|
|
114
|
+
|
|
115
|
+
- `Page` → DOM `main`
|
|
116
|
+
- `ActionBar` → DOM `header`
|
|
117
|
+
- `Frame` → DOM `div`
|
|
118
|
+
- `Label` → DOM `span`
|
|
119
|
+
- `Button` → DOM `button`
|
|
120
|
+
- `StackLayout` → DOM `div` (`display:flex; flex-direction:column`)
|
|
121
|
+
- `FlexboxLayout` → DOM `div` (`display:flex`; supports `flexDirection`, `justifyContent`, `alignItems`)
|
|
122
|
+
- `GridLayout` → DOM `div` (`display:grid`; details below)
|
|
123
|
+
- `ImageCacheIt` → DOM `img` (simple replacement; uses `img` with `stretch` support)
|
|
124
|
+
|
|
125
|
+
## GridLayout: Design & Behavior
|
|
126
|
+
|
|
127
|
+
- Container styles
|
|
128
|
+
- `display: grid`
|
|
129
|
+
- `grid-template-columns`: defaults to single column `1fr` when `columns` is not provided
|
|
130
|
+
- `grid-template-rows`: parsed from `rows` (optional)
|
|
131
|
+
- `grid-auto-flow: row`: auto-stacks vertically by rows
|
|
132
|
+
- `width: 100%`, `height: 100%`
|
|
133
|
+
|
|
134
|
+
- Track parsing (`rows`/`columns`)
|
|
135
|
+
- Comma-separated: e.g., `"auto,*"`, `"*,auto,*"`
|
|
136
|
+
- `*` → `1fr`, `auto` → `auto`, numbers → pixels (e.g., `60` → `60px`)
|
|
137
|
+
- Example: `rows="auto,*"` → `grid-template-rows: auto 1fr`
|
|
138
|
+
|
|
139
|
+
- Child placement & span
|
|
140
|
+
- Indexing: NativeScript is 0-based; CSS Grid is 1-based. `row=0` → `grid-row-start:1`, `col=0` → `grid-column-start:1`
|
|
141
|
+
- Default column: if `col`/`column` is not set, we enforce `grid-column-start:1` to avoid implicit multi-column side-by-side layout
|
|
142
|
+
- Span: `rowSpan` → `grid-row-end: span n`; `colSpan` → `grid-column-end: span n`
|
|
143
|
+
|
|
144
|
+
- Alignment
|
|
145
|
+
- Horizontal: `horizontalAlignment` (`left|center|right|stretch`) → `justify-self`
|
|
146
|
+
- Vertical: `verticalAlignment` (`top|center|bottom|stretch`) → `align-self`
|
|
147
|
+
|
|
148
|
+
## Other Props & Events
|
|
149
|
+
|
|
150
|
+
- Events: `tap` → DOM `click` (the adapter emits `tap` on `onClick`)
|
|
151
|
+
- `Label` alignment: `horizontalAlignment="center"` → `text-align:center`
|
|
152
|
+
- `ImageCacheIt`:
|
|
153
|
+
- `stretch="aspectFill"` → `object-fit: cover`
|
|
154
|
+
- `stretch="aspectFit"` → `object-fit: contain`
|
|
155
|
+
- default styles: `width:100%`, `display:block`, `object-position:center`
|
|
156
|
+
|
|
157
|
+
## Layout Tips (Aligning Web with iOS)
|
|
158
|
+
|
|
159
|
+
- Make the outer `main` full viewport height: `main { height: 100vh; }` to match Grid remaining-space behavior.
|
|
160
|
+
- For full-width images: use `style="width:100dvw"` or container `width:100%`; ensure no implicit columns. Optionally set inner `GridLayout` `columns="1*"`.
|
|
161
|
+
- If children appear side-by-side: check if `columns` is declared or `col` is set; by default we fix to column 1.
|
|
162
|
+
|
|
163
|
+
## Compatibility & Limitations
|
|
164
|
+
|
|
165
|
+
- The adapter focuses on common UI/layout features; complex native measurements, animations, and platform APIs are out of scope for the browser.
|
|
166
|
+
- Visual differences (fonts, line height, shadows) exist between iOS/Android and browsers; tweak via Tailwind/CSS.
|
|
167
|
+
- Events follow the DOM model; certain native events are not applicable.
|
|
168
|
+
|
|
169
|
+
## Development & Build
|
|
170
|
+
|
|
171
|
+
- Build the adapter: `npm run build` (outputs `dist/index.js`, `dist/vue.js`, `dist/core.js` and types)
|
|
172
|
+
- Run tests: `npm run test`
|
|
173
|
+
- Demo project in this repo: `npm run dev:web` starts the browser preview.
|
|
174
|
+
|
|
175
|
+
## Package Structure (Adapter Subpackage)
|
|
176
|
+
|
|
177
|
+
- `src/vue/components/*`: implementation of UI components
|
|
178
|
+
- `src/vue/index.ts`: Vue plugin entry (registers all components)
|
|
179
|
+
- `src/core`: minimal types/placeholders for `@nativescript/core` in browser
|
|
180
|
+
- `dist/*`: build outputs and type declarations
|
|
181
|
+
|
|
182
|
+
## Design Rationale
|
|
183
|
+
|
|
184
|
+
- Keep NativeScript tag parity to reduce migration and dual-edge maintenance costs.
|
|
185
|
+
- Use standard web layout primitives (Flex/Grid) for debuggability and extensibility.
|
|
186
|
+
- Clear mapping rules: 0→1 index conversion, `*`/`auto`/px track parsing, and alignment/span mapping — minimal surprises.
|
|
187
|
+
|
|
188
|
+
## Feedback & Improvements
|
|
189
|
+
|
|
190
|
+
Try it in your projects and share feedback. If you need more components or refined behaviors (absolute positioning, interactions), add implementations under `src/vue/components` following the existing pattern, and submit a PR.
|
package/dist/core.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/core.js
ADDED
package/dist/core.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
|
|
5
|
+
const Label = vue.defineComponent({
|
|
6
|
+
name: 'NSLabel',
|
|
7
|
+
props: {
|
|
8
|
+
text: { type: String, default: '' },
|
|
9
|
+
horizontalAlignment: { type: String, default: undefined }
|
|
10
|
+
},
|
|
11
|
+
emits: ['tap'],
|
|
12
|
+
setup(props, { slots, attrs, emit }) {
|
|
13
|
+
var _a;
|
|
14
|
+
const style = {};
|
|
15
|
+
if (props.horizontalAlignment) {
|
|
16
|
+
const map = { center: 'center', left: 'left', right: 'right' };
|
|
17
|
+
style.textAlign = (_a = map[String(props.horizontalAlignment).toLowerCase()]) !== null && _a !== void 0 ? _a : undefined;
|
|
18
|
+
}
|
|
19
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
20
|
+
return () => vue.h('span', { style, onClick, ...attrs }, slots.default ? slots.default() : props.text);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const Button = vue.defineComponent({
|
|
25
|
+
name: 'NSButton',
|
|
26
|
+
props: {
|
|
27
|
+
text: { type: String, default: '' },
|
|
28
|
+
horizontalAlignment: { type: String, default: undefined }
|
|
29
|
+
},
|
|
30
|
+
emits: ['tap'],
|
|
31
|
+
setup(props, { emit, slots, attrs }) {
|
|
32
|
+
var _a;
|
|
33
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
34
|
+
const style = {};
|
|
35
|
+
if (props.horizontalAlignment) {
|
|
36
|
+
const map = {
|
|
37
|
+
center: 'center',
|
|
38
|
+
left: 'start',
|
|
39
|
+
right: 'end',
|
|
40
|
+
stretch: 'stretch'
|
|
41
|
+
};
|
|
42
|
+
style.justifySelf = (_a = map[String(props.horizontalAlignment).toLowerCase()]) !== null && _a !== void 0 ? _a : undefined;
|
|
43
|
+
}
|
|
44
|
+
return () => vue.h('button', { onClick, style, ...attrs }, slots.default ? slots.default() : props.text);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const StackLayout = vue.defineComponent({
|
|
49
|
+
name: 'NSStackLayout',
|
|
50
|
+
emits: ['tap'],
|
|
51
|
+
setup(_, { slots, attrs, emit }) {
|
|
52
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
53
|
+
return () => { var _a; return vue.h('div', { style: { display: 'flex', flexDirection: 'column' }, onClick, ...attrs }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const FlexboxLayout = vue.defineComponent({
|
|
58
|
+
name: 'NSFlexboxLayout',
|
|
59
|
+
props: {
|
|
60
|
+
flexDirection: { type: String, default: 'row' },
|
|
61
|
+
justifyContent: { type: String, default: 'flex-start' },
|
|
62
|
+
alignItems: { type: String, default: 'stretch' }
|
|
63
|
+
},
|
|
64
|
+
emits: ['tap'],
|
|
65
|
+
setup(props, { slots, attrs, emit }) {
|
|
66
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
67
|
+
return () => { var _a; return vue.h('div', { style: { display: 'flex', flexDirection: props.flexDirection, justifyContent: props.justifyContent, alignItems: props.alignItems }, onClick, ...attrs }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
function parseTracks(tracks) {
|
|
72
|
+
if (!tracks)
|
|
73
|
+
return undefined;
|
|
74
|
+
return tracks.split(',').map(s => s.trim()).map(t => {
|
|
75
|
+
if (t === '*' || t === 'auto')
|
|
76
|
+
return t === '*' ? '1fr' : 'auto';
|
|
77
|
+
if (/^\d+$/.test(t))
|
|
78
|
+
return `${t}px`;
|
|
79
|
+
return t;
|
|
80
|
+
}).join(' ');
|
|
81
|
+
}
|
|
82
|
+
const GridLayout = vue.defineComponent({
|
|
83
|
+
name: 'NSGridLayout',
|
|
84
|
+
props: {
|
|
85
|
+
rows: { type: String, default: undefined },
|
|
86
|
+
columns: { type: String, default: undefined }
|
|
87
|
+
},
|
|
88
|
+
emits: ['tap'],
|
|
89
|
+
setup(props, { slots, attrs, emit }) {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
const containerStyle = {
|
|
92
|
+
display: 'grid',
|
|
93
|
+
// NS 默认一列:确保子项按行堆叠,而不是同一行多列并排
|
|
94
|
+
gridTemplateColumns: (_a = parseTracks(props.columns)) !== null && _a !== void 0 ? _a : '1fr',
|
|
95
|
+
// 行可选;若未指定,默认自适应内容
|
|
96
|
+
gridTemplateRows: (_b = parseTracks(props.rows)) !== null && _b !== void 0 ? _b : undefined,
|
|
97
|
+
// 以“按行”自动布局,默认逐行堆叠
|
|
98
|
+
gridAutoFlow: 'row',
|
|
99
|
+
width: '100%',
|
|
100
|
+
height: '100%'
|
|
101
|
+
};
|
|
102
|
+
const mapChild = (child) => {
|
|
103
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
104
|
+
if (!vue.isVNode(child))
|
|
105
|
+
return child;
|
|
106
|
+
const cprops = { ...(child.props || {}) };
|
|
107
|
+
const style = { ...(cprops.style || {}) };
|
|
108
|
+
// Row/Column placement: NativeScript uses 0-based indices; CSS Grid is 1-based
|
|
109
|
+
const row = (_a = cprops.row) !== null && _a !== void 0 ? _a : cprops['row'];
|
|
110
|
+
const col = (_c = (_b = cprops.col) !== null && _b !== void 0 ? _b : cprops['col']) !== null && _c !== void 0 ? _c : cprops.column;
|
|
111
|
+
if (row != null) {
|
|
112
|
+
const r = Number(row);
|
|
113
|
+
if (!isNaN(r))
|
|
114
|
+
style.gridRowStart = r + 1;
|
|
115
|
+
}
|
|
116
|
+
if (col != null) {
|
|
117
|
+
const c = Number(col);
|
|
118
|
+
if (!isNaN(c))
|
|
119
|
+
style.gridColumnStart = c + 1;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// 未声明列时,强制放在第 1 列,避免隐式多列导致并排
|
|
123
|
+
style.gridColumnStart = 1;
|
|
124
|
+
}
|
|
125
|
+
// Horizontal alignment mapping
|
|
126
|
+
const ha = (_d = cprops.horizontalAlignment) !== null && _d !== void 0 ? _d : cprops['horizontalAlignment'];
|
|
127
|
+
if (ha) {
|
|
128
|
+
const map = {
|
|
129
|
+
center: 'center',
|
|
130
|
+
left: 'start',
|
|
131
|
+
right: 'end',
|
|
132
|
+
stretch: 'stretch'
|
|
133
|
+
};
|
|
134
|
+
style.justifySelf = (_e = map[String(ha).toLowerCase()]) !== null && _e !== void 0 ? _e : style.justifySelf;
|
|
135
|
+
}
|
|
136
|
+
// Vertical alignment mapping
|
|
137
|
+
const va = (_f = cprops.verticalAlignment) !== null && _f !== void 0 ? _f : cprops['verticalAlignment'];
|
|
138
|
+
if (va) {
|
|
139
|
+
const map = {
|
|
140
|
+
center: 'center',
|
|
141
|
+
top: 'start',
|
|
142
|
+
bottom: 'end',
|
|
143
|
+
stretch: 'stretch'
|
|
144
|
+
};
|
|
145
|
+
style.alignSelf = (_g = map[String(va).toLowerCase()]) !== null && _g !== void 0 ? _g : style.alignSelf;
|
|
146
|
+
}
|
|
147
|
+
// Row/Column span mapping
|
|
148
|
+
const rowSpan = (_h = cprops.rowSpan) !== null && _h !== void 0 ? _h : cprops['rowSpan'];
|
|
149
|
+
if (rowSpan != null) {
|
|
150
|
+
const rs = Number(rowSpan);
|
|
151
|
+
if (!isNaN(rs) && rs > 1)
|
|
152
|
+
style.gridRowEnd = `span ${rs}`;
|
|
153
|
+
}
|
|
154
|
+
const colSpan = (_j = cprops.colSpan) !== null && _j !== void 0 ? _j : cprops['colSpan'];
|
|
155
|
+
if (colSpan != null) {
|
|
156
|
+
const cs = Number(colSpan);
|
|
157
|
+
if (!isNaN(cs) && cs > 1)
|
|
158
|
+
style.gridColumnEnd = `span ${cs}`;
|
|
159
|
+
}
|
|
160
|
+
cprops.style = style;
|
|
161
|
+
return vue.h(child.type, cprops, child.children);
|
|
162
|
+
};
|
|
163
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
164
|
+
return () => {
|
|
165
|
+
var _a, _b;
|
|
166
|
+
const children = (_b = (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)) !== null && _b !== void 0 ? _b : [];
|
|
167
|
+
const mapped = children.map(mapChild);
|
|
168
|
+
return vue.h('div', { style: containerStyle, onClick, ...attrs }, mapped);
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
const Page = vue.defineComponent({
|
|
174
|
+
name: 'NSPage',
|
|
175
|
+
emits: ['tap'],
|
|
176
|
+
setup(_, { slots, attrs, emit }) {
|
|
177
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
178
|
+
return () => { var _a; return vue.h('main', { onClick, ...attrs }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const Frame = vue.defineComponent({
|
|
183
|
+
name: 'NSFrame',
|
|
184
|
+
setup(_, { slots, attrs }) {
|
|
185
|
+
return () => { var _a; return vue.h('div', { ...attrs }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
const ActionBar = vue.defineComponent({
|
|
190
|
+
name: 'NSActionBar',
|
|
191
|
+
emits: ['tap'],
|
|
192
|
+
setup(_, { slots, attrs, emit }) {
|
|
193
|
+
const onClick = (e) => emit('tap', { eventName: 'tap', object: e.currentTarget });
|
|
194
|
+
return () => { var _a; return vue.h('header', { onClick, ...attrs }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots)); };
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
const ImageCacheIt = vue.defineComponent({
|
|
199
|
+
name: 'ImageCacheIt',
|
|
200
|
+
props: {
|
|
201
|
+
src: { type: String, required: true },
|
|
202
|
+
stretch: { type: String, default: 'aspectFill' }
|
|
203
|
+
},
|
|
204
|
+
setup(props, { attrs }) {
|
|
205
|
+
const style = { width: '100%', display: 'block', objectPosition: 'center' };
|
|
206
|
+
if (props.stretch === 'aspectFill') {
|
|
207
|
+
style.objectFit = 'cover';
|
|
208
|
+
}
|
|
209
|
+
else if (props.stretch === 'aspectFit') {
|
|
210
|
+
style.objectFit = 'contain';
|
|
211
|
+
}
|
|
212
|
+
return () => vue.h('img', { src: props.src, style, ...attrs });
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
const NativeScriptWebPlugin = {
|
|
217
|
+
install(app) {
|
|
218
|
+
app.component('Label', Label);
|
|
219
|
+
app.component('Button', Button);
|
|
220
|
+
app.component('StackLayout', StackLayout);
|
|
221
|
+
app.component('FlexboxLayout', FlexboxLayout);
|
|
222
|
+
app.component('GridLayout', GridLayout);
|
|
223
|
+
app.component('Page', Page);
|
|
224
|
+
app.component('Frame', Frame);
|
|
225
|
+
app.component('ActionBar', ActionBar);
|
|
226
|
+
app.component('ImageCacheIt', ImageCacheIt);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
exports.ActionBar = ActionBar;
|
|
231
|
+
exports.Button = Button;
|
|
232
|
+
exports.FlexboxLayout = FlexboxLayout;
|
|
233
|
+
exports.Frame = Frame;
|
|
234
|
+
exports.GridLayout = GridLayout;
|
|
235
|
+
exports.ImageCacheIt = ImageCacheIt;
|
|
236
|
+
exports.Label = Label;
|
|
237
|
+
exports.NativeScriptWebPlugin = NativeScriptWebPlugin;
|
|
238
|
+
exports.Page = Page;
|
|
239
|
+
exports.StackLayout = StackLayout;
|
|
240
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/vue/components/Label.ts","../../src/vue/components/Button.ts","../../src/vue/components/StackLayout.ts","../../src/vue/components/FlexboxLayout.ts","../../src/vue/components/GridLayout.ts","../../src/vue/components/Page.ts","../../src/vue/components/Frame.ts","../../src/vue/components/ActionBar.ts","../../src/vue/components/ImageCacheIt.ts","../../src/vue/index.ts"],"sourcesContent":["import { defineComponent, h } from 'vue';\n\nexport const Label = defineComponent({\n name: 'NSLabel',\n props: {\n text: { type: String, default: '' },\n horizontalAlignment: { type: String, default: undefined }\n },\n emits: ['tap'],\n setup(props, { slots, attrs, emit }) {\n const style: Record<string, any> = {};\n if (props.horizontalAlignment) {\n const map: Record<string, string> = { center: 'center', left: 'left', right: 'right' };\n style.textAlign = map[String(props.horizontalAlignment).toLowerCase()] ?? undefined;\n }\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n return () => h('span', { style, onClick, ...attrs }, slots.default ? slots.default() : props.text);\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const Button = defineComponent({\n name: 'NSButton',\n props: {\n text: { type: String, default: '' },\n horizontalAlignment: { type: String, default: undefined }\n },\n emits: ['tap'],\n setup(props, { emit, slots, attrs }) {\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n const style: Record<string, any> = {};\n if (props.horizontalAlignment) {\n const map: Record<string, string> = {\n center: 'center',\n left: 'start',\n right: 'end',\n stretch: 'stretch'\n };\n style.justifySelf = map[String(props.horizontalAlignment).toLowerCase()] ?? undefined;\n }\n return () => h('button', { onClick, style, ...attrs }, slots.default ? slots.default() : props.text);\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const StackLayout = defineComponent({\n name: 'NSStackLayout',\n emits: ['tap'],\n setup(_, { slots, attrs, emit }) {\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n return () => h('div', { style: { display: 'flex', flexDirection: 'column' }, onClick, ...attrs }, slots.default?.());\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const FlexboxLayout = defineComponent({\n name: 'NSFlexboxLayout',\n props: {\n flexDirection: { type: String, default: 'row' },\n justifyContent: { type: String, default: 'flex-start' },\n alignItems: { type: String, default: 'stretch' }\n },\n emits: ['tap'],\n setup(props, { slots, attrs, emit }) {\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n return () => h('div', { style: { display: 'flex', flexDirection: props.flexDirection, justifyContent: props.justifyContent, alignItems: props.alignItems }, onClick, ...attrs }, slots.default?.());\n }\n});","import { defineComponent, h, VNode, isVNode } from 'vue';\n\nfunction parseTracks(tracks?: string) {\n if (!tracks) return undefined;\n return tracks.split(',').map(s => s.trim()).map(t => {\n if (t === '*' || t === 'auto') return t === '*' ? '1fr' : 'auto';\n if (/^\\d+$/.test(t)) return `${t}px`;\n return t;\n }).join(' ');\n}\n\nexport const GridLayout = defineComponent({\n name: 'NSGridLayout',\n props: {\n rows: { type: String, default: undefined },\n columns: { type: String, default: undefined }\n },\n emits: ['tap'],\n setup(props, { slots, attrs, emit }) {\n const containerStyle: Record<string, any> = {\n display: 'grid',\n // NS 默认一列:确保子项按行堆叠,而不是同一行多列并排\n gridTemplateColumns: parseTracks(props.columns) ?? '1fr',\n // 行可选;若未指定,默认自适应内容\n gridTemplateRows: parseTracks(props.rows) ?? undefined,\n // 以“按行”自动布局,默认逐行堆叠\n gridAutoFlow: 'row',\n width: '100%',\n height: '100%'\n };\n const mapChild = (child: VNode): VNode => {\n if (!isVNode(child)) return child as any;\n const cprops: any = { ...(child.props || {}) };\n const style: Record<string, any> = { ...(cprops.style || {}) };\n\n // Row/Column placement: NativeScript uses 0-based indices; CSS Grid is 1-based\n const row = cprops.row ?? cprops['row'];\n const col = cprops.col ?? cprops['col'] ?? cprops.column;\n if (row != null) {\n const r = Number(row);\n if (!isNaN(r)) style.gridRowStart = r + 1;\n }\n if (col != null) {\n const c = Number(col);\n if (!isNaN(c)) style.gridColumnStart = c + 1;\n } else {\n // 未声明列时,强制放在第 1 列,避免隐式多列导致并排\n style.gridColumnStart = 1;\n }\n\n // Horizontal alignment mapping\n const ha = cprops.horizontalAlignment ?? cprops['horizontalAlignment'];\n if (ha) {\n const map: Record<string, string> = {\n center: 'center',\n left: 'start',\n right: 'end',\n stretch: 'stretch'\n };\n style.justifySelf = map[String(ha).toLowerCase()] ?? style.justifySelf;\n }\n\n // Vertical alignment mapping\n const va = cprops.verticalAlignment ?? cprops['verticalAlignment'];\n if (va) {\n const map: Record<string, string> = {\n center: 'center',\n top: 'start',\n bottom: 'end',\n stretch: 'stretch'\n };\n style.alignSelf = map[String(va).toLowerCase()] ?? style.alignSelf;\n }\n\n // Row/Column span mapping\n const rowSpan = cprops.rowSpan ?? cprops['rowSpan'];\n if (rowSpan != null) {\n const rs = Number(rowSpan);\n if (!isNaN(rs) && rs > 1) style.gridRowEnd = `span ${rs}`;\n }\n const colSpan = cprops.colSpan ?? cprops['colSpan'];\n if (colSpan != null) {\n const cs = Number(colSpan);\n if (!isNaN(cs) && cs > 1) style.gridColumnEnd = `span ${cs}`;\n }\n\n cprops.style = style;\n return h(child.type as any, cprops, child.children as any);\n };\n\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n return () => {\n const children = slots.default?.() ?? [];\n const mapped = children.map(mapChild);\n return h('div', { style: containerStyle, onClick, ...attrs }, mapped);\n };\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const Page = defineComponent({\n name: 'NSPage',\n emits: ['tap'],\n setup(_, { slots, attrs, emit }) {\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n return () => h('main', { onClick, ...attrs }, slots.default?.());\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const Frame = defineComponent({\n name: 'NSFrame',\n setup(_, { slots, attrs }) {\n return () => h('div', { ...attrs }, slots.default?.());\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const ActionBar = defineComponent({\n name: 'NSActionBar',\n emits: ['tap'],\n setup(_, { slots, attrs, emit }) {\n const onClick = (e: MouseEvent) => emit('tap', { eventName: 'tap', object: e.currentTarget });\n return () => h('header', { onClick, ...attrs }, slots.default?.());\n }\n});","import { defineComponent, h } from 'vue';\n\nexport const ImageCacheIt = defineComponent({\n name: 'ImageCacheIt',\n props: {\n src: { type: String, required: true },\n stretch: { type: String, default: 'aspectFill' }\n },\n setup(props, { attrs }) {\n const style: Record<string, any> = { width: '100%', display: 'block', objectPosition: 'center' };\n if (props.stretch === 'aspectFill') {\n style.objectFit = 'cover';\n } else if (props.stretch === 'aspectFit') {\n style.objectFit = 'contain';\n }\n return () => h('img', { src: props.src, style, ...attrs });\n }\n});","import type { App, Plugin } from 'vue';\nimport { Label } from './components/Label';\nimport { Button } from './components/Button';\nimport { StackLayout } from './components/StackLayout';\nimport { FlexboxLayout } from './components/FlexboxLayout';\nimport { GridLayout } from './components/GridLayout';\nimport { Page } from './components/Page';\nimport { Frame } from './components/Frame';\nimport { ActionBar } from './components/ActionBar';\nimport { ImageCacheIt } from './components/ImageCacheIt';\n\nexport const NativeScriptWebPlugin: Plugin = {\n install(app: App) {\n app.component('Label', Label);\n app.component('Button', Button);\n app.component('StackLayout', StackLayout);\n app.component('FlexboxLayout', FlexboxLayout);\n app.component('GridLayout', GridLayout);\n app.component('Page', Page);\n app.component('Frame', Frame);\n app.component('ActionBar', ActionBar);\n app.component('ImageCacheIt', ImageCacheIt);\n }\n};\n\nexport { Label, Button, StackLayout, FlexboxLayout, GridLayout, Page, Frame, ActionBar, ImageCacheIt };"],"names":["defineComponent","h","isVNode"],"mappings":";;;;AAEO,MAAM,KAAK,GAAGA,mBAAe,CAAC;AACnC,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,IAAI,EAAE,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