@coze-arch/cli 0.0.1-alpha.3002ee → 0.0.1-alpha.3260db
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/lib/__templates__/expo/.coze +7 -2
- package/lib/__templates__/expo/.cozeproj/scripts/dev_build.sh +46 -0
- package/lib/__templates__/expo/.cozeproj/scripts/dev_run.sh +229 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_build.sh +47 -0
- package/lib/__templates__/expo/.cozeproj/scripts/prod_run.sh +34 -0
- package/lib/__templates__/expo/.cozeproj/scripts/server_dev_run.sh +46 -0
- package/lib/__templates__/expo/README.md +64 -7
- package/lib/__templates__/expo/_gitignore +1 -1
- package/lib/__templates__/expo/_npmrc +3 -5
- package/lib/__templates__/expo/client/app/+not-found.tsx +8 -72
- package/lib/__templates__/expo/client/app/_layout.tsx +17 -12
- package/lib/__templates__/expo/client/app/index.tsx +1 -0
- package/lib/__templates__/expo/client/app.config.ts +76 -0
- package/lib/__templates__/expo/client/components/Screen.tsx +5 -18
- package/lib/__templates__/expo/client/components/ThemedText.tsx +33 -0
- package/lib/__templates__/expo/client/components/ThemedView.tsx +37 -0
- package/lib/__templates__/expo/client/contexts/AuthContext.tsx +14 -107
- package/lib/__templates__/expo/client/declarations.d.ts +5 -0
- package/lib/__templates__/expo/{eslint.config.mjs → client/eslint.config.mjs} +33 -10
- package/lib/__templates__/expo/client/global.css +6 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.animation.ts +178 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.constants.ts +62 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.md +437 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.styles.ts +95 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.tsx +340 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/accordion.types.ts +267 -0
- package/lib/__templates__/expo/client/heroui/components/accordion/index.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.constants.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.hooks.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.md +263 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.styles.ts +65 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.tsx +181 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.types.ts +99 -0
- package/lib/__templates__/expo/client/heroui/components/alert/alert.utils.tsx +25 -0
- package/lib/__templates__/expo/client/heroui/components/alert/default-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/components/alert/index.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/alert/success-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/components/alert/warning-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.animation.ts +123 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.constants.ts +19 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.context.ts +11 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.md +386 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.styles.ts +145 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.tsx +307 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/avatar.types.ts +239 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/index.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/avatar/person-icon.tsx +23 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.animation.ts +42 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.constants.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.md +349 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.styles.ts +66 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.tsx +351 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/bottom-sheet.types.ts +150 -0
- package/lib/__templates__/expo/client/heroui/components/bottom-sheet/index.ts +16 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.md +381 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.styles.ts +89 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.tsx +284 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.types.ts +175 -0
- package/lib/__templates__/expo/client/heroui/components/button/button.utils.ts +34 -0
- package/lib/__templates__/expo/client/heroui/components/button/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.constants.ts +11 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.md +186 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.styles.ts +35 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.tsx +153 -0
- package/lib/__templates__/expo/client/heroui/components/card/card.types.ts +77 -0
- package/lib/__templates__/expo/client/heroui/components/card/index.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.animation.ts +202 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.md +311 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.styles.ts +105 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.tsx +251 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/checkbox.types.ts +216 -0
- package/lib/__templates__/expo/client/heroui/components/checkbox/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.md +190 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.styles.ts +234 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.tsx +125 -0
- package/lib/__templates__/expo/client/heroui/components/chip/chip.types.ts +69 -0
- package/lib/__templates__/expo/client/heroui/components/chip/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.md +109 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.styles.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.tsx +57 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/close-button.types.ts +30 -0
- package/lib/__templates__/expo/client/heroui/components/close-button/index.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.context.ts +14 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.md +241 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.styles.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.tsx +245 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/control-field.types.ts +67 -0
- package/lib/__templates__/expo/client/heroui/components/control-field/index.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.animation.ts +53 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.constants.ts +30 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.md +129 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.styles.ts +25 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.tsx +81 -0
- package/lib/__templates__/expo/client/heroui/components/description/description.types.ts +77 -0
- package/lib/__templates__/expo/client/heroui/components/description/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.animation.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.constants.ts +13 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.md +288 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.styles.ts +77 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.tsx +379 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/dialog.types.ts +199 -0
- package/lib/__templates__/expo/client/heroui/components/dialog/index.ts +12 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.animation.ts +50 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.constants.ts +31 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.md +204 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.styles.ts +23 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.tsx +91 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/field-error.types.ts +79 -0
- package/lib/__templates__/expo/client/heroui/components/field-error/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/input/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.md +193 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.styles.ts +51 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.tsx +96 -0
- package/lib/__templates__/expo/client/heroui/components/input/input.types.ts +44 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.animation.ts +14 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.md +197 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.styles.ts +31 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.tsx +239 -0
- package/lib/__templates__/expo/client/heroui/components/input-group/input-group.types.ts +98 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.animation.ts +199 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.constants.ts +12 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.md +376 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.styles.ts +68 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.tsx +414 -0
- package/lib/__templates__/expo/client/heroui/components/input-otp/input-otp.types.ts +275 -0
- package/lib/__templates__/expo/client/heroui/components/label/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.md +187 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.styles.ts +44 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.tsx +172 -0
- package/lib/__templates__/expo/client/heroui/components/label/label.types.ts +86 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/index.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.constants.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.md +387 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.styles.ts +40 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.tsx +206 -0
- package/lib/__templates__/expo/client/heroui/components/list-group/list-group.types.ts +132 -0
- package/lib/__templates__/expo/client/heroui/components/menu/index.ts +38 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.animation.ts +121 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.constants.ts +37 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.md +620 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.styles.ts +107 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.tsx +664 -0
- package/lib/__templates__/expo/client/heroui/components/menu/menu.types.ts +394 -0
- package/lib/__templates__/expo/client/heroui/components/popover/arrow-svg.tsx +180 -0
- package/lib/__templates__/expo/client/heroui/components/popover/index.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.animation.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.constants.ts +34 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.md +508 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.styles.ts +98 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.tsx +624 -0
- package/lib/__templates__/expo/client/heroui/components/popover/popover.types.ts +290 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/index.ts +4 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.animation.ts +449 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.constants.ts +12 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.md +328 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.styles.ts +85 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.tsx +330 -0
- package/lib/__templates__/expo/client/heroui/components/pressable-feedback/pressable-feedback.types.ts +386 -0
- package/lib/__templates__/expo/client/heroui/components/radio/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.animation.ts +92 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.constants.ts +11 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.md +339 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.styles.ts +80 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.tsx +217 -0
- package/lib/__templates__/expo/client/heroui/components/radio/radio.types.ts +106 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.animation.ts +20 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.context.ts +14 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.md +273 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.styles.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.tsx +220 -0
- package/lib/__templates__/expo/client/heroui/components/radio-group/radio-group.types.ts +64 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.animation.ts +132 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.constants.ts +21 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.md +206 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.styles.ts +52 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.tsx +262 -0
- package/lib/__templates__/expo/client/heroui/components/scroll-shadow/scroll-shadow.types.ts +121 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/index.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.constants.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.md +231 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.styles.ts +35 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.tsx +253 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-field.types.ts +160 -0
- package/lib/__templates__/expo/client/heroui/components/search-field/search-icon.tsx +37 -0
- package/lib/__templates__/expo/client/heroui/components/select/index.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.animation.ts +92 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.constants.ts +53 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.md +796 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.styles.ts +149 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.tsx +828 -0
- package/lib/__templates__/expo/client/heroui/components/select/select.types.ts +438 -0
- package/lib/__templates__/expo/client/heroui/components/separator/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.md +106 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.styles.ts +50 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.tsx +62 -0
- package/lib/__templates__/expo/client/heroui/components/separator/separator.types.ts +40 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/linear-gradient.tsx +45 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.animation.ts +350 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.constants.ts +39 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.md +208 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.styles.ts +49 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.tsx +183 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton/skeleton.types.ts +191 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/index.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.constants.ts +7 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.md +247 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.styles.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.tsx +94 -0
- package/lib/__templates__/expo/client/heroui/components/skeleton-group/skeleton-group.types.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/slider/index.ts +23 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.animation.ts +87 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.constants.ts +24 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.md +348 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.styles.ts +85 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.tsx +413 -0
- package/lib/__templates__/expo/client/heroui/components/slider/slider.types.ts +120 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/index.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner-icon.tsx +49 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.animation.ts +150 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.constants.ts +36 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.md +199 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.styles.ts +44 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.tsx +198 -0
- package/lib/__templates__/expo/client/heroui/components/spinner/spinner.types.ts +158 -0
- package/lib/__templates__/expo/client/heroui/components/surface/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.animation.ts +18 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.md +136 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.styles.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.tsx +66 -0
- package/lib/__templates__/expo/client/heroui/components/surface/surface.types.ts +46 -0
- package/lib/__templates__/expo/client/heroui/components/switch/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.animation.ts +243 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.constants.ts +26 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.md +334 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.styles.ts +83 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.tsx +280 -0
- package/lib/__templates__/expo/client/heroui/components/switch/switch.types.ts +208 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/index.ts +8 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.animation.ts +246 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.constants.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.context.ts +28 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.md +565 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.styles.ts +168 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.tsx +445 -0
- package/lib/__templates__/expo/client/heroui/components/tabs/tabs.types.ts +341 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/index.ts +15 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.animation.ts +17 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.constants.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.md +404 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.styles.ts +74 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.tsx +325 -0
- package/lib/__templates__/expo/client/heroui/components/tag-group/tag-group.types.ts +125 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.md +133 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.styles.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.tsx +44 -0
- package/lib/__templates__/expo/client/heroui/components/text-area/text-area.types.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.animation.ts +20 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.constants.ts +6 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.md +256 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.styles.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.tsx +82 -0
- package/lib/__templates__/expo/client/heroui/components/text-field/text-field.types.ts +56 -0
- package/lib/__templates__/expo/client/heroui/components/toast/index.ts +4 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.animation.ts +381 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.constants.ts +10 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.hooks.ts +73 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.md +420 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.styles.ts +89 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.tsx +472 -0
- package/lib/__templates__/expo/client/heroui/components/toast/toast.types.ts +320 -0
- package/lib/__templates__/expo/client/heroui/docs.md +54 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/hooks/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/hooks/use-is-on-surface.ts +8 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/hooks/use-theme-color.ts +137 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/cn.ts +12 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/color-kit/index.ts +2392 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/color-kit/types.ts +212 -0
- package/lib/__templates__/expo/client/heroui/helpers/external/utils/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/animated-check-icon.tsx +78 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/bottom-sheet-content-container.tsx +97 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/bottom-sheet-content.tsx +158 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/check-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/chevron-down-icon.tsx +28 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/chevron-right-icon.tsx +29 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/close-icon.tsx +29 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/full-window-overlay.tsx +48 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/hero-text.tsx +71 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/components/index.ts +9 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/animation-settings-context.ts +19 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/bottom-sheet-is-dragging-context.ts +11 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/form-field-context.ts +36 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/contexts/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/index.ts +14 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-augmented-ref.ts +32 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-bottom-sheet-aware-handlers.ts +94 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-bottom-sheet-gesture-handlers.ts +52 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-combined-animation-disabled-state.ts +49 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-controllable-state.ts +124 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-dev-info.ts +38 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-keyboard-status.ts +22 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-bottom-sheet-content-animation.ts +67 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-dialog-content-animation.ts +296 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-overlay-animation.ts +91 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-popover-content-animation.ts +199 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-popup-root-animation.ts +26 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-relative-position.ts +353 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/hooks/use-resolved-style-property.ts +118 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/animation.ts +131 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/bottom-sheet.ts +99 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/index.ts +5 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/misc.ts +10 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/primitives.ts +146 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/types/theme.ts +18 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/animation.ts +266 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/children-to-string.ts +117 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/combine-styles.ts +17 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/create-context.ts +60 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/ease-gradient/create-interpolation.ts +35 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/ease-gradient/index.ts +97 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/get-element-by-display-name.ts +15 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/get-element-with-default.ts +17 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/has-prop.ts +18 -0
- package/lib/__templates__/expo/client/heroui/helpers/internal/utils/index.ts +8 -0
- package/lib/__templates__/expo/client/heroui/index.tsx +51 -0
- package/lib/__templates__/expo/client/heroui/primitives/README.md +27 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/accordion.tsx +270 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/accordion.types.ts +117 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/accordion.utils.ts +12 -0
- package/lib/__templates__/expo/client/heroui/primitives/accordion/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/activity-indicator/activity-indicator.tsx +50 -0
- package/lib/__templates__/expo/client/heroui/primitives/activity-indicator/activity-indicator.types.ts +24 -0
- package/lib/__templates__/expo/client/heroui/primitives/activity-indicator/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/alert/alert.tsx +124 -0
- package/lib/__templates__/expo/client/heroui/primitives/alert/alert.types.ts +87 -0
- package/lib/__templates__/expo/client/heroui/primitives/alert/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/avatar.tsx +171 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/avatar.types.ts +62 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/avatar.utils.ts +102 -0
- package/lib/__templates__/expo/client/heroui/primitives/avatar/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/bottom-sheet/bottom-sheet.tsx +235 -0
- package/lib/__templates__/expo/client/heroui/primitives/bottom-sheet/bottom-sheet.types.ts +127 -0
- package/lib/__templates__/expo/client/heroui/primitives/bottom-sheet/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/checkbox/checkbox.tsx +119 -0
- package/lib/__templates__/expo/client/heroui/primitives/checkbox/checkbox.types.ts +37 -0
- package/lib/__templates__/expo/client/heroui/primitives/checkbox/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/dialog/dialog.tsx +274 -0
- package/lib/__templates__/expo/client/heroui/primitives/dialog/dialog.types.ts +129 -0
- package/lib/__templates__/expo/client/heroui/primitives/dialog/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/input-otp.tsx +431 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/input-otp.types.ts +169 -0
- package/lib/__templates__/expo/client/heroui/primitives/input-otp/input-otp.utils.ts +31 -0
- package/lib/__templates__/expo/client/heroui/primitives/label/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/label/label.tsx +24 -0
- package/lib/__templates__/expo/client/heroui/primitives/label/label.types.ts +39 -0
- package/lib/__templates__/expo/client/heroui/primitives/menu/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/menu/menu.tsx +765 -0
- package/lib/__templates__/expo/client/heroui/primitives/menu/menu.types.ts +401 -0
- package/lib/__templates__/expo/client/heroui/primitives/popover/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/popover/popover.tsx +382 -0
- package/lib/__templates__/expo/client/heroui/primitives/popover/popover.types.ts +201 -0
- package/lib/__templates__/expo/client/heroui/primitives/portal/index.ts +1 -0
- package/lib/__templates__/expo/client/heroui/primitives/portal/portal.tsx +126 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio/radio.tsx +133 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio/radio.types.ts +47 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio-group/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio-group/radio-group.tsx +114 -0
- package/lib/__templates__/expo/client/heroui/primitives/radio-group/radio-group.types.ts +65 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/select.tsx +705 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/select.types.ts +409 -0
- package/lib/__templates__/expo/client/heroui/primitives/select/select.utils.ts +35 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/slider.tsx +463 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/slider.types.ts +208 -0
- package/lib/__templates__/expo/client/heroui/primitives/slider/slider.utils.ts +93 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/index.ts +1 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/slot.tsx +121 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/types.ts +19 -0
- package/lib/__templates__/expo/client/heroui/primitives/slot/utils.ts +96 -0
- package/lib/__templates__/expo/client/heroui/primitives/switch/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/switch/switch.tsx +61 -0
- package/lib/__templates__/expo/client/heroui/primitives/switch/switch.types.ts +55 -0
- package/lib/__templates__/expo/client/heroui/primitives/tabs/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/tabs/tabs.tsx +202 -0
- package/lib/__templates__/expo/client/heroui/primitives/tabs/tabs.types.ts +77 -0
- package/lib/__templates__/expo/client/heroui/primitives/tag-group/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/tag-group/tag-group.tsx +324 -0
- package/lib/__templates__/expo/client/heroui/primitives/tag-group/tag-group.types.ts +119 -0
- package/lib/__templates__/expo/client/heroui/primitives/toast/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/primitives/toast/toast.tsx +138 -0
- package/lib/__templates__/expo/client/heroui/primitives/toast/toast.types.ts +86 -0
- package/lib/__templates__/expo/client/heroui/providers/animation-settings/index.ts +8 -0
- package/lib/__templates__/expo/client/heroui/providers/animation-settings/provider.tsx +47 -0
- package/lib/__templates__/expo/client/heroui/providers/animation-settings/types.ts +27 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native/provider.tsx +67 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native/types.ts +114 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native-raw/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native-raw/provider.tsx +50 -0
- package/lib/__templates__/expo/client/heroui/providers/hero-ui-native-raw/types.ts +39 -0
- package/lib/__templates__/expo/client/heroui/providers/text-component/index.ts +2 -0
- package/lib/__templates__/expo/client/heroui/providers/text-component/provider.tsx +9 -0
- package/lib/__templates__/expo/client/heroui/providers/text-component/types.ts +52 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/index.ts +3 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/insets-container.tsx +87 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/provider.tsx +431 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/reducer.ts +34 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/toast-config.context.ts +27 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/toast-item-renderer.tsx +45 -0
- package/lib/__templates__/expo/client/heroui/providers/toast/types.ts +373 -0
- package/lib/__templates__/expo/client/heroui/styles/index.css +3 -0
- package/lib/__templates__/expo/client/heroui/styles/theme.css +112 -0
- package/lib/__templates__/expo/client/heroui/styles/utilities.css +8 -0
- package/lib/__templates__/expo/client/heroui/styles/variables.css +146 -0
- package/lib/__templates__/expo/client/hooks/useSafeRouter.ts +152 -0
- package/lib/__templates__/expo/client/metro.config.js +128 -0
- package/lib/__templates__/expo/client/package.json +100 -0
- package/lib/__templates__/expo/client/screens/demo/index.tsx +19 -0
- package/lib/__templates__/expo/client/scripts/install-missing-deps.js +1 -0
- package/lib/__templates__/expo/client/theme.css +263 -0
- package/lib/__templates__/expo/client/tsconfig.json +24 -0
- package/lib/__templates__/expo/client/uniwind-types.d.ts +10 -0
- package/lib/__templates__/expo/client/utils/index.ts +23 -2
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/names.js +1889 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/rule.js +174 -0
- package/lib/__templates__/expo/eslint-plugins/fontawesome6/v5-only-names.js +388 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/react-native/rule.js +64 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/index.js +9 -0
- package/lib/__templates__/expo/eslint-plugins/reanimated/rule.js +88 -0
- package/lib/__templates__/expo/package.json +16 -103
- package/lib/__templates__/expo/patches/expo@54.0.33.patch +45 -0
- package/lib/__templates__/expo/pnpm-lock.yaml +1622 -3274
- package/lib/__templates__/expo/pnpm-workspace.yaml +3 -0
- package/lib/__templates__/expo/server/build.js +21 -0
- package/lib/__templates__/expo/server/package.json +34 -0
- package/lib/__templates__/expo/server/src/index.ts +20 -0
- package/lib/__templates__/expo/server/tsconfig.json +24 -0
- package/lib/__templates__/expo/template.config.js +58 -1
- package/lib/__templates__/expo/tsconfig.json +1 -24
- package/lib/__templates__/nextjs/.coze +4 -3
- package/lib/__templates__/nextjs/_npmrc +2 -1
- package/lib/__templates__/nextjs/next.config.ts +12 -0
- package/lib/__templates__/nextjs/package.json +17 -1
- package/lib/__templates__/nextjs/pnpm-lock.yaml +3352 -1083
- package/lib/__templates__/nextjs/scripts/dev.sh +8 -27
- package/lib/__templates__/nextjs/scripts/prepare.sh +9 -0
- package/lib/__templates__/nextjs/src/app/globals.css +109 -89
- package/lib/__templates__/nextjs/src/app/layout.tsx +19 -32
- package/lib/__templates__/nextjs/src/app/page.tsx +18 -48
- package/lib/__templates__/nextjs/src/components/ui/resizable.tsx +29 -22
- package/lib/__templates__/nextjs/src/components/ui/sidebar.tsx +228 -230
- package/lib/__templates__/nextjs/template.config.js +68 -3
- package/lib/__templates__/taro/.coze +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_build.sh +19 -0
- package/lib/__templates__/taro/.cozeproj/scripts/deploy_run.sh +14 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_build.sh +2 -0
- package/lib/__templates__/taro/.cozeproj/scripts/dev_run.sh +80 -0
- package/lib/__templates__/taro/.cozeproj/scripts/init_env.sh +5 -0
- package/lib/__templates__/taro/.cozeproj/scripts/pack.sh +1 -0
- package/lib/__templates__/taro/README.md +747 -0
- package/lib/__templates__/taro/_gitignore +40 -0
- package/lib/__templates__/taro/_npmrc +18 -0
- package/lib/__templates__/taro/babel.config.js +12 -0
- package/lib/__templates__/taro/config/dev.ts +9 -0
- package/lib/__templates__/taro/config/index.ts +173 -0
- package/lib/__templates__/taro/config/prod.ts +35 -0
- package/lib/__templates__/taro/eslint.config.mjs +57 -0
- package/lib/__templates__/taro/key/private.appid.key +0 -0
- package/lib/__templates__/taro/package.json +97 -0
- package/lib/__templates__/taro/pnpm-lock.yaml +22708 -0
- package/lib/__templates__/taro/pnpm-workspace.yaml +2 -0
- package/lib/__templates__/taro/project.config.json +15 -0
- package/lib/__templates__/taro/server/nest-cli.json +10 -0
- package/lib/__templates__/taro/server/package.json +41 -0
- package/lib/__templates__/taro/server/src/app.controller.ts +23 -0
- package/lib/__templates__/taro/server/src/app.module.ts +10 -0
- package/lib/__templates__/taro/server/src/app.service.ts +8 -0
- package/lib/__templates__/taro/server/src/interceptors/http-status.interceptor.ts +23 -0
- package/lib/__templates__/taro/server/src/main.ts +49 -0
- package/lib/__templates__/taro/server/tsconfig.json +24 -0
- package/lib/__templates__/taro/src/app.config.ts +11 -0
- package/lib/__templates__/taro/src/app.css +52 -0
- package/lib/__templates__/taro/src/app.ts +14 -0
- package/lib/__templates__/taro/src/index.html +39 -0
- package/lib/__templates__/taro/src/network.ts +39 -0
- package/lib/__templates__/taro/src/pages/index/index.config.ts +3 -0
- package/lib/__templates__/taro/src/pages/index/index.css +1 -0
- package/lib/__templates__/taro/src/pages/index/index.tsx +33 -0
- package/lib/__templates__/taro/src/utils/h5-styles.ts +33 -0
- package/lib/__templates__/taro/src/utils/wx-debug.ts +23 -0
- package/lib/__templates__/taro/stylelint.config.mjs +4 -0
- package/lib/__templates__/taro/template.config.js +68 -0
- package/lib/__templates__/taro/tsconfig.json +29 -0
- package/lib/__templates__/taro/types/global.d.ts +32 -0
- package/lib/__templates__/templates.json +93 -36
- package/lib/__templates__/vite/.coze +4 -3
- package/lib/__templates__/vite/README.md +204 -26
- package/lib/__templates__/vite/_npmrc +2 -1
- package/lib/__templates__/vite/eslint.config.mjs +9 -0
- package/lib/__templates__/vite/package.json +15 -2
- package/lib/__templates__/vite/pnpm-lock.yaml +1697 -221
- package/lib/__templates__/vite/scripts/dev.sh +7 -26
- package/lib/__templates__/vite/scripts/prepare.sh +9 -0
- package/lib/__templates__/vite/src/main.ts +17 -48
- package/lib/__templates__/vite/template.config.js +77 -7
- package/lib/__templates__/vite/vite.config.ts +3 -3
- package/lib/cli.js +1510 -512
- package/package.json +10 -4
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_build.sh +0 -115
- package/lib/__templates__/expo/.cozeproj/scripts/deploy_run.sh +0 -271
- package/lib/__templates__/expo/app.json +0 -63
- package/lib/__templates__/expo/babel.config.js +0 -9
- package/lib/__templates__/expo/client/app/(tabs)/_layout.tsx +0 -43
- package/lib/__templates__/expo/client/app/(tabs)/home.tsx +0 -1
- package/lib/__templates__/expo/client/app/(tabs)/index.tsx +0 -7
- package/lib/__templates__/expo/client/constants/theme.ts +0 -118
- package/lib/__templates__/expo/client/hooks/useColorScheme.ts +0 -1
- package/lib/__templates__/expo/client/hooks/useTheme.ts +0 -13
- package/lib/__templates__/expo/client/index.js +0 -12
- package/lib/__templates__/expo/client/screens/home/index.tsx +0 -54
- package/lib/__templates__/expo/client/screens/home/styles.ts +0 -332
- package/lib/__templates__/expo/metro.config.js +0 -53
- package/lib/__templates__/expo/src/index.ts +0 -12
- package/lib/__templates__/nextjs/.vscode/settings.json +0 -121
- package/lib/__templates__/nextjs/server.mjs +0 -50
- package/lib/__templates__/vite/.vscode/settings.json +0 -7
- /package/lib/__templates__/expo/{eslint-formatter-simple.mjs → client/eslint-formatter-simple.mjs} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coze-arch/cli",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.3260db",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "coze coding devtools cli",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"prebuild": "tsx scripts/prebuild.ts",
|
|
21
21
|
"build": "tsx scripts/build.ts",
|
|
22
|
-
"
|
|
22
|
+
"create": "tsx scripts/create-template.ts",
|
|
23
23
|
"lint": "eslint ./ --cache",
|
|
24
24
|
"postpublish": "bash scripts/sync-npmmirror.sh",
|
|
25
25
|
"test": "vitest --run --passWithNoTests",
|
|
26
26
|
"test:all": "bash scripts/test-coverage.sh",
|
|
27
27
|
"test:cov": "vitest --run --passWithNoTests --coverage",
|
|
28
|
-
"test:e2e": "bash scripts/e2e.sh",
|
|
28
|
+
"test:e2e": "NODE_ENV=test bash scripts/e2e.sh",
|
|
29
29
|
"test:perf": "vitest bench --run --config vitest.perf.config.ts",
|
|
30
30
|
"test:perf:compare": "bash scripts/compare-perf.sh",
|
|
31
31
|
"test:perf:save": "bash scripts/run-perf-with-output.sh"
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"commander": "~12.1.0",
|
|
39
39
|
"ejs": "^3.1.10",
|
|
40
40
|
"js-yaml": "^4.1.0",
|
|
41
|
+
"minimist": "^1.2.5",
|
|
41
42
|
"shelljs": "^0.10.0"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
@@ -48,20 +49,25 @@
|
|
|
48
49
|
"@coze-arch/ts-config": "workspace:*",
|
|
49
50
|
"@coze-arch/vitest-config": "workspace:*",
|
|
50
51
|
"@coze-coding/lambda": "workspace:*",
|
|
52
|
+
"@inquirer/prompts": "^3.2.0",
|
|
51
53
|
"@types/ejs": "^3.1.5",
|
|
52
54
|
"@types/iarna__toml": "^2.0.5",
|
|
53
55
|
"@types/js-yaml": "^4.0.9",
|
|
56
|
+
"@types/minimatch": "^5.1.2",
|
|
57
|
+
"@types/minimist": "^1.2.5",
|
|
54
58
|
"@types/node": "^24",
|
|
55
59
|
"@types/shelljs": "^0.10.0",
|
|
56
60
|
"@vitest/coverage-v8": "~4.0.16",
|
|
57
61
|
"json-schema-to-typescript": "^15.0.3",
|
|
62
|
+
"minimatch": "^10.0.1",
|
|
58
63
|
"rollup": "^4.41.1",
|
|
59
64
|
"sucrase": "^3.35.0",
|
|
60
65
|
"tsx": "^4.20.6",
|
|
61
66
|
"vitest": "~4.0.16"
|
|
62
67
|
},
|
|
63
68
|
"publishConfig": {
|
|
64
|
-
"access": "public"
|
|
69
|
+
"access": "public",
|
|
70
|
+
"registry": "https://registry.npmjs.org"
|
|
65
71
|
},
|
|
66
72
|
"cozePublishConfig": {
|
|
67
73
|
"bin": {
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
if [ -z "${BASH_VERSION:-}" ]; then exec /usr/bin/env bash "$0" "$@"; fi
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
ROOT_DIR="$(pwd)"
|
|
5
|
-
LOG_DIR="${COZE_LOG_DIR:-$ROOT_DIR/logs}"
|
|
6
|
-
LOG_FILE="$LOG_DIR/app.log"
|
|
7
|
-
mkdir -p "$LOG_DIR"
|
|
8
|
-
|
|
9
|
-
# ==================== 配置项 ====================
|
|
10
|
-
SERVER_DIR="app"
|
|
11
|
-
EXPO_DIR="expo"
|
|
12
|
-
CHECK_HASH_SCRIPT="$ROOT_DIR/check_hash.py"
|
|
13
|
-
# ==================== 工具函数 ====================
|
|
14
|
-
info() {
|
|
15
|
-
echo -e "\033[32m[INFO] $1\033[0m"
|
|
16
|
-
}
|
|
17
|
-
warn() {
|
|
18
|
-
echo -e "\033[33m[WARN] $1\033[0m"
|
|
19
|
-
}
|
|
20
|
-
error() {
|
|
21
|
-
echo -e "\033[31m[ERROR] $1\033[0m"
|
|
22
|
-
exit 1
|
|
23
|
-
}
|
|
24
|
-
check_command() {
|
|
25
|
-
if ! command -v "$1" &> /dev/null; then
|
|
26
|
-
error "命令 $1 未找到,请先安装"
|
|
27
|
-
fi
|
|
28
|
-
}
|
|
29
|
-
write_log() {
|
|
30
|
-
local level="${1:-INFO}"
|
|
31
|
-
local msg="${2:-}"
|
|
32
|
-
node -e '
|
|
33
|
-
const fs=require("fs");
|
|
34
|
-
const path=process.argv[1];
|
|
35
|
-
const level=(process.argv[2]||"").toUpperCase();
|
|
36
|
-
let msg=String(process.argv[3]||"");
|
|
37
|
-
const ts=Date.now();
|
|
38
|
-
const dt=new Date();
|
|
39
|
-
const parts=new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false}).formatToParts(dt);
|
|
40
|
-
const o={};
|
|
41
|
-
for(const p of parts){o[p.type]=p.value}
|
|
42
|
-
const dt_str=`${o.year}-${o.month}-${o.day} ${o.hour}:${o.minute}:${o.second}`;
|
|
43
|
-
msg=msg.replace(/\\n/g,"\n");
|
|
44
|
-
msg=`${dt_str} [${level}] ${msg}`;
|
|
45
|
-
const record=JSON.stringify({level, message: msg, timestamp: ts},null,0);
|
|
46
|
-
const fd=fs.openSync(path,"a");
|
|
47
|
-
fs.writeSync(fd, record+"\n", null, "utf8");
|
|
48
|
-
fs.fsyncSync(fd);
|
|
49
|
-
fs.closeSync(fd);
|
|
50
|
-
' "$LOG_FILE" "$level" "$msg"
|
|
51
|
-
|
|
52
|
-
case "$level" in
|
|
53
|
-
INFO) info "$msg" ;;
|
|
54
|
-
WARN) warn "$msg" ;;
|
|
55
|
-
ERROR) echo -e "\033[31m[ERROR] $msg\033[0m" ;;
|
|
56
|
-
*) info "$msg" ;;
|
|
57
|
-
esac
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
# ==================== 前置检查 ====================
|
|
61
|
-
write_log "INFO" "==================== 开始构建 ===================="
|
|
62
|
-
|
|
63
|
-
write_log "INFO" "检查根目录 pre_install.py"
|
|
64
|
-
if [ -f "$ROOT_DIR/pre_install.py" ]; then
|
|
65
|
-
write_log "INFO" "执行:python $ROOT_DIR/pre_install.py"
|
|
66
|
-
python "$ROOT_DIR/pre_install.py" || write_log "ERROR" "pre_install.py 执行失败"
|
|
67
|
-
fi
|
|
68
|
-
|
|
69
|
-
write_log "INFO" "开始执行构建脚本(build_dev.sh)..."
|
|
70
|
-
write_log "INFO" "正在检查依赖命令是否存在..."
|
|
71
|
-
# 检查核心命令
|
|
72
|
-
# check_command "pip"
|
|
73
|
-
# check_command "python"
|
|
74
|
-
check_command "pnpm"
|
|
75
|
-
check_command "npm"
|
|
76
|
-
|
|
77
|
-
# ==================== 步骤 1:安装项目依赖 ====================
|
|
78
|
-
write_log "INFO" "==================== 安装项目依赖 ===================="
|
|
79
|
-
if [ ! -f "package.json" ]; then
|
|
80
|
-
write_log "ERROR" "项目目录下无 package.json,不是合法的 Node.js 项目"
|
|
81
|
-
fi
|
|
82
|
-
# 步骤 2.1/2.2:安装 Expo 项目依赖(按哈希变化执行)
|
|
83
|
-
if [ -f "$CHECK_HASH_SCRIPT" ]; then
|
|
84
|
-
write_log "INFO" "检测 package.json 哈希是否变化"
|
|
85
|
-
set +e
|
|
86
|
-
python "$CHECK_HASH_SCRIPT" --config "package.json" --check
|
|
87
|
-
rc_node=$?
|
|
88
|
-
set -e
|
|
89
|
-
if [ $rc_node -eq 1 ]; then
|
|
90
|
-
write_log "INFO" "依赖哈希已变化,执行:pnpm install"
|
|
91
|
-
pnpm install --registry=https://registry.npmmirror.com || write_log "ERROR" "Expo 项目依赖安装失败(pnpm 执行出错)"
|
|
92
|
-
|
|
93
|
-
write_log "INFO" "依赖哈希已变化,执行:npm run install-missing"
|
|
94
|
-
npm run install-missing || write_log "ERROR" "npm run install-missing 执行失败,请检查 package.json 中的脚本配置"
|
|
95
|
-
|
|
96
|
-
set +e
|
|
97
|
-
python "$CHECK_HASH_SCRIPT" --config "package.json" --update
|
|
98
|
-
set -e
|
|
99
|
-
else
|
|
100
|
-
write_log "INFO" "跳过 pnpm install 与 npm run install-missing"
|
|
101
|
-
fi
|
|
102
|
-
else
|
|
103
|
-
write_log "WARN" "未找到 check_hash.py,默认执行:pnpm install 与 npm run install-missing"
|
|
104
|
-
pnpm install --registry=https://registry.npmmirror.com || write_log "ERROR" "Expo 项目依赖安装失败(pnpm 执行出错)"
|
|
105
|
-
npm run install-missing || write_log "ERROR" "npm run install-missing 执行失败,请检查 package.json 中的脚本配置"
|
|
106
|
-
fi
|
|
107
|
-
|
|
108
|
-
write_log "INFO" "检查根目录 post_install.py"
|
|
109
|
-
if [ -f "$ROOT_DIR/post_install.py" ]; then
|
|
110
|
-
write_log "INFO" "执行:python $ROOT_DIR/post_install.py"
|
|
111
|
-
python "$ROOT_DIR/post_install.py" || write_log "ERROR" "post_install.py 执行失败"
|
|
112
|
-
fi
|
|
113
|
-
|
|
114
|
-
write_log "INFO" "==================== 依赖安装完成!====================\n"
|
|
115
|
-
write_log "INFO" "下一步:执行 ./deploy_run.sh 启动服务"
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
ROOT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
2
|
-
LOG_DIR="${COZE_LOG_DIR:-$ROOT_DIR/logs}"
|
|
3
|
-
LOG_FILE="$LOG_DIR/app.log"
|
|
4
|
-
mkdir -p "$LOG_DIR"
|
|
5
|
-
|
|
6
|
-
# ==================== 配置项 ====================
|
|
7
|
-
# Python 服务配置
|
|
8
|
-
SERVER_HOST="0.0.0.0"
|
|
9
|
-
SERVER_PORT="9091"
|
|
10
|
-
# Expo 项目配置
|
|
11
|
-
EXPO_HOST="0.0.0.0"
|
|
12
|
-
EXPO_DIR="expo"
|
|
13
|
-
EXPO_PORT="9090"
|
|
14
|
-
WEB_URL="${COZE_PROJECT_DOMAIN_DEFAULT:-http://127.0.0.1:${SERVER_PORT}}"
|
|
15
|
-
ASSUME_YES="1"
|
|
16
|
-
EXPO_PUBLIC_BACKEND_BASE_URL="${EXPO_PUBLIC_BACKEND_BASE_URL:-$WEB_URL}"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
EXPO_PACKAGER_PROXY_URL="${EXPO_PUBLIC_BACKEND_BASE_URL}"
|
|
20
|
-
export EXPO_PUBLIC_BACKEND_BASE_URL EXPO_PACKAGER_PROXY_URL
|
|
21
|
-
# 运行时变量(为避免 set -u 的未绑定错误,预置为空)
|
|
22
|
-
SERVER_PID=""
|
|
23
|
-
EXPO_PID=""
|
|
24
|
-
# ==================== 工具函数 ====================
|
|
25
|
-
info() {
|
|
26
|
-
echo -e "\033[32m[INFO] $1\033[0m"
|
|
27
|
-
}
|
|
28
|
-
warn() {
|
|
29
|
-
echo -e "\033[33m[WARN] $1\033[0m"
|
|
30
|
-
}
|
|
31
|
-
error() {
|
|
32
|
-
echo -e "\033[31m[ERROR] $1\033[0m"
|
|
33
|
-
exit 1
|
|
34
|
-
}
|
|
35
|
-
check_command() {
|
|
36
|
-
if ! command -v "$1" &> /dev/null; then
|
|
37
|
-
error "命令 $1 未找到,请先安装"
|
|
38
|
-
fi
|
|
39
|
-
}
|
|
40
|
-
while [ $# -gt 0 ]; do
|
|
41
|
-
case "$1" in
|
|
42
|
-
-y|--yes)
|
|
43
|
-
ASSUME_YES="1"
|
|
44
|
-
shift
|
|
45
|
-
;;
|
|
46
|
-
*)
|
|
47
|
-
shift
|
|
48
|
-
;;
|
|
49
|
-
esac
|
|
50
|
-
done
|
|
51
|
-
is_port_free() {
|
|
52
|
-
! lsof -iTCP:"$1" -sTCP:LISTEN >/dev/null 2>&1
|
|
53
|
-
}
|
|
54
|
-
choose_next_free_port() {
|
|
55
|
-
local start=$1
|
|
56
|
-
local p=$start
|
|
57
|
-
while ! is_port_free "$p"; do
|
|
58
|
-
p=$((p+1))
|
|
59
|
-
done
|
|
60
|
-
echo "$p"
|
|
61
|
-
}
|
|
62
|
-
ensure_port() {
|
|
63
|
-
local var_name=$1
|
|
64
|
-
local port_val=$2
|
|
65
|
-
if is_port_free "$port_val"; then
|
|
66
|
-
info "端口未占用:$port_val"
|
|
67
|
-
eval "$var_name=$port_val"
|
|
68
|
-
else
|
|
69
|
-
warn "端口已占用:$port_val"
|
|
70
|
-
local choice
|
|
71
|
-
if [ "$ASSUME_YES" = "1" ]; then choice="Y"; else read -r -p "是否关闭该端口的进程?[Y/n] " choice || choice="Y"; fi
|
|
72
|
-
if [ -z "$choice" ] || [ "$choice" = "y" ] || [ "$choice" = "Y" ]; then
|
|
73
|
-
if command -v lsof &> /dev/null; then
|
|
74
|
-
local pids
|
|
75
|
-
pids=$(lsof -t -i tcp:"$port_val" -sTCP:LISTEN 2>/dev/null || true)
|
|
76
|
-
if [ -n "$pids" ]; then
|
|
77
|
-
info "正在关闭进程:$pids"
|
|
78
|
-
kill -9 $pids 2>/dev/null || warn "关闭进程失败:$pids"
|
|
79
|
-
eval "$var_name=$port_val"
|
|
80
|
-
else
|
|
81
|
-
warn "未获取到占用该端口的进程"
|
|
82
|
-
eval "$var_name=$port_val"
|
|
83
|
-
fi
|
|
84
|
-
else
|
|
85
|
-
warn "缺少 lsof,无法自动关闭进程"
|
|
86
|
-
eval "$var_name=$port_val"
|
|
87
|
-
fi
|
|
88
|
-
else
|
|
89
|
-
local new_port
|
|
90
|
-
new_port=$(choose_next_free_port "$port_val")
|
|
91
|
-
info "使用新的端口:$new_port"
|
|
92
|
-
eval "$var_name=$new_port"
|
|
93
|
-
fi
|
|
94
|
-
fi
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
write_log() {
|
|
98
|
-
local level="${1:-INFO}"
|
|
99
|
-
local msg="${2:-}"
|
|
100
|
-
node -e '
|
|
101
|
-
const fs=require("fs");
|
|
102
|
-
const path=process.argv[1];
|
|
103
|
-
const level=(process.argv[2]||"").toUpperCase();
|
|
104
|
-
let msg=String(process.argv[3]||"");
|
|
105
|
-
const ts=Date.now();
|
|
106
|
-
msg=msg.replace(/\\n/g,"\n");
|
|
107
|
-
const dt=new Date();
|
|
108
|
-
const parts=new Intl.DateTimeFormat("en-GB",{timeZone:"Asia/Shanghai",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:false}).formatToParts(dt);
|
|
109
|
-
const o={};
|
|
110
|
-
for(const p of parts){o[p.type]=p.value}
|
|
111
|
-
const dt_str=`${o.year}-${o.month}-${o.day} ${o.hour}:${o.minute}:${o.second}`;
|
|
112
|
-
msg=`${dt_str} [${level}] ${msg}`;
|
|
113
|
-
const record=JSON.stringify({level, message: msg, timestamp: ts},null,0);
|
|
114
|
-
const fd=fs.openSync(path,"a");
|
|
115
|
-
fs.writeSync(fd, record+"\n", null, "utf8");
|
|
116
|
-
fs.fsyncSync(fd);
|
|
117
|
-
fs.closeSync(fd);
|
|
118
|
-
' "$LOG_FILE" "$level" "$msg"
|
|
119
|
-
case "$level" in
|
|
120
|
-
INFO) echo -e "\033[32m[INFO] $msg\033[0m" ;;
|
|
121
|
-
WARN) echo -e "\033[33m[WARN] $msg\033[0m" ;;
|
|
122
|
-
ERROR) echo -e "\033[31m[ERROR] $msg\033[0m" ;;
|
|
123
|
-
*) echo -e "\033[32m[INFO] $msg\033[0m" ;;
|
|
124
|
-
esac
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
wait_port_connectable() {
|
|
128
|
-
local host=$1 port=$2 retries=${3:-10}
|
|
129
|
-
for _ in $(seq 1 "$retries"); do
|
|
130
|
-
nc -z "$host" "$port" && return 0
|
|
131
|
-
sleep 1
|
|
132
|
-
done
|
|
133
|
-
return 1
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
start_expo() {
|
|
137
|
-
local offline="${1:-0}"
|
|
138
|
-
if [ "$offline" = "1" ]; then
|
|
139
|
-
EXPO_OFFLINE=1 EXPO_NO_DOCTOR=1 EXPO_PUBLIC_BACKEND_BASE_URL="$EXPO_PUBLIC_BACKEND_BASE_URL" EXPO_PACKAGER_PROXY_URL="$EXPO_PACKAGER_PROXY_URL" nohup npx expo start --port "$EXPO_PORT" > logs/expo.log 2>&1 &
|
|
140
|
-
else
|
|
141
|
-
EXPO_NO_DOCTOR=1 EXPO_PUBLIC_BACKEND_BASE_URL="$EXPO_PUBLIC_BACKEND_BASE_URL" EXPO_PACKAGER_PROXY_URL="$EXPO_PACKAGER_PROXY_URL" nohup npx expo start --port "$EXPO_PORT" > logs/expo.log 2>&1 &
|
|
142
|
-
fi
|
|
143
|
-
EXPO_PID=$!
|
|
144
|
-
echo "$EXPO_PID"
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
detect_expo_fetch_failed() {
|
|
148
|
-
local timeout="${1:-8}"
|
|
149
|
-
local waited=0
|
|
150
|
-
local log_file="logs/expo.log"
|
|
151
|
-
while [ "$waited" -lt "$timeout" ]; do
|
|
152
|
-
if [ -f "$log_file" ] && grep -q "TypeError: fetch failed" "$log_file" 2>/dev/null; then
|
|
153
|
-
return 0
|
|
154
|
-
fi
|
|
155
|
-
sleep 1
|
|
156
|
-
waited=$((waited+1))
|
|
157
|
-
done
|
|
158
|
-
return 1
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
# ==================== 前置检查 ====================
|
|
162
|
-
write_log "INFO" "==================== 开始启动 ===================="
|
|
163
|
-
write_log "INFO" "开始执行服务启动脚本(start_dev.sh)..."
|
|
164
|
-
write_log "INFO" "正在检查依赖命令和目录是否存在..."
|
|
165
|
-
# 检查核心命令
|
|
166
|
-
# check_command "python"
|
|
167
|
-
check_command "npm"
|
|
168
|
-
check_command "pnpm"
|
|
169
|
-
check_command "lsof"
|
|
170
|
-
check_command "bash"
|
|
171
|
-
|
|
172
|
-
info "准备日志目录:logs"
|
|
173
|
-
mkdir -p logs
|
|
174
|
-
# 端口占用预检查与处理
|
|
175
|
-
ensure_port SERVER_PORT "$SERVER_PORT"
|
|
176
|
-
ensure_port EXPO_PORT "$EXPO_PORT"
|
|
177
|
-
|
|
178
|
-
# ==================== 步骤 1:启动 Python 服务 ====================
|
|
179
|
-
|
|
180
|
-
# ------------环境变量----------------------
|
|
181
|
-
export storage_type="s3"
|
|
182
|
-
export project_platform="app"
|
|
183
|
-
|
|
184
|
-
if [ -n "${COZE_WORKLOAD_IDENTITY_API_KEY:-}" ]; then
|
|
185
|
-
export OPENAI_API_KEY="$COZE_WORKLOAD_IDENTITY_API_KEY"
|
|
186
|
-
fi
|
|
187
|
-
if [ -n "${OPENAI_API_KEY:-}" ]; then
|
|
188
|
-
export ARK_API_KEY="$OPENAI_API_KEY"
|
|
189
|
-
fi
|
|
190
|
-
|
|
191
|
-
if [ -n "${COZE_INTEGRATION_BASE_URL:-}" ]; then
|
|
192
|
-
_base="${COZE_INTEGRATION_BASE_URL%/}"
|
|
193
|
-
export default_llm_base_url="${_base}/api/v3"
|
|
194
|
-
else
|
|
195
|
-
export default_llm_base_url="https://ark.cn-beijing.volces.com/api/v3"
|
|
196
|
-
fi
|
|
197
|
-
|
|
198
|
-
if [ -n "${PGDATABASE_URL:-}" ]; then
|
|
199
|
-
_pg="${PGDATABASE_URL}"
|
|
200
|
-
case "${_pg}" in
|
|
201
|
-
postgresql://*)
|
|
202
|
-
_pg="postgresql+asyncpg://${_pg#postgresql://}"
|
|
203
|
-
;;
|
|
204
|
-
esac
|
|
205
|
-
_pg="${_pg%%\?*}"
|
|
206
|
-
export DATABASE_URL="${_pg}"
|
|
207
|
-
fi
|
|
208
|
-
|
|
209
|
-
# ------------环境变量----------------------
|
|
210
|
-
|
|
211
|
-
write_log "INFO" "==================== 启动 server 服务 ===================="
|
|
212
|
-
write_log "INFO" "正在执行:npm run server"
|
|
213
|
-
PORT="$SERVER_PORT" nohup npm run server > logs/app.log 2>&1 &
|
|
214
|
-
SERVER_PID=$!
|
|
215
|
-
if [ -z "${SERVER_PID}" ]; then
|
|
216
|
-
write_log "ERROR" "无法获取 server 后台进程 PID"
|
|
217
|
-
fi
|
|
218
|
-
write_log "INFO" "server 服务已启动,进程 ID:${SERVER_PID:-unknown}"
|
|
219
|
-
|
|
220
|
-
write_log "INFO" "==================== 启动 Expo 项目 ===================="
|
|
221
|
-
write_log "INFO" "正在执行:npx expo start --port ${EXPO_PORT}"
|
|
222
|
-
write_log "INFO" "开始启动 Expo 服务"
|
|
223
|
-
EXPO_PID=$(start_expo 0)
|
|
224
|
-
if detect_expo_fetch_failed 8; then
|
|
225
|
-
write_log "WARN" "Expo 启动检测到网络错误:TypeError: fetch failed,启用离线模式重试"
|
|
226
|
-
if [ -n "${EXPO_PID}" ]; then kill -9 "$EXPO_PID" 2>/dev/null || true; fi
|
|
227
|
-
: > logs/expo.log
|
|
228
|
-
EXPO_PID=$(start_expo 1)
|
|
229
|
-
fi
|
|
230
|
-
# 输出以下环境变量,确保 Expo 项目能正确连接到 Python 服务
|
|
231
|
-
write_log "INFO" "Expo 环境变量配置:"
|
|
232
|
-
write_log "INFO" "EXPO_PUBLIC_BACKEND_BASE_URL=${EXPO_PUBLIC_BACKEND_BASE_URL}"
|
|
233
|
-
write_log "INFO" "EXPO_PACKAGER_PROXY_URL=${EXPO_PACKAGER_PROXY_URL}"
|
|
234
|
-
if [ -z "${EXPO_PID}" ]; then
|
|
235
|
-
write_log "ERROR" "无法获取 Expo 后台进程 PID"
|
|
236
|
-
fi
|
|
237
|
-
|
|
238
|
-
write_log "INFO" "所有服务已启动。Server PID: ${SERVER_PID}, Expo PID: ${EXPO_PID}"
|
|
239
|
-
|
|
240
|
-
write_log "INFO" "检查 Server 服务端口:$SERVER_HOST:$SERVER_PORT"
|
|
241
|
-
if wait_port_connectable "$SERVER_HOST" "$SERVER_PORT" 10 2; then
|
|
242
|
-
write_log "INFO" "端口可连接:$SERVER_HOST:$SERVER_PORT"
|
|
243
|
-
else
|
|
244
|
-
write_log "WARN" "端口不可连接:$SERVER_HOST:$SERVER_PORT 10 次)"
|
|
245
|
-
fi
|
|
246
|
-
|
|
247
|
-
write_log "INFO" "检查 Expo 服务端口:$EXPO_HOST:$EXPO_PORT"
|
|
248
|
-
if wait_port_connectable "$EXPO_HOST" "$EXPO_PORT" 10 2; then
|
|
249
|
-
write_log "INFO" "端口可连接:$EXPO_HOST:$EXPO_PORT"
|
|
250
|
-
else
|
|
251
|
-
write_log "WARN" "端口不可连接:$EXPO_HOST:$EXPO_PORT(已尝试 10 次)"
|
|
252
|
-
fi
|
|
253
|
-
|
|
254
|
-
write_log "INFO" "服务端口检查完成"
|
|
255
|
-
|
|
256
|
-
write_log "INFO" "检查根目录 post_run.py"
|
|
257
|
-
if [ -f "$ROOT_DIR/post_run.py" ]; then
|
|
258
|
-
write_log "INFO" "启动检查中"
|
|
259
|
-
python "$ROOT_DIR/post_run.py" --port "$EXPO_PORT" || write_log "ERROR" "post_run.py 执行失败"
|
|
260
|
-
write_log "INFO" "启动检查结束"
|
|
261
|
-
fi
|
|
262
|
-
|
|
263
|
-
write_log "INFO" "检查 Nginx 端口 (5000)..."
|
|
264
|
-
if is_port_free 5000; then
|
|
265
|
-
write_log "INFO" "端口 5000 未被占用,正在启动 Nginx..."
|
|
266
|
-
service nginx start
|
|
267
|
-
else
|
|
268
|
-
write_log "INFO" "端口 5000 已被占用,跳过 Nginx 启动"
|
|
269
|
-
fi
|
|
270
|
-
|
|
271
|
-
write_log "INFO" "==================== 服务启动完成 ===================="
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"expo": {
|
|
3
|
-
"name": "${app_name}",
|
|
4
|
-
"slug": "${slug}",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"orientation": "portrait",
|
|
7
|
-
"icon": "./client/assets/images/icon.png",
|
|
8
|
-
"scheme": "myapp",
|
|
9
|
-
"userInterfaceStyle": "automatic",
|
|
10
|
-
"newArchEnabled": true,
|
|
11
|
-
"ios": {
|
|
12
|
-
"supportsTablet": true
|
|
13
|
-
},
|
|
14
|
-
"android": {
|
|
15
|
-
"adaptiveIcon": {
|
|
16
|
-
"foregroundImage": "./client/assets/images/adaptive-icon.png",
|
|
17
|
-
"backgroundColor": "#ffffff"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"web": {
|
|
21
|
-
"bundler": "metro",
|
|
22
|
-
"output": "single",
|
|
23
|
-
"favicon": "./client/assets/images/favicon.png"
|
|
24
|
-
},
|
|
25
|
-
"plugins": [
|
|
26
|
-
"expo-router",
|
|
27
|
-
[
|
|
28
|
-
"expo-splash-screen",
|
|
29
|
-
{
|
|
30
|
-
"image": "./client/assets/images/splash-icon.png",
|
|
31
|
-
"imageWidth": 200,
|
|
32
|
-
"resizeMode": "contain",
|
|
33
|
-
"backgroundColor": "#ffffff"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"expo-image-picker",
|
|
38
|
-
{
|
|
39
|
-
"photosPermission": "允许${app_name}访问您的相册,以便您上传或保存图片。",
|
|
40
|
-
"cameraPermission": "允许${app_name}使用您的相机,以便您直接拍摄照片上传。",
|
|
41
|
-
"microphonePermission": "允许${app_name}访问您的麦克风,以便您拍摄带有声音的视频。"
|
|
42
|
-
}
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
"expo-location",
|
|
46
|
-
{
|
|
47
|
-
"locationWhenInUsePermission": "${app_name}需要访问您的位置以提供周边服务及导航功能。"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
[
|
|
51
|
-
"expo-camera",
|
|
52
|
-
{
|
|
53
|
-
"cameraPermission": "${app_name}需要访问相机以拍摄照片和视频。",
|
|
54
|
-
"microphonePermission": "${app_name}需要访问麦克风以录制视频声音。",
|
|
55
|
-
"recordAudioAndroid": true
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
],
|
|
59
|
-
"experiments": {
|
|
60
|
-
"typedRoutes": true
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Tabs } from 'expo-router';
|
|
2
|
-
import { FontAwesome6 } from '@expo/vector-icons';
|
|
3
|
-
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
-
import { useTheme } from '@/hooks/useTheme';
|
|
5
|
-
|
|
6
|
-
export default function TabLayout() {
|
|
7
|
-
const insets = useSafeAreaInsets();
|
|
8
|
-
const { theme } = useTheme();
|
|
9
|
-
const tabBarHeight = 56 + Math.max(insets.bottom, 8);
|
|
10
|
-
|
|
11
|
-
return (
|
|
12
|
-
<Tabs
|
|
13
|
-
backBehavior='history'
|
|
14
|
-
screenOptions={{
|
|
15
|
-
headerShown: false,
|
|
16
|
-
tabBarActiveTintColor: theme.tabIconSelected,
|
|
17
|
-
tabBarInactiveTintColor: theme.tabIconDefault,
|
|
18
|
-
tabBarStyle: {
|
|
19
|
-
backgroundColor: theme.backgroundRoot,
|
|
20
|
-
borderTopColor: theme.backgroundSecondary,
|
|
21
|
-
borderTopWidth: 1,
|
|
22
|
-
height: tabBarHeight,
|
|
23
|
-
paddingBottom: Math.max(insets.bottom, 8),
|
|
24
|
-
paddingTop: 6,
|
|
25
|
-
},
|
|
26
|
-
}}
|
|
27
|
-
>
|
|
28
|
-
<Tabs.Screen
|
|
29
|
-
name='index'
|
|
30
|
-
options={{ href: null }}
|
|
31
|
-
/>
|
|
32
|
-
<Tabs.Screen
|
|
33
|
-
name='home'
|
|
34
|
-
options={{
|
|
35
|
-
title: '首页',
|
|
36
|
-
tabBarIcon: ({ color }) => (
|
|
37
|
-
<FontAwesome6 name='house' size={20} color={color} />
|
|
38
|
-
),
|
|
39
|
-
}}
|
|
40
|
-
/>
|
|
41
|
-
</Tabs>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "@/screens/home";
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Platform } from "react-native";
|
|
2
|
-
|
|
3
|
-
const tintColorLight = "#007AFF";
|
|
4
|
-
const tintColorDark = "#0A84FF";
|
|
5
|
-
|
|
6
|
-
export const Colors = {
|
|
7
|
-
light: {
|
|
8
|
-
text: "#11181C",
|
|
9
|
-
buttonText: "#FFFFFF",
|
|
10
|
-
tabIconDefault: "#687076",
|
|
11
|
-
tabIconSelected: tintColorLight,
|
|
12
|
-
link: "#007AFF",
|
|
13
|
-
backgroundRoot: "#FFFFFF", // Elevation 0
|
|
14
|
-
backgroundDefault: "#F2F2F2", // Elevation 1
|
|
15
|
-
backgroundSecondary: "#E6E6E6", // Elevation 2
|
|
16
|
-
backgroundTertiary: "#D9D9D9", // Elevation 3
|
|
17
|
-
},
|
|
18
|
-
dark: {
|
|
19
|
-
text: "#ECEDEE",
|
|
20
|
-
buttonText: "#FFFFFF",
|
|
21
|
-
tabIconDefault: "#9BA1A6",
|
|
22
|
-
tabIconSelected: tintColorDark,
|
|
23
|
-
link: "#0A84FF",
|
|
24
|
-
backgroundRoot: "#1F2123", // Elevation 0
|
|
25
|
-
backgroundDefault: "#2A2C2E", // Elevation 1
|
|
26
|
-
backgroundSecondary: "#353739", // Elevation 2
|
|
27
|
-
backgroundTertiary: "#404244", // Elevation 3
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const Spacing = {
|
|
32
|
-
xs: 4,
|
|
33
|
-
sm: 8,
|
|
34
|
-
md: 12,
|
|
35
|
-
lg: 16,
|
|
36
|
-
xl: 20,
|
|
37
|
-
"2xl": 24,
|
|
38
|
-
"3xl": 32,
|
|
39
|
-
"4xl": 40,
|
|
40
|
-
"5xl": 48,
|
|
41
|
-
inputHeight: 48,
|
|
42
|
-
buttonHeight: 52,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
export const BorderRadius = {
|
|
46
|
-
xs: 8,
|
|
47
|
-
sm: 12,
|
|
48
|
-
md: 18,
|
|
49
|
-
lg: 24,
|
|
50
|
-
xl: 30,
|
|
51
|
-
"2xl": 40,
|
|
52
|
-
"3xl": 50,
|
|
53
|
-
full: 9999,
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const Typography = {
|
|
57
|
-
h1: {
|
|
58
|
-
fontSize: 32,
|
|
59
|
-
lineHeight: 40,
|
|
60
|
-
fontWeight: "700" as const,
|
|
61
|
-
},
|
|
62
|
-
h2: {
|
|
63
|
-
fontSize: 28,
|
|
64
|
-
lineHeight: 36,
|
|
65
|
-
fontWeight: "700" as const,
|
|
66
|
-
},
|
|
67
|
-
h3: {
|
|
68
|
-
fontSize: 24,
|
|
69
|
-
lineHeight: 32,
|
|
70
|
-
fontWeight: "600" as const,
|
|
71
|
-
},
|
|
72
|
-
h4: {
|
|
73
|
-
fontSize: 20,
|
|
74
|
-
lineHeight: 28,
|
|
75
|
-
fontWeight: "600" as const,
|
|
76
|
-
},
|
|
77
|
-
body: {
|
|
78
|
-
fontSize: 16,
|
|
79
|
-
lineHeight: 24,
|
|
80
|
-
fontWeight: "400" as const,
|
|
81
|
-
},
|
|
82
|
-
small: {
|
|
83
|
-
fontSize: 14,
|
|
84
|
-
lineHeight: 20,
|
|
85
|
-
fontWeight: "400" as const,
|
|
86
|
-
},
|
|
87
|
-
link: {
|
|
88
|
-
fontSize: 16,
|
|
89
|
-
lineHeight: 24,
|
|
90
|
-
fontWeight: "400" as const,
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export const Fonts = Platform.select({
|
|
95
|
-
ios: {
|
|
96
|
-
/** iOS `UIFontDescriptorSystemDesignDefault` */
|
|
97
|
-
sans: "system-ui",
|
|
98
|
-
/** iOS `UIFontDescriptorSystemDesignSerif` */
|
|
99
|
-
serif: "ui-serif",
|
|
100
|
-
/** iOS `UIFontDescriptorSystemDesignRounded` */
|
|
101
|
-
rounded: "ui-rounded",
|
|
102
|
-
/** iOS `UIFontDescriptorSystemDesignMonospaced` */
|
|
103
|
-
mono: "ui-monospace",
|
|
104
|
-
},
|
|
105
|
-
default: {
|
|
106
|
-
sans: "normal",
|
|
107
|
-
serif: "serif",
|
|
108
|
-
rounded: "normal",
|
|
109
|
-
mono: "monospace",
|
|
110
|
-
},
|
|
111
|
-
web: {
|
|
112
|
-
sans: "system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
113
|
-
serif: "Georgia, 'Times New Roman', serif",
|
|
114
|
-
rounded:
|
|
115
|
-
"'SF Pro Rounded', 'Hiragino Maru Gothic ProN', Meiryo, 'MS PGothic', sans-serif",
|
|
116
|
-
mono: "SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace",
|
|
117
|
-
},
|
|
118
|
-
});
|