@getcortexlabs/create-mavis 0.1.0-rc.11.1 → 0.1.0-rc.12
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/README.md +4 -4
- package/package.json +1 -1
- package/src/add-target.mjs +0 -11
- package/src/presets.mjs +2 -2
- package/src/scaffold.mjs +9 -0
- package/src/shared-api.mjs +57 -11
- package/templates/nuxt/nuxt.config.ts +11 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ pnpm install
|
|
|
21
21
|
pnpm run dev
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
The wizard, package-manager selection and both examples are included in RC.
|
|
24
|
+
The wizard, package-manager selection and both examples are included in RC.12.
|
|
25
25
|
|
|
26
26
|
- `--dry-run` prints the file plan without writing or installing.
|
|
27
27
|
- Existing directories are never merged or overwritten.
|
|
@@ -31,7 +31,7 @@ The wizard, package-manager selection and both examples are included in RC.11.1.
|
|
|
31
31
|
|
|
32
32
|
Node.js 22.16+ is required. Native projects also need the NativeScript CLI and the platform SDK. iOS requires macOS and Xcode. A shared project keeps native dependencies separate from its Web workspace so each renderer loads the correct Vue runtime.
|
|
33
33
|
|
|
34
|
-
Templates pin **Mavis 0.1.0-rc.
|
|
34
|
+
Templates pin **Mavis 0.1.0-rc.12** and **Jolt 0.1.0-rc.11.1**. The CLI and its generated projects use the same Mavis release. Commit the generated lockfile (both lockfiles for a shared project).
|
|
35
35
|
|
|
36
36
|
pnpm requires **10.26+**. Its generated workspace files keep the mobile installation separate, use a hoisted layout for Vite deduplication, shared imports and NativeScript, and allow only the starter's required dependency build scripts. Yarn Classic and modern Yarn use `node_modules`; initial empty `yarn.lock` files mark separate projects before installation. The starter declares its dependency build scripts explicitly; other package-manager policies remain in effect. If modern Yarn reports a fresh dependency as quarantined, retry after its configured minimum package age. Do not add `apps/mobile` to the Web workspace.
|
|
37
37
|
|
|
@@ -45,6 +45,6 @@ MIT · [Mavis UI](https://github.com/getcortexlabs/mavis-ui)
|
|
|
45
45
|
|
|
46
46
|
`--check-portability` reports platform dependencies with locations. `--fix-imports` previews safe named-import changes to `#mavis`; add `--write` to apply. `--path` selects a source directory and `--json` emits structured diagnostics. `--doctor` also runs this source audit. Unknown dependencies, HTML/CSS and device services still require review and target tests.
|
|
47
47
|
|
|
48
|
-
## Add a host to an existing Mavis application (RC.
|
|
48
|
+
## Add a host to an existing Mavis application (RC.12)
|
|
49
49
|
|
|
50
|
-
Run `create-mavis --add-native` in a Vue + Vite/Nuxt package, or `create-mavis --add-web [--web nuxt]` in a NativeScript-Vue package. Use `--dry-run` to inspect the plan and `--screen path/to/Screen.vue` to reuse an existing screen without moving it. The command creates an isolated host under `apps`, adds root launch/install scripts and preserves existing source/configuration/lockfiles. Dependencies install only with `--install`; npm, pnpm and Yarn are supported. Conflicts and unsupported workspaces/version baselines are reported before writing. The selected screen's services, aliases and router remain application-owned; portability diagnostics are not automatic conversion. Upgrade the existing Mavis renderer to RC.
|
|
50
|
+
Run `create-mavis --add-native` in a Vue + Vite/Nuxt package, or `create-mavis --add-web [--web nuxt]` in a NativeScript-Vue package. Use `--dry-run` to inspect the plan and `--screen path/to/Screen.vue` to reuse an existing screen without moving it. The command creates an isolated host under `apps`, adds root launch/install scripts and preserves existing source/configuration/lockfiles. Dependencies install only with `--install`; npm, pnpm and Yarn are supported. Conflicts and unsupported workspaces/version baselines are reported before writing. The selected screen's services, aliases and router remain application-owned; portability diagnostics are not automatic conversion. Upgrade the existing Mavis renderer to RC.12 before adding a host.
|
package/package.json
CHANGED
package/src/add-target.mjs
CHANGED
|
@@ -168,17 +168,6 @@ export async function planTarget(options, cwd = process.cwd()) {
|
|
|
168
168
|
file,
|
|
169
169
|
files.get(file).replace("dedupe: ['vue'", "dedupe: ['@getcortexlabs/mavis-core', 'vue'"),
|
|
170
170
|
)
|
|
171
|
-
} else {
|
|
172
|
-
const file = 'nuxt.config.ts'
|
|
173
|
-
files.set(
|
|
174
|
-
file,
|
|
175
|
-
files
|
|
176
|
-
.get(file)
|
|
177
|
-
.replace(
|
|
178
|
-
' devtools:',
|
|
179
|
-
" vite: { resolve: { dedupe: ['vue', '@vue/runtime-core', '@vue/reactivity', '@vue/shared', '@getcortexlabs/mavis-core'] } },\n devtools:",
|
|
180
|
-
),
|
|
181
|
-
)
|
|
182
171
|
}
|
|
183
172
|
const scripts = native
|
|
184
173
|
? {
|
package/src/presets.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { packageManagers } from './package-manager.mjs'
|
|
|
2
2
|
|
|
3
3
|
/** Baseline pins; coordinated releases update Mavis after validating source templates with matching tarballs. */
|
|
4
4
|
export const versions = Object.freeze({
|
|
5
|
-
mavis: '0.1.0-rc.
|
|
6
|
-
jolt: '0.1.0-rc.11',
|
|
5
|
+
mavis: '0.1.0-rc.12',
|
|
6
|
+
jolt: '0.1.0-rc.11.1',
|
|
7
7
|
vue: '3.5.44',
|
|
8
8
|
nuxt: '4.6.3',
|
|
9
9
|
vite: '6.4.5',
|
package/src/scaffold.mjs
CHANGED
|
@@ -29,6 +29,12 @@ export async function projectFiles(options) {
|
|
|
29
29
|
const shared = preset.target === 'both'
|
|
30
30
|
const directory = preset.example === 'directory'
|
|
31
31
|
const commands = packageCommands(preset.packageManager)
|
|
32
|
+
// Yarn can otherwise resolve Nuxt's Vue range to a second, newer copy.
|
|
33
|
+
// Keep the Web app and Nuxt on one render context and compatible App types.
|
|
34
|
+
const yarnVue =
|
|
35
|
+
preset.packageManager === 'yarn'
|
|
36
|
+
? { resolutions: { vue: v.vue, '@vue/runtime-core': v.vue } }
|
|
37
|
+
: {}
|
|
32
38
|
const buildPolicy = (native) => ({
|
|
33
39
|
esbuild: true,
|
|
34
40
|
...(native
|
|
@@ -86,12 +92,14 @@ export async function projectFiles(options) {
|
|
|
86
92
|
...common,
|
|
87
93
|
name: `${preset.name}${shared ? '-web' : ''}`,
|
|
88
94
|
...yarnBuilds(false),
|
|
95
|
+
...(!shared ? yarnVue : {}),
|
|
89
96
|
type: 'module',
|
|
90
97
|
scripts,
|
|
91
98
|
dependencies: {
|
|
92
99
|
...dependencies,
|
|
93
100
|
'@getcortexlabs/mavis-web': v.mavis,
|
|
94
101
|
vue: v.vue,
|
|
102
|
+
'@vue/runtime-core': v.vue,
|
|
95
103
|
...(directory && preset.web === 'vite' ? { 'vue-router': v.router } : {}),
|
|
96
104
|
...(preset.web === 'nuxt' ? { nuxt: v.nuxt } : {}),
|
|
97
105
|
},
|
|
@@ -151,6 +159,7 @@ export async function projectFiles(options) {
|
|
|
151
159
|
...common,
|
|
152
160
|
name: preset.name,
|
|
153
161
|
...yarnBuilds(false),
|
|
162
|
+
...yarnVue,
|
|
154
163
|
...(preset.packageManager !== 'pnpm' ? { workspaces: ['apps/web'] } : {}),
|
|
155
164
|
scripts: {
|
|
156
165
|
'dev:web': commands.run('dev', 'apps/web'),
|
package/src/shared-api.mjs
CHANGED
|
@@ -1,40 +1,68 @@
|
|
|
1
1
|
/** Shared renderer exports, also used by the conservative import migration. */
|
|
2
2
|
export const components = [
|
|
3
|
-
'
|
|
4
|
-
'
|
|
3
|
+
'MKanban',
|
|
4
|
+
'MDonutChart',
|
|
5
|
+
'MSparkline',
|
|
6
|
+
'MGradientBackground',
|
|
7
|
+
'MParticleField',
|
|
8
|
+
'MConfetti',
|
|
9
|
+
'MColorPicker',
|
|
10
|
+
'MSwipeDeck',
|
|
11
|
+
'MGauge',
|
|
12
|
+
'MTour',
|
|
13
|
+
'MTourTarget',
|
|
14
|
+
'MTransferList',
|
|
15
|
+
'MMarquee',
|
|
16
|
+
'MCollapsibleHeader',
|
|
17
|
+
'MRefreshControl',
|
|
18
|
+
'MComposer',
|
|
19
|
+
'MSpeedDial',
|
|
20
|
+
'MPinInput',
|
|
21
|
+
'MAnimatedText',
|
|
22
|
+
|
|
23
|
+
'MSortableList',
|
|
24
|
+
'MSwipeActions',
|
|
25
|
+
'MNumberFlow',
|
|
26
|
+
'MResizablePanels',
|
|
27
|
+
'MImageCompare',
|
|
28
|
+
'MImageViewer',
|
|
29
|
+
|
|
5
30
|
'MScreen',
|
|
6
|
-
'MBox',
|
|
7
31
|
'MRow',
|
|
8
32
|
'MColumn',
|
|
9
33
|
'MStack',
|
|
10
34
|
'MGrid',
|
|
11
35
|
'MLink',
|
|
36
|
+
'MBox',
|
|
12
37
|
'MCard',
|
|
13
38
|
'MText',
|
|
39
|
+
'MSpan',
|
|
40
|
+
'MThemeProvider',
|
|
41
|
+
'MPlatform',
|
|
42
|
+
'MIcon',
|
|
14
43
|
'MButton',
|
|
44
|
+
'MInput',
|
|
15
45
|
'MSlider',
|
|
16
46
|
'MSwitch',
|
|
17
47
|
'MCheckbox',
|
|
18
48
|
'MRadioGroup',
|
|
19
49
|
'MSelect',
|
|
20
|
-
'
|
|
50
|
+
'MSheet',
|
|
21
51
|
'MDialog',
|
|
52
|
+
'MToast',
|
|
22
53
|
'MTabs',
|
|
23
|
-
'MSkeleton',
|
|
24
54
|
'MChip',
|
|
25
55
|
'MEmptyState',
|
|
26
|
-
'MProgress',
|
|
27
56
|
'MAccordion',
|
|
28
57
|
'MSegmentedControl',
|
|
58
|
+
'MSkeleton',
|
|
59
|
+
'MProgress',
|
|
29
60
|
'MAlert',
|
|
30
|
-
'MListItem',
|
|
31
|
-
'MSeparator',
|
|
32
61
|
'MAvatar',
|
|
33
62
|
'MBadge',
|
|
34
|
-
'
|
|
35
|
-
'
|
|
63
|
+
'MListItem',
|
|
64
|
+
'MSeparator',
|
|
36
65
|
'MReveal',
|
|
37
|
-
'MSheet',
|
|
38
66
|
'MDatePicker',
|
|
39
67
|
'MDateRangePicker',
|
|
40
68
|
'MNumberInput',
|
|
@@ -46,6 +74,24 @@ export const components = [
|
|
|
46
74
|
'MFormErrors',
|
|
47
75
|
'MSteps',
|
|
48
76
|
'MPagination',
|
|
77
|
+
'MPopover',
|
|
78
|
+
'MMenu',
|
|
79
|
+
'MAppBar',
|
|
80
|
+
'MTabBar',
|
|
81
|
+
'MTimePicker',
|
|
82
|
+
'MVirtualList',
|
|
83
|
+
'MDataTable',
|
|
84
|
+
'MCarousel',
|
|
85
|
+
'MRangeSlider',
|
|
86
|
+
'MCalendar',
|
|
87
|
+
'MRating',
|
|
88
|
+
'MTreeView',
|
|
89
|
+
'MCommandPalette',
|
|
90
|
+
'MNavigationRail',
|
|
91
|
+
'MBreadcrumb',
|
|
92
|
+
'MTooltip',
|
|
93
|
+
'MTimeline',
|
|
94
|
+
'MChart',
|
|
49
95
|
]
|
|
50
96
|
export const composables = [
|
|
51
97
|
'useMavisTheme',
|
|
@@ -5,6 +5,17 @@ export default defineNuxtConfig({
|
|
|
5
5
|
'#shared-ui': fileURLToPath(new URL('__MAVIS_SHARED_ROOT__', import.meta.url)),
|
|
6
6
|
'#mavis': fileURLToPath(new URL('./app/mavis.ts', import.meta.url)),
|
|
7
7
|
},
|
|
8
|
+
vite: {
|
|
9
|
+
resolve: {
|
|
10
|
+
dedupe: [
|
|
11
|
+
'vue',
|
|
12
|
+
'@vue/runtime-core',
|
|
13
|
+
'@vue/reactivity',
|
|
14
|
+
'@vue/shared',
|
|
15
|
+
'@getcortexlabs/mavis-core',
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
8
19
|
devtools: { enabled: false },
|
|
9
20
|
css: ['@getcortexlabs/mavis-web/style.css', '~/assets/main.css'],
|
|
10
21
|
app: { head: { title: '__MAVIS_NAME__', htmlAttrs: { lang: 'en' } } },
|