├── .vscode ├── extensions.json ├── settings.json └── launch.json ├── references.d.ts ├── .prettierrc ├── app ├── app.ts ├── solid-adapter.ts ├── test.tsx ├── renderer.ts ├── solid-native-jsx.ts └── nativescript-jsx.ts ├── App_Resources ├── iOS │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── icon-20.png │ │ │ ├── icon-29.png │ │ │ ├── icon-40.png │ │ │ ├── icon-76.png │ │ │ ├── icon-1024.png │ │ │ ├── icon-20@2x.png │ │ │ ├── icon-20@3x.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon-83.5@2x.png │ │ │ └── Contents.json │ │ ├── LaunchScreen.Center.imageset │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ ├── LaunchScreen-Center@3x.png │ │ │ └── Contents.json │ │ └── LaunchScreen.AspectFill.imageset │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ ├── LaunchScreen-AspectFill@3x.png │ │ │ └── Contents.json │ ├── build.xcconfig │ ├── Info.plist │ └── LaunchScreen.storyboard └── Android │ ├── src │ └── main │ │ ├── res │ │ ├── values-v21 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── drawable-hdpi │ │ │ ├── logo.png │ │ │ └── background.png │ │ ├── drawable-ldpi │ │ │ ├── logo.png │ │ │ └── background.png │ │ ├── drawable-mdpi │ │ │ ├── logo.png │ │ │ └── background.png │ │ ├── drawable-xhdpi │ │ │ ├── logo.png │ │ │ └── background.png │ │ ├── drawable-xxhdpi │ │ │ ├── logo.png │ │ │ └── background.png │ │ ├── drawable-xxxhdpi │ │ │ ├── logo.png │ │ │ └── background.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── ic_launcher_background.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-anydpi-v26 │ │ │ └── ic_launcher.xml │ │ ├── drawable-nodpi │ │ │ └── splash_screen.xml │ │ ├── values-v29 │ │ │ └── styles.xml │ │ └── drawable │ │ │ └── ic_launcher_foreground.xml │ │ └── AndroidManifest.xml │ └── app.gradle ├── README.md ├── .editorconfig ├── nativescript.config.ts ├── .gitignore ├── package.json ├── tsconfig.json ├── webpack.config.js └── Solid-Native.svg /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["nativescript.nativescript"] 3 | } 4 | -------------------------------------------------------------------------------- /references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 4, 3 | "endOfLine": "lf", 4 | "printWidth": 120 5 | } 6 | -------------------------------------------------------------------------------- /app/app.ts: -------------------------------------------------------------------------------- 1 | import { runSolidNative } from "./solid-adapter"; 2 | import { App } from "./test"; 3 | 4 | runSolidNative(App); 5 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "search.exclude": { 3 | "**/node_modules": false 4 | }, 5 | "search.useIgnoreFiles": false 6 | } 7 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #65ADF1 4 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-hdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-ldpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-mdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 |
5 |
6 |

7 | Simple and performant reactivity for building user interfaces. 8 |

9 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MrFoxPro/solid-nativescript-experiments/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #65ADF1 6 | #272734 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | indent_size = 3 9 | 10 | [*.json] 11 | indent_style = space 12 | 13 | [*.js] 14 | indent_style = space 15 | 16 | [*.ts] 17 | indent_style = space 18 | -------------------------------------------------------------------------------- /nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.samplets', 5 | appPath: 'app', 6 | appResourcesPath: 'App_Resources', 7 | android: { 8 | v8Flags: '--expose_gc', 9 | markingMode: 'none' 10 | } 11 | } as NativeScriptConfig; 12 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode you need to specify your development team. 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/values-v29/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | # General 14 | .DS_Store 15 | .AppleDouble 16 | .LSOverride 17 | .idea 18 | .cloud 19 | .project 20 | tmp/ 21 | typings/ 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-Center@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchScreen-AspectFill@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "pwa-node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "program": "${workspaceFolder}\\webpack.config.js", 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // implementation 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | // If you want to add something to be applied before applying plugins' include.gradle files 9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1" 10 | // create a file named before-plugins.gradle in the current directory and place it there 11 | 12 | android { 13 | defaultConfig { 14 | minSdkVersion 17 15 | generatedDensities = [] 16 | } 17 | aaptOptions { 18 | additionalParameters "--no-version-vectors" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sample-ts", 3 | "main": "app/app.ts", 4 | "version": "1.0.0", 5 | "private": true, 6 | "dependencies": { 7 | "@nativescript/core": "~8.1.5", 8 | "@nativescript/theme": "~3.0.2", 9 | "solid-js": "^1.2.6" 10 | }, 11 | "devDependencies": { 12 | "@babel/preset-env": "^7.16.7", 13 | "@babel/preset-typescript": "^7.16.7", 14 | "@nativescript/android": "8.1.1", 15 | "@nativescript/types": "~8.1.1", 16 | "@nativescript/webpack": "~5.0.4", 17 | "babel": "^6.23.0", 18 | "babel-loader": "^8.2.3", 19 | "babel-preset-solid": "^1.2.6", 20 | "core-js": "^3.20.2", 21 | "typescript": "~4.5.4" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "esnext", 4 | "target": "ESNext", 5 | "moduleResolution": "node", 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true, 8 | "noEmitHelpers": true, 9 | "noEmitOnError": false, 10 | "skipLibCheck": true, 11 | "noEmit": true, 12 | "lib": [ 13 | "ESNext" 14 | ], 15 | "jsx": "preserve", 16 | "baseUrl": ".", 17 | "paths": { 18 | "~/*": [ 19 | "app/*" 20 | ], 21 | "@/*": [ 22 | "app/*" 23 | ] 24 | }, 25 | }, 26 | "files": ["./app/solid-native-jsx.ts", "./app/nativescript-jsx.ts"], 27 | "include": [ 28 | "app/**/*" 29 | ], 30 | "exclude": [ 31 | "node_modules", 32 | "platforms" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 13 | 14 | 15 | 18 | 19 | 20 | 23 | 24 | 28 | -------------------------------------------------------------------------------- /App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/solid-adapter.ts: -------------------------------------------------------------------------------- 1 | import { Button, Color, LayoutBase } from "@nativescript/core"; 2 | import { run } from "@nativescript/core/application"; 3 | import { render } from "./renderer"; 4 | 5 | function createDefaultView(AppComponent: any, rootView) { 6 | rootView.backgroundColor = new Color(125, 0, 231, 252); 7 | const button = new Button(); 8 | button.text = "Rerender!"; 9 | button.backgroundColor = new Color("red"); 10 | 11 | button.height = { 12 | unit: "px", 13 | value: 175, 14 | }; 15 | button.width = { 16 | unit: "px", 17 | value: 595, 18 | }; 19 | // button.marginTop = { 20 | // unit: "px", 21 | // value: 200, 22 | // }; 23 | button.on("tap", () => { 24 | console.log("hi!"); 25 | createDefaultView(AppComponent, new LayoutBase()); 26 | }); 27 | rootView.addChild(button); 28 | console.log("rendering nativescript...."); 29 | 30 | render(AppComponent, rootView); 31 | // setTimeout(() => { 32 | // hydrate(AppComponent, rootView); 33 | // }, 500); 34 | // This synchronously passes the root view to NativeScript. 35 | return rootView; 36 | } 37 | export function runSolidNative(AppComponent: any, rootView = new LayoutBase()): void { 38 | run({ 39 | create: () => createDefaultView(AppComponent, rootView), 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /app/test.tsx: -------------------------------------------------------------------------------- 1 | import { createSignal, createEffect, createMemo, onMount, createRenderEffect } from "solid-js/dist/dev"; 2 | // import { effect, memo } from "./renderer"; 3 | 4 | export function App() { 5 | onMount(() => { 6 | console.log("App mounted"); 7 | }); 8 | return ; 9 | } 10 | function HelloWorld() { 11 | onMount(() => { 12 | console.log("HelloWorld mounted"); 13 | }); 14 | const [counter, setCounter] = createSignal(0); 15 | const m = createMemo( 16 | () => 17 | [ 18 | "https://www.solidjs.com/img/logo/with-wordmark/logo.png", 19 | "https://www.solidjs.com/img/logo/wordmark/logo.png", 20 | "https://www.solidjs.com/img/logo/dark-with-wordmark/logo.png", 21 | "https://www.solidjs.com/img/logo/dark-wordmark/logo.png", 22 | ][counter()] 23 | ); 24 | createEffect(() => { 25 | // console.log() 26 | console.log(counter()); 27 | }); 28 | // const [] 29 | return ( 30 | 31 | 32 |