src/is the library source. Core components live insrc/components/(withlayouts/,inputs/,display/,typography/).- Theming and types are in
src/theme/andsrc/types/, with utilities insrc/utilities/. - Tests are co-located in
src/**/__tests__/and snapshots insrc/components/__tests__/. examples/contains the demo app (examples/app/) and a usage example file.dist/is generated build output.assets/fonts/holds font assets.
npm install: install dependencies.npm run build: compile TypeScript and bundle todist/.npm run build:watch: watch TypeScript compilation.npm test: run Jest unit tests.npm run test:coverage: run tests with coverage report incoverage/.npm run lint: run ESLint onsrc/.npm run format: run Prettier onsrc/**/*.{ts,tsx}.
- TypeScript with strict compiler options; React Native JSX.
- Formatting is enforced by Prettier: 2-space indentation, semicolons, single quotes, trailing commas (ES5), 100-char print width.
- ESLint enforces JSX prop braces and React Native lint rules.
- Components use
PascalCase.tsx; tests areComponent.test.tsx. - Prefer path aliases from
tsconfig.json, e.g.@components/Buttonor@theme/index.
- Test stack: Jest,
@testing-library/react-native,@testing-library/jest-native,ts-jest. - Coverage thresholds: branches 70%, functions 75%, lines 80%, statements 80%.
- Wrap components using
useTheme()with<ThemeProvider>in tests.
- Commits follow conventional prefixes seen in history:
feat:,fix:,docs:,style:,chore:,refactor:. Version bumps sometimes use bare versions like1.0.4. - PRs should include a short summary, tests run, and screenshots or screen recordings for UI changes. Link related issues and update
README.mdorCHANGELOG.mdwhen user-facing behavior changes.