mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-08-31 11:08:47 +02:00
Compare commits
35 Commits
3.0.23-and
...
fix/intl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f545216dc3 | ||
|
|
989de21e44 | ||
|
|
2c051f9d21 | ||
|
|
4845d40c0b | ||
|
|
b4615fa9aa | ||
|
|
f24ff63c06 | ||
|
|
7518e6badc | ||
|
|
0fcbdbcdc3 | ||
|
|
999856311f | ||
|
|
98f4e08c62 | ||
|
|
f3140cbd8f | ||
|
|
029cadedc4 | ||
|
|
6cdeb48e56 | ||
|
|
2c8abc4d00 | ||
|
|
04820f6500 | ||
|
|
fc6a843a1a | ||
|
|
129dad06c2 | ||
|
|
063b387807 | ||
|
|
e0058fe30b | ||
|
|
a3c297636e | ||
|
|
afc534806d | ||
|
|
4456cc2184 | ||
|
|
2610db90d2 | ||
|
|
f16c9804ee | ||
|
|
7a3a1aa9c2 | ||
|
|
57d0904bee | ||
|
|
5ca6f98c6c | ||
|
|
dbe32e8af6 | ||
|
|
e0758bf353 | ||
|
|
3c1b5d1ee8 | ||
|
|
074008ac67 | ||
|
|
7c56a6beb3 | ||
|
|
3e9d7a70d0 | ||
|
|
e2ca1a0df6 | ||
|
|
392456a0d9 |
38
.github/workflows/android.e2e.yml
vendored
38
.github/workflows/android.e2e.yml
vendored
@@ -1,3 +1,4 @@
|
||||
|
||||
name: e2e-android
|
||||
on: workflow_dispatch
|
||||
|
||||
@@ -18,7 +19,7 @@ jobs:
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
|
||||
- name: Free Disk Space
|
||||
- name: Free Disk Space
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
@@ -26,7 +27,7 @@ jobs:
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
|
||||
- name: Install node modules
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
@@ -45,20 +46,38 @@ jobs:
|
||||
architecture: "x64"
|
||||
|
||||
- name: Install Detox CLI
|
||||
run: npm install detox-cli --global
|
||||
run: npm install detox-cli --global
|
||||
|
||||
- name: Generate debug.keystore
|
||||
working-directory: apps/mobile/native/android/app
|
||||
run: |
|
||||
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
|
||||
|
||||
- name: Detox build
|
||||
run: |
|
||||
yarn build:android
|
||||
ls apps/mobile/native/android/app/build/outputs/apk
|
||||
ls apps/mobile/native/android/app/build/outputs/apk/release
|
||||
|
||||
- name: Free Disk Space
|
||||
uses: jlumbroso/free-disk-space@main
|
||||
with:
|
||||
tool-cache: false
|
||||
android: false
|
||||
|
||||
- name: Free Disk Space After Build
|
||||
run: |
|
||||
echo "Disk space before cleanup:"
|
||||
df -h
|
||||
sudo rm -rf /usr/local/lib/android/sdk/ndk
|
||||
sudo apt-get clean
|
||||
echo "Disk space after cleanup:"
|
||||
df -h
|
||||
|
||||
- name: Get device name
|
||||
id: device
|
||||
run: |
|
||||
AVD_NAME=$(node -p "require('./apps/mobile/native/.detoxrc.js').devices.emulator.device.avdName")
|
||||
echo "AVD_NAME=$AVD_NAME" >> $GITHUB_OUTPUT
|
||||
|
||||
|
||||
- name: AVD cache
|
||||
uses: actions/cache@v4
|
||||
id: avd-cache
|
||||
@@ -89,12 +108,13 @@ jobs:
|
||||
disable-animations: true
|
||||
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
|
||||
force-avd-creation: false
|
||||
script: yarn test:android --headless --record-logs failing --record-videos failing --take-screenshots failing
|
||||
|
||||
script: |
|
||||
yarn test:android --headless --record-logs failing --record-videos failing --take-screenshots failing --artifacts-location apps/mobile/native/artifacts
|
||||
|
||||
- name: Upload artifacts
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: detox-artifacts
|
||||
path: artifacts
|
||||
path: apps/mobile/native/artifacts
|
||||
retention-days: 14
|
||||
|
||||
2
.github/workflows/core.tests.yml
vendored
2
.github/workflows/core.tests.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
46
.github/workflows/desktop.publish.yml
vendored
46
.github/workflows/desktop.publish.yml
vendored
@@ -40,7 +40,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
@@ -84,26 +84,6 @@ jobs:
|
||||
files: ./notesnook_build_v${{ steps.app_metadata.outputs.app_version }}.zip
|
||||
prerelease: ${{ endsWith(steps.app_metadata.outputs.app_version, '-beta') }}
|
||||
|
||||
- name: Generate flatpak sources
|
||||
if: inputs.publish-github && inputs.build-linux
|
||||
run: |
|
||||
sudo apt-get install -y flatpak flatpak-builder pipx
|
||||
git clone https://github.com/flatpak/flatpak-builder-tools.git /tmp/flatpak-builder-tools
|
||||
cd /tmp/flatpak-builder-tools/node
|
||||
pipx install .
|
||||
cd -
|
||||
node scripts/generate-sources.mjs
|
||||
|
||||
- name: Upload flatpak sources
|
||||
uses: softprops/action-gh-release@v1
|
||||
if: inputs.publish-github && inputs.build-linux
|
||||
with:
|
||||
draft: true
|
||||
name: Notesnook Desktop v${{ steps.app_metadata.outputs.app_version }}
|
||||
tag_name: v${{ steps.app_metadata.outputs.app_version }}
|
||||
files: ./generated-sources.json
|
||||
prerelease: ${{ endsWith(steps.app_metadata.outputs.app_version, '-beta') }}
|
||||
|
||||
build-macos:
|
||||
name: Build for macOS
|
||||
needs: build
|
||||
@@ -112,7 +92,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
@@ -156,12 +136,6 @@ jobs:
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Install sqlite-better-trigram for all arch
|
||||
run: |
|
||||
npm i --cpu arm64 sqlite-better-trigram
|
||||
npm i --cpu x64 sqlite-better-trigram
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Install provisioning profile
|
||||
run: echo "${{ secrets.MAC_PROVISIONING_PROFILE }}" | base64 --decode > embedded.provisionprofile
|
||||
working-directory: ./apps/desktop
|
||||
@@ -214,7 +188,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
@@ -238,12 +212,6 @@ jobs:
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Install sqlite-better-trigram for all arch
|
||||
run: |
|
||||
npm i --cpu arm64 sqlite-better-trigram
|
||||
npm i --cpu x64 sqlite-better-trigram
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build Electron wrapper
|
||||
run: npx nx run release --project @notesnook/desktop
|
||||
working-directory: ./apps/desktop
|
||||
@@ -279,7 +247,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup .NET Core SDK
|
||||
uses: actions/setup-dotnet@v2
|
||||
@@ -304,12 +272,6 @@ jobs:
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Install sqlite-better-trigram for all arch
|
||||
run: |
|
||||
npm i --cpu arm64 sqlite-better-trigram
|
||||
npm i --cpu x64 sqlite-better-trigram
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build
|
||||
run: npx nx run release --project @notesnook/desktop
|
||||
|
||||
|
||||
233
.github/workflows/desktop.tests.yml
vendored
233
.github/workflows/desktop.tests.yml
vendored
@@ -1,233 +0,0 @@
|
||||
name: Test @notesnook/desktop
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths:
|
||||
- "app/desktop/**"
|
||||
# re-run workflow if workflow file changes
|
||||
- ".github/workflows/desktop.tests.yml"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=web
|
||||
|
||||
- name: Setup environment
|
||||
run: |
|
||||
echo "NX_CLOUD_ACCESS_TOKEN=${{ secrets.NX_CLOUD_ACCESS_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Generate desktop build
|
||||
run: npx nx build:desktop @notesnook/web
|
||||
|
||||
- name: Archive build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: apps/web/build/**/*
|
||||
|
||||
test-macos-x64:
|
||||
name: Test macOS x64
|
||||
needs: build
|
||||
runs-on: macos-13
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Download build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: ./apps/web/build
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Build Electron wrapper
|
||||
run: npx nx run release --project @notesnook/desktop
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
yarn electron-builder --mac --dir --x64
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Run tests x64
|
||||
run: |
|
||||
EXECUTABLE_PATH=output/mac/Notesnook.app/Contents/MacOS/Notesnook npm run test
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-results-macos-x64
|
||||
path: apps/desktop/test-results
|
||||
retention-days: 5
|
||||
|
||||
test-macos:
|
||||
name: Test macOS
|
||||
needs: build
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Download build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: ./apps/web/build
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Build Electron wrapper
|
||||
run: npx nx run release --project @notesnook/desktop
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
yarn electron-builder --mac --dir --arm64
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Run tests arm64
|
||||
run: |
|
||||
EXECUTABLE_PATH=output/mac-arm64/Notesnook.app/Contents/MacOS/Notesnook npm run test
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-results-macos
|
||||
path: apps/desktop/test-results
|
||||
retention-days: 5
|
||||
|
||||
test-linux:
|
||||
name: Test for Linux
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Download build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: ./apps/web/build
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Install sqlite-better-trigram for all arch
|
||||
run: |
|
||||
npm i --cpu arm64 sqlite-better-trigram
|
||||
npm i --cpu x64 sqlite-better-trigram
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build Electron wrapper
|
||||
run: npx nx run release --project @notesnook/desktop
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
yarn electron-builder --linux --dir --arm64 --x64
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
EXECUTABLE_PATH=output/linux-unpacked/notesnook xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24" -- npm run test
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-results-linux
|
||||
path: apps/desktop/test-results
|
||||
retention-days: 5
|
||||
|
||||
test-windows:
|
||||
name: Test for Windows
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Download build
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build
|
||||
path: ./apps/web/build
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=desktop
|
||||
|
||||
- name: Install sqlite-better-trigram for all arch
|
||||
run: |
|
||||
npm i --cpu arm64 sqlite-better-trigram
|
||||
npm i --cpu x64 sqlite-better-trigram
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build Electron wrapper
|
||||
run: npx nx run release --project @notesnook/desktop
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
npx cross-env NOTESNOOK_STAGING=true yarn electron-builder --win --dir --arm64 --x64
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
npx cross-env EXECUTABLE_PATH=output/win-unpacked/Notesnook.exe npm run test
|
||||
working-directory: ./apps/desktop
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-results-win
|
||||
path: apps/desktop/test-results
|
||||
retention-days: 5
|
||||
2
.github/workflows/editor.tests.yml
vendored
2
.github/workflows/editor.tests.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
4
.github/workflows/help.publish.yml
vendored
4
.github/workflows/help.publish.yml
vendored
@@ -1,6 +1,6 @@
|
||||
name: Publish Notesnook Help
|
||||
|
||||
on:
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
2
.github/workflows/ios.publish.yml
vendored
2
.github/workflows/ios.publish.yml
vendored
@@ -4,7 +4,7 @@ on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-13
|
||||
timeout-minutes: 60
|
||||
|
||||
steps:
|
||||
|
||||
2
.github/workflows/theme-builder.publish.yml
vendored
2
.github/workflows/theme-builder.publish.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
2
.github/workflows/vericrypt.publish.yml
vendored
2
.github/workflows/vericrypt.publish.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
44
.github/workflows/web.benchmarks.yml
vendored
44
.github/workflows/web.benchmarks.yml
vendored
@@ -1,44 +0,0 @@
|
||||
name: Benchmark @notesnook/web
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
paths:
|
||||
- "apps/web/**"
|
||||
# re-run workflow if workflow file changes
|
||||
- ".github/workflows/web.benchmarks.yml"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
bench:
|
||||
name: Bench
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
npm ci --ignore-scripts --prefer-offline --no-audit
|
||||
npm run bootstrap -- --scope=web
|
||||
|
||||
- name: Setup environment
|
||||
run: |
|
||||
echo "NX_CLOUD_ACCESS_TOKEN=${{ secrets.NX_CLOUD_ACCESS_TOKEN }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: npm run build:web
|
||||
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install chromium --with-deps
|
||||
working-directory: apps/web
|
||||
|
||||
- name: Run benchmarks
|
||||
id: benchmark
|
||||
run: node __bench__/app.bench.mjs
|
||||
working-directory: apps/web
|
||||
2
.github/workflows/web.publish.yml
vendored
2
.github/workflows/web.publish.yml
vendored
@@ -8,7 +8,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
|
||||
4
.github/workflows/web.tests.yml
vendored
4
.github/workflows/web.tests.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node
|
||||
uses: ./.github/actions/setup-node-with-cache
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download build
|
||||
uses: actions/download-artifact@v4
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
This file is part of the Notesnook project (https://notesnook.com/)
|
||||
|
||||
Copyright (C) 2023 Streetwriters (Private) Limited
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import test from "node:test";
|
||||
import { launchApp } from "./utils.mjs";
|
||||
import assert from "assert";
|
||||
import slugify from "slugify";
|
||||
import path from "path";
|
||||
import { mkdir } from "fs/promises";
|
||||
|
||||
test("make sure app loads", async (t) => {
|
||||
const { app, page } = await launchApp();
|
||||
try {
|
||||
await page.waitForSelector("#authForm");
|
||||
|
||||
assert.ok(
|
||||
await page.getByRole("button", { name: "Create account" }).isVisible()
|
||||
);
|
||||
|
||||
await page
|
||||
.getByRole("button", { name: "Skip & go directly to the app" })
|
||||
.click();
|
||||
|
||||
await page.waitForSelector(".ProseMirror");
|
||||
} catch (e) {
|
||||
await mkdir("test-results", { recursive: true });
|
||||
await page.screenshot({
|
||||
path: path.join(
|
||||
"test-results",
|
||||
`${slugify(t.name)}-${process.platform}-${process.arch}-error.png`
|
||||
)
|
||||
});
|
||||
throw e;
|
||||
} finally {
|
||||
await app.close();
|
||||
}
|
||||
});
|
||||
2187
apps/desktop/package-lock.json
generated
2187
apps/desktop/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -2,22 +2,21 @@
|
||||
"name": "@notesnook/desktop",
|
||||
"productName": "Notesnook",
|
||||
"description": "Your private note taking space",
|
||||
"version": "3.0.22",
|
||||
"version": "3.0.18",
|
||||
"appAppleId": "1544027013",
|
||||
"private": true,
|
||||
"main": "./dist/cjs/index.js",
|
||||
"module": "./dist/esm/index.js",
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"require": {
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"default": "./dist/cjs/index.js"
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.js"
|
||||
},
|
||||
"import": {
|
||||
"types": "./dist/types/index.d.ts",
|
||||
"default": "./dist/esm/index.js"
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -29,11 +28,10 @@
|
||||
"@notesnook/intl": "file:../../packages/intl",
|
||||
"@trpc/client": "10.45.2",
|
||||
"@trpc/server": "10.45.2",
|
||||
"better-sqlite3-multiple-ciphers": "11.5.0",
|
||||
"better-sqlite3-multiple-ciphers": "11.2.1",
|
||||
"electron-trpc": "0.6.1",
|
||||
"electron-updater": "^6.3.4",
|
||||
"icojs": "^0.19.4",
|
||||
"sqlite-better-trigram": "^0.0.2",
|
||||
"typed-emitter": "^2.1.0",
|
||||
"yargs": "^17.7.2",
|
||||
"zod": "^3.23.8"
|
||||
@@ -43,17 +41,14 @@
|
||||
"@types/node": "22.7.0",
|
||||
"@types/yargs": "^17.0.33",
|
||||
"chokidar": "^4.0.1",
|
||||
"electron": "^31.7.4",
|
||||
"electron-builder": "^25.1.8",
|
||||
"electron": "^30.5.1",
|
||||
"electron-builder": "^25.1.7",
|
||||
"esbuild": "^0.24.0",
|
||||
"node-abi": "^3.68.0",
|
||||
"node-gyp-build": "^4.8.2",
|
||||
"playwright": "^1.48.2",
|
||||
"prebuildify": "^6.0.1",
|
||||
"slugify": "^1.6.6",
|
||||
"tree-kill": "^1.2.2",
|
||||
"undici": "^6.19.8",
|
||||
"vitest": "^2.1.5"
|
||||
"undici": "^6.19.8"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"dmg-license": "^1.0.11"
|
||||
@@ -62,11 +57,10 @@
|
||||
"start": "node scripts/dev.mjs",
|
||||
"staging": "node scripts/build.mjs --run",
|
||||
"release": "node scripts/build.mjs",
|
||||
"build": "node ../../scripts/build.mjs",
|
||||
"build": "tsup-node src/index.ts",
|
||||
"bundle": "esbuild electron=./src/main.ts ./src/preload.ts --external:electron --external:fsevents --external:better-sqlite3-multiple-ciphers --external:sodium-native --minify --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=false --define:RELEASE=true",
|
||||
"bundle:mas": "esbuild electron=./src/main.ts ./src/preload.ts --minify --external:electron --external:fsevents --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=true --define:RELEASE=true",
|
||||
"postinstall": "patch-package",
|
||||
"test": "node --test --test-timeout 30000 --test-force-exit"
|
||||
"postinstall": "patch-package"
|
||||
},
|
||||
"author": {
|
||||
"name": "Streetwriters (Private) Limited",
|
||||
@@ -95,20 +89,7 @@
|
||||
"node_modules/file-uri-to-path",
|
||||
"node_modules/bindings",
|
||||
"node_modules/node-gyp-build",
|
||||
"node_modules/sqlite-better-trigram",
|
||||
"node_modules/sodium-native/prebuilds/${platform}-${arch}",
|
||||
{
|
||||
"from": "node_modules/sqlite-better-trigram-linux-${arch}",
|
||||
"to": "node_modules/sqlite-better-trigram-linux-${arch}"
|
||||
},
|
||||
{
|
||||
"from": "node_modules/sqlite-better-trigram-darwin-${arch}",
|
||||
"to": "node_modules/sqlite-better-trigram-darwin-${arch}"
|
||||
},
|
||||
{
|
||||
"from": "node_modules/sqlite-better-trigram-windows-${arch}",
|
||||
"to": "node_modules/sqlite-better-trigram-windows-${arch}"
|
||||
},
|
||||
"node_modules/sodium-native/index.js",
|
||||
"node_modules/sodium-native/package.json"
|
||||
],
|
||||
@@ -181,12 +162,10 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"signtoolOptions": {
|
||||
"signingHashAlgorithms": [
|
||||
"sha256"
|
||||
],
|
||||
"sign": "./scripts/sign.js"
|
||||
},
|
||||
"signingHashAlgorithms": [
|
||||
"sha256"
|
||||
],
|
||||
"sign": "./scripts/sign.js",
|
||||
"icon": "assets/icons/app.ico"
|
||||
},
|
||||
"portable": {
|
||||
|
||||
@@ -94,7 +94,7 @@ async function patchBetterSQLite3() {
|
||||
);
|
||||
const json = JSON.parse(await readFile(jsonPath, "utf-8"));
|
||||
|
||||
json.version = "11.5.1";
|
||||
json.version = "11.2.2";
|
||||
json.homepage = "https://github.com/thecodrr/better-sqlite3-multiple-ciphers";
|
||||
json.repository.url =
|
||||
"git://github.com/thecodrr/better-sqlite3-multiple-ciphers.git";
|
||||
|
||||
@@ -36,8 +36,6 @@ const ENV = {
|
||||
FORCE_COLOR: "false",
|
||||
COLOR: "0"
|
||||
};
|
||||
process.chdir(path.join(__dirname, ".."));
|
||||
|
||||
await onChange(true);
|
||||
|
||||
console.log("Watching...");
|
||||
@@ -55,8 +53,6 @@ async function onChange(first) {
|
||||
if (first) {
|
||||
await fs.rm("./build/", { force: true, recursive: true });
|
||||
|
||||
await exec("npm rebuild electron --verbose --foreground-scripts");
|
||||
|
||||
await exec("yarn electron-builder install-app-deps");
|
||||
}
|
||||
|
||||
|
||||
@@ -46,8 +46,6 @@ export class SQLite {
|
||||
this.sqlite = require("better-sqlite3-multiple-ciphers")(
|
||||
filePath
|
||||
).unsafeMode(true);
|
||||
const betterTrigram = require("sqlite-better-trigram");
|
||||
betterTrigram.load(this.sqlite);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import { NativeImage, nativeImage } from "electron";
|
||||
import path from "path";
|
||||
import { isDevelopment } from "./index";
|
||||
// @ts-expect-error stupid icojs
|
||||
import { ParsedImage, parseICO } from "icojs";
|
||||
import { getSystemTheme } from "./theme";
|
||||
import { readFile } from "fs/promises";
|
||||
|
||||
@@ -57,8 +57,7 @@ function getSystemTheme() {
|
||||
nativeTheme.themeSource = oldThemeSource;
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
listeners.forEach((a) => nativeTheme.addListener("updated", () => a())),
|
||||
() => listeners.forEach((a) => nativeTheme.addListener("updated", a)),
|
||||
1000
|
||||
);
|
||||
return currentTheme;
|
||||
@@ -73,8 +72,7 @@ function changeTheme(theme: Theme) {
|
||||
nativeTheme.themeSource = theme;
|
||||
|
||||
setTimeout(
|
||||
() =>
|
||||
listeners.forEach((a) => nativeTheme.addListener("updated", () => a())),
|
||||
() => listeners.forEach((a) => nativeTheme.addListener("updated", a)),
|
||||
1000
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/",
|
||||
"lib": ["ESNext"],
|
||||
"moduleResolution": "Bundler"
|
||||
"moduleResolution": "nodenext",
|
||||
"module": "nodenext"
|
||||
},
|
||||
"include": ["src", "global.d.ts"]
|
||||
}
|
||||
|
||||
@@ -54,10 +54,10 @@ export async function setupDatabase(password) {
|
||||
storage: Storage,
|
||||
eventsource: Platform.OS === "ios" ? EventSource : AndroidEventSource,
|
||||
fs: filesystem,
|
||||
compressor: () => ({
|
||||
compressor: {
|
||||
compress: Gzip.deflate,
|
||||
decompress: Gzip.inflate
|
||||
}),
|
||||
},
|
||||
batchSize: 100,
|
||||
sqliteOptions: {
|
||||
dialect: (name) => ({
|
||||
|
||||
@@ -224,13 +224,6 @@ export default async function downloadAttachment(
|
||||
}
|
||||
|
||||
try {
|
||||
useAttachmentStore.getState().setDownloading({
|
||||
groupId: options.groupId || attachment.hash,
|
||||
current: 0,
|
||||
total: 1,
|
||||
filename: attachment.filename
|
||||
});
|
||||
|
||||
await db
|
||||
.fs()
|
||||
.downloadFile(
|
||||
@@ -238,15 +231,6 @@ export default async function downloadAttachment(
|
||||
attachment.hash,
|
||||
attachment.chunkSize
|
||||
);
|
||||
|
||||
useAttachmentStore.getState().setDownloading({
|
||||
groupId: options.groupId || attachment.hash,
|
||||
current: 1,
|
||||
total: 1,
|
||||
filename: attachment.filename,
|
||||
success: true
|
||||
});
|
||||
|
||||
if (!(await exists(attachment.hash))) {
|
||||
DatabaseLogger.log("Attachment does not exist after download.");
|
||||
return;
|
||||
@@ -260,7 +244,7 @@ export default async function downloadAttachment(
|
||||
);
|
||||
}
|
||||
|
||||
let filename = await getFileNameWithExtension(
|
||||
let filename = getFileNameWithExtension(
|
||||
attachment.filename,
|
||||
attachment.mimeType
|
||||
);
|
||||
@@ -317,14 +301,6 @@ export default async function downloadAttachment(
|
||||
.unlink(RNFetchBlob.fs.dirs.CacheDir + `/${attachment.hash}_dcache`)
|
||||
.catch(console.log);
|
||||
}
|
||||
|
||||
useAttachmentStore.getState().setDownloading({
|
||||
groupId: options.groupId || attachment.hash,
|
||||
current: 0,
|
||||
total: 0,
|
||||
filename: attachment.filename,
|
||||
success: false
|
||||
});
|
||||
DatabaseLogger.error(e);
|
||||
useAttachmentStore.getState().remove(attachment.hash);
|
||||
if (options.throwError) {
|
||||
|
||||
@@ -63,11 +63,9 @@ const Actions = ({
|
||||
attachment,
|
||||
close,
|
||||
setAttachments,
|
||||
fwdRef,
|
||||
context
|
||||
fwdRef
|
||||
}: {
|
||||
attachment: Attachment;
|
||||
context: string;
|
||||
setAttachments: (attachments?: VirtualizedGrouping<Attachment>) => void;
|
||||
close?: () => void;
|
||||
fwdRef: RefObject<ActionSheetRef>;
|
||||
@@ -81,6 +79,7 @@ const Actions = ({
|
||||
const [loading, setLoading] = useState<{
|
||||
name?: string;
|
||||
}>({});
|
||||
|
||||
const actions = [
|
||||
{
|
||||
name: strings.network.download(),
|
||||
@@ -89,7 +88,7 @@ const Actions = ({
|
||||
await db.fs().cancel(attachment.hash);
|
||||
useAttachmentStore.getState().remove(attachment.hash);
|
||||
}
|
||||
downloadAttachment(attachment.hash, context === "global");
|
||||
downloadAttachment(attachment.hash, false);
|
||||
fwdRef.current?.hide();
|
||||
},
|
||||
icon: "download"
|
||||
@@ -376,7 +375,6 @@ Actions.present = (
|
||||
setAttachments={set}
|
||||
close={close}
|
||||
attachment={attachment}
|
||||
context={context || "global"}
|
||||
/>
|
||||
)
|
||||
});
|
||||
|
||||
@@ -31,7 +31,6 @@ import { ProgressCircleComponent } from "../ui/svg/lazy";
|
||||
import Paragraph from "../ui/typography/paragraph";
|
||||
import Actions from "./actions";
|
||||
import { strings } from "@notesnook/intl";
|
||||
import { Pressable } from "../ui/pressable";
|
||||
|
||||
function getFileExtension(filename: string) {
|
||||
const ext = /^.+\.([^.]+)$/.exec(filename);
|
||||
@@ -70,7 +69,8 @@ export const AttachmentItem = ({
|
||||
};
|
||||
|
||||
return errorOnly && attachment && !attachment?.failed ? null : (
|
||||
<Pressable
|
||||
<TouchableOpacity
|
||||
activeOpacity={0.9}
|
||||
onPress={onPress}
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
@@ -186,6 +186,6 @@ export const AttachmentItem = ({
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
</Pressable>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -206,7 +206,7 @@ export const AttachmentDialog = ({
|
||||
errorOnly={currentFilter === "errors"}
|
||||
attachments={attachments}
|
||||
id={index}
|
||||
context={!isSheet ? "global" : "attachments-list"}
|
||||
context="global"
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@@ -162,7 +162,7 @@ const TwoFactorVerification = ({ onMfaLogin, mfaInfo, onCancel }) => {
|
||||
textAlign: "center"
|
||||
}}
|
||||
>
|
||||
{strings["2faCodeHelpText"][currentMethod.method]?.() ||
|
||||
{strings["2faCodeHelpText"][currentMethod.method]() ||
|
||||
strings.select2faCodeHelpText()}
|
||||
</Paragraph>
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
View
|
||||
} from "react-native";
|
||||
import { Image as ImageType } from "react-native-image-crop-picker";
|
||||
import { useThemeColors } from "@notesnook/theme";
|
||||
import { useThemeColors } from "../../../../../../packages/theme/dist";
|
||||
import { presentSheet } from "../../../services/event-manager";
|
||||
import { SIZE } from "../../../utils/size";
|
||||
import { Button } from "../../ui/button";
|
||||
|
||||
@@ -188,7 +188,7 @@ const PDFPreview = () => {
|
||||
}}
|
||||
color={colors.static.white}
|
||||
>
|
||||
{strings.loadingWithProgress(progress?.percent)}
|
||||
{strings.loadingWithProgress(progress.percent)}
|
||||
</Paragraph>
|
||||
</Animated.View>
|
||||
) : (
|
||||
|
||||
@@ -164,7 +164,7 @@ export default function Progress() {
|
||||
/>
|
||||
</View>
|
||||
|
||||
{!data?.canHideProgress ? null : (
|
||||
{data?.canHideProgress ? null : (
|
||||
<Button
|
||||
title={cancelCallback.current ? "Cancel" : "Hide"}
|
||||
type="secondaryAccented"
|
||||
|
||||
@@ -19,8 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import React, { useRef } from "react";
|
||||
import { Platform, StyleSheet, View } from "react-native";
|
||||
//@ts-ignore
|
||||
import { useThemeColors } from "@notesnook/theme";
|
||||
import { Menu } from "react-native-material-menu";
|
||||
import Menu from "react-native-reanimated-material-menu";
|
||||
import { notesnook } from "../../../e2e/test.ids";
|
||||
import {
|
||||
HeaderRightButton,
|
||||
@@ -96,16 +97,14 @@ export const RightMenus = ({
|
||||
style={{
|
||||
borderRadius: 5,
|
||||
backgroundColor: contextMenuColors.primary.background,
|
||||
marginTop: 35
|
||||
marginTop: -40
|
||||
}}
|
||||
onRequestClose={() => {
|
||||
//@ts-ignore
|
||||
menuRef.current?.hide();
|
||||
}}
|
||||
anchor={
|
||||
<IconButton
|
||||
onPress={() => {
|
||||
//@ts-ignore
|
||||
menuRef.current?.show();
|
||||
}}
|
||||
name="dots-vertical"
|
||||
@@ -117,10 +116,9 @@ export const RightMenus = ({
|
||||
{headerRightButtons.map((item) => (
|
||||
<Button
|
||||
style={{
|
||||
width: 150,
|
||||
justifyContent: "flex-start",
|
||||
borderRadius: 0,
|
||||
alignSelf: "flex-start",
|
||||
width: "100%"
|
||||
borderRadius: 0
|
||||
}}
|
||||
type="plain"
|
||||
buttonType={{
|
||||
@@ -129,7 +127,6 @@ export const RightMenus = ({
|
||||
key={item.title}
|
||||
title={item.title}
|
||||
onPress={async () => {
|
||||
//@ts-ignore
|
||||
menuRef.current?.hide();
|
||||
if (Platform.OS === "ios") await sleep(300);
|
||||
item.onPress();
|
||||
|
||||
@@ -83,7 +83,7 @@ const Intro = ({ navigation }) => {
|
||||
>
|
||||
{item.headings?.map((heading) => (
|
||||
<Heading
|
||||
key={heading()}
|
||||
key={heading}
|
||||
style={{
|
||||
marginBottom: 5
|
||||
}}
|
||||
|
||||
@@ -81,8 +81,7 @@ const ReminderItem = React.memo(
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
flexWrap: "wrap",
|
||||
marginTop: 5
|
||||
flexWrap: "wrap"
|
||||
}}
|
||||
>
|
||||
{item.disabled ? (
|
||||
@@ -150,8 +149,10 @@ const ReminderItem = React.memo(
|
||||
fontSize={SIZE.xs}
|
||||
style={{
|
||||
justifyContent: "flex-start",
|
||||
height: 25,
|
||||
alignSelf: "flex-start"
|
||||
borderWidth: 0,
|
||||
height: 30,
|
||||
alignSelf: "flex-start",
|
||||
marginTop: 5
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
|
||||
@@ -70,7 +70,6 @@ const SelectionWrapper = ({
|
||||
}
|
||||
|
||||
const onLongPress = () => {
|
||||
if (isSheet) return;
|
||||
if (useSelectionStore.getState().selectionMode !== item.type) {
|
||||
useSelectionStore.getState().setSelectionMode(item.type);
|
||||
}
|
||||
@@ -79,7 +78,7 @@ const SelectionWrapper = ({
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
customColor={isSheet ? colors.secondary.background : "transparent"}
|
||||
customColor={isSheet ? colors.primary.hover : "transparent"}
|
||||
testID={testID}
|
||||
onLongPress={onLongPress}
|
||||
onPress={onPress}
|
||||
|
||||
@@ -137,13 +137,14 @@ export const Items = ({ item, buttons, close }) => {
|
||||
style={{
|
||||
alignSelf: "flex-start",
|
||||
paddingHorizontal: 0,
|
||||
flex: 1
|
||||
width: topBarItemWidth
|
||||
}}
|
||||
>
|
||||
<View
|
||||
onPress={item.func}
|
||||
style={{
|
||||
height: topBarItemWidth,
|
||||
width: topBarItemWidth,
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
textAlign: "center",
|
||||
@@ -168,7 +169,7 @@ export const Items = ({ item, buttons, close }) => {
|
||||
|
||||
<Paragraph
|
||||
textBreakStrategy="simple"
|
||||
size={SIZE.xxs}
|
||||
size={SIZE.xxs + 1}
|
||||
style={{ textAlign: "center" }}
|
||||
>
|
||||
{item.title}
|
||||
@@ -241,7 +242,7 @@ export const Items = ({ item, buttons, close }) => {
|
||||
showsHorizontalScrollIndicator={false}
|
||||
contentContainerStyle={{
|
||||
paddingRight: 25,
|
||||
gap: 15
|
||||
gap: 5
|
||||
}}
|
||||
>
|
||||
{topBarItems.map(renderTopBarItem)}
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
Platform,
|
||||
View
|
||||
} from "react-native";
|
||||
import { Menu } from "react-native-material-menu";
|
||||
import Menu from "react-native-reanimated-material-menu/src/Menu";
|
||||
import { db } from "../../common/database";
|
||||
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
||||
import { ToastManager } from "../../services/event-manager";
|
||||
@@ -101,14 +101,11 @@ export const SelectionHeader = React.memo(
|
||||
};
|
||||
|
||||
const deleteItem = async () => {
|
||||
if (!type) return;
|
||||
presentDialog({
|
||||
title: strings.doActions.delete[
|
||||
type as keyof typeof strings.doActions.delete
|
||||
](selectedItemsList.length),
|
||||
paragraph: strings.actionConfirmations.delete[
|
||||
type as keyof typeof strings.doActions.delete
|
||||
](selectedItemsList.length),
|
||||
title: strings.doActions.delete[type](selectedItemsList.length),
|
||||
paragraph: strings.actionConfirmations.delete[type](
|
||||
selectedItemsList.length
|
||||
),
|
||||
positiveText: strings.delete(),
|
||||
negativeText: strings.cancel(),
|
||||
positivePress: async () => {
|
||||
@@ -221,16 +218,14 @@ export const SelectionHeader = React.memo(
|
||||
style={{
|
||||
borderRadius: 5,
|
||||
backgroundColor: contextMenuColors.primary.background,
|
||||
marginTop: 35
|
||||
marginTop: -20
|
||||
}}
|
||||
onRequestClose={() => {
|
||||
//@ts-ignore
|
||||
menuRef.current?.hide();
|
||||
}}
|
||||
anchor={
|
||||
<IconButton
|
||||
onPress={() => {
|
||||
//@ts-ignore
|
||||
menuRef.current?.show();
|
||||
}}
|
||||
name="dots-vertical"
|
||||
@@ -324,10 +319,9 @@ export const SelectionHeader = React.memo(
|
||||
!item.visible ? null : (
|
||||
<Button
|
||||
style={{
|
||||
width: 150,
|
||||
justifyContent: "flex-start",
|
||||
borderRadius: 0,
|
||||
alignSelf: "flex-start",
|
||||
width: "100%"
|
||||
borderRadius: 0
|
||||
}}
|
||||
type="plain"
|
||||
buttonType={{
|
||||
@@ -337,7 +331,6 @@ export const SelectionHeader = React.memo(
|
||||
key={item.title}
|
||||
title={item.title}
|
||||
onPress={async () => {
|
||||
//@ts-ignore
|
||||
menuRef.current?.hide();
|
||||
if (Platform.OS === "ios") await sleep(300);
|
||||
item.onPress();
|
||||
|
||||
@@ -88,14 +88,14 @@ export const RelationsList = ({
|
||||
sortDirection: "desc"
|
||||
})
|
||||
.then((grouped) => {
|
||||
setTimeout(() => {
|
||||
setItems(grouped);
|
||||
}, 300);
|
||||
setItems(grouped);
|
||||
});
|
||||
}, [relationType, referenceType, item?.id, item?.type, updater]);
|
||||
}, [relationType, referenceType, item?.id, item?.type]);
|
||||
|
||||
return (
|
||||
<View style={{ paddingHorizontal: 12, height: "100%" }}>
|
||||
<View
|
||||
style={{ paddingHorizontal: 12, height: hasNoRelations ? 300 : "100%" }}
|
||||
>
|
||||
<SheetProvider context="local" />
|
||||
<DialogHeader
|
||||
title={title}
|
||||
|
||||
@@ -124,11 +124,9 @@ export default function ReminderSheet({
|
||||
const referencedItem = reference ? (reference as Note) : null;
|
||||
|
||||
const title = useRef<string | undefined>(
|
||||
!reminder ? referencedItem?.title : reminder?.title
|
||||
);
|
||||
const details = useRef<string | undefined>(
|
||||
!reminder ? referencedItem?.headline : reminder?.description
|
||||
reminder?.title || referencedItem?.title
|
||||
);
|
||||
const details = useRef<string | undefined>(reminder?.description);
|
||||
const titleRef = useRef<TextInput>(null);
|
||||
const timer = useRef<NodeJS.Timeout>();
|
||||
|
||||
@@ -545,7 +543,7 @@ export default function ReminderSheet({
|
||||
/>
|
||||
|
||||
{reminderMode === ReminderModes.Permanent ? null : (
|
||||
<RNScrollView
|
||||
<ScrollView
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
marginTop: 12,
|
||||
@@ -590,7 +588,7 @@ export default function ReminderSheet({
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
</RNScrollView>
|
||||
</ScrollView>
|
||||
)}
|
||||
</ScrollView>
|
||||
|
||||
|
||||
@@ -154,9 +154,7 @@ export const Toast = ({ context = "global" }) => {
|
||||
>
|
||||
<Icon
|
||||
name={
|
||||
toastOptions.icon
|
||||
? toastOptions.icon
|
||||
: toastOptions.type === "success"
|
||||
toastOptions.type === "success"
|
||||
? "check"
|
||||
: toastOptions.type === "info"
|
||||
? "information"
|
||||
|
||||
@@ -51,6 +51,7 @@ export const ReminderTime = ({
|
||||
<Button
|
||||
title={time}
|
||||
key={reminder.id}
|
||||
height={20}
|
||||
icon="bell"
|
||||
fontSize={SIZE.xs}
|
||||
iconSize={SIZE.sm}
|
||||
@@ -66,10 +67,12 @@ export const ReminderTime = ({
|
||||
marginRight: 0
|
||||
}}
|
||||
style={{
|
||||
height: "auto",
|
||||
borderRadius: 5,
|
||||
marginRight: 5,
|
||||
borderWidth: 0.5,
|
||||
borderColor: colors.primary.border,
|
||||
paddingHorizontal: 6,
|
||||
marginBottom: 5,
|
||||
...(style as ViewStyle)
|
||||
}}
|
||||
{...props}
|
||||
|
||||
@@ -93,7 +93,6 @@ import { sleep } from "../utils/time";
|
||||
import { NotesnookModule } from "../utils/notesnook-module";
|
||||
import { changeSystemBarColors } from "../stores/use-theme-store";
|
||||
import { strings } from "@notesnook/intl";
|
||||
import { endProgress, startProgress } from "../components/dialogs/progress";
|
||||
|
||||
const onCheckSyncStatus = async (type: SyncStatusEvent) => {
|
||||
const { disableSync, disableAutoSync } = SettingsService.get();
|
||||
@@ -578,27 +577,6 @@ export const useAppEvents = () => {
|
||||
EV.subscribe(EVENTS.uploadCanceled, (data) => {
|
||||
useAttachmentStore.getState().setUploading(data);
|
||||
}),
|
||||
EV.subscribe(EVENTS.migrationStarted, (name) => {
|
||||
if (
|
||||
name !== "notesnook" ||
|
||||
!SettingsService.getProperty("introCompleted")
|
||||
)
|
||||
return;
|
||||
startProgress({
|
||||
title: "Migrating Data",
|
||||
paragraph: "Please wait while we migrate your data",
|
||||
canHideProgress: false,
|
||||
fillBackground: true
|
||||
});
|
||||
}),
|
||||
EV.subscribe(EVENTS.migrationFinished, (name) => {
|
||||
if (
|
||||
name !== "notesnook" ||
|
||||
!SettingsService.getProperty("introCompleted")
|
||||
)
|
||||
return;
|
||||
endProgress();
|
||||
}),
|
||||
EV.subscribe(EVENTS.vaultLocked, async () => {
|
||||
// Lock all notes in all tabs...
|
||||
for (const tab of useTabStore.getState().tabs) {
|
||||
|
||||
@@ -17,11 +17,13 @@
|
||||
"phone": "^3.1.14",
|
||||
"qclone": "^1.2.0",
|
||||
"react-native-actions-sheet": "0.9.7",
|
||||
"react-native-check-version": "https://github.com/flexible-agency/react-native-check-version",
|
||||
"react-native-drax": "^0.10.2",
|
||||
"react-native-image-zoom-viewer": "^3.0.1",
|
||||
"react-native-keyboard-aware-scroll-view": "^0.9.5",
|
||||
"react-native-progress": "^5.0.0",
|
||||
"react-native-qrcode-svg": "^6.0.6",
|
||||
"react-native-reanimated-material-menu": "github:ammarahm-ed/react-native-reanimated-material-menu",
|
||||
"react-native-reanimated-progress-bar": "1.0.1",
|
||||
"react-native-swiper-flatlist": "3.2.2",
|
||||
"timeago.js": "4.0.2",
|
||||
@@ -32,18 +34,17 @@
|
||||
"katex": "0.16.2",
|
||||
"@readme/data-urls": "3.0.0",
|
||||
"react-native-wheel-color-picker": "^1.3.1",
|
||||
"tinycolor2": "1.6.0",
|
||||
"@azure/core-asynciterator-polyfill": "^1.0.2",
|
||||
"@tanstack/react-query": "^4.36.1",
|
||||
"@trpc/client": "10.45.2",
|
||||
"@trpc/react-query": "10.45.2",
|
||||
"@trpc/server": "10.45.2",
|
||||
"@streetwriters/kysely": "^0.27.4",
|
||||
"pathe": "1.1.2",
|
||||
"react-native-format-currency": "0.0.5",
|
||||
"@lingui/react": "4.11.2",
|
||||
"@lingui/core": "4.11.2",
|
||||
"react-native-check-version": "^1.3.0",
|
||||
"react-native-material-menu": "^2.0.0",
|
||||
"@trpc/client": "^10.45.2",
|
||||
"@trpc/react-query": "^10.45.2",
|
||||
"@trpc/server": "^10.45.2",
|
||||
"@tanstack/react-query": "^4.36.1"
|
||||
"@lingui/core": "4.11.2"
|
||||
},
|
||||
"sideEffects": false
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import { EditorEvents } from "./tiptap/utils";
|
||||
import { useThemeColors } from "@notesnook/theme";
|
||||
import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";
|
||||
import { db } from "../../common/database";
|
||||
import { i18n } from "@lingui/core";
|
||||
|
||||
const onShouldStartLoadWithRequest = (request: ShouldStartLoadRequest) => {
|
||||
if (request.url.includes("https")) {
|
||||
@@ -144,17 +143,10 @@ export function ReadonlyEditor(props: {
|
||||
ref={editorRef}
|
||||
key={"readonly-editor:" + props.editorId}
|
||||
nestedScrollEnabled
|
||||
injectedJavaScript={`
|
||||
globalThis.__DEV__ = ${__DEV__}
|
||||
globalThis.readonlyEditor=true;
|
||||
globalThis.LINGUI_LOCALE = "${i18n.locale}";
|
||||
globalThis.LINGUI_LOCALE_DATA = ${JSON.stringify({
|
||||
[i18n.locale]: i18n.messages
|
||||
})};
|
||||
globalThis.loadApp();`}
|
||||
injectedJavaScriptBeforeContentLoaded={`globalThis.readonlyEditor=true;`}
|
||||
injectedJavaScript="globalThis.readonlyEditor=true;"
|
||||
useSharedProcessPool={false}
|
||||
javaScriptEnabled={true}
|
||||
webviewDebuggingEnabled={__DEV__}
|
||||
focusable={true}
|
||||
setSupportMultipleWindows={false}
|
||||
overScrollMode="never"
|
||||
|
||||
@@ -37,7 +37,6 @@ export type EditorState = {
|
||||
scrollPosition: number;
|
||||
overlay?: boolean;
|
||||
initialLoadCalled?: boolean;
|
||||
editorStateRestored?: boolean;
|
||||
};
|
||||
|
||||
export type Settings = {
|
||||
|
||||
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
import { ItemReference } from "@notesnook/core";
|
||||
import type { Attachment } from "@notesnook/editor";
|
||||
import { getDefaultPresets } from "@notesnook/editor/dist/cjs/toolbar/tool-definitions";
|
||||
import { getDefaultPresets } from "@notesnook/editor/dist/toolbar/tool-definitions";
|
||||
import Clipboard from "@react-native-clipboard/clipboard";
|
||||
import React, { useCallback, useEffect, useRef } from "react";
|
||||
import {
|
||||
|
||||
@@ -861,13 +861,9 @@ export const useEditor = (
|
||||
state.current.currentlyEditing = true;
|
||||
state.current.movedAway = false;
|
||||
|
||||
if (!state.current.editorStateRestored) {
|
||||
state.current.isRestoringState = true;
|
||||
if (!DDS.isTab) {
|
||||
tabBarRef.current?.goToPage(1, false);
|
||||
}
|
||||
if (!DDS.isTab) {
|
||||
tabBarRef.current?.goToPage(1, false);
|
||||
}
|
||||
|
||||
clearAppState();
|
||||
state.current.isRestoringState = false;
|
||||
}, []);
|
||||
|
||||
@@ -78,7 +78,7 @@ export const Home = ({ navigation, route }: NavigationProps<"Notes">) => {
|
||||
placeholder={{
|
||||
title: route.name?.toLowerCase(),
|
||||
paragraph: strings.notesEmpty(),
|
||||
button: strings.createNewNote(),
|
||||
button: strings.newNote(),
|
||||
action: openEditor,
|
||||
loading: strings.loadingNotes()
|
||||
}}
|
||||
|
||||
@@ -29,7 +29,6 @@ import { useAttachmentProgress } from "../../hooks/use-attachment-progress";
|
||||
import { useDBItem } from "../../hooks/use-db-item";
|
||||
import { useAttachmentStore } from "../../stores/use-attachment-store";
|
||||
import { SIZE } from "../../utils/size";
|
||||
import { strings } from "@notesnook/intl";
|
||||
|
||||
export const AttachmentGroupProgress = (props: { groupId?: string }) => {
|
||||
const { colors } = useThemeColors();
|
||||
@@ -91,12 +90,11 @@ export const AttachmentGroupProgress = (props: { groupId?: string }) => {
|
||||
}}
|
||||
numberOfLines={1}
|
||||
>
|
||||
{strings.downloading()} {file?.filename}{" "}
|
||||
{formatBytes(file?.size || 0)}{" "}
|
||||
Downloading {file?.filename} {formatBytes(file?.size || 0)}{" "}
|
||||
{fileProgress?.percent ? `(${fileProgress.percent})` : ""}
|
||||
</Paragraph>
|
||||
<Paragraph size={10} color={colors.secondary.paragraph}>
|
||||
{strings.group()}: {props.groupId}
|
||||
Group: {props.groupId}
|
||||
</Paragraph>
|
||||
</View>
|
||||
{props.groupId === "offline-mode" ? null : (
|
||||
|
||||
@@ -17,18 +17,18 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { Icons } from "@notesnook/editor/dist/cjs/toolbar/icons";
|
||||
import { Icons } from "@notesnook/editor/dist/toolbar/icons";
|
||||
import { ToolbarGroupDefinition } from "@notesnook/editor";
|
||||
import {
|
||||
getAllTools,
|
||||
getDefaultPresets
|
||||
} from "@notesnook/editor/dist/cjs/toolbar/tool-definitions";
|
||||
} from "@notesnook/editor/dist/toolbar/tool-definitions";
|
||||
import { ToolId } from "@notesnook/editor";
|
||||
|
||||
export const tools = getAllTools() as any;
|
||||
export const tools = getAllTools();
|
||||
export const presets: { [name: string]: ToolbarGroupDefinition[] } = {
|
||||
default: getDefaultPresets().default as any,
|
||||
minimal: getDefaultPresets().minimal as any,
|
||||
default: getDefaultPresets().default,
|
||||
minimal: getDefaultPresets().minimal,
|
||||
custom: []
|
||||
};
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import { useThemeColors } from "@notesnook/theme";
|
||||
import React, { useRef, useState } from "react";
|
||||
import { View } from "react-native";
|
||||
import { Menu, MenuItem } from "react-native-material-menu";
|
||||
import Menu, { MenuItem } from "react-native-reanimated-material-menu";
|
||||
import Icon from "react-native-vector-icons/MaterialCommunityIcons";
|
||||
import { Dialog } from "../../../components/dialog";
|
||||
import { Pressable } from "../../../components/ui/pressable";
|
||||
@@ -146,7 +146,7 @@ export function SettingsPicker<T>({
|
||||
onChange(item);
|
||||
}
|
||||
}}
|
||||
pressColor={colors.primary.hover}
|
||||
underlayColor={colors.primary.hover}
|
||||
style={{
|
||||
backgroundColor: compareValue(currentValue, item)
|
||||
? colors.selected.background
|
||||
|
||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { DATE_FORMATS, TIME_FORMATS } from "@notesnook/core";
|
||||
import { getFontById, getFonts } from "@notesnook/editor/dist/cjs/utils/font";
|
||||
import { getFontById, getFonts } from "@notesnook/editor/dist/utils/font";
|
||||
import dayjs from "dayjs";
|
||||
import { createSettingsPicker } from ".";
|
||||
import { db } from "../../../common/database";
|
||||
|
||||
@@ -77,7 +77,6 @@ import { useDragState } from "./editor/state";
|
||||
import { verifyUser, verifyUserWithApplock } from "./functions";
|
||||
import { SettingSection } from "./types";
|
||||
import { getTimeLeft } from "./user-section";
|
||||
import Clipboard from "@react-native-clipboard/clipboard";
|
||||
|
||||
type User = any;
|
||||
|
||||
@@ -1166,9 +1165,7 @@ export const settingsGroups: SettingSection[] = [
|
||||
type: "component",
|
||||
hidden: () => !useUserStore.getState().user,
|
||||
name: strings.automaticBackupsWithAttachments(),
|
||||
description: [
|
||||
...strings.automaticBackupsWithAttachmentsDesc()
|
||||
].join("\n"),
|
||||
description: strings.automaticBackupsWithAttachmentsDesc(),
|
||||
component: "autobackupsattachments"
|
||||
},
|
||||
{
|
||||
@@ -1386,15 +1383,7 @@ export const settingsGroups: SettingSection[] = [
|
||||
name: strings.emailSupport(),
|
||||
icon: "mail",
|
||||
modifer: () => {
|
||||
Clipboard.setString("support@streetwriters.co");
|
||||
ToastManager.show({
|
||||
heading: strings.emailCopied(),
|
||||
type: "success",
|
||||
icon: "content-copy"
|
||||
});
|
||||
setTimeout(() => {
|
||||
Linking.openURL("mailto:support@streetwriters.co");
|
||||
}, 1000);
|
||||
Linking.openURL("mailto:support@streetwriters.co");
|
||||
},
|
||||
description: strings.emailSupportDesc()
|
||||
},
|
||||
|
||||
@@ -30,12 +30,24 @@ import SettingsService from "./settings";
|
||||
|
||||
async function doInBackground(callback: () => Promise<void>) {
|
||||
if (Platform.OS === "ios") {
|
||||
const bgTaskId = await beginBackgroundTask();
|
||||
const result = await callback();
|
||||
await endBackgroundTask(bgTaskId);
|
||||
return result;
|
||||
try {
|
||||
const bgTaskId = await beginBackgroundTask();
|
||||
const result = await callback();
|
||||
await endBackgroundTask(bgTaskId);
|
||||
return result;
|
||||
} catch (e) {
|
||||
return (e as Error).message;
|
||||
}
|
||||
} else {
|
||||
return await callback();
|
||||
// eslint-disable-next-line no-async-promise-executor
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
const result = await callback();
|
||||
resolve(result);
|
||||
} catch (e) {
|
||||
resolve((e as Error).message);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import { Platform } from "react-native";
|
||||
import FingerprintScanner, {
|
||||
AuthenticateIOS
|
||||
} from "@ammarahmed/react-native-fingerprint-scanner";
|
||||
} from "react-native-fingerprint-scanner";
|
||||
import * as Keychain from "react-native-keychain";
|
||||
import { MMKV } from "../common/database/mmkv";
|
||||
import Storage from "../common/database/storage";
|
||||
|
||||
@@ -123,7 +123,6 @@ export type PresentSheetOptions = {
|
||||
};
|
||||
|
||||
export function presentSheet(data: Partial<PresentSheetOptions>) {
|
||||
console.log("PRESENTING...");
|
||||
eSendEvent(eOpenSheet, data);
|
||||
}
|
||||
|
||||
@@ -149,31 +148,28 @@ export const ToastManager = {
|
||||
type = "error",
|
||||
context = "global",
|
||||
func,
|
||||
actionText,
|
||||
icon,
|
||||
duration = 3000
|
||||
actionText
|
||||
}: ToastOptions) => {
|
||||
if (Config.isTesting) return;
|
||||
eSendEvent(eShowToast, {
|
||||
heading,
|
||||
message,
|
||||
type,
|
||||
context,
|
||||
func,
|
||||
actionText,
|
||||
icon,
|
||||
duration
|
||||
heading: heading,
|
||||
message: message,
|
||||
type: type,
|
||||
context: context,
|
||||
duration: 3000,
|
||||
func: func,
|
||||
actionText: actionText
|
||||
});
|
||||
},
|
||||
hide: () => eSendEvent(eHideToast),
|
||||
error: (e: Error, title?: string, context?: any, duration = 6000) => {
|
||||
error: (e: Error, title?: string, context?: any, duration = 5000) => {
|
||||
ToastManager.show({
|
||||
heading: title,
|
||||
message: e?.message || "",
|
||||
type: "error",
|
||||
context: context || "global",
|
||||
actionText: "Copy logs",
|
||||
duration: duration,
|
||||
duration: 6000,
|
||||
func: () => {
|
||||
Clipboard.setString(e?.stack || "");
|
||||
ToastManager.show({
|
||||
|
||||
@@ -66,7 +66,7 @@ describe("NOTE TESTS", () => {
|
||||
await Tests.fromText("icon-pinned").isNotVisible();
|
||||
});
|
||||
|
||||
it.skip("Pin a note in notifications", async () => {
|
||||
it("Pin a note in notifications", async () => {
|
||||
await Tests.prepare();
|
||||
await Tests.createNote();
|
||||
await Tests.fromId(notesnook.listitem.menu).waitAndTap();
|
||||
@@ -100,14 +100,14 @@ describe("NOTE TESTS", () => {
|
||||
await Tests.fromText(note.body).isVisible();
|
||||
});
|
||||
|
||||
it("Delete & restore a note", async () => {
|
||||
it.only("Delete & restore a note", async () => {
|
||||
await Tests.prepare();
|
||||
await Tests.createNote();
|
||||
await Tests.fromId(notesnook.listitem.menu).waitAndTap();
|
||||
await Tests.fromId("icon-trash").waitAndTap();
|
||||
await Tests.navigate("Trash");
|
||||
await Tests.fromId(notesnook.listitem.menu).waitAndTap();
|
||||
await Tests.fromText("Restore").waitAndTap();
|
||||
await Tests.fromText("Restore note").waitAndTap();
|
||||
await device.pressBack();
|
||||
await Tests.fromText(
|
||||
"Test note description that is very long and should not fit in text."
|
||||
|
||||
@@ -57,7 +57,6 @@ async function openLockedNote(pwd?: string) {
|
||||
|
||||
async function goToPrivacySecuritySettings() {
|
||||
await Tests.navigate("Settings");
|
||||
await Tests.sleep(300);
|
||||
await Tests.fromText("Vault").waitAndTap();
|
||||
}
|
||||
|
||||
@@ -105,7 +104,6 @@ describe("VAULT", () => {
|
||||
"1234"
|
||||
);
|
||||
await Tests.fromText("Delete").waitAndTap();
|
||||
await Tests.sleep(300);
|
||||
await Tests.fromText("Create vault").isVisible();
|
||||
await device.pressBack();
|
||||
await device.pressBack();
|
||||
@@ -123,7 +121,6 @@ describe("VAULT", () => {
|
||||
);
|
||||
await Tests.fromText("Delete notes in this vault").waitAndTap();
|
||||
await Tests.fromText("Delete").waitAndTap();
|
||||
await Tests.sleep(300);
|
||||
await Tests.fromText("Create vault").isVisible();
|
||||
await device.pressBack();
|
||||
await device.pressBack();
|
||||
@@ -137,7 +134,7 @@ describe("VAULT", () => {
|
||||
await openLockedNote();
|
||||
});
|
||||
|
||||
it("Remove note from vault", async () => {
|
||||
it.only("Remove note from vault", async () => {
|
||||
await Tests.prepare();
|
||||
await Tests.createNote();
|
||||
await lockNote();
|
||||
|
||||
@@ -116,7 +116,7 @@ android {
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
multiDexEnabled true
|
||||
versionCode 3033
|
||||
versionCode 3028
|
||||
versionName getNpmVersion()
|
||||
testBuildType System.getProperty('testBuildType', 'debug')
|
||||
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
|
||||
@@ -164,7 +164,10 @@ android {
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
pickFirst '**/libc++_shared.so'
|
||||
pickFirst 'lib/x86/libc++_shared.so'
|
||||
pickFirst 'lib/x86_64/libc++_shared.so'
|
||||
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
|
||||
pickFirst 'lib/arm64-v8a/libc++_shared.so'
|
||||
jniLibs {
|
||||
useLegacyPackaging isBuildingAAB == false
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ org.gradle.jvmargs=-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF
|
||||
# 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
|
||||
# org.gradle.configuration-cache=true
|
||||
org.gradle.configuration-cache=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
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
- Added full support for localization in Notesnook
|
||||
- Improved search experience
|
||||
- Allow user to cancel logging in
|
||||
- Fixed scrolling focused line into view
|
||||
- Support self hosted monograph server
|
||||
- Fixed markdown link pasting in editor
|
||||
- Many other bug fixes and improvements
|
||||
- Fix random crashes on system startup and when app enter background
|
||||
- Attachments manager now shows progress for uploading/downloading/checking attachments
|
||||
- Attachments manager has two new tabs, Errors and Orphaned, to help you manage your attachments
|
||||
- New and improved toast message design
|
||||
- Fix statusbar flicker on app launch
|
||||
- Many other bug fixes and small improvements
|
||||
|
||||
Thank you for using Notesnook!
|
||||
@@ -112,7 +112,7 @@
|
||||
2D02E4901E0B4A5D006451C7 /* Notesnook-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Notesnook-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
41D57E9831C724F59F18FBAE /* libPods-Notesnook-Add to Notes.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook-Add to Notes.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
47AE097A087A651BD60CAD7B /* Pods-Notesnook-Make Note.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-Make Note.release.xcconfig"; path = "Target Support Files/Pods-Notesnook-Make Note/Pods-Notesnook-Make Note.release.xcconfig"; sourceTree = "<group>"; };
|
||||
4B679E87FDFB1312CAD6CF45 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Notesnook/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
4B679E87FDFB1312CAD6CF45 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Notesnook/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
4BD34AE0C0FD2416E48803B8 /* libPods-Notesnook.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4C4AF691C324D95337F2FB0A /* libPods-Make Note.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Make Note.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
6510E6D62877215700DACAA9 /* build.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = build.bundle; path = "../../../../packages/editor-mobile/build.bundle"; sourceTree = "<group>"; };
|
||||
@@ -124,7 +124,6 @@
|
||||
6529D2B0257B4A2900B49BC3 /* NotesnookDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = NotesnookDebug.entitlements; path = Notesnook/NotesnookDebug.entitlements; sourceTree = "<group>"; };
|
||||
656835802BB29A8300144BAB /* OpenSans-Italic.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "OpenSans-Italic.ttf"; path = "../../../../packages/editor-mobile/public/fonts/OpenSans-Italic.ttf"; sourceTree = "<group>"; };
|
||||
6593E4A2281C345400492C50 /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = Notesnook/AppDelegate.mm; sourceTree = "<group>"; };
|
||||
6594DDF22CD8BFE8007F5EC2 /* BetterTrigram.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = BetterTrigram.xcframework; sourceTree = "<group>"; };
|
||||
659BE46625E11A5100E05671 /* notesnook-text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "notesnook-text.png"; path = "Notesnook/Images.xcassets/notesnook-text.png"; sourceTree = "<group>"; };
|
||||
65A7F34F255689AD00699170 /* Notesnook.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = Notesnook.entitlements; path = Notesnook/Notesnook.entitlements; sourceTree = "<group>"; };
|
||||
65AA857725E6DDEC00772A01 /* NotesWidgetExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = NotesWidgetExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -153,7 +152,7 @@
|
||||
88211800FA8BF60638327ADE /* Pods-Make Note.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Make Note.debug.xcconfig"; path = "Target Support Files/Pods-Make Note/Pods-Make Note.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
A03E3F5851D27269540E147C /* libPods-Notesnook-tvOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook-tvOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
A84F3F0D50641D1CD4569B0E /* Pods-Make Note.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Make Note.release.xcconfig"; path = "Target Support Files/Pods-Make Note/Pods-Make Note.release.xcconfig"; sourceTree = "<group>"; };
|
||||
B5216B66C0B4A91C0A69128B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = Notesnook/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
B5216B66C0B4A91C0A69128B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = Notesnook/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||
B9989E5C777BB11343A62D09 /* Pods-Notesnook-NotesnookTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-NotesnookTests.debug.xcconfig"; path = "Target Support Files/Pods-Notesnook-NotesnookTests/Pods-Notesnook-NotesnookTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
D1710CA05FED221CC56D2BE1 /* Pods-Notesnook-tvOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-tvOSTests.release.xcconfig"; path = "Target Support Files/Pods-Notesnook-tvOSTests/Pods-Notesnook-tvOSTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
@@ -256,7 +255,6 @@
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6594DDF22CD8BFE8007F5EC2 /* BetterTrigram.xcframework */,
|
||||
6515C42E2580AA2F00E83E39 /* StoreKit.framework */,
|
||||
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
|
||||
ED2971642150620600B7C4FE /* JavaScriptCore.framework */,
|
||||
@@ -1063,7 +1061,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 2120;
|
||||
CURRENT_PROJECT_VERSION = 2115;
|
||||
DEVELOPMENT_TEAM = 53CWBG3QUC;
|
||||
ENABLE_BITCODE = NO;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
@@ -1137,7 +1135,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.0.23;
|
||||
MARKETING_VERSION = 3.0.18;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
@@ -1168,7 +1166,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 2120;
|
||||
CURRENT_PROJECT_VERSION = 2115;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
@@ -1242,7 +1240,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.0.23;
|
||||
MARKETING_VERSION = 3.0.18;
|
||||
ONLY_ACTIVE_ARCH = NO;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
@@ -1401,7 +1399,7 @@
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 2120;
|
||||
CURRENT_PROJECT_VERSION = 2115;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = 53CWBG3QUC;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
@@ -1413,7 +1411,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.0.23;
|
||||
MARKETING_VERSION = 3.0.18;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
|
||||
@@ -1444,7 +1442,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 2120;
|
||||
CURRENT_PROJECT_VERSION = 2115;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
|
||||
@@ -1457,7 +1455,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.0.23;
|
||||
MARKETING_VERSION = 3.0.18;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.notewidget;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -1487,7 +1485,7 @@
|
||||
CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 2120;
|
||||
CURRENT_PROJECT_VERSION = 2115;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
DEVELOPMENT_TEAM = 53CWBG3QUC;
|
||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||
@@ -1561,7 +1559,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.0.23;
|
||||
MARKETING_VERSION = 3.0.18;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
|
||||
@@ -1592,7 +1590,7 @@
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 2120;
|
||||
CURRENT_PROJECT_VERSION = 2115;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 53CWBG3QUC;
|
||||
@@ -1667,7 +1665,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
"@executable_path/../../Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 3.0.23;
|
||||
MARKETING_VERSION = 3.0.18;
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
|
||||
@@ -113,7 +113,7 @@ post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
if target.name == "react-native-quick-sqlite" then
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = 'SQLITE_CORE=1 SQLITE_ENABLE_FTS5=1 SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT=1 HAVE_CIPHER_AES_128_CBC=0 HAVE_CIPHER_AES_256_CBC=0 HAVE_CIPHER_SQLCIPHER=0 HAVE_CIPHER_RC4=0 HAVE_CIPHER_CHACHA20=1 SQLITE_OMIT_PROGRESS_CALLBACK=1 SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS=1 SQLITE_DQS=0 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_USE_ALLOCA=1'
|
||||
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = 'SQLITE_ENABLE_FTS5=1 SQLITE3MC_OMIT_AES_HARDWARE_SUPPORT=1 HAVE_CIPHER_AES_128_CBC=0 HAVE_CIPHER_AES_256_CBC=0 HAVE_CIPHER_SQLCIPHER=0 HAVE_CIPHER_RC4=0 HAVE_CIPHER_CHACHA20=1 SQLITE_OMIT_PROGRESS_CALLBACK=1 SQLITE_MAX_EXPR_DEPTH=0 SQLITE_OMIT_DEPRECATED=1 SQLITE_LIKE_DOESNT_MATCH_BLOBS=1 SQLITE_DQS=0 SQLITE_DEFAULT_MEMSTATUS=0 SQLITE_USE_ALLOCA=1'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -970,8 +970,6 @@ PODS:
|
||||
- React
|
||||
- react-native-background-actions (2.6.7):
|
||||
- React-Core
|
||||
- react-native-begin-background-task (0.1.0):
|
||||
- React
|
||||
- react-native-blob-util (0.18.3):
|
||||
- React-Core
|
||||
- react-native-config (1.5.1):
|
||||
@@ -983,7 +981,7 @@ PODS:
|
||||
- react-native-document-picker (7.1.3):
|
||||
- React-Core
|
||||
- react-native-fingerprint-scanner (5.0.0):
|
||||
- React-Core
|
||||
- React
|
||||
- react-native-get-random-values (1.9.0):
|
||||
- React-Core
|
||||
- react-native-gzip (1.1.0):
|
||||
@@ -1019,9 +1017,9 @@ PODS:
|
||||
- react-native-screenguard (1.0.0):
|
||||
- React-Core
|
||||
- SDWebImage (~> 5.11.1)
|
||||
- react-native-share-extension (2.6.0):
|
||||
- react-native-share-extension (3.0.0):
|
||||
- React
|
||||
- react-native-sodium (1.5.6):
|
||||
- react-native-sodium (1.5.4):
|
||||
- React
|
||||
- react-native-theme-switch-animation (0.6.0):
|
||||
- DoubleConversion
|
||||
@@ -1305,7 +1303,7 @@ PODS:
|
||||
- React-Core
|
||||
- RNCMaskedView (0.2.9):
|
||||
- React-Core
|
||||
- RNDateTimePicker (8.2.0):
|
||||
- RNDateTimePicker (6.6.0):
|
||||
- React-Core
|
||||
- RNDeviceInfo (8.7.1):
|
||||
- React-Core
|
||||
@@ -1488,12 +1486,11 @@ DEPENDENCIES:
|
||||
- React-Mapbuffer (from `../../node_modules/react-native/ReactCommon`)
|
||||
- react-native-actions-shortcuts (from `../../node_modules/react-native-actions-shortcuts`)
|
||||
- react-native-background-actions (from `../../node_modules/react-native-background-actions`)
|
||||
- react-native-begin-background-task (from `../../node_modules/react-native-begin-background-task`)
|
||||
- react-native-blob-util (from `../../node_modules/react-native-blob-util`)
|
||||
- react-native-config (from `../../node_modules/react-native-config`)
|
||||
- react-native-date-picker (from `../../node_modules/react-native-date-picker`)
|
||||
- react-native-document-picker (from `../../node_modules/react-native-document-picker`)
|
||||
- "react-native-fingerprint-scanner (from `../../node_modules/@ammarahmed/react-native-fingerprint-scanner`)"
|
||||
- react-native-fingerprint-scanner (from `../../node_modules/react-native-fingerprint-scanner`)
|
||||
- react-native-get-random-values (from `../../node_modules/react-native-get-random-values`)
|
||||
- react-native-gzip (from `../../node_modules/react-native-gzip`)
|
||||
- react-native-html-to-pdf-lite (from `../../node_modules/react-native-html-to-pdf-lite`)
|
||||
@@ -1645,8 +1642,6 @@ EXTERNAL SOURCES:
|
||||
:path: "../../node_modules/react-native-actions-shortcuts"
|
||||
react-native-background-actions:
|
||||
:path: "../../node_modules/react-native-background-actions"
|
||||
react-native-begin-background-task:
|
||||
:path: "../../node_modules/react-native-begin-background-task"
|
||||
react-native-blob-util:
|
||||
:path: "../../node_modules/react-native-blob-util"
|
||||
react-native-config:
|
||||
@@ -1656,7 +1651,7 @@ EXTERNAL SOURCES:
|
||||
react-native-document-picker:
|
||||
:path: "../../node_modules/react-native-document-picker"
|
||||
react-native-fingerprint-scanner:
|
||||
:path: "../../node_modules/@ammarahmed/react-native-fingerprint-scanner"
|
||||
:path: "../../node_modules/react-native-fingerprint-scanner"
|
||||
react-native-get-random-values:
|
||||
:path: "../../node_modules/react-native-get-random-values"
|
||||
react-native-gzip:
|
||||
@@ -1838,12 +1833,11 @@ SPEC CHECKSUMS:
|
||||
React-Mapbuffer: 6c1cacdbf40b531f549eba249e531a7d0bfd8e7f
|
||||
react-native-actions-shortcuts: 5d9cf0c9c308333dfcc1e05c3f9afa8c428e2533
|
||||
react-native-background-actions: 2c251c986f23347f9c1722f05fd296938f60edb1
|
||||
react-native-begin-background-task: 3b889e07458afc5822a7277cf9cbc7cd077e39ee
|
||||
react-native-blob-util: 2d36383bb52c15c5451be81cb7ddf22bc34a12a6
|
||||
react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8
|
||||
react-native-date-picker: 93e43b3084cea595b4d68b1405d6d99849663bd6
|
||||
react-native-document-picker: ec07866a30707f23660c0f3ae591d669d3e89096
|
||||
react-native-fingerprint-scanner: be63e626b31fb951780a5fac5328b065a61a3d6e
|
||||
react-native-fingerprint-scanner: 3e8c46641b5751a31f45e66789d4b6f342be5e6d
|
||||
react-native-get-random-values: dee677497c6a740b71e5612e8dbd83e7539ed5bb
|
||||
react-native-gzip: c5e87ee9e359f02350e3a2ee52eb35eddc398868
|
||||
react-native-html-to-pdf-lite: 21bfb169bf4cbcd7bec9f736975ee1b3f5292d4a
|
||||
@@ -1855,11 +1849,11 @@ SPEC CHECKSUMS:
|
||||
react-native-notification-sounds: da78c828fe1bcbb92d8b505d5261890ed315ff39
|
||||
react-native-orientation: f1caf84d65f1a4fd4511a18f2b924e634ad7a628
|
||||
react-native-pdf: 33c622cbdf776a649929e8b9d1ce2d313347c4fa
|
||||
react-native-quick-sqlite: 18e1367c34faac90e37f6eb3e78c196e9b674b5d
|
||||
react-native-quick-sqlite: e0e23b749382a85e4b57146f753de737a6c3a9e1
|
||||
react-native-safe-area-context: b7daa1a8df36095a032dff095a1ea8963cb48371
|
||||
react-native-screenguard: 8b36a3df84c76cd2b82c477f71c26fa1c8cc14a0
|
||||
react-native-share-extension: 25437eb1039f7409be6e80a7edf8d02b42e1dc99
|
||||
react-native-sodium: 605c1523ec8ff5fbff5e9e7769bbacceb571a3c6
|
||||
react-native-share-extension: faed334b1ddf165f1e576fcabd3dc1c9e748bfa9
|
||||
react-native-sodium: 955bb0dc3ea05f8ea06d5e96cb89d1be7b5d7681
|
||||
react-native-theme-switch-animation: d3eb50365a3829ce5572628888fa514752703f61
|
||||
react-native-webview: 553abd09f58e340fdc7746c9e2ae096839e99911
|
||||
React-nativeconfig: ba9a2e54e2f0882cf7882698825052793ed4c851
|
||||
@@ -1890,7 +1884,7 @@ SPEC CHECKSUMS:
|
||||
RNCCheckbox: 43bcc6493611468af0e19f19f029dab3da8561c4
|
||||
RNCClipboard: 3f0451a8100393908bea5c5c5b16f96d45f30bfc
|
||||
RNCMaskedView: 949696f25ec596bfc697fc88e6f95cf0c79669b6
|
||||
RNDateTimePicker: 40ffda97d071a98a10fdca4fa97e3977102ccd14
|
||||
RNDateTimePicker: 818672afa85519722533d017b832ed09539d9ddb
|
||||
RNDeviceInfo: aad3c663b25752a52bf8fce93f2354001dd185aa
|
||||
RNExitApp: c4e052df2568b43bec8a37c7cd61194d4cfee2c3
|
||||
RNFileViewer: ce7ca3ac370e18554d35d6355cffd7c30437c592
|
||||
@@ -1907,7 +1901,7 @@ SPEC CHECKSUMS:
|
||||
RNShare: a5dc3b9c53ddc73e155b8cd9a94c70c91913c43c
|
||||
RNSVG: d7d7bc8229af3842c9cfc3a723c815a52cdd1105
|
||||
RNTooltips: 5424d4bf0b3d441104127943b1115cc7f0616b1f
|
||||
RNZipArchive: 9d90367b1573903b5561a8c0b911e5cc12626e74
|
||||
RNZipArchive: 68a0c6db4b1c103f846f1559622050df254a3ade
|
||||
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
|
||||
SexyTooltip: 5c9b4dec52bfb317938cb0488efd9da3717bb6fd
|
||||
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
|
||||
@@ -1917,6 +1911,6 @@ SPEC CHECKSUMS:
|
||||
toolbar-android: 2a73856e98b750d7e71ce4644d3f41cc98211719
|
||||
Yoga: 2246eea72aaf1b816a68a35e6e4b74563653ae09
|
||||
|
||||
PODFILE CHECKSUM: aa07aca16c1d92394d8ce12f2c5fcaa8a3ae4997
|
||||
PODFILE CHECKSUM: 98f600b3236e314680588e77819982573fb4d9f7
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
"@callstack/repack": "^4.1.1",
|
||||
"@react-native-clipboard/clipboard": "^1.9.0",
|
||||
"@react-native-community/checkbox": "^0.5.8",
|
||||
"@react-native-community/datetimepicker": "6.6.0",
|
||||
"@react-native-community/netinfo": "^9.3.7",
|
||||
"@react-native-community/toolbar-android": "^0.2.1",
|
||||
"@react-native-masked-view/masked-view": "^0.2.6",
|
||||
@@ -25,6 +26,7 @@
|
||||
"react-native": "0.74.5",
|
||||
"react-native-actions-shortcuts": "^1.0.1",
|
||||
"react-native-background-actions": "^2.6.6",
|
||||
"react-native-begin-background-task": "https://github.com/blockfirm/react-native-begin-background-task.git",
|
||||
"react-native-blob-util": "^0.18.3",
|
||||
"react-native-bootsplash": "4.1.4",
|
||||
"react-native-config": "^1.4.6",
|
||||
@@ -32,7 +34,9 @@
|
||||
"react-native-device-info": "^8.4.1",
|
||||
"react-native-document-picker": "^7.1.1",
|
||||
"@ammarahmed/react-native-eventsource": "1.1.0",
|
||||
"react-native-exit-app": "https://github.com/ammarahm-ed/react-native-exit-app.git",
|
||||
"react-native-file-viewer": "^2.1.1",
|
||||
"react-native-fingerprint-scanner": "https://github.com/ammarahm-ed/react-native-fingerprint-scanner.git",
|
||||
"react-native-gesture-handler": "^2.18.0",
|
||||
"react-native-reanimated": "3.14.0",
|
||||
"react-native-safe-area-context": "^4.10.8",
|
||||
@@ -46,10 +50,13 @@
|
||||
"react-native-iap": "12.15.1",
|
||||
"react-native-in-app-review": "4.3.3",
|
||||
"react-native-keychain": "4.0.5",
|
||||
"react-native-mmkv-storage": "^0.10.2",
|
||||
"react-native-modal-datetime-picker": "14.0.0",
|
||||
"react-native-navigation-bar-color": "2.0.2",
|
||||
"react-native-notification-sounds": "0.5.5",
|
||||
"react-native-orientation": "https://github.com/yamill/react-native-orientation.git",
|
||||
"react-native-pdf": "6.6.2",
|
||||
"react-native-privacy-snapshot": "github:standardnotes/react-native-privacy-snapshot",
|
||||
"react-native-scoped-storage": "^1.9.5",
|
||||
"react-native-securerandom": "^1.0.1",
|
||||
"react-native-share": "^7.2.0",
|
||||
@@ -65,18 +72,11 @@
|
||||
"react-native-screenguard": "^1.0.0",
|
||||
"@formatjs/intl-locale": "4.0.0",
|
||||
"@formatjs/intl-pluralrules": "5.2.14",
|
||||
"detox": "^20.27.6",
|
||||
"@ammarahmed/react-native-share-extension": "^2.6.0",
|
||||
"@ammarahmed/react-native-sodium": "1.5.6",
|
||||
"react-native-mmkv-storage": "^0.10.2",
|
||||
"@react-native-community/datetimepicker": "^8.2.0",
|
||||
"react-native-exit-app": "github:ammarahm-ed/react-native-exit-app",
|
||||
"react-native-orientation": "github:yamill/react-native-orientation",
|
||||
"react-native-begin-background-task": "github:blockfirm/react-native-begin-background-task",
|
||||
"react-native-privacy-snapshot": "github:standardnotes/react-native-privacy-snapshot",
|
||||
"@ammarahmed/react-native-fingerprint-scanner": "^5.0.0"
|
||||
"@ammarahmed/react-native-sodium": "1.5.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"detox": "^20.27.6",
|
||||
"@babel/core": "^7.20.0",
|
||||
"@babel/eslint-parser": "^7.16.5",
|
||||
"@babel/plugin-transform-named-capturing-groups-regex": "^7.16.5",
|
||||
|
||||
@@ -2,7 +2,7 @@ const PerformanceNow =
|
||||
(global.performance && global.performance.now) ||
|
||||
global.performanceNow ||
|
||||
global.nativePerformanceNow || (() => { try {
|
||||
var now = __DEV__ ? require('fbjs/lib/performanceNow') : () => Date.now()
|
||||
var now = require('fbjs/lib/performanceNow')
|
||||
} finally { return now }})();
|
||||
|
||||
const DEFAULT_LABEL = 'default';
|
||||
|
||||
@@ -217,7 +217,6 @@ module.exports = (env) => {
|
||||
/node_modules(.*[/\\])+@tanstack[/\\]react-query/,
|
||||
/node_modules(.*[/\\])+@trpc[/\\]react-query/,
|
||||
/node_modules(.*[/\\])+katex/,
|
||||
/node_modules(.*[/\\])+react-native-material-menu/,
|
||||
/node_modules(.*[/\\])+@notesnook[/\\]core/,
|
||||
/node_modules(.*[/\\])+whatwg-url-without-unicode/,
|
||||
/node_modules(.*[/\\])+whatwg-url/,
|
||||
|
||||
898
apps/mobile/package-lock.json
generated
898
apps/mobile/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@notesnook/mobile",
|
||||
"version": "3.0.23",
|
||||
"version": "3.0.18",
|
||||
"private": true,
|
||||
"license": "GPL-3.0-or-later",
|
||||
"workspaces": [
|
||||
@@ -45,6 +45,8 @@
|
||||
"@notesnook/themes-server": "file:../../servers/themes",
|
||||
"diffblazer": "^1.0.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.74.5"
|
||||
"react-native": "0.74.5",
|
||||
"react-native-actions-sheet": "^0.9.7",
|
||||
"react-native-mmkv-storage": "^0.10.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
diff --git a/node_modules/react-native-fingerprint-scanner/android/build.gradle b/node_modules/react-native-fingerprint-scanner/android/build.gradle
|
||||
index eaf3829..6c392ba 100644
|
||||
--- a/node_modules/react-native-fingerprint-scanner/android/build.gradle
|
||||
+++ b/node_modules/react-native-fingerprint-scanner/android/build.gradle
|
||||
@@ -49,5 +49,5 @@ dependencies {
|
||||
// 1.2.3 is the minimum version compatible with androidx.
|
||||
// See https://github.com/uccmawei/FingerprintIdentify/issues/74
|
||||
// (translation https://translate.google.com/translate?sl=zh-CN&tl=en&u=https://github.com/uccmawei/FingerprintIdentify/issues/74)
|
||||
- implementation "com.wei.android.lib:fingerprintidentify:${safeExtGet("fingerprintidentify", "1.2.6")}"
|
||||
+ implementation "com.github.uccmawei:FingerprintIdentify:1.2.6"
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
diff --git a/node_modules/react-native-material-menu/dist/Menu.js b/node_modules/react-native-material-menu/dist/Menu.js
|
||||
index 64fbf13..c7fcee0 100644
|
||||
--- a/node_modules/react-native-material-menu/dist/Menu.js
|
||||
+++ b/node_modules/react-native-material-menu/dist/Menu.js
|
||||
@@ -132,10 +132,13 @@ class Menu extends react_1.default.Component {
|
||||
else if (left < SCREEN_INDENT) {
|
||||
left = SCREEN_INDENT;
|
||||
}
|
||||
+ console.log(top, windowHeight - menuHeight - SCREEN_INDENT);
|
||||
// Flip by Y axis if menu hits bottom screen border
|
||||
if (top > windowHeight - menuHeight - SCREEN_INDENT) {
|
||||
+ const diff = top - (windowHeight - menuHeight - SCREEN_INDENT);
|
||||
+ const fraction = (diff / menuHeight);
|
||||
transforms.push({
|
||||
- translateY: react_native_1.Animated.multiply(menuSizeAnimation.y, -1),
|
||||
+ translateY: react_native_1.Animated.multiply(menuSizeAnimation.y, -(fraction + 1)),
|
||||
});
|
||||
top = windowHeight - SCREEN_INDENT;
|
||||
top = Math.min(windowHeight - SCREEN_INDENT, top + buttonHeight);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,600 @@
|
||||
diff --git a/node_modules/react-native-reanimated-material-menu/src/Menu.js b/node_modules/react-native-reanimated-material-menu/src/Menu.js
|
||||
deleted file mode 100644
|
||||
index 69065f0..0000000
|
||||
--- a/node_modules/react-native-reanimated-material-menu/src/Menu.js
|
||||
+++ /dev/null
|
||||
@@ -1,268 +0,0 @@
|
||||
-import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||
-import {
|
||||
- Dimensions, I18nManager, Modal,
|
||||
- Platform,
|
||||
- StatusBar,
|
||||
- StyleSheet,
|
||||
- TouchableWithoutFeedback,
|
||||
- View
|
||||
-} from 'react-native';
|
||||
-import Animated, { Easing, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
||||
-
|
||||
-const STATES = {
|
||||
- HIDDEN: 'HIDDEN',
|
||||
- ANIMATING: 'ANIMATING',
|
||||
- SHOWN: 'SHOWN',
|
||||
-};
|
||||
-
|
||||
-const EASING = Easing.bezier(0.4, 0, 0.2, 1);
|
||||
-const SCREEN_INDENT = 8;
|
||||
-
|
||||
-const Menu = ({ animationDuration = 300, ...props }, ref) => {
|
||||
- const container = useRef();
|
||||
- const [state, setState] = useState({
|
||||
- menuState: STATES.HIDDEN,
|
||||
-
|
||||
- top: 0,
|
||||
- left: 0,
|
||||
-
|
||||
- menuWidth: 0,
|
||||
- menuHeight: 0,
|
||||
-
|
||||
- buttonWidth: 0,
|
||||
- buttonHeight: 0,
|
||||
- });
|
||||
- const menuSizeXAnimation = useSharedValue(0);
|
||||
- const menuSizeYAnimation = useSharedValue(0);
|
||||
- const opacityAnimation = useSharedValue(0);
|
||||
-
|
||||
- const _onMenuLayout = e => {
|
||||
- if (state.menuState === STATES.ANIMATING) {
|
||||
- return;
|
||||
- }
|
||||
- const { width, height } = e.nativeEvent.layout;
|
||||
- setState(state => {
|
||||
- return {
|
||||
- ...state,
|
||||
- menuState: STATES.ANIMATING,
|
||||
- menuWidth: width,
|
||||
- menuHeight: height,
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- );
|
||||
- };
|
||||
-
|
||||
- useEffect(() => {
|
||||
- if (menuState === STATES.ANIMATING) {
|
||||
-
|
||||
- menuSizeXAnimation.value = withTiming(state.menuWidth, {
|
||||
- duration: animationDuration * 2,
|
||||
- easing: EASING
|
||||
- })
|
||||
- menuSizeYAnimation.value = withTiming(state.menuHeight, {
|
||||
- duration: animationDuration,
|
||||
- easing: EASING
|
||||
- })
|
||||
- opacityAnimation.value = withTiming(1, {
|
||||
- duration: animationDuration + 25,
|
||||
- easing: EASING
|
||||
- })
|
||||
- }
|
||||
- }, [state])
|
||||
-
|
||||
- const _onDismiss = () => {
|
||||
- if (props.onHidden) {
|
||||
- props.onHidden();
|
||||
- }
|
||||
- };
|
||||
- useImperativeHandle(ref, () => {
|
||||
- return {
|
||||
- show: () => {
|
||||
- container.current.measureInWindow((left, top, buttonWidth, buttonHeight) => {
|
||||
-
|
||||
- setState(state => {
|
||||
-
|
||||
- return {
|
||||
- ...state,
|
||||
- buttonHeight,
|
||||
- buttonWidth,
|
||||
- left,
|
||||
- menuState: STATES.SHOWN,
|
||||
- top,
|
||||
- }
|
||||
- });
|
||||
- });
|
||||
- },
|
||||
-
|
||||
- hide: hide
|
||||
- }
|
||||
-
|
||||
- }, [hide, container])
|
||||
-
|
||||
- const hide = onHidden => {
|
||||
- opacityAnimation.value = withTiming(0, {
|
||||
- duration: animationDuration,
|
||||
- easing: EASING
|
||||
- });
|
||||
- setTimeout(() => {
|
||||
- setState(
|
||||
- state => {
|
||||
- return {
|
||||
- ...state,
|
||||
- menuState: STATES.HIDDEN,
|
||||
- }
|
||||
- }
|
||||
- );
|
||||
- menuSizeXAnimation.value = 0;
|
||||
- menuSizeYAnimation.value = 0;
|
||||
- opacityAnimation.value = 0;
|
||||
-
|
||||
- onHidden && onHidden();
|
||||
- if (Platform.OS !== 'ios' && props.onHidden) {
|
||||
- props.onHidden();
|
||||
- }
|
||||
- }, props.animationDuration)
|
||||
-
|
||||
- };
|
||||
-
|
||||
- // @@ TODO: Rework this
|
||||
- const _hide = () => {
|
||||
- hide();
|
||||
- };
|
||||
-
|
||||
-
|
||||
- const menuSize = useAnimatedStyle(() => {
|
||||
- return {
|
||||
- width: menuSizeXAnimation.value,
|
||||
- height: menuSizeYAnimation.value,
|
||||
- }
|
||||
- });
|
||||
- const shadowMenuContainerStyle = useAnimatedStyle(() => {
|
||||
- return {
|
||||
- opacity: opacityAnimation.value,
|
||||
- };
|
||||
- }, [state])
|
||||
-
|
||||
- const { isRTL } = I18nManager;
|
||||
- const dimensions = Dimensions.get('window');
|
||||
- const { width: windowWidth } = dimensions;
|
||||
- const windowHeight = dimensions.height - (StatusBar.currentHeight || 0);
|
||||
- const {
|
||||
- menuWidth,
|
||||
- menuHeight,
|
||||
- buttonWidth,
|
||||
- buttonHeight,
|
||||
- } = state;
|
||||
-
|
||||
- // Adjust position of menu
|
||||
- let { left, top } = state;
|
||||
- const transforms = [];
|
||||
- if (
|
||||
- (isRTL && left + buttonWidth - menuWidth > SCREEN_INDENT) ||
|
||||
- (!isRTL && left + menuWidth > windowWidth - SCREEN_INDENT)
|
||||
- ) {
|
||||
- transforms.push({
|
||||
- translateX: menuSizeXAnimation.value * -1,
|
||||
- });
|
||||
-
|
||||
- left = Math.min(windowWidth - SCREEN_INDENT, left + buttonWidth);
|
||||
- } else if (left < SCREEN_INDENT) {
|
||||
- left = SCREEN_INDENT;
|
||||
- }
|
||||
-
|
||||
-
|
||||
- // Flip by Y axis if menu hits bottom screen border
|
||||
- if (top > windowHeight - menuHeight - SCREEN_INDENT) {
|
||||
- transforms.push({
|
||||
- translateY: menuSizeYAnimation.value * -1,
|
||||
- });
|
||||
-
|
||||
- top = windowHeight - SCREEN_INDENT;
|
||||
- top = Math.min(windowHeight - SCREEN_INDENT, top + buttonHeight);
|
||||
- } else if (top < SCREEN_INDENT) {
|
||||
- top = SCREEN_INDENT;
|
||||
- }
|
||||
-
|
||||
- const extraStyles = {
|
||||
- transform: transforms,
|
||||
- top,
|
||||
-
|
||||
- // Switch left to right for rtl devices
|
||||
- ...(isRTL ? { right: left } : { left }),
|
||||
- }
|
||||
-
|
||||
- const { menuState } = state;
|
||||
- const animationStarted = menuState === STATES.ANIMATING;
|
||||
- const modalVisible = menuState === STATES.SHOWN || animationStarted;
|
||||
-
|
||||
- const { testID, button, style, children } = props;
|
||||
-
|
||||
- return <View ref={container} collapsable={false} testID={testID}>
|
||||
- <View>{button}</View>
|
||||
-
|
||||
- <Modal
|
||||
- visible={modalVisible}
|
||||
- onRequestClose={_hide}
|
||||
- supportedOrientations={[
|
||||
- 'portrait',
|
||||
- 'portrait-upside-down',
|
||||
- 'landscape',
|
||||
- 'landscape-left',
|
||||
- 'landscape-right',
|
||||
- ]}
|
||||
- transparent
|
||||
- onDismiss={_onDismiss}
|
||||
- >
|
||||
- <TouchableWithoutFeedback onPress={_hide} accessible={false}>
|
||||
- <View style={StyleSheet.absoluteFill}>
|
||||
- <Animated.View
|
||||
- onLayout={_onMenuLayout}
|
||||
- style={[
|
||||
- styles.shadowMenuContainer,
|
||||
- shadowMenuContainerStyle,
|
||||
- extraStyles,
|
||||
- style,
|
||||
- ]}
|
||||
- >
|
||||
- <Animated.View
|
||||
- style={[styles.menuContainer, animationStarted && menuSize]}
|
||||
- >
|
||||
- {children}
|
||||
- </Animated.View>
|
||||
- </Animated.View>
|
||||
- </View>
|
||||
- </TouchableWithoutFeedback>
|
||||
- </Modal>
|
||||
- </View>
|
||||
-
|
||||
-}
|
||||
-
|
||||
-
|
||||
-const styles = StyleSheet.create({
|
||||
- shadowMenuContainer: {
|
||||
- position: 'absolute',
|
||||
- backgroundColor: 'white',
|
||||
- borderRadius: 4,
|
||||
- opacity: 0,
|
||||
- overflow: "hidden",
|
||||
-
|
||||
- // Shadow
|
||||
- ...Platform.select({
|
||||
- ios: {
|
||||
- shadowColor: 'black',
|
||||
- shadowOffset: { width: 0.3 * 5, height: 0.5 * 5 },
|
||||
- shadowOpacity: 0.2,
|
||||
- shadowRadius: 0.7 * 5,
|
||||
- },
|
||||
- android: {
|
||||
- elevation: 8,
|
||||
- },
|
||||
- }),
|
||||
- },
|
||||
- menuContainer: {
|
||||
- overflow: 'hidden',
|
||||
- },
|
||||
-});
|
||||
-
|
||||
-export default forwardRef(Menu);
|
||||
diff --git a/node_modules/react-native-reanimated-material-menu/src/Menu.tsx b/node_modules/react-native-reanimated-material-menu/src/Menu.tsx
|
||||
new file mode 100644
|
||||
index 0000000..c3bc1c9
|
||||
--- /dev/null
|
||||
+++ b/node_modules/react-native-reanimated-material-menu/src/Menu.tsx
|
||||
@@ -0,0 +1,303 @@
|
||||
+import React from 'react';
|
||||
+
|
||||
+import {
|
||||
+ Animated,
|
||||
+ Dimensions,
|
||||
+ Easing,
|
||||
+ I18nManager,
|
||||
+ LayoutChangeEvent,
|
||||
+ Modal,
|
||||
+ Platform,
|
||||
+ ScrollView,
|
||||
+ StatusBar,
|
||||
+ StyleSheet,
|
||||
+ TouchableWithoutFeedback,
|
||||
+ View,
|
||||
+ ViewStyle,
|
||||
+} from 'react-native';
|
||||
+
|
||||
+export interface MenuProps {
|
||||
+ children?: React.ReactNode;
|
||||
+ anchor?: React.ReactNode;
|
||||
+ style?: ViewStyle;
|
||||
+ onRequestClose?(): void;
|
||||
+ animationDuration?: number;
|
||||
+ testID?: string;
|
||||
+ visible?: boolean;
|
||||
+}
|
||||
+
|
||||
+enum States {
|
||||
+ Hidden,
|
||||
+ Animating,
|
||||
+ Shown,
|
||||
+}
|
||||
+
|
||||
+interface State {
|
||||
+ buttonHeight: number;
|
||||
+ buttonWidth: number;
|
||||
+ left: number;
|
||||
+ menuHeight: number;
|
||||
+ menuSizeAnimation: Animated.ValueXY;
|
||||
+ menuState: States;
|
||||
+ menuWidth: number;
|
||||
+ opacityAnimation: Animated.Value;
|
||||
+ top: number;
|
||||
+}
|
||||
+
|
||||
+const EASING = Easing.bezier(0.4, 0, 0.2, 1);
|
||||
+const SCREEN_INDENT = 8;
|
||||
+const SCREEN_INDENT_VERTICAL = 80;
|
||||
+
|
||||
+class Menu extends React.Component<MenuProps, State> {
|
||||
+ _container: View | null = null;
|
||||
+
|
||||
+ static defaultProps = {
|
||||
+ animationDuration: 300,
|
||||
+ };
|
||||
+
|
||||
+ constructor(props: MenuProps) {
|
||||
+ super(props);
|
||||
+
|
||||
+ this.state = {
|
||||
+ menuState: States.Hidden,
|
||||
+
|
||||
+ top: 0,
|
||||
+ left: 0,
|
||||
+
|
||||
+ menuWidth: 0,
|
||||
+ menuHeight: 0,
|
||||
+
|
||||
+ buttonWidth: 0,
|
||||
+ buttonHeight: 0,
|
||||
+
|
||||
+ menuSizeAnimation: new Animated.ValueXY({ x: 0, y: 0 }),
|
||||
+ opacityAnimation: new Animated.Value(0),
|
||||
+ };
|
||||
+ }
|
||||
+
|
||||
+ componentDidMount() {
|
||||
+ if (!this.props.visible) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ this.show();
|
||||
+ }
|
||||
+
|
||||
+ componentDidUpdate(prevProps: MenuProps) {
|
||||
+ if (prevProps.visible === this.props.visible) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (this.props.visible) {
|
||||
+ this.show();
|
||||
+ } else {
|
||||
+ this.hide();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private setContainerRef = (ref: View) => {
|
||||
+ this._container = ref;
|
||||
+ };
|
||||
+
|
||||
+ // Start menu animation
|
||||
+ private onMenuLayout = (e: LayoutChangeEvent) => {
|
||||
+ if (this.state.menuState === States.Animating) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ const { width, height } = e.nativeEvent.layout;
|
||||
+ let timeout:any = 0;
|
||||
+ this.setState(
|
||||
+ {
|
||||
+ menuState: States.Animating,
|
||||
+ menuWidth: width,
|
||||
+ menuHeight: height,
|
||||
+ },
|
||||
+ () => {
|
||||
+ Animated.parallel([
|
||||
+ Animated.timing(this.state.menuSizeAnimation, {
|
||||
+ toValue: { x: width, y: height },
|
||||
+ duration: this.props.animationDuration,
|
||||
+ easing: EASING,
|
||||
+ useNativeDriver: false,
|
||||
+ }),
|
||||
+ Animated.timing(this.state.opacityAnimation, {
|
||||
+ toValue: 1,
|
||||
+ duration: this.props.animationDuration,
|
||||
+ easing: EASING,
|
||||
+ useNativeDriver: false,
|
||||
+ }),
|
||||
+ ]).start(({finished}) => {
|
||||
+ if (finished) {
|
||||
+ clearTimeout(timeout);
|
||||
+ timeout = setTimeout(() => {
|
||||
+ this.setState({
|
||||
+ menuState: States.Shown
|
||||
+ })
|
||||
+ },20)
|
||||
+
|
||||
+ }
|
||||
+ });
|
||||
+ },
|
||||
+ );
|
||||
+ };
|
||||
+
|
||||
+ show = () => {
|
||||
+ this._container?.measureInWindow((left, top, buttonWidth, buttonHeight) => {
|
||||
+ this.setState({
|
||||
+ buttonHeight,
|
||||
+ buttonWidth,
|
||||
+ left,
|
||||
+ menuState: States.Shown,
|
||||
+ top,
|
||||
+ });
|
||||
+ });
|
||||
+ };
|
||||
+
|
||||
+ hide = () => {
|
||||
+ Animated.timing(this.state.opacityAnimation, {
|
||||
+ toValue: 0,
|
||||
+ duration: this.props.animationDuration,
|
||||
+ easing: EASING,
|
||||
+ useNativeDriver: false,
|
||||
+ }).start(() => {
|
||||
+ // Reset state
|
||||
+ this.setState({
|
||||
+ menuState: States.Hidden,
|
||||
+ menuSizeAnimation: new Animated.ValueXY({ x: 0, y: 0 }),
|
||||
+ opacityAnimation: new Animated.Value(0),
|
||||
+ });
|
||||
+ });
|
||||
+ };
|
||||
+
|
||||
+ private onRequestClose = () => {
|
||||
+ this.props.onRequestClose?.();
|
||||
+ };
|
||||
+
|
||||
+ render() {
|
||||
+ const { isRTL } = I18nManager;
|
||||
+
|
||||
+ const dimensions = Dimensions.get('window');
|
||||
+ const { width: windowWidth } = dimensions;
|
||||
+ const windowHeight = dimensions.height - (StatusBar.currentHeight || 0);
|
||||
+
|
||||
+ const {
|
||||
+ menuSizeAnimation,
|
||||
+ menuWidth,
|
||||
+ menuHeight,
|
||||
+ buttonWidth,
|
||||
+ buttonHeight,
|
||||
+ opacityAnimation,
|
||||
+ } = this.state;
|
||||
+ const menuSize = {
|
||||
+ width: menuSizeAnimation.x,
|
||||
+ height: menuSizeAnimation.y,
|
||||
+ };
|
||||
+
|
||||
+ // Adjust position of menu
|
||||
+ let { left, top } = this.state;
|
||||
+ const transforms:any[] = [];
|
||||
+
|
||||
+ if (
|
||||
+ (isRTL && left + buttonWidth - menuWidth > SCREEN_INDENT) ||
|
||||
+ (!isRTL && left + menuWidth > windowWidth - SCREEN_INDENT)
|
||||
+ ) {
|
||||
+ transforms.push({
|
||||
+ translateX: Animated.multiply(menuSizeAnimation.x, -1),
|
||||
+ } as never);
|
||||
+
|
||||
+ left = Math.min(windowWidth - SCREEN_INDENT, left + buttonWidth);
|
||||
+ } else if (left < SCREEN_INDENT) {
|
||||
+ left = SCREEN_INDENT;
|
||||
+ }
|
||||
+
|
||||
+ // Flip by Y axis if menu hits bottom screen border
|
||||
+ if (top > windowHeight - menuHeight - SCREEN_INDENT_VERTICAL) {
|
||||
+ transforms.push({
|
||||
+ translateY: Animated.multiply(menuSizeAnimation.y, -1),
|
||||
+ } as never);
|
||||
+
|
||||
+ top = windowHeight - SCREEN_INDENT_VERTICAL;
|
||||
+ top = Math.min(windowHeight - SCREEN_INDENT_VERTICAL, top + buttonHeight);
|
||||
+ } else if (top < SCREEN_INDENT_VERTICAL) {
|
||||
+ top = SCREEN_INDENT_VERTICAL;
|
||||
+ }
|
||||
+
|
||||
+ const shadowMenuContainerStyle = {
|
||||
+ opacity: opacityAnimation,
|
||||
+ transform: transforms,
|
||||
+ maxHeight: 500,
|
||||
+ top,
|
||||
+
|
||||
+ // Switch left to right for rtl devices
|
||||
+ ...(isRTL ? { right: left } : { left }),
|
||||
+ };
|
||||
+ const { menuState } = this.state;
|
||||
+ const animationStarted = menuState === States.Animating;
|
||||
+ const modalVisible = menuState === States.Shown || animationStarted;
|
||||
+
|
||||
+ const { testID, anchor, style, children } = this.props;
|
||||
+
|
||||
+ return (
|
||||
+ <View ref={this.setContainerRef} collapsable={false} testID={testID}>
|
||||
+ {anchor}
|
||||
+
|
||||
+ <Modal
|
||||
+ visible={modalVisible}
|
||||
+ onRequestClose={this.onRequestClose}
|
||||
+ supportedOrientations={[
|
||||
+ 'portrait',
|
||||
+ 'portrait-upside-down',
|
||||
+ 'landscape',
|
||||
+ 'landscape-left',
|
||||
+ 'landscape-right',
|
||||
+ ]}
|
||||
+ transparent
|
||||
+ >
|
||||
+ <TouchableWithoutFeedback onPress={this.onRequestClose} accessible={false}>
|
||||
+ <View style={StyleSheet.absoluteFill}>
|
||||
+ <Animated.View
|
||||
+ onLayout={this.onMenuLayout}
|
||||
+ style={[styles.shadowMenuContainer, shadowMenuContainerStyle, style]}
|
||||
+ >
|
||||
+ <Animated.View style={[styles.menuContainer, animationStarted && menuSize]}>
|
||||
+ <ScrollView showsVerticalScrollIndicator={menuState !== States.Animating} >
|
||||
+ {children}
|
||||
+ </ScrollView>
|
||||
+ </Animated.View>
|
||||
+ </Animated.View>
|
||||
+ </View>
|
||||
+ </TouchableWithoutFeedback>
|
||||
+ </Modal>
|
||||
+ </View>
|
||||
+ );
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+const styles = StyleSheet.create({
|
||||
+ shadowMenuContainer: {
|
||||
+ position: 'absolute',
|
||||
+ backgroundColor: 'white',
|
||||
+ borderRadius: 4,
|
||||
+ opacity: 0,
|
||||
+
|
||||
+ // Shadow
|
||||
+ ...Platform.select({
|
||||
+ ios: {
|
||||
+ shadowColor: 'black',
|
||||
+ shadowOffset: { width: 0, height: 2 },
|
||||
+ shadowOpacity: 0.14,
|
||||
+ shadowRadius: 2,
|
||||
+ },
|
||||
+ android: {
|
||||
+ elevation: 8,
|
||||
+ },
|
||||
+ }),
|
||||
+ },
|
||||
+ menuContainer: {
|
||||
+ overflow: 'hidden',
|
||||
+ },
|
||||
+});
|
||||
+
|
||||
+
|
||||
+export default Menu
|
||||
\ No newline at end of file
|
||||
diff --git a/node_modules/react-native-reanimated-material-menu/src/MenuItem.js b/node_modules/react-native-reanimated-material-menu/src/MenuItem.js
|
||||
index 120a870..d6459c0 100644
|
||||
--- a/node_modules/react-native-reanimated-material-menu/src/MenuItem.js
|
||||
+++ b/node_modules/react-native-reanimated-material-menu/src/MenuItem.js
|
||||
@@ -14,6 +14,11 @@ const Touchable =
|
||||
? TouchableNativeFeedback
|
||||
: TouchableHighlight;
|
||||
|
||||
+/**
|
||||
+ *
|
||||
+ * @param {any} param0
|
||||
+ * @returns
|
||||
+ */
|
||||
function MenuItem({
|
||||
children,
|
||||
disabled,
|
||||
@@ -1,18 +0,0 @@
|
||||
diff --git a/node_modules/react-native-zip-archive/RNZipArchive.podspec b/node_modules/react-native-zip-archive/RNZipArchive.podspec
|
||||
index 8eebcdc..81c0ed5 100644
|
||||
--- a/node_modules/react-native-zip-archive/RNZipArchive.podspec
|
||||
+++ b/node_modules/react-native-zip-archive/RNZipArchive.podspec
|
||||
@@ -10,12 +10,11 @@ Pod::Spec.new do |s|
|
||||
s.license = package['license']
|
||||
s.homepage = 'https://github.com/mockingbot/react-native-zip-archive'
|
||||
s.source = { :git => 'https://github.com/mockingbot/react-native-zip-archive.git', :tag => "#{s.version}"}
|
||||
- s.platform = :ios, '9.0'
|
||||
+ s.platform = :ios, '10.0'
|
||||
s.preserve_paths = '*.js'
|
||||
|
||||
s.dependency 'React-Core'
|
||||
s.dependency 'SSZipArchive', '~>2.2'
|
||||
- s.compiler_flags = '-GCC_PREPROCESSOR_DEFINITIONS="HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB MZ_ZIP_NO_SIGNING $(inherited)"'
|
||||
|
||||
s.subspec 'Core' do |ss|
|
||||
ss.source_files = 'ios/*.{h,m}'
|
||||
@@ -13,8 +13,6 @@ RUN mv build/package.json .
|
||||
|
||||
RUN npm install
|
||||
|
||||
RUN npm install --include=optional sharp
|
||||
|
||||
RUN ls
|
||||
|
||||
CMD [ "npm", "run", "start" ]
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
This file is part of the Notesnook project (https://notesnook.com/)
|
||||
|
||||
Copyright (C) 2023 Streetwriters (Private) Limited
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
type Formats = {
|
||||
"text/html"?: string;
|
||||
"text/markdown"?: string;
|
||||
"text/plain": string;
|
||||
};
|
||||
const COPYABLE_FORMATS = ["text/html", "text/plain"] as const;
|
||||
export async function writeToClipboard(formats: Formats) {
|
||||
if ("ClipboardItem" in window) {
|
||||
const items: Record<string, Blob> = Object.fromEntries(
|
||||
COPYABLE_FORMATS.filter((f) => !!formats[f]).map((f) => {
|
||||
const content = formats[f];
|
||||
if (!content) return [];
|
||||
return [f, textToBlob(content, f)] as const;
|
||||
})
|
||||
);
|
||||
return navigator.clipboard.write([new ClipboardItem(items)]);
|
||||
} else
|
||||
return navigator.clipboard.writeText(
|
||||
formats["text/markdown"] || formats["text/plain"]
|
||||
);
|
||||
}
|
||||
|
||||
function textToBlob(text: string, type: string) {
|
||||
return new Blob([new TextEncoder().encode(text)], { type });
|
||||
}
|
||||
@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import { useTiptap } from "@notesnook/editor";
|
||||
import { writeToClipboard } from "./clipboard";
|
||||
|
||||
export type TipTapProps = {
|
||||
editorContainer: () => HTMLElement;
|
||||
@@ -35,10 +34,7 @@ export default function TipTap(props: TipTapProps) {
|
||||
content,
|
||||
onCreate: () => {
|
||||
if (onLoad) onLoad();
|
||||
},
|
||||
copyToClipboard(text, html) {
|
||||
writeToClipboard({"text/plain": text, "text/html": html});
|
||||
},
|
||||
}
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
||||
@@ -46,13 +46,12 @@ type Monograph = {
|
||||
type MonographResponse = Omit<Monograph, "content"> & { content: string };
|
||||
|
||||
export const meta: MetaFunction<typeof loader> = ({ data }) => {
|
||||
if (!data || !data.metadata || !data.monograph) return [];
|
||||
|
||||
const imageUrl = `${PUBLIC_URL}/api/og.png?${new URLSearchParams({
|
||||
title: data?.metadata?.title || "",
|
||||
description: data?.metadata?.fullDescription
|
||||
? Buffer.from(data.metadata.fullDescription, "utf-8").toString("base64")
|
||||
: "",
|
||||
description: Buffer.from(
|
||||
data?.metadata?.fullDescription || "",
|
||||
"utf-8"
|
||||
).toString("base64"),
|
||||
date: data?.metadata?.datePublished || ""
|
||||
}).toString()}`;
|
||||
|
||||
|
||||
@@ -34,14 +34,11 @@ export async function loader({ request }: LoaderFunctionArgs) {
|
||||
});
|
||||
|
||||
return new Response(
|
||||
await makeImage(
|
||||
{
|
||||
date,
|
||||
description,
|
||||
title
|
||||
},
|
||||
url.search
|
||||
),
|
||||
await makeImage({
|
||||
date,
|
||||
description,
|
||||
title
|
||||
}),
|
||||
{
|
||||
status: 200,
|
||||
headers: {
|
||||
|
||||
@@ -17,15 +17,12 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { json, LoaderFunctionArgs } from "@remix-run/node";
|
||||
import { cors } from "remix-utils/cors";
|
||||
import { COMPATIBILITY_VERSION, INSTANCE_NAME } from "../utils/env";
|
||||
|
||||
export async function loader({ request }: LoaderFunctionArgs) {
|
||||
const response = json({
|
||||
export async function loader() {
|
||||
return Response.json({
|
||||
version: COMPATIBILITY_VERSION,
|
||||
id: "monograph",
|
||||
instance: INSTANCE_NAME
|
||||
});
|
||||
return cors(request, response);
|
||||
}
|
||||
|
||||
@@ -17,12 +17,13 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const p = "process" in globalThis ? globalThis.process : ({ env: {} } as any);
|
||||
export const API_HOST =
|
||||
import.meta.env.API_HOST || p.env.API_HOST || `https://api.notesnook.com`;
|
||||
import.meta.env.API_HOST ||
|
||||
process.env.API_HOST ||
|
||||
`https://api.notesnook.com`;
|
||||
export const PUBLIC_URL =
|
||||
import.meta.env.PUBLIC_URL ||
|
||||
p.env.PUBLIC_URL ||
|
||||
`http://localhost:${import.meta.env.PORT || p.env.PORT || 5173}`;
|
||||
process.env.PUBLIC_URL ||
|
||||
`http://localhost:${import.meta.env.PORT || process.env.PORT || 5017}`;
|
||||
export const COMPATIBILITY_VERSION = 1;
|
||||
export const INSTANCE_NAME = p.env.INSTANCE_NAME || "default";
|
||||
export const INSTANCE_NAME = process.env.INSTANCE_NAME || "default";
|
||||
|
||||
@@ -19,42 +19,96 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import satori from "satori";
|
||||
import { ThemeDark } from "@notesnook/theme";
|
||||
import sharp from "sharp";
|
||||
import { svg2png, initialize } from "svg2png-wasm";
|
||||
import svg2pngWasm from "svg2png-wasm/svg2png_wasm_bg.wasm?arraybuffer";
|
||||
import fontRegular from "../assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.ttf?arraybuffer";
|
||||
import fontBold from "../assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.ttf?arraybuffer";
|
||||
import {} from "lru-cache";
|
||||
import { Readable } from "node:stream";
|
||||
import { LRUCache } from "lru-cache";
|
||||
|
||||
export type OGMetadata = { title: string; description: string; date: string };
|
||||
|
||||
const cache = new LRUCache<string, string>({
|
||||
ttl: 1000 * 60 * 60 * 24,
|
||||
ttlAutopurge: true
|
||||
});
|
||||
await initialize(svg2pngWasm);
|
||||
|
||||
export async function makeImage(metadata: OGMetadata, cacheKey: string) {
|
||||
export async function makeImage(metadata: OGMetadata) {
|
||||
const theme = ThemeDark.scopes.base;
|
||||
|
||||
console.time("satori");
|
||||
let svg = cache.get(cacheKey);
|
||||
|
||||
if (!svg) {
|
||||
svg = await satori(
|
||||
<div
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
height: "100%",
|
||||
borderBottom: "10px solid #008837",
|
||||
backgroundColor: theme.primary.background,
|
||||
width: "100%",
|
||||
padding: 50,
|
||||
margin: 0
|
||||
}}
|
||||
>
|
||||
<div style={{ display: "flex", flexDirection: "column" }}>
|
||||
const svg = await satori(
|
||||
<div
|
||||
style={{
|
||||
flexDirection: "column",
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
height: "100%",
|
||||
borderBottom: "10px solid #008837",
|
||||
width: "100%",
|
||||
padding: 50,
|
||||
margin: 0
|
||||
}}
|
||||
>
|
||||
<div style={{ display: "flex", flexDirection: "column" }}>
|
||||
<p
|
||||
style={{ fontSize: 25, margin: 0, color: theme.secondary.paragraph }}
|
||||
>
|
||||
{metadata.date}
|
||||
</p>
|
||||
<h1
|
||||
style={{
|
||||
margin: 0,
|
||||
marginTop: 5,
|
||||
fontSize: 64,
|
||||
fontWeight: 600,
|
||||
color: theme.primary.heading
|
||||
}}
|
||||
>
|
||||
{metadata.title}
|
||||
</h1>
|
||||
<p
|
||||
style={{
|
||||
margin: 0,
|
||||
marginTop: 5,
|
||||
fontSize: 30,
|
||||
color: theme.primary.paragraph
|
||||
}}
|
||||
>
|
||||
{Buffer.from(metadata.description || "", "base64").toString("utf-8")}
|
||||
</p>
|
||||
</div>
|
||||
<div style={{ display: "flex", flexDirection: "row", flexShrink: 0 }}>
|
||||
<svg
|
||||
width="80"
|
||||
height="80"
|
||||
viewBox="0 0 1024 1024"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<g clipPath="url(#clip0_25_12)">
|
||||
<path d="M1024 0H0V1024H1024V0Z" fill="white" />
|
||||
<path
|
||||
d="M736.652 699.667C719.397 750.078 684.817 792.732 639.064 820.039C593.311 847.346 539.354 857.535 486.794 848.792C434.234 840.049 386.481 812.942 352.032 772.294C317.583 731.646 298.673 680.095 298.667 626.812V516.562L377.788 549.615V626.767C377.78 647.546 382.221 668.085 390.812 687.005C399.402 705.924 411.943 722.785 427.592 736.455C430.562 739.042 433.644 741.562 436.828 743.914C460.184 761.302 488.23 771.266 517.322 772.511C518.312 772.511 519.268 772.59 520.247 772.612C521.225 772.635 522.497 772.612 523.622 772.612C524.747 772.612 525.872 772.612 526.997 772.612C528.122 772.612 528.932 772.612 529.922 772.511C559.002 771.263 587.038 761.308 610.393 743.936C613.565 741.585 616.648 739.076 619.629 736.489C640.186 718.51 655.286 695.123 663.212 668.989L736.652 699.667Z"
|
||||
fill="black"
|
||||
/>
|
||||
<path
|
||||
d="M748.667 430.748V626.813C748.667 629.344 748.667 631.887 748.509 634.418L669.545 601.399V430.748C669.533 393.064 654.939 356.847 628.82 329.682C602.702 302.518 567.086 286.514 529.431 285.022C491.777 283.53 455.006 296.666 426.82 321.679C398.634 346.692 381.221 381.641 378.227 419.206C377.945 423.008 377.788 426.867 377.788 430.748V479.461L298.667 446.386V205.748H523.667C583.34 205.748 640.57 229.453 682.766 271.649C724.961 313.845 748.667 371.074 748.667 430.748Z"
|
||||
fill="black"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_25_12">
|
||||
<rect width="1024" height="1024" rx="200" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<div
|
||||
style={{ display: "flex", flexDirection: "column", marginLeft: 15 }}
|
||||
>
|
||||
<p
|
||||
style={{
|
||||
margin: 0,
|
||||
fontSize: 32,
|
||||
fontWeight: 600,
|
||||
color: theme.primary.heading
|
||||
}}
|
||||
>
|
||||
Notesnook Monograph
|
||||
</p>
|
||||
<p
|
||||
style={{
|
||||
fontSize: 25,
|
||||
@@ -62,105 +116,33 @@ export async function makeImage(metadata: OGMetadata, cacheKey: string) {
|
||||
color: theme.secondary.paragraph
|
||||
}}
|
||||
>
|
||||
{metadata.date}
|
||||
</p>
|
||||
<h1
|
||||
style={{
|
||||
margin: 0,
|
||||
marginTop: 5,
|
||||
fontSize: 64,
|
||||
fontWeight: 600,
|
||||
color: theme.primary.heading
|
||||
}}
|
||||
>
|
||||
{metadata.title}
|
||||
</h1>
|
||||
<p
|
||||
style={{
|
||||
margin: 0,
|
||||
marginTop: 5,
|
||||
fontSize: 30,
|
||||
color: theme.primary.paragraph
|
||||
}}
|
||||
>
|
||||
{Buffer.from(metadata.description || "", "base64").toString(
|
||||
"utf-8"
|
||||
)}
|
||||
Anonymous, secure, and encrypted note sharing with password
|
||||
protection.
|
||||
</p>
|
||||
</div>
|
||||
<div style={{ display: "flex", flexDirection: "row", flexShrink: 0 }}>
|
||||
<svg
|
||||
width="80"
|
||||
height="80"
|
||||
viewBox="0 0 1024 1024"
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<g clipPath="url(#clip0_25_12)">
|
||||
<path d="M1024 0H0V1024H1024V0Z" fill="white" />
|
||||
<path
|
||||
d="M736.652 699.667C719.397 750.078 684.817 792.732 639.064 820.039C593.311 847.346 539.354 857.535 486.794 848.792C434.234 840.049 386.481 812.942 352.032 772.294C317.583 731.646 298.673 680.095 298.667 626.812V516.562L377.788 549.615V626.767C377.78 647.546 382.221 668.085 390.812 687.005C399.402 705.924 411.943 722.785 427.592 736.455C430.562 739.042 433.644 741.562 436.828 743.914C460.184 761.302 488.23 771.266 517.322 772.511C518.312 772.511 519.268 772.59 520.247 772.612C521.225 772.635 522.497 772.612 523.622 772.612C524.747 772.612 525.872 772.612 526.997 772.612C528.122 772.612 528.932 772.612 529.922 772.511C559.002 771.263 587.038 761.308 610.393 743.936C613.565 741.585 616.648 739.076 619.629 736.489C640.186 718.51 655.286 695.123 663.212 668.989L736.652 699.667Z"
|
||||
fill="black"
|
||||
/>
|
||||
<path
|
||||
d="M748.667 430.748V626.813C748.667 629.344 748.667 631.887 748.509 634.418L669.545 601.399V430.748C669.533 393.064 654.939 356.847 628.82 329.682C602.702 302.518 567.086 286.514 529.431 285.022C491.777 283.53 455.006 296.666 426.82 321.679C398.634 346.692 381.221 381.641 378.227 419.206C377.945 423.008 377.788 426.867 377.788 430.748V479.461L298.667 446.386V205.748H523.667C583.34 205.748 640.57 229.453 682.766 271.649C724.961 313.845 748.667 371.074 748.667 430.748Z"
|
||||
fill="black"
|
||||
/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_25_12">
|
||||
<rect width="1024" height="1024" rx="200" fill="white" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<div
|
||||
style={{ display: "flex", flexDirection: "column", marginLeft: 15 }}
|
||||
>
|
||||
<p
|
||||
style={{
|
||||
margin: 0,
|
||||
fontSize: 32,
|
||||
fontWeight: 600,
|
||||
color: theme.primary.heading
|
||||
}}
|
||||
>
|
||||
Notesnook Monograph
|
||||
</p>
|
||||
<p
|
||||
style={{
|
||||
fontSize: 25,
|
||||
margin: 0,
|
||||
color: theme.secondary.paragraph
|
||||
}}
|
||||
>
|
||||
Anonymous, secure, and encrypted note sharing with password
|
||||
protection.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>,
|
||||
{
|
||||
width: 1200,
|
||||
height: 630,
|
||||
fonts: [
|
||||
{
|
||||
name: "Open Sans",
|
||||
data: fontRegular!,
|
||||
weight: 400,
|
||||
style: "normal"
|
||||
},
|
||||
{
|
||||
name: "Open Sans",
|
||||
data: fontBold!,
|
||||
weight: 600,
|
||||
style: "normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
cache.set(cacheKey, svg);
|
||||
}
|
||||
console.timeEnd("satori");
|
||||
</div>
|
||||
</div>,
|
||||
{
|
||||
width: 1200,
|
||||
height: 630,
|
||||
fonts: [
|
||||
{
|
||||
name: "Open Sans",
|
||||
data: fontRegular!,
|
||||
weight: 400,
|
||||
style: "normal"
|
||||
},
|
||||
{
|
||||
name: "Open Sans",
|
||||
data: fontBold!,
|
||||
weight: 600,
|
||||
style: "normal"
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
|
||||
return sharp(Buffer.from(svg)).png().toBuffer();
|
||||
return await svg2png(svg, {
|
||||
backgroundColor: "black"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ export async function read<T>(key: string, fallback: T) {
|
||||
}
|
||||
const value = (await provider).read<T>(key, fallback);
|
||||
cache[key] = {
|
||||
ttl: 5 * 60 * 1000,
|
||||
ttl: 5 * 60000,
|
||||
value,
|
||||
cachedAt: Date.now()
|
||||
};
|
||||
@@ -40,10 +40,6 @@ export async function read<T>(key: string, fallback: T) {
|
||||
}
|
||||
|
||||
export async function write<T>(key: string, data: T) {
|
||||
if (cache[key]) {
|
||||
cache[key].value = data;
|
||||
cache[key].cachedAt = Date.now();
|
||||
}
|
||||
return (await provider).write<T>(key, data);
|
||||
}
|
||||
|
||||
|
||||
528
apps/monograph/package-lock.json
generated
528
apps/monograph/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@notesnook/monograph",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@notesnook/monograph",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.0",
|
||||
"dependencies": {
|
||||
"@emotion/cache": "11.11.0",
|
||||
"@emotion/react": "11.11.1",
|
||||
@@ -30,7 +30,6 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"html-to-text": "^9.0.5",
|
||||
"isbot": "^5.1.17",
|
||||
"lru-cache": "^11.0.2",
|
||||
"mac-scrollbar": "^0.13.6",
|
||||
"nanoid": "^5.0.7",
|
||||
"react": "18.3.1",
|
||||
@@ -40,7 +39,6 @@
|
||||
"refractor": "^4.8.1",
|
||||
"remix-utils": "^7.7.0",
|
||||
"satori": "^0.11.1",
|
||||
"sharp": "^0.33.5",
|
||||
"slugify": "^1.6.6",
|
||||
"svg2png-wasm": "^1.4.1",
|
||||
"zustand": "^4.5.5"
|
||||
@@ -89,12 +87,11 @@
|
||||
"katex": "0.16.2",
|
||||
"linkedom": "^0.14.17",
|
||||
"liqe": "^1.13.0",
|
||||
"mime": "^4.0.4",
|
||||
"mime-db": "1.52.0",
|
||||
"prismjs": "^1.29.0",
|
||||
"qclone": "^1.2.0",
|
||||
"rfdc": "^1.3.0",
|
||||
"spark-md5": "^3.0.2",
|
||||
"sqlite-better-trigram": "^0.0.1"
|
||||
"spark-md5": "^3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@notesnook/crypto": "file:../crypto",
|
||||
@@ -102,6 +99,7 @@
|
||||
"@types/event-source-polyfill": "^1.0.1",
|
||||
"@types/html-to-text": "^9.0.0",
|
||||
"@types/katex": "^0.16.2",
|
||||
"@types/mime-db": "^1.43.1",
|
||||
"@types/prismjs": "^1.26.0",
|
||||
"@types/spark-md5": "^3.0.2",
|
||||
"@types/streetwriters__showdown": "npm:@types/showdown@^2.0.6",
|
||||
@@ -109,13 +107,14 @@
|
||||
"@types/ws": "^8.5.5",
|
||||
"@vitest/coverage-v8": "^1.0.1",
|
||||
"abortcontroller-polyfill": "^1.7.3",
|
||||
"better-sqlite3-multiple-ciphers": "^11.5.0",
|
||||
"better-sqlite3-multiple-ciphers": "^9.4.0",
|
||||
"bson-objectid": "^2.0.4",
|
||||
"dotenv": "^16.0.1",
|
||||
"event-source-polyfill": "^1.0.31",
|
||||
"eventsource": "^2.0.2",
|
||||
"hash-wasm": "^4.9.0",
|
||||
"isomorphic-fetch": "^3.0.0",
|
||||
"jsdom": "^22.1.0",
|
||||
"mockdate": "^3.0.5",
|
||||
"nanoid": "^5.0.1",
|
||||
"otplib": "^12.0.1",
|
||||
@@ -175,7 +174,6 @@
|
||||
"alfaaz": "^1.1.0",
|
||||
"async-mutex": "^0.5.0",
|
||||
"clipboard-polyfill": "4.1.0",
|
||||
"colord": "^2.9.3",
|
||||
"detect-indent": "^7.0.1",
|
||||
"entities": "^5.0.0",
|
||||
"katex": "0.16.11",
|
||||
@@ -202,13 +200,15 @@
|
||||
"@types/react-color": "^3.0.12",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@types/react-modal": "^3.16.3 ",
|
||||
"@types/tinycolor2": "^1.4.6",
|
||||
"framer-motion": "^11.5.4",
|
||||
"happy-dom": "^15.7.4",
|
||||
"isomorphic-fetch": "^3.0.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"prosemirror-test-builder": "^1.1.1",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-modal": "3.16.1",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"vitest": "^2.0.5",
|
||||
"web-vitals": "^4.2.3",
|
||||
"zustand": "4.5.5"
|
||||
@@ -218,9 +218,11 @@
|
||||
"@mdi/js": ">=7.2.96",
|
||||
"@theme-ui/components": ">=0.16.0",
|
||||
"@theme-ui/core": ">=0.16.0",
|
||||
"framer-motion": ">=11",
|
||||
"react": ">=18",
|
||||
"react-dom": ">=18",
|
||||
"react-modal": ">=3",
|
||||
"tinycolor2": ">=1.6",
|
||||
"zustand": ">=4"
|
||||
}
|
||||
},
|
||||
@@ -235,9 +237,7 @@
|
||||
"@lingui/swc-plugin": "^4.0.10",
|
||||
"@types/react": "^18.2.39",
|
||||
"babel-plugin-macros": "^3.1.0",
|
||||
"nodemon": "^3.1.7",
|
||||
"react": "18.2.0",
|
||||
"rollup": "^4.24.4",
|
||||
"typescript": "5.5.3",
|
||||
"vite": "^5.4.8",
|
||||
"vite-plugin-dts": "^4.2.3",
|
||||
@@ -260,8 +260,10 @@
|
||||
"@theme-ui/core": "^0.16.1",
|
||||
"@trpc/server": "^10.45.2",
|
||||
"@types/react": "^18.2.39",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"isomorphic-fetch": "^3.0.0",
|
||||
"react": "18.2.0",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"ts-json-schema-generator": "^1.2.0",
|
||||
"zustand": "4.4.7"
|
||||
},
|
||||
@@ -271,6 +273,7 @@
|
||||
"@theme-ui/components": ">=0.16.0",
|
||||
"@theme-ui/core": ">=0.16.0",
|
||||
"react": ">=18",
|
||||
"tinycolor2": ">=1",
|
||||
"zustand": ">=4"
|
||||
}
|
||||
},
|
||||
@@ -289,6 +292,7 @@
|
||||
"@types/react": "^18.2.39",
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/react-modal": "3.16.3",
|
||||
"framer-motion": "^10.6.8",
|
||||
"mac-scrollbar": "^0.10.3",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
@@ -299,6 +303,7 @@
|
||||
"@mdi/js": ">=7",
|
||||
"@theme-ui/components": ">=0.16",
|
||||
"@theme-ui/core": ">=0.16",
|
||||
"framer-motion": ">=10",
|
||||
"mac-scrollbar": ">=0.10",
|
||||
"react": ">=18",
|
||||
"react-dom": ">=18",
|
||||
@@ -435,16 +440,6 @@
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"yallist": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-compilation-targets/node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
@@ -1000,16 +995,6 @@
|
||||
"@jridgewell/sourcemap-codec": "^1.4.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.3.1.tgz",
|
||||
"integrity": "sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==",
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emotion/babel-plugin": {
|
||||
"version": "11.12.0",
|
||||
"resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.12.0.tgz",
|
||||
@@ -1596,367 +1581,6 @@
|
||||
"node": ">=14"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-darwin-arm64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz",
|
||||
"integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-darwin-arm64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-darwin-x64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz",
|
||||
"integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-darwin-x64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-darwin-arm64": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz",
|
||||
"integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-darwin-x64": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz",
|
||||
"integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-arm": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz",
|
||||
"integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-arm64": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz",
|
||||
"integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-s390x": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.4.tgz",
|
||||
"integrity": "sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linux-x64": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz",
|
||||
"integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linuxmusl-arm64": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz",
|
||||
"integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-libvips-linuxmusl-x64": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz",
|
||||
"integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-arm": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz",
|
||||
"integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-arm": "1.0.5"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-arm64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz",
|
||||
"integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-arm64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-s390x": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.5.tgz",
|
||||
"integrity": "sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-s390x": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linux-x64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz",
|
||||
"integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linux-x64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linuxmusl-arm64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz",
|
||||
"integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-linuxmusl-x64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz",
|
||||
"integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-wasm32": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.5.tgz",
|
||||
"integrity": "sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==",
|
||||
"cpu": [
|
||||
"wasm32"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/runtime": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-win32-ia32": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.5.tgz",
|
||||
"integrity": "sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@img/sharp-win32-x64": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz",
|
||||
"integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"license": "Apache-2.0 AND LGPL-3.0-or-later",
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
}
|
||||
},
|
||||
"node_modules/@isaacs/cliui": {
|
||||
"version": "8.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
||||
@@ -4180,19 +3804,6 @@
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/color": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
|
||||
"integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-convert": "^2.0.1",
|
||||
"color-string": "^1.9.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
@@ -4208,34 +3819,6 @@
|
||||
"integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/color-string": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
|
||||
"integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "^1.0.0",
|
||||
"simple-swizzle": "^0.2.2"
|
||||
}
|
||||
},
|
||||
"node_modules/color/node_modules/color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"color-name": "~1.1.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=7.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color/node_modules/color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/comlink": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/comlink/-/comlink-4.4.1.tgz",
|
||||
@@ -4650,15 +4233,6 @@
|
||||
"npm": "1.2.8000 || >= 1.4.16"
|
||||
}
|
||||
},
|
||||
"node_modules/detect-libc": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz",
|
||||
"integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==",
|
||||
"license": "Apache-2.0",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
|
||||
@@ -6728,12 +6302,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "11.0.2",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz",
|
||||
"integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==",
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
|
||||
"integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": "20 || >=22"
|
||||
"dependencies": {
|
||||
"yallist": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/mac-scrollbar": {
|
||||
@@ -9716,6 +9291,7 @@
|
||||
"version": "7.6.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
|
||||
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
|
||||
"dev": true,
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
@@ -9822,45 +9398,6 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/sharp": {
|
||||
"version": "0.33.5",
|
||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.5.tgz",
|
||||
"integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"color": "^4.2.3",
|
||||
"detect-libc": "^2.0.3",
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://opencollective.com/libvips"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@img/sharp-darwin-arm64": "0.33.5",
|
||||
"@img/sharp-darwin-x64": "0.33.5",
|
||||
"@img/sharp-libvips-darwin-arm64": "1.0.4",
|
||||
"@img/sharp-libvips-darwin-x64": "1.0.4",
|
||||
"@img/sharp-libvips-linux-arm": "1.0.5",
|
||||
"@img/sharp-libvips-linux-arm64": "1.0.4",
|
||||
"@img/sharp-libvips-linux-s390x": "1.0.4",
|
||||
"@img/sharp-libvips-linux-x64": "1.0.4",
|
||||
"@img/sharp-libvips-linuxmusl-arm64": "1.0.4",
|
||||
"@img/sharp-libvips-linuxmusl-x64": "1.0.4",
|
||||
"@img/sharp-linux-arm": "0.33.5",
|
||||
"@img/sharp-linux-arm64": "0.33.5",
|
||||
"@img/sharp-linux-s390x": "0.33.5",
|
||||
"@img/sharp-linux-x64": "0.33.5",
|
||||
"@img/sharp-linuxmusl-arm64": "0.33.5",
|
||||
"@img/sharp-linuxmusl-x64": "0.33.5",
|
||||
"@img/sharp-wasm32": "0.33.5",
|
||||
"@img/sharp-win32-ia32": "0.33.5",
|
||||
"@img/sharp-win32-x64": "0.33.5"
|
||||
}
|
||||
},
|
||||
"node_modules/shebang-command": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
|
||||
@@ -9910,21 +9447,6 @@
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||
"integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-arrayish": "^0.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle/node_modules/is-arrayish": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
|
||||
"integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/slugify": {
|
||||
"version": "1.6.6",
|
||||
"resolved": "https://registry.npmjs.org/slugify/-/slugify-1.6.6.tgz",
|
||||
@@ -10634,7 +10156,7 @@
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",
|
||||
"integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",
|
||||
"devOptional": true,
|
||||
"dev": true,
|
||||
"license": "0BSD"
|
||||
},
|
||||
"node_modules/turbo-stream": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@notesnook/monograph",
|
||||
"version": "1.1.1",
|
||||
"version": "1.1.0",
|
||||
"private": true,
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
@@ -14,9 +14,9 @@
|
||||
"@emotion/cache": "11.11.0",
|
||||
"@emotion/react": "11.11.1",
|
||||
"@emotion/server": "11.11.0",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@lingui/core": "4.11.4",
|
||||
"@lingui/react": "4.11.4",
|
||||
"@mdi/js": "^7.4.47",
|
||||
"@notesnook/core": "file:../../packages/core",
|
||||
"@notesnook/crypto": "file:../../packages/crypto",
|
||||
"@notesnook/editor": "file:../../packages/editor",
|
||||
@@ -33,7 +33,6 @@
|
||||
"date-fns": "^4.1.0",
|
||||
"html-to-text": "^9.0.5",
|
||||
"isbot": "^5.1.17",
|
||||
"lru-cache": "^11.0.2",
|
||||
"mac-scrollbar": "^0.13.6",
|
||||
"nanoid": "^5.0.7",
|
||||
"react": "18.3.1",
|
||||
@@ -43,7 +42,6 @@
|
||||
"refractor": "^4.8.1",
|
||||
"remix-utils": "^7.7.0",
|
||||
"satori": "^0.11.1",
|
||||
"sharp": "^0.33.5",
|
||||
"slugify": "^1.6.6",
|
||||
"svg2png-wasm": "^1.4.1",
|
||||
"zustand": "^4.5.5"
|
||||
|
||||
@@ -21,7 +21,7 @@ import { defineConfig } from "vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
import arraybuffer from "vite-plugin-arraybuffer";
|
||||
import wasm from "vite-plugin-wasm";
|
||||
import ThemeDark from "@notesnook/theme/theme-engine/themes/default-dark.json" with { type: "json" };
|
||||
import { ThemeDark } from "@notesnook/theme";
|
||||
import type { Plugin, ResolvedConfig } from "vite";
|
||||
import { writeFile } from "fs/promises";
|
||||
import path from "path";
|
||||
@@ -50,8 +50,7 @@ export default defineConfig(({ isSsrBuild }) => ({
|
||||
type: "module",
|
||||
scripts: { start: pkg.scripts.start },
|
||||
dependencies: {
|
||||
"@remix-run/serve": pkg.devDependencies["@remix-run/serve"],
|
||||
"sharp": pkg.dependencies.sharp
|
||||
"@remix-run/serve": pkg.devDependencies["@remix-run/serve"]
|
||||
}
|
||||
})
|
||||
}),
|
||||
@@ -75,15 +74,13 @@ export default defineConfig(({ isSsrBuild }) => ({
|
||||
}
|
||||
},
|
||||
ssr: {
|
||||
...(process.env.NODE_ENV === "development" ? {} : { noExternal: true, external: ["sharp"] }),
|
||||
...(process.env.NODE_ENV === "development" ? {} : { noExternal: true }),
|
||||
target: "node"
|
||||
},
|
||||
build: {
|
||||
target: isSsrBuild ? "node20" : undefined,
|
||||
rollupOptions: {
|
||||
external: [
|
||||
"sharp"
|
||||
]
|
||||
external: ["svg2png-wasm/svg2png_wasm_bg.wasm"]
|
||||
}
|
||||
},
|
||||
define: {
|
||||
|
||||
23
apps/theme-builder/package-lock.json
generated
23
apps/theme-builder/package-lock.json
generated
@@ -341,8 +341,10 @@
|
||||
"@theme-ui/core": "^0.16.1",
|
||||
"@trpc/server": "^10.45.2",
|
||||
"@types/react": "^18.2.39",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"isomorphic-fetch": "^3.0.0",
|
||||
"react": "18.2.0",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"ts-json-schema-generator": "^1.2.0",
|
||||
"zustand": "4.4.7"
|
||||
},
|
||||
@@ -352,6 +354,7 @@
|
||||
"@theme-ui/components": ">=0.16.0",
|
||||
"@theme-ui/core": ">=0.16.0",
|
||||
"react": ">=18",
|
||||
"tinycolor2": ">=1",
|
||||
"zustand": ">=4"
|
||||
}
|
||||
},
|
||||
@@ -604,6 +607,11 @@
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"../../packages/theme/node_modules/@types/tinycolor2": {
|
||||
"version": "1.4.3",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"../../packages/theme/node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"dev": true,
|
||||
@@ -973,10 +981,11 @@
|
||||
},
|
||||
"../web": {
|
||||
"name": "@notesnook/web",
|
||||
"version": "3.0.20",
|
||||
"version": "3.0.18",
|
||||
"hasInstallScript": true,
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@aws-sdk/util-base64-browser": "^3.208.0",
|
||||
"@brixtol/currency-symbols": "^1.1.1",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
@@ -1003,7 +1012,6 @@
|
||||
"@notesnook/web-clipper": "file:../../extensions/web-clipper",
|
||||
"@react-pdf-viewer/core": "^3.12.0",
|
||||
"@react-pdf-viewer/toolbar": "^3.12.0",
|
||||
"@rehookify/datepicker": "^6.6.7",
|
||||
"@streetwriters/kysely": "^0.27.4",
|
||||
"@tanstack/react-query": "^4.36.1",
|
||||
"@tanstack/react-virtual": "^3.0.1",
|
||||
@@ -1018,16 +1026,19 @@
|
||||
"clipboard-polyfill": "4.0.0",
|
||||
"comlink": "^4.3.1",
|
||||
"cronosjs": "^1.7.1",
|
||||
"date-fns": "^2.30.0",
|
||||
"dayjs": "1.11.9",
|
||||
"diffblazer": "^1.0.1",
|
||||
"electron-trpc": "0.5.2",
|
||||
"event-source-polyfill": "^1.0.25",
|
||||
"fflate": "^0.8.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"framer-motion": "^11.5.6",
|
||||
"hash-wasm": "^4.9.0",
|
||||
"hotkeys-js": "^3.8.3",
|
||||
"katex": "0.16.2",
|
||||
"mac-scrollbar": "^0.13.5",
|
||||
"marked": "^4.1.0",
|
||||
"mutative": "^1.0.6",
|
||||
"pdfjs-dist": "3.6.172",
|
||||
"phone": "^3.1.14",
|
||||
@@ -1035,6 +1046,8 @@
|
||||
"qclone": "^1.2.0",
|
||||
"react": "18.2.0",
|
||||
"react-avatar-editor": "^13.0.2",
|
||||
"react-complex-tree": "^2.2.4",
|
||||
"react-day-picker": "^8.9.1",
|
||||
"react-dom": "18.2.0",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-error-boundary": "^4.0.12",
|
||||
@@ -1046,16 +1059,17 @@
|
||||
"react-resizable-panels": "^2.0.17",
|
||||
"react-scroll-sync": "^0.11.2",
|
||||
"react-virtuoso": "^4.6.2",
|
||||
"snarkdown": "^2.0.0",
|
||||
"timeago.js": "4.0.2",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"w3c-keyname": "^2.2.6",
|
||||
"web-streams-polyfill": "^3.1.1",
|
||||
"wouter": "2.12.1",
|
||||
"zustand": "4.4.7",
|
||||
"zustand-mutative": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.5",
|
||||
"@playwright/test": "^1.48.2",
|
||||
"@playwright/test": "^1.43.1",
|
||||
"@swc/core": "^1.5.24",
|
||||
"@swc/plugin-react-remove-properties": "^2.0.4",
|
||||
"@trpc/server": "10.45.2",
|
||||
@@ -1070,6 +1084,7 @@
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/react-modal": "3.16.3",
|
||||
"@types/react-scroll-sync": "^0.9.0",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"@types/wicg-file-system-access": "^2020.9.6",
|
||||
"@vitejs/plugin-react-swc": "^3.7.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
/*
|
||||
This file is part of the Notesnook project (https://notesnook.com/)
|
||||
|
||||
Copyright (C) 2023 Streetwriters (Private) Limited
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { chromium } from "playwright";
|
||||
import { spawn } from "child_process";
|
||||
|
||||
const TESTS = [
|
||||
{
|
||||
name: "root import",
|
||||
start: "import:root",
|
||||
end: "start:app"
|
||||
},
|
||||
{
|
||||
name: "app startup",
|
||||
start: "start:app",
|
||||
end: "render:app"
|
||||
},
|
||||
{
|
||||
name: "database load",
|
||||
start: "load:database",
|
||||
end: "render:app"
|
||||
},
|
||||
{
|
||||
name: "initialize database",
|
||||
start: "start:initializeDatabase",
|
||||
end: "end:initializeDatabase"
|
||||
},
|
||||
{
|
||||
name: "init db",
|
||||
start: "start:initdb",
|
||||
end: "end:initdb"
|
||||
},
|
||||
{
|
||||
name: "signup page load",
|
||||
start: "start:app",
|
||||
end: "load:auth",
|
||||
route: "/signup"
|
||||
}
|
||||
];
|
||||
|
||||
const serverKillSignal = new AbortController();
|
||||
async function startServer() {
|
||||
return new Promise((resolve, reject) => {
|
||||
const server = spawn("npx", ["serve", "-s", "build"], {
|
||||
signal: serverKillSignal.signal
|
||||
});
|
||||
|
||||
server.stdout.on("data", (data) => {
|
||||
if (data.toString().includes("Accepting connections")) {
|
||||
console.log(data.toString());
|
||||
resolve(server);
|
||||
}
|
||||
});
|
||||
|
||||
server.stderr.on("data", (data) => {
|
||||
reject(data.toString());
|
||||
});
|
||||
|
||||
server.on("error", (error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
const server = await startServer();
|
||||
|
||||
const browser = await chromium.launch();
|
||||
const ITERATIONS = 10;
|
||||
for (const testCase of TESTS) {
|
||||
console.log(`Running ${testCase.name}`);
|
||||
const durations = [];
|
||||
for (let i = 0; i < ITERATIONS; i++) {
|
||||
const context = await browser.newContext({
|
||||
baseURL: "http://localhost:3000"
|
||||
});
|
||||
await context.addInitScript({
|
||||
content: `window.localStorage.setItem("skipInitiation", "true");
|
||||
|
||||
const observer = new PerformanceObserver((list, observer) => {
|
||||
list.getEntries().forEach((entry) => {
|
||||
if (entry.entryType === "mark" && entry.name === "${testCase.end}") {
|
||||
observer.disconnect();
|
||||
console.log(
|
||||
"ended: ${testCase.name}",
|
||||
performance.measure(
|
||||
"${testCase.end}",
|
||||
"${testCase.start}",
|
||||
"${testCase.end}"
|
||||
).duration
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
observer.observe({ entryTypes: ["mark"] });`
|
||||
});
|
||||
const page = await context.newPage();
|
||||
|
||||
await page.goto(testCase.route || "/");
|
||||
const result = await page.waitForEvent("console", (msg) =>
|
||||
msg.text().startsWith(`ended: ${testCase.name}`)
|
||||
);
|
||||
durations.push(await result.args()[1].jsonValue());
|
||||
|
||||
await context.close();
|
||||
}
|
||||
|
||||
const mean = durations.reduce((a, b) => a + b) / durations.length;
|
||||
const max = Math.max(...durations);
|
||||
const min = Math.min(...durations);
|
||||
console.log(
|
||||
`${testCase.name} took ${mean}ms on average | ${max}ms max | ${min}ms min`
|
||||
);
|
||||
}
|
||||
|
||||
console.log("done");
|
||||
await browser.close();
|
||||
|
||||
server.stdout.destroy();
|
||||
server.stderr.destroy();
|
||||
server.kill("SIGKILL");
|
||||
console.log(server.killed);
|
||||
serverKillSignal.abort("finished");
|
||||
@@ -1,4 +1,4 @@
|
||||
Subtotal: ₹300
|
||||
Sales tax: ₹200
|
||||
Discount: -₹300
|
||||
Total: ₹300
|
||||
Total: ₹300/mo
|
||||
@@ -1,4 +1,4 @@
|
||||
Subtotal: ₹300
|
||||
Sales tax: ₹200
|
||||
Discount: -₹300
|
||||
Total: ₹300
|
||||
Total: ₹300/mo
|
||||
@@ -1,4 +1,4 @@
|
||||
Subtotal: ₹300
|
||||
Sales tax: ₹200
|
||||
Discount: -₹300
|
||||
Total: ₹300
|
||||
Total: ₹300/mo
|
||||
@@ -1,4 +1,4 @@
|
||||
Subtotal: $100
|
||||
Sales tax: $0
|
||||
Discount: -$100
|
||||
Total: $100
|
||||
Total: $100/mo
|
||||
@@ -1,4 +1,4 @@
|
||||
Subtotal: $100
|
||||
Sales tax: $0
|
||||
Discount: -$100
|
||||
Total: $100
|
||||
Total: $100/mo
|
||||
@@ -1,4 +1,4 @@
|
||||
Subtotal: $100
|
||||
Sales tax: $0
|
||||
Discount: -$100
|
||||
Total: $100
|
||||
Total: $100/mo
|
||||
@@ -49,7 +49,7 @@ async function actAndSync<T>(
|
||||
}
|
||||
|
||||
const NOTE = {
|
||||
title: `Note ${makeid(20)}`
|
||||
title: "Real-time sync test note 1"
|
||||
};
|
||||
|
||||
test(`edits in a note opened on 2 devices should sync in real-time`, async ({
|
||||
@@ -66,9 +66,9 @@ test(`edits in a note opened on 2 devices should sync in real-time`, async ({
|
||||
const [notesA, notesB] = await Promise.all(
|
||||
[deviceA, deviceB].map((d) => d.goToNotes())
|
||||
);
|
||||
const noteB = (
|
||||
await actAndSync([deviceA, deviceB], notesB.createNote(NOTE))
|
||||
)[0];
|
||||
const noteB =
|
||||
(await notesB.findNote(NOTE)) ||
|
||||
(await actAndSync([deviceA, deviceB], notesB.createNote(NOTE)))[0];
|
||||
const noteA = await notesA.findNote(NOTE);
|
||||
await Promise.all([noteA, noteB].map((note) => note?.openNote()));
|
||||
|
||||
|
||||
677
apps/web/package-lock.json
generated
677
apps/web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,14 @@
|
||||
{
|
||||
"name": "@notesnook/web",
|
||||
"description": "Your private note taking space",
|
||||
"version": "3.0.22",
|
||||
"version": "3.0.18",
|
||||
"private": true,
|
||||
"main": "./src/app.js",
|
||||
"homepage": "https://notesnook.com/",
|
||||
"repository": "https://github.com/streetwriters/notesnook",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@aws-sdk/util-base64-browser": "^3.208.0",
|
||||
"@brixtol/currency-symbols": "^1.1.1",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
@@ -34,7 +35,6 @@
|
||||
"@notesnook/web-clipper": "file:../../extensions/web-clipper",
|
||||
"@react-pdf-viewer/core": "^3.12.0",
|
||||
"@react-pdf-viewer/toolbar": "^3.12.0",
|
||||
"@rehookify/datepicker": "^6.6.7",
|
||||
"@streetwriters/kysely": "^0.27.4",
|
||||
"@tanstack/react-query": "^4.36.1",
|
||||
"@tanstack/react-virtual": "^3.0.1",
|
||||
@@ -49,16 +49,19 @@
|
||||
"clipboard-polyfill": "4.0.0",
|
||||
"comlink": "^4.3.1",
|
||||
"cronosjs": "^1.7.1",
|
||||
"date-fns": "^2.30.0",
|
||||
"dayjs": "1.11.9",
|
||||
"diffblazer": "^1.0.1",
|
||||
"electron-trpc": "0.5.2",
|
||||
"event-source-polyfill": "^1.0.25",
|
||||
"fflate": "^0.8.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"framer-motion": "^11.5.6",
|
||||
"hash-wasm": "^4.9.0",
|
||||
"hotkeys-js": "^3.8.3",
|
||||
"katex": "0.16.2",
|
||||
"mac-scrollbar": "^0.13.5",
|
||||
"marked": "^4.1.0",
|
||||
"mutative": "^1.0.6",
|
||||
"pdfjs-dist": "3.6.172",
|
||||
"phone": "^3.1.14",
|
||||
@@ -66,6 +69,8 @@
|
||||
"qclone": "^1.2.0",
|
||||
"react": "18.2.0",
|
||||
"react-avatar-editor": "^13.0.2",
|
||||
"react-complex-tree": "^2.2.4",
|
||||
"react-day-picker": "^8.9.1",
|
||||
"react-dom": "18.2.0",
|
||||
"react-dropzone": "^14.2.3",
|
||||
"react-error-boundary": "^4.0.12",
|
||||
@@ -77,16 +82,17 @@
|
||||
"react-resizable-panels": "^2.0.17",
|
||||
"react-scroll-sync": "^0.11.2",
|
||||
"react-virtuoso": "^4.6.2",
|
||||
"snarkdown": "^2.0.0",
|
||||
"timeago.js": "4.0.2",
|
||||
"tinycolor2": "^1.6.0",
|
||||
"w3c-keyname": "^2.2.6",
|
||||
"web-streams-polyfill": "^3.1.1",
|
||||
"wouter": "2.12.1",
|
||||
"zustand": "4.4.7",
|
||||
"zustand-mutative": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.5",
|
||||
"@playwright/test": "^1.48.2",
|
||||
"@playwright/test": "^1.43.1",
|
||||
"@swc/core": "^1.5.24",
|
||||
"@swc/plugin-react-remove-properties": "^2.0.4",
|
||||
"@trpc/server": "10.45.2",
|
||||
@@ -101,6 +107,7 @@
|
||||
"@types/react-dom": "^18.2.17",
|
||||
"@types/react-modal": "3.16.3",
|
||||
"@types/react-scroll-sync": "^0.9.0",
|
||||
"@types/tinycolor2": "^1.4.3",
|
||||
"@types/wicg-file-system-access": "^2020.9.6",
|
||||
"@vitejs/plugin-react-swc": "^3.7.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
|
||||
31
apps/web/scripts/changelog.mjs
Normal file
31
apps/web/scripts/changelog.mjs
Normal file
@@ -0,0 +1,31 @@
|
||||
import fetch from "node-fetch";
|
||||
import fs from "fs/promises";
|
||||
|
||||
async function getMilestones() {
|
||||
const url = `https://api.github.com/repos/streetwriters/notesnook/milestones?state=closed`;
|
||||
const response = await fetch(url);
|
||||
if (response.ok) return await response.json();
|
||||
}
|
||||
|
||||
async function getIssues(milestone) {
|
||||
const url = `https://api.github.com/repos/streetwriters/notesnook/issues?milestone=${milestone}&state=closed`;
|
||||
const response = await fetch(url);
|
||||
if (response.ok) return await response.json();
|
||||
}
|
||||
|
||||
(async function main() {
|
||||
const milestone = (await getMilestones())
|
||||
.sort((a, b) => a.number - b.number)
|
||||
.pop();
|
||||
console.log("Generating changelog for version", milestone.title);
|
||||
const issues = await getIssues(milestone.number);
|
||||
|
||||
await fs.writeFile(
|
||||
`changelog-${milestone.title}.md`,
|
||||
issues
|
||||
.map((issue, index) => {
|
||||
return `${index + 1}. ${issue.title} (#${issue.number})`;
|
||||
})
|
||||
.join("\n")
|
||||
);
|
||||
})();
|
||||
@@ -240,6 +240,9 @@ export default function AppEffects({ setShow }: AppEffectsProps) {
|
||||
|
||||
useEffect(() => {
|
||||
introduceFeatures();
|
||||
return () => {
|
||||
EV.unsubscribeAll();
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -26,6 +26,7 @@ import { useStore } from "./stores/app-store";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
import NavigationMenu from "./components/navigation-menu";
|
||||
import StatusBar from "./components/status-bar";
|
||||
import { EditorLoader } from "./components/loaders/editor-loader";
|
||||
import { FlexScrollContainer } from "./components/scroll-container";
|
||||
import CachedRouter from "./components/cached-router";
|
||||
import { WebExtensionRelay } from "./utils/web-extension-relay";
|
||||
@@ -36,18 +37,20 @@ import {
|
||||
ImperativePanelHandle
|
||||
} from "react-resizable-panels";
|
||||
import GlobalMenuWrapper from "./components/global-menu-wrapper";
|
||||
import AppEffects from "./app-effects";
|
||||
import HashRouter from "./components/hash-router";
|
||||
|
||||
new WebExtensionRelay();
|
||||
|
||||
// const GlobalMenuWrapper = React.lazy(
|
||||
// () => import("./components/global-menu-wrapper")
|
||||
// );
|
||||
const AppEffects = React.lazy(() => import("./app-effects"));
|
||||
const MobileAppEffects = React.lazy(() => import("./app-effects.mobile"));
|
||||
const HashRouter = React.lazy(() => import("./components/hash-router"));
|
||||
|
||||
function App() {
|
||||
const isMobile = useMobile();
|
||||
const [show, setShow] = useState(true);
|
||||
const isFocusMode = useStore((store) => store.isFocusMode);
|
||||
console.timeEnd("loading app");
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -55,6 +58,7 @@ function App() {
|
||||
<div id="menu-wrapper">
|
||||
<GlobalMenuWrapper />
|
||||
</div>
|
||||
<AppEffects setShow={setShow} />
|
||||
{isMobile && (
|
||||
<MobileAppEffects
|
||||
sliderId="slider"
|
||||
@@ -63,7 +67,6 @@ function App() {
|
||||
/>
|
||||
)}
|
||||
</Suspense>
|
||||
<AppEffects setShow={setShow} />
|
||||
|
||||
<Flex
|
||||
id="app"
|
||||
@@ -84,6 +87,32 @@ function App() {
|
||||
|
||||
export default App;
|
||||
|
||||
type SuspenseLoaderProps<TComponent extends React.JSXElementConstructor<any>> =
|
||||
{
|
||||
condition: boolean;
|
||||
props?: React.ComponentProps<TComponent>;
|
||||
component: TComponent;
|
||||
fallback: JSX.Element;
|
||||
};
|
||||
|
||||
function SuspenseLoader<TComponent extends React.JSXElementConstructor<any>>({
|
||||
condition,
|
||||
props,
|
||||
component,
|
||||
fallback
|
||||
}: SuspenseLoaderProps<TComponent>) {
|
||||
if (!condition) return fallback;
|
||||
|
||||
const Component = component as (
|
||||
props: any
|
||||
) => React.ReactComponentElement<any, any>;
|
||||
return (
|
||||
<Suspense fallback={IS_DESKTOP_APP ? null : fallback}>
|
||||
<Component {...props} />
|
||||
</Suspense>
|
||||
);
|
||||
}
|
||||
|
||||
type DesktopAppContentsProps = {
|
||||
show: boolean;
|
||||
setShow: (show: boolean) => void;
|
||||
@@ -97,7 +126,7 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
|
||||
|
||||
useEffect(() => {
|
||||
const size = navPane.current?.getSize();
|
||||
// Toggle `isNarrow` to true if panel size isn't set to narrow by user
|
||||
// Toggle `isNarrow` to true if panel size isn't set to narrow by user
|
||||
setIsNarrow((size && size <= 5) || isTablet);
|
||||
}, [isTablet]);
|
||||
|
||||
@@ -115,6 +144,7 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
|
||||
// middlePane.current?.resize(middlePaneSize);
|
||||
// } else navPane.current?.expand();
|
||||
// }, [isFocusMode]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Flex
|
||||
@@ -194,7 +224,7 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
|
||||
bg: "background"
|
||||
}}
|
||||
>
|
||||
<HashRouter />
|
||||
{<HashRouter />}
|
||||
</Flex>
|
||||
</Panel>
|
||||
</PanelGroup>
|
||||
@@ -269,7 +299,11 @@ function MobileAppContents() {
|
||||
width: "100vw"
|
||||
}}
|
||||
>
|
||||
<HashRouter />
|
||||
<SuspenseLoader
|
||||
fallback={<EditorLoader />}
|
||||
component={HashRouter}
|
||||
condition={true}
|
||||
/>
|
||||
</Flex>
|
||||
</FlexScrollContainer>
|
||||
);
|
||||
|
||||
@@ -19,9 +19,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import { getCurrentHash, getCurrentPath, makeURL } from "./navigation";
|
||||
import Config from "./utils/config";
|
||||
|
||||
// import { initializeLogger, logger } from "./utils/logger";
|
||||
import type { AuthProps } from "./views/auth";
|
||||
import { initializeFeatureChecks } from "./utils/feature-check";
|
||||
import { initializeLogger } from "./utils/logger";
|
||||
|
||||
type Route<TProps = null> = {
|
||||
component: () => Promise<{
|
||||
@@ -145,14 +146,12 @@ function isSessionExpired(path: Routes): RouteWithPath<AuthProps> | null {
|
||||
export async function init() {
|
||||
await initializeFeatureChecks();
|
||||
|
||||
const { path, route } = getRoute();
|
||||
|
||||
const [{ default: Component }] = await Promise.all([
|
||||
route.component(),
|
||||
await import("./utils/logger").then(({ initializeLogger }) =>
|
||||
initializeLogger()
|
||||
]);
|
||||
);
|
||||
|
||||
return { Component, path, props: route.props };
|
||||
const { path, route } = getRoute();
|
||||
return { ...route, path };
|
||||
}
|
||||
|
||||
function shouldSkipInitiation() {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user