novahiz 0.2.2 → 0.2.5
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/NOTICE.md +25 -15
- package/README.md +353 -355
- package/adapters/README.md +1 -1
- package/adapters/opencode/agent/novahiz.md +1 -2
- package/adapters/opencode/commands/novahiz-init.md +10 -0
- package/adapters/opencode/instructions.md +1 -1
- package/adapters/opencode/novahiz.ts +182 -4
- package/bin/novahiz.cmd +2 -2
- package/catalog/categories.json +1085 -1093
- package/catalog/overrides.json +12 -13
- package/catalog/providers.json +18 -34
- package/catalog/rules.json +15 -22
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/CATALOG.md +7 -6
- package/docs/CONFIGURATION.md +5 -5
- package/docs/CONSTITUTION.md +4 -4
- package/docs/GATE.md +7 -11
- package/docs/HARNESSES.md +11 -0
- package/docs/INSTALL.md +7 -5
- package/docs/PLUGIN.md +24 -6
- package/docs/PROVIDERS.md +12 -10
- package/docs/ROADMAPS.md +4 -3
- package/docs/RULES.md +11 -10
- package/install/bootstrap.mjs +9 -19
- package/install/install.mjs +23 -41
- package/mcp/novahiz-tools/index.mjs +35 -6
- package/novahiz.config.example.json +1 -5
- package/package.json +6 -7
- package/skills/apple-ui-audit/SKILL.md +95 -0
- package/skills/apple-ui-audit/references/screen-walkthrough.md +29 -0
- package/skills/browser-session/SKILL.md +61 -0
- package/skills/browser-session/references/session-run-sheet.md +30 -0
- package/skills/browser-session/scripts/browser_session_preflight.mjs +74 -0
- package/skills/browser-session/scripts/sample-run.json +5 -0
- package/skills/code-standards/SKILL.md +85 -0
- package/skills/code-standards/references/pr-review-worksheet.md +35 -0
- package/skills/design-token-pipeline/SKILL.md +85 -0
- package/skills/design-token-pipeline/references/dtcg-sample.json +37 -0
- package/skills/llm-threat-review/SKILL.md +99 -0
- package/skills/llm-threat-review/references/review-worksheet.md +34 -0
- package/skills/llm-threat-review/scripts/llm_risk_lint.mjs +105 -0
- package/skills/novahiz-audit/SKILL.md +1 -1
- package/skills/novahiz-gate/SKILL.md +7 -6
- package/skills/novahiz-humanizer/SKILL.md +1 -1
- package/skills/novahiz-implement/SKILL.md +1 -1
- package/skills/novahiz-init/SKILL.md +112 -0
- package/skills/novahiz-planner/SKILL.md +1 -2
- package/skills/openapi-mcp-server/SKILL.md +76 -0
- package/skills/openapi-mcp-server/references/mcp-ship-checklist.md +30 -0
- package/skills/openapi-mcp-server/references/tool-worksheet.md +30 -0
- package/skills/openapi-mcp-server/scripts/openapi_mcp_lint.mjs +133 -0
- package/skills/package-risk-audit/SKILL.md +83 -0
- package/skills/package-risk-audit/references/intake-worksheet.md +19 -0
- package/skills/package-risk-audit/scripts/dep_risk_lint.mjs +131 -0
- package/skills/secrets-hygiene/SKILL.md +62 -0
- package/skills/secrets-hygiene/references/rotation-playbook.md +27 -0
- package/skills/secrets-hygiene/scripts/secret_scan.mjs +120 -0
- package/skills/skill-authoring/SKILL.md +93 -0
- package/skills/skill-authoring/references/skill-template.md +59 -0
- package/skills/skill-authoring/scripts/skill_frontmatter_lint.mjs +65 -0
- package/skills/skill-eval-loop/SKILL.md +103 -0
- package/skills/skill-eval-loop/references/negative-patterns.md +12 -0
- package/skills/skill-eval-loop/references/run-sheet.md +40 -0
- package/skills/skill-eval-loop/scripts/skill_structure_check.mjs +100 -0
- package/skills/ui-craft-rules/SKILL.md +96 -0
- package/skills/ui-slop-remover/SKILL.md +110 -0
- package/skills/ui-slop-remover/references/tell-catalogue.md +58 -0
- package/skills/ui-slop-remover/scripts/slop_lint.mjs +119 -0
- package/src/autodocs.ts +192 -0
- package/src/cli.ts +8 -1
- package/src/commands/autodocs.ts +250 -0
- package/src/commands/doctor.ts +226 -217
- package/src/commands/gate.ts +16 -5
- package/src/commands/init.ts +356 -0
- package/src/commands/task.ts +20 -7
- package/src/gate.ts +401 -401
- package/src/ledger.ts +39 -0
- package/src/targets.ts +43 -7
- package/bundled-skills/ab-testing/SKILL.md +0 -353
- package/bundled-skills/ab-testing/evals/evals.json +0 -105
- package/bundled-skills/ab-testing/references/sample-size-guide.md +0 -263
- package/bundled-skills/ab-testing/references/test-templates.md +0 -277
- package/bundled-skills/ad-creative/SKILL.md +0 -425
- package/bundled-skills/ad-creative/assets/creative-review-template.html +0 -400
- package/bundled-skills/ad-creative/evals/evals.json +0 -217
- package/bundled-skills/ad-creative/references/creative-review-page.md +0 -106
- package/bundled-skills/ad-creative/references/creative-roadmap.md +0 -118
- package/bundled-skills/ad-creative/references/generative-tools.md +0 -637
- package/bundled-skills/ad-creative/references/hook-system.md +0 -115
- package/bundled-skills/ad-creative/references/imessage-video-ads.md +0 -201
- package/bundled-skills/ad-creative/references/meta-creative-formats.md +0 -114
- package/bundled-skills/ad-creative/references/motion-video-ads.md +0 -126
- package/bundled-skills/ad-creative/references/platform-specs.md +0 -213
- package/bundled-skills/ad-creative/references/short-form-video-specs.md +0 -213
- package/bundled-skills/ad-creative/references/static-ad-templates.md +0 -308
- package/bundled-skills/ads/SKILL.md +0 -499
- package/bundled-skills/ads/evals/evals.json +0 -157
- package/bundled-skills/ads/references/abm-playbook.md +0 -93
- package/bundled-skills/ads/references/ad-copy-templates.md +0 -207
- package/bundled-skills/ads/references/audience-targeting.md +0 -243
- package/bundled-skills/ads/references/audit-guardrails.md +0 -83
- package/bundled-skills/ads/references/b2b-paid-playbook.md +0 -115
- package/bundled-skills/ads/references/conversion-tracking.md +0 -361
- package/bundled-skills/ads/references/creative-research-automation.md +0 -103
- package/bundled-skills/ads/references/google-ads-audit-checklist.md +0 -84
- package/bundled-skills/ads/references/google-search-playbook.md +0 -120
- package/bundled-skills/ads/references/linkedin-b2b-playbook.md +0 -107
- package/bundled-skills/ads/references/meta-decision-system.md +0 -176
- package/bundled-skills/ads/references/payback-period.md +0 -69
- package/bundled-skills/ads/references/platform-setup-checklists.md +0 -277
- package/bundled-skills/ads/references/rsa-output-spec.md +0 -88
- package/bundled-skills/agent-device/SKILL.md +0 -20
- package/bundled-skills/ai-seo/SKILL.md +0 -488
- package/bundled-skills/ai-seo/evals/evals.json +0 -135
- package/bundled-skills/ai-seo/references/agent-readiness.md +0 -57
- package/bundled-skills/ai-seo/references/citations-vs-recommendations.md +0 -85
- package/bundled-skills/ai-seo/references/content-patterns.md +0 -287
- package/bundled-skills/ai-seo/references/content-types.md +0 -71
- package/bundled-skills/ai-seo/references/format-volatility.md +0 -98
- package/bundled-skills/ai-seo/references/okf.md +0 -104
- package/bundled-skills/ai-seo/references/platform-ranking-factors.md +0 -154
- package/bundled-skills/ai-seo/references/youtube-ai-citations.md +0 -60
- package/bundled-skills/analytics/SKILL.md +0 -310
- package/bundled-skills/analytics/evals/evals.json +0 -90
- package/bundled-skills/analytics/references/event-library.md +0 -260
- package/bundled-skills/analytics/references/ga4-implementation.md +0 -300
- package/bundled-skills/analytics/references/gtm-implementation.md +0 -390
- package/bundled-skills/android-emulator/SKILL.md +0 -32
- package/bundled-skills/android-reverse-engineering/LICENSE +0 -190
- package/bundled-skills/android-reverse-engineering/SKILL.md +0 -313
- package/bundled-skills/android-reverse-engineering/references/api-extraction-patterns.md +0 -197
- package/bundled-skills/android-reverse-engineering/references/call-flow-analysis.md +0 -210
- package/bundled-skills/android-reverse-engineering/references/fernflower-usage.md +0 -115
- package/bundled-skills/android-reverse-engineering/references/jadx-usage.md +0 -116
- package/bundled-skills/android-reverse-engineering/references/kotlin-name-recovery.md +0 -108
- package/bundled-skills/android-reverse-engineering/references/setup-guide.md +0 -221
- package/bundled-skills/android-reverse-engineering/references/third_party_hosts.txt +0 -122
- package/bundled-skills/android-reverse-engineering/scripts/check-deps.ps1 +0 -165
- package/bundled-skills/android-reverse-engineering/scripts/check-deps.sh +0 -129
- package/bundled-skills/android-reverse-engineering/scripts/decompile.ps1 +0 -400
- package/bundled-skills/android-reverse-engineering/scripts/decompile.sh +0 -578
- package/bundled-skills/android-reverse-engineering/scripts/find-api-calls.ps1 +0 -121
- package/bundled-skills/android-reverse-engineering/scripts/find-api-calls.sh +0 -339
- package/bundled-skills/android-reverse-engineering/scripts/fingerprint.sh +0 -241
- package/bundled-skills/android-reverse-engineering/scripts/install-dep.ps1 +0 -345
- package/bundled-skills/android-reverse-engineering/scripts/install-dep.sh +0 -448
- package/bundled-skills/android-reverse-engineering/scripts/lookup-name.sh +0 -85
- package/bundled-skills/android-reverse-engineering/scripts/recover-kotlin-names.sh +0 -140
- package/bundled-skills/build-graph/SKILL.md +0 -38
- package/bundled-skills/claude-history-ingest/SKILL.md +0 -463
- package/bundled-skills/claude-history-ingest/references/claude-data-format.md +0 -118
- package/bundled-skills/codex-history-ingest/SKILL.md +0 -248
- package/bundled-skills/codex-history-ingest/references/codex-data-format.md +0 -82
- package/bundled-skills/cold-email/SKILL.md +0 -159
- package/bundled-skills/cold-email/evals/evals.json +0 -94
- package/bundled-skills/cold-email/references/benchmarks.md +0 -83
- package/bundled-skills/cold-email/references/follow-up-sequences.md +0 -81
- package/bundled-skills/cold-email/references/frameworks.md +0 -90
- package/bundled-skills/cold-email/references/personalization.md +0 -79
- package/bundled-skills/cold-email/references/subject-lines.md +0 -53
- package/bundled-skills/competitor-profiling/SKILL.md +0 -415
- package/bundled-skills/competitor-profiling/evals/evals.json +0 -85
- package/bundled-skills/competitor-profiling/references/templates.md +0 -167
- package/bundled-skills/competitor-profiling/references/tool-reference.md +0 -179
- package/bundled-skills/computer-use/SKILL.md +0 -41
- package/bundled-skills/content-strategy/SKILL.md +0 -439
- package/bundled-skills/content-strategy/evals/evals.json +0 -116
- package/bundled-skills/content-strategy/references/content-distribution.md +0 -83
- package/bundled-skills/content-strategy/references/headless-cms.md +0 -194
- package/bundled-skills/copilot-history-ingest/SKILL.md +0 -376
- package/bundled-skills/copilot-history-ingest/references/copilot-data-format.md +0 -321
- package/bundled-skills/copy-editing/SKILL.md +0 -457
- package/bundled-skills/copy-editing/evals/evals.json +0 -89
- package/bundled-skills/copy-editing/references/checklist.md +0 -66
- package/bundled-skills/copy-editing/references/content-refresh.md +0 -38
- package/bundled-skills/copy-editing/references/plain-english-alternatives.md +0 -394
- package/bundled-skills/copywriting/SKILL.md +0 -256
- package/bundled-skills/copywriting/evals/evals.json +0 -126
- package/bundled-skills/copywriting/references/copy-frameworks.md +0 -433
- package/bundled-skills/copywriting/references/natural-transitions.md +0 -272
- package/bundled-skills/cro/SKILL.md +0 -187
- package/bundled-skills/cro/evals/evals.json +0 -111
- package/bundled-skills/cro/references/experiments.md +0 -248
- package/bundled-skills/cro/references/form.md +0 -422
- package/bundled-skills/cross-linker/SKILL.md +0 -309
- package/bundled-skills/customer-research/SKILL.md +0 -305
- package/bundled-skills/customer-research/evals/evals.json +0 -176
- package/bundled-skills/customer-research/references/interviews-and-surveys.md +0 -155
- package/bundled-skills/customer-research/references/source-guides.md +0 -401
- package/bundled-skills/daily-update/SKILL.md +0 -223
- package/bundled-skills/dart-add-unit-test/SKILL.md +0 -122
- package/bundled-skills/dart-build-cli-app/SKILL.md +0 -185
- package/bundled-skills/dart-collect-coverage/SKILL.md +0 -141
- package/bundled-skills/dart-fix-runtime-errors/SKILL.md +0 -166
- package/bundled-skills/dart-generate-test-mocks/SKILL.md +0 -155
- package/bundled-skills/dart-migrate-to-checks-package/SKILL.md +0 -528
- package/bundled-skills/dart-resolve-package-conflicts/SKILL.md +0 -116
- package/bundled-skills/dart-run-static-analysis/SKILL.md +0 -104
- package/bundled-skills/dart-setup-ffi-assets/SKILL.md +0 -419
- package/bundled-skills/dart-use-doc-examples/SKILL.md +0 -96
- package/bundled-skills/dart-use-ffigen/SKILL.md +0 -218
- package/bundled-skills/dart-use-pattern-matching/SKILL.md +0 -146
- package/bundled-skills/dart-use-primary-constructors/SKILL.md +0 -262
- package/bundled-skills/dart-write-documentation/SKILL.md +0 -136
- package/bundled-skills/debug-issue/SKILL.md +0 -28
- package/bundled-skills/dogfood/SKILL.md +0 -27
- package/bundled-skills/eas-app-stores/SKILL.md +0 -176
- package/bundled-skills/eas-app-stores/agents/openai.yaml +0 -4
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +0 -497
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +0 -376
- package/bundled-skills/eas-app-stores/references/native-ios.md +0 -167
- package/bundled-skills/eas-app-stores/references/play-store.md +0 -244
- package/bundled-skills/eas-app-stores/references/testflight.md +0 -62
- package/bundled-skills/eas-app-stores/references/workflows.md +0 -120
- package/bundled-skills/eas-hosting/SKILL.md +0 -431
- package/bundled-skills/eas-hosting/agents/openai.yaml +0 -4
- package/bundled-skills/eas-observe/SKILL.md +0 -54
- package/bundled-skills/eas-observe/agents/openai.yaml +0 -4
- package/bundled-skills/eas-observe/references/metrics.md +0 -98
- package/bundled-skills/eas-observe/references/queries.md +0 -403
- package/bundled-skills/eas-observe/references/setup.md +0 -476
- package/bundled-skills/eas-observe/references/third-party.md +0 -136
- package/bundled-skills/eas-simulator/SKILL.md +0 -208
- package/bundled-skills/eas-simulator/agents/openai.yaml +0 -4
- package/bundled-skills/eas-simulator/references/controllers.md +0 -106
- package/bundled-skills/eas-simulator/references/run-your-app.md +0 -224
- package/bundled-skills/eas-simulator/references/troubleshooting.md +0 -44
- package/bundled-skills/eas-update/SKILL.md +0 -146
- package/bundled-skills/eas-update/agents/openai.yaml +0 -4
- package/bundled-skills/eas-update-insights/SKILL.md +0 -238
- package/bundled-skills/eas-update-insights/agents/openai.yaml +0 -4
- package/bundled-skills/eas-update-insights/references/channel-insights-schema.md +0 -47
- package/bundled-skills/eas-update-insights/references/update-insights-schema.md +0 -69
- package/bundled-skills/eas-workflows/SKILL.md +0 -99
- package/bundled-skills/eas-workflows/agents/openai.yaml +0 -4
- package/bundled-skills/eas-workflows/scripts/fetch.js +0 -109
- package/bundled-skills/eas-workflows/scripts/package.json +0 -6
- package/bundled-skills/emails/SKILL.md +0 -311
- package/bundled-skills/emails/evals/evals.json +0 -93
- package/bundled-skills/emails/references/copy-guidelines.md +0 -113
- package/bundled-skills/emails/references/email-types.md +0 -515
- package/bundled-skills/emails/references/sequence-templates.md +0 -168
- package/bundled-skills/explore-codebase/SKILL.md +0 -29
- package/bundled-skills/expo-animation/LICENSE +0 -21
- package/bundled-skills/expo-animation/RECIPES.md +0 -385
- package/bundled-skills/expo-animation/SKILL.md +0 -267
- package/bundled-skills/expo-animation/agents/openai.yaml +0 -4
- package/bundled-skills/expo-app-clip/SKILL.md +0 -290
- package/bundled-skills/expo-app-clip/agents/openai.yaml +0 -4
- package/bundled-skills/expo-app-clip/references/native-module.md +0 -96
- package/bundled-skills/expo-brownfield/SKILL.md +0 -62
- package/bundled-skills/expo-brownfield/agents/openai.yaml +0 -4
- package/bundled-skills/expo-brownfield/references/brownfield-integrated.md +0 -526
- package/bundled-skills/expo-brownfield/references/brownfield-isolated.md +0 -451
- package/bundled-skills/expo-brownfield/references/comparison.md +0 -63
- package/bundled-skills/expo-brownfield/references/troubleshooting.md +0 -88
- package/bundled-skills/expo-data-fetching/SKILL.md +0 -478
- package/bundled-skills/expo-data-fetching/agents/openai.yaml +0 -4
- package/bundled-skills/expo-data-fetching/references/expo-router-loaders.md +0 -341
- package/bundled-skills/expo-data-fetching/references/offline-and-cancellation.md +0 -68
- package/bundled-skills/expo-design-system/SKILL.md +0 -376
- package/bundled-skills/expo-design-system/agents/openai.yaml +0 -4
- package/bundled-skills/expo-design-system/references/audit.md +0 -190
- package/bundled-skills/expo-design-system/references/native-slop.md +0 -74
- package/bundled-skills/expo-dev-client/SKILL.md +0 -182
- package/bundled-skills/expo-dev-client/agents/openai.yaml +0 -4
- package/bundled-skills/expo-dom/SKILL.md +0 -425
- package/bundled-skills/expo-dom/agents/openai.yaml +0 -4
- package/bundled-skills/expo-examples/SKILL.md +0 -106
- package/bundled-skills/expo-examples/agents/openai.yaml +0 -4
- package/bundled-skills/expo-examples/references/catalog.md +0 -105
- package/bundled-skills/expo-migrate-module/SKILL.md +0 -113
- package/bundled-skills/expo-migrate-module/agents/openai.yaml +0 -4
- package/bundled-skills/expo-migrate-module/references/compatibility.md +0 -73
- package/bundled-skills/expo-migrate-module/references/example.md +0 -212
- package/bundled-skills/expo-migrate-module/references/migration-map.md +0 -306
- package/bundled-skills/expo-module/SKILL.md +0 -151
- package/bundled-skills/expo-module/agents/openai.yaml +0 -4
- package/bundled-skills/expo-module/references/config-plugin.md +0 -90
- package/bundled-skills/expo-module/references/create-expo-module.md +0 -206
- package/bundled-skills/expo-module/references/lifecycle.md +0 -127
- package/bundled-skills/expo-module/references/module-config.md +0 -48
- package/bundled-skills/expo-module/references/native-module.md +0 -286
- package/bundled-skills/expo-module/references/native-view.md +0 -171
- package/bundled-skills/expo-native-ui/SKILL.md +0 -201
- package/bundled-skills/expo-native-ui/agents/openai.yaml +0 -4
- package/bundled-skills/expo-native-ui/references/controls.md +0 -231
- package/bundled-skills/expo-native-ui/references/gradients.md +0 -106
- package/bundled-skills/expo-native-ui/references/icons.md +0 -232
- package/bundled-skills/expo-native-ui/references/media.md +0 -193
- package/bundled-skills/expo-native-ui/references/storage.md +0 -121
- package/bundled-skills/expo-native-ui/references/visual-effects.md +0 -198
- package/bundled-skills/expo-native-ui/references/webgpu-three.md +0 -605
- package/bundled-skills/expo-overview/SKILL.md +0 -115
- package/bundled-skills/expo-overview/agents/openai.yaml +0 -4
- package/bundled-skills/expo-project-structure/SKILL.md +0 -114
- package/bundled-skills/expo-project-structure/agents/openai.yaml +0 -4
- package/bundled-skills/expo-router/SKILL.md +0 -240
- package/bundled-skills/expo-router/agents/openai.yaml +0 -4
- package/bundled-skills/expo-router/references/form-sheet.md +0 -253
- package/bundled-skills/expo-router/references/route-structure.md +0 -229
- package/bundled-skills/expo-router/references/search.md +0 -248
- package/bundled-skills/expo-router/references/tabs.md +0 -433
- package/bundled-skills/expo-router/references/toolbar-and-headers.md +0 -284
- package/bundled-skills/expo-router/references/zoom-transitions.md +0 -158
- package/bundled-skills/expo-skill-eval/SKILL.md +0 -314
- package/bundled-skills/expo-skill-eval/agents/visual-grader.md +0 -52
- package/bundled-skills/expo-skill-eval/references/design-rubric.md +0 -45
- package/bundled-skills/expo-skill-eval/references/runtime-matrix.md +0 -34
- package/bundled-skills/expo-skill-eval/scripts/check-static.sh +0 -64
- package/bundled-skills/expo-skill-eval/scripts/clean-fixture.sh +0 -56
- package/bundled-skills/expo-skill-eval/scripts/generate_viewer.py +0 -450
- package/bundled-skills/expo-skill-eval/scripts/latest-sdk.sh +0 -46
- package/bundled-skills/expo-skill-eval/scripts/make-fixture.sh +0 -95
- package/bundled-skills/expo-skill-eval/scripts/make-workspace.sh +0 -31
- package/bundled-skills/expo-skill-eval/scripts/snapshot-android.sh +0 -284
- package/bundled-skills/expo-skill-eval/scripts/snapshot-ios.sh +0 -132
- package/bundled-skills/expo-skill-eval/scripts/snapshot-web.sh +0 -61
- package/bundled-skills/expo-skill-feedback/SKILL.md +0 -87
- package/bundled-skills/expo-skill-feedback/agents/openai.yaml +0 -4
- package/bundled-skills/expo-skill-feedback/scripts/skill-event.cjs +0 -180
- package/bundled-skills/expo-skill-feedback/scripts/telemetry.cjs +0 -65
- package/bundled-skills/expo-skill-feedback/scripts/telemetry_common.cjs +0 -171
- package/bundled-skills/expo-ui/SKILL.md +0 -101
- package/bundled-skills/expo-ui/agents/openai.yaml +0 -4
- package/bundled-skills/expo-ui/references/drop-in-replacements.md +0 -27
- package/bundled-skills/expo-ui/references/jetpack-compose.md +0 -73
- package/bundled-skills/expo-ui/references/swift-ui.md +0 -73
- package/bundled-skills/expo-ui/references/universal.md +0 -104
- package/bundled-skills/expo-ui/scripts/list-components.js +0 -193
- package/bundled-skills/expo-upgrade/SKILL.md +0 -150
- package/bundled-skills/expo-upgrade/agents/openai.yaml +0 -4
- package/bundled-skills/expo-upgrade/references/expo-av-to-audio.md +0 -132
- package/bundled-skills/expo-upgrade/references/expo-av-to-video.md +0 -160
- package/bundled-skills/expo-upgrade/references/native-tabs.md +0 -124
- package/bundled-skills/expo-upgrade/references/new-architecture.md +0 -79
- package/bundled-skills/expo-upgrade/references/react-19.md +0 -79
- package/bundled-skills/expo-upgrade/references/react-compiler.md +0 -59
- package/bundled-skills/expo-upgrade/references/react-navigation-to-expo-router.md +0 -61
- package/bundled-skills/expo-web-to-native/SKILL.md +0 -91
- package/bundled-skills/expo-web-to-native/agents/openai.yaml +0 -4
- package/bundled-skills/expo-web-to-native/references/false-friends.md +0 -119
- package/bundled-skills/expo-web-to-native/references/native-patterns.md +0 -39
- package/bundled-skills/expo-web-to-native/references/run-as-goal.md +0 -48
- package/bundled-skills/expo-web-to-native/references/verify-on-device.md +0 -45
- package/bundled-skills/find-skills/SKILL.md +0 -141
- package/bundled-skills/flutter-add-integration-test/SKILL.md +0 -163
- package/bundled-skills/flutter-add-widget-preview/SKILL.md +0 -145
- package/bundled-skills/flutter-add-widget-test/SKILL.md +0 -154
- package/bundled-skills/flutter-apply-architecture-best-practices/SKILL.md +0 -162
- package/bundled-skills/flutter-build-responsive-layout/SKILL.md +0 -139
- package/bundled-skills/flutter-fix-layout-issues/SKILL.md +0 -130
- package/bundled-skills/flutter-implement-json-serialization/SKILL.md +0 -153
- package/bundled-skills/flutter-setup-declarative-routing/SKILL.md +0 -255
- package/bundled-skills/flutter-setup-localization/SKILL.md +0 -210
- package/bundled-skills/flutter-use-http-package/SKILL.md +0 -174
- package/bundled-skills/graph-colorize/SKILL.md +0 -180
- package/bundled-skills/hermes-history-ingest/SKILL.md +0 -239
- package/bundled-skills/hermes-history-ingest/references/hermes-data-format.md +0 -131
- package/bundled-skills/impl-validator/SKILL.md +0 -118
- package/bundled-skills/ios-simulator/SKILL.md +0 -32
- package/bundled-skills/json-canvas/SKILL.md +0 -244
- package/bundled-skills/json-canvas/references/EXAMPLES.md +0 -329
- package/bundled-skills/launch/SKILL.md +0 -381
- package/bundled-skills/launch/evals/evals.json +0 -106
- package/bundled-skills/llm-wiki/SKILL.md +0 -661
- package/bundled-skills/llm-wiki/references/WRITING.md +0 -28
- package/bundled-skills/llm-wiki/references/karpathy-pattern.md +0 -45
- package/bundled-skills/marketing-plan/SKILL.md +0 -300
- package/bundled-skills/marketing-plan/evals/evals.json +0 -112
- package/bundled-skills/marketing-plan/references/aarrr-framework.md +0 -180
- package/bundled-skills/marketing-plan/references/budget-planning.md +0 -168
- package/bundled-skills/marketing-plan/references/client-types.md +0 -373
- package/bundled-skills/marketing-plan/references/current-state-rubric.md +0 -255
- package/bundled-skills/marketing-plan/references/example-quietude.md +0 -972
- package/bundled-skills/marketing-plan/references/funding-stage-unlocks.md +0 -230
- package/bundled-skills/marketing-plan/references/growth-patterns.md +0 -190
- package/bundled-skills/marketing-plan/references/idea-cross-reference.md +0 -265
- package/bundled-skills/marketing-plan/references/measurement-framework.md +0 -213
- package/bundled-skills/marketing-plan/references/methodology.md +0 -363
- package/bundled-skills/marketing-plan/references/ops-stack-mapping.md +0 -197
- package/bundled-skills/marketing-plan/references/plan-template.md +0 -494
- package/bundled-skills/marketing-plan/references/team-and-agency-model.md +0 -278
- package/bundled-skills/marketing-psychology/SKILL.md +0 -455
- package/bundled-skills/marketing-psychology/evals/evals.json +0 -88
- package/bundled-skills/memory-bridge/SKILL.md +0 -163
- package/bundled-skills/memory-save/SKILL.md +0 -88
- package/bundled-skills/obsidian-bases/SKILL.md +0 -499
- package/bundled-skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md +0 -173
- package/bundled-skills/obsidian-cli/SKILL.md +0 -106
- package/bundled-skills/obsidian-layout-adjustment/SKILL.md +0 -226
- package/bundled-skills/obsidian-layout-adjustment/evals/evals.json +0 -53
- package/bundled-skills/obsidian-layout-adjustment/references/workflow-reference.md +0 -212
- package/bundled-skills/obsidian-markdown/SKILL.md +0 -196
- package/bundled-skills/obsidian-markdown/references/CALLOUTS.md +0 -58
- package/bundled-skills/obsidian-markdown/references/EMBEDS.md +0 -70
- package/bundled-skills/obsidian-markdown/references/PROPERTIES.md +0 -61
- package/bundled-skills/offers/SKILL.md +0 -155
- package/bundled-skills/offers/evals/evals.json +0 -21
- package/bundled-skills/offers/references/bonus-stacking.md +0 -150
- package/bundled-skills/offers/references/examples.md +0 -215
- package/bundled-skills/offers/references/guarantee-design.md +0 -172
- package/bundled-skills/offers/references/offer-anatomy.md +0 -203
- package/bundled-skills/offers/references/offer-formats.md +0 -240
- package/bundled-skills/offers/references/saas-offers.md +0 -116
- package/bundled-skills/offers/references/scarcity-urgency.md +0 -175
- package/bundled-skills/offers/references/value-equation.md +0 -134
- package/bundled-skills/onboarding/SKILL.md +0 -261
- package/bundled-skills/onboarding/evals/evals.json +0 -108
- package/bundled-skills/onboarding/references/activation-models.md +0 -57
- package/bundled-skills/onboarding/references/experiments.md +0 -258
- package/bundled-skills/onboarding/references/minimum-path-to-value.md +0 -49
- package/bundled-skills/openclaw-history-ingest/SKILL.md +0 -257
- package/bundled-skills/openclaw-history-ingest/references/openclaw-data-format.md +0 -154
- package/bundled-skills/orchestration/SKILL.md +0 -69
- package/bundled-skills/pi-history-ingest/SKILL.md +0 -312
- package/bundled-skills/pricing/SKILL.md +0 -295
- package/bundled-skills/pricing/evals/evals.json +0 -119
- package/bundled-skills/pricing/references/pricing-models.md +0 -66
- package/bundled-skills/pricing/references/pricing-page-teardown.md +0 -85
- package/bundled-skills/pricing/references/research-methods.md +0 -152
- package/bundled-skills/pricing/references/tier-structure.md +0 -232
- package/bundled-skills/product-marketing/SKILL.md +0 -255
- package/bundled-skills/product-marketing/evals/evals.json +0 -98
- package/bundled-skills/prospecting/SKILL.md +0 -262
- package/bundled-skills/prospecting/evals/evals.json +0 -122
- package/bundled-skills/prospecting/references/b2b-prospecting.md +0 -106
- package/bundled-skills/prospecting/references/compliance.md +0 -123
- package/bundled-skills/prospecting/references/data-sources.md +0 -287
- package/bundled-skills/prospecting/references/demand-signals.md +0 -129
- package/bundled-skills/prospecting/references/local-prospecting.md +0 -165
- package/bundled-skills/prospecting/references/saas-prospecting.md +0 -123
- package/bundled-skills/refactor-safely/SKILL.md +0 -29
- package/bundled-skills/review-delta/SKILL.md +0 -46
- package/bundled-skills/review-pr/SKILL.md +0 -66
- package/bundled-skills/sales-enablement/SKILL.md +0 -359
- package/bundled-skills/sales-enablement/evals/evals.json +0 -91
- package/bundled-skills/sales-enablement/references/deck-frameworks.md +0 -263
- package/bundled-skills/sales-enablement/references/demo-scripts.md +0 -355
- package/bundled-skills/sales-enablement/references/objection-library.md +0 -270
- package/bundled-skills/sales-enablement/references/one-pager-templates.md +0 -208
- package/bundled-skills/seo-audit/SKILL.md +0 -499
- package/bundled-skills/seo-audit/evals/evals.json +0 -136
- package/bundled-skills/seo-audit/references/ai-writing-detection.md +0 -200
- package/bundled-skills/seo-audit/references/international-seo.md +0 -230
- package/bundled-skills/session-brain/SKILL.md +0 -101
- package/bundled-skills/session-search/SKILL.md +0 -97
- package/bundled-skills/social/SKILL.md +0 -413
- package/bundled-skills/social/evals/evals.json +0 -107
- package/bundled-skills/social/references/carousel-frameworks.md +0 -141
- package/bundled-skills/social/references/listening-sources-template.md +0 -123
- package/bundled-skills/social/references/listening.md +0 -283
- package/bundled-skills/social/references/platform-limits.md +0 -110
- package/bundled-skills/social/references/platforms.md +0 -170
- package/bundled-skills/social/references/post-templates.md +0 -179
- package/bundled-skills/social/references/reverse-engineering.md +0 -195
- package/bundled-skills/social/references/short-form-video.md +0 -237
- package/bundled-skills/tag-taxonomy/SKILL.md +0 -218
- package/bundled-skills/vault-skill-factory/SKILL.md +0 -143
- package/bundled-skills/video/SKILL.md +0 -346
- package/bundled-skills/video/evals/evals.json +0 -103
- package/bundled-skills/video/references/ai-video-prompting.md +0 -175
- package/bundled-skills/video/references/edit-anatomy.md +0 -84
- package/bundled-skills/wiki-agent/SKILL.md +0 -322
- package/bundled-skills/wiki-capture/SKILL.md +0 -337
- package/bundled-skills/wiki-capture/references/RAW-FORMAT.md +0 -115
- package/bundled-skills/wiki-context-pack/SKILL.md +0 -89
- package/bundled-skills/wiki-dashboard/SKILL.md +0 -472
- package/bundled-skills/wiki-dedup/SKILL.md +0 -320
- package/bundled-skills/wiki-digest/SKILL.md +0 -243
- package/bundled-skills/wiki-export/SKILL.md +0 -445
- package/bundled-skills/wiki-history-ingest/SKILL.md +0 -61
- package/bundled-skills/wiki-import/SKILL.md +0 -276
- package/bundled-skills/wiki-ingest/SKILL.md +0 -563
- package/bundled-skills/wiki-ingest/references/ingest-prompts.md +0 -54
- package/bundled-skills/wiki-ingest/references/pageindex.md +0 -72
- package/bundled-skills/wiki-ingest/references/url-sources.md +0 -295
- package/bundled-skills/wiki-lint/SKILL.md +0 -643
- package/bundled-skills/wiki-narrate/SKILL.md +0 -120
- package/bundled-skills/wiki-narrate/references/voices.md +0 -29
- package/bundled-skills/wiki-query/SKILL.md +0 -307
- package/bundled-skills/wiki-rebuild/SKILL.md +0 -212
- package/bundled-skills/wiki-research/SKILL.md +0 -319
- package/bundled-skills/wiki-setup/SKILL.md +0 -359
- package/bundled-skills/wiki-stage-commit/SKILL.md +0 -164
- package/bundled-skills/wiki-status/SKILL.md +0 -556
- package/bundled-skills/wiki-switch/SKILL.md +0 -115
- package/bundled-skills/wiki-synthesize/SKILL.md +0 -212
- package/bundled-skills/wiki-update/SKILL.md +0 -271
- package/skills/ai-security/SKILL.md +0 -132
- package/skills/ai-security/references/atlas-coverage.md +0 -60
- package/skills/ai-security/scripts/ai_threat_scanner.py +0 -373
- package/skills/anti-AI-design/SKILL.md +0 -72
- package/skills/apple-hig-audit/SKILL.md +0 -64
- package/skills/apple-hig-audit/references/accessibility.md +0 -78
- package/skills/apple-hig-audit/references/platform-specifics.md +0 -57
- package/skills/apple-hig-audit/references/visual-design.md +0 -68
- package/skills/apple-hig-audit/scripts/hig_checker.py +0 -115
- package/skills/apple-hig-audit/templates/hig-audit-template.md +0 -114
- package/skills/dependency-auditor/README.md +0 -98
- package/skills/dependency-auditor/SKILL.md +0 -114
- package/skills/dependency-auditor/assets/sample_go.mod +0 -53
- package/skills/dependency-auditor/assets/sample_package.json +0 -72
- package/skills/dependency-auditor/assets/sample_requirements.txt +0 -71
- package/skills/dependency-auditor/expected_outputs/sample_license_report.txt +0 -37
- package/skills/dependency-auditor/expected_outputs/sample_upgrade_plan.txt +0 -59
- package/skills/dependency-auditor/expected_outputs/sample_vulnerability_report.json +0 -71
- package/skills/dependency-auditor/references/dependency_management_best_practices.md +0 -46
- package/skills/dependency-auditor/references/license_compatibility_matrix.md +0 -57
- package/skills/dependency-auditor/references/vulnerability_assessment_guide.md +0 -62
- package/skills/dependency-auditor/scripts/dep_scanner.py +0 -595
- package/skills/dependency-auditor/scripts/license_checker.py +0 -442
- package/skills/dependency-auditor/scripts/upgrade_planner.py +0 -490
- package/skills/dependency-auditor/test-inventory.json +0 -421
- package/skills/dependency-auditor/test-project/package.json +0 -72
- package/skills/design-system-tokens/SKILL.md +0 -90
- package/skills/design-system-tokens/assets/design_system_doc_template.md +0 -129
- package/skills/design-system-tokens/references/component-architecture.md +0 -88
- package/skills/design-system-tokens/references/developer-handoff.md +0 -61
- package/skills/design-system-tokens/references/responsive-calculations.md +0 -72
- package/skills/design-system-tokens/references/token-generation.md +0 -62
- package/skills/design-system-tokens/scripts/design_token_generator.py +0 -315
- package/skills/engineering-code-standards/SKILL.md +0 -174
- package/skills/env-secrets-manager/SKILL.md +0 -102
- package/skills/env-secrets-manager/references/secret-patterns.md +0 -56
- package/skills/env-secrets-manager/references/validation-detection-rotation.md +0 -76
- package/skills/env-secrets-manager/scripts/env_auditor.py +0 -340
- package/skills/frontend-design-taste/SKILL.md +0 -62
- package/skills/mcp-server-builder/README.md +0 -42
- package/skills/mcp-server-builder/SKILL.md +0 -144
- package/skills/mcp-server-builder/references/openapi-extraction-guide.md +0 -34
- package/skills/mcp-server-builder/references/production-hardening-guide.md +0 -80
- package/skills/mcp-server-builder/references/python-server-template.md +0 -22
- package/skills/mcp-server-builder/references/spec-compatibility.md +0 -129
- package/skills/mcp-server-builder/references/typescript-server-template.md +0 -19
- package/skills/mcp-server-builder/references/validation-checklist.md +0 -30
- package/skills/mcp-server-builder/scripts/mcp_validator.py +0 -180
- package/skills/mcp-server-builder/scripts/openapi_to_mcp.py +0 -279
- package/skills/playwright-agent/SKILL.md +0 -147
- package/skills/skill-creator/LICENSE.txt +0 -14
- package/skills/skill-creator/SKILL.md +0 -471
- package/skills/skill-creator/agents/analyzer.md +0 -274
- package/skills/skill-creator/agents/comparator.md +0 -202
- package/skills/skill-creator/agents/grader.md +0 -223
- package/skills/skill-creator/assets/eval_review.html +0 -143
- package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
- package/skills/skill-creator/eval-viewer/viewer.html +0 -1321
- package/skills/skill-creator/references/schemas.md +0 -430
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/skills/skill-creator/scripts/generate_report.py +0 -322
- package/skills/skill-creator/scripts/improve_description.py +0 -247
- package/skills/skill-creator/scripts/package_skill.py +0 -136
- package/skills/skill-creator/scripts/quick_validate.py +0 -103
- package/skills/skill-creator/scripts/run_eval.py +0 -310
- package/skills/skill-creator/scripts/run_loop.py +0 -328
- package/skills/skill-creator/scripts/utils.py +0 -47
- package/skills/write-a-skill/SKILL.md +0 -111
- package/skills/write-a-skill/references/companion_tooling.md +0 -61
- package/skills/write-a-skill/references/description_design_patterns.md +0 -136
- package/skills/write-a-skill/references/progressive_disclosure_principles.md +0 -87
- package/skills/write-a-skill/references/quality_gates_for_skills.md +0 -158
- package/skills/write-a-skill/scripts/skill_description_validator.py +0 -241
- package/skills/write-a-skill/scripts/skill_review_checklist_runner.py +0 -257
- package/skills/write-a-skill/scripts/skill_structure_validator.py +0 -265
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# CSS Gradients
|
|
2
|
-
|
|
3
|
-
> **New Architecture Only**: CSS gradients require React Native's New Architecture (Fabric). They are not available in the old architecture or Expo Go.
|
|
4
|
-
|
|
5
|
-
Use CSS gradients with the `experimental_backgroundImage` style property.
|
|
6
|
-
|
|
7
|
-
## Linear Gradients
|
|
8
|
-
|
|
9
|
-
```tsx
|
|
10
|
-
// Top to bottom
|
|
11
|
-
<View style={{
|
|
12
|
-
experimental_backgroundImage: 'linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%)'
|
|
13
|
-
}} />
|
|
14
|
-
|
|
15
|
-
// Left to right
|
|
16
|
-
<View style={{
|
|
17
|
-
experimental_backgroundImage: 'linear-gradient(to right, #ff0000 0%, #0000ff 100%)'
|
|
18
|
-
}} />
|
|
19
|
-
|
|
20
|
-
// Diagonal
|
|
21
|
-
<View style={{
|
|
22
|
-
experimental_backgroundImage: 'linear-gradient(45deg, #ff0000 0%, #00ff00 50%, #0000ff 100%)'
|
|
23
|
-
}} />
|
|
24
|
-
|
|
25
|
-
// Using degrees
|
|
26
|
-
<View style={{
|
|
27
|
-
experimental_backgroundImage: 'linear-gradient(135deg, transparent 0%, black 100%)'
|
|
28
|
-
}} />
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Radial Gradients
|
|
32
|
-
|
|
33
|
-
```tsx
|
|
34
|
-
// Circle at center
|
|
35
|
-
<View style={{
|
|
36
|
-
experimental_backgroundImage: 'radial-gradient(circle at center, rgba(255, 0, 0, 1) 0%, rgba(0, 0, 255, 1) 100%)'
|
|
37
|
-
}} />
|
|
38
|
-
|
|
39
|
-
// Ellipse
|
|
40
|
-
<View style={{
|
|
41
|
-
experimental_backgroundImage: 'radial-gradient(ellipse at center, #fff 0%, #000 100%)'
|
|
42
|
-
}} />
|
|
43
|
-
|
|
44
|
-
// Positioned
|
|
45
|
-
<View style={{
|
|
46
|
-
experimental_backgroundImage: 'radial-gradient(circle at top left, #ff0000 0%, transparent 70%)'
|
|
47
|
-
}} />
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Multiple Gradients
|
|
51
|
-
|
|
52
|
-
Stack multiple gradients by comma-separating them:
|
|
53
|
-
|
|
54
|
-
```tsx
|
|
55
|
-
<View style={{
|
|
56
|
-
experimental_backgroundImage: `
|
|
57
|
-
linear-gradient(to bottom, transparent 0%, black 100%),
|
|
58
|
-
radial-gradient(circle at top right, rgba(255, 0, 0, 0.5) 0%, transparent 50%)
|
|
59
|
-
`
|
|
60
|
-
}} />
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Common Patterns
|
|
64
|
-
|
|
65
|
-
### Overlay on Image
|
|
66
|
-
|
|
67
|
-
```tsx
|
|
68
|
-
<View style={{ position: 'relative' }}>
|
|
69
|
-
<Image source={{ uri: '...' }} style={{ width: '100%', height: 200 }} />
|
|
70
|
-
<View style={{
|
|
71
|
-
position: 'absolute',
|
|
72
|
-
inset: 0,
|
|
73
|
-
experimental_backgroundImage: 'linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%)'
|
|
74
|
-
}} />
|
|
75
|
-
</View>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Frosted Glass Effect
|
|
79
|
-
|
|
80
|
-
```tsx
|
|
81
|
-
<View style={{
|
|
82
|
-
experimental_backgroundImage: 'linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%)',
|
|
83
|
-
backdropFilter: 'blur(10px)',
|
|
84
|
-
}} />
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Button Gradient
|
|
88
|
-
|
|
89
|
-
```tsx
|
|
90
|
-
<Pressable style={{
|
|
91
|
-
experimental_backgroundImage: 'linear-gradient(to bottom, #4CAF50 0%, #388E3C 100%)',
|
|
92
|
-
padding: 16,
|
|
93
|
-
borderRadius: 8,
|
|
94
|
-
}}>
|
|
95
|
-
<Text style={{ color: 'white', textAlign: 'center' }}>Submit</Text>
|
|
96
|
-
</Pressable>
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
## Important Notes
|
|
100
|
-
|
|
101
|
-
- Do NOT use `expo-linear-gradient` — use CSS gradients instead
|
|
102
|
-
- Gradients are strings, not objects
|
|
103
|
-
- Use `rgba()` for transparency, or `transparent` keyword
|
|
104
|
-
- Color stops use percentages (0%, 50%, 100%)
|
|
105
|
-
- Direction keywords: `to top`, `to bottom`, `to left`, `to right`, `to top left`, etc.
|
|
106
|
-
- Degree values: `45deg`, `90deg`, `135deg`, etc.
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
# Icons (SF Symbols)
|
|
2
|
-
|
|
3
|
-
Use SF Symbols on iOS for native feel. SF Symbols are an Apple asset and never render on Android - every icon needs a Material counterpart (see "Android: Material Icons" below). Never use FontAwesome or Ionicons on either platform, and never emoji as icons.
|
|
4
|
-
|
|
5
|
-
## Basic Usage
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import { SymbolView } from "expo-symbols";
|
|
9
|
-
import { colors } from "@/theme/colors";
|
|
10
|
-
|
|
11
|
-
<SymbolView
|
|
12
|
-
tintColor={colors.label}
|
|
13
|
-
resizeMode="scaleAspectFit"
|
|
14
|
-
name="square.and.arrow.down"
|
|
15
|
-
style={{ width: 16, height: 16 }}
|
|
16
|
-
/>;
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Props
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
<SymbolView
|
|
23
|
-
name="star.fill" // SF Symbol name (required)
|
|
24
|
-
tintColor={colors.label} // Icon color
|
|
25
|
-
size={24} // Shorthand for width/height
|
|
26
|
-
resizeMode="scaleAspectFit" // How to scale
|
|
27
|
-
weight="regular" // thin | ultraLight | light | regular | medium | semibold | bold | heavy | black
|
|
28
|
-
scale="medium" // small | medium | large
|
|
29
|
-
style={{ width: 16, height: 16 }} // Standard style props
|
|
30
|
-
/>
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Common Icons
|
|
34
|
-
|
|
35
|
-
### Navigation & Actions
|
|
36
|
-
- `house.fill` - home
|
|
37
|
-
- `gear` - settings
|
|
38
|
-
- `magnifyingglass` - search
|
|
39
|
-
- `plus` - add
|
|
40
|
-
- `xmark` - close
|
|
41
|
-
- `chevron.left` - back
|
|
42
|
-
- `chevron.right` - forward
|
|
43
|
-
- `arrow.left` - back arrow
|
|
44
|
-
- `arrow.right` - forward arrow
|
|
45
|
-
|
|
46
|
-
### Media
|
|
47
|
-
- `play.fill` - play
|
|
48
|
-
- `pause.fill` - pause
|
|
49
|
-
- `stop.fill` - stop
|
|
50
|
-
- `backward.fill` - rewind
|
|
51
|
-
- `forward.fill` - fast forward
|
|
52
|
-
- `speaker.wave.2.fill` - volume
|
|
53
|
-
- `speaker.slash.fill` - mute
|
|
54
|
-
|
|
55
|
-
### Camera
|
|
56
|
-
- `camera` - camera
|
|
57
|
-
- `camera.fill` - camera filled
|
|
58
|
-
- `arrow.triangle.2.circlepath` - flip camera
|
|
59
|
-
- `photo` - gallery/photos
|
|
60
|
-
- `bolt` - flash
|
|
61
|
-
- `bolt.slash` - flash off
|
|
62
|
-
|
|
63
|
-
### Communication
|
|
64
|
-
- `message` - message
|
|
65
|
-
- `message.fill` - message filled
|
|
66
|
-
- `envelope` - email
|
|
67
|
-
- `envelope.fill` - email filled
|
|
68
|
-
- `phone` - phone
|
|
69
|
-
- `phone.fill` - phone filled
|
|
70
|
-
- `video` - video call
|
|
71
|
-
- `video.fill` - video call filled
|
|
72
|
-
|
|
73
|
-
### Social
|
|
74
|
-
- `heart` - like
|
|
75
|
-
- `heart.fill` - liked
|
|
76
|
-
- `star` - favorite
|
|
77
|
-
- `star.fill` - favorited
|
|
78
|
-
- `hand.thumbsup` - thumbs up
|
|
79
|
-
- `hand.thumbsdown` - thumbs down
|
|
80
|
-
- `person` - profile
|
|
81
|
-
- `person.fill` - profile filled
|
|
82
|
-
- `person.2` - people
|
|
83
|
-
- `person.2.fill` - people filled
|
|
84
|
-
|
|
85
|
-
### Content Actions
|
|
86
|
-
- `square.and.arrow.up` - share
|
|
87
|
-
- `square.and.arrow.down` - download
|
|
88
|
-
- `doc.on.doc` - copy
|
|
89
|
-
- `trash` - delete
|
|
90
|
-
- `pencil` - edit
|
|
91
|
-
- `folder` - folder
|
|
92
|
-
- `folder.fill` - folder filled
|
|
93
|
-
- `bookmark` - bookmark
|
|
94
|
-
- `bookmark.fill` - bookmarked
|
|
95
|
-
|
|
96
|
-
### Status & Feedback
|
|
97
|
-
- `checkmark` - success/done
|
|
98
|
-
- `checkmark.circle.fill` - completed
|
|
99
|
-
- `xmark.circle.fill` - error/failed
|
|
100
|
-
- `exclamationmark.triangle` - warning
|
|
101
|
-
- `info.circle` - info
|
|
102
|
-
- `questionmark.circle` - help
|
|
103
|
-
- `bell` - notification
|
|
104
|
-
- `bell.fill` - notification filled
|
|
105
|
-
|
|
106
|
-
### Misc
|
|
107
|
-
- `ellipsis` - more options
|
|
108
|
-
- `ellipsis.circle` - more in circle
|
|
109
|
-
- `line.3.horizontal` - menu/hamburger
|
|
110
|
-
- `slider.horizontal.3` - filters
|
|
111
|
-
- `arrow.clockwise` - refresh
|
|
112
|
-
- `location` - location
|
|
113
|
-
- `location.fill` - location filled
|
|
114
|
-
- `map` - map
|
|
115
|
-
- `mappin` - pin
|
|
116
|
-
- `clock` - time
|
|
117
|
-
- `calendar` - calendar
|
|
118
|
-
- `link` - link
|
|
119
|
-
- `nosign` - block/prohibited
|
|
120
|
-
|
|
121
|
-
## Animated Symbols
|
|
122
|
-
|
|
123
|
-
```tsx
|
|
124
|
-
<SymbolView
|
|
125
|
-
name="checkmark.circle"
|
|
126
|
-
animationSpec={{
|
|
127
|
-
effect: {
|
|
128
|
-
type: "bounce",
|
|
129
|
-
direction: "up",
|
|
130
|
-
},
|
|
131
|
-
}}
|
|
132
|
-
/>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
### Animation Effects
|
|
136
|
-
|
|
137
|
-
- `bounce` - Bouncy animation
|
|
138
|
-
- `pulse` - Pulsing effect
|
|
139
|
-
- `variableColor` - Color cycling
|
|
140
|
-
- `scale` - Scale animation
|
|
141
|
-
|
|
142
|
-
```tsx
|
|
143
|
-
// Bounce with direction
|
|
144
|
-
animationSpec={{
|
|
145
|
-
effect: { type: "bounce", direction: "up" } // up | down
|
|
146
|
-
}}
|
|
147
|
-
|
|
148
|
-
// Pulse
|
|
149
|
-
animationSpec={{
|
|
150
|
-
effect: { type: "pulse" }
|
|
151
|
-
}}
|
|
152
|
-
|
|
153
|
-
// Variable color (multicolor symbols)
|
|
154
|
-
animationSpec={{
|
|
155
|
-
effect: {
|
|
156
|
-
type: "variableColor",
|
|
157
|
-
cumulative: true,
|
|
158
|
-
reversing: true
|
|
159
|
-
}
|
|
160
|
-
}}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
## Symbol Weights
|
|
164
|
-
|
|
165
|
-
```tsx
|
|
166
|
-
// Lighter weights
|
|
167
|
-
<SymbolView name="star" weight="ultraLight" />
|
|
168
|
-
<SymbolView name="star" weight="thin" />
|
|
169
|
-
<SymbolView name="star" weight="light" />
|
|
170
|
-
|
|
171
|
-
// Default
|
|
172
|
-
<SymbolView name="star" weight="regular" />
|
|
173
|
-
|
|
174
|
-
// Heavier weights
|
|
175
|
-
<SymbolView name="star" weight="medium" />
|
|
176
|
-
<SymbolView name="star" weight="semibold" />
|
|
177
|
-
<SymbolView name="star" weight="bold" />
|
|
178
|
-
<SymbolView name="star" weight="heavy" />
|
|
179
|
-
<SymbolView name="star" weight="black" />
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
## Symbol Scales
|
|
183
|
-
|
|
184
|
-
```tsx
|
|
185
|
-
<SymbolView name="star" scale="small" />
|
|
186
|
-
<SymbolView name="star" scale="medium" /> // default
|
|
187
|
-
<SymbolView name="star" scale="large" />
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
## Multicolor Symbols
|
|
191
|
-
|
|
192
|
-
Some symbols support multiple colors:
|
|
193
|
-
|
|
194
|
-
```tsx
|
|
195
|
-
<SymbolView
|
|
196
|
-
name="cloud.sun.rain.fill"
|
|
197
|
-
type="multicolor"
|
|
198
|
-
/>
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
## Android: Material Icons
|
|
202
|
-
|
|
203
|
-
On Android an SF Symbol source renders nothing - an app that ships SF-only iconography ships blank icons. Give every icon a Material source:
|
|
204
|
-
|
|
205
|
-
- **Tab bars**: pass `md` (Material Symbol name) beside `sf` on NativeTabs triggers - `<NativeTabs.Trigger.Icon sf="gear" md="settings" />` (SDK 55+, see the `expo-router` skill).
|
|
206
|
-
- **In screens**: `@expo/vector-icons` Material families, gated by platform:
|
|
207
|
-
|
|
208
|
-
```tsx
|
|
209
|
-
import MaterialIcons from "@expo/vector-icons/MaterialIcons";
|
|
210
|
-
|
|
211
|
-
process.env.EXPO_OS === "ios" ? (
|
|
212
|
-
<SymbolView name="gear" tintColor={colors.label} style={{ width: 24, height: 24 }} />
|
|
213
|
-
) : (
|
|
214
|
-
<MaterialIcons name="settings" size={24} color={colors.label} />
|
|
215
|
-
);
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
One icon family per platform - never a mixed set, never SF names on Android or Material glyphs on iOS.
|
|
219
|
-
|
|
220
|
-
## Finding Symbol Names
|
|
221
|
-
|
|
222
|
-
1. Use the SF Symbols app on macOS (free from Apple)
|
|
223
|
-
2. Search at https://developer.apple.com/sf-symbols/
|
|
224
|
-
3. Symbol names use dot notation: `square.and.arrow.up`
|
|
225
|
-
|
|
226
|
-
## Best Practices
|
|
227
|
-
|
|
228
|
-
- On iOS, always use SF Symbols over vector icon libraries; on Android, use Material icons (see above)
|
|
229
|
-
- Match symbol weight to nearby text weight
|
|
230
|
-
- Use `.fill` variants for selected/active states
|
|
231
|
-
- Use the cross-platform `colors` helper (see SKILL.md "Colors") for tint to support dark mode
|
|
232
|
-
- Keep icons at consistent sizes (16, 20, 24, 32)
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
# Media
|
|
2
|
-
|
|
3
|
-
## Camera
|
|
4
|
-
|
|
5
|
-
- Hide navigation headers when there's a full screen camera
|
|
6
|
-
- Ensure to flip the camera with `mirror` to emulate social apps
|
|
7
|
-
- Use liquid glass buttons on cameras
|
|
8
|
-
- Icons: `arrow.triangle.2.circlepath` (flip), `photo` (gallery), `bolt` (flash)
|
|
9
|
-
- Gate the camera behind an explanation screen with a Grant button (as below) — never fire the permission prompt on mount
|
|
10
|
-
- Lazily request media library permission (at first save/pick)
|
|
11
|
-
|
|
12
|
-
The example uses the `GlassButton` helper defined in `visual-effects.md` (Glass Buttons section).
|
|
13
|
-
|
|
14
|
-
```tsx
|
|
15
|
-
import React, { useRef, useState } from "react";
|
|
16
|
-
import { View, Pressable, Text } from "react-native";
|
|
17
|
-
import { CameraView, CameraType, useCameraPermissions } from "expo-camera";
|
|
18
|
-
import * as ImagePicker from "expo-image-picker";
|
|
19
|
-
import * as Haptics from "expo-haptics";
|
|
20
|
-
import { colors } from "@/theme/colors";
|
|
21
|
-
import { GlassView } from "expo-glass-effect";
|
|
22
|
-
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
23
|
-
|
|
24
|
-
function Camera({ onPicture }: { onPicture: (uri: string) => Promise<void> }) {
|
|
25
|
-
const [permission, requestPermission] = useCameraPermissions();
|
|
26
|
-
const cameraRef = useRef<CameraView>(null);
|
|
27
|
-
const [type, setType] = useState<CameraType>("back");
|
|
28
|
-
const { bottom } = useSafeAreaInsets();
|
|
29
|
-
|
|
30
|
-
if (!permission?.granted) {
|
|
31
|
-
return (
|
|
32
|
-
<View style={{ flex: 1, justifyContent: "center", alignItems: "center", backgroundColor: colors.systemBackground }}>
|
|
33
|
-
<Text style={{ color: colors.label, padding: 16 }}>Camera access is required</Text>
|
|
34
|
-
<GlassView isInteractive tintColor={colors.systemBlue} style={{ borderRadius: 12 }}>
|
|
35
|
-
<Pressable onPress={requestPermission} style={{ padding: 12, borderRadius: 12 }}>
|
|
36
|
-
<Text style={{ color: "white" }}>Grant Permission</Text>
|
|
37
|
-
</Pressable>
|
|
38
|
-
</GlassView>
|
|
39
|
-
</View>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const takePhoto = async () => {
|
|
44
|
-
await Haptics.selectionAsync();
|
|
45
|
-
if (!cameraRef.current) return;
|
|
46
|
-
const photo = await cameraRef.current.takePictureAsync({ quality: 0.8 });
|
|
47
|
-
await onPicture(photo.uri);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
const selectPhoto = async () => {
|
|
51
|
-
await Haptics.selectionAsync();
|
|
52
|
-
const result = await ImagePicker.launchImageLibraryAsync({
|
|
53
|
-
mediaTypes: "images",
|
|
54
|
-
allowsEditing: false,
|
|
55
|
-
quality: 0.8,
|
|
56
|
-
});
|
|
57
|
-
if (!result.canceled && result.assets?.[0]) {
|
|
58
|
-
await onPicture(result.assets[0].uri);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
return (
|
|
63
|
-
<View style={{ flex: 1, backgroundColor: "black" }}>
|
|
64
|
-
<CameraView ref={cameraRef} mirror style={{ flex: 1 }} facing={type} />
|
|
65
|
-
<View style={{ position: "absolute", left: 0, right: 0, bottom: bottom, gap: 16, alignItems: "center" }}>
|
|
66
|
-
<GlassView isInteractive style={{ padding: 8, borderRadius: 99 }}>
|
|
67
|
-
<Pressable onPress={takePhoto} style={{ width: 64, height: 64, borderRadius: 99, backgroundColor: "white" }} />
|
|
68
|
-
</GlassView>
|
|
69
|
-
<View style={{ flexDirection: "row", justifyContent: "space-around", paddingHorizontal: 8 }}>
|
|
70
|
-
<GlassButton onPress={selectPhoto} icon="photo" />
|
|
71
|
-
<GlassButton onPress={() => setType(t => t === "back" ? "front" : "back")} icon="arrow.triangle.2.circlepath" />
|
|
72
|
-
</View>
|
|
73
|
-
</View>
|
|
74
|
-
</View>
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Audio Playback
|
|
80
|
-
|
|
81
|
-
Use `expo-audio` not `expo-av`:
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import { useAudioPlayer } from 'expo-audio';
|
|
85
|
-
|
|
86
|
-
const player = useAudioPlayer({ uri: 'https://stream.nightride.fm/rektory.mp3' });
|
|
87
|
-
|
|
88
|
-
<Button title="Play" onPress={() => player.play()} />
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Audio Recording (Microphone)
|
|
92
|
-
|
|
93
|
-
```tsx
|
|
94
|
-
import {
|
|
95
|
-
useAudioRecorder,
|
|
96
|
-
AudioModule,
|
|
97
|
-
RecordingPresets,
|
|
98
|
-
setAudioModeAsync,
|
|
99
|
-
useAudioRecorderState,
|
|
100
|
-
} from 'expo-audio';
|
|
101
|
-
import { Alert, Button } from 'react-native';
|
|
102
|
-
|
|
103
|
-
function App() {
|
|
104
|
-
const audioRecorder = useAudioRecorder(RecordingPresets.HIGH_QUALITY);
|
|
105
|
-
const recorderState = useAudioRecorderState(audioRecorder);
|
|
106
|
-
|
|
107
|
-
// Request the microphone on first record, not on mount — no prompt before user intent
|
|
108
|
-
const record = async () => {
|
|
109
|
-
const status = await AudioModule.requestRecordingPermissionsAsync();
|
|
110
|
-
if (!status.granted) {
|
|
111
|
-
Alert.alert('Permission to access microphone was denied');
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
await setAudioModeAsync({ playsInSilentMode: true, allowsRecording: true });
|
|
115
|
-
await audioRecorder.prepareToRecordAsync();
|
|
116
|
-
audioRecorder.record();
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
const stop = () => audioRecorder.stop();
|
|
120
|
-
|
|
121
|
-
return (
|
|
122
|
-
<Button
|
|
123
|
-
title={recorderState.isRecording ? 'Stop' : 'Start'}
|
|
124
|
-
onPress={recorderState.isRecording ? stop : record}
|
|
125
|
-
/>
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Video Playback
|
|
131
|
-
|
|
132
|
-
Use `expo-video` not `expo-av`:
|
|
133
|
-
|
|
134
|
-
```tsx
|
|
135
|
-
import { useVideoPlayer, VideoView } from 'expo-video';
|
|
136
|
-
import { useEvent } from 'expo';
|
|
137
|
-
|
|
138
|
-
const videoSource = 'https://example.com/video.mp4';
|
|
139
|
-
|
|
140
|
-
const player = useVideoPlayer(videoSource, player => {
|
|
141
|
-
player.loop = true;
|
|
142
|
-
player.play();
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
const { isPlaying } = useEvent(player, 'playingChange', { isPlaying: player.playing });
|
|
146
|
-
|
|
147
|
-
<VideoView player={player} fullscreenOptions={{}} allowsPictureInPicture />
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
VideoView options:
|
|
151
|
-
- `allowsPictureInPicture`: boolean
|
|
152
|
-
- `contentFit`: 'contain' | 'cover' | 'fill'
|
|
153
|
-
- `nativeControls`: boolean
|
|
154
|
-
- `playsInline`: boolean
|
|
155
|
-
- `startsPictureInPictureAutomatically`: boolean
|
|
156
|
-
|
|
157
|
-
## Saving Media
|
|
158
|
-
|
|
159
|
-
```tsx
|
|
160
|
-
import * as MediaLibrary from "expo-media-library";
|
|
161
|
-
|
|
162
|
-
const { granted } = await MediaLibrary.requestPermissionsAsync();
|
|
163
|
-
if (granted) {
|
|
164
|
-
await MediaLibrary.saveToLibraryAsync(uri);
|
|
165
|
-
}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
### Saving Base64 Images
|
|
169
|
-
|
|
170
|
-
`MediaLibrary.saveToLibraryAsync` only accepts local file paths. Save base64 strings to disk first:
|
|
171
|
-
|
|
172
|
-
```tsx
|
|
173
|
-
import { File, Paths } from "expo-file-system/next";
|
|
174
|
-
|
|
175
|
-
function base64ToLocalUri(base64: string, filename?: string) {
|
|
176
|
-
if (!filename) {
|
|
177
|
-
const match = base64.match(/^data:(image\/[a-zA-Z]+);base64,/);
|
|
178
|
-
const ext = match ? match[1].split("/")[1] : "jpg";
|
|
179
|
-
filename = `generated-${Date.now()}.${ext}`;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
if (base64.startsWith("data:")) base64 = base64.split(",")[1];
|
|
183
|
-
const binaryString = atob(base64);
|
|
184
|
-
const len = binaryString.length;
|
|
185
|
-
const bytes = new Uint8Array(new ArrayBuffer(len));
|
|
186
|
-
for (let i = 0; i < len; i++) bytes[i] = binaryString.charCodeAt(i);
|
|
187
|
-
|
|
188
|
-
const f = new File(Paths.cache, filename);
|
|
189
|
-
f.create({ overwrite: true });
|
|
190
|
-
f.write(bytes);
|
|
191
|
-
return f.uri;
|
|
192
|
-
}
|
|
193
|
-
```
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Storage
|
|
2
|
-
|
|
3
|
-
## Key-Value Storage
|
|
4
|
-
|
|
5
|
-
Use the localStorage polyfill for key-value storage. **Never use AsyncStorage**
|
|
6
|
-
|
|
7
|
-
```tsx
|
|
8
|
-
import "expo-sqlite/localStorage/install";
|
|
9
|
-
|
|
10
|
-
// Simple get/set
|
|
11
|
-
localStorage.setItem("key", "value");
|
|
12
|
-
localStorage.getItem("key");
|
|
13
|
-
|
|
14
|
-
// Store objects as JSON
|
|
15
|
-
localStorage.setItem("user", JSON.stringify({ name: "John", id: 1 }));
|
|
16
|
-
const user = JSON.parse(localStorage.getItem("user") ?? "{}");
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## When to Use What
|
|
20
|
-
|
|
21
|
-
| Use Case | Solution |
|
|
22
|
-
| ---------------------------------------------------- | ----------------------- |
|
|
23
|
-
| Simple key-value (settings, preferences, small data) | `localStorage` polyfill |
|
|
24
|
-
| Large datasets, complex queries, relational data | Full `expo-sqlite` |
|
|
25
|
-
| Sensitive data (tokens, passwords) | `expo-secure-store` |
|
|
26
|
-
|
|
27
|
-
## Storage with React State
|
|
28
|
-
|
|
29
|
-
Create a storage utility with subscriptions for reactive updates:
|
|
30
|
-
|
|
31
|
-
```tsx
|
|
32
|
-
// utils/storage.ts
|
|
33
|
-
import "expo-sqlite/localStorage/install";
|
|
34
|
-
|
|
35
|
-
type Listener = () => void;
|
|
36
|
-
const listeners = new Map<string, Set<Listener>>();
|
|
37
|
-
|
|
38
|
-
export const storage = {
|
|
39
|
-
get<T>(key: string, defaultValue: T): T {
|
|
40
|
-
const value = localStorage.getItem(key);
|
|
41
|
-
return value ? JSON.parse(value) : defaultValue;
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
set<T>(key: string, value: T): void {
|
|
45
|
-
localStorage.setItem(key, JSON.stringify(value));
|
|
46
|
-
listeners.get(key)?.forEach((fn) => fn());
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
subscribe(key: string, listener: Listener): () => void {
|
|
50
|
-
if (!listeners.has(key)) listeners.set(key, new Set());
|
|
51
|
-
listeners.get(key)!.add(listener);
|
|
52
|
-
return () => listeners.get(key)?.delete(listener);
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
## React Hook for Storage
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
// hooks/use-storage.ts
|
|
61
|
-
import { useSyncExternalStore } from "react";
|
|
62
|
-
import { storage } from "@/utils/storage";
|
|
63
|
-
|
|
64
|
-
export function useStorage<T>(
|
|
65
|
-
key: string,
|
|
66
|
-
defaultValue: T
|
|
67
|
-
): [T, (value: T) => void] {
|
|
68
|
-
const value = useSyncExternalStore(
|
|
69
|
-
(cb) => storage.subscribe(key, cb),
|
|
70
|
-
() => storage.get(key, defaultValue)
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
return [value, (newValue: T) => storage.set(key, newValue)];
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Usage:
|
|
78
|
-
|
|
79
|
-
```tsx
|
|
80
|
-
function Settings() {
|
|
81
|
-
const [theme, setTheme] = useStorage("theme", "light");
|
|
82
|
-
|
|
83
|
-
return (
|
|
84
|
-
<Switch
|
|
85
|
-
value={theme === "dark"}
|
|
86
|
-
onValueChange={(dark) => setTheme(dark ? "dark" : "light")}
|
|
87
|
-
/>
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Full SQLite for Complex Data
|
|
93
|
-
|
|
94
|
-
For larger datasets or complex queries, use expo-sqlite directly:
|
|
95
|
-
|
|
96
|
-
```tsx
|
|
97
|
-
import * as SQLite from "expo-sqlite";
|
|
98
|
-
|
|
99
|
-
const db = await SQLite.openDatabaseAsync("app.db");
|
|
100
|
-
|
|
101
|
-
// Create table
|
|
102
|
-
await db.execAsync(`
|
|
103
|
-
CREATE TABLE IF NOT EXISTS events (
|
|
104
|
-
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
105
|
-
title TEXT NOT NULL,
|
|
106
|
-
date TEXT NOT NULL,
|
|
107
|
-
location TEXT
|
|
108
|
-
)
|
|
109
|
-
`);
|
|
110
|
-
|
|
111
|
-
// Insert
|
|
112
|
-
await db.runAsync("INSERT INTO events (title, date) VALUES (?, ?)", [
|
|
113
|
-
"Meeting",
|
|
114
|
-
"2024-01-15",
|
|
115
|
-
]);
|
|
116
|
-
|
|
117
|
-
// Query
|
|
118
|
-
const events = await db.getAllAsync("SELECT * FROM events WHERE date > ?", [
|
|
119
|
-
"2024-01-01",
|
|
120
|
-
]);
|
|
121
|
-
```
|