mapples 0.2.0-beta.10 → 0.2.0-beta.13
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/dist/api/client.d.ts +15 -0
- package/dist/api/client.js +36 -0
- package/dist/api/client.js.map +1 -1
- package/dist/api/commit.js +19 -1
- package/dist/api/commit.js.map +1 -1
- package/dist/api/errors.d.ts +1 -1
- package/dist/api/errors.js +3 -0
- package/dist/api/errors.js.map +1 -1
- package/dist/api/objects.d.ts +3 -1
- package/dist/api/objects.js +31 -4
- package/dist/api/objects.js.map +1 -1
- package/dist/api/project.d.ts +11 -0
- package/dist/api/project.js +29 -0
- package/dist/api/project.js.map +1 -0
- package/dist/assets/assets.d.ts +12 -0
- package/dist/assets/assets.js +31 -2
- package/dist/assets/assets.js.map +1 -1
- package/dist/commands/doctor.js +2 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/impl/createImpl.js +26 -4
- package/dist/commands/impl/createImpl.js.map +1 -1
- package/dist/commands/impl/doctorImpl.js +14 -7
- package/dist/commands/impl/doctorImpl.js.map +1 -1
- package/dist/commands/impl/initImpl.js +34 -1
- package/dist/commands/impl/initImpl.js.map +1 -1
- package/dist/commands/init.js +1 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/nav/navigatorTree.d.ts +36 -2
- package/dist/nav/navigatorTree.js +191 -40
- package/dist/nav/navigatorTree.js.map +1 -1
- package/dist/nav/routeTree.d.ts +2 -1
- package/dist/nav/routeTree.js +9 -4
- package/dist/nav/routeTree.js.map +1 -1
- package/dist/nav/screenOptions.d.ts +24 -0
- package/dist/nav/screenOptions.js +41 -13
- package/dist/nav/screenOptions.js.map +1 -1
- package/dist/runtime/runtimeFiles.d.ts +17 -0
- package/dist/runtime/runtimeFiles.js +183 -0
- package/dist/runtime/runtimeFiles.js.map +1 -0
- package/dist/services/appDeps.d.ts +32 -0
- package/dist/services/appDeps.js +132 -0
- package/dist/services/appDeps.js.map +1 -0
- package/dist/services/doctorService.d.ts +19 -1
- package/dist/services/doctorService.js +117 -3
- package/dist/services/doctorService.js.map +1 -1
- package/dist/services/scaffold.d.ts +13 -1
- package/dist/services/scaffold.js +57 -5
- package/dist/services/scaffold.js.map +1 -1
- package/dist/services/syncEngine.js +85 -22
- package/dist/services/syncEngine.js.map +1 -1
- package/dist/types.d.ts +4 -0
- package/dist/types.js.map +1 -1
- package/dist/version.d.ts +21 -0
- package/dist/version.js +40 -3
- package/dist/version.js.map +1 -1
- package/package.json +4 -3
- package/templates/agent/mapples.md +9 -4
- package/templates/agent/skills/mapples-conventions/SKILL.md +2 -2
- package/templates/agent/skills/mapples-design/SKILL.md +4 -4
- package/templates/agent/skills/mapples-design/reference/component-library.md +1 -1
- package/templates/agent/skills/mapples-design/reference/layout-contract.md +2 -3
- package/templates/agent/skills/mapples-design/reference/playbooks/onboarding-flow.md +1 -1
- package/templates/agent/skills/mapples-design/reference/playbooks/screen-flow-wiring.md +2 -5
- package/templates/app/_layout.tsx +6 -1
- package/templates/gitignore +2 -0
- package/templates/metro.config.js +11 -0
- package/templates/package.json +19 -10
|
@@ -195,8 +195,8 @@ Two screens in one plan step: do them one after the other inside the step, synci
|
|
|
195
195
|
|
|
196
196
|
## Phase N-1 — Wiring
|
|
197
197
|
|
|
198
|
-
Load `playbooks/screen-flow-wiring.md`. For every navigation the plan names, add
|
|
199
|
-
element's primary event
|
|
198
|
+
Load `playbooks/screen-flow-wiring.md`. For every navigation the plan names, add the Creator
|
|
199
|
+
connection to the source element's primary event — it is also what the built app runs:
|
|
200
200
|
|
|
201
201
|
```tsx
|
|
202
202
|
<Button
|
|
@@ -204,12 +204,12 @@ element's primary event both the Creator connection and the runtime handler:
|
|
|
204
204
|
variant="filled"
|
|
205
205
|
size="lg"
|
|
206
206
|
fullWidth
|
|
207
|
-
onPress={() => router.push('/(main)')}
|
|
208
207
|
$actions={{ onPress: { type: 'mapples:navigate', staticData: { pageUuid: '<uuid from base>' } } }}
|
|
209
208
|
/>
|
|
210
209
|
```
|
|
211
210
|
|
|
212
|
-
|
|
211
|
+
No `router.push` handler next to it (the action replaces it, and the app warns about the
|
|
212
|
+
duplicate). Rows and cards use their own `onPress` event. Walk the golden
|
|
213
213
|
path from the entry screen; every screen reachable, every flow with an exit. Sync; the report's
|
|
214
214
|
`pushedOps` must cover every action you added.
|
|
215
215
|
|
|
@@ -62,7 +62,7 @@ and `tone` props and the style slots — never rebuild one from Views. Array pro
|
|
|
62
62
|
| `ChatComposer` | `placeholder`, `leadingIconName` | the chat input pinned to the bottom |
|
|
63
63
|
| `SegmentedControl` | `options`, `value` | switching a view mode |
|
|
64
64
|
| `Rating` | `value`, `max`, `readOnly` | stars |
|
|
65
|
-
| `ChipGroup` | `options` [{label, value, iconName?}], `value`, `variant` filter\|
|
|
65
|
+
| `ChipGroup` | `options` [{label, value, iconName?}], `value`, `variant` filter\|assist (filter chips toggle the selection, assist chips report a press), `scrollable` | filters and tags |
|
|
66
66
|
| `Chip` | `label`, `variant` assist\|filter\|suggestion, `selected` | a single tag (content-sized; inside a row) |
|
|
67
67
|
|
|
68
68
|
### content
|
|
@@ -174,7 +174,6 @@ left visible with no binding covers the screen forever.
|
|
|
174
174
|
|
|
175
175
|
```tsx
|
|
176
176
|
// (the CLI's `// mapples-route:` marker stays on line 1 once the file is synced)
|
|
177
|
-
import { router } from 'expo-router';
|
|
178
177
|
import { Container, GradientBackground, Icon, Typography, View } from '@mapples/ui';
|
|
179
178
|
import { Button, Card, PageControl, TextLink } from '@mapples/components';
|
|
180
179
|
import { Styler } from '@mapples/style';
|
|
@@ -183,7 +182,7 @@ export default function Welcome() {
|
|
|
183
182
|
return (
|
|
184
183
|
<Container styled={{ style: styles.root }}>
|
|
185
184
|
<View styled={{ style: styles.topBar }}>
|
|
186
|
-
<TextLink label="Skip" tone="neutral" underline={false}
|
|
185
|
+
<TextLink label="Skip" tone="neutral" underline={false} $actions={{ onPress: { type: 'mapples:navigate', staticData: { pageUuid: '<home uuid>' } } }} />
|
|
187
186
|
</View>
|
|
188
187
|
<View styled={{ style: styles.hero }}>
|
|
189
188
|
<GradientBackground
|
|
@@ -201,7 +200,7 @@ export default function Welcome() {
|
|
|
201
200
|
</View>
|
|
202
201
|
<View styled={{ style: styles.bottom }}>
|
|
203
202
|
<PageControl count={3} value={0} variant="bars" />
|
|
204
|
-
<Button label="Continue" variant="filled" size="lg" fullWidth
|
|
203
|
+
<Button label="Continue" variant="filled" size="lg" fullWidth $actions={{ onPress: { type: 'mapples:navigate', staticData: { pageUuid: '<features uuid>' } } }} />
|
|
205
204
|
</View>
|
|
206
205
|
</Container>
|
|
207
206
|
);
|
|
@@ -12,4 +12,4 @@ Structure per screen (root column, `justifyContent: 'space-between'`, screen pad
|
|
|
12
12
|
|
|
13
13
|
CTA copy arc: "Continue" on middle screens; the LAST screen carries the real ask — "Get started" primary plus a `TextLink` "Sign in" row underneath for returning users.
|
|
14
14
|
|
|
15
|
-
Pitfalls: no emoji heroes; one hero per screen, never hero + photo; dots and button positions must not shift between screens (same bottom block on all three); wire screen→screen and last screen→auth or home in the wiring phase (`$actions` navigate
|
|
15
|
+
Pitfalls: no emoji heroes; one hero per screen, never hero + photo; dots and button positions must not shift between screens (same bottom block on all three); wire screen→screen and last screen→auth or home in the wiring phase (`$actions` navigate — the app runs it).
|
|
@@ -5,22 +5,19 @@ Wiring flows: every CTA connected, entries set, a walkable prototype.
|
|
|
5
5
|
|
|
6
6
|
A project becomes a product when every path is walkable. After the screens exist, wire them — this is as much the design as the pixels.
|
|
7
7
|
|
|
8
|
-
How a connection is written (
|
|
8
|
+
How a connection is written (on the element's primary event):
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
|
-
import { router } from 'expo-router';
|
|
12
|
-
// …
|
|
13
11
|
<Button
|
|
14
12
|
label="Add to order"
|
|
15
13
|
variant="filled"
|
|
16
14
|
size="lg"
|
|
17
15
|
fullWidth
|
|
18
|
-
onPress={() => router.push('/(main)/cart')}
|
|
19
16
|
$actions={{ onPress: { type: 'mapples:navigate', staticData: { pageUuid: '<uuid>' } } }}
|
|
20
17
|
/>
|
|
21
18
|
```
|
|
22
19
|
|
|
23
|
-
`$actions` is the Creator connection (the storyboard arrow)
|
|
20
|
+
`$actions` is the Creator connection (the storyboard arrow) AND the app's handler: the built app runs it the way Creator's Play does (guards, replace-on-sign-in and params included). Never add a `router.push` `onPress` next to it — the action replaces a code handler for the same event and the app warns about the duplicate. The `pageUuid` is the `uuid` field of `.mapples/base/pages/<pageId>.json`, where `<pageId>` is the key in `.mapples/pages.json` whose `file` is the target route file. Rows use `ListItem`'s `onPress`, cards `MediaCard`'s / `Card`'s `onPress`.
|
|
24
21
|
|
|
25
22
|
The contract:
|
|
26
23
|
- Every PRIMARY `Button` navigates to a real page: onboarding Continue → next screen, Get started → auth or home, list row / card → its detail, detail CTA → the flow it starts (cart, booking, player). No dead primary buttons, ever.
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
// GENERATED by Mapples — DO NOT EDIT. This layout is owned by the CLI and
|
|
2
2
|
// regenerated from the navigation document on every `mapples sync`.
|
|
3
3
|
// Edit navigation in Creator instead.
|
|
4
|
+
import MapplesApp from '@mapples/app';
|
|
4
5
|
import { Stack } from 'expo-router';
|
|
5
6
|
|
|
6
7
|
export default function RootLayout() {
|
|
7
|
-
return
|
|
8
|
+
return (
|
|
9
|
+
<MapplesApp>
|
|
10
|
+
<Stack screenOptions={{ headerShown: false }} />
|
|
11
|
+
</MapplesApp>
|
|
12
|
+
);
|
|
8
13
|
}
|
package/templates/gitignore
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const { getDefaultConfig } = require('expo/metro-config');
|
|
2
|
+
// Resolves the files `mapples sync` writes (mapples/theme.ts, mapples/assetMap.ts)
|
|
3
|
+
// for @mapples/app — see https://www.npmjs.com/package/@mapples/app.
|
|
4
|
+
const { mapplesResolver } = require('@mapples/app/expo');
|
|
5
|
+
|
|
6
|
+
const config = getDefaultConfig(__dirname);
|
|
7
|
+
config.resolver.resolveRequest = mapplesResolver((context, moduleName, platform) =>
|
|
8
|
+
context.resolveRequest(context, moduleName, platform),
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
module.exports = config;
|
package/templates/package.json
CHANGED
|
@@ -10,15 +10,19 @@
|
|
|
10
10
|
"sync": "mapples sync"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@mapples/action": "
|
|
14
|
-
"@mapples/
|
|
15
|
-
"@mapples/
|
|
16
|
-
"@mapples/
|
|
17
|
-
"@mapples/
|
|
18
|
-
"@mapples/
|
|
19
|
-
"@mapples/
|
|
20
|
-
"@mapples/
|
|
21
|
-
"@mapples/
|
|
13
|
+
"@mapples/action": "__MAPPLES_RUNTIME__",
|
|
14
|
+
"@mapples/app": "__MAPPLES_RUNTIME__",
|
|
15
|
+
"@mapples/components": "__MAPPLES_RUNTIME__",
|
|
16
|
+
"@mapples/fonts": "__MAPPLES_RUNTIME__",
|
|
17
|
+
"@mapples/form": "__MAPPLES_RUNTIME__",
|
|
18
|
+
"@mapples/inlang": "__MAPPLES_RUNTIME__",
|
|
19
|
+
"@mapples/navigation": "__MAPPLES_RUNTIME__",
|
|
20
|
+
"@mapples/render": "__MAPPLES_RUNTIME__",
|
|
21
|
+
"@mapples/request": "__MAPPLES_RUNTIME__",
|
|
22
|
+
"@mapples/state": "__MAPPLES_RUNTIME__",
|
|
23
|
+
"@mapples/style": "__MAPPLES_RUNTIME__",
|
|
24
|
+
"@mapples/types": "__MAPPLES_RUNTIME__",
|
|
25
|
+
"@mapples/ui": "__MAPPLES_RUNTIME__",
|
|
22
26
|
"@react-native-vector-icons/ant-design": "^13.1.0",
|
|
23
27
|
"@react-native-vector-icons/entypo": "^13.1.0",
|
|
24
28
|
"@react-native-vector-icons/evil-icons": "^13.1.0",
|
|
@@ -37,6 +41,7 @@
|
|
|
37
41
|
"@react-native-vector-icons/zocial": "^13.1.0",
|
|
38
42
|
"expo": "~57.0.23",
|
|
39
43
|
"expo-constants": "~57.0.18",
|
|
44
|
+
"expo-dev-client": "~57.0.19",
|
|
40
45
|
"expo-font": "~57.0.4",
|
|
41
46
|
"expo-image": "~57.0.5",
|
|
42
47
|
"expo-linear-gradient": "~57.0.2",
|
|
@@ -47,6 +52,7 @@
|
|
|
47
52
|
"expo-system-ui": "~57.0.4",
|
|
48
53
|
"expo-web-browser": "~57.0.3",
|
|
49
54
|
"jsbarcode": "^3.12.3",
|
|
55
|
+
"lodash": "^4.18.0",
|
|
50
56
|
"react": "19.2.3",
|
|
51
57
|
"react-dom": "19.2.3",
|
|
52
58
|
"react-native": "0.86.3",
|
|
@@ -57,12 +63,15 @@
|
|
|
57
63
|
"react-native-screens": "~4.26.0",
|
|
58
64
|
"react-native-svg": "15.15.4",
|
|
59
65
|
"react-native-web": "~0.21.0",
|
|
60
|
-
"react-native-worklets": "0.10.1"
|
|
66
|
+
"react-native-worklets": "0.10.1",
|
|
67
|
+
"rxjs": "^7.8.1",
|
|
68
|
+
"yup": "^1.6.0"
|
|
61
69
|
},
|
|
62
70
|
"devDependencies": {
|
|
63
71
|
"@babel/core": "^7.26.0",
|
|
64
72
|
"@types/react": "~19.2.2",
|
|
65
73
|
"babel-plugin-mapples-sid": "__CLI_VERSION__",
|
|
74
|
+
"babel-preset-expo": "~57.0.13",
|
|
66
75
|
"mapples": "__CLI_VERSION__",
|
|
67
76
|
"typescript": "~6.0.3"
|
|
68
77
|
},
|