create-proto 0.1.0
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 +43 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +104 -0
- package/dist/cli.js.map +1 -0
- package/dist/copy-template.d.ts +8 -0
- package/dist/copy-template.d.ts.map +1 -0
- package/dist/copy-template.js +46 -0
- package/dist/copy-template.js.map +1 -0
- package/dist/detect-pm.d.ts +3 -0
- package/dist/detect-pm.d.ts.map +1 -0
- package/dist/detect-pm.js +12 -0
- package/dist/detect-pm.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/install-deps.d.ts +16 -0
- package/dist/install-deps.d.ts.map +1 -0
- package/dist/install-deps.js +37 -0
- package/dist/install-deps.js.map +1 -0
- package/dist/messages.d.ts +17 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +16 -0
- package/dist/messages.js.map +1 -0
- package/dist/render-qr.d.ts +2 -0
- package/dist/render-qr.d.ts.map +1 -0
- package/dist/render-qr.js +9 -0
- package/dist/render-qr.js.map +1 -0
- package/dist/validate-name.d.ts +9 -0
- package/dist/validate-name.d.ts.map +1 -0
- package/dist/validate-name.js +33 -0
- package/dist/validate-name.js.map +1 -0
- package/package.json +64 -0
- package/template/.proto/app/(proto)/[...screen].tsx +24 -0
- package/template/.proto/app/_layout.tsx +5 -0
- package/template/.proto/expo-config/app.json +17 -0
- package/template/CLAUDE.md +71 -0
- package/template/DESIGN.md +53 -0
- package/template/README.md +6 -0
- package/template/app/index.tsx +5 -0
- package/template/app.config.js +1 -0
- package/template/assets/.gitkeep +0 -0
- package/template/assets/icon.png +0 -0
- package/template/assets/splash.png +0 -0
- package/template/babel.config.js +7 -0
- package/template/components/proto/.gitkeep +0 -0
- package/template/components/proto/Button.tsx +61 -0
- package/template/components/proto/Card.tsx +63 -0
- package/template/components/proto/Divider.tsx +15 -0
- package/template/components/proto/Modal.tsx +43 -0
- package/template/components/proto/Row.tsx +28 -0
- package/template/components/proto/Screen.tsx +38 -0
- package/template/components/proto/Stack.tsx +17 -0
- package/template/components/proto/Text.tsx +37 -0
- package/template/components/proto/Toggle.tsx +40 -0
- package/template/components/proto/index.ts +11 -0
- package/template/components/proto/tokens/liquidGlass.ts +38 -0
- package/template/components/proto/tokens/materialYou.ts +38 -0
- package/template/components/proto/types.ts +55 -0
- package/template/components/proto/useTheme.ts +35 -0
- package/template/components/shared/.gitkeep +0 -0
- package/template/metro.config.js +5 -0
- package/template/package.json +35 -0
- package/template/pnpm-workspace.yaml +1 -0
- package/template/proto.config.js +6 -0
- package/template/screens/.gitkeep +0 -0
- package/template/screens/Home.tsx +60 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import config from '../../proto.config.js';
|
|
2
|
+
import { liquidGlass } from './tokens/liquidGlass';
|
|
3
|
+
import { materialYou } from './tokens/materialYou';
|
|
4
|
+
import type { ProtoConfig, Theme, ThemeName, ThemeOverrides } from './types';
|
|
5
|
+
|
|
6
|
+
const themes: Record<ThemeName, Theme> = {
|
|
7
|
+
liquidGlass,
|
|
8
|
+
materialYou,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
function mergeTheme(base: Theme, overrides?: ThemeOverrides): Theme {
|
|
12
|
+
if (!overrides) return base;
|
|
13
|
+
return {
|
|
14
|
+
surface: { ...base.surface, ...overrides.surface },
|
|
15
|
+
text: { ...base.text, ...overrides.text },
|
|
16
|
+
blur: { ...base.blur, ...overrides.blur },
|
|
17
|
+
border: { ...base.border, ...overrides.border },
|
|
18
|
+
radius: { ...base.radius, ...overrides.radius },
|
|
19
|
+
space: { ...base.space, ...overrides.space },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const cfg = config as ProtoConfig;
|
|
24
|
+
|
|
25
|
+
// Named `use*` for ergonomics but reads module-level config; safe to call outside React.
|
|
26
|
+
export function useTheme(): Theme {
|
|
27
|
+
const name: ThemeName = cfg.theme ?? 'liquidGlass';
|
|
28
|
+
const base = themes[name] ?? themes.liquidGlass;
|
|
29
|
+
return mergeTheme(base, cfg.tokens);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Named `use*` for ergonomics but reads module-level config; safe to call outside React.
|
|
33
|
+
export function useAccent(): string {
|
|
34
|
+
return cfg.accentColor ?? '#007AFF';
|
|
35
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"main": "expo-router/entry",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"start": "expo start",
|
|
8
|
+
"android": "expo start --android",
|
|
9
|
+
"ios": "expo start --ios",
|
|
10
|
+
"proto": "proto"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@expo/ui": "55.0.17",
|
|
14
|
+
"expo": "~55.0.26",
|
|
15
|
+
"expo-blur": "~55.0.14",
|
|
16
|
+
"expo-glass-effect": "~55.0.11",
|
|
17
|
+
"expo-haptics": "~55.0.14",
|
|
18
|
+
"expo-router": "~55.0.16",
|
|
19
|
+
"expo-status-bar": "~55.0.6",
|
|
20
|
+
"react": "19.2.0",
|
|
21
|
+
"react-native": "0.83.6",
|
|
22
|
+
"react-native-gesture-handler": "~2.30.1",
|
|
23
|
+
"react-native-reanimated": "4.2.1",
|
|
24
|
+
"react-native-safe-area-context": "5.6.2",
|
|
25
|
+
"react-native-screens": "4.23.0",
|
|
26
|
+
"react-native-worklets": "0.7.4"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@babel/core": "^7.24.0",
|
|
30
|
+
"@sherizan/proto-cli": "^0.1.0",
|
|
31
|
+
"@types/react": "~19.2.15",
|
|
32
|
+
"babel-preset-expo": "~55.0.22",
|
|
33
|
+
"typescript": "^5.9.2"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
node-linker: hoisted
|
|
File without changes
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import Animated, {
|
|
3
|
+
useSharedValue,
|
|
4
|
+
useAnimatedStyle,
|
|
5
|
+
withTiming,
|
|
6
|
+
Easing,
|
|
7
|
+
} from 'react-native-reanimated';
|
|
8
|
+
import { Screen, Stack, Text, Card, Divider } from '../components/proto';
|
|
9
|
+
|
|
10
|
+
export default function Home() {
|
|
11
|
+
const opacity = useSharedValue(0);
|
|
12
|
+
const translateY = useSharedValue(12);
|
|
13
|
+
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
opacity.value = withTiming(1, { duration: 600, easing: Easing.out(Easing.quad) });
|
|
16
|
+
translateY.value = withTiming(0, { duration: 600, easing: Easing.out(Easing.quad) });
|
|
17
|
+
}, [opacity, translateY]);
|
|
18
|
+
|
|
19
|
+
const heroStyle = useAnimatedStyle(() => ({
|
|
20
|
+
opacity: opacity.value,
|
|
21
|
+
transform: [{ translateY: translateY.value }],
|
|
22
|
+
}));
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Screen title="Proto" scrollable>
|
|
26
|
+
<Stack gap={24} padding={20}>
|
|
27
|
+
<Animated.View style={heroStyle}>
|
|
28
|
+
<Card glass padding={24}>
|
|
29
|
+
<Stack gap={12}>
|
|
30
|
+
<Text size="title">You're in.</Text>
|
|
31
|
+
<Text size="body" color="secondary">
|
|
32
|
+
Every change you make appears here instantly — no refresh, no waiting.
|
|
33
|
+
</Text>
|
|
34
|
+
</Stack>
|
|
35
|
+
</Card>
|
|
36
|
+
</Animated.View>
|
|
37
|
+
|
|
38
|
+
<Stack gap={12}>
|
|
39
|
+
<Text size="headline">Next</Text>
|
|
40
|
+
<Text size="body">Open a new terminal and run</Text>
|
|
41
|
+
<Card padding={16}>
|
|
42
|
+
<Text size="body" color="accent">claude</Text>
|
|
43
|
+
</Card>
|
|
44
|
+
<Text size="body">Then describe what you want</Text>
|
|
45
|
+
<Card padding={16}>
|
|
46
|
+
<Text size="body" color="accent">
|
|
47
|
+
Add liquid glass bottom toolbar with placeholder screens
|
|
48
|
+
</Text>
|
|
49
|
+
</Card>
|
|
50
|
+
</Stack>
|
|
51
|
+
|
|
52
|
+
<Divider />
|
|
53
|
+
|
|
54
|
+
<Text size="caption" color="secondary">
|
|
55
|
+
Proto reads DESIGN.md before every change.
|
|
56
|
+
</Text>
|
|
57
|
+
</Stack>
|
|
58
|
+
</Screen>
|
|
59
|
+
);
|
|
60
|
+
}
|