@getcortexlabs/create-mavis 0.1.0-rc.12.2 → 0.1.0-rc.14

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 (51) hide show
  1. package/README.md +30 -9
  2. package/package.json +4 -2
  3. package/src/adapters.mjs +83 -0
  4. package/src/add-macos.mjs +386 -0
  5. package/src/add-target.mjs +1 -1
  6. package/src/capabilities.mjs +647 -0
  7. package/src/cli.mjs +129 -16
  8. package/src/doctor.mjs +159 -36
  9. package/src/macos-capabilities.generated.mjs +4190 -0
  10. package/src/macos.mjs +343 -58
  11. package/src/migrate-directory.mjs +121 -0
  12. package/src/package-manager.mjs +12 -4
  13. package/src/portability.mjs +110 -6
  14. package/src/presets.mjs +15 -108
  15. package/src/scaffold.mjs +32 -5
  16. package/src/ui.mjs +124 -82
  17. package/templates/directory/host/directory-storage.ts +78 -0
  18. package/templates/directory/macos/DirectoryStorage.swift +68 -0
  19. package/templates/directory/mobile/src/app.ts +11 -8
  20. package/templates/directory/nuxt/app/plugins/mavis.ts +11 -8
  21. package/templates/directory/shared/Edit.vue +8 -5
  22. package/templates/directory/shared/directory-store.ts +42 -46
  23. package/templates/directory/vite/src/main.ts +11 -8
  24. package/templates/macos/examples/tasks/shared/TaskDetail.lite.tsx +57 -0
  25. package/templates/macos/examples/tasks/shared/TaskRow.lite.tsx +33 -0
  26. package/templates/macos/examples/tasks/shared/Tasks.lite.tsx +251 -0
  27. package/templates/macos/examples/tasks/shared/types.ts +10 -0
  28. package/templates/macos/mobile/src/App.vue +14 -0
  29. package/templates/macos/mobile/src/app.ts +7 -0
  30. package/templates/macos/native/Package.swift +11 -1
  31. package/templates/macos/native/Sources/MavisDesktop/App.swift +27 -12
  32. package/templates/macos/native/Sources/MavisDesktop/Fonts/LICENSE +45 -0
  33. package/templates/macos/native/Sources/MavisDesktop/Fonts/lucide.ttf +0 -0
  34. package/templates/macos/root/tsconfig.json +14 -0
  35. package/templates/macos/scripts/generate.mjs +12 -16
  36. package/templates/macos/scripts/macos-manifest.mjs +33 -0
  37. package/templates/macos/scripts/macos.mjs +26 -19
  38. package/templates/macos/shared/Welcome.lite.tsx +8 -6
  39. package/templates/macos/{index.html → web/index.html} +2 -2
  40. package/templates/macos/web/src/main.js +212 -0
  41. package/templates/macos/web/src/mavis.js +2 -0
  42. package/templates/macos/web/{style.css → src/style.css} +3 -2
  43. package/templates/macos/web/vite.config.mjs +14 -0
  44. package/templates/migrations/directory-rc13.json +36 -0
  45. package/templates/mobile/src/mavis.ts +2 -82
  46. package/templates/mobile/webpack.config.js +4 -0
  47. package/templates/nuxt/app/mavis.ts +2 -84
  48. package/templates/vite/src/mavis.ts +2 -84
  49. package/templates/macos/scripts/portable.mjs +0 -395
  50. package/templates/macos/vite.config.mjs +0 -3
  51. package/templates/macos/web/main.js +0 -15
@@ -0,0 +1,212 @@
1
+ import { createApp, h } from 'vue'
2
+ import { createMavisServices } from '@getcortexlabs/mavis-web/services'
3
+ import {
4
+ MAlert,
5
+ MBadge,
6
+ MAccordion,
7
+ MAvatar,
8
+ MAppBar,
9
+ MBox,
10
+ MBreadcrumb,
11
+ MButton,
12
+ MCard,
13
+ MCarousel,
14
+ MChart,
15
+ MHeatmap,
16
+ MCheckbox,
17
+ MChip,
18
+ MCollapsibleHeader,
19
+ MColumn,
20
+ MEmptyState,
21
+ MDonutChart,
22
+ MGauge,
23
+ MDialog,
24
+ MCommandPalette,
25
+ MFormErrors,
26
+ MFormGroup,
27
+ MGradientBackground,
28
+ MDataTable,
29
+ MCombobox,
30
+ MComposer,
31
+ MColorPicker,
32
+ MFilePicker,
33
+ MPopover,
34
+ MMenu,
35
+ MSpeedDial,
36
+ MTour,
37
+ MTourTarget,
38
+ MGrid,
39
+ MIcon,
40
+ MImage,
41
+ MImageCompare,
42
+ MImageCropper,
43
+ MImageViewer,
44
+ MInput,
45
+ MListItem,
46
+ MLink,
47
+ MMasonry,
48
+ MNavigationRail,
49
+ MPagination,
50
+ MNumberInput,
51
+ MMultiSelect,
52
+ MPinInput,
53
+ MPlatform,
54
+ MProgress,
55
+ MRadioGroup,
56
+ MRangeSlider,
57
+ MRating,
58
+ MRefreshControl,
59
+ MResizablePanels,
60
+ MReveal,
61
+ MAnimatedText,
62
+ MNumberFlow,
63
+ MConfetti,
64
+ MParticleField,
65
+ MMarquee,
66
+ MRow,
67
+ MScreen,
68
+ MCalendar,
69
+ MTimePicker,
70
+ MScheduler,
71
+ MDatePicker,
72
+ MDateRangePicker,
73
+ MSegmentedControl,
74
+ MSelect,
75
+ MSeparator,
76
+ MSortableList,
77
+ MSwipeActions,
78
+ MSwipeDeck,
79
+ MKanban,
80
+ MSkeleton,
81
+ MSlider,
82
+ MSheet,
83
+ MSpan,
84
+ MSparkline,
85
+ MStack,
86
+ MSwitch,
87
+ MSteps,
88
+ MTabBar,
89
+ MTabs,
90
+ MText,
91
+ MThemeProvider,
92
+ MToast,
93
+ MNotificationCenter,
94
+ MTimeline,
95
+ MTreeView,
96
+ MTooltip,
97
+ MTransferList,
98
+ MTreeSelect,
99
+ MVirtualList,
100
+ mavis,
101
+ midnight,
102
+ } from '@getcortexlabs/mavis-web'
103
+ import Root, { screen } from './generated/entry'
104
+ import '@getcortexlabs/mavis-web/style.css'
105
+ import './style.css'
106
+
107
+ // A screen with an MScreen of its own fills the window; any other gets a page around it.
108
+ const app = createApp(screen ? Root : () => h('main', { class: 'mavis-page' }, h(Root)))
109
+ for (const [name, component] of Object.entries({
110
+ MScreen,
111
+ MCalendar,
112
+ MTimePicker,
113
+ MScheduler,
114
+ MDatePicker,
115
+ MDateRangePicker,
116
+ MColumn,
117
+ MRow,
118
+ MStack,
119
+ MGrid,
120
+ MBox,
121
+ MCard,
122
+ MText,
123
+ MSpan,
124
+ MSeparator,
125
+ MThemeProvider,
126
+ MPlatform,
127
+ MButton,
128
+ MInput,
129
+ MCheckbox,
130
+ MSelect,
131
+ MMasonry,
132
+ MResizablePanels,
133
+ MVirtualList,
134
+ MCollapsibleHeader,
135
+ MRefreshControl,
136
+ MIcon,
137
+ MBadge,
138
+ MProgress,
139
+ MSkeleton,
140
+ MAlert,
141
+ MEmptyState,
142
+ MSwitch,
143
+ MSlider,
144
+ MSegmentedControl,
145
+ MRadioGroup,
146
+ MListItem,
147
+ MAccordion,
148
+ MTabs,
149
+ MSteps,
150
+ MPagination,
151
+ MSparkline,
152
+ MImage,
153
+ MSheet,
154
+ MChip,
155
+ MNumberInput,
156
+ MRangeSlider,
157
+ MMultiSelect,
158
+ MAvatar,
159
+ MDonutChart,
160
+ MGauge,
161
+ MTimeline,
162
+ MTreeView,
163
+ MBreadcrumb,
164
+ MAppBar,
165
+ MTabBar,
166
+ MNavigationRail,
167
+ MLink,
168
+ MDialog,
169
+ MCommandPalette,
170
+ MTooltip,
171
+ MToast,
172
+ MNotificationCenter,
173
+ MRating,
174
+ MPinInput,
175
+ MFormGroup,
176
+ MFormErrors,
177
+ MGradientBackground,
178
+ MCarousel,
179
+ MImageCompare,
180
+ MImageCropper,
181
+ MImageViewer,
182
+ MDataTable,
183
+ MSortableList,
184
+ MSwipeActions,
185
+ MSwipeDeck,
186
+ MKanban,
187
+ MCombobox,
188
+ MComposer,
189
+ MColorPicker,
190
+ MFilePicker,
191
+ MPopover,
192
+ MMenu,
193
+ MSpeedDial,
194
+ MTour,
195
+ MTourTarget,
196
+ MTransferList,
197
+ MTreeSelect,
198
+ MChart,
199
+ MHeatmap,
200
+ MReveal,
201
+ MAnimatedText,
202
+ MNumberFlow,
203
+ MConfetti,
204
+ MParticleField,
205
+ MMarquee,
206
+ }))
207
+ app.component(name, component)
208
+ app
209
+ .use(
210
+ createMavisServices({ theme: mavis, darkTheme: midnight, appearance: '__MAVIS_APPEARANCE__' }),
211
+ )
212
+ .mount('#app')
@@ -0,0 +1,2 @@
1
+ // Resolved by this host. Shared screens import the renderer's public API from #mavis.
2
+ export * from '@getcortexlabs/mavis-web'
@@ -6,8 +6,9 @@ body {
6
6
  margin: 0;
7
7
  font-family: system-ui, sans-serif;
8
8
  }
9
- #app {
10
- max-width: 760px;
9
+ /* The page around a screen without an MScreen of its own. */
10
+ .mavis-page {
11
+ max-width: __MAVIS_WEB_WIDTH__;
11
12
  margin: 0 auto;
12
13
  padding: clamp(24px, 6vw, 64px);
13
14
  }
@@ -0,0 +1,14 @@
1
+ import { defineConfig } from 'vite'
2
+ import { fileURLToPath } from 'node:url'
3
+ import vue from '@vitejs/plugin-vue'
4
+ // Shared Vue files run here as written: they import Mavis from #mavis.
5
+ export default defineConfig({
6
+ plugins: [vue()],
7
+ resolve: {
8
+ alias: {
9
+ '#shared-ui': fileURLToPath(new URL('../../shared', import.meta.url)),
10
+ '#mavis': fileURLToPath(new URL('./src/mavis.js', import.meta.url)),
11
+ },
12
+ dedupe: ['vue'],
13
+ },
14
+ })
@@ -0,0 +1,36 @@
1
+ {
2
+ "release": "v0.1.0-rc.13",
3
+ "commit": "165caa56d249d82d1190382648e3b8731e3bd30d",
4
+ "files": {
5
+ "shared/directory-store.ts": {
6
+ "source": "1057a52eb5b3a6462ddbc5af2d15fa942901933fa5a8d80cb7257dda3cb688f9"
7
+ },
8
+ "shared/Edit.vue": {
9
+ "source": "99dd95f1e51c6f772e414cbb3776cfb87e69c466d629cd64a3a1e6c4d9498b02"
10
+ },
11
+ "shared/Directory.vue": {
12
+ "source": "df10903ecfc74c35f04d7dca6c607577f5a64481cad2e4f07041c4e91b02b869"
13
+ },
14
+ "shared/Details.vue": {
15
+ "source": "13447a479351d429121bc759290a9b9681afc1acdf030e47f8d2d3b0ee546f7a"
16
+ },
17
+ "shared/routes.ts": {
18
+ "source": "8834443fe8da682171d30170e49a2ce23825c30512dc1ff0fdbb5b7941028d66"
19
+ },
20
+ "vite/src/main.ts": {
21
+ "source": "a31a5eeb43f6a2d546cdc178f54d7cb42ef6a12b4851b38d9e7f4f366552a5d9",
22
+ "light": "77f63c02e6af15eedc365ce2594723a26c81d65cf48c29b9dbcc35ca1ed2dbc0",
23
+ "dark": "b96bf8489885b352ca9f2bfbcdc12000ebcf48eea36f815b07a0de0a682a6566"
24
+ },
25
+ "mobile/src/app.ts": {
26
+ "source": "fcf47aba9dfb7da5517c29d2df4af9942ff4a0859089ff39ff551c003f845729",
27
+ "light": "95f9450e62357f0a973bdffc8d9ef86c7f6834420cc60894eecc5d1dfc30f181",
28
+ "dark": "f2002da060b1b7da65c60bef43b0f4dedac0caad1bed570b7be9081274a044d5"
29
+ },
30
+ "nuxt/app/plugins/mavis.ts": {
31
+ "source": "2d3490d89991983850fe5e741cd3163f236d6f583f3c37f807eeeac968a9ae27",
32
+ "light": "bf7bf339f655642d56148e5c23cd75975c7a1e823a2ddf7d8647edf1c884debb",
33
+ "dark": "edefc0f4c15a4d3c2dac1257f5a54408e443c9fd55afba09bda1e1660c3ca166"
34
+ }
35
+ }
36
+ }
@@ -1,84 +1,4 @@
1
- // Resolved by this host. Shared screens import from #mavis.
2
- export {
3
- MThemeProvider,
4
- MPlatform,
5
- MPopover,
6
- MMenu,
7
- MAppBar,
8
- MTabBar,
9
- MTimePicker,
10
- MVirtualList,
11
- MDataTable,
12
- MCarousel,
13
- MRangeSlider,
14
- MCalendar,
15
- MRating,
16
- MTreeView,
17
- MCommandPalette,
18
- MNavigationRail,
19
- MBreadcrumb,
20
- MTooltip,
21
- MTimeline,
22
- MChart,
23
- MImageViewer,
24
- MSortableList,
25
- MSwipeActions,
26
- MNumberFlow,
27
- MResizablePanels,
28
- MImageCompare,
29
- MSpan,
30
- MScreen,
31
- MBox,
32
- MRow,
33
- MColumn,
34
- MStack,
35
- MGrid,
36
- MLink,
37
- MCard,
38
- MText,
39
- MButton,
40
- MSlider,
41
- MSwitch,
42
- MCheckbox,
43
- MRadioGroup,
44
- MSelect,
45
- MToast,
46
- MDialog,
47
- MTabs,
48
- MSkeleton,
49
- MChip,
50
- MEmptyState,
51
- MProgress,
52
- MAccordion,
53
- MSegmentedControl,
54
- MAlert,
55
- MListItem,
56
- MSeparator,
57
- MAvatar,
58
- MBadge,
59
- MInput,
60
- MIcon,
61
- MReveal,
62
- MSheet,
63
- MDatePicker,
64
- MDateRangePicker,
65
- MNumberInput,
66
- MMultiSelect,
67
- MImage,
68
- MCombobox,
69
- MFilePicker,
70
- MFormGroup,
71
- MFormErrors,
72
- MSteps,
73
- MPagination,
74
- useMavisPlatform,
75
- useMavisListMotion,
76
- useMavisTheme,
77
- useToast,
78
- useFormController,
79
- useFormField,
80
- useFileSelection,
81
- useMavisNavigation,
82
- } from '@getcortexlabs/mavis/vue'
1
+ // Resolved by this host. Shared screens import the renderer's public API from #mavis.
2
+ export * from '@getcortexlabs/mavis/vue'
83
3
  export * from '@getcortexlabs/mavis-core'
84
4
  export { formatDateTime, dateTimeToCivilDate } from '@getcortexlabs/mavis/date-format'
@@ -8,6 +8,10 @@ module.exports = (env) => {
8
8
  context: resolve(__dirname, 'node_modules/@getcortexlabs/mavis/fonts'),
9
9
  })
10
10
  webpack.chainWebpack((config) => {
11
+ // Shared value modules can differ from SFC names only in case (stays.ts/Stays.vue).
12
+ // NativeScript-Vue puts .vue first; prefer TS for extensionless module imports while
13
+ // component imports keep their explicit .vue extension on case-insensitive hosts.
14
+ config.resolve.extensions.prepend('.ts')
11
15
  config.resolve.alias.set('#shared-ui', resolve(__dirname, '__MAVIS_SHARED_ROOT__'))
12
16
  config.resolve.alias.set('#mavis$', resolve(__dirname, 'src/mavis.ts'))
13
17
  config.resolve.alias.set('vue$', resolve(__dirname, 'node_modules/nativescript-vue'))
@@ -1,84 +1,2 @@
1
- // Resolved by this host. Shared screens import from #mavis.
2
- export {
3
- MThemeProvider,
4
- MPlatform,
5
- MPopover,
6
- MMenu,
7
- MAppBar,
8
- MTabBar,
9
- MTimePicker,
10
- MVirtualList,
11
- MDataTable,
12
- MCarousel,
13
- MRangeSlider,
14
- MCalendar,
15
- MRating,
16
- MTreeView,
17
- MCommandPalette,
18
- MNavigationRail,
19
- MBreadcrumb,
20
- MTooltip,
21
- MTimeline,
22
- MChart,
23
- MImageViewer,
24
- MSortableList,
25
- MSwipeActions,
26
- MNumberFlow,
27
- MResizablePanels,
28
- MImageCompare,
29
- MSpan,
30
- MScreen,
31
- MBox,
32
- MRow,
33
- MColumn,
34
- MStack,
35
- MGrid,
36
- MLink,
37
- MCard,
38
- MText,
39
- MButton,
40
- MSlider,
41
- MSwitch,
42
- MCheckbox,
43
- MRadioGroup,
44
- MSelect,
45
- MToast,
46
- MDialog,
47
- MTabs,
48
- MSkeleton,
49
- MChip,
50
- MEmptyState,
51
- MProgress,
52
- MAccordion,
53
- MSegmentedControl,
54
- MAlert,
55
- MListItem,
56
- MSeparator,
57
- MAvatar,
58
- MBadge,
59
- MInput,
60
- MIcon,
61
- MReveal,
62
- MSheet,
63
- MDatePicker,
64
- MDateRangePicker,
65
- MNumberInput,
66
- MMultiSelect,
67
- MImage,
68
- MCombobox,
69
- MFilePicker,
70
- MFormGroup,
71
- MFormErrors,
72
- MSteps,
73
- MPagination,
74
- useMavisPlatform,
75
- useMavisListMotion,
76
- useMavisTheme,
77
- useToast,
78
- useFormController,
79
- useFormField,
80
- useFileSelection,
81
- useMavisNavigation,
82
- } from '@getcortexlabs/mavis-web'
83
- export * from '@getcortexlabs/mavis-core'
84
- export { formatDateTime, dateTimeToCivilDate } from '@getcortexlabs/mavis-web/date-format'
1
+ // Resolved by this host. Shared screens import the renderer's public API from #mavis.
2
+ export * from '@getcortexlabs/mavis-web'
@@ -1,84 +1,2 @@
1
- // Resolved by this host. Shared screens import from #mavis.
2
- export {
3
- MThemeProvider,
4
- MPlatform,
5
- MPopover,
6
- MMenu,
7
- MAppBar,
8
- MTabBar,
9
- MTimePicker,
10
- MVirtualList,
11
- MDataTable,
12
- MCarousel,
13
- MRangeSlider,
14
- MCalendar,
15
- MRating,
16
- MTreeView,
17
- MCommandPalette,
18
- MNavigationRail,
19
- MBreadcrumb,
20
- MTooltip,
21
- MTimeline,
22
- MChart,
23
- MImageViewer,
24
- MSortableList,
25
- MSwipeActions,
26
- MNumberFlow,
27
- MResizablePanels,
28
- MImageCompare,
29
- MSpan,
30
- MScreen,
31
- MBox,
32
- MRow,
33
- MColumn,
34
- MStack,
35
- MGrid,
36
- MLink,
37
- MCard,
38
- MText,
39
- MButton,
40
- MSlider,
41
- MSwitch,
42
- MCheckbox,
43
- MRadioGroup,
44
- MSelect,
45
- MToast,
46
- MDialog,
47
- MTabs,
48
- MSkeleton,
49
- MChip,
50
- MEmptyState,
51
- MProgress,
52
- MAccordion,
53
- MSegmentedControl,
54
- MAlert,
55
- MListItem,
56
- MSeparator,
57
- MAvatar,
58
- MBadge,
59
- MInput,
60
- MIcon,
61
- MReveal,
62
- MSheet,
63
- MDatePicker,
64
- MDateRangePicker,
65
- MNumberInput,
66
- MMultiSelect,
67
- MImage,
68
- MCombobox,
69
- MFilePicker,
70
- MFormGroup,
71
- MFormErrors,
72
- MSteps,
73
- MPagination,
74
- useMavisPlatform,
75
- useMavisListMotion,
76
- useMavisTheme,
77
- useToast,
78
- useFormController,
79
- useFormField,
80
- useFileSelection,
81
- useMavisNavigation,
82
- } from '@getcortexlabs/mavis-web'
83
- export * from '@getcortexlabs/mavis-core'
84
- export { formatDateTime, dateTimeToCivilDate } from '@getcortexlabs/mavis-web/date-format'
1
+ // Resolved by this host. Shared screens import the renderer's public API from #mavis.
2
+ export * from '@getcortexlabs/mavis-web'