diff --git a/demo/app/App.svelte b/demo/app/App.svelte index 38ede645..9e9a56a2 100644 --- a/demo/app/App.svelte +++ b/demo/app/App.svelte @@ -1,48 +1,33 @@ - - - - - - - - - - + + + selectedTab = e.value}> + + + + + + + + + + + + + + - - diff --git a/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_about.xml b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_about.xml new file mode 100644 index 00000000..b780246a --- /dev/null +++ b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_about.xml @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_controls.xml b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_controls.xml new file mode 100644 index 00000000..c701d2cc --- /dev/null +++ b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_controls.xml @@ -0,0 +1,27 @@ + + + + + + + \ No newline at end of file diff --git a/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_reactivity.xml b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_reactivity.xml new file mode 100644 index 00000000..d2c37cd6 --- /dev/null +++ b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_reactivity.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_stores.xml b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_stores.xml new file mode 100644 index 00000000..09c863ad --- /dev/null +++ b/demo/app/App_Resources/Android/src/main/res/drawable/ic_tab_stores.xml @@ -0,0 +1,35 @@ + + + + + + + \ No newline at end of file diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Back.png b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Back.png new file mode 100644 index 00000000..3c46f1f3 Binary files /dev/null and b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Back.png differ diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..b87ebf6c --- /dev/null +++ b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "filename" : "Back.png", + "idiom" : "reality", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Back.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json new file mode 100644 index 00000000..950af4d8 --- /dev/null +++ b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "layers" : [ + { + "filename" : "Front.solidimagestacklayer" + }, + { + "filename" : "Middle.solidimagestacklayer" + }, + { + "filename" : "Back.solidimagestacklayer" + } + ] +} diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json new file mode 100644 index 00000000..52a7e86a --- /dev/null +++ b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "filename" : "Middle.png", + "idiom" : "reality", + "scale" : "2x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Middle.png b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Middle.png new file mode 100644 index 00000000..2475defa Binary files /dev/null and b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Content.imageset/Middle.png differ diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/demo/app/App_Resources/visionOS/Assets.xcassets/AppIcon.solidimagestack/Middle.solidimagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/demo/app/App_Resources/visionOS/Assets.xcassets/Contents.json b/demo/app/App_Resources/visionOS/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/demo/app/App_Resources/visionOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo/app/App_Resources/visionOS/Info.plist b/demo/app/App_Resources/visionOS/Info.plist new file mode 100644 index 00000000..a9ae78df --- /dev/null +++ b/demo/app/App_Resources/visionOS/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion∂ + 1.0 + LSRequiresIPhoneOS + + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/demo/app/App_Resources/visionOS/build.xcconfig b/demo/app/App_Resources/visionOS/build.xcconfig new file mode 100644 index 00000000..8bb8c51c --- /dev/null +++ b/demo/app/App_Resources/visionOS/build.xcconfig @@ -0,0 +1,3 @@ +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +IPHONEOS_DEPLOYMENT_TARGET = 17.0; \ No newline at end of file diff --git a/demo/app/App_Resources/visionOS/src/NativeScriptApp.swift b/demo/app/App_Resources/visionOS/src/NativeScriptApp.swift new file mode 100644 index 00000000..41dd88b0 --- /dev/null +++ b/demo/app/App_Resources/visionOS/src/NativeScriptApp.swift @@ -0,0 +1,10 @@ +import SwiftUI + +@main +struct NativeScriptApp: App { + + var body: some Scene { + NativeScriptMainWindow() + .defaultSize(width: 700, height: 800) + } +} diff --git a/demo/app/Header.svelte b/demo/app/Header.svelte deleted file mode 100644 index 54525197..00000000 --- a/demo/app/Header.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - {#if isAndroid} - - {:else} - - {/if} - - - - \ No newline at end of file diff --git a/demo/app/Nav.ts b/demo/app/Nav.ts deleted file mode 100644 index 373a4543..00000000 --- a/demo/app/Nav.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { navigate } from '@nativescript-community/svelte-native' -import { writable } from 'svelte/store' -import RadSideDrawerElement from '@nativescript-community/svelte-native-nativescript-ui/sidedrawer'; -import { Trace } from '@nativescript/core' - - -export let current_page = writable(null); -let nav_frame; -let drawer: RadSideDrawerElement; - -export function init(navFrame, navDrawer: RadSideDrawerElement, startPage) { - nav_frame = navFrame; - drawer = navDrawer; - current_page.set(startPage) -} - -export function goto(view, props) { - current_page.set(view); - navigate({ - page: view, - props: props, - clearHistory: true, - frame: nav_frame - }); -} - -export function toggleDrawer() { - drawer.toggleDrawerState(); -} - diff --git a/demo/app/app.css b/demo/app/app.css index 8c42e4dc..dcbbfe51 100644 --- a/demo/app/app.css +++ b/demo/app/app.css @@ -1,16 +1,32 @@ -/* -In NativeScript, the app.css file is where you place CSS rules that -you would like to apply to your entire application. Check out -http://docs.nativescript.org/ui/styling for a full list of the CSS -selectors and properties you can use to style UI components. +@tailwind base; +@tailwind components; +@tailwind utilities; -/* -In many cases you may want to use the NativeScript core theme instead -of writing your own CSS rules. For a full list of class names in the theme -refer to http://docs.nativescript.org/ui/theme. -The imported CSS rules must precede all other types of rules. -*/ -@import '@nativescript/theme/css/core.css'; -@import '@nativescript/theme/css/default.css'; -@import './font-awesome.css'; +/* https://fontawesome.com/icons?d=gallery&m=free */ +.far { + font-family: "Font Awesome 5 Free", "fa-regular-400"; + font-weight: 400; +} + +.fas { + font-family: "Font Awesome 5 Free", "fa-solid-900"; + font-weight: 900; +} + +.fab { + font-family: "Font Awesome 5 Brands", "fa-brands-400"; + font-weight: 400; +} + +.ns-visionos .text-purple-800 { + color: white; +} + +.ns-visionos .bg-white { + background-color: rgba(255, 255, 255, 0.4); +} + +.ns-visionos textField { + color: black; +} \ No newline at end of file diff --git a/demo/app/app.ts b/demo/app/app.ts index baa6ab8e..5238aa7f 100644 --- a/demo/app/app.ts +++ b/demo/app/app.ts @@ -1,11 +1,4 @@ import { svelteNativeNoFrame } from "@nativescript-community/svelte-native"; -import RadSideDrawerElement from "@nativescript-community/svelte-native-nativescript-ui/sidedrawer" - -RadSideDrawerElement.register(); - -//import * as trace from "@nativescript/core/trace" -//trace.enable(); -//trace.addCategories(DomTraceCategory); - import App from "./App.svelte"; -svelteNativeNoFrame(App as typeof SvelteComponent, {}); + +svelteNativeNoFrame(App, {}); diff --git a/demo/app/font-awesome.css b/demo/app/font-awesome.css deleted file mode 100644 index 526c25b2..00000000 --- a/demo/app/font-awesome.css +++ /dev/null @@ -1,16 +0,0 @@ -/* https://fontawesome.com/icons?d=gallery&m=free */ - -.far { - font-family: "Font Awesome 5 Free", "fa-regular-400"; - font-weight: 400; -} - -.fas { - font-family: "Font Awesome 5 Free", "fa-solid-900"; - font-weight: 900; -} - -.fab { - font-family: "Font Awesome 5 Brands", "fa-brands-400"; - font-weight: 400; -} diff --git a/demo/app/pages/AboutPage.svelte b/demo/app/pages/AboutPage.svelte new file mode 100644 index 00000000..91235709 --- /dev/null +++ b/demo/app/pages/AboutPage.svelte @@ -0,0 +1,63 @@ + + + + + + + +