create-idia-app 0.2.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.
Files changed (90) hide show
  1. package/README.md +104 -0
  2. package/dist/index.js +412 -0
  3. package/dist/index.js.map +1 -0
  4. package/package.json +33 -0
  5. package/template/.cursor/rules/idia-ui-ds-brain.mdc +32 -0
  6. package/template/.cursor/rules/idia-ui-forms.mdc +34 -0
  7. package/template/.cursor/rules/idia-ui-overlays.mdc +23 -0
  8. package/template/.idia/brain/AGENTS.md +37 -0
  9. package/template/.idia/brain/ai/agents/retrieval-cheatsheet.md +209 -0
  10. package/template/.idia/brain/ai/skills/components/button/SKILL.md +32 -0
  11. package/template/.idia/brain/ai/skills/ds-brain-action-hierarchy/SKILL.md +46 -0
  12. package/template/.idia/brain/ai/skills/ds-brain-forms/SKILL.md +67 -0
  13. package/template/.idia/brain/ai/skills/ds-brain-index/SKILL.md +76 -0
  14. package/template/.idia/brain/ai/skills/ds-brain-overlays/SKILL.md +30 -0
  15. package/template/.idia/brain/ai/skills/ds-brain-retrieval/SKILL.md +54 -0
  16. package/template/.idia/brain/registry/ai-index.generated.json +833 -0
  17. package/template/.idia/brain/registry/component-registry.generated.json +2947 -0
  18. package/template/.idia/manifest.json +17 -0
  19. package/template/.storybook/main.ts +9 -0
  20. package/template/.storybook/preview.tsx +20 -0
  21. package/template/AGENTS.md +11 -0
  22. package/template/App.tsx +24 -0
  23. package/template/README.md +75 -0
  24. package/template/app.json +13 -0
  25. package/template/babel.config.js +25 -0
  26. package/template/global.css +32 -0
  27. package/template/index.ts +8 -0
  28. package/template/metro.config.js +19 -0
  29. package/template/package.json +85 -0
  30. package/template/public/fonts/Inter.ttf +0 -0
  31. package/template/public/fonts/NunitoSans.woff2 +0 -0
  32. package/template/src/config/env.ts +4 -0
  33. package/template/src/config/versions.ts +7 -0
  34. package/template/src/navigation/RootNavigator.tsx +27 -0
  35. package/template/src/navigation/linking.ts +13 -0
  36. package/template/src/navigation/types.ts +10 -0
  37. package/template/src/providers/AppProviders.tsx +47 -0
  38. package/template/src/screens/Home/HomeScreen.tsx +12 -0
  39. package/template/src/screens/Welcome/WelcomeScreen.tsx +115 -0
  40. package/template/src/stories/Button.stories.tsx +31 -0
  41. package/template/storybook-static/assets/Button.stories-CfapbH7U.js +196 -0
  42. package/template/storybook-static/assets/Color-F6OSRLHC-CFwL-RM_.js +1 -0
  43. package/template/storybook-static/assets/DocsRenderer-CFRXHY34-AADCayzw.js +729 -0
  44. package/template/storybook-static/assets/_commonjsHelpers-Cpj98o6Y.js +1 -0
  45. package/template/storybook-static/assets/axe-d-K7rF9D.js +30 -0
  46. package/template/storybook-static/assets/chunk-XP5HYGXS-BHXC9YeQ.js +1 -0
  47. package/template/storybook-static/assets/client-DGEjZp2f.js +25 -0
  48. package/template/storybook-static/assets/entry-preview-Dc5wkB2s.js +2 -0
  49. package/template/storybook-static/assets/entry-preview-docs-BaxqCxyK.js +46 -0
  50. package/template/storybook-static/assets/iframe-Bl15XKnQ.js +211 -0
  51. package/template/storybook-static/assets/index-Bhelpi4i.js +11 -0
  52. package/template/storybook-static/assets/index-C_pJYAGD.js +1 -0
  53. package/template/storybook-static/assets/index-D5Inswos.js +1 -0
  54. package/template/storybook-static/assets/index-NGyRR_en.js +9 -0
  55. package/template/storybook-static/assets/index-zmTGQa7e.js +9 -0
  56. package/template/storybook-static/assets/jsx-runtime-BjG_zV1W.js +9 -0
  57. package/template/storybook-static/assets/preview-BNUqaTig.js +1 -0
  58. package/template/storybook-static/assets/preview-Cfo7ZnTc.js +2 -0
  59. package/template/storybook-static/assets/preview-CrKLV1aL.css +1 -0
  60. package/template/storybook-static/assets/preview-DkVJIpDn.js +2 -0
  61. package/template/storybook-static/assets/preview-DrRsTNnS.js +17 -0
  62. package/template/storybook-static/assets/react-18-Bfhi6ooJ.js +1 -0
  63. package/template/storybook-static/assets/react-FmFgRqLi.js +1 -0
  64. package/template/storybook-static/assets/react-native-gesture-handler-BzS7UzhZ.js +52 -0
  65. package/template/storybook-static/assets/test-utils-X4YdDMST.js +9 -0
  66. package/template/storybook-static/favicon.svg +1 -0
  67. package/template/storybook-static/fonts/Inter.ttf +0 -0
  68. package/template/storybook-static/fonts/NunitoSans.woff2 +0 -0
  69. package/template/storybook-static/iframe.html +668 -0
  70. package/template/storybook-static/index.html +145 -0
  71. package/template/storybook-static/index.json +1 -0
  72. package/template/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  73. package/template/storybook-static/nunito-sans-bold.woff2 +0 -0
  74. package/template/storybook-static/nunito-sans-italic.woff2 +0 -0
  75. package/template/storybook-static/nunito-sans-regular.woff2 +0 -0
  76. package/template/storybook-static/project.json +1 -0
  77. package/template/storybook-static/sb-addons/a11y-2/manager-bundle.js +3 -0
  78. package/template/storybook-static/sb-addons/links-1/manager-bundle.js +3 -0
  79. package/template/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  80. package/template/storybook-static/sb-common-assets/favicon.svg +1 -0
  81. package/template/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  82. package/template/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  83. package/template/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  84. package/template/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  85. package/template/storybook-static/sb-manager/globals-module-info.js +1052 -0
  86. package/template/storybook-static/sb-manager/globals-runtime.js +41775 -0
  87. package/template/storybook-static/sb-manager/globals.js +48 -0
  88. package/template/storybook-static/sb-manager/runtime.js +12048 -0
  89. package/template/tamagui.config.ts +18 -0
  90. package/template/tsconfig.json +11 -0
@@ -0,0 +1,17 @@
1
+ {
2
+ "idiaCli": "0.2.0",
3
+ "core": "0.2.0",
4
+ "features": {
5
+ "storybook": {
6
+ "installed": "2026-07-01T19:46:10.873Z",
7
+ "storybookDocs": "0.2.0",
8
+ "storybook": "8.4.7",
9
+ "preset": "0.2.0"
10
+ },
11
+ "brain": {
12
+ "installed": "2026-07-01T19:50:02.249Z",
13
+ "brainPack": "0.2.0",
14
+ "sourceHash": "sha256:0fafc035b8d85e32075e95a803766c4a31e8f9a2c2b5ee478e8b6ec4e412875d"
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,9 @@
1
+ import type { StorybookConfig } from '@storybook/react-vite';
2
+ import { idiaStorybookMain } from '@idia-ui/storybook-preset-react-native-web';
3
+
4
+ const config: StorybookConfig = idiaStorybookMain({
5
+ stories: ['../src/stories/**/*.stories.@(ts|tsx)'],
6
+ staticDirs: ['../public'],
7
+ });
8
+
9
+ export default config;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import type { Preview } from '@storybook/react';
3
+ import { AppProviders } from '../src/providers/AppProviders';
4
+ import '../global.css';
5
+
6
+ const preview: Preview = {
7
+ decorators: [
8
+ (Story) => (
9
+ <AppProviders>
10
+ <Story />
11
+ </AppProviders>
12
+ ),
13
+ ],
14
+ parameters: {
15
+ layout: 'centered',
16
+ controls: { expanded: true },
17
+ },
18
+ };
19
+
20
+ export default preview;
@@ -0,0 +1,11 @@
1
+ <!-- idia-ui brain:begin -->
2
+ ## idia-ui design-system brain
3
+
4
+ For idia-ui component usage, design-system documentation, Storybook docs, UI generation, or AI-guided UI work, read:
5
+
6
+ `.idia/brain/AGENTS.md`
7
+
8
+ before using idia-ui components.
9
+
10
+ This installed brain pack is read-only generated guidance. Do not edit files under `.idia/brain/` directly.
11
+ <!-- idia-ui brain:end -->
@@ -0,0 +1,24 @@
1
+ import { Platform } from 'react-native'
2
+ import { enableFreeze, enableScreens } from 'react-native-screens'
3
+
4
+ import { AppProviders } from '@/providers/AppProviders'
5
+ import { RootNavigator } from '@/navigation/RootNavigator'
6
+
7
+ import '@idia-ui/core/styles/global.css'
8
+
9
+ if (Platform.OS === 'web') {
10
+ require('./global.css')
11
+ }
12
+
13
+ if (Platform.OS !== 'web') {
14
+ enableScreens(true)
15
+ enableFreeze(true)
16
+ }
17
+
18
+ export function App() {
19
+ return (
20
+ <AppProviders>
21
+ <RootNavigator />
22
+ </AppProviders>
23
+ )
24
+ }
@@ -0,0 +1,75 @@
1
+ # my-idia-app
2
+
3
+ Expo + React Navigation starter consuming `@idia-ui/core` and `@idia-ui/theme` from npm.
4
+
5
+ Synced from `apps/consumer-sandbox` via `node scripts/sync-consumer-template.mjs` in the idia-ui monorepo.
6
+
7
+ ## Prerequisites
8
+
9
+ - Node.js 20+
10
+ - pnpm, npm, or yarn (pnpm recommended; this template ships a `.npmrc` for Expo/RN hoisting)
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pnpm install
16
+ ```
17
+
18
+ ### Required transitive peers (@idia-ui/core 0.2.0)
19
+
20
+ `@idia-ui/core` eagerly loads Table and Calendar module graphs. Install these even if you only render Welcome/Home:
21
+
22
+ | Package | Version (template lock) |
23
+ |---------|-------------------------|
24
+ | `zustand` | `^5.0.0` |
25
+ | `@tanstack/react-table` | `^8.21.0` |
26
+ | `react-image-crop` | `^11.0.0` |
27
+ | `@fullcalendar/core` | `^6.1.0` |
28
+ | `@fullcalendar/daygrid` | `^6.1.0` |
29
+ | `@fullcalendar/timegrid` | `^6.1.0` |
30
+ | `@fullcalendar/interaction` | `^6.1.0` |
31
+ | `@fullcalendar/multimonth` | `^6.1.0` |
32
+ | `@fullcalendar/list` | `^6.1.0` |
33
+ | `@fullcalendar/react` | `^6.1.0` |
34
+
35
+ These are already listed in `package.json`. Future `idia-ui doctor` (Phase 2) will validate peer health.
36
+
37
+ ## Development
38
+
39
+ ```bash
40
+ pnpm dev # web (Metro)
41
+ pnpm ios # iOS simulator
42
+ pnpm android # Android emulator
43
+ pnpm typecheck
44
+ ```
45
+
46
+ ## Locked peer matrix
47
+
48
+ | Concern | Version |
49
+ |---------|---------|
50
+ | Expo SDK | **53** (`~53.0.27`) |
51
+ | React / React Native | **19** / **0.79** |
52
+ | Tamagui | **1.144.x** |
53
+ | React Navigation | **6.x** |
54
+ | `@idia-ui/core` / `@idia-ui/theme` | **^0.2.0** |
55
+
56
+ ## Metro
57
+
58
+ Consumer template uses a slim `metro.config.js` — no monorepo `watchFolders`, dist-path hacks, or `metro-compat.cjs`. Metro **0.82.5** is pinned in devDependencies to match Expo SDK 53.
59
+
60
+ ## Screens
61
+
62
+ | Route | Purpose |
63
+ |-------|---------|
64
+ | `Welcome` | Onboarding, version badge, command reference, theme toggle |
65
+ | `Home` | Minimal placeholder |
66
+
67
+ ## Future commands (copy only — not implemented)
68
+
69
+ - `idia-ui doctor`
70
+ - `idia-ui add storybook`
71
+ - `idia-ui add brain`
72
+
73
+ ## Tier posture
74
+
75
+ Tier 0 GO | Tier 1G experimental | Tier 1P NO-GO | Tier 1 aggregate NO-GO | Tier 2/GA NO-GO
@@ -0,0 +1,13 @@
1
+ {
2
+ "expo": {
3
+ "name": "my-idia-app",
4
+ "slug": "my-idia-app",
5
+ "version": "1.0.0",
6
+ "orientation": "portrait",
7
+ "scheme": "my-idia-app",
8
+ "userInterfaceStyle": "automatic",
9
+ "web": {
10
+ "bundler": "metro"
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,25 @@
1
+ module.exports = function (api) {
2
+ api.cache(true)
3
+ return {
4
+ presets: ['babel-preset-expo'],
5
+ plugins: [
6
+ [
7
+ '@tamagui/babel-plugin',
8
+ {
9
+ components: ['tamagui'],
10
+ config: './tamagui.config.ts',
11
+ },
12
+ ],
13
+ [
14
+ 'module-resolver',
15
+ {
16
+ root: ['./'],
17
+ alias: {
18
+ '@': './src',
19
+ },
20
+ },
21
+ ],
22
+ 'react-native-reanimated/plugin',
23
+ ],
24
+ }
25
+ }
@@ -0,0 +1,32 @@
1
+ /* Web typography baseline — prevent serif flash before custom fonts load. */
2
+ html,
3
+ body,
4
+ #root,
5
+ [data-rn-root] {
6
+ font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
7
+ 'Helvetica Neue', Arial, sans-serif;
8
+ background-color: var(--backgroundNeutralSubtle400, #f5f5f5);
9
+ text-rendering: optimizeLegibility;
10
+ -webkit-font-smoothing: antialiased;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ }
13
+
14
+ @font-face {
15
+ font-family: 'Inter';
16
+ src: url('/fonts/Inter.ttf') format('truetype');
17
+ font-weight: 100 900;
18
+ font-style: normal;
19
+ font-display: swap;
20
+ }
21
+
22
+ @font-face {
23
+ font-family: 'NunitoSans';
24
+ src: url('/fonts/NunitoSans.woff2') format('woff2');
25
+ font-weight: 100 900;
26
+ font-style: normal;
27
+ font-display: swap;
28
+ }
29
+
30
+ :focus:not(:focus-visible) {
31
+ box-shadow: none !important;
32
+ }
@@ -0,0 +1,8 @@
1
+ import 'react-native-gesture-handler'
2
+ import 'fast-text-encoding'
3
+
4
+ import { registerRootComponent } from 'expo'
5
+
6
+ import { App } from './App'
7
+
8
+ registerRootComponent(App)
@@ -0,0 +1,19 @@
1
+ const { getDefaultConfig } = require('expo/metro-config')
2
+ const path = require('path')
3
+
4
+ const projectRoot = __dirname
5
+
6
+ const config = getDefaultConfig(projectRoot)
7
+
8
+ config.transformer.babelTransformerPath = require.resolve('react-native-svg-transformer')
9
+ config.resolver.assetExts = config.resolver.assetExts.filter((ext) => ext !== 'svg')
10
+ if (!config.resolver.assetExts.includes('woff2')) {
11
+ config.resolver.assetExts.push('woff2')
12
+ }
13
+ config.resolver.sourceExts.push('svg')
14
+
15
+ config.resolver.extraNodeModules = {
16
+ '@': path.resolve(projectRoot, 'src'),
17
+ }
18
+
19
+ module.exports = config
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "my-idia-app",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "main": "index.ts",
6
+ "scripts": {
7
+ "dev": "expo start --web --offline",
8
+ "start": "expo start --offline",
9
+ "android": "expo start --android --offline",
10
+ "ios": "expo start --ios --offline",
11
+ "web": "expo start --web --offline",
12
+ "typecheck": "tsc --noEmit"
13
+ },
14
+ "dependencies": {
15
+ "@expo/metro-runtime": "~5.0.4",
16
+ "@idia-ui/core": "^0.2.0",
17
+ "@idia-ui/theme": "^0.2.0",
18
+ "@lottiefiles/dotlottie-react": "^0.13.5",
19
+ "@react-native-picker/picker": "^2.11.0",
20
+ "@react-navigation/native": "^6.1.18",
21
+ "@react-navigation/native-stack": "^6.11.0",
22
+ "@tamagui/animations-react-native": "^1.144.4",
23
+ "@tamagui/lucide-icons": "^1.144.4",
24
+ "@tamagui/shorthands": "^1.144.4",
25
+ "@tanstack/react-table": "^8.21.0",
26
+ "date-fns": "^4.1.0",
27
+ "expo": "~53.0.27",
28
+ "expo-linear-gradient": "^14.0.2",
29
+ "expo-status-bar": "~2.2.3",
30
+ "fast-text-encoding": "^1.0.6",
31
+ "libphonenumber-js": "^1.12.0",
32
+ "lottie-react-native": "^7.2.2",
33
+ "react": "^19.0.0",
34
+ "react-dom": "^19.0.0",
35
+ "react-native": "^0.79.0",
36
+ "react-native-gesture-handler": "~2.24.0",
37
+ "react-native-keyboard-aware-scroll-view": "^0.9.5",
38
+ "react-native-modal": "^13.0.1",
39
+ "react-native-reanimated": "^3.16.0",
40
+ "react-native-safe-area-context": "^5.4.0",
41
+ "react-native-screens": "~4.11.0",
42
+ "react-native-svg": "^15.11.2",
43
+ "react-native-web": "^0.20.0",
44
+ "tamagui": "^1.144.4",
45
+ "zustand": "^5.0.0",
46
+ "react-image-crop": "^11.0.0",
47
+ "@fullcalendar/core": "^6.1.0",
48
+ "@fullcalendar/daygrid": "^6.1.0",
49
+ "@fullcalendar/timegrid": "^6.1.0",
50
+ "@fullcalendar/interaction": "^6.1.0",
51
+ "@fullcalendar/multimonth": "^6.1.0",
52
+ "@fullcalendar/list": "^6.1.0",
53
+ "@fullcalendar/react": "^6.1.0"
54
+ },
55
+ "devDependencies": {
56
+ "@expo/metro-config": "0.20.18",
57
+ "@idia-ui/brain-pack": "workspace:*",
58
+ "@idia-ui/storybook-docs": "workspace:*",
59
+ "@idia-ui/storybook-preset-react-native-web": "workspace:*",
60
+ "@storybook/addon-a11y": "^8.4.7",
61
+ "@storybook/addon-docs": "^8.4.7",
62
+ "@storybook/addon-links": "^8.4.7",
63
+ "@storybook/react-vite": "^8.4.7",
64
+ "@tamagui/babel-plugin": "^1.144.4",
65
+ "@types/react": "^19.0.0",
66
+ "babel-plugin-module-resolver": "^5.0.2",
67
+ "babel-preset-expo": "~13.2.5",
68
+ "metro": "0.82.5",
69
+ "metro-babel-transformer": "0.82.5",
70
+ "metro-cache": "0.82.5",
71
+ "metro-config": "0.82.5",
72
+ "metro-core": "0.82.5",
73
+ "metro-file-map": "0.82.5",
74
+ "metro-resolver": "0.82.5",
75
+ "metro-runtime": "0.82.5",
76
+ "metro-source-map": "0.82.5",
77
+ "metro-transform-plugins": "0.82.5",
78
+ "metro-transform-worker": "0.82.5",
79
+ "react-native-svg-transformer": "^1.5.0",
80
+ "storybook": "^8.4.7",
81
+ "typescript": "^5.9.3",
82
+ "vite": "^5.4.0",
83
+ "vite-tsconfig-paths": "^4.3.0"
84
+ }
85
+ }
Binary file
@@ -0,0 +1,4 @@
1
+ /** EXPO_PUBLIC_* env pattern stub for future API keys and feature flags. */
2
+ export const env = {
3
+ apiUrl: process.env.EXPO_PUBLIC_API_URL ?? '',
4
+ } as const
@@ -0,0 +1,7 @@
1
+ /** Matches @idia-ui/core semver pin — update when packages bump. */
2
+ export const IDIA_CORE_VERSION = '0.2.0'
3
+
4
+ export const GITHUB_URL = 'https://github.com/idia-ui/idia-ui'
5
+
6
+ export const IDIA_INDEX_SKILL_URL =
7
+ 'https://raw.githubusercontent.com/idia-ui/idia-ui/main/skills/idia-index/SKILL.md'
@@ -0,0 +1,27 @@
1
+ import { createNativeStackNavigator } from '@react-navigation/native-stack'
2
+
3
+ import { HomeScreen } from '@/screens/Home/HomeScreen'
4
+ import { WelcomeScreen } from '@/screens/Welcome/WelcomeScreen'
5
+
6
+ import type { RootStackParamList } from './types'
7
+
8
+ const Stack = createNativeStackNavigator<RootStackParamList>()
9
+
10
+ export function RootNavigator() {
11
+ return (
12
+ <Stack.Navigator
13
+ initialRouteName="Welcome"
14
+ screenOptions={{
15
+ headerShown: true,
16
+ animation: 'fade',
17
+ }}
18
+ >
19
+ <Stack.Screen
20
+ name="Welcome"
21
+ component={WelcomeScreen}
22
+ options={{ title: 'Welcome' }}
23
+ />
24
+ <Stack.Screen name="Home" component={HomeScreen} options={{ title: 'Home' }} />
25
+ </Stack.Navigator>
26
+ )
27
+ }
@@ -0,0 +1,13 @@
1
+ import type { LinkingOptions } from '@react-navigation/native'
2
+
3
+ import type { RootStackParamList } from './types'
4
+
5
+ export const linking: LinkingOptions<RootStackParamList> = {
6
+ prefixes: ['my-idia-app://', 'https://my-idia-app.local'],
7
+ config: {
8
+ screens: {
9
+ Welcome: '',
10
+ Home: 'home',
11
+ },
12
+ },
13
+ }
@@ -0,0 +1,10 @@
1
+ export type RootStackParamList = {
2
+ Welcome: undefined
3
+ Home: undefined
4
+ }
5
+
6
+ declare global {
7
+ namespace ReactNavigation {
8
+ interface RootParamList extends RootStackParamList {}
9
+ }
10
+ }
@@ -0,0 +1,47 @@
1
+ import { ThemeProvider, useColorMode, waitForWebFonts } from '@idia-ui/theme'
2
+ import { NavigationContainer } from '@react-navigation/native'
3
+ import React, { useEffect, useState } from 'react'
4
+ import { StyleSheet } from 'react-native'
5
+ import { GestureHandlerRootView } from 'react-native-gesture-handler'
6
+ import { SafeAreaProvider } from 'react-native-safe-area-context'
7
+ import { TamaguiProvider, Theme } from 'tamagui'
8
+
9
+ import { linking } from '@/navigation/linking'
10
+ import tamaguiConfig from '../../tamagui.config'
11
+
12
+ function TamaguiThemeSync({ children }: { children: React.ReactNode }) {
13
+ const { colorMode } = useColorMode()
14
+ return <Theme name={colorMode}>{children}</Theme>
15
+ }
16
+
17
+ export function AppProviders({ children }: { children: React.ReactNode }) {
18
+ const [fontsReady, setFontsReady] = useState(false)
19
+
20
+ useEffect(() => {
21
+ void waitForWebFonts().then(() => setFontsReady(true))
22
+ }, [])
23
+
24
+ if (!fontsReady) {
25
+ return null
26
+ }
27
+
28
+ return (
29
+ <GestureHandlerRootView style={styles.root}>
30
+ <TamaguiProvider config={tamaguiConfig as never} defaultTheme="light">
31
+ <ThemeProvider defaultColorMode="system">
32
+ <TamaguiThemeSync>
33
+ <SafeAreaProvider>
34
+ <NavigationContainer linking={linking}>{children}</NavigationContainer>
35
+ </SafeAreaProvider>
36
+ </TamaguiThemeSync>
37
+ </ThemeProvider>
38
+ </TamaguiProvider>
39
+ </GestureHandlerRootView>
40
+ )
41
+ }
42
+
43
+ const styles = StyleSheet.create({
44
+ root: {
45
+ flex: 1,
46
+ },
47
+ })
@@ -0,0 +1,12 @@
1
+ import { H3, Text } from '@idia-ui/core'
2
+ import React from 'react'
3
+ import { YStack } from 'tamagui'
4
+
5
+ export function HomeScreen() {
6
+ return (
7
+ <YStack flex={1} padding="$6" justifyContent="center" alignItems="center" gap="$3">
8
+ <H3>Your app starts here.</H3>
9
+ <Text size="md">Replace this screen with your product experience.</Text>
10
+ </YStack>
11
+ )
12
+ }
@@ -0,0 +1,115 @@
1
+ import { Badge, Button, H2, H5, Link, Text } from '@idia-ui/core'
2
+ import { useColorMode, useIdiaTheme } from '@idia-ui/theme'
3
+ import type { NativeStackScreenProps } from '@react-navigation/native-stack'
4
+ import React from 'react'
5
+ import { Platform, ScrollView } from 'react-native'
6
+ import { YStack } from 'tamagui'
7
+
8
+ import { GITHUB_URL, IDIA_CORE_VERSION, IDIA_INDEX_SKILL_URL } from '@/config/versions'
9
+ import type { RootStackParamList } from '@/navigation/types'
10
+
11
+ type Props = NativeStackScreenProps<RootStackParamList, 'Welcome'>
12
+
13
+ const COMMANDS = [
14
+ {
15
+ label: 'Start development server',
16
+ command: 'pnpm dev',
17
+ note: 'Web-first in Phase 0; see README for native targets.',
18
+ },
19
+ {
20
+ label: 'Check setup health (future)',
21
+ command: 'idia-ui doctor',
22
+ note: 'Verifies providers, peers, and optional Storybook/brain packs.',
23
+ },
24
+ {
25
+ label: 'Add component browser (optional, future)',
26
+ command: 'idia-ui add storybook',
27
+ note: 'Optional — human docs and playground for @idia-ui/core.',
28
+ },
29
+ {
30
+ label: 'Add AI retrieval pack (optional, future)',
31
+ command: 'idia-ui add brain',
32
+ note: 'Optional — Cursor skills, rules, and ai-index for agents.',
33
+ },
34
+ {
35
+ label: 'Run Storybook (after install, future)',
36
+ command: 'pnpm storybook',
37
+ note: 'Available only after `idia-ui add storybook`.',
38
+ },
39
+ ] as const
40
+
41
+ function CommandBlock({ command }: { command: string }) {
42
+ const { colors } = useIdiaTheme()
43
+
44
+ return (
45
+ <YStack
46
+ padding="$3"
47
+ borderRadius="$3"
48
+ borderWidth={1}
49
+ borderColor={colors.borderNeutralSubtle300}
50
+ backgroundColor={colors.backgroundNeutralSubtle200}
51
+ >
52
+ <Text size="sm" style={{ fontFamily: 'monospace' }}>
53
+ {command}
54
+ </Text>
55
+ </YStack>
56
+ )
57
+ }
58
+
59
+ export function WelcomeScreen({ navigation }: Props) {
60
+ const { colorMode, toggleColorMode } = useColorMode()
61
+ const { colors } = useIdiaTheme()
62
+
63
+ return (
64
+ <ScrollView
65
+ contentContainerStyle={{
66
+ padding: 24,
67
+ gap: 24,
68
+ maxWidth: 720,
69
+ alignSelf: 'center',
70
+ width: '100%',
71
+ }}
72
+ >
73
+ <YStack gap="$3" alignItems="flex-start">
74
+ <Badge variant="gray" appearance="subtle" label={`@idia-ui/core v${IDIA_CORE_VERSION}`} />
75
+ <H2>Built with idia-ui</H2>
76
+ <Text size="md" style={{ color: colors.textNeutralSubtle400 }}>
77
+ A clean Expo shell using idia-ui runtime packages. Storybook and ds-brain are optional
78
+ add-ons you can install later — they are not required to run this app.
79
+ </Text>
80
+ </YStack>
81
+
82
+ <YStack gap="$3">
83
+ <Button variant="primary" label="Get started" onPress={() => navigation.navigate('Home')} />
84
+ <Button variant="secondary" label={`Toggle theme (${colorMode})`} onPress={toggleColorMode} />
85
+ </YStack>
86
+
87
+ <YStack gap="$4">
88
+ <H5>Command reference</H5>
89
+ {COMMANDS.map((item) => (
90
+ <YStack key={item.command} gap="$2">
91
+ <Text size="md" weight="semibold">
92
+ {item.label}
93
+ </Text>
94
+ <CommandBlock command={item.command} />
95
+ <Text size="sm" style={{ color: colors.textNeutralSubtle400 }}>
96
+ {item.note}
97
+ </Text>
98
+ </YStack>
99
+ ))}
100
+ </YStack>
101
+
102
+ <YStack gap="$2">
103
+ <H5>Links</H5>
104
+ <Link href={GITHUB_URL} label="idia-ui on GitHub" isExternal newTab />
105
+ {Platform.OS === 'web' ? (
106
+ <Link href={IDIA_INDEX_SKILL_URL} label="idia-index skill (raw)" isExternal newTab />
107
+ ) : null}
108
+ </YStack>
109
+
110
+ <Text size="sm" style={{ color: colors.textNeutralSubtle400 }}>
111
+ Customize `src/screens/Home/` to build your app.
112
+ </Text>
113
+ </ScrollView>
114
+ )
115
+ }
@@ -0,0 +1,31 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Button } from '@idia-ui/core';
3
+ import { BrainDocSections } from '@idia-ui/storybook-docs';
4
+
5
+ const meta = {
6
+ title: 'Components/Button',
7
+ component: Button,
8
+ tags: ['autodocs'],
9
+ parameters: {
10
+ docs: {
11
+ page: () => (
12
+ <>
13
+ <BrainDocSections
14
+ componentId="button"
15
+ sectionIds={['intent', 'usage', 'variants', 'accessibility']}
16
+ />
17
+ </>
18
+ ),
19
+ },
20
+ },
21
+ args: {
22
+ label: 'Button',
23
+ variant: 'primary',
24
+ },
25
+ } satisfies Meta<typeof Button>;
26
+
27
+ export default meta;
28
+
29
+ type Story = StoryObj<typeof meta>;
30
+
31
+ export const Playground: Story = {};