Skip to content

Commit

Permalink
release v2.0.0-alpha.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarahm-ed committed Jul 13, 2023
2 parents 8d728aa + efe402c commit 097294c
Show file tree
Hide file tree
Showing 227 changed files with 25,205 additions and 16,499 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ packages/core/platforms/android/include.gradle
packages/core/react-android/bridge/src/main/java/com/bridge/Packages.java
packages/core/react-android/bridge/modules.json
packages/core/react-android/bridge/modulemap.json

packages/core/src/android/view-manager-types.d.ts
packages/core/src/ios/view-manager-types.d.ts
packages/core/platforms/ios/Podfile
packages/core/platforms/ios/React-Native-Podspecs.podspec
packages/core/platforms/ios/lib_community/RNPodspecs.h
Expand Down
12 changes: 12 additions & 0 deletions apps/demo/application.android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
@NativeClass()
@JavaProxy('com.tns.NativeScriptApplication')
class Application extends com.facebook.react.ReactCustomApplication {
public onCreate(): void {
super.onCreate();
}

public attachBaseContext(baseContext: android.content.Context) {
super.attachBaseContext(baseContext);
}
}
6 changes: 5 additions & 1 deletion apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
},
"devDependencies": {
"@nativescript/android": "~8.5.0",
"@nativescript/ios": "~8.4.0",
"@nativescript/ios": "~8.5.2",
"@rigor789/resolve-package-path": "1.0.5",
"metro-react-native-babel-preset": "file:../../node_modules/metro-react-native-babel-preset"
},
"scripts": {
"clean:android": "cd platforms/android && ./gradlew clean",
"clean:ios": "cd platforms/ios && rm -rf build && rm -rf DerivedData"
}
}
3 changes: 0 additions & 3 deletions apps/demo/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Application } from '@nativescript/core';
import { init } from '@open-native/core';

if (!global.performance) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Expand All @@ -15,6 +14,4 @@ if (!global.performance) {
};
}

init();

Application.run({ moduleName: 'app-root' });
12 changes: 11 additions & 1 deletion apps/demo/src/plugin-demos/core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Observable, EventData, Page } from '@nativescript/core';
import { EventData, Page } from '@nativescript/core';
import { DemoSharedOpenNative } from '@demo/shared';
// import {} from '@open-native/core';

Expand All @@ -7,4 +7,14 @@ export function navigatingTo(args: EventData) {
page.bindingContext = new DemoModel();
}

export function loadingFinish(args: EventData) {
const page = <Page>args.object;
page.bindingContext = new DemoModel();
console.log('loading');
}

export function onLoaded(data) {
console.log('loading finish called', data.nativeEvent);
}

export class DemoModel extends DemoSharedOpenNative {}
18 changes: 10 additions & 8 deletions apps/demo/src/plugin-demos/core.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:ui="./view" navigatingTo="navigatingTo" class="page">
<Page.actionBar>
<ActionBar title="React Native with NativeScript" icon="" class="action-bar">
<ActionBar title="React Native Modules" icon="" class="action-bar">
</ActionBar>
</Page.actionBar>
<StackLayout class="p-20">
<ScrollView class="h-full">
<StackLayout>
<Button text="Promise Test" tap="{{ testPromise }}" class="btn btn-primary"/>
</StackLayout>
</ScrollView>

<StackLayout>
<Button text="Test Primitives" tap="{{ testPrimitives }}" class="btn btn-primary"/>
<Button text="Test Promise" tap="{{ testPromise }}" class="btn btn-primary"/>
<Button text="Test Callback" tap="{{ testCallback }}" class="btn btn-primary"/>
<ui:ModuleTestView style="width:100%;height:200px;background-color:#f0f0f0;">
<Label text="I am a RN view with children" />
</ui:ModuleTestView>
</StackLayout>
</Page>
13 changes: 13 additions & 0 deletions apps/demo/src/plugin-demos/example.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export const Home = () => {
return (
<flex>
<webview
javaScriptEnabled={true}
source={{uri: 'https://nativescript.org'}}
style={{
backgroundColor: 'red',
}}
/>
</flex>
);
};
3 changes: 3 additions & 0 deletions apps/demo/src/plugin-demos/view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { requireNativeComponent } from 'react-native';

export const ModuleTestView = requireNativeComponent('ModuleTestView');
2 changes: 2 additions & 0 deletions apps/demo/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ module.exports = (env) => {
config.resolve.alias.set('react-native', '@open-native/core');
config.resolve.alias.set('crypto', 'crypto-js');

config.entry('application').add('./application.android');

config.module
.rule('rnmodules')
.include.add(/node_modules(.*[/\\])+react-native-auth0/)
Expand Down
23 changes: 15 additions & 8 deletions docgen.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
---
title: "Open Native"
title: 'Open Native'
logo: logo.png
#base_path: "/open-native"
docs_dir: ./docs_md
edit_root: https://github.com/OpenNative/open-native/tree/main/docs_md/
base_url: https://open-native.org

navigation:
- path: docs/installation.md
- path: docs/install-module.md
- path: docs/finding-modules.md
- path: docs/reference.md
- path: docs/troubleshooting.md
- path: installation.md
- path: install-module.md
- path: finding-modules.md
- path: reference.md
- path: troubleshooting.md

colors:
main: "#2dd4bc"
main: '#2dd4bc'

footer:
copyright: Copyright © 2023 Ammar Ahmed
File renamed without changes.
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open-native.org
1 change: 1 addition & 0 deletions docs/assets/app.f93b0a1c15e882d9.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 097294c

Please sign in to comment.