@mediacubeco/expo-template-fsd 2.3.1 → 2.4.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/.claude/commands/git-commit.md +164 -0
- package/.claude/rules/architecture.md +38 -0
- package/.claude/rules/{prettier-eslint-typescript.mdc → prettier-eslint-typescript.md} +5 -10
- package/.claude/settings.json +2 -2
- package/.claude/skills/api/SKILL.md +362 -0
- package/.claude/skills/api/references/client/overview.md +106 -0
- package/.claude/skills/api/references/hooks/index.ts +3 -0
- package/.claude/skills/api/references/hooks/use-api-health.ts +25 -0
- package/.claude/skills/api/references/hooks/use-api-post.ts +46 -0
- package/.claude/skills/api/references/hooks/use-api-posts.ts +24 -0
- package/.claude/skills/api/references/mock/post.mock.ts +29 -0
- package/.claude/skills/{generate-api-model/references → api/references/model}/entities/common.ts +5 -2
- package/.claude/skills/api/references/model/resources/common.ts +9 -0
- package/.claude/skills/api/references/queries/health.ts +14 -0
- package/.claude/skills/api/references/queries/index.ts +2 -0
- package/.claude/skills/api/references/queries/post.ts +23 -0
- package/.claude/skills/api/references/repository/health/health.ts +11 -0
- package/.claude/skills/api/references/repository/health/health.types.ts +25 -0
- package/.claude/skills/api/references/repository/health/index.ts +2 -0
- package/.claude/skills/api/references/repository/post/index.ts +9 -0
- package/.claude/skills/api/references/repository/post/post.ts +34 -0
- package/.claude/skills/api/references/repository/post/post.types.ts +61 -0
- package/.claude/skills/code-style/SKILL.md +1025 -1
- package/.claude/skills/code-style/references/components/payout-speed-option/index.ts +2 -0
- package/.claude/skills/code-style/references/components/payout-speed-option/payout-speed-option.styles.ts +76 -0
- package/.claude/skills/code-style/references/components/payout-speed-option/payout-speed-option.tsx +58 -0
- package/.claude/skills/code-style/references/components/payout-speed-option/payout-speed-option.types.ts +22 -0
- package/.claude/skills/code-style/references/components/post/index.ts +2 -0
- package/.claude/skills/code-style/references/components/post/post.styles.ts +19 -0
- package/.claude/skills/code-style/references/components/post/post.tsx +21 -0
- package/.claude/skills/code-style/references/components/post/post.types.ts +9 -0
- package/.claude/skills/code-style/references/components/wrap/index.ts +2 -0
- package/.claude/skills/code-style/references/components/wrap/wrap.styles.ts +15 -0
- package/.claude/skills/code-style/references/components/wrap/wrap.tsx +31 -0
- package/.claude/skills/code-style/references/components/wrap/wrap.types.ts +10 -0
- package/.claude/skills/code-style/references/hooks/use-posts.ts +37 -0
- package/.claude/skills/code-style/references/pages/post/index.ts +4 -0
- package/.claude/skills/code-style/references/pages/post/post-details/index.ts +1 -0
- package/.claude/skills/code-style/references/pages/post/post-details/post-details.tsx +13 -0
- package/.claude/skills/code-style/references/pages/post/post-guide/index.ts +1 -0
- package/.claude/skills/code-style/references/pages/post/post-guide/post-guide.tsx +17 -0
- package/.claude/skills/code-style/references/pages/post/post-list/index.ts +1 -0
- package/.claude/skills/code-style/references/pages/post/post-list/post-list.styles.ts +17 -0
- package/.claude/skills/code-style/references/pages/post/post-list/post-list.tsx +25 -0
- package/.claude/skills/code-style/references/pages/post/post-share/index.ts +1 -0
- package/.claude/skills/code-style/references/pages/post/post-share/post-share.tsx +13 -0
- package/.claude/skills/code-style/references/routes/(stack)/_layout.tsx +18 -0
- package/.claude/skills/code-style/references/routes/(stack)/details.tsx +8 -0
- package/.claude/skills/code-style/references/routes/(stack)/guide.tsx +8 -0
- package/.claude/skills/code-style/references/routes/(stack)/index.tsx +8 -0
- package/.claude/skills/code-style/references/routes/(stack)/share.tsx +8 -0
- package/.claude/skills/code-style/references/routes/(tabs)/(post-details)/index.tsx +8 -0
- package/.claude/skills/code-style/references/routes/(tabs)/(post-list)/index.tsx +8 -0
- package/.claude/skills/code-style/references/routes/(tabs)/_layout.tsx +50 -0
- package/.claude/skills/code-style/references/routes/_app.tsx +20 -0
- package/.claude/skills/code-style/references/routes/guide.tsx +8 -0
- package/.claude/skills/code-style/references/routes/share.tsx +8 -0
- package/.claude/skills/code-style/references/store/use-post-draft-store.ts +62 -0
- package/.claude/skills/design-style/SKILL.md +320 -0
- package/.env +3 -1
- package/.env.example +3 -1
- package/CLAUDE.md +5 -11
- package/app.json +6 -3
- package/axios.d.ts +5 -0
- package/env.d.ts +3 -1
- package/package.json +33 -40
- package/patches/react-native-screens+4.25.2.patch +118 -0
- package/react-query.d.ts +13 -0
- package/src/app/(root)/(home)/_layout.tsx +2 -2
- package/src/app/(root)/(home)/index.tsx +2 -2
- package/src/app/(root)/(settings)/_layout.tsx +2 -2
- package/src/app/(root)/(settings)/index.tsx +2 -2
- package/src/app/(root)/_layout.tsx +35 -32
- package/src/pages/home/home-main.tsx +3 -7
- package/src/pages/settings/settings-main.tsx +3 -7
- package/src/shared/assets/fonts/index.ts +3 -3
- package/src/shared/assets/fonts/sf-pro-text-bold.ttf +0 -0
- package/src/shared/assets/fonts/sf-pro-text-regular.ttf +0 -0
- package/src/shared/assets/fonts/sf-pro-text-semibold.ttf +0 -0
- package/src/shared/assets/icons/back.tsx +21 -0
- package/src/shared/assets/icons/close.tsx +21 -0
- package/src/shared/assets/icons/common.ts +8 -0
- package/src/shared/assets/icons/default.tsx +44 -0
- package/src/shared/assets/icons/index.ts +13 -1
- package/src/shared/assets/icons/refresh.tsx +23 -0
- package/src/shared/assets/icons/share.tsx +38 -0
- package/src/shared/assets/icons/type.ts +7 -0
- package/src/shared/assets/translations/index.ts +4 -4
- package/src/shared/constants/config.ts +13 -0
- package/src/shared/constants/environment.ts +16 -4
- package/src/shared/constants/index.ts +1 -0
- package/src/shared/hooks/index.ts +1 -4
- package/src/shared/hooks/use-compose.ts +23 -0
- package/src/shared/lib/api/api.client.ts +157 -0
- package/src/shared/lib/api/api.provider.tsx +14 -36
- package/src/shared/lib/api/api.ts +1 -5
- package/src/shared/lib/api/api.types.ts +6 -3
- package/src/shared/lib/api/hooks/index.ts +1 -0
- package/src/shared/lib/api/index.ts +2 -3
- package/src/shared/lib/api/models/api-instance/api-instance.client.ts +50 -0
- package/src/shared/lib/api/models/api-instance/api-instance.ts +30 -82
- package/src/shared/lib/api/models/api-instance/api-instance.types.ts +16 -18
- package/src/shared/lib/api/models/api-instance/api-instance.utils.ts +13 -20
- package/src/shared/lib/api/models/api-instance/index.ts +3 -0
- package/src/shared/lib/api/queries/index.ts +1 -0
- package/src/shared/lib/api/repositories/index.ts +1 -1
- package/src/shared/lib/localization/constants/index.ts +16 -5
- package/src/shared/lib/localization/index.ts +5 -1
- package/src/shared/lib/navigation/hooks/index.ts +8 -3
- package/src/shared/{hooks/use-breakpoints.ts → lib/navigation/hooks/use-navigation-breakpoints.ts} +2 -5
- package/src/shared/lib/navigation/hooks/use-navigation-dimensions.ts +12 -0
- package/src/shared/lib/navigation/hooks/use-navigation-options.tsx +175 -0
- package/src/shared/lib/navigation/hooks/{use-navigation.ts → use-navigation-route.ts} +2 -2
- package/src/shared/lib/navigation/hooks/use-navigation-safe-area.ts +61 -0
- package/src/shared/lib/navigation/hooks/use-navigation-tabs-native.ts +10 -0
- package/src/shared/lib/navigation/hooks/use-navigation-tabs.tsx +10 -0
- package/src/shared/lib/navigation/hooks/use-navigation-transition.ts +27 -0
- package/src/shared/lib/navigation/index.ts +11 -4
- package/src/shared/lib/navigation/navigation-tabs-native.context.tsx +5 -0
- package/src/shared/lib/navigation/navigation-tabs-native.provider.tsx +17 -0
- package/src/shared/lib/navigation/navigation-tabs.context.tsx +10 -0
- package/src/shared/lib/navigation/navigation-tabs.provider.tsx +22 -0
- package/src/shared/lib/navigation/navigation.provider.tsx +6 -1
- package/src/shared/lib/storage/index.ts +1 -1
- package/src/shared/lib/storage/storage.provider.tsx +4 -0
- package/src/shared/lib/storage/storage.ts +29 -25
- package/src/shared/lib/theme/constants/animations.ts +26 -0
- package/src/shared/lib/theme/constants/colors.ts +336 -43
- package/src/shared/lib/theme/constants/delays.ts +1 -1
- package/src/shared/lib/theme/constants/durations.ts +1 -1
- package/src/shared/lib/theme/constants/fonts.ts +2 -1
- package/src/shared/lib/theme/constants/index.ts +42 -20
- package/src/shared/lib/theme/constants/shadows.ts +7 -25
- package/src/shared/lib/theme/constants/sizes.ts +11 -2
- package/src/shared/lib/theme/constants/transparencies.ts +1 -1
- package/src/shared/lib/theme/hooks/use-theme-setup.ts +3 -1
- package/src/shared/lib/theme/index.ts +10 -1
- package/src/shared/lib/theme/theme.provider.tsx +45 -19
- package/src/shared/lib/theme/theme.scope.tsx +43 -0
- package/src/shared/lib/theme/theme.types.ts +15 -3
- package/src/shared/lib/theme/utils/color.ts +81 -0
- package/src/shared/lib/theme/utils/index.ts +2 -0
- package/src/shared/lib/theme/utils/snapshot.ts +17 -0
- package/src/shared/lib/theme/utils/storage.ts +5 -2
- package/src/shared/services/browser/browser.ts +66 -0
- package/src/shared/services/browser/index.ts +1 -0
- package/src/shared/services/cookies/cookies.ts +73 -0
- package/src/shared/services/cookies/index.ts +1 -0
- package/src/shared/services/index.ts +5 -0
- package/src/shared/services/linking/index.ts +1 -0
- package/src/shared/services/linking/linking.ts +22 -0
- package/src/shared/services/share/index.ts +1 -0
- package/src/shared/services/share/share.ts +28 -0
- package/src/shared/services/universal-links/index.ts +104 -0
- package/src/shared/services/universal-links/universal-links.ts +25 -0
- package/src/shared/services/universal-links/universal-links.types.ts +5 -0
- package/src/shared/ui/atoms/blur/blur.tsx +9 -4
- package/src/shared/ui/atoms/blur/blur.types.ts +1 -1
- package/src/shared/ui/atoms/blur-progress/blur-progress.styles.ts +16 -0
- package/src/shared/ui/atoms/blur-progress/blur-progress.tsx +30 -0
- package/src/shared/ui/atoms/blur-progress/blur-progress.types.tsx +5 -0
- package/src/shared/ui/atoms/blur-progress/index.ts +1 -0
- package/src/shared/ui/atoms/glass/glass.tsx +13 -5
- package/src/shared/ui/atoms/glass/glass.types.ts +1 -1
- package/src/shared/ui/atoms/icon/icon.styles.ts +82 -0
- package/src/shared/ui/atoms/icon/icon.tsx +21 -0
- package/src/shared/ui/atoms/icon/icon.types.ts +23 -0
- package/src/shared/ui/atoms/icon/index.ts +2 -0
- package/src/shared/ui/atoms/index.ts +7 -0
- package/src/shared/ui/atoms/skeleton/index.ts +2 -0
- package/src/shared/ui/atoms/skeleton/skeleton.styles.ts +69 -0
- package/src/shared/ui/atoms/skeleton/skeleton.tsx +26 -0
- package/src/shared/ui/atoms/skeleton/skeleton.types.ts +9 -0
- package/src/shared/ui/atoms/spinner/index.ts +2 -0
- package/src/shared/ui/atoms/spinner/spinner.styles.ts +102 -0
- package/src/shared/ui/atoms/spinner/spinner.tsx +48 -0
- package/src/shared/ui/atoms/spinner/spinner.types.ts +25 -0
- package/src/shared/ui/atoms/text/index.ts +2 -0
- package/src/shared/ui/atoms/text/text.styles.ts +186 -0
- package/src/shared/ui/atoms/text/text.tsx +37 -0
- package/src/shared/ui/atoms/text/text.types.ts +35 -0
- package/src/shared/ui/atoms/touch/components/haptics/haptics.styles.ts +21 -0
- package/src/shared/ui/atoms/touch/components/haptics/haptics.tsx +28 -0
- package/src/shared/ui/atoms/touch/components/haptics/haptics.types.ts +17 -0
- package/src/shared/ui/atoms/touch/components/haptics/index.ts +2 -0
- package/src/shared/ui/atoms/touch/components/index.ts +3 -0
- package/src/shared/ui/atoms/touch/components/ripple/index.ts +2 -0
- package/src/shared/ui/atoms/touch/components/ripple/ripple.styles.ts +78 -0
- package/src/shared/ui/atoms/touch/components/ripple/ripple.tsx +29 -0
- package/src/shared/ui/atoms/touch/components/ripple/ripple.types.ts +17 -0
- package/src/shared/ui/atoms/touch/components/spring/index.ts +2 -0
- package/src/shared/ui/atoms/touch/components/spring/spring.styles.ts +31 -0
- package/src/shared/ui/atoms/touch/components/spring/spring.tsx +28 -0
- package/src/shared/ui/atoms/touch/components/spring/spring.types.ts +17 -0
- package/src/shared/ui/atoms/touch/index.ts +2 -0
- package/src/shared/ui/atoms/touch/touch.styles.ts +14 -0
- package/src/shared/ui/atoms/touch/touch.tsx +137 -0
- package/src/shared/ui/atoms/touch/touch.types.ts +27 -0
- package/src/shared/ui/atoms/visibility/index.ts +2 -0
- package/src/shared/ui/atoms/visibility/visibility.styles.ts +85 -0
- package/src/shared/ui/atoms/visibility/visibility.tsx +61 -0
- package/src/shared/ui/atoms/visibility/visibility.types.ts +34 -0
- package/src/shared/ui/molecules/keyboard-area/keyboard-area.styles.ts +11 -9
- package/src/shared/ui/molecules/keyboard-area/keyboard-area.tsx +3 -6
- package/src/shared/ui/molecules/refresh-control/refresh-control.tsx +3 -5
- package/src/shared/ui/molecules/refresh-control/refresh-control.types.ts +1 -1
- package/src/shared/ui/molecules/slider/components/indicator/components/dot/dot.styles.ts +41 -0
- package/src/shared/ui/molecules/slider/components/indicator/components/dot/dot.tsx +12 -0
- package/src/shared/ui/molecules/slider/components/indicator/components/dot/dot.types.ts +13 -0
- package/src/shared/ui/molecules/slider/components/indicator/components/dot/index.ts +2 -0
- package/src/shared/ui/molecules/slider/components/indicator/index.ts +2 -0
- package/src/shared/ui/molecules/slider/components/indicator/indicator.styles.ts +20 -0
- package/src/shared/ui/molecules/slider/components/indicator/indicator.tsx +22 -0
- package/src/shared/ui/molecules/slider/components/indicator/indicator.types.ts +10 -0
- package/src/shared/ui/molecules/slider/index.ts +3 -0
- package/src/shared/ui/molecules/slider/slider.styles.ts +68 -0
- package/src/shared/ui/molecules/slider/slider.tsx +64 -0
- package/src/shared/ui/molecules/slider/slider.types.ts +28 -0
- package/src/shared/ui/organisms/bar/bar.styles.ts +100 -0
- package/src/shared/ui/organisms/bar/bar.tsx +89 -0
- package/src/shared/ui/organisms/bar/bar.types.ts +49 -0
- package/src/shared/ui/organisms/bar/index.ts +2 -0
- package/src/shared/ui/organisms/bar-tab/bar-tab.tsx +9 -0
- package/src/shared/ui/organisms/bar-tab/bar-tab.types.ts +5 -0
- package/src/shared/ui/organisms/bar-tab/components/index.ts +1 -0
- package/src/shared/ui/organisms/bar-tab/components/tab/index.ts +2 -0
- package/src/shared/ui/organisms/bar-tab/components/tab/tab.styles.ts +21 -0
- package/src/shared/ui/organisms/bar-tab/components/tab/tab.tsx +18 -0
- package/src/shared/ui/organisms/bar-tab/components/tab/tab.types.ts +5 -0
- package/src/shared/ui/organisms/bar-tab/index.ts +2 -0
- package/src/shared/ui/organisms/bar-tab-navigation/bar-tab-navigation.styles.ts +22 -0
- package/src/shared/ui/organisms/bar-tab-navigation/bar-tab-navigation.tsx +66 -0
- package/src/shared/ui/organisms/bar-tab-navigation/bar-tab-navigation.types.ts +5 -0
- package/src/shared/ui/organisms/bar-tab-navigation/components/index.ts +1 -0
- package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/index.ts +2 -0
- package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/tab-navigation.styles.ts +56 -0
- package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/tab-navigation.tsx +30 -0
- package/src/shared/ui/organisms/bar-tab-navigation/components/tab-navigation/tab-navigation.types.ts +7 -0
- package/src/shared/ui/organisms/bar-tab-navigation/index.ts +2 -0
- package/src/shared/ui/organisms/index.ts +4 -1
- package/src/shared/ui/organisms/slider/components/indicator/components/dot/dot.styles.ts +41 -0
- package/src/shared/ui/organisms/slider/components/indicator/components/dot/dot.tsx +12 -0
- package/src/shared/ui/organisms/slider/components/indicator/components/dot/dot.types.ts +13 -0
- package/src/shared/ui/organisms/slider/components/indicator/components/dot/index.ts +2 -0
- package/src/shared/ui/organisms/slider/components/indicator/index.ts +2 -0
- package/src/shared/ui/organisms/slider/components/indicator/indicator.styles.ts +20 -0
- package/src/shared/ui/organisms/slider/components/indicator/indicator.tsx +22 -0
- package/src/shared/ui/organisms/slider/components/indicator/indicator.types.ts +10 -0
- package/src/shared/ui/organisms/slider/index.ts +3 -0
- package/src/shared/ui/organisms/slider/slider.styles.ts +68 -0
- package/src/shared/ui/organisms/slider/slider.tsx +64 -0
- package/src/shared/ui/organisms/slider/slider.types.ts +28 -0
- package/src/shared/ui/templates/index.ts +3 -0
- package/src/shared/ui/templates/modal-container/index.ts +13 -0
- package/src/shared/ui/templates/modal-container/modal-container-list.tsx +45 -0
- package/src/shared/ui/templates/modal-container/modal-container-scroll.tsx +66 -0
- package/src/shared/ui/templates/modal-container/modal-container-section-list.tsx +46 -0
- package/src/shared/ui/templates/modal-container/modal-container.hooks.tsx +172 -0
- package/src/shared/ui/templates/modal-container/modal-container.styles.ts +121 -0
- package/src/shared/ui/templates/modal-container/modal-container.types.ts +69 -0
- package/src/shared/ui/templates/screen-container/index.ts +1 -1
- package/src/shared/ui/templates/screen-container/screen-container-list.tsx +28 -10
- package/src/shared/ui/templates/screen-container/screen-container-scroll.tsx +28 -10
- package/src/shared/ui/templates/screen-container/screen-container-section-list.tsx +29 -11
- package/src/shared/ui/templates/screen-container/screen-container.hooks.tsx +79 -8
- package/src/shared/ui/templates/screen-container/screen-container.styles.ts +105 -15
- package/src/shared/ui/templates/screen-container/screen-container.types.tsx +34 -7
- package/src/shared/ui/templates/screen-header/components/index.ts +6 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-description/index.ts +2 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-description/screen-header-description.tsx +15 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-description/screen-header-description.types.ts +11 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon/index.ts +2 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon/screen-header-icon.styles.ts +44 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon/screen-header-icon.tsx +65 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon/screen-header-icon.types.ts +14 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon-back/index.ts +2 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon-back/screen-header-icon-back.tsx +17 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon-back/screen-header-icon-back.types.ts +6 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon-close/index.ts +2 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon-close/screen-header-icon-close.tsx +27 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-icon-close/screen-header-icon-close.types.ts +10 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-info/index.ts +2 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-info/screen-header-info.tsx +15 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-info/screen-header-info.types.ts +10 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-title/index.ts +2 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-title/screen-header-title.tsx +19 -0
- package/src/shared/ui/templates/screen-header/components/screen-header-title/screen-header-title.types.ts +13 -0
- package/src/shared/ui/templates/screen-header/index.ts +3 -0
- package/src/shared/ui/templates/screen-header/screen-header.styles.ts +49 -0
- package/src/shared/ui/templates/screen-header/screen-header.tsx +26 -0
- package/src/shared/ui/templates/screen-header/screen-header.types.ts +15 -0
- package/src/shared/ui/templates/web-container/index.ts +2 -0
- package/src/shared/ui/templates/web-container/web-container.styles.ts +34 -0
- package/src/shared/ui/templates/web-container/web-container.tsx +172 -0
- package/src/shared/ui/templates/web-container/web-container.types.ts +21 -0
- package/.claude/rules/app-routing.mdc +0 -47
- package/.claude/rules/exports-at-end.mdc +0 -55
- package/.claude/rules/kebab-case-naming.mdc +0 -29
- package/.claude/rules/mediacubeco-packages.mdc +0 -56
- package/.claude/skills/generate-api-model/SKILL.md +0 -230
- package/.claude/skills/generate-api-model/references/resources/common.ts +0 -8
- package/.claude/skills/generate-api-model-mock/SKILL.md +0 -56
- package/.claude/skills/git-commit/SKILL.md +0 -139
- package/.gitignore +0 -34
- package/src/shared/assets/icons/like.tsx +0 -17
- package/src/shared/hooks/use-animated.ts +0 -200
- package/src/shared/hooks/use-mixins.ts +0 -36
- package/src/shared/hooks/use-safe-area.ts +0 -75
- package/src/shared/lib/api/repositories/auth/auth.ts +0 -23
- package/src/shared/lib/api/repositories/auth/auth.types.ts +0 -22
- package/src/shared/lib/api/repositories/auth/index.ts +0 -1
- package/src/shared/lib/navigation/hooks/use-navigation-native-tabs.ts +0 -10
- package/src/shared/lib/navigation/hooks/use-navigation-options.ts +0 -123
- package/src/shared/lib/navigation/navigation-native-tabs.context.tsx +0 -5
- package/src/shared/lib/navigation/navigation-native-tabs.provider.tsx +0 -12
- package/src/shared/lib/theme/constants/borders.ts +0 -8
- package/src/shared/lib/theme/constants/weights.ts +0 -13
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/index.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/post/index.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/post/post-comment.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/post/post.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/index.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/user-settings.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/user-verification.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/entities/user/user.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/index.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/post/index.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/post/post-comment.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/post/post.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/index.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/user-settings.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/user-verification.ts +0 -0
- /package/.claude/skills/{generate-api-model/references → api/references/model}/resources/user/user.ts +0 -0
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-commit
|
|
3
|
-
description: Creates git commits with proper messages and decomposes staged/unstaged changes into logical atomic commits. Use this skill whenever the user says "commit", "закоммить", "сделай коммит", "commit changes", "push", or asks to commit anything. Also use when the user asks to split or decompose changes into multiple commits. Always invoke this skill before running any git commit command — it provides the decomposition logic and message format rules for this project.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Git Commit Skill
|
|
7
|
-
|
|
8
|
-
This skill governs how to commit changes in this repository. The key goals are:
|
|
9
|
-
|
|
10
|
-
- Every commit is **atomic** — one logical change per commit, easy to revert or cherry-pick
|
|
11
|
-
- Every commit message **starts with the branch identifier** so commits are traceable to their task
|
|
12
|
-
- The message body is **specific and complete** — a future reader can understand what changed without looking at the diff
|
|
13
|
-
|
|
14
|
-
## Step 1: Understand the branch
|
|
15
|
-
|
|
16
|
-
Extract the branch identifier by stripping the `feature/` prefix:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
git branch --show-current
|
|
20
|
-
# feature/CU-869cbv9z3 → prefix = "CU-869cbv9z3"
|
|
21
|
-
# fix/CU-123abc → prefix = "CU-123abc"
|
|
22
|
-
# main → prefix = "" (no prefix, use plain message)
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
If the branch has no prefix to strip (e.g., `main`, `develop`), commit without a prefix.
|
|
26
|
-
|
|
27
|
-
## Step 2: Analyze all changes
|
|
28
|
-
|
|
29
|
-
Run these together to get the full picture:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
git status
|
|
33
|
-
git diff HEAD
|
|
34
|
-
git diff --cached
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Read the actual diff carefully — don't just look at filenames. You need to understand _what_ each change does, not just _where_ it is, to group things correctly.
|
|
38
|
-
|
|
39
|
-
## Step 3: Decompose into logical commits
|
|
40
|
-
|
|
41
|
-
This is the most important step. Think like a reviewer who will bisect this history in six months.
|
|
42
|
-
|
|
43
|
-
**Each commit should answer one question: "What single thing does this do?"**
|
|
44
|
-
|
|
45
|
-
Good decomposition principles:
|
|
46
|
-
|
|
47
|
-
- **By concern, not by file** — a component and its corresponding style/hook that only exist to support it belong together
|
|
48
|
-
- **Config/tooling separate from features** — `eslint`, `tsconfig`, `package.json`, `.env` changes are their own commit unless they were added specifically to enable a single feature that's in the same batch
|
|
49
|
-
- **Shared infrastructure separate from consumers** — a new shared component goes in one commit, the screen that uses it goes in another
|
|
50
|
-
- **Refactoring separate from new behavior** — if you cleaned up a file while adding a feature, those are two commits
|
|
51
|
-
- **In FSD terms**: changes that span multiple layers (`shared` + `entities` + `features` + `pages`) usually mean multiple commits — one per layer boundary crossed
|
|
52
|
-
|
|
53
|
-
Common anti-patterns to avoid:
|
|
54
|
-
|
|
55
|
-
- One giant commit with "various fixes" — always decompose
|
|
56
|
-
- Splitting one logical unit across commits (e.g., a component in one commit, its required types in another)
|
|
57
|
-
- Committing unrelated files together just because they were modified in the same session
|
|
58
|
-
|
|
59
|
-
After analyzing, produce a decomposition plan like this (show it mentally, then execute without asking for confirmation unless the decomposition is genuinely ambiguous):
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Commit 1: CU-869cbv9z3: add UserEntity and UserResource types
|
|
63
|
-
→ src/shared/lib/api/entities/user.ts
|
|
64
|
-
→ src/shared/lib/api/resources/user.ts
|
|
65
|
-
|
|
66
|
-
Commit 2: CU-869cbv9z3: add UserRepository with profile endpoint
|
|
67
|
-
→ src/shared/lib/api/models/user-repository.ts
|
|
68
|
-
→ src/shared/lib/api/api.ts (registration only)
|
|
69
|
-
|
|
70
|
-
Commit 3: CU-869cbv9z3: add profile screen with user data fetching
|
|
71
|
-
→ src/pages/profile/
|
|
72
|
-
→ src/features/profile/
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Step 4: Stage and commit each group
|
|
76
|
-
|
|
77
|
-
For each commit in the plan, stage exactly the relevant files and commit:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
# Stage specific files (never use git add . or git add -A)
|
|
81
|
-
git add .
|
|
82
|
-
|
|
83
|
-
# Commit with the correct message format
|
|
84
|
-
git commit -m "{prefix}: add UserEntity and UserResource types"
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Repeat for each commit in the plan.
|
|
88
|
-
|
|
89
|
-
If a single file contains changes that belong to different logical commits (mixed concerns in one file), use `git add -p` to stage only the relevant hunks:
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
git add -p src/shared/lib/api/api.ts
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Commit message format
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
BRANCH-ID: short imperative description
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Rules:
|
|
102
|
-
|
|
103
|
-
- Start with the branch ID (everything after `feature/`, `fix/`, `chore/` etc.)
|
|
104
|
-
- Follow with `: ` then the message
|
|
105
|
-
- Use imperative mood: "add", "fix", "remove", "update", "extract" — not "added", "adding", "fixes"
|
|
106
|
-
- Be specific: "add UserEntity with profile fields" beats "add user types"
|
|
107
|
-
- Keep it under 72 characters total
|
|
108
|
-
- No period at the end
|
|
109
|
-
|
|
110
|
-
**Examples:**
|
|
111
|
-
|
|
112
|
-
| Situation | Message |
|
|
113
|
-
| -------------------- | ----------------------------------------------------- |
|
|
114
|
-
| New API types | `{prefix} - add OrderResource and OrderEntity` |
|
|
115
|
-
| New screen | `{prefix} - add checkout screen with order summary` |
|
|
116
|
-
| Bug fix | `{prefix} - fix token refresh on 401 response` |
|
|
117
|
-
| Config change | `{prefix} - add react-query persistence config` |
|
|
118
|
-
| Refactor | `{prefix} - extract AuthHeader into shared component` |
|
|
119
|
-
| Multiple small fixes | `{prefix} - fix navigation types and screen params` |
|
|
120
|
-
|
|
121
|
-
## Step 5: Verify
|
|
122
|
-
|
|
123
|
-
After all commits are done:
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
git log --oneline -10
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
Each commit should read cleanly as a standalone unit of work. If two adjacent commits feel like they should be one, or one commit feels like it should be two — that's worth noting but not worth amending if already done.
|
|
130
|
-
|
|
131
|
-
## Edge cases
|
|
132
|
-
|
|
133
|
-
**Nothing staged, nothing to commit** — say so and stop. Don't create empty commits.
|
|
134
|
-
|
|
135
|
-
**Only whitespace / formatting changes** — still a valid commit: `{prefix} - format auth module`.
|
|
136
|
-
|
|
137
|
-
**Single logical change across many files** — fine, that's one commit. Stage all the files together.
|
|
138
|
-
|
|
139
|
-
**Uncertain decomposition** — if you genuinely cannot tell whether two changes are the same logical unit, keep them together. Atomic is better than artificially split.
|
package/.gitignore
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# dependencies
|
|
2
|
-
node_modules/
|
|
3
|
-
yarn-debug.*
|
|
4
|
-
yarn-error.*
|
|
5
|
-
|
|
6
|
-
# build
|
|
7
|
-
/ios
|
|
8
|
-
/android
|
|
9
|
-
dist/
|
|
10
|
-
web-build/
|
|
11
|
-
.expo/
|
|
12
|
-
.kotlin/
|
|
13
|
-
.DS_Store
|
|
14
|
-
.metro-health-check*
|
|
15
|
-
*.orig.*
|
|
16
|
-
*.pem
|
|
17
|
-
*.jks
|
|
18
|
-
*.p8
|
|
19
|
-
*.p12
|
|
20
|
-
*.key
|
|
21
|
-
*.mobileprovision
|
|
22
|
-
|
|
23
|
-
# typescript
|
|
24
|
-
*.tsbuildinfo
|
|
25
|
-
|
|
26
|
-
# secret
|
|
27
|
-
/.secret/*
|
|
28
|
-
!/.secret/README.md
|
|
29
|
-
|
|
30
|
-
# env
|
|
31
|
-
.env*.local
|
|
32
|
-
|
|
33
|
-
# ai
|
|
34
|
-
.agents/skills/
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Path, Svg } from 'react-native-svg'
|
|
2
|
-
import { type IconProps } from './type'
|
|
3
|
-
|
|
4
|
-
const Like = ({ size, color }: IconProps) => {
|
|
5
|
-
return (
|
|
6
|
-
<Svg width={size} height={size} viewBox={'0 0 24 24'} fill={'none'}>
|
|
7
|
-
<Path
|
|
8
|
-
d={
|
|
9
|
-
'M12.0817 17.2109L11.9999 17.2927L11.91 17.2109C8.0272 13.6878 5.46044 11.3581 5.46044 8.99567C5.46044 7.36079 6.6866 6.13463 8.32147 6.13463C9.58033 6.13463 10.8065 6.95207 11.2397 8.06379H12.7602C13.1934 6.95207 14.4196 6.13463 15.6784 6.13463C17.3133 6.13463 18.5395 7.36079 18.5395 8.99567C18.5395 11.3581 15.9727 13.6878 12.0817 17.2109ZM15.6784 4.49976C14.2561 4.49976 12.891 5.16188 11.9999 6.20003C11.1089 5.16188 9.74382 4.49976 8.32147 4.49976C5.80376 4.49976 3.82556 6.46978 3.82556 8.99567C3.82556 12.0774 6.60485 14.6033 10.8147 18.4207L11.9999 19.4998L13.1852 18.4207C17.395 14.6033 20.1743 12.0774 20.1743 8.99567C20.1743 6.46978 18.1961 4.49976 15.6784 4.49976Z'
|
|
10
|
-
}
|
|
11
|
-
fill={color}
|
|
12
|
-
/>
|
|
13
|
-
</Svg>
|
|
14
|
-
)
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export default Like
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
createAnimatedComponent as animate,
|
|
4
|
-
Extrapolation as AnimatedExtrapolation,
|
|
5
|
-
cancelAnimation,
|
|
6
|
-
interpolate as reInterpolate,
|
|
7
|
-
interpolateColor as reInterpolateColor,
|
|
8
|
-
useAnimatedStyle,
|
|
9
|
-
useSharedValue,
|
|
10
|
-
withClamp,
|
|
11
|
-
withDelay,
|
|
12
|
-
withRepeat,
|
|
13
|
-
withSequence,
|
|
14
|
-
withSpring,
|
|
15
|
-
withTiming,
|
|
16
|
-
} from 'react-native-reanimated'
|
|
17
|
-
import { runOnJS } from 'react-native-worklets'
|
|
18
|
-
import { type Theme, useThemeMode } from '../lib'
|
|
19
|
-
|
|
20
|
-
type AnimatedState = string | number
|
|
21
|
-
|
|
22
|
-
type AnimatedStateRange = string[] | number[]
|
|
23
|
-
|
|
24
|
-
type AnimatedConfig = {
|
|
25
|
-
delay?: keyof Theme['DELAYS']
|
|
26
|
-
duration?: keyof Theme['DURATIONS']
|
|
27
|
-
repeat?: number
|
|
28
|
-
clamp?: [min?: AnimatedState, max?: AnimatedState]
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const useAnimated = <Value extends AnimatedState = AnimatedState>(
|
|
32
|
-
initValue: Value,
|
|
33
|
-
config?: AnimatedConfig
|
|
34
|
-
) => {
|
|
35
|
-
const value = useSharedValue(initValue)
|
|
36
|
-
const { DELAYS, DURATIONS } = useThemeMode()
|
|
37
|
-
|
|
38
|
-
const {
|
|
39
|
-
delay: defaultDelay = 'EMPTY',
|
|
40
|
-
duration: defaultDuration = 'BASE',
|
|
41
|
-
repeat: defaultRepeat = 1,
|
|
42
|
-
clamp: defaultCamp = [],
|
|
43
|
-
} = config ?? {}
|
|
44
|
-
|
|
45
|
-
const timing = useCallback(
|
|
46
|
-
async (newValue: Value, config?: AnimatedConfig) => {
|
|
47
|
-
const {
|
|
48
|
-
delay = defaultDelay,
|
|
49
|
-
duration = defaultDuration,
|
|
50
|
-
repeat = defaultRepeat,
|
|
51
|
-
clamp = defaultCamp,
|
|
52
|
-
} = config ?? {}
|
|
53
|
-
|
|
54
|
-
return new Promise((resolve) => {
|
|
55
|
-
value.value = withDelay(
|
|
56
|
-
DELAYS[delay],
|
|
57
|
-
withRepeat(
|
|
58
|
-
withClamp(
|
|
59
|
-
{ min: clamp[0], max: clamp[1] },
|
|
60
|
-
withTiming(newValue, { duration: DURATIONS[duration] })
|
|
61
|
-
),
|
|
62
|
-
repeat,
|
|
63
|
-
false,
|
|
64
|
-
() => runOnJS(resolve)(undefined)
|
|
65
|
-
)
|
|
66
|
-
) as Value
|
|
67
|
-
})
|
|
68
|
-
},
|
|
69
|
-
[value, defaultDelay, defaultDuration, defaultRepeat, defaultCamp, DELAYS, DURATIONS]
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
const spring = useCallback(
|
|
73
|
-
async (newValue: Value, config?: AnimatedConfig) => {
|
|
74
|
-
const {
|
|
75
|
-
delay = defaultDelay,
|
|
76
|
-
duration = defaultDuration,
|
|
77
|
-
repeat = defaultRepeat,
|
|
78
|
-
clamp = defaultCamp,
|
|
79
|
-
} = config ?? {}
|
|
80
|
-
|
|
81
|
-
return new Promise((resolve) => {
|
|
82
|
-
value.value = withDelay(
|
|
83
|
-
DELAYS[delay],
|
|
84
|
-
withRepeat(
|
|
85
|
-
withClamp(
|
|
86
|
-
{ min: clamp[0], max: clamp[1] },
|
|
87
|
-
withSpring(newValue, { duration: DURATIONS[duration] })
|
|
88
|
-
),
|
|
89
|
-
repeat,
|
|
90
|
-
false,
|
|
91
|
-
() => runOnJS(resolve)(undefined)
|
|
92
|
-
) as Value
|
|
93
|
-
)
|
|
94
|
-
})
|
|
95
|
-
},
|
|
96
|
-
[value, defaultDelay, defaultDuration, defaultRepeat, defaultCamp, DELAYS, DURATIONS]
|
|
97
|
-
)
|
|
98
|
-
|
|
99
|
-
const sequenceTiming = useCallback(
|
|
100
|
-
(newValue: Value[], config?: AnimatedConfig) => {
|
|
101
|
-
const {
|
|
102
|
-
delay = defaultDelay,
|
|
103
|
-
duration = defaultDuration,
|
|
104
|
-
repeat = defaultRepeat,
|
|
105
|
-
clamp = defaultCamp,
|
|
106
|
-
} = config ?? {}
|
|
107
|
-
|
|
108
|
-
return new Promise((resolve) => {
|
|
109
|
-
value.value = withDelay(
|
|
110
|
-
DELAYS[delay],
|
|
111
|
-
withRepeat(
|
|
112
|
-
withClamp(
|
|
113
|
-
{ min: clamp[0], max: clamp[1] },
|
|
114
|
-
withSequence(
|
|
115
|
-
...newValue.map((value) => withTiming(value, { duration: DURATIONS[duration] }))
|
|
116
|
-
)
|
|
117
|
-
),
|
|
118
|
-
repeat,
|
|
119
|
-
false,
|
|
120
|
-
() => runOnJS(resolve)(undefined)
|
|
121
|
-
) as Value
|
|
122
|
-
)
|
|
123
|
-
})
|
|
124
|
-
},
|
|
125
|
-
[value, defaultDelay, defaultDuration, defaultRepeat, defaultCamp, DELAYS, DURATIONS]
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
const sequenceSpring = useCallback(
|
|
129
|
-
(newValue: Value[], config?: AnimatedConfig) => {
|
|
130
|
-
const {
|
|
131
|
-
delay = defaultDelay,
|
|
132
|
-
duration = defaultDuration,
|
|
133
|
-
repeat = defaultRepeat,
|
|
134
|
-
clamp = defaultCamp,
|
|
135
|
-
} = config ?? {}
|
|
136
|
-
|
|
137
|
-
return new Promise((resolve) => {
|
|
138
|
-
value.value = withDelay(
|
|
139
|
-
DELAYS[delay],
|
|
140
|
-
withRepeat(
|
|
141
|
-
withClamp(
|
|
142
|
-
{ min: clamp[0], max: clamp[1] },
|
|
143
|
-
withSequence(
|
|
144
|
-
...newValue.map((value) => withSpring(value, { duration: DURATIONS[duration] }))
|
|
145
|
-
)
|
|
146
|
-
),
|
|
147
|
-
repeat,
|
|
148
|
-
false,
|
|
149
|
-
() => runOnJS(resolve)(undefined)
|
|
150
|
-
) as Value
|
|
151
|
-
)
|
|
152
|
-
})
|
|
153
|
-
},
|
|
154
|
-
[value, defaultDelay, defaultDuration, defaultRepeat, defaultCamp, DELAYS, DURATIONS]
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
const stop = useCallback(() => {
|
|
158
|
-
'worklet'
|
|
159
|
-
|
|
160
|
-
cancelAnimation(value)
|
|
161
|
-
}, [value])
|
|
162
|
-
|
|
163
|
-
const interpolate = useCallback(
|
|
164
|
-
<Range extends AnimatedStateRange>(
|
|
165
|
-
range: Range,
|
|
166
|
-
inputRange?: number[],
|
|
167
|
-
extrapolation?: AnimatedExtrapolation
|
|
168
|
-
): Range[number] => {
|
|
169
|
-
'worklet'
|
|
170
|
-
|
|
171
|
-
const defaultInputRange: number[] = []
|
|
172
|
-
|
|
173
|
-
const segments = range.length - 1
|
|
174
|
-
|
|
175
|
-
for (let index = 0; index < range.length; index += 1) {
|
|
176
|
-
defaultInputRange.push(segments > 0 ? (1 / segments) * index : 0)
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (typeof range[0] === 'number') {
|
|
180
|
-
return reInterpolate(
|
|
181
|
-
value.value as number,
|
|
182
|
-
inputRange ?? defaultInputRange,
|
|
183
|
-
range as number[],
|
|
184
|
-
extrapolation
|
|
185
|
-
)
|
|
186
|
-
} else {
|
|
187
|
-
return reInterpolateColor(
|
|
188
|
-
value.value as number,
|
|
189
|
-
inputRange ?? defaultInputRange,
|
|
190
|
-
range as string[]
|
|
191
|
-
)
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
[value]
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
return [value, { timing, spring, sequenceTiming, sequenceSpring, stop, interpolate }] as const
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
export { useAnimated, useAnimatedStyle, animate, AnimatedExtrapolation }
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { useCallback } from 'react'
|
|
2
|
-
import { useWindowDimensions } from 'react-native'
|
|
3
|
-
|
|
4
|
-
const useMixins = () => {
|
|
5
|
-
const { width, height } = useWindowDimensions()
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @default 1
|
|
9
|
-
**/
|
|
10
|
-
const byWindowWidth = useCallback(
|
|
11
|
-
(value: number = 1) => {
|
|
12
|
-
return width * value
|
|
13
|
-
},
|
|
14
|
-
[width]
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @default 1
|
|
19
|
-
**/
|
|
20
|
-
const byWindowHeight = useCallback(
|
|
21
|
-
(value: number = 1) => {
|
|
22
|
-
return height * value
|
|
23
|
-
},
|
|
24
|
-
[height]
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
return {
|
|
28
|
-
byWindowWidth,
|
|
29
|
-
byWindowHeight,
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
type Mixins = ReturnType<typeof useMixins>
|
|
34
|
-
|
|
35
|
-
export { useMixins }
|
|
36
|
-
export type { Mixins }
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Platform } from '@mediacubeco/base-react-native'
|
|
2
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
3
|
-
import { useBottomTabBarHeight } from 'expo-router/js-tabs'
|
|
4
|
-
import { useHeaderHeight } from 'expo-router/react-navigation'
|
|
5
|
-
import { useNavigationNativeTabs } from '../lib'
|
|
6
|
-
|
|
7
|
-
const ANDROID_TAB_BAR_DEFAULT_HEIGHT = 56
|
|
8
|
-
const IOS_TAB_BAR_DEFAULT_HEIGHT = 50
|
|
9
|
-
|
|
10
|
-
const useNavigationHeaderHeight = (safeArea: number = 0) => {
|
|
11
|
-
try {
|
|
12
|
-
const height = useHeaderHeight()
|
|
13
|
-
|
|
14
|
-
return Platform.by({
|
|
15
|
-
android: height ? 0 : safeArea,
|
|
16
|
-
ios: height || safeArea,
|
|
17
|
-
default: safeArea,
|
|
18
|
-
})
|
|
19
|
-
} catch (_) {
|
|
20
|
-
return safeArea
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const useNavigationFooterHeight = (safeArea: number = 0) => {
|
|
25
|
-
const isNativeTabs = useNavigationNativeTabs()
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const height = useBottomTabBarHeight()
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
bottom: Platform.by({
|
|
32
|
-
android: height ? 0 : safeArea,
|
|
33
|
-
ios: height ? 0 : safeArea,
|
|
34
|
-
default: safeArea,
|
|
35
|
-
}),
|
|
36
|
-
value: Platform.by({
|
|
37
|
-
android: height,
|
|
38
|
-
ios: height,
|
|
39
|
-
default: safeArea,
|
|
40
|
-
}),
|
|
41
|
-
}
|
|
42
|
-
} catch (_) {
|
|
43
|
-
return {
|
|
44
|
-
bottom: Platform.by({
|
|
45
|
-
android: isNativeTabs ? 0 : safeArea,
|
|
46
|
-
ios: safeArea,
|
|
47
|
-
default: safeArea,
|
|
48
|
-
}),
|
|
49
|
-
value: Platform.by({
|
|
50
|
-
android: isNativeTabs ? safeArea * 2 + ANDROID_TAB_BAR_DEFAULT_HEIGHT : safeArea,
|
|
51
|
-
ios: isNativeTabs ? safeArea + IOS_TAB_BAR_DEFAULT_HEIGHT : safeArea,
|
|
52
|
-
default: safeArea,
|
|
53
|
-
}),
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const useSafeArea = () => {
|
|
59
|
-
const { top, bottom, left, right } = useSafeAreaInsets()
|
|
60
|
-
const header = useNavigationHeaderHeight(top)
|
|
61
|
-
const footer = useNavigationFooterHeight(bottom)
|
|
62
|
-
|
|
63
|
-
return {
|
|
64
|
-
TOP: header,
|
|
65
|
-
BOTTOM: footer.bottom,
|
|
66
|
-
FOOTER: footer.value,
|
|
67
|
-
LEFT: left,
|
|
68
|
-
RIGHT: right,
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
type SafeArea = ReturnType<typeof useSafeArea>
|
|
73
|
-
|
|
74
|
-
export { useSafeArea }
|
|
75
|
-
export type { SafeArea }
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ApiInstance } from '../../models'
|
|
2
|
-
import {
|
|
3
|
-
type SignInConfig,
|
|
4
|
-
type SignInResponse,
|
|
5
|
-
type SignUpConfig,
|
|
6
|
-
type SignUpResponse,
|
|
7
|
-
} from './auth.types'
|
|
8
|
-
|
|
9
|
-
class AuthRepository extends ApiInstance {
|
|
10
|
-
async signIn(_: SignInConfig) {
|
|
11
|
-
const { data } = await this.post<SignInResponse>('/sign-in')
|
|
12
|
-
|
|
13
|
-
return data
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
async signUp(_: SignUpConfig) {
|
|
17
|
-
const { data } = await this.post<SignUpResponse>('/sign-up')
|
|
18
|
-
|
|
19
|
-
return data
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default AuthRepository
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type ApiResponse } from '../../api.types'
|
|
2
|
-
|
|
3
|
-
// config
|
|
4
|
-
|
|
5
|
-
type SignInConfig = {}
|
|
6
|
-
|
|
7
|
-
type SignUpConfig = {}
|
|
8
|
-
|
|
9
|
-
// response
|
|
10
|
-
|
|
11
|
-
type SignInResponse = ApiResponse<{}>
|
|
12
|
-
|
|
13
|
-
type SignUpResponse = ApiResponse<{}>
|
|
14
|
-
|
|
15
|
-
export type {
|
|
16
|
-
// config
|
|
17
|
-
SignInConfig,
|
|
18
|
-
SignUpConfig,
|
|
19
|
-
// response
|
|
20
|
-
SignInResponse,
|
|
21
|
-
SignUpResponse,
|
|
22
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as AuthRepository } from './auth'
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useContext } from 'react'
|
|
2
|
-
import { NavigationNativeTabsContext } from '../navigation-native-tabs.context'
|
|
3
|
-
|
|
4
|
-
const useNavigationNativeTabs = () => {
|
|
5
|
-
const isNativeTabs = useContext(NavigationNativeTabsContext)
|
|
6
|
-
|
|
7
|
-
return isNativeTabs
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export { useNavigationNativeTabs }
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { Platform } from '@mediacubeco/base-react-native'
|
|
2
|
-
import { useCallback } from 'react'
|
|
3
|
-
import { isGlassEffectAPIAvailable } from 'expo-glass-effect'
|
|
4
|
-
import { type StackScreenProps } from 'expo-router'
|
|
5
|
-
import {
|
|
6
|
-
type MaterialIcon,
|
|
7
|
-
type NativeTabsProps,
|
|
8
|
-
type NativeTabsTriggerIconProps,
|
|
9
|
-
type NativeTabsTriggerLabelProps,
|
|
10
|
-
type NativeTabTriggerProps,
|
|
11
|
-
type SFSymbolIcon,
|
|
12
|
-
} from 'expo-router/unstable-native-tabs'
|
|
13
|
-
import { useThemeMode, useThemeSetup } from '../../theme'
|
|
14
|
-
|
|
15
|
-
const useNavigationStackOptions = () => {
|
|
16
|
-
const { COLORS } = useThemeMode()
|
|
17
|
-
const { themeModeSystem } = useThemeSetup()
|
|
18
|
-
|
|
19
|
-
const createStackOptions = useCallback(
|
|
20
|
-
(options?: StackScreenProps['options']) => {
|
|
21
|
-
return {
|
|
22
|
-
headerShown: false,
|
|
23
|
-
headerTransparent: false,
|
|
24
|
-
headerShadowVisible: false,
|
|
25
|
-
contentStyle: {
|
|
26
|
-
backgroundColor: COLORS.FILL.BASE,
|
|
27
|
-
},
|
|
28
|
-
...options,
|
|
29
|
-
} satisfies StackScreenProps['options']
|
|
30
|
-
},
|
|
31
|
-
[COLORS]
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
const createScreenOptions = useCallback(
|
|
35
|
-
(options?: StackScreenProps['options']) => {
|
|
36
|
-
return {
|
|
37
|
-
gestureEnabled: true,
|
|
38
|
-
gestureDirection: 'horizontal',
|
|
39
|
-
animation: 'default',
|
|
40
|
-
headerShown: true,
|
|
41
|
-
headerBackButtonDisplayMode: 'minimal',
|
|
42
|
-
headerTransparent: Platform.OS === 'ios',
|
|
43
|
-
headerBlurEffect: isGlassEffectAPIAvailable() ? 'none' : themeModeSystem,
|
|
44
|
-
headerTintColor: COLORS.TYPOGRAPHY.BASE,
|
|
45
|
-
headerStyle: {
|
|
46
|
-
backgroundColor: Platform.by({
|
|
47
|
-
ios: COLORS.FILL.TRANSPARENT,
|
|
48
|
-
default: COLORS.FILL.CONTRAST,
|
|
49
|
-
}),
|
|
50
|
-
},
|
|
51
|
-
headerTitleStyle: {
|
|
52
|
-
color: COLORS.TYPOGRAPHY.BASE,
|
|
53
|
-
},
|
|
54
|
-
...options,
|
|
55
|
-
} satisfies StackScreenProps['options']
|
|
56
|
-
},
|
|
57
|
-
[COLORS, themeModeSystem]
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
return { createStackOptions, createScreenOptions }
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
const useNavigationTabBarOptions = () => {
|
|
64
|
-
const { COLORS } = useThemeMode()
|
|
65
|
-
const { isThemeModeDark } = useThemeSetup()
|
|
66
|
-
|
|
67
|
-
const createTabBarOptions = useCallback(
|
|
68
|
-
(options?: NativeTabsProps) => {
|
|
69
|
-
return {
|
|
70
|
-
sidebarAdaptable: Platform.OS === 'ios',
|
|
71
|
-
disableTransparentOnScrollEdge: Platform.OS === 'ios',
|
|
72
|
-
labelVisibilityMode: 'labeled',
|
|
73
|
-
blurEffect:
|
|
74
|
-
(isGlassEffectAPIAvailable() && 'systemMaterial') ||
|
|
75
|
-
(isThemeModeDark && 'dark') ||
|
|
76
|
-
'light',
|
|
77
|
-
...options,
|
|
78
|
-
} satisfies NativeTabsProps
|
|
79
|
-
},
|
|
80
|
-
[isThemeModeDark]
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
const createTabOptions = useCallback(
|
|
84
|
-
({
|
|
85
|
-
name,
|
|
86
|
-
children,
|
|
87
|
-
sf,
|
|
88
|
-
md,
|
|
89
|
-
}: NativeTabTriggerProps &
|
|
90
|
-
NativeTabsTriggerLabelProps &
|
|
91
|
-
Partial<SFSymbolIcon> &
|
|
92
|
-
Partial<MaterialIcon> = {}) => {
|
|
93
|
-
const triggerProps = {
|
|
94
|
-
name,
|
|
95
|
-
} satisfies NativeTabTriggerProps
|
|
96
|
-
|
|
97
|
-
const triggerLabelProps = {
|
|
98
|
-
hidden: Platform.OS !== 'web',
|
|
99
|
-
children,
|
|
100
|
-
} satisfies NativeTabsTriggerLabelProps
|
|
101
|
-
|
|
102
|
-
const triggerIconProps = {
|
|
103
|
-
selectedColor: COLORS.TYPOGRAPHY.PRIMARY,
|
|
104
|
-
sf,
|
|
105
|
-
md,
|
|
106
|
-
} satisfies NativeTabsTriggerIconProps
|
|
107
|
-
|
|
108
|
-
return {
|
|
109
|
-
triggerProps,
|
|
110
|
-
triggerLabelProps,
|
|
111
|
-
triggerIconProps,
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
[COLORS]
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
createTabBarOptions,
|
|
119
|
-
createTabOptions,
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export { useNavigationStackOptions, useNavigationTabBarOptions }
|