Compare commits
No commits in common. 'master' and 'refactor' have entirely different histories.
@ -0,0 +1,2 @@ |
||||
[target.wasm32-unknown-unknown] |
||||
rustflags = ['--cfg', 'getrandom_backend="wasm_js"'] |
@ -0,0 +1,25 @@ |
||||
# Logs |
||||
logs |
||||
*.log |
||||
npm-debug.log* |
||||
yarn-debug.log* |
||||
yarn-error.log* |
||||
pnpm-debug.log* |
||||
lerna-debug.log* |
||||
|
||||
node_modules |
||||
dist |
||||
dist-web |
||||
*.local |
||||
public_dev |
||||
|
||||
# Editor directories and files |
||||
.vscode/* |
||||
!.vscode/extensions.json |
||||
.idea |
||||
.DS_Store |
||||
*.suo |
||||
*.ntvs* |
||||
*.njsproj |
||||
*.sln |
||||
*.sw? |
@ -0,0 +1,7 @@ |
||||
# Package Managers |
||||
package-lock.json |
||||
pnpm-lock.yaml |
||||
yarn.lock |
||||
*.json |
||||
.prettierrc |
||||
src-tauri/gen |
@ -0,0 +1,18 @@ |
||||
{ |
||||
"useTabs": false, |
||||
"singleQuote": false, |
||||
"trailingComma": "none", |
||||
"printWidth": 100, |
||||
"tabWidth": 4, |
||||
"plugins": [ |
||||
"prettier-plugin-svelte" |
||||
], |
||||
"overrides": [ |
||||
{ |
||||
"files": "*.svelte", |
||||
"options": { |
||||
"parser": "svelte" |
||||
} |
||||
} |
||||
] |
||||
} |
@ -0,0 +1,3 @@ |
||||
{ |
||||
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"] |
||||
} |
@ -0,0 +1,147 @@ |
||||
# NextGraph apps (Linux, MacOS, Windows, Android, iOS, web) |
||||
|
||||
All the apps are based on Svelte and share the same code. |
||||
|
||||
The native apps are using the Tauri framework with an embedded WebView to render the Svelte app. |
||||
|
||||
## Install |
||||
|
||||
``` |
||||
npm install -g pnpm |
||||
pnpm install |
||||
``` |
||||
|
||||
## Recommended IDE Setup |
||||
|
||||
[VS Codium](https://vscodium.com/) + [Svelte](https://marketplace.visualstudio.com/items?itemName=svelte.svelte-vscode) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer). |
||||
|
||||
## Web |
||||
|
||||
prerequisites: compile the local JS/WASM SDK |
||||
|
||||
``` |
||||
pnpm libwasm |
||||
``` |
||||
|
||||
#### Dev |
||||
|
||||
First time: |
||||
|
||||
``` |
||||
pnpm buildfrontdev |
||||
``` |
||||
|
||||
Then run your local front-end: |
||||
|
||||
``` |
||||
pnpm webdev |
||||
// then open http://localhost:1421/ |
||||
``` |
||||
|
||||
#### Prod |
||||
|
||||
this will produce a single html file embedding all the resources. this is what ngd broker needs for production |
||||
|
||||
``` |
||||
pnpm webbuild |
||||
``` |
||||
|
||||
## Desktop |
||||
|
||||
``` |
||||
cargo install tauri-cli --version "^2.0.0" --locked |
||||
``` |
||||
|
||||
Install [all prerequisites](https://tauri.app/start/prerequisites/) for your dev platform. |
||||
|
||||
Add this line to your environment variables |
||||
|
||||
``` |
||||
export RANLIB="$NDK_HOME/toolchains/llvm/prebuilt/$(ls -1 $NDK_HOME/toolchains/llvm/prebuilt/)/bin/llvm-ranlib" |
||||
``` |
||||
|
||||
to run the dev env : |
||||
|
||||
``` |
||||
## on macos |
||||
cargo tauri dev --no-watch --target x86_64-apple-darwin |
||||
## on linux |
||||
cargo tauri dev --no-watch --target x86_64-unknown-linux-gnu |
||||
## on win |
||||
cargo tauri dev --no-watch --target x86_64-pc-windows-msvc |
||||
``` |
||||
|
||||
to build the production app installer : |
||||
|
||||
### MacOs (10.14+) |
||||
|
||||
``` |
||||
cargo tauri build |
||||
// the installer is then available in target/x86_64-apple-darwin/release/bundle/dmg/NextGraph_0.1.2_x64.dmg |
||||
// or if you just want the app, it is at target/x86_64-apple-darwin/release/bundle/macos/NextGraph.app |
||||
``` |
||||
|
||||
### Linux (Ubuntu 22.04) |
||||
|
||||
``` |
||||
cargo tauri build --target x86_64-unknown-linux-gnu |
||||
``` |
||||
|
||||
### Windows (7+) |
||||
|
||||
``` |
||||
cargo tauri build --target x86_64-pc-windows-msvc |
||||
``` |
||||
|
||||
### Android |
||||
|
||||
- [Install Android Studio](https://developer.android.com/studio) |
||||
|
||||
- add the rust targets for android |
||||
|
||||
``` |
||||
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android |
||||
``` |
||||
|
||||
- follow the steps for Android in the [Prerequisites guide of Tauri](https://tauri.app/start/prerequisites/#android) |
||||
|
||||
Before you can generate the APK, you will need to [configure Android Studio with your Signing keys.](https://tauri.app/distribute/sign/android/) |
||||
|
||||
to launch the dev app : |
||||
|
||||
``` |
||||
cargo tauri android dev |
||||
``` |
||||
|
||||
to build the production app : |
||||
|
||||
``` |
||||
cargo tauri android build |
||||
``` |
||||
|
||||
to debug the Svelte app, use Chrome : |
||||
|
||||
- [chrome://inspect/#devices](chrome://inspect/#devices) |
||||
- install the [svelte extension](https://chrome.google.com/webstore/detail/svelte-devtools/ckolcbmkjpjmangdbmnkpjigpkddpogn) |
||||
|
||||
### iOS |
||||
|
||||
Disclaimer: iOS hasn't been tested yet, for lack of suitable dev env (latest MacOS version needed). |
||||
|
||||
First, make sure Xcode is properly installed. then : |
||||
|
||||
``` |
||||
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim |
||||
``` |
||||
|
||||
to launch the dev app : |
||||
|
||||
``` |
||||
cargo tauri ios dev |
||||
``` |
||||
|
||||
to build the production app : |
||||
|
||||
``` |
||||
cargo tauri ios build |
||||
``` |
After Width: | Height: | Size: 51 KiB |
@ -0,0 +1,182 @@ |
||||
<!-- |
||||
// Copyright (c) 2022-2025 Niko Bonnieure, Par le Peuple, NextGraph.org developers |
||||
// All rights reserved. |
||||
// Licensed under the Apache License, Version 2.0 |
||||
// <LICENSE-APACHE2 or http://www.apache.org/licenses/LICENSE-2.0> |
||||
// or the MIT license <LICENSE-MIT or http://opensource.org/licenses/MIT>, |
||||
// at your option. All files in the project carrying such |
||||
// notice may not be copied, modified, or distributed except |
||||
// according to those terms. |
||||
--> |
||||
<!doctype html> |
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8" /> |
||||
<link |
||||
rel="icon" |
||||
type="image/svg+xml" |
||||
href="data:image/svg+xml;base64, |
||||
PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMjUg |
||||
MjI1Ij48Y2lyY2xlIGN4PSIxMDkuODgxIiBjeT0iMTEyLjkwNSIgcj0iMTA2Ljk4IiBzdHlsZT0i |
||||
ZmlsbDogcmdiKDI1NSwgMjU1LCAyNTUpOyBzdHJva2U6IG5vbmU7IHN0cm9rZS13aWR0aDogMC4y |
||||
NjgzNzU7Ij48L2NpcmNsZT48cGF0aCBkPSJNOTguMzQzIDE5MC4yNjFjLTE3Ljk0LTIuNzI3LTMz |
||||
LjMzMS0xMC42ODMtNDUuNzM1LTIzLjYzOC0xNC4wMDYtMTQuNjI5LTIxLjQzLTMzLjIxLTIxLjQz |
||||
LTUzLjYzNSAwLTEwLjIxOCAxLjctMTkuNDQ0IDUuMjIxLTI4LjMzMiA0LjI4Ny0xMC44MiAxMC4w |
||||
MzgtMTkuMzkgMTguNTM1LTI3LjYyMiA0LjczLTQuNTgyIDYuNjA3LTYuMTA3IDExLjI4MS05LjE2 |
||||
MyAxMS45LTcuNzggMjQuMTc0LTExLjg4IDM4LjA5Ni0xMi43MjUgMTkuODA1LTEuMjAxIDM5LjEx |
||||
MiA1LjExMyA1NC42MDMgMTcuODYgMS41MDcgMS4yNCAyLjczIDIuMzU4IDIuNzE2IDIuNDg2LS4w |
||||
MTMuMTI4LTMuODU4IDMuNjM1LTguNTQ0IDcuNzkzLTQuNjg2IDQuMTU3LTEwLjA0NyA4Ljk2Mi0x |
||||
MS45MTQgMTAuNjc3LTEuODY2IDEuNzE1LTMuNTQgMy4xMTktMy43MjEgMy4xMTktLjE4MSAwLTEu |
||||
NC0uNzQ2LTIuNzEtMS42NTYtNy41My01LjIzOS0xNS45OTQtNy44MjItMjUuNjI1LTcuODIyLTEy |
||||
LjczMiAwLTIzLjI1IDQuMzM4LTMyLjE0NCAxMy4yNTctNi4zOTYgNi40MTQtMTAuNzA0IDE0LjU1 |
||||
Ni0xMi41IDIzLjYyNC0uNjkxIDMuNDg4LS42OSAxMy41My4wMDIgMTcuMDA5IDMuNzA1IDE4LjYy |
||||
NiAxOC4zMTggMzMuMTAyIDM2LjY0MiAzNi4yOTcgNC4xNjQuNzI2IDExLjk4LjcxMiAxNS45OS0u |
||||
MDI4IDE0LjAzMi0yLjU5NCAyNS44Ni0xMS4zNjggMzIuMjY1LTIzLjkzNi43NzQtMS41MTkgMS4y |
||||
Ni0yLjg4NSAxLjA4LTMuMDM2LS4xNzgtLjE1Mi02Ljg3NC0xLjE3OC0xNC44NzctMi4yODEtOS43 |
||||
OC0xLjM0OC0xNC45MjQtMi4yMTQtMTUuNjg1LTIuNjQxLTEuNTItLjg1NC0yLjgzNi0yLjg4OC0y |
||||
LjgzNi00LjM4NiAwLTEuMTczIDIuMDI3LTE1Ljg2OSAyLjQ5LTE4LjA2LjI5OC0xLjQwMSAyLjQy |
||||
Ni0zLjQ5MyAzLjg0NC0zLjc3Ny42MjItLjEyNCA4LjgyNy44NTYgMTguMjggMi4xODQgOS40MzQg |
||||
MS4zMjUgMTcuMjYzIDIuMjk0IDE3LjM5OSAyLjE1NC4xMzYtLjE0IDEuMTE4LTYuNTQ4IDIuMTgz |
||||
LTE0LjI0IDEuMTA4LTggMi4yMDQtMTQuNjAyIDIuNTYyLTE1LjQyNi4zNDQtLjc5MyAxLjExLTEu |
||||
ODUgMS43MDMtMi4zNDggMi4wNjMtMS43MzYgMy4xNDMtMS43ODUgMTIuMjA0LS41NTMgOS42MzYg |
||||
MS4zMSAxMC43MDkgMS41NjIgMTIuMjggMi44ODUgMS42NDQgMS4zODMgMi4yNzQgMi44MSAyLjI2 |
||||
IDUuMTIzLS4wMDcgMS4xMDItLjkyMiA4LjI5Ny0yLjAzMyAxNS45ODktMS4xMTIgNy42OTEtMS45 |
||||
NzIgMTQuMDQtMS45MTIgMTQuMTA5LjA2MS4wNjggNy4xNjcgMS4xMTEgMTUuNzkyIDIuMzE4IDEx |
||||
LjEwNSAxLjU1NCAxNi4wMDggMi4zODcgMTYuODAyIDIuODU2IDEuNTMuOTA0IDIuNDggMi42NDgg |
||||
Mi40NSA0LjQ5OC0uMDQ2IDIuODQ0LTIuNDEzIDE4LjEyMy0yLjk3NSAxOS4yMS0uNjYyIDEuMjgt |
||||
Mi42MDMgMi41NDgtMy45MjEgMi41NjItLjUyLjAwNS03Ljg3NS0uOTYtMTYuMzQ0LTIuMTQ0LTgu |
||||
NDctMS4xODUtMTUuNDc2LTIuMDc3LTE1LjU3LTEuOTgzLS4wOTQuMDk0LTEuMTg4IDcuMzQxLTIu |
||||
NDMxIDE2LjEwNi0xLjQ0IDEwLjE1My0yLjQ5OCAxNi40MzYtMi45MTYgMTcuMzE2LS43MjUgMS41 |
||||
MjgtMi43NjIgMy4wNjMtNC41MzggMy40MTgtLjk1Ny4xOTEtMTAuOS0uOTI4LTEzLjU5OC0xLjUz |
||||
LS41NDgtLjEyMy0xLjg5Mi42NzItNC41MSAyLjY2NS0xMS4yNjMgOC41NzYtMjQuMzQyIDEzLjkx |
||||
LTM4LjM1NyAxNS42NDItNC40LjU0NC0xNS43MjcuNDMzLTE5Ljg1NC0uMTk1eiIgc3R5bGU9ImZp |
||||
bGw6IHJnYig3MywgMTE0LCAxNjUpOyBmaWxsLW9wYWNpdHk6IDE7IHN0cm9rZTogcmdiKDczLCAx |
||||
MTQsIDE2NSk7IHN0cm9rZS13aWR0aDogMC4zNzc5NzY7IHN0cm9rZS1vcGFjaXR5OiAxOyI+PC9w |
||||
YXRoPjwvc3ZnPg==" |
||||
/> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||
<title>NextGraph</title> |
||||
<meta property="og:title" content="NextGraph App - The New Internet Platform" /> |
||||
<meta property="og:image" content="https://nextgraph.org/card.png"/> |
||||
<meta name="twitter:image" content="https://nextgraph.org/card-twitter.png"/> |
||||
<meta name="twitter:card" content="summary_large_image" /> |
||||
<meta property="og:description" content="Decentralized, encrypted and local-first platform and framework, towards the better internet we all deserve! Features a social network, shared documents, productivity tools, an app store, and more! You can use NextGraph for free, and it works online and offline. With NextGraph you own your data and software, having your privacy respected, while enjoying high-quality apps for your daily use. Try it now! Developers can build new web3.0 local-first apps with our open source framework, based on open standards, with CRDTs, E2EE, Semantic Web, RDF, SPARQL, JSON, Markdown, Svelte, React, JavaScript, Rust, etc... ActivityPub and Solid compatible." /> |
||||
<meta name="description" content="Decentralized, encrypted and local-first platform and framework, towards the better internet we all deserve! Features a social network, shared documents, productivity tools, an app store, and more! You can use NextGraph for free, and it works online and offline. With NextGraph you own your data and software, having your privacy respected, while enjoying high-quality apps for your daily use. Try it now! Developers can build new web3.0 local-first apps with our open source framework, based on open standards, with CRDTs, E2EE, Semantic Web, RDF, SPARQL, JSON, Markdown, Svelte, React, JavaScript, Rust, etc... ActivityPub and Solid compatible."> |
||||
<link rel="stylesheet" href="/src/styles.css" /> |
||||
<style> |
||||
.splashing { |
||||
height: 100vh; |
||||
width:100%; |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
.noshow { |
||||
display: none !important; |
||||
} |
||||
.error-no-wasm-hidden { |
||||
display:none; |
||||
} |
||||
</style> |
||||
|
||||
</head> |
||||
|
||||
<body> |
||||
<div id="splash" class="splashing"> |
||||
<div style="flex-direction: column; justify-content: center; |
||||
color:#4972a5;width:100%;text-align:left; |
||||
width:300px; |
||||
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;" |
||||
> |
||||
<svg |
||||
style="width:100px;height:100px;margin: 0 auto 20px ;display:flex;" |
||||
xmlns="http://www.w3.org/2000/svg" |
||||
viewBox="0 0 225 225" |
||||
> |
||||
<g> |
||||
<circle |
||||
r="106.98013" |
||||
cy="112.90476" |
||||
cx="109.88096" |
||||
style="fill:#ffffff;stroke:none;stroke-width:0.268375" /> |
||||
<path |
||||
d="M 98.343352,190.26108 C 80.403778,187.53354 65.011938,179.57839 52.608228,166.62327 38.602093,151.99448 31.178059,133.41381 31.178059,112.98841 c 0,-10.21889 1.700058,-19.44396 5.221234,-28.332119 4.28678,-10.820699 10.037295,-19.39063 18.535095,-27.62263 4.72982,-4.58187 6.60687,-6.10643 11.28099,-9.16256 11.89869,-7.779841 24.173884,-11.879991 38.095802,-12.724761 19.80437,-1.2017 39.11165,5.11306 54.60284,17.858751 1.50718,1.24006 2.72951,2.35934 2.71628,2.48729 -0.0132,0.12795 -3.85821,3.63443 -8.54442,7.79217 -4.6862,4.157729 -10.04724,8.96276 -11.91342,10.677819 -1.86617,1.715071 -3.54094,3.11831 -3.7217,3.11831 -0.18075,0 -1.39985,-0.745188 -2.70911,-1.655969 -7.53011,-5.23834 -15.99428,-7.82188 -25.62597,-7.82188 -12.731628,0 -23.249192,4.3379 -32.143882,13.257541 -6.39594,6.413868 -10.70387,14.555268 -12.50018,23.623578 -0.69099,3.48832 -0.68968,13.53072 0.002,17.00893 3.70508,18.62577 18.31886,33.10194 36.642322,36.29729 4.16439,0.72621 11.98099,0.71223 15.98975,-0.0286 14.03187,-2.59311 25.86047,-11.36806 32.26533,-23.93578 0.77379,-1.51834 1.26018,-2.88461 1.08086,-3.03616 -0.17934,-0.15156 -6.87448,-1.1779 -14.87813,-2.28078 -9.7795,-1.34758 -14.92353,-2.21379 -15.68471,-2.64117 -1.52067,-0.85379 -2.83611,-2.88806 -2.83611,-4.3859 0,-1.1732 2.02687,-15.86876 2.49085,-18.05962 0.29676,-1.40127 2.42559,-3.4934 3.84317,-3.77691 0.62227,-0.12445 8.82712,0.85555 18.28065,2.18348 9.43343,1.32511 17.26269,2.29453 17.39833,2.15427 0.13566,-0.14026 1.11808,-6.54833 2.18313,-14.24014 1.10778,-8.000208 2.20407,-14.60184 2.56177,-15.426229 0.34392,-0.792599 1.11019,-1.849131 1.70287,-2.34782 2.06321,-1.736079 3.1433,-1.785011 12.20439,-0.55291 9.63637,1.310309 10.70873,1.56224 12.28077,2.88503 1.64359,1.382979 2.2732,2.810909 2.25906,5.123309 -0.007,1.10173 -0.92172,8.29645 -2.03332,15.98826 -1.11158,7.69182 -1.97159,14.04091 -1.91113,14.1091 0.0605,0.0682 7.16644,1.11143 15.79109,2.31832 11.10566,1.55407 16.00827,2.38757 16.80223,2.85657 1.53015,0.90389 2.48023,2.64785 2.45017,4.49756 -0.0462,2.84349 -2.41252,18.12279 -2.97521,19.21089 -0.66164,1.27949 -2.60244,2.54696 -3.92109,2.56074 -0.51973,0.005 -7.87449,-0.95937 -16.34391,-2.144 -8.46944,-1.18464 -15.47588,-2.077 -15.56986,-1.98301 -0.094,0.094 -1.18792,7.34163 -2.43097,16.10589 -1.44004,10.15311 -2.49792,16.43621 -2.91556,17.31631 -0.72531,1.52848 -2.76261,3.06291 -4.53817,3.41802 -0.95688,0.19138 -10.90014,-0.92798 -13.59859,-1.53084 -0.5471,-0.12223 -1.89146,0.67252 -4.50941,2.66588 -11.2627,8.57562 -24.34195,13.90917 -38.35741,15.64164 -4.40038,0.54395 -15.72658,0.43298 -19.853658,-0.19451 z" |
||||
style="fill:#4972a5;fill-opacity:1;stroke:#4972a5;stroke-width:0.377976;stroke-opacity:1" /> |
||||
</g> |
||||
</svg> |
||||
|
||||
<div class="noshow" style="text-align:center;" id="app-loading"> Loading ...</div> |
||||
|
||||
<div id="error-no-wasm" style="padding-left:15px;" class="error-no-wasm-hidden"> |
||||
Your browser is too old or is miss-configured. |
||||
Please try one of those options:<br/><br/> |
||||
- Upgrade to a newer version of this browser.<br/> |
||||
- Try with another browser software.<br/> |
||||
- <a href="https://nextgraph.org/download">install our native apps for |
||||
Linux, macOS, Windows desktops and laptops, |
||||
and iOS, Android mobiles.</a><br/><br/> |
||||
If you are using jshelter or another javascript protection mechanism, |
||||
please deactivate it as we need access to the WebWorker, JIT and WASM |
||||
features of your browser. If those features are disabled, please |
||||
enable them for this website. |
||||
</div> |
||||
<noscript style="display:grid;padding-left:15px;"> |
||||
NextGraph cannot load as Javascript is currently deactivated. |
||||
You can use the CLI ngcli to access your documents in the terminal. |
||||
Or use the <a href="https://nextgraph.org/download">native apps |
||||
for Linux, macOS, Windows, Android, iOS.</a><br/> |
||||
Or setup an SSR static website generator with AtomicServer for javascript-less and |
||||
read-only access. |
||||
</noscript> |
||||
</div> |
||||
</div> |
||||
<script> |
||||
const supported = () => { |
||||
if (RegExp().hasIndices === undefined) { |
||||
console.error("no RegExp().hasIndices"); |
||||
return false; |
||||
} |
||||
try { |
||||
if (Worker === undefined) { |
||||
console.error("no Worker"); |
||||
return false; |
||||
} |
||||
new Worker(URL.createObjectURL(new Blob([';'], {type: 'application/javascript'}))); |
||||
if (typeof WebAssembly === "object" |
||||
&& typeof WebAssembly.instantiate === "function") { |
||||
const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00)); |
||||
if (module instanceof WebAssembly.Module) |
||||
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance; |
||||
else { |
||||
console.log("no WebAssembly module"); |
||||
} |
||||
} |
||||
|
||||
} catch (e) { |
||||
console.error(e); |
||||
return false; |
||||
} |
||||
console.error("no WebAssembly"); |
||||
return false; |
||||
}; |
||||
if (check_supported && !supported()) { |
||||
window.document.getElementById("error-no-wasm").className=""; |
||||
} else { |
||||
window.document.getElementById("app-loading").className=""; |
||||
window.everything_ready = () => { |
||||
window.document.getElementById("splash").className="noshow"; |
||||
window.document.getElementById("app").className=""; |
||||
}; |
||||
window.onload = () => { |
||||
window.ng_supported = true; |
||||
console.log("window loaded"); |
||||
if (window.ng_spa_loaded) { |
||||
everything_ready(); |
||||
} |
||||
}; |
||||
} |
||||
</script> |
||||
<div id="app" class="noshow"></div> |
||||
<!-- # INSERT SCRIPT HERE --> |
||||
</body> |
||||
</html> |
@ -0,0 +1,327 @@ |
||||
{ |
||||
"name": "nextgraph", |
||||
"version": "0.1.0", |
||||
"lockfileVersion": 3, |
||||
"requires": true, |
||||
"packages": { |
||||
"": { |
||||
"name": "nextgraph", |
||||
"version": "0.1.0", |
||||
"dependencies": { |
||||
"@tailwindcss/vite": "^4.1.14", |
||||
"@tauri-apps/api": "^2", |
||||
"@tauri-apps/plugin-opener": "^2" |
||||
}, |
||||
"devDependencies": { |
||||
"@tauri-apps/cli": "^2.8.4", |
||||
"tailwindcss": "^4.1.14", |
||||
"typescript": "~5.6.2", |
||||
"vite": "^7.1.7" |
||||
} |
||||
}, |
||||
"../../node_modules/.pnpm/@tailwindcss+vite@4.1.14_vite@7.1.10_@types+node@24.3.0_jiti@2.6.1_lightningcss@1.30.1_yaml@2.8.1_/node_modules/@tailwindcss/vite": { |
||||
"version": "4.1.14", |
||||
"license": "MIT", |
||||
"dependencies": { |
||||
"@tailwindcss/node": "4.1.14", |
||||
"@tailwindcss/oxide": "4.1.14", |
||||
"tailwindcss": "4.1.14" |
||||
}, |
||||
"devDependencies": { |
||||
"@types/node": "^20.19.0", |
||||
"vite": "^7.0.0" |
||||
}, |
||||
"peerDependencies": { |
||||
"vite": "^5.2.0 || ^6 || ^7" |
||||
} |
||||
}, |
||||
"../../node_modules/.pnpm/@tauri-apps+api@2.8.0/node_modules/@tauri-apps/api": { |
||||
"version": "2.8.0", |
||||
"license": "Apache-2.0 OR MIT", |
||||
"devDependencies": { |
||||
"@eslint/js": "^9.29.0", |
||||
"@rollup/plugin-terser": "0.4.4", |
||||
"@rollup/plugin-typescript": "12.1.4", |
||||
"@types/eslint": "^9.6.1", |
||||
"@types/node": "^22.15.32", |
||||
"eslint": "^9.29.0", |
||||
"eslint-config-prettier": "10.1.8", |
||||
"eslint-plugin-security": "3.0.1", |
||||
"fast-glob": "3.3.3", |
||||
"globals": "^16.2.0", |
||||
"rollup": "4.46.3", |
||||
"tslib": "^2.8.1", |
||||
"typescript": "^5.8.3", |
||||
"typescript-eslint": "^8.34.1" |
||||
}, |
||||
"funding": { |
||||
"type": "opencollective", |
||||
"url": "https://opencollective.com/tauri" |
||||
} |
||||
}, |
||||
"../../node_modules/.pnpm/@tauri-apps+cli@2.8.4/node_modules/@tauri-apps/cli": { |
||||
"version": "2.8.4", |
||||
"dev": true, |
||||
"license": "Apache-2.0 OR MIT", |
||||
"bin": { |
||||
"tauri": "tauri.js" |
||||
}, |
||||
"devDependencies": { |
||||
"@napi-rs/cli": "^3.0.0", |
||||
"@types/node": "^22.15.32", |
||||
"cross-env": "10.0.0", |
||||
"vitest": "^3.2.4" |
||||
}, |
||||
"engines": { |
||||
"node": ">= 10" |
||||
}, |
||||
"funding": { |
||||
"type": "opencollective", |
||||
"url": "https://opencollective.com/tauri" |
||||
}, |
||||
"optionalDependencies": { |
||||
"@tauri-apps/cli-darwin-arm64": "2.8.4", |
||||
"@tauri-apps/cli-darwin-x64": "2.8.4", |
||||
"@tauri-apps/cli-linux-arm-gnueabihf": "2.8.4", |
||||
"@tauri-apps/cli-linux-arm64-gnu": "2.8.4", |
||||
"@tauri-apps/cli-linux-arm64-musl": "2.8.4", |
||||
"@tauri-apps/cli-linux-riscv64-gnu": "2.8.4", |
||||
"@tauri-apps/cli-linux-x64-gnu": "2.8.4", |
||||
"@tauri-apps/cli-linux-x64-musl": "2.8.4", |
||||
"@tauri-apps/cli-win32-arm64-msvc": "2.8.4", |
||||
"@tauri-apps/cli-win32-ia32-msvc": "2.8.4", |
||||
"@tauri-apps/cli-win32-x64-msvc": "2.8.4" |
||||
} |
||||
}, |
||||
"../../node_modules/.pnpm/@tauri-apps+plugin-opener@2.5.0/node_modules/@tauri-apps/plugin-opener": { |
||||
"version": "2.5.0", |
||||
"license": "MIT OR Apache-2.0", |
||||
"dependencies": { |
||||
"@tauri-apps/api": "^2.8.0" |
||||
} |
||||
}, |
||||
"../../node_modules/.pnpm/typescript@5.6.3/node_modules/typescript": { |
||||
"version": "5.6.3", |
||||
"dev": true, |
||||
"license": "Apache-2.0", |
||||
"bin": { |
||||
"tsc": "bin/tsc", |
||||
"tsserver": "bin/tsserver" |
||||
}, |
||||
"devDependencies": { |
||||
"@dprint/formatter": "^0.4.1", |
||||
"@dprint/typescript": "0.91.6", |
||||
"@esfx/canceltoken": "^1.0.0", |
||||
"@eslint/js": "^9.9.0", |
||||
"@octokit/rest": "^21.0.1", |
||||
"@types/chai": "^4.3.17", |
||||
"@types/diff": "^5.2.1", |
||||
"@types/minimist": "^1.2.5", |
||||
"@types/mocha": "^10.0.7", |
||||
"@types/ms": "^0.7.34", |
||||
"@types/node": "latest", |
||||
"@types/source-map-support": "^0.5.10", |
||||
"@types/which": "^3.0.4", |
||||
"@typescript-eslint/rule-tester": "^8.1.0", |
||||
"@typescript-eslint/type-utils": "^8.1.0", |
||||
"@typescript-eslint/utils": "^8.1.0", |
||||
"azure-devops-node-api": "^14.0.2", |
||||
"c8": "^10.1.2", |
||||
"chai": "^4.5.0", |
||||
"chalk": "^4.1.2", |
||||
"chokidar": "^3.6.0", |
||||
"diff": "^5.2.0", |
||||
"dprint": "^0.47.2", |
||||
"esbuild": "^0.23.0", |
||||
"eslint": "^9.9.0", |
||||
"eslint-formatter-autolinkable-stylish": "^1.4.0", |
||||
"eslint-plugin-regexp": "^2.6.0", |
||||
"fast-xml-parser": "^4.4.1", |
||||
"glob": "^10.4.5", |
||||
"globals": "^15.9.0", |
||||
"hereby": "^1.9.0", |
||||
"jsonc-parser": "^3.3.1", |
||||
"knip": "^5.27.2", |
||||
"minimist": "^1.2.8", |
||||
"mocha": "^10.7.3", |
||||
"mocha-fivemat-progress-reporter": "^0.1.0", |
||||
"monocart-coverage-reports": "^2.10.2", |
||||
"ms": "^2.1.3", |
||||
"node-fetch": "^3.3.2", |
||||
"playwright": "^1.46.0", |
||||
"source-map-support": "^0.5.21", |
||||
"tslib": "^2.6.3", |
||||
"typescript": "^5.5.4", |
||||
"typescript-eslint": "^8.1.0", |
||||
"which": "^3.0.1" |
||||
}, |
||||
"engines": { |
||||
"node": ">=14.17" |
||||
} |
||||
}, |
||||
"../../node_modules/.pnpm/vite@7.1.10_@types+node@24.3.0_jiti@2.6.1_lightningcss@1.30.1_yaml@2.8.1/node_modules/vite": { |
||||
"version": "7.1.10", |
||||
"dev": true, |
||||
"license": "MIT", |
||||
"dependencies": { |
||||
"esbuild": "^0.25.0", |
||||
"fdir": "^6.5.0", |
||||
"picomatch": "^4.0.3", |
||||
"postcss": "^8.5.6", |
||||
"rollup": "^4.43.0", |
||||
"tinyglobby": "^0.2.15" |
||||
}, |
||||
"bin": { |
||||
"vite": "bin/vite.js" |
||||
}, |
||||
"devDependencies": { |
||||
"@babel/parser": "^7.28.4", |
||||
"@jridgewell/remapping": "^2.3.5", |
||||
"@jridgewell/trace-mapping": "^0.3.31", |
||||
"@oxc-project/types": "0.90.0", |
||||
"@polka/compression": "^1.0.0-next.25", |
||||
"@rolldown/pluginutils": "^1.0.0-beta.43", |
||||
"@rollup/plugin-alias": "^5.1.1", |
||||
"@rollup/plugin-commonjs": "^28.0.6", |
||||
"@rollup/plugin-dynamic-import-vars": "2.1.4", |
||||
"@rollup/pluginutils": "^5.3.0", |
||||
"@types/escape-html": "^1.0.4", |
||||
"@types/pnpapi": "^0.0.5", |
||||
"artichokie": "^0.4.2", |
||||
"baseline-browser-mapping": "^2.8.16", |
||||
"cac": "^6.7.14", |
||||
"chokidar": "^3.6.0", |
||||
"connect": "^3.7.0", |
||||
"convert-source-map": "^2.0.0", |
||||
"cors": "^2.8.5", |
||||
"cross-spawn": "^7.0.6", |
||||
"debug": "^4.4.3", |
||||
"dep-types": "link:./src/types", |
||||
"dotenv": "^17.2.3", |
||||
"dotenv-expand": "^12.0.3", |
||||
"es-module-lexer": "^1.7.0", |
||||
"escape-html": "^1.0.3", |
||||
"estree-walker": "^3.0.3", |
||||
"etag": "^1.8.1", |
||||
"host-validation-middleware": "^0.1.2", |
||||
"http-proxy-3": "^1.22.0", |
||||
"launch-editor-middleware": "^2.11.1", |
||||
"lightningcss": "^1.30.2", |
||||
"magic-string": "^0.30.19", |
||||
"mlly": "^1.8.0", |
||||
"mrmime": "^2.0.1", |
||||
"nanoid": "^5.1.6", |
||||
"open": "^10.2.0", |
||||
"parse5": "^8.0.0", |
||||
"pathe": "^2.0.3", |
||||
"periscopic": "^4.0.2", |
||||
"picocolors": "^1.1.1", |
||||
"postcss-import": "^16.1.1", |
||||
"postcss-load-config": "^6.0.1", |
||||
"postcss-modules": "^6.0.1", |
||||
"premove": "^4.0.0", |
||||
"resolve.exports": "^2.0.3", |
||||
"rolldown": "^1.0.0-beta.43", |
||||
"rolldown-plugin-dts": "^0.16.11", |
||||
"rollup-plugin-license": "^3.6.0", |
||||
"sass": "^1.93.2", |
||||
"sass-embedded": "^1.93.2", |
||||
"sirv": "^3.0.2", |
||||
"strip-literal": "^3.1.0", |
||||
"terser": "^5.44.0", |
||||
"tsconfck": "^3.1.6", |
||||
"types": "link:./types", |
||||
"ufo": "^1.6.1", |
||||
"ws": "^8.18.3" |
||||
}, |
||||
"engines": { |
||||
"node": "^20.19.0 || >=22.12.0" |
||||
}, |
||||
"funding": { |
||||
"url": "https://github.com/vitejs/vite?sponsor=1" |
||||
}, |
||||
"optionalDependencies": { |
||||
"fsevents": "~2.3.3" |
||||
}, |
||||
"peerDependencies": { |
||||
"@types/node": "^20.19.0 || >=22.12.0", |
||||
"jiti": ">=1.21.0", |
||||
"less": "^4.0.0", |
||||
"lightningcss": "^1.21.0", |
||||
"sass": "^1.70.0", |
||||
"sass-embedded": "^1.70.0", |
||||
"stylus": ">=0.54.8", |
||||
"sugarss": "^5.0.0", |
||||
"terser": "^5.16.0", |
||||
"tsx": "^4.8.1", |
||||
"yaml": "^2.4.2" |
||||
}, |
||||
"peerDependenciesMeta": { |
||||
"@types/node": { |
||||
"optional": true |
||||
}, |
||||
"jiti": { |
||||
"optional": true |
||||
}, |
||||
"less": { |
||||
"optional": true |
||||
}, |
||||
"lightningcss": { |
||||
"optional": true |
||||
}, |
||||
"sass": { |
||||
"optional": true |
||||
}, |
||||
"sass-embedded": { |
||||
"optional": true |
||||
}, |
||||
"stylus": { |
||||
"optional": true |
||||
}, |
||||
"sugarss": { |
||||
"optional": true |
||||
}, |
||||
"terser": { |
||||
"optional": true |
||||
}, |
||||
"tsx": { |
||||
"optional": true |
||||
}, |
||||
"yaml": { |
||||
"optional": true |
||||
} |
||||
} |
||||
}, |
||||
"node_modules/@tailwindcss/vite": { |
||||
"resolved": "../../node_modules/.pnpm/@tailwindcss+vite@4.1.14_vite@7.1.10_@types+node@24.3.0_jiti@2.6.1_lightningcss@1.30.1_yaml@2.8.1_/node_modules/@tailwindcss/vite", |
||||
"link": true |
||||
}, |
||||
"node_modules/@tauri-apps/api": { |
||||
"resolved": "../../node_modules/.pnpm/@tauri-apps+api@2.8.0/node_modules/@tauri-apps/api", |
||||
"link": true |
||||
}, |
||||
"node_modules/@tauri-apps/cli": { |
||||
"resolved": "../../node_modules/.pnpm/@tauri-apps+cli@2.8.4/node_modules/@tauri-apps/cli", |
||||
"link": true |
||||
}, |
||||
"node_modules/@tauri-apps/plugin-opener": { |
||||
"resolved": "../../node_modules/.pnpm/@tauri-apps+plugin-opener@2.5.0/node_modules/@tauri-apps/plugin-opener", |
||||
"link": true |
||||
}, |
||||
"node_modules/tailwindcss": { |
||||
"version": "4.1.14", |
||||
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.14.tgz", |
||||
"integrity": "sha512-b7pCxjGO98LnxVkKjaZSDeNuljC4ueKUddjENJOADtubtdo8llTaJy7HwBMeLNSSo2N5QIAgklslK1+Ir8r6CA==", |
||||
"dev": true, |
||||
"license": "MIT" |
||||
}, |
||||
"node_modules/typescript": { |
||||
"resolved": "../../node_modules/.pnpm/typescript@5.6.3/node_modules/typescript", |
||||
"link": true |
||||
}, |
||||
"node_modules/vite": { |
||||
"resolved": "../../node_modules/.pnpm/vite@7.1.10_@types+node@24.3.0_jiti@2.6.1_lightningcss@1.30.1_yaml@2.8.1/node_modules/vite", |
||||
"link": true |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,48 @@ |
||||
{ |
||||
"name": "@ng-org/ng-app", |
||||
"private": true, |
||||
"version": "0.1.2", |
||||
"type": "module", |
||||
"scripts": { |
||||
"dev": "vite", |
||||
"build": "vite build", |
||||
"preview": "vite preview", |
||||
"tauri": "tauri", |
||||
"format": "prettier --write .", |
||||
"check": "svelte-check --tsconfig ./tsconfig.json", |
||||
"webdev": "cross-env NG_ENV_WEB=1 TAURI_DEBUG=1 NG_PUBLIC_DEV=1 vite", |
||||
"webbuild": "cross-env NG_ENV_WEB=1 NG_ENV_ONEFILE=1 vite build && node prepare-web-file.cjs", |
||||
"libwasm": "cd ../.. && cargo install cargo-run-script && cargo run-script libwasm && cd app/nextgraph", |
||||
"buildfrontdev": "pnpm -C ../../infra/ngnet/bootstrap builddev && pnpm -C ../../infra/ngnet/auth builddev && pnpm -C ../../infra/ngnet/redir builddev" |
||||
}, |
||||
"dependencies": { |
||||
"@ark-ui/svelte": "^5.11.0", |
||||
"@dvcol/svelte-simple-router": "^2.7.2", |
||||
"@ng-org/lib-wasm": "workspace:*", |
||||
"@ng-org/ui-common": "workspace:*", |
||||
"@tauri-apps/api": "^2", |
||||
"@tauri-apps/plugin-opener": "^2", |
||||
"async-proxy": "^0.4.1" |
||||
}, |
||||
"devDependencies": { |
||||
"@hazycora/vite-plugin-svelte-svg": "^2.4.3", |
||||
"@sveltejs/vite-plugin-svelte": "^6.2.1", |
||||
"@tailwindcss/typography": "^0.5.19", |
||||
"@tailwindcss/vite": "^4.1.14", |
||||
"@tauri-apps/cli": "^2.8.4", |
||||
"@tsconfig/svelte": "^5.0.5", |
||||
"cross-env": "^10.1.0", |
||||
"daisyui": "^5.3.1", |
||||
"node-gzip": "^1.1.2", |
||||
"prettier": "^3.6.2", |
||||
"prettier-plugin-svelte": "^3.4.0", |
||||
"svelte": "^5.39.13", |
||||
"svelte-check": "^4.3.3", |
||||
"tailwindcss": "^4.1.14", |
||||
"typescript": "~5.6.2", |
||||
"vite": "^7.1.7", |
||||
"vite-plugin-singlefile": "^2.3.0", |
||||
"vite-plugin-top-level-await": "^1.6.0", |
||||
"vite-plugin-wasm": "^3.5.0" |
||||
} |
||||
} |
@ -0,0 +1,32 @@ |
||||
const crypto = require('crypto'); |
||||
const fs = require('fs'); |
||||
const {gzip, } = require('node-gzip'); |
||||
|
||||
var algorithm = 'sha256' |
||||
, shasum = crypto.createHash(algorithm) |
||||
|
||||
const sha_file = './dist-web/index.sha256'; |
||||
const gzip_file = './dist-web/index.gzip'; |
||||
var filename = './dist-web/index.html' |
||||
, s = fs.ReadStream(filename) |
||||
|
||||
var bufs = []; |
||||
s.on('data', function(data) { |
||||
shasum.update(data) |
||||
bufs.push(data); |
||||
}) |
||||
|
||||
s.on('end', function() { |
||||
var hash = shasum.digest('hex') |
||||
console.log(hash + ' ' + filename) |
||||
|
||||
fs.writeFileSync(sha_file, hash, 'utf8'); |
||||
|
||||
var buf = Buffer.concat(bufs); |
||||
gzip(buf).then((compressed) => {fs.writeFileSync(gzip_file, compressed);}); |
||||
|
||||
fs.rm(filename,()=>{}); |
||||
|
||||
}) |
||||
|
||||
|
@ -0,0 +1,7 @@ |
||||
# Generated by Cargo |
||||
# will have compiled files and executables |
||||
/target/ |
||||
|
||||
# Generated by Tauri |
||||
# will have schema files for capabilities auto-completion |
||||
/gen/schemas |
@ -0,0 +1,44 @@ |
||||
[package] |
||||
name = "NextGraph" |
||||
# version = "0.1.0" |
||||
description = "NextGraph App" |
||||
publish = false |
||||
version.workspace = true |
||||
edition.workspace = true |
||||
license.workspace = true |
||||
authors.workspace = true |
||||
repository.workspace = true |
||||
homepage.workspace = true |
||||
keywords.workspace = true |
||||
documentation.workspace = true |
||||
rust-version.workspace = true |
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html |
||||
|
||||
[lib] |
||||
# The `_lib` suffix may seem redundant but it is necessary |
||||
# to make the lib name unique and wouldn't conflict with the bin name. |
||||
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 |
||||
name = "nextgraph_lib" |
||||
crate-type = ["staticlib", "cdylib", "rlib"] |
||||
|
||||
[build-dependencies] |
||||
tauri-build = { version = "2", features = [] } |
||||
|
||||
[dependencies] |
||||
tauri = { version = "2", features = ["unstable"] } |
||||
tauri-plugin-opener = "2" |
||||
serde = { version = "1", features = ["derive"] } |
||||
serde_json = "1" |
||||
serde_bare = "0.5.0" |
||||
serde_bytes = "0.11.7" |
||||
tauri-plugin-barcode-scanner = "2" |
||||
ng-repo = { path = "../../../engine/repo" } |
||||
ng-net = { path = "../../../engine/net" } |
||||
ng-wallet = { path = "../../../engine/wallet" } |
||||
nextgraph = { path = "../../../sdk/rust" } |
||||
oxrdf = { git = "https://git.nextgraph.org/NextGraph/oxigraph.git", branch="main", features = ["rdf-star", "oxsdatatypes"] } |
||||
async-std = { version = "1.12.0", features = ["attributes", "unstable"] } |
||||
sys-locale = { version = "0.3.1" } |
||||
zeroize = { version = "1.7.0", features = ["zeroize_derive"] } |
||||
ng-async-tungstenite = { git = "https://git.nextgraph.org/NextGraph/async-tungstenite.git", branch = "nextgraph", features = ["async-std-runtime", "async-native-tls"] } |
@ -0,0 +1,10 @@ |
||||
{ |
||||
"$schema": "../gen/schemas/desktop-schema.json", |
||||
"identifier": "default", |
||||
"description": "Capability for the main window", |
||||
"windows": ["main"], |
||||
"permissions": [ |
||||
"core:default", |
||||
"opener:default" |
||||
] |
||||
} |
@ -0,0 +1,6 @@ |
||||
/src/main/java/org/nextgraph/app/generated |
||||
/src/main/jniLibs/**/*.so |
||||
/src/main/assets/tauri.conf.json |
||||
/tauri.build.gradle.kts |
||||
/proguard-tauri.pro |
||||
/tauri.properties |
@ -0,0 +1,70 @@ |
||||
import java.util.Properties |
||||
|
||||
plugins { |
||||
id("com.android.application") |
||||
id("org.jetbrains.kotlin.android") |
||||
id("rust") |
||||
} |
||||
|
||||
val tauriProperties = Properties().apply { |
||||
val propFile = file("tauri.properties") |
||||
if (propFile.exists()) { |
||||
propFile.inputStream().use { load(it) } |
||||
} |
||||
} |
||||
|
||||
android { |
||||
compileSdk = 36 |
||||
namespace = "org.nextgraph.app" |
||||
defaultConfig { |
||||
manifestPlaceholders["usesCleartextTraffic"] = "false" |
||||
applicationId = "org.nextgraph.app" |
||||
minSdk = 24 |
||||
targetSdk = 36 |
||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt() |
||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0") |
||||
} |
||||
buildTypes { |
||||
getByName("debug") { |
||||
manifestPlaceholders["usesCleartextTraffic"] = "true" |
||||
isDebuggable = true |
||||
isJniDebuggable = true |
||||
isMinifyEnabled = false |
||||
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so") |
||||
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so") |
||||
jniLibs.keepDebugSymbols.add("*/x86/*.so") |
||||
jniLibs.keepDebugSymbols.add("*/x86_64/*.so") |
||||
} |
||||
} |
||||
getByName("release") { |
||||
isMinifyEnabled = true |
||||
proguardFiles( |
||||
*fileTree(".") { include("**/*.pro") } |
||||
.plus(getDefaultProguardFile("proguard-android-optimize.txt")) |
||||
.toList().toTypedArray() |
||||
) |
||||
} |
||||
} |
||||
kotlinOptions { |
||||
jvmTarget = "1.8" |
||||
} |
||||
buildFeatures { |
||||
buildConfig = true |
||||
} |
||||
} |
||||
|
||||
rust { |
||||
rootDirRel = "../../../" |
||||
} |
||||
|
||||
dependencies { |
||||
implementation("androidx.webkit:webkit:1.14.0") |
||||
implementation("androidx.appcompat:appcompat:1.7.1") |
||||
implementation("androidx.activity:activity-ktx:1.10.1") |
||||
implementation("com.google.android.material:material:1.12.0") |
||||
testImplementation("junit:junit:4.13.2") |
||||
androidTestImplementation("androidx.test.ext:junit:1.1.4") |
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0") |
||||
} |
||||
|
||||
apply(from = "tauri.build.gradle.kts") |
@ -0,0 +1,21 @@ |
||||
# Add project specific ProGuard rules here. |
||||
# You can control the set of applied configuration files using the |
||||
# proguardFiles setting in build.gradle. |
||||
# |
||||
# For more details, see |
||||
# http://developer.android.com/guide/developing/tools/proguard.html |
||||
|
||||
# If your project uses WebView with JS, uncomment the following |
||||
# and specify the fully qualified class name to the JavaScript interface |
||||
# class: |
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { |
||||
# public *; |
||||
#} |
||||
|
||||
# Uncomment this to preserve the line number information for |
||||
# debugging stack traces. |
||||
#-keepattributes SourceFile,LineNumberTable |
||||
|
||||
# If you keep the line number information, uncomment this to |
||||
# hide the original source file name. |
||||
#-renamesourcefileattribute SourceFile |
@ -0,0 +1,38 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<uses-permission android:name="android.permission.INTERNET" /> |
||||
<uses-feature android:name="android.hardware.camera" android:required="false" /> |
||||
<!-- AndroidTV support --> |
||||
<uses-feature android:name="android.software.leanback" android:required="false" /> |
||||
|
||||
<application |
||||
android:icon="@mipmap/ic_launcher" |
||||
android:roundIcon="@mipmap/ic_launcher_round" |
||||
android:label="@string/app_name" |
||||
android:theme="@style/Theme.next_graph" |
||||
android:usesCleartextTraffic="${usesCleartextTraffic}"> |
||||
<activity |
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" |
||||
android:launchMode="singleTask" |
||||
android:label="@string/main_activity_title" |
||||
android:name=".MainActivity" |
||||
android:exported="true"> |
||||
<intent-filter> |
||||
<action android:name="android.intent.action.MAIN" /> |
||||
<category android:name="android.intent.category.LAUNCHER" /> |
||||
<!-- AndroidTV support --> |
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" /> |
||||
</intent-filter> |
||||
</activity> |
||||
|
||||
<provider |
||||
android:name="androidx.core.content.FileProvider" |
||||
android:authorities="${applicationId}.fileprovider" |
||||
android:exported="false" |
||||
android:grantUriPermissions="true"> |
||||
<meta-data |
||||
android:name="android.support.FILE_PROVIDER_PATHS" |
||||
android:resource="@xml/file_paths" /> |
||||
</provider> |
||||
</application> |
||||
</manifest> |
After Width: | Height: | Size: 23 KiB |
@ -0,0 +1,11 @@ |
||||
package org.nextgraph.app |
||||
|
||||
import android.os.Bundle |
||||
import androidx.activity.enableEdgeToEdge |
||||
|
||||
class MainActivity : TauriActivity() { |
||||
override fun onCreate(savedInstanceState: Bundle?) { |
||||
enableEdgeToEdge() |
||||
super.onCreate(savedInstanceState) |
||||
} |
||||
} |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<background android:drawable="@color/ic_launcher_background"/> |
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/> |
||||
</adaptive-icon> |
@ -0,0 +1,5 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> |
||||
<background android:drawable="@color/ic_launcher_background"/> |
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/> |
||||
</adaptive-icon> |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 8.8 KiB |
@ -0,0 +1,18 @@ |
||||
<resources xmlns:tools="http://schemas.android.com/tools"> |
||||
<!-- Base application theme. --> |
||||
<style name="Theme.next_graph" parent="Theme.MaterialComponents.DayNight.NoActionBar"> |
||||
<!-- Primary brand color. --> |
||||
<item name="colorPrimary">@color/blue_600</item> |
||||
<item name="colorPrimaryVariant">@color/blue_700</item> |
||||
<item name="colorOnPrimary">@color/black</item> |
||||
<!-- Secondary brand color. --> |
||||
<item name="colorSecondary">@color/teal_200</item> |
||||
<item name="colorSecondaryVariant">@color/teal_200</item> |
||||
<item name="colorOnSecondary">@color/black</item> |
||||
<!-- Status bar color. --> |
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> |
||||
<!-- Customize your theme here. --> |
||||
<item name="android:windowNoTitle">true</item> |
||||
<item name="android:windowActionBar">false</item> |
||||
</style> |
||||
</resources> |
@ -0,0 +1,4 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<resources> |
||||
<color name="ic_launcher_background">#FFFFFF</color> |
||||
</resources> |
@ -0,0 +1,18 @@ |
||||
<resources xmlns:tools="http://schemas.android.com/tools"> |
||||
<!-- Base application theme. --> |
||||
<style name="Theme.next_graph" parent="Theme.MaterialComponents.DayNight.NoActionBar"> |
||||
<!-- Primary brand color. --> |
||||
<item name="colorPrimary">@color/blue_600</item> |
||||
<item name="colorPrimaryVariant">@color/blue_700</item> |
||||
<item name="colorOnPrimary">@color/white</item> |
||||
<!-- Secondary brand color. --> |
||||
<item name="colorSecondary">@color/teal_200</item> |
||||
<item name="colorSecondaryVariant">@color/teal_700</item> |
||||
<item name="colorOnSecondary">@color/black</item> |
||||
<!-- Status bar color. --> |
||||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> |
||||
<!-- Customize your theme here. --> |
||||
<item name="android:windowNoTitle">true</item> |
||||
<item name="android:windowActionBar">false</item> |
||||
</style> |
||||
</resources> |
@ -0,0 +1,22 @@ |
||||
buildscript { |
||||
repositories { |
||||
google() |
||||
mavenCentral() |
||||
} |
||||
dependencies { |
||||
classpath("com.android.tools.build:gradle:8.11.0") |
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25") |
||||
} |
||||
} |
||||
|
||||
allprojects { |
||||
repositories { |
||||
google() |
||||
mavenCentral() |
||||
} |
||||
} |
||||
|
||||
tasks.register("clean").configure { |
||||
delete("build") |
||||
} |
||||
|
@ -0,0 +1,23 @@ |
||||
plugins { |
||||
`kotlin-dsl` |
||||
} |
||||
|
||||
gradlePlugin { |
||||
plugins { |
||||
create("pluginsForCoolKids") { |
||||
id = "rust" |
||||
implementationClass = "RustPlugin" |
||||
} |
||||
} |
||||
} |
||||
|
||||
repositories { |
||||
google() |
||||
mavenCentral() |
||||
} |
||||
|
||||
dependencies { |
||||
compileOnly(gradleApi()) |
||||
implementation("com.android.tools.build:gradle:8.11.0") |
||||
} |
||||
|
@ -0,0 +1,52 @@ |
||||
import java.io.File |
||||
import org.apache.tools.ant.taskdefs.condition.Os |
||||
import org.gradle.api.DefaultTask |
||||
import org.gradle.api.GradleException |
||||
import org.gradle.api.logging.LogLevel |
||||
import org.gradle.api.tasks.Input |
||||
import org.gradle.api.tasks.TaskAction |
||||
|
||||
open class BuildTask : DefaultTask() { |
||||
@Input |
||||
var rootDirRel: String? = null |
||||
@Input |
||||
var target: String? = null |
||||
@Input |
||||
var release: Boolean? = null |
||||
|
||||
@TaskAction |
||||
fun assemble() { |
||||
val executable = """pnpm"""; |
||||
try { |
||||
runTauriCli(executable) |
||||
} catch (e: Exception) { |
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) { |
||||
runTauriCli("$executable.cmd") |
||||
} else { |
||||
throw e; |
||||
} |
||||
} |
||||
} |
||||
|
||||
fun runTauriCli(executable: String) { |
||||
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null") |
||||
val target = target ?: throw GradleException("target cannot be null") |
||||
val release = release ?: throw GradleException("release cannot be null") |
||||
val args = listOf("tauri", "android", "android-studio-script"); |
||||
|
||||
project.exec { |
||||
workingDir(File(project.projectDir, rootDirRel)) |
||||
executable(executable) |
||||
args(args) |
||||
if (project.logger.isEnabled(LogLevel.DEBUG)) { |
||||
args("-vv") |
||||
} else if (project.logger.isEnabled(LogLevel.INFO)) { |
||||
args("-v") |
||||
} |
||||
if (release) { |
||||
args("--release") |
||||
} |
||||
args(listOf("--target", target)) |
||||
}.assertNormalExitValue() |
||||
} |
||||
} |
@ -0,0 +1,24 @@ |
||||
# Project-wide Gradle settings. |
||||
# IDE (e.g. Android Studio) users: |
||||
# Gradle settings configured through the IDE *will override* |
||||
# any settings specified in this file. |
||||
# For more details on how to configure your build environment visit |
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html |
||||
# Specifies the JVM arguments used for the daemon process. |
||||
# The setting is particularly useful for tweaking memory settings. |
||||
org.gradle.jvmargs=-Xmx4608m -Dfile.encoding=UTF-8 |
||||
# When configured, Gradle will run in incubating parallel mode. |
||||
# This option should only be used with decoupled projects. More details, visit |
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects |
||||
# org.gradle.parallel=true |
||||
# AndroidX package structure to make it clearer which packages are bundled with the |
||||
# Android operating system, and which are packaged with your app"s APK |
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn |
||||
android.useAndroidX=true |
||||
# Kotlin code style for this project: "official" or "obsolete": |
||||
kotlin.code.style=official |
||||
# Enables namespacing of each library's R class so that its R class includes only the |
||||
# resources declared in the library itself and none from the library's dependencies, |
||||
# thereby reducing the size of the R class for that library |
||||
android.nonTransitiveRClass=true |
||||
android.nonFinalResIds=false |
@ -0,0 +1,6 @@ |
||||
#Tue May 10 19:22:52 CST 2022 |
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip |
||||
distributionPath=wrapper/dists |
||||
zipStorePath=wrapper/dists |
||||
zipStoreBase=GRADLE_USER_HOME |
@ -0,0 +1,89 @@ |
||||
@rem |
||||
@rem Copyright 2015 the original author or authors. |
||||
@rem |
||||
@rem Licensed under the Apache License, Version 2.0 (the "License"); |
||||
@rem you may not use this file except in compliance with the License. |
||||
@rem You may obtain a copy of the License at |
||||
@rem |
||||
@rem https://www.apache.org/licenses/LICENSE-2.0 |
||||
@rem |
||||
@rem Unless required by applicable law or agreed to in writing, software |
||||
@rem distributed under the License is distributed on an "AS IS" BASIS, |
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
@rem See the License for the specific language governing permissions and |
||||
@rem limitations under the License. |
||||
@rem |
||||
|
||||
@if "%DEBUG%" == "" @echo off |
||||
@rem ########################################################################## |
||||
@rem |
||||
@rem Gradle startup script for Windows |
||||
@rem |
||||
@rem ########################################################################## |
||||
|
||||
@rem Set local scope for the variables with windows NT shell |
||||
if "%OS%"=="Windows_NT" setlocal |
||||
|
||||
set DIRNAME=%~dp0 |
||||
if "%DIRNAME%" == "" set DIRNAME=. |
||||
set APP_BASE_NAME=%~n0 |
||||
set APP_HOME=%DIRNAME% |
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter. |
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi |
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. |
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" |
||||
|
||||
@rem Find java.exe |
||||
if defined JAVA_HOME goto findJavaFromJavaHome |
||||
|
||||
set JAVA_EXE=java.exe |
||||
%JAVA_EXE% -version >NUL 2>&1 |
||||
if "%ERRORLEVEL%" == "0" goto execute |
||||
|
||||
echo. |
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. |
||||
echo. |
||||
echo Please set the JAVA_HOME variable in your environment to match the |
||||
echo location of your Java installation. |
||||
|
||||
goto fail |
||||
|
||||
:findJavaFromJavaHome |
||||
set JAVA_HOME=%JAVA_HOME:"=% |
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe |
||||
|
||||
if exist "%JAVA_EXE%" goto execute |
||||
|
||||
echo. |
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% |
||||
echo. |
||||
echo Please set the JAVA_HOME variable in your environment to match the |
||||
echo location of your Java installation. |
||||
|
||||
goto fail |
||||
|
||||
:execute |
||||
@rem Setup the command line |
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar |
||||
|
||||
|
||||
@rem Execute Gradle |
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* |
||||
|
||||
:end |
||||
@rem End local scope for the variables with windows NT shell |
||||
if "%ERRORLEVEL%"=="0" goto mainEnd |
||||
|
||||
:fail |
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of |
||||
rem the _cmd.exe /c_ return code! |
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 |
||||
exit /b 1 |
||||
|
||||
:mainEnd |
||||
if "%OS%"=="Windows_NT" endlocal |
||||
|
||||
:omega |
After Width: | Height: | Size: 8.6 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 10 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 921 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 6.3 KiB |
After Width: | Height: | Size: 9.7 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 8.9 KiB |
@ -0,0 +1,6 @@ |
||||
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] |
||||
|
||||
fn main() { |
||||
nextgraph_lib::AppBuilder::new().run(); |
||||
} |