@symbiote-native/cli 0.0.1
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/LICENSE +21 -0
- package/README.md +492 -0
- package/bundle.js +2833 -0
- package/package.json +49 -0
- package/src/index.ts +70 -0
- package/templates/README.md +93 -0
- package/templates/js/angular/.prettierrc.js +5 -0
- package/templates/js/angular/.watchmanconfig +1 -0
- package/templates/js/angular/README.md +117 -0
- package/templates/js/angular/app.json +4 -0
- package/templates/js/angular/babel.config.js +34 -0
- package/templates/js/angular/index.js +12 -0
- package/templates/js/angular/metro.config.js +38 -0
- package/templates/js/angular/package.json.fragment.json +29 -0
- package/templates/js/angular/src/App.css +89 -0
- package/templates/js/angular/src/App.ts +40 -0
- package/templates/js/angular/src/assets/angular-logo.png +0 -0
- package/templates/js/angular/src/assets/angular-logo@2x.png +0 -0
- package/templates/js/angular/src/assets/angular-logo@3x.png +0 -0
- package/templates/js/angular/src/assets/plus-icon.png +0 -0
- package/templates/js/angular/src/assets/plus-icon@2x.png +0 -0
- package/templates/js/angular/src/assets/plus-icon@3x.png +0 -0
- package/templates/js/angular/src/assets/react-native-logo.png +0 -0
- package/templates/js/angular/src/assets/react-native-logo@2x.png +0 -0
- package/templates/js/angular/src/assets/react-native-logo@3x.png +0 -0
- package/templates/js/angular/src/css.d.ts +23 -0
- package/templates/js/angular/tsconfig.angular.json +42 -0
- package/templates/js/angular/tsconfig.json +17 -0
- package/templates/js/react/.prettierrc.js +5 -0
- package/templates/js/react/.watchmanconfig +1 -0
- package/templates/js/react/App.css +69 -0
- package/templates/js/react/App.jsx +27 -0
- package/templates/js/react/App.tsx +27 -0
- package/templates/js/react/README.md +116 -0
- package/templates/js/react/app.json +4 -0
- package/templates/js/react/assets/react-native-logo.png +0 -0
- package/templates/js/react/assets/react-native-logo@2x.png +0 -0
- package/templates/js/react/assets/react-native-logo@3x.png +0 -0
- package/templates/js/react/babel.config.js +24 -0
- package/templates/js/react/css.d.ts +24 -0
- package/templates/js/react/index.js +14 -0
- package/templates/js/react/metro.config.js +29 -0
- package/templates/js/react/package.json.fragment.json +22 -0
- package/templates/js/react/package.json.fragment.typescript.json +11 -0
- package/templates/js/react/tsconfig.json +18 -0
- package/templates/js/solid/.prettierrc.js +5 -0
- package/templates/js/solid/.watchmanconfig +1 -0
- package/templates/js/solid/App.css +89 -0
- package/templates/js/solid/App.jsx +35 -0
- package/templates/js/solid/App.tsx +35 -0
- package/templates/js/solid/README.md +18 -0
- package/templates/js/solid/app.json +4 -0
- package/templates/js/solid/assets/plus-icon.png +0 -0
- package/templates/js/solid/assets/plus-icon@2x.png +0 -0
- package/templates/js/solid/assets/plus-icon@3x.png +0 -0
- package/templates/js/solid/assets/react-native-logo.png +0 -0
- package/templates/js/solid/assets/react-native-logo@2x.png +0 -0
- package/templates/js/solid/assets/react-native-logo@3x.png +0 -0
- package/templates/js/solid/assets/solid-logo.png +0 -0
- package/templates/js/solid/assets/solid-logo@2x.png +0 -0
- package/templates/js/solid/assets/solid-logo@3x.png +0 -0
- package/templates/js/solid/babel.config.js +29 -0
- package/templates/js/solid/css.d.ts +20 -0
- package/templates/js/solid/eslint.config.js +3 -0
- package/templates/js/solid/index.js +13 -0
- package/templates/js/solid/metro.config.js +50 -0
- package/templates/js/solid/package.json.fragment.json +23 -0
- package/templates/js/solid/package.json.fragment.typescript.json +11 -0
- package/templates/js/solid/tsconfig.json +11 -0
- package/templates/js/svelte/.prettierrc.js +15 -0
- package/templates/js/svelte/.watchmanconfig +1 -0
- package/templates/js/svelte/App.svelte +123 -0
- package/templates/js/svelte/App.typescript.svelte +123 -0
- package/templates/js/svelte/README.md +18 -0
- package/templates/js/svelte/app.json +4 -0
- package/templates/js/svelte/babel.config.js +22 -0
- package/templates/js/svelte/css.d.ts +21 -0
- package/templates/js/svelte/eslint.config.js +37 -0
- package/templates/js/svelte/image-uris.js +8 -0
- package/templates/js/svelte/index.js +13 -0
- package/templates/js/svelte/metro.config.js +83 -0
- package/templates/js/svelte/package.json.fragment.json +26 -0
- package/templates/js/svelte/package.json.fragment.typescript.json +12 -0
- package/templates/js/svelte/svelte.config.js +47 -0
- package/templates/js/svelte/tsconfig.json +9 -0
- package/templates/js/svelte/tsconfig.typecheck.json +4 -0
- package/templates/js/vue-sfc/.prettierrc.js +5 -0
- package/templates/js/vue-sfc/.watchmanconfig +1 -0
- package/templates/js/vue-sfc/App.typescript.vue +128 -0
- package/templates/js/vue-sfc/App.vue +128 -0
- package/templates/js/vue-sfc/README.md +124 -0
- package/templates/js/vue-sfc/app.json +4 -0
- package/templates/js/vue-sfc/assets/plus-icon.png +0 -0
- package/templates/js/vue-sfc/assets/plus-icon@2x.png +0 -0
- package/templates/js/vue-sfc/assets/plus-icon@3x.png +0 -0
- package/templates/js/vue-sfc/assets/react-native-logo.png +0 -0
- package/templates/js/vue-sfc/assets/react-native-logo@2x.png +0 -0
- package/templates/js/vue-sfc/assets/react-native-logo@3x.png +0 -0
- package/templates/js/vue-sfc/assets/vue-logo.png +0 -0
- package/templates/js/vue-sfc/assets/vue-logo@2x.png +0 -0
- package/templates/js/vue-sfc/assets/vue-logo@3x.png +0 -0
- package/templates/js/vue-sfc/babel.config.js +24 -0
- package/templates/js/vue-sfc/css.d.ts +24 -0
- package/templates/js/vue-sfc/eslint.config.js +48 -0
- package/templates/js/vue-sfc/index.js +13 -0
- package/templates/js/vue-sfc/metro.config.js +30 -0
- package/templates/js/vue-sfc/package.json.fragment.json +26 -0
- package/templates/js/vue-sfc/package.json.fragment.typescript.json +11 -0
- package/templates/js/vue-sfc/tsconfig.json +18 -0
- package/templates/js/vue-sfc/tsconfig.typecheck.json +8 -0
- package/templates/js/vue-sfc/vue-runtime-core.d.ts +3 -0
- package/templates/js/vue-tsx/.prettierrc.js +5 -0
- package/templates/js/vue-tsx/.watchmanconfig +1 -0
- package/templates/js/vue-tsx/App.css +89 -0
- package/templates/js/vue-tsx/App.jsx +40 -0
- package/templates/js/vue-tsx/App.tsx +40 -0
- package/templates/js/vue-tsx/README.md +110 -0
- package/templates/js/vue-tsx/app.json +4 -0
- package/templates/js/vue-tsx/assets/plus-icon.png +0 -0
- package/templates/js/vue-tsx/assets/plus-icon@2x.png +0 -0
- package/templates/js/vue-tsx/assets/plus-icon@3x.png +0 -0
- package/templates/js/vue-tsx/assets/react-native-logo.png +0 -0
- package/templates/js/vue-tsx/assets/react-native-logo@2x.png +0 -0
- package/templates/js/vue-tsx/assets/react-native-logo@3x.png +0 -0
- package/templates/js/vue-tsx/assets/vue-logo.png +0 -0
- package/templates/js/vue-tsx/assets/vue-logo@2x.png +0 -0
- package/templates/js/vue-tsx/assets/vue-logo@3x.png +0 -0
- package/templates/js/vue-tsx/babel.config.js +67 -0
- package/templates/js/vue-tsx/css.d.ts +24 -0
- package/templates/js/vue-tsx/index.js +14 -0
- package/templates/js/vue-tsx/metro.config.js +42 -0
- package/templates/js/vue-tsx/package.json.fragment.json +26 -0
- package/templates/js/vue-tsx/package.json.fragment.typescript.json +11 -0
- package/templates/js/vue-tsx/tsconfig.json +15 -0
- package/templates/js/vue-tsx/tsconfig.typecheck.json +10 -0
- package/templates/js/vue-tsx/vue-jsx.d.ts +43 -0
- package/templates/js/vue-tsx/vue-runtime-core.d.ts +3 -0
- package/templates/layers/README.md +90 -0
- package/templates/layers/application/package.json.fragment.json +5 -0
- package/templates/layers/battery/package.json.fragment.json +5 -0
- package/templates/layers/brightness/package.json.fragment.json +5 -0
- package/templates/layers/cellular/package.json.fragment.json +5 -0
- package/templates/layers/clipboard/package.json.fragment.json +5 -0
- package/templates/layers/crypto/package.json.fragment.json +5 -0
- package/templates/layers/device/package.json.fragment.json +5 -0
- package/templates/layers/expo-modules/ios/Canary/Info.plist +66 -0
- package/templates/layers/expo-modules/package.json.fragment.json +9 -0
- package/templates/layers/haptics/package.json.fragment.json +5 -0
- package/templates/layers/keep-awake/package.json.fragment.json +5 -0
- package/templates/layers/local-auth/package.json.fragment.json +5 -0
- package/templates/layers/localization/package.json.fragment.json +5 -0
- package/templates/layers/navigation/app/angular/assets/angular-logo.png +0 -0
- package/templates/layers/navigation/app/angular/assets/angular-logo@2x.png +0 -0
- package/templates/layers/navigation/app/angular/assets/angular-logo@3x.png +0 -0
- package/templates/layers/navigation/app/angular/assets/plus-icon.png +0 -0
- package/templates/layers/navigation/app/angular/assets/plus-icon@2x.png +0 -0
- package/templates/layers/navigation/app/angular/assets/plus-icon@3x.png +0 -0
- package/templates/layers/navigation/app/angular/assets/react-native-logo.png +0 -0
- package/templates/layers/navigation/app/angular/assets/react-native-logo@2x.png +0 -0
- package/templates/layers/navigation/app/angular/assets/react-native-logo@3x.png +0 -0
- package/templates/layers/navigation/app/angular/src/App.css +129 -0
- package/templates/layers/navigation/app/angular/src/App.ts +31 -0
- package/templates/layers/navigation/app/angular/src/DetailsScreen.ts +24 -0
- package/templates/layers/navigation/app/angular/src/MenuScreen.ts +43 -0
- package/templates/layers/navigation/app/react/App.css +109 -0
- package/templates/layers/navigation/app/react/App.jsx +77 -0
- package/templates/layers/navigation/app/react/App.tsx +77 -0
- package/templates/layers/navigation/app/react/assets/react-native-logo.png +0 -0
- package/templates/layers/navigation/app/react/assets/react-native-logo@2x.png +0 -0
- package/templates/layers/navigation/app/react/assets/react-native-logo@3x.png +0 -0
- package/templates/layers/navigation/app/solid/App.css +129 -0
- package/templates/layers/navigation/app/solid/App.jsx +85 -0
- package/templates/layers/navigation/app/solid/App.tsx +85 -0
- package/templates/layers/navigation/app/solid/assets/plus-icon.png +0 -0
- package/templates/layers/navigation/app/solid/assets/plus-icon@2x.png +0 -0
- package/templates/layers/navigation/app/solid/assets/plus-icon@3x.png +0 -0
- package/templates/layers/navigation/app/solid/assets/react-native-logo.png +0 -0
- package/templates/layers/navigation/app/solid/assets/react-native-logo@2x.png +0 -0
- package/templates/layers/navigation/app/solid/assets/react-native-logo@3x.png +0 -0
- package/templates/layers/navigation/app/solid/assets/solid-logo.png +0 -0
- package/templates/layers/navigation/app/solid/assets/solid-logo@2x.png +0 -0
- package/templates/layers/navigation/app/solid/assets/solid-logo@3x.png +0 -0
- package/templates/layers/navigation/app/svelte/App.css +129 -0
- package/templates/layers/navigation/app/svelte/App.svelte +19 -0
- package/templates/layers/navigation/app/svelte/App.typescript.svelte +19 -0
- package/templates/layers/navigation/app/svelte/DetailsScreen.svelte +17 -0
- package/templates/layers/navigation/app/svelte/DetailsScreen.typescript.svelte +17 -0
- package/templates/layers/navigation/app/svelte/MenuScreen.svelte +40 -0
- package/templates/layers/navigation/app/svelte/MenuScreen.typescript.svelte +40 -0
- package/templates/layers/navigation/app/svelte/image-uris.js +8 -0
- package/templates/layers/navigation/app/vue-sfc/App.css +129 -0
- package/templates/layers/navigation/app/vue-sfc/App.typescript.vue +36 -0
- package/templates/layers/navigation/app/vue-sfc/App.vue +36 -0
- package/templates/layers/navigation/app/vue-sfc/DetailsScreen.typescript.vue +20 -0
- package/templates/layers/navigation/app/vue-sfc/DetailsScreen.vue +20 -0
- package/templates/layers/navigation/app/vue-sfc/MenuScreen.typescript.vue +52 -0
- package/templates/layers/navigation/app/vue-sfc/MenuScreen.vue +52 -0
- package/templates/layers/navigation/app/vue-sfc/assets/plus-icon.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/plus-icon@2x.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/plus-icon@3x.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/react-native-logo.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/react-native-logo@2x.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/react-native-logo@3x.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/vue-logo.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/vue-logo@2x.png +0 -0
- package/templates/layers/navigation/app/vue-sfc/assets/vue-logo@3x.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/App.css +129 -0
- package/templates/layers/navigation/app/vue-tsx/App.jsx +91 -0
- package/templates/layers/navigation/app/vue-tsx/App.tsx +91 -0
- package/templates/layers/navigation/app/vue-tsx/assets/plus-icon.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/plus-icon@2x.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/plus-icon@3x.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/react-native-logo.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/react-native-logo@2x.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/react-native-logo@3x.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/vue-logo.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/vue-logo@2x.png +0 -0
- package/templates/layers/navigation/app/vue-tsx/assets/vue-logo@3x.png +0 -0
- package/templates/layers/navigation/package.json.fragment.json +5 -0
- package/templates/layers/network/package.json.fragment.json +5 -0
- package/templates/layers/screen-orientation/package.json.fragment.json +5 -0
- package/templates/layers/secure-store/package.json.fragment.json +5 -0
- package/templates/layers/sensors/package.json.fragment.json +5 -0
- package/templates/layers/sharing/package.json.fragment.json +5 -0
- package/templates/layers/slider/package.json.fragment.json +5 -0
- package/templates/layers/sms/package.json.fragment.json +5 -0
- package/templates/layers/splash-screen/native/android/app/src/main/AndroidManifest.xml +28 -0
- package/templates/layers/splash-screen/native/android/app/src/main/java/com/canary/MainActivity.kt +29 -0
- package/templates/layers/splash-screen/native/android/app/src/main/res/values/styles.xml +12 -0
- package/templates/layers/splash-screen/native/ios/Canary/AppDelegate.swift +54 -0
- package/templates/layers/splash-screen/package.json.fragment.json +5 -0
- package/templates/layers/standard-web-crypto/package.json.fragment.json +5 -0
- package/templates/layers/store-review/package.json.fragment.json +5 -0
- package/templates/layers/system-ui/package.json.fragment.json +5 -0
- package/templates/layers/testing/detox.config.js +42 -0
- package/templates/layers/testing/e2e/jest.config.js +21 -0
- package/templates/layers/testing/e2e/setup.ts +3 -0
- package/templates/layers/testing/e2e/smoke.test.ts +17 -0
- package/templates/layers/testing/e2e/tsconfig.json +7 -0
- package/templates/layers/testing/fragment/angular/package.json.fragment.json +18 -0
- package/templates/layers/testing/fragment/base/package.json.fragment.json +18 -0
- package/templates/layers/tracking-transparency/package.json.fragment.json +5 -0
- package/templates/layers/web-browser/package.json.fragment.json +5 -0
- package/templates/native/Gemfile +17 -0
- package/templates/native/README.md +48 -0
- package/templates/native/android/app/build.gradle +130 -0
- package/templates/native/android/app/debug.keystore +0 -0
- package/templates/native/android/app/proguard-rules.pro +10 -0
- package/templates/native/android/app/src/androidTest/java/com/canary/DetoxTest.java +29 -0
- package/templates/native/android/app/src/main/AndroidManifest.xml +28 -0
- package/templates/native/android/app/src/main/java/com/canary/MainActivity.kt +22 -0
- package/templates/native/android/app/src/main/java/com/canary/MainApplication.kt +27 -0
- package/templates/native/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/templates/native/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- package/templates/native/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- package/templates/native/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- package/templates/native/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/native/android/app/src/main/res/values/colors.xml +3 -0
- package/templates/native/android/app/src/main/res/values/strings.xml +3 -0
- package/templates/native/android/app/src/main/res/values/styles.xml +6 -0
- package/templates/native/android/build.gradle +33 -0
- package/templates/native/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/templates/native/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/templates/native/android/gradle.properties +44 -0
- package/templates/native/android/gradlew +248 -0
- package/templates/native/android/gradlew.bat +98 -0
- package/templates/native/android/settings.gradle +10 -0
- package/templates/native/bootsplash-logo/angular/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/angular/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/angular/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/angular/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/angular/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- package/templates/native/bootsplash-logo/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- package/templates/native/bootsplash-logo/angular/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- package/templates/native/bootsplash-logo/solid/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/solid/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/solid/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/solid/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/solid/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- package/templates/native/bootsplash-logo/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- package/templates/native/bootsplash-logo/solid/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- package/templates/native/bootsplash-logo/svelte/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/svelte/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/svelte/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/svelte/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/svelte/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- package/templates/native/bootsplash-logo/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- package/templates/native/bootsplash-logo/svelte/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- package/templates/native/bootsplash-logo/vue/android/app/src/main/res/drawable-hdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/vue/android/app/src/main/res/drawable-mdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/vue/android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/vue/android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/vue/android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png +0 -0
- package/templates/native/bootsplash-logo/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- package/templates/native/bootsplash-logo/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- package/templates/native/bootsplash-logo/vue/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- package/templates/native/eslint.config.js +3 -0
- package/templates/native/ios/.xcode.env +11 -0
- package/templates/native/ios/Canary/AppDelegate.swift +48 -0
- package/templates/native/ios/Canary/BootSplash.storyboard +46 -0
- package/templates/native/ios/Canary/Colors.xcassets/BootSplashBackground-498e55.colorset/Contents.json +20 -0
- package/templates/native/ios/Canary/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/templates/native/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/Contents.json +23 -0
- package/templates/native/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55.png +0 -0
- package/templates/native/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@2x.png +0 -0
- package/templates/native/ios/Canary/Images.xcassets/BootSplashLogo-498e55.imageset/logo-498e55@3x.png +0 -0
- package/templates/native/ios/Canary/Images.xcassets/Contents.json +6 -0
- package/templates/native/ios/Canary/Info.plist +60 -0
- package/templates/native/ios/Canary/LaunchScreen.storyboard +47 -0
- package/templates/native/ios/Canary/PrivacyInfo.xcprivacy +37 -0
- package/templates/native/ios/Canary.xcodeproj/project.pbxproj +504 -0
- package/templates/native/ios/Canary.xcodeproj/xcshareddata/xcschemes/Canary.xcscheme +88 -0
- package/templates/native/ios/Canary.xcworkspace/contents.xcworkspacedata +10 -0
- package/templates/native/ios/Podfile +34 -0
- package/templates/native/package.json.fragment.json +22 -0
- package/templates/native/package.json.fragment.typescript.json +8 -0
- package/templates/styling/js/angular/css-modules/src/App.ts +25 -0
- package/templates/styling/js/angular/stylesheet/src/App.ts +26 -0
- package/templates/styling/js/react/css-modules/App.jsx +15 -0
- package/templates/styling/js/react/css-modules/App.tsx +15 -0
- package/templates/styling/js/react/stylesheet/App.jsx +19 -0
- package/templates/styling/js/react/stylesheet/App.tsx +19 -0
- package/templates/styling/js/solid/css-modules/App.jsx +15 -0
- package/templates/styling/js/solid/css-modules/App.tsx +15 -0
- package/templates/styling/js/solid/stylesheet/App.jsx +19 -0
- package/templates/styling/js/solid/stylesheet/App.tsx +19 -0
- package/templates/styling/js/svelte/css-modules/App.svelte +12 -0
- package/templates/styling/js/svelte/css-modules/App.typescript.svelte +12 -0
- package/templates/styling/js/svelte/stylesheet/App.svelte +15 -0
- package/templates/styling/js/svelte/stylesheet/App.typescript.svelte +15 -0
- package/templates/styling/js/vue-sfc/css-modules/App.typescript.vue +15 -0
- package/templates/styling/js/vue-sfc/css-modules/App.vue +15 -0
- package/templates/styling/js/vue-sfc/stylesheet/App.typescript.vue +18 -0
- package/templates/styling/js/vue-sfc/stylesheet/App.vue +18 -0
- package/templates/styling/js/vue-tsx/css-modules/App.jsx +16 -0
- package/templates/styling/js/vue-tsx/css-modules/App.tsx +16 -0
- package/templates/styling/js/vue-tsx/stylesheet/App.jsx +20 -0
- package/templates/styling/js/vue-tsx/stylesheet/App.tsx +20 -0
- package/templates/styling/navigation/angular/css-modules/src/DetailsScreen.ts +17 -0
- package/templates/styling/navigation/angular/css-modules/src/MenuScreen.ts +22 -0
- package/templates/styling/navigation/angular/stylesheet/src/DetailsScreen.ts +18 -0
- package/templates/styling/navigation/angular/stylesheet/src/MenuScreen.ts +23 -0
- package/templates/styling/navigation/react/css-modules/App.jsx +32 -0
- package/templates/styling/navigation/react/css-modules/App.tsx +32 -0
- package/templates/styling/navigation/react/stylesheet/App.jsx +36 -0
- package/templates/styling/navigation/react/stylesheet/App.tsx +36 -0
- package/templates/styling/navigation/solid/css-modules/App.jsx +32 -0
- package/templates/styling/navigation/solid/css-modules/App.tsx +32 -0
- package/templates/styling/navigation/solid/stylesheet/App.jsx +36 -0
- package/templates/styling/navigation/solid/stylesheet/App.tsx +36 -0
- package/templates/styling/navigation/svelte/css-modules/DetailsScreen.svelte +7 -0
- package/templates/styling/navigation/svelte/css-modules/DetailsScreen.typescript.svelte +7 -0
- package/templates/styling/navigation/svelte/css-modules/MenuScreen.svelte +13 -0
- package/templates/styling/navigation/svelte/css-modules/MenuScreen.typescript.svelte +13 -0
- package/templates/styling/navigation/svelte/stylesheet/DetailsScreen.svelte +11 -0
- package/templates/styling/navigation/svelte/stylesheet/DetailsScreen.typescript.svelte +11 -0
- package/templates/styling/navigation/svelte/stylesheet/MenuScreen.svelte +16 -0
- package/templates/styling/navigation/svelte/stylesheet/MenuScreen.typescript.svelte +16 -0
- package/templates/styling/navigation/vue-sfc/css-modules/DetailsScreen.typescript.vue +9 -0
- package/templates/styling/navigation/vue-sfc/css-modules/DetailsScreen.vue +9 -0
- package/templates/styling/navigation/vue-sfc/css-modules/MenuScreen.typescript.vue +15 -0
- package/templates/styling/navigation/vue-sfc/css-modules/MenuScreen.vue +15 -0
- package/templates/styling/navigation/vue-sfc/stylesheet/DetailsScreen.typescript.vue +13 -0
- package/templates/styling/navigation/vue-sfc/stylesheet/DetailsScreen.vue +13 -0
- package/templates/styling/navigation/vue-sfc/stylesheet/MenuScreen.typescript.vue +18 -0
- package/templates/styling/navigation/vue-sfc/stylesheet/MenuScreen.vue +18 -0
- package/templates/styling/navigation/vue-tsx/css-modules/App.jsx +34 -0
- package/templates/styling/navigation/vue-tsx/css-modules/App.tsx +34 -0
- package/templates/styling/navigation/vue-tsx/stylesheet/App.jsx +38 -0
- package/templates/styling/navigation/vue-tsx/stylesheet/App.tsx +38 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# `templates/js/solid`
|
|
2
|
+
|
|
3
|
+
The Solid JS-level overlay for `@symbiote-native/cli new --framework solid`. Same seam as
|
|
4
|
+
`templates/js/react` (see that folder's README for the full per-file rationale table and what's
|
|
5
|
+
deliberately excluded — App content, `e2e/`, lockfiles, this file itself) — source of truth is
|
|
6
|
+
`examples/solid`, root-level files only.
|
|
7
|
+
|
|
8
|
+
`index.js` drops the example's `fabric-call-counter` benchmark instrumentation (canary-only, not
|
|
9
|
+
part of the scaffold seam), same as every other framework's template.
|
|
10
|
+
|
|
11
|
+
## `package.json.fragment.json`
|
|
12
|
+
|
|
13
|
+
Lists only what `index.js`/`metro.config.js`/`babel.config.js` actually import/require:
|
|
14
|
+
`@symbiote-native/solid`, `@symbiote-native/engine`, `solid-js`, `react`, `react-native`
|
|
15
|
+
(deps); `@react-native/babel-preset`, `@react-native/metro-config` (devDeps). Versions pulled
|
|
16
|
+
from `examples/solid/package.json` / the packages' own published versions. Same scope
|
|
17
|
+
limitation as `templates/js/react`'s fragment — `tsconfig.json`'s `@symbiote-native/css-parser`
|
|
18
|
+
and `eslint.config.js`'s `@react-native/eslint-config` aren't listed.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Inline `process.env.DEBUG` at bundle time so the @symbiote diagnostic logs can
|
|
2
|
+
// be toggled from the shell without a dependency:
|
|
3
|
+
// DEBUG=1 npx react-native start --reset-cache
|
|
4
|
+
const debugFlag = process.env.DEBUG === '1' ? '1' : '0';
|
|
5
|
+
|
|
6
|
+
function inlineDebugFlag({ types: t }) {
|
|
7
|
+
return {
|
|
8
|
+
name: 'inline-debug-flag',
|
|
9
|
+
visitor: {
|
|
10
|
+
MemberExpression(path) {
|
|
11
|
+
if (path.matchesPattern('process.env.DEBUG')) {
|
|
12
|
+
path.replaceWith(t.stringLiteral(debugFlag));
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
presets: [
|
|
21
|
+
'module:@react-native/babel-preset',
|
|
22
|
+
// LISTED LAST, WHICH MAKES IT RUN FIRST — babel applies presets in reverse array order. It has
|
|
23
|
+
// to win the race for the JSX: it rewrites every element into calls imported from
|
|
24
|
+
// @symbiote-native/solid/renderer, and once it has, the RN preset's own React-JSX transform
|
|
25
|
+
// finds no JSX left and no-ops.
|
|
26
|
+
'@symbiote-native/solid/babel-preset',
|
|
27
|
+
],
|
|
28
|
+
plugins: [inlineDebugFlag],
|
|
29
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Ambient module for a plain, side-effect-only `.css` import (`import './App.css'`) —
|
|
2
|
+
// @symbiote-native/css-parser compiles it at build time (Metro's babelTransformerPath, see
|
|
3
|
+
// metro.config.js) into a registerRules() call; there's no runtime export to type.
|
|
4
|
+
declare module '*.css';
|
|
5
|
+
|
|
6
|
+
// Same shape for the three optional preprocessor sources — css-parser reduces each to plain CSS
|
|
7
|
+
// before compiling, so a side-effect import of one is indistinguishable downstream from a `.css`
|
|
8
|
+
// one.
|
|
9
|
+
declare module '*.scss';
|
|
10
|
+
declare module '*.sass';
|
|
11
|
+
declare module '*.less';
|
|
12
|
+
declare module '*.styl';
|
|
13
|
+
|
|
14
|
+
// Generic (non-literal) fallback for a `.module.css` import, used by a standalone `tsc` run. The
|
|
15
|
+
// `@symbiote-native/css-parser/typescript-plugin` entry in tsconfig.json's `compilerOptions.plugins`
|
|
16
|
+
// gives per-file literal-key typing live in the editor instead.
|
|
17
|
+
declare module '*.module.css' {
|
|
18
|
+
const styles: Record<string, string>;
|
|
19
|
+
export default styles;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @format
|
|
3
|
+
*
|
|
4
|
+
* Symbiote Solid canary entry. createApp(App).mount(appName) wires the native-host seams and RN's
|
|
5
|
+
* own AppRegistry, then mounts via @symbiote-native/engine — RN's own renderer is never in the path.
|
|
6
|
+
* Same entry shape as every other canary, going through the shared AppRegistry seam.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createApp } from '@symbiote-native/solid/bootstrap';
|
|
10
|
+
import App from './App';
|
|
11
|
+
import { name as appName } from './app.json';
|
|
12
|
+
|
|
13
|
+
createApp(App).mount(appName);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
|
|
2
|
+
|
|
3
|
+
const projectRoot = __dirname;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @symbiote-native/* and solid-js resolve as ordinary npm packages from this app's own
|
|
7
|
+
* node_modules. @react-native/babel-preset strips the types, and babel.config.js's
|
|
8
|
+
* @symbiote-native/solid/babel-preset compiles the JSX.
|
|
9
|
+
*
|
|
10
|
+
* @type {import('@react-native/metro-config').MetroConfig}
|
|
11
|
+
*/
|
|
12
|
+
const defaultConfig = getDefaultConfig(projectRoot);
|
|
13
|
+
|
|
14
|
+
const config = {
|
|
15
|
+
transformer: {
|
|
16
|
+
// @symbiote-native/solid ships the standalone .css/.module.css transformer itself (the same
|
|
17
|
+
// framework-agnostic path the React, Vue-TSX and Angular apps use via their own adapter's
|
|
18
|
+
// ./metro-css-parser export), so no local wiring file is needed.
|
|
19
|
+
babelTransformerPath:
|
|
20
|
+
require.resolve('@symbiote-native/solid/metro-css-parser'),
|
|
21
|
+
},
|
|
22
|
+
resolver: {
|
|
23
|
+
// Teach Metro that a style file is a source file (the transformer turns it into a module).
|
|
24
|
+
// scss/sass/less/styl are optional SCSS/Sass/Less/Stylus preprocessor sources — see
|
|
25
|
+
// core/css-parser/src/preprocessors.ts.
|
|
26
|
+
sourceExts: [
|
|
27
|
+
...defaultConfig.resolver.sourceExts,
|
|
28
|
+
'css',
|
|
29
|
+
'scss',
|
|
30
|
+
'sass',
|
|
31
|
+
'less',
|
|
32
|
+
'styl',
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
// Solid compiles a component to `function App(props)` — a function with an uppercase name,
|
|
36
|
+
// which is exactly what react-refresh's isLikelyComponentType heuristic accepts as a React
|
|
37
|
+
// component. Metro's HMR runtime then hands the update to performReactRefresh, which walks
|
|
38
|
+
// React's Fiber tree for live instances to patch; this adapter never registers one (no
|
|
39
|
+
// react-reconciler in the path), so the update is silently swallowed — no error, no visible
|
|
40
|
+
// change. Forces every .tsx update straight to a full reload, skipping the boundary check.
|
|
41
|
+
unstable_forceFullRefreshPatterns: [/\.tsx$/],
|
|
42
|
+
|
|
43
|
+
// DELIBERATELY NOT setting `unstable_conditionNames` — verified against the installed Metro
|
|
44
|
+
// rather than assumed, because solid-js's export map DOES have a `node` branch pointing at
|
|
45
|
+
// its SSR build (dist/server.js). Metro's own condition set never includes `node`, so the
|
|
46
|
+
// top-level `import` condition (the client build) resolves correctly by default.
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
module.exports = mergeConfig(defaultConfig, config);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"android": "react-native run-android",
|
|
4
|
+
"android:release": "react-native run-android --mode Release",
|
|
5
|
+
"ios": "react-native run-ios",
|
|
6
|
+
"ios:release": "react-native run-ios --mode Release",
|
|
7
|
+
"lint": "eslint .",
|
|
8
|
+
"start": "react-native start",
|
|
9
|
+
"dev": "react-native start --reset-cache"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@symbiote-native/android": "latest",
|
|
13
|
+
"@symbiote-native/solid": "latest",
|
|
14
|
+
"@symbiote-native/engine": "latest",
|
|
15
|
+
"react": "19.2.3",
|
|
16
|
+
"react-native": "0.86.0",
|
|
17
|
+
"solid-js": "^1.9.14"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@react-native/babel-preset": "0.86.0",
|
|
21
|
+
"@react-native/metro-config": "0.86.0"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "@react-native/typescript-config",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"types": ["node"],
|
|
5
|
+
"jsx": "preserve",
|
|
6
|
+
"jsxImportSource": "@symbiote-native/solid",
|
|
7
|
+
"plugins": [{ "name": "@symbiote-native/css-parser/typescript-plugin" }]
|
|
8
|
+
},
|
|
9
|
+
"include": ["**/*.ts", "**/*.tsx"],
|
|
10
|
+
"exclude": ["**/node_modules", "**/Pods", "e2e"]
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
arrowParens: 'avoid',
|
|
3
|
+
singleQuote: true,
|
|
4
|
+
trailingComma: 'all',
|
|
5
|
+
plugins: ['prettier-plugin-svelte'],
|
|
6
|
+
// htmlWhitespaceSensitivity:'ignore' keeps prettier from re-encoding a gap between siblings as
|
|
7
|
+
// a dangling `>` / split closing tag. Whitespace there is free — a whitespace-only text node
|
|
8
|
+
// under a non-text parent becomes an anchor.
|
|
9
|
+
overrides: [
|
|
10
|
+
{
|
|
11
|
+
files: '*.svelte',
|
|
12
|
+
options: { parser: 'svelte', htmlWhitespaceSensitivity: 'ignore' },
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { PLUS_ICON_URI, REACT_NATIVE_LOGO_URI, SVELTE_LOGO_URI } from './image-uris';
|
|
3
|
+
|
|
4
|
+
let count = $state(0);
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<safe-area-view class="screen">
|
|
8
|
+
<view class="brand-row">
|
|
9
|
+
<image
|
|
10
|
+
class="brand-logo brand-logo-react"
|
|
11
|
+
resizeMode="contain"
|
|
12
|
+
source={{ uri: REACT_NATIVE_LOGO_URI }}
|
|
13
|
+
/>
|
|
14
|
+
<image class="plus-icon" resizeMode="contain" source={{ uri: PLUS_ICON_URI }} />
|
|
15
|
+
<image
|
|
16
|
+
class="brand-logo brand-logo-svelte"
|
|
17
|
+
resizeMode="contain"
|
|
18
|
+
source={{ uri: SVELTE_LOGO_URI }}
|
|
19
|
+
/>
|
|
20
|
+
</view>
|
|
21
|
+
|
|
22
|
+
<text class="title">Welcome to SymbioteNative!</text>
|
|
23
|
+
<text class="subtitle">Framework-agnostic React Native, driven by Svelte.</text>
|
|
24
|
+
|
|
25
|
+
<view class="counter-card">
|
|
26
|
+
<text class="counter-label">TAPS</text>
|
|
27
|
+
<text class="counter-value">{count}</text>
|
|
28
|
+
</view>
|
|
29
|
+
|
|
30
|
+
<pressable class="button-primary" onPress={() => count++}>
|
|
31
|
+
<text class="button-primary-text">Tap me</text>
|
|
32
|
+
</pressable>
|
|
33
|
+
</safe-area-view>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
:root {
|
|
37
|
+
--ink: #0b1622;
|
|
38
|
+
--paper: #13243a;
|
|
39
|
+
--mist: #41506a;
|
|
40
|
+
--chalk: #cbd5e1;
|
|
41
|
+
--chalk-bright: #ffffff;
|
|
42
|
+
--brand: #ff3e00;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.screen {
|
|
46
|
+
flex: 1;
|
|
47
|
+
background-color: var(--ink);
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
gap: 24px;
|
|
51
|
+
padding: 24px 32px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.brand-row {
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 28px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.brand-logo {
|
|
61
|
+
height: 64px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.brand-logo-react {
|
|
65
|
+
aspect-ratio: 1.0977;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.brand-logo-svelte {
|
|
69
|
+
aspect-ratio: 0.8359;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.plus-icon {
|
|
73
|
+
width: 48px;
|
|
74
|
+
height: 48px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.title {
|
|
78
|
+
color: var(--chalk-bright);
|
|
79
|
+
font-size: 22px;
|
|
80
|
+
font-weight: bold;
|
|
81
|
+
text-align: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.subtitle {
|
|
85
|
+
color: var(--chalk);
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
text-align: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.counter-card {
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 4px;
|
|
93
|
+
padding: 20px 28px;
|
|
94
|
+
border-radius: 16px;
|
|
95
|
+
background-color: var(--paper);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.counter-label {
|
|
99
|
+
color: var(--mist);
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
letter-spacing: 1px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.counter-value {
|
|
105
|
+
color: var(--brand);
|
|
106
|
+
font-size: 32px;
|
|
107
|
+
font-weight: bold;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.button-primary {
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
border-radius: 12px;
|
|
114
|
+
padding: 14px 22px;
|
|
115
|
+
background-color: var(--brand);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.button-primary-text {
|
|
119
|
+
color: var(--chalk-bright);
|
|
120
|
+
font-size: 15px;
|
|
121
|
+
font-weight: bold;
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { PLUS_ICON_URI, REACT_NATIVE_LOGO_URI, SVELTE_LOGO_URI } from './image-uris';
|
|
3
|
+
|
|
4
|
+
let count = $state<number>(0);
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<safe-area-view class="screen">
|
|
8
|
+
<view class="brand-row">
|
|
9
|
+
<image
|
|
10
|
+
class="brand-logo brand-logo-react"
|
|
11
|
+
resizeMode="contain"
|
|
12
|
+
source={{ uri: REACT_NATIVE_LOGO_URI }}
|
|
13
|
+
/>
|
|
14
|
+
<image class="plus-icon" resizeMode="contain" source={{ uri: PLUS_ICON_URI }} />
|
|
15
|
+
<image
|
|
16
|
+
class="brand-logo brand-logo-svelte"
|
|
17
|
+
resizeMode="contain"
|
|
18
|
+
source={{ uri: SVELTE_LOGO_URI }}
|
|
19
|
+
/>
|
|
20
|
+
</view>
|
|
21
|
+
|
|
22
|
+
<text class="title">Welcome to SymbioteNative!</text>
|
|
23
|
+
<text class="subtitle">Framework-agnostic React Native, driven by Svelte.</text>
|
|
24
|
+
|
|
25
|
+
<view class="counter-card">
|
|
26
|
+
<text class="counter-label">TAPS</text>
|
|
27
|
+
<text class="counter-value">{count}</text>
|
|
28
|
+
</view>
|
|
29
|
+
|
|
30
|
+
<pressable class="button-primary" onPress={() => count++}>
|
|
31
|
+
<text class="button-primary-text">Tap me</text>
|
|
32
|
+
</pressable>
|
|
33
|
+
</safe-area-view>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
:root {
|
|
37
|
+
--ink: #0b1622;
|
|
38
|
+
--paper: #13243a;
|
|
39
|
+
--mist: #41506a;
|
|
40
|
+
--chalk: #cbd5e1;
|
|
41
|
+
--chalk-bright: #ffffff;
|
|
42
|
+
--brand: #ff3e00;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.screen {
|
|
46
|
+
flex: 1;
|
|
47
|
+
background-color: var(--ink);
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: center;
|
|
50
|
+
gap: 24px;
|
|
51
|
+
padding: 24px 32px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.brand-row {
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 28px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.brand-logo {
|
|
61
|
+
height: 64px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.brand-logo-react {
|
|
65
|
+
aspect-ratio: 1.0977;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.brand-logo-svelte {
|
|
69
|
+
aspect-ratio: 0.8359;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.plus-icon {
|
|
73
|
+
width: 48px;
|
|
74
|
+
height: 48px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.title {
|
|
78
|
+
color: var(--chalk-bright);
|
|
79
|
+
font-size: 22px;
|
|
80
|
+
font-weight: bold;
|
|
81
|
+
text-align: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.subtitle {
|
|
85
|
+
color: var(--chalk);
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
text-align: center;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.counter-card {
|
|
91
|
+
align-items: center;
|
|
92
|
+
gap: 4px;
|
|
93
|
+
padding: 20px 28px;
|
|
94
|
+
border-radius: 16px;
|
|
95
|
+
background-color: var(--paper);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.counter-label {
|
|
99
|
+
color: var(--mist);
|
|
100
|
+
font-size: 12px;
|
|
101
|
+
letter-spacing: 1px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.counter-value {
|
|
105
|
+
color: var(--brand);
|
|
106
|
+
font-size: 32px;
|
|
107
|
+
font-weight: bold;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.button-primary {
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
border-radius: 12px;
|
|
114
|
+
padding: 14px 22px;
|
|
115
|
+
background-color: var(--brand);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.button-primary-text {
|
|
119
|
+
color: var(--chalk-bright);
|
|
120
|
+
font-size: 15px;
|
|
121
|
+
font-weight: bold;
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# `templates/js/svelte`
|
|
2
|
+
|
|
3
|
+
The Svelte JS-level overlay for `@symbiote-native/cli new --framework svelte`. Same seam as
|
|
4
|
+
`templates/js/react` (see that folder's README for the full per-file rationale table and what's
|
|
5
|
+
deliberately excluded) — source of truth is `examples/svelte`, root-level files only.
|
|
6
|
+
|
|
7
|
+
`index.js` drops the example's `fabric-call-counter` benchmark instrumentation, same as every
|
|
8
|
+
other framework's template. `metro.config.js` keeps every Svelte-specific Metro workaround
|
|
9
|
+
verbatim (the `esm-env` DEV redirect, the `browser` condition, `inlineRequires: false`,
|
|
10
|
+
`unstable_forceFullRefreshPatterns`) — none of it is canary-specific, all of it is required for
|
|
11
|
+
Svelte 5's client runtime to boot under Metro at all.
|
|
12
|
+
|
|
13
|
+
## `package.json.fragment.json`
|
|
14
|
+
|
|
15
|
+
Lists only what `index.js`/`metro.config.js`/`babel.config.js` actually import/require:
|
|
16
|
+
`@symbiote-native/svelte`, `@symbiote-native/engine`, `svelte`, `react`, `react-native` (deps);
|
|
17
|
+
`@react-native/babel-preset`, `@react-native/metro-config` (devDeps). Same scope limitation as
|
|
18
|
+
`templates/js/react`'s fragment.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Inline `process.env.DEBUG` at bundle time so the @symbiote diagnostic logs can
|
|
2
|
+
// be toggled from the shell without a dependency:
|
|
3
|
+
// DEBUG=1 npx react-native start --reset-cache
|
|
4
|
+
const debugFlag = process.env.DEBUG === '1' ? '1' : '0';
|
|
5
|
+
|
|
6
|
+
function inlineFlags({ types: t }) {
|
|
7
|
+
return {
|
|
8
|
+
name: 'inline-flags',
|
|
9
|
+
visitor: {
|
|
10
|
+
MemberExpression(path) {
|
|
11
|
+
if (path.matchesPattern('process.env.DEBUG')) {
|
|
12
|
+
path.replaceWith(t.stringLiteral(debugFlag));
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
presets: ['module:@react-native/babel-preset'],
|
|
21
|
+
plugins: [inlineFlags],
|
|
22
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Ambient module for a plain, side-effect-only `.css` import (`import './App.css'`) —
|
|
2
|
+
// @symbiote-native/css-parser compiles it at build time (Metro's babelTransformerPath, see
|
|
3
|
+
// metro.config.js) into a registerRules() call; there's no runtime export to type.
|
|
4
|
+
declare module '*.css';
|
|
5
|
+
|
|
6
|
+
// Same shape for the three optional preprocessor sources — css-parser reduces each to plain CSS
|
|
7
|
+
// before compiling, so a side-effect import of one is indistinguishable downstream from a `.css`
|
|
8
|
+
// one.
|
|
9
|
+
declare module '*.scss';
|
|
10
|
+
declare module '*.sass';
|
|
11
|
+
declare module '*.less';
|
|
12
|
+
declare module '*.styl';
|
|
13
|
+
|
|
14
|
+
// Generic (non-literal) fallback for a `.module.css` import — used by `svelte-check` outside a
|
|
15
|
+
// file that already has its own generated `Card.module.css.d.ts`. The
|
|
16
|
+
// `@symbiote-native/css-parser/typescript-plugin` entry in tsconfig.json's `compilerOptions.plugins`
|
|
17
|
+
// gives the SAME per-file literal-key typing live in the editor.
|
|
18
|
+
declare module '*.module.css' {
|
|
19
|
+
const styles: Record<string, string>;
|
|
20
|
+
export default styles;
|
|
21
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const reactNativeFlatConfig = require('@react-native/eslint-config/flat');
|
|
2
|
+
const svelte = require('eslint-plugin-svelte');
|
|
3
|
+
const tsParser = require('@typescript-eslint/parser');
|
|
4
|
+
|
|
5
|
+
// `@react-native/eslint-config/flat` has no `files` pattern covering `.svelte` at all, so ESLint's
|
|
6
|
+
// flat-config default (only recognized JS-like extensions unless a config explicitly opts a file
|
|
7
|
+
// in) reports every `.svelte` file "ignored because of a matching ignore pattern" — same root
|
|
8
|
+
// cause and fix as the monorepo root's own eslint.config.js block for adapters/svelte.
|
|
9
|
+
module.exports = [
|
|
10
|
+
...reactNativeFlatConfig,
|
|
11
|
+
...svelte.configs['flat/recommended'],
|
|
12
|
+
{
|
|
13
|
+
// `<script lang="ts">` needs a real TS parser inside the component, or every type annotation
|
|
14
|
+
// is a syntax error to svelte-eslint-parser's own (JS-only) script sub-parser.
|
|
15
|
+
files: ['**/*.svelte'],
|
|
16
|
+
languageOptions: {
|
|
17
|
+
parserOptions: { parser: tsParser },
|
|
18
|
+
},
|
|
19
|
+
rules: {
|
|
20
|
+
// `@react-native/eslint-config`'s react-hooks plugin pattern-matches any `use*`-named call
|
|
21
|
+
// as a React Hook. Svelte composables (`useNavigation`, `useIsFocused`, …) share that naming
|
|
22
|
+
// convention by accident of both ecosystems' idiom, and are not React Hooks — the rule has
|
|
23
|
+
// no way to tell the two apart, so it is a standing false positive on every `.svelte` file.
|
|
24
|
+
'react-hooks/rules-of-hooks': 'off',
|
|
25
|
+
// The `**/*.ts`/`**/*.tsx` block in this same config turns `no-undef` off — typescript-eslint's
|
|
26
|
+
// own recommendation, since a plain (non-type-aware) ESLint rule cannot see ambient globals a
|
|
27
|
+
// `.d.ts` lib declares. `.svelte`'s `<script lang="ts">` isn't matched by that glob, so it
|
|
28
|
+
// needs the same override here.
|
|
29
|
+
'no-undef': 'off',
|
|
30
|
+
// The rule's fixer unwraps `{'<svelte:self> ...'}` into bare text, which is wrong whenever
|
|
31
|
+
// the string's own content contains `<...>` — measured: even HTML-entity-escaped
|
|
32
|
+
// (`<svelte:self>`) bare text still throws `element_invalid_closing_tag` from Svelte's
|
|
33
|
+
// OWN compiler, not just this linter, so the mustache is load-bearing, not "useless".
|
|
34
|
+
'svelte/no-useless-mustaches': 'off',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|