Compare commits

...

25 Commits

Author SHA1 Message Date
ammarahm-ed
61e046fbce mobile: update deps 2023-08-02 15:31:35 +05:00
ammarahm-ed
a027dda359 mobile: disable bounce effect 2023-08-02 15:29:17 +05:00
ammarahm-ed
357b2e5d53 mobile: remove console.log 2023-08-02 14:58:47 +05:00
ammarahm-ed
e36144b81b mobile: fix right menus 2023-08-02 14:04:47 +05:00
ammarahm-ed
75b5b67e31 mobile: fix crash 2023-08-02 13:52:14 +05:00
ammarahm-ed
07beb74a35 mobile: add missing icons 2023-08-02 13:49:44 +05:00
ammarahm-ed
1500cb2944 mobile: set button action on reminder sheet 2023-08-02 13:47:08 +05:00
ammarahm-ed
40d50d38fa mobile: update icon fonts 2023-08-02 13:45:38 +05:00
ammarahm-ed
968119e5e1 mobile: reset session correctly on logout 2023-08-02 13:28:45 +05:00
ammarahm-ed
a98cb48c18 mobile: update fonts 2023-08-02 13:19:58 +05:00
ammarahm-ed
ae81080c55 mobile: disable gesure on reminder sheet 2023-08-02 13:14:51 +05:00
ammarahm-ed
568122c14b mobile: update fonts 2023-08-02 11:43:43 +05:00
ammarahm-ed
120b36a5a6 mobile: fix duplicate key warning 2023-08-02 11:41:32 +05:00
ammarahm-ed
c2105b9626 mobile: update fonts 2023-08-02 11:35:26 +05:00
ammarahm-ed
6269a06138 mobile: keep generated fonts in repo 2023-08-02 11:25:56 +05:00
ammarahm-ed
0701fe1cf0 Merge branch 'master' into fix/reduce-app-size 2023-08-02 10:59:51 +05:00
ammarahm-ed
2c5628970d mobile: use webpack-bundle 2023-08-01 20:25:07 +05:00
ammarahm-ed
3afdb33cfc mobile: add missing fonts 2023-08-01 17:48:40 +05:00
ammarahm-ed
a84699413f mobile: include plain editor 2023-07-31 15:38:29 +05:00
ammarahm-ed
fc9a14ff3c mobile: add missing icon fonts 2023-07-31 15:38:19 +05:00
ammarahm-ed
61111b10ff mobile: remove html-entities dep 2023-07-28 11:07:29 +05:00
ammarahm-ed
1a45c83a5f mobile: fix icon loading 2023-07-27 22:29:44 +05:00
Abdullah Atta
924c90f04d mobile: add script to tree shake icon font file 2023-07-27 16:59:52 +05:00
Abdullah Atta
7c87b39576 editor: substitute all @mdi/js icons at build time 2023-07-27 16:01:31 +05:00
ammarahm-ed
bac2b6bb09 mobile: reduce app size 2023-07-17 09:43:05 +05:00
48 changed files with 18200 additions and 560 deletions

View File

@@ -5,7 +5,6 @@ artifacts/
.DS_Store
native/android/app/src/main/assets/
*Issues.md
build_cache/
#

View File

@@ -30,41 +30,38 @@ const LoggerStorage = new MMKVLoader()
.withInstanceID("notesnook_logs")
.initialize();
database.host(
__DEV__
? {
API_HOST: "https://api.notesnook.com",
AUTH_HOST: "https://auth.streetwriters.co",
SSE_HOST: "https://events.streetwriters.co",
SUBSCRIPTIONS_HOST: "https://subscriptions.streetwriters.co",
ISSUES_HOST: "https://issues.streetwriters.co"
// API_HOST: "http://192.168.8.101:5264",
// AUTH_HOST: "http://192.168.8.101:8264",
// SSE_HOST: "http://192.168.8.101:7264",
// SUBSCRIPTIONS_HOST: "http://192.168.8.101:9264",
// ISSUES_HOST: "http://192.168.8.101:2624"
}
: {
API_HOST: "https://api.notesnook.com",
AUTH_HOST: "https://auth.streetwriters.co",
SSE_HOST: "https://events.streetwriters.co",
SUBSCRIPTIONS_HOST: "https://subscriptions.streetwriters.co",
ISSUES_HOST: "https://issues.streetwriters.co"
}
);
database.setup(
Storage,
Platform.OS === "ios" ? EventSource : AndroidEventSource,
filesystem,
{
compress: Gzip.deflate,
decompress: Gzip.inflate
}
);
database.host(
__DEV__
? {
API_HOST: "https://api.notesnook.com",
AUTH_HOST: "https://auth.streetwriters.co",
SSE_HOST: "https://events.streetwriters.co",
SUBSCRIPTIONS_HOST: "https://subscriptions.streetwriters.co",
ISSUES_HOST: "https://issues.streetwriters.co"
// API_HOST: "http://192.168.8.101:5264",
// AUTH_HOST: "http://192.168.8.101:8264",
// SSE_HOST: "http://192.168.8.101:7264",
// SUBSCRIPTIONS_HOST: "http://192.168.8.101:9264",
// ISSUES_HOST: "http://192.168.8.101:2624"
}
: {
API_HOST: "https://api.notesnook.com",
AUTH_HOST: "https://auth.streetwriters.co",
SSE_HOST: "https://events.streetwriters.co",
SUBSCRIPTIONS_HOST: "https://subscriptions.streetwriters.co",
ISSUES_HOST: "https://issues.streetwriters.co"
}
);
database.setup(
Storage,
Platform.OS === "ios" ? EventSource : AndroidEventSource,
filesystem,
{
compress: Gzip.deflate,
decompress: Gzip.inflate
}
);
initalize(new KV(LoggerStorage), true);

View File

@@ -17,18 +17,22 @@ 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 { useThemeColors } from "@notesnook/theme";
import React, { useEffect, useState } from "react";
import { Modal, View } from "react-native";
import { db } from "../../common/database";
import { MMKV } from "../../common/database/mmkv";
import BiometricService from "../../services/biometrics";
import {
ToastEvent,
eSendEvent,
eSubscribeEvent
} from "../../services/event-manager";
import { setLoginMessage } from "../../services/message";
import SettingsService from "../../services/settings";
import Sync from "../../services/sync";
import { useThemeColors } from "@notesnook/theme";
import { clearAllStores } from "../../stores";
import { useUserStore } from "../../stores/use-user-store";
import { eLoginSessionExpired, eUserLoggedIn } from "../../utils/events";
import { SIZE } from "../../utils/size";
import { sleep } from "../../utils/time";
@@ -71,9 +75,12 @@ export const SessionExpired = () => {
try {
await db.user.logout();
await BiometricService.resetCredentials();
SettingsService.set({
introCompleted: true
});
setLoginMessage();
SettingsService.resetSettings();
useUserStore.getState().setUser(null);
useUserStore.getState().setSyncing(false);
MMKV.clearStore();
clearAllStores();
setVisible(false);
} catch (e) {
ToastEvent.show({

View File

@@ -33,7 +33,7 @@ import { IconButton } from "../ui/icon-button";
export const RightMenus = () => {
const { colors } = useThemeColors();
const { contextMenuColors } = useThemeColors("contextMenu");
const { colors: contextMenuColors } = useThemeColors("contextMenu");
const deviceMode = useSettingStore((state) => state.deviceMode);
const rightButtons = useNavigationStore((state) => state.headerRightButtons);
const currentScreen = useNavigationStore((state) => state.currentScreen.name);
@@ -93,7 +93,7 @@ export const RightMenus = () => {
onRequestClose={() => {
menuRef.current?.hide();
}}
button={
anchor={
<IconButton
onPress={() => {
menuRef.current?.show();
@@ -113,7 +113,7 @@ export const RightMenus = () => {
}}
type="gray"
buttonType={{
text: colors.primary.paragraph
text: contextMenuColors.primary.paragraph
}}
key={item.title}
title={item.title}

View File

@@ -102,7 +102,11 @@ const SheetProvider = ({ context = "global" }) => {
setData(null);
}}
bottomPadding={!data.noBottomPadding}
enableGesturesInScrollView={data.enableGesturesInScrollView}
enableGesturesInScrollView={
typeof data.enableGesturesInScrollView === "undefined"
? true
: data.enableGesturesInScrollView
}
>
<View
style={{

View File

@@ -16,6 +16,7 @@ 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 { useThemeColors } from "@notesnook/theme";
import React, { RefObject, useRef, useState } from "react";
import { Platform, TextInput, View } from "react-native";
import { ActionSheetRef, ScrollView } from "react-native-actions-sheet";
@@ -25,7 +26,6 @@ import {
ToastEvent,
presentSheet
} from "../../../services/event-manager";
import { useThemeColors } from "@notesnook/theme";
import { SIZE } from "../../../utils/size";
import { Button } from "../../ui/button";
import Input from "../../ui/input";
@@ -247,7 +247,7 @@ export default function ReminderSheet({
/>
</View>
<Dialog context="local" />
<ScrollView>
<ScrollView bounces={false}>
<Input
fwdRef={titleRef}
defaultValue={reminder?.title || referencedItem?.title}
@@ -601,7 +601,7 @@ ReminderSheet.present = (
) => {
presentSheet({
context: isSheet ? "local" : undefined,
enableGesturesInScrollView: true,
enableGesturesInScrollView: false,
noBottomPadding: true,
component: (ref, close, update) => (
<ReminderSheet

View File

@@ -28,7 +28,8 @@ import { useNoteStore } from "../../stores/use-notes-store";
import { useSettingStore } from "../../stores/use-setting-store";
import { useThemeColors } from "@notesnook/theme";
import { useUserStore } from "../../stores/use-user-store";
import { MenuItemsList, SUBSCRIPTION_STATUS } from "../../utils/constants";
import { MenuItemsList } from "../../utils/menu-items";
import { SUBSCRIPTION_STATUS } from "../../utils/constants";
import { eOpenPremiumDialog } from "../../utils/events";
import { ColorSection } from "./color-section";
import { MenuItem } from "./menu-item";

View File

@@ -631,6 +631,7 @@ const doAppLoadActions = async () => {
await useMessageStore.getState().setAnnouncement();
if (NewFeature.present()) return;
if (await checkAppUpdateAvailable()) return;
if (!(await db.user.getUser())) {
setLoginMessage();
return;

View File

@@ -16,7 +16,7 @@
"html-to-text": "9.0.5",
"phone": "^3.1.14",
"qclone": "^1.2.0",
"react-native-actions-sheet": "0.9.0-alpha.21",
"react-native-actions-sheet": "0.9.0-alpha.23",
"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",

View File

@@ -66,6 +66,7 @@ export const Reminders = ({
});
SearchService.prepareSearch = prepareSearch;
useNavigationStore.getState().setButtonAction(PLACEHOLDER_DATA.action);
return !prev?.current;
},
onBlur: () => false,

View File

@@ -21,7 +21,7 @@ import { db } from "../../../common/database";
import { ToastEvent } from "../../../services/event-manager";
import SettingsService from "../../../services/settings";
import { useSettingStore } from "../../../stores/use-setting-store";
import { MenuItemsList } from "../../../utils/constants";
import { MenuItemsList } from "../../../utils/menu-items";
import { createSettingsPicker } from ".";
import { getFontById, getFonts } from "@notesnook/editor/dist/utils/font";
import { DATE_FORMATS, TIME_FORMATS } from "@notesnook/core/common";

View File

@@ -972,7 +972,7 @@ export const settingsGroups: SettingSection[] = [
}
},
{
id: "reminder-sound",
id: "reminder-sound-ios",
type: "screen",
name: "Change notification sound",
description:
@@ -984,7 +984,7 @@ export const settingsGroups: SettingSection[] = [
(Platform.OS === "android" && Platform.Version > 25)
},
{
id: "reminder-sound",
id: "reminder-sound-android",
name: "Change notification sound",
description:
"Set the notification sound for reminder notifications",

View File

@@ -100,49 +100,6 @@ export const SUBSCRIPTION_PROVIDER = {
}
};
export const MenuItemsList = [
{
name: "Notes",
icon: "home-variant-outline",
close: true
},
{
name: "Notebooks",
icon: "book-outline",
close: true
},
{
name: "Favorites",
icon: "star-outline",
close: true
},
{
name: "Tags",
icon: "pound",
close: true
},
{
name: "Reminders",
icon: "bell",
close: true,
isBeta: true
},
{
name: "Monographs",
icon: "text-box-multiple-outline",
close: true,
func: () => {
const Monographs = require("../screens/notes/monographs").Monographs;
Monographs.navigate();
}
},
{
name: "Trash",
icon: "delete-outline",
close: true
}
];
export const BUTTON_TYPES = {
transparent: {
primary: "transparent",

View File

@@ -0,0 +1,60 @@
/*
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/>.
*/
export const MenuItemsList = [
{
name: "Notes",
icon: "home-variant-outline",
close: true
},
{
name: "Notebooks",
icon: "book-outline",
close: true
},
{
name: "Favorites",
icon: "star-outline",
close: true
},
{
name: "Tags",
icon: "pound",
close: true
},
{
name: "Reminders",
icon: "bell",
close: true,
isBeta: true
},
{
name: "Monographs",
icon: "text-box-multiple-outline",
close: true,
func: () => {
const Monographs = require("../screens/notes/monographs").Monographs;
Monographs.navigate();
}
},
{
name: "Trash",
icon: "delete-outline",
close: true
}
];

View File

@@ -224,20 +224,26 @@ task deleteFiles(type: Delete) {
delete './src/main/assets/static'
}
task copyFiles(type: Copy) {
task copyEditorBundle(type: Copy) {
from '../../../../../packages/editor-mobile/build.bundle'
into './src/main/assets'
}
copyFiles.dependsOn(deleteFiles)
preBuild.dependsOn(copyFiles)
task copyPlainEditorBundle(type: Copy) {
from '../../ios/extension.bundle'
into './src/main/assets'
}
task copyFontFiles(type: Copy) {
from '../../fonts'
into './src/main/assets/fonts'
}
project.ext.vectoricons = [
iconFontNames: ['MaterialCommunityIcons.ttf' ],
iconFontsDir: "../../../node_modules/react-native-vector-icons/Fonts"
]
apply from: "../../../node_modules/react-native-vector-icons/fonts.gradle"
copyEditorBundle.dependsOn(deleteFiles)
copyFontFiles.dependsOn(copyEditorBundle);
copyPlainEditorBundle.dependsOn(copyFontFiles);
preBuild.dependsOn(copyPlainEditorBundle)
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

View File

@@ -1,4 +1,4 @@
let env = process.env.BABEL_ENV;
const env = process.env.BABEL_ENV || process.env.NODE_ENV;
const configs = {
env: {
development: {

Binary file not shown.

View File

@@ -1,10 +1,10 @@
/* eslint-disable @typescript-eslint/no-var-requires */
import './globals.js';
import React from 'react';
import { AppRegistry, Platform } from 'react-native';
import 'react-native-get-random-values';
import { SafeAreaProvider } from 'react-native-safe-area-context';
global.Buffer = require('buffer').Buffer;
import '../app/common/logger/index';
const ShareProvider = () => {
NotesnookShare = require('../share/index').default;
@@ -16,5 +16,6 @@ const ShareProvider = () => {
<NotesnookShare quicknote={false} />
);
};
AppRegistry.registerComponent('NotesnookShare', () => ShareProvider);

View File

@@ -51,6 +51,8 @@ const ShareProvider = () => {
);
};
AppRegistry.registerComponent('NotesnookShare', () => ShareProvider);
const QuickNoteProvider = () => {

View File

@@ -3,26 +3,32 @@
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#import <React/RCTLog.h>
#import <React/RCTEventEmitter.h>
@interface ShareViewController : ReactNativeShareExtension
@end
@implementation ShareViewController
@synthesize bridge = _bridge;
@synthesize callableJSModules = _callableJSModules;
+ (BOOL)requiresMainQueueSetup {
return true;
}
int rootViewTag = 0;
RCT_EXPORT_MODULE();
- (UIView*) shareView {
NSURL *jsCodeLocation;
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"NotesnookShare"
initialProperties:nil
launchOptions:nil];
rootViewTag = rootView.tag;
rootView.window.backgroundColor =[UIColor clearColor];
rootView.layer.shadowOpacity = 0;
rootView.backgroundColor = [UIColor clearColor];
@@ -33,4 +39,5 @@ RCT_EXPORT_MODULE();
return rootView;
}
@end

View File

@@ -15,16 +15,12 @@
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
2DCD954D1E0B4F2C00145EB5 /* NotesnookTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* NotesnookTests.m */; };
6510626F27042891009661C3 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6552012F27019F7700A43C51 /* OpenSans-Regular.ttf */; };
6510627527042893009661C3 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6552012F27019F7700A43C51 /* OpenSans-Regular.ttf */; };
6510627627042895009661C3 /* OpenSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6552012E27019F6E00A43C51 /* OpenSans-SemiBold.ttf */; };
6510627727042896009661C3 /* OpenSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6552012E27019F6E00A43C51 /* OpenSans-SemiBold.ttf */; };
6510E6D72877215700DACAA9 /* build.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6510E6D62877215700DACAA9 /* build.bundle */; };
6510E6D82877215700DACAA9 /* build.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6510E6D62877215700DACAA9 /* build.bundle */; };
6515C42F2580AA3000E83E39 /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6515C42E2580AA2F00E83E39 /* StoreKit.framework */; };
6529A13E279BC4C70048D4A8 /* BootSplash.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6529A13D279BC4C70048D4A8 /* BootSplash.storyboard */; };
6593E4A3281C345400492C50 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6593E4A2281C345400492C50 /* AppDelegate.mm */; };
659670B22A2754FD00C5D2AF /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 659670B12A2754FD00C5D2AF /* OpenSans-Bold.ttf */; };
659670B32A2754FD00C5D2AF /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 659670B12A2754FD00C5D2AF /* OpenSans-Bold.ttf */; };
659BE46725E11A5100E05671 /* notesnook-text.png in Resources */ = {isa = PBXBuildFile; fileRef = 659BE46625E11A5100E05671 /* notesnook-text.png */; };
65AA857925E6DDEC00772A01 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65AA857825E6DDEC00772A01 /* WidgetKit.framework */; };
65AA857B25E6DDEC00772A01 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 65AA857A25E6DDEC00772A01 /* SwiftUI.framework */; };
@@ -35,12 +31,12 @@
65B5014725A672B200E2D264 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65B5014525A672B200E2D264 /* MainInterface.storyboard */; };
65B5014B25A672B200E2D264 /* Make Note.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 65B5014025A672B200E2D264 /* Make Note.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
65B5020325A6756700E2D264 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B5020225A6756700E2D264 /* File.swift */; };
65C149872A61151B005C40F1 /* extension.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 65C149862A61151B005C40F1 /* extension.bundle */; };
65D145C529DC30470056FE7D /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65D145C429DC30470056FE7D /* MaterialCommunityIcons.ttf */; };
65D145C629DC30470056FE7D /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 65D145C429DC30470056FE7D /* MaterialCommunityIcons.ttf */; };
65E0340B257B9FF100793428 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65E0340A257B9FF100793428 /* File.swift */; };
7C72B5EA418785B334F3B5EB /* libPods-Notesnook-Make Note.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 35547D7C07E83F889159A73D /* libPods-Notesnook-Make Note.a */; };
87CE5B71DC72F3D95B7B1AA5 /* libPods-Notesnook-tvOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A03E3F5851D27269540E147C /* libPods-Notesnook-tvOSTests.a */; };
A79A93DC9D0CAE8703462151 /* libPods-Notesnook-NotesnookTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 068FA9BDFA207A50B0A9E597 /* libPods-Notesnook-NotesnookTests.a */; };
C619D096A9DE2070DBEAC70F /* libPods-Make Note.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C4AF691C324D95337F2FB0A /* libPods-Make Note.a */; };
F50BF8BC21F8B58EB2B5A31A /* libPods-Notesnook-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 16C0296DE7A2B4102817F5C1 /* libPods-Notesnook-tvOS.a */; };
/* End PBXBuildFile section */
@@ -107,10 +103,10 @@
279A4325E1D27BD3E720F35B /* Pods-Notesnook-Make Note.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Notesnook-Make Note.debug.xcconfig"; path = "Target Support Files/Pods-Notesnook-Make Note/Pods-Notesnook-Make Note.debug.xcconfig"; sourceTree = "<group>"; };
2D02E47B1E0B4A5D006451C7 /* Notesnook-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Notesnook-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2D02E4901E0B4A5D006451C7 /* Notesnook-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Notesnook-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
35547D7C07E83F889159A73D /* libPods-Notesnook-Make Note.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Notesnook-Make Note.a"; 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>"; };
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>"; };
6515C42E2580AA2F00E83E39 /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; };
6529A13D279BC4C70048D4A8 /* BootSplash.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = BootSplash.storyboard; path = Notesnook/BootSplash.storyboard; sourceTree = "<group>"; };
@@ -134,6 +130,7 @@
65B501AA25A6733400E2D264 /* Make Note.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Make Note.entitlements"; sourceTree = "<group>"; };
65B5020125A6756700E2D264 /* Make Note-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Make Note-Bridging-Header.h"; sourceTree = "<group>"; };
65B5020225A6756700E2D264 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
65C149862A61151B005C40F1 /* extension.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = extension.bundle; sourceTree = "<group>"; };
65D145C429DC30470056FE7D /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = MaterialCommunityIcons.ttf; path = "../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
65E03409257B9FF100793428 /* Notesnook-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Notesnook-Bridging-Header.h"; sourceTree = "<group>"; };
65E0340A257B9FF100793428 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; };
@@ -200,7 +197,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7C72B5EA418785B334F3B5EB /* libPods-Notesnook-Make Note.a in Frameworks */,
C619D096A9DE2070DBEAC70F /* libPods-Make Note.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -254,9 +251,9 @@
16C0296DE7A2B4102817F5C1 /* libPods-Notesnook-tvOS.a */,
A03E3F5851D27269540E147C /* libPods-Notesnook-tvOSTests.a */,
41D57E9831C724F59F18FBAE /* libPods-Notesnook-Add to Notes.a */,
35547D7C07E83F889159A73D /* libPods-Notesnook-Make Note.a */,
65AA857825E6DDEC00772A01 /* WidgetKit.framework */,
65AA857A25E6DDEC00772A01 /* SwiftUI.framework */,
4C4AF691C324D95337F2FB0A /* libPods-Make Note.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -294,6 +291,7 @@
83CBB9F61A601CBA00E9B192 = {
isa = PBXGroup;
children = (
65C149862A61151B005C40F1 /* extension.bundle */,
6510E6D62877215700DACAA9 /* build.bundle */,
65EC5B71272A7EE200FB3748 /* NotesWidgetExtensionDebug.entitlements */,
6552012F27019F7700A43C51 /* OpenSans-Regular.ttf */,
@@ -578,11 +576,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6510E6D82877215700DACAA9 /* build.bundle in Resources */,
65D145C629DC30470056FE7D /* MaterialCommunityIcons.ttf in Resources */,
659670B32A2754FD00C5D2AF /* OpenSans-Bold.ttf in Resources */,
6510627727042896009661C3 /* OpenSans-SemiBold.ttf in Resources */,
6510627527042893009661C3 /* OpenSans-Regular.ttf in Resources */,
65C149872A61151B005C40F1 /* extension.bundle in Resources */,
65B5014725A672B200E2D264 /* MainInterface.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -776,7 +770,7 @@
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Notesnook-Make Note-checkManifestLockResult.txt",
"$(DERIVED_FILE_DIR)/Pods-Make Note-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
@@ -789,7 +783,7 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Notesnook-Make Note/Pods-Notesnook-Make Note-resources.sh",
"${PODS_ROOT}/Target Support Files/Pods-Make Note/Pods-Make Note-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle",
);
name = "[CP] Copy Pods Resources";
@@ -798,7 +792,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Notesnook-Make Note/Pods-Notesnook-Make Note-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Make Note/Pods-Make Note-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FD10A7F022414F080027D42C /* Start Packager */ = {
@@ -1403,7 +1397,7 @@
};
65B5014D25A672B200E2D264 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 279A4325E1D27BD3E720F35B /* Pods-Notesnook-Make Note.debug.xcconfig */;
baseConfigurationReference = 88211800FA8BF60638327ADE /* Pods-Make Note.debug.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;
@@ -1506,7 +1500,7 @@
};
65B5014E25A672B200E2D264 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 47AE097A087A651BD60CAD7B /* Pods-Notesnook-Make Note.release.xcconfig */;
baseConfigurationReference = A84F3F0D50641D1CD4569B0E /* Pods-Make Note.release.xcconfig */;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = YES;
CLANG_ANALYZER_NONNULL = YES;

View File

@@ -57,17 +57,41 @@ target 'Notesnook' do
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
# for share extension
target 'Make Note' do
inherit! :complete
end
target 'NotesnookTests' do
# Pods for testing
end
end
# for share extension
target 'Make Note' do
use_react_native!(
:path => "../../node_modules/react-native",
# Hermes is now enabled by default. Disable by setting this flag to false.
# Upcoming versions of React Native may rely on get_default_flags(), but
# we make it explicit here to aid in the React Native upgrade process.
:hermes_enabled => false,
:fabric_enabled => false,
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
# Link only required libraries in share extension manually
pod 'react-native-blob-util', :path => '../../node_modules/react-native-blob-util'
pod 'react-native-share-extension', :path => '../../node_modules/@ammarahmed/react-native-share-extension'
pod 'react-native-sodium', :path => '../../node_modules/@ammarahmed/react-native-sodium'
pod 'react-native-gzip', :path => '../../node_modules/react-native-gzip'
pod 'react-native-mmkv-storage', :path => '../../node_modules/react-native-mmkv-storage'
pod 'react-native-webview', :path => '../../node_modules/react-native-webview'
pod 'RNKeychain' , :path => '../../node_modules/react-native-keychain'
pod 'react-native-netinfo', :path => '../../node_modules/@react-native-community/netinfo'
pod 'react-native-safe-area-context', :path => '../../node_modules/react-native-safe-area-context'
end
target 'Notesnook-tvOS' do

View File

@@ -928,6 +928,6 @@ SPEC CHECKSUMS:
toolbar-android: 2a73856e98b750d7e71ce4644d3f41cc98211719
Yoga: 1d6727ed193122f6adaf435c3de1a768326ff83b
PODFILE CHECKSUM: ceb52748ea756b5ee99a76ac8a9d0323ded50075
PODFILE CHECKSUM: 2edd4792d1a9505ba0d23c245dd1ca8863e7d928
COCOAPODS: 1.11.3

View File

@@ -0,0 +1,107 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8" />
<title>Note Preview</title>
<style>
body {
background-color: transparent !important;
margin: 0px !important;
padding: 12px;
padding-top: 0px;
font-size: 16px;
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
iframe {
max-width: 100% !important;
background-color: transparent !important;
}
.editor {
overflow-x: hidden;
overflow-y: scroll;
min-height: 150px;
outline: none !important;
border-width: 0px !important;
width: 100%;
}
[contenteditable=true]:empty:before {
content: attr(placeholder);
pointer-events: none;
display: block;
color: gray;
}
</style>
</head>
<body>
<div aria-autocomplete="none" placeholder="Write something..." contenteditable="true" id="editor" class="editor double-spaced" >
</div>
<script>
function postMessage(type, value) {
if (window.ReactNativeWebView) {
window.ReactNativeWebView.postMessage(
JSON.stringify({
type: type,
value: value
})
);
}
}
document.getElementById("editor").addEventListener("input", function (event) {
postMessage('content', event.target.innerHTML);
}, false);
attachOnMessage()
let styleElementDocument;
let doubleSpacedLines = true;
function attachOnMessage() {
let isSafari = navigator.vendor.match(/apple/i);
let listenerHandler = document;
if (isSafari) {
listenerHandler = window;
}
listenerHandler.addEventListener('message', function (data) {
console.log("message", data);
let message = JSON.parse(data.data);
let type = message.type;
let value = message.value;
switch (type) {
case 'html':
document.getElementById('editor').innerHTML = value;
break;
case 'theme':
if (!styleElementDocument) {
styleElementDocument = document.createElement('style');
styleElementDocument.type = 'text/css';
styleElementDocument.innerHTML = value;
document.getElementsByTagName('head')[0].appendChild(styleElementDocument);
} else {
styleElementDocument.innerHTML = node;
}
break;
case 'line-spacing': {
doubleSpacedLines = JSON.parse(value);
}
default:
break;
}
});
}
</script>
</body>
</html>

View File

@@ -1,4 +1,5 @@
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
/**
* Metro configuration for React Native
* https://github.com/facebook/react-native

View File

@@ -107,6 +107,8 @@
"react-test-renderer": "18.2.0",
"terser-webpack-plugin": "^5.3.5",
"ts-jest": "^28.0.7",
"typescript": "4.8.4",
"webpack-cli": "^5.1.4",
"webpack": "^5.74.0"
}
}

View File

@@ -10,6 +10,7 @@ const config = {
};
if (!config.dependencies) config.dependencies = {};
config.dependencies['react-native-vector-icons'] = {
platforms: {
ios: null,

View File

@@ -97,7 +97,8 @@ module.exports = (env) => {
"deepmerge": path.join(__dirname, "../node_modules/deepmerge"),
"@selderee/plugin-htmlparser2": path.join(__dirname, "../node_modules/@selderee/plugin-htmlparser2"),
"peberminta": path.join(__dirname, "../node_modules/peberminta"),
"react-native-blob-util": path.join(__dirname, "../node_modules/react-native-blob-util")
"react-native-blob-util": path.join(__dirname, "../node_modules/react-native-blob-util"),
"@mdi/js": path.join(__dirname, "../node_modules/@mdi/js/mdi.js")
},
},
/**

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
"app/"
],
"scripts": {
"postinstall": "patch-package",
"postinstall": "patch-package && node ./scripts/optimize-fonts.mjs",
"run-android": "cd native && react-native run-android --active-arch-only",
"run-ios": "cd native && react-native run-ios",
"start": "cd native && react-native start",
@@ -23,6 +23,7 @@
"release-android-bundle": "cd native/android && ./gradlew bundleRelease --no-daemon"
},
"devDependencies": {
"fonteditor-core": "^2.1.11",
"otplib": "12.0.1",
"patch-package": "7.0.0",
"react-refresh": "0.14.0"

View File

@@ -0,0 +1,10 @@
diff --git a/node_modules/@flyerhq/react-native-link-preview/lib/utils.js b/node_modules/@flyerhq/react-native-link-preview/lib/utils.js
index c1aff89..4a3f878 100644
--- a/node_modules/@flyerhq/react-native-link-preview/lib/utils.js
+++ b/node_modules/@flyerhq/react-native-link-preview/lib/utils.js
@@ -1,4 +1,4 @@
-import { decode } from 'html-entities';
+import { decode } from 'entities';
import { Image } from 'react-native';
export const getActualImageUrl = (baseUrl, imageUrl) => {
let actualImageUrl = imageUrl === null || imageUrl === void 0 ? void 0 : imageUrl.trim();

View File

@@ -1,5 +1,5 @@
diff --git a/node_modules/react-native-blob-util/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java b/node_modules/react-native-blob-util/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java
index 9aee829..87124b3 100644
index 9aee829..0ecc59b 100644
--- a/node_modules/react-native-blob-util/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java
+++ b/node_modules/react-native-blob-util/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java
@@ -634,7 +634,9 @@ public class ReactNativeBlobUtilReq extends BroadcastReceiver implements Runnabl
@@ -86,7 +86,7 @@ index 9aee829..87124b3 100644
break;
}
diff --git a/node_modules/react-native-blob-util/fetch.js b/node_modules/react-native-blob-util/fetch.js
index 97e5263..45c086c 100644
index 97e5263..640aaea 100644
--- a/node_modules/react-native-blob-util/fetch.js
+++ b/node_modules/react-native-blob-util/fetch.js
@@ -244,7 +244,7 @@ export function fetch(...args: any): Promise {
@@ -108,14 +108,38 @@ index 97e5263..45c086c 100644
resolve(new FetchBlobResponse(taskId, respInfo, data));
}
diff --git a/node_modules/react-native-blob-util/index.js b/node_modules/react-native-blob-util/index.js
index ecaddf9..40a5c37 100644
--- a/node_modules/react-native-blob-util/index.js
+++ b/node_modules/react-native-blob-util/index.js
@@ -14,6 +14,7 @@ import ios from './ios';
import JSONStream from './json-stream';
import {config, fetch} from './fetch';
import URIUtil from './utils/uri';
+import getUUID from "./utils/uuid";
import CanceledFetchError from './class/ReactNativeBlobUtilCanceledFetchError';
const {
@@ -45,9 +46,9 @@ if (!ReactNativeBlobUtil || !ReactNativeBlobUtil.fetchBlobForm || !ReactNativeBl
}
export {ReactNativeBlobUtilConfig, ReactNativeBlobUtilResponseInfo, ReactNativeBlobUtilStream} from './types';
-export { URIUtil } from './utils/uri';
+export { URIUtil, getUUID };
export {FetchBlobResponse} from './class/ReactNativeBlobUtilBlobResponse';
-export { getUUID } from './utils/uuid';
+
export default {
fetch,
base64,
diff --git a/node_modules/react-native-blob-util/ios/ReactNativeBlobUtilRequest.mm b/node_modules/react-native-blob-util/ios/ReactNativeBlobUtilRequest.mm
index d4e468a..25b8d81 100644
index d4e468a..ac9e42a 100644
--- a/node_modules/react-native-blob-util/ios/ReactNativeBlobUtilRequest.mm
+++ b/node_modules/react-native-blob-util/ios/ReactNativeBlobUtilRequest.mm
@@ -438,13 +438,20 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCom
}
}
+ NSHTTPURLResponse *response = (NSHTTPURLResponse *) [task response];
+
@@ -128,7 +152,7 @@ index d4e468a..25b8d81 100644
+ @"status": [NSNumber numberWithInteger:[response statusCode]]
+ }
]);
+
+
respData = nil;

View File

@@ -0,0 +1,70 @@
diff --git a/node_modules/react-native-svg/__tests__/css.test.tsx b/node_modules/react-native-svg/__tests__/css.test.tsx
index 579c357..57acc09 100644
--- a/node_modules/react-native-svg/__tests__/css.test.tsx
+++ b/node_modules/react-native-svg/__tests__/css.test.tsx
@@ -1,6 +1,7 @@
import React from 'react';
import renderer from 'react-test-renderer';
-import { SvgCss, parse, inlineStyles } from '../src/ReactNativeSVG';
+import { parse } from '../src/ReactNativeSVG';
+import { SvgCss, inlineStyles } from '../css';
const xml = `<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
diff --git a/node_modules/react-native-svg/css/index.ts b/node_modules/react-native-svg/css/index.ts
new file mode 100644
index 0000000..3b268af
--- /dev/null
+++ b/node_modules/react-native-svg/css/index.ts
@@ -0,0 +1,2 @@
+export * from '../src/css';
+export { LocalSvg, WithLocalSvg, loadLocalRawResource } from '../src/LocalSvg';
\ No newline at end of file
diff --git a/node_modules/react-native-svg/src/LocalSvg.tsx b/node_modules/react-native-svg/src/LocalSvg.tsx
index f13c46f..0457159 100644
--- a/node_modules/react-native-svg/src/LocalSvg.tsx
+++ b/node_modules/react-native-svg/src/LocalSvg.tsx
@@ -7,7 +7,7 @@ import {
} from 'react-native';
import { fetchText } from './xml';
-import { SvgCss, SvgWithCss } from './css';
+import { SvgCss, SvgWithCss } from '../css';
import { SvgProps } from './elements/Svg';
const { getRawResource } = NativeModules.RNSVGRenderableManager || {};
diff --git a/node_modules/react-native-svg/src/ReactNativeSVG.ts b/node_modules/react-native-svg/src/ReactNativeSVG.ts
index 6b72423..1daca6c 100644
--- a/node_modules/react-native-svg/src/ReactNativeSVG.ts
+++ b/node_modules/react-native-svg/src/ReactNativeSVG.ts
@@ -25,14 +25,7 @@ import Marker from './elements/Marker';
import ForeignObject from './elements/ForeignObject';
import { parse, SvgAst, SvgFromUri, SvgFromXml, SvgUri, SvgXml } from './xml';
-import {
- SvgCss,
- SvgCssUri,
- SvgWithCss,
- SvgWithCssUri,
- inlineStyles,
-} from './css';
-import { LocalSvg, WithLocalSvg, loadLocalRawResource } from './LocalSvg';
+
import {
RNSVGCircle,
RNSVGClipPath,
@@ -116,14 +109,6 @@ export {
SvgFromXml,
SvgUri,
SvgXml,
- SvgCss,
- SvgCssUri,
- SvgWithCss,
- SvgWithCssUri,
- inlineStyles,
- LocalSvg,
- WithLocalSvg,
- loadLocalRawResource,
Shape,
RNSVGMarker,
RNSVGMask,

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,167 @@
/*
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 fg from "fast-glob";
import { Font } from "fonteditor-core";
import { existsSync } from "fs";
import { mkdir, readFile, writeFile } from "fs/promises";
import Listr from "listr";
import os from "os";
import path from "path";
import { fileURLToPath } from "url";
const EXTRA_ICON_NAMES = [
"menu",
"lock-open-outline",
"key-outline",
"pin-off-outline",
"pin-outline",
"star-off",
"star-outline",
"link-variant-remove",
"link-variant",
"bell",
"bell-off-outline",
"check",
"magnify",
"plus",
"view-list-outline",
"view-list",
"play",
"pause",
"notebook-outline",
"text-short",
"radiobox-marked",
"radiobox-blank",
"sort-descending",
"information",
"sort-ascending",
"alert",
"arrow-right",
"bookmark-outline",
"checkbox-marked",
"checkbox-blank-outline",
"unfold-less-horizontal",
"minus-circle",
"vibrate",
"volume-high",
"checkbox-blank-circle-outline",
"check-circle-outline",
"chevron-up",
"chevron-down"
];
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const ROOT_DIR = path.resolve(path.join(__dirname, ".."));
const GLYPH_MAP_PATH = path.join(
ROOT_DIR,
"node_modules",
"react-native-vector-icons",
"glyphmaps",
"MaterialCommunityIcons.json"
);
const GLYPH_MAP_OLD_PATH = path.join(
ROOT_DIR,
"node_modules",
"react-native-vector-icons",
"glyphmaps",
"MaterialCommunityIcons.old.json"
);
const ICON_FONT_PATH = path.join(
ROOT_DIR,
"node_modules",
"react-native-vector-icons",
"Fonts",
"MaterialCommunityIcons.ttf"
);
if (!existsSync(GLYPH_MAP_OLD_PATH) && !existsSync(GLYPH_MAP_PATH))
throw new Error("Glyph file not found.");
if (!existsSync(GLYPH_MAP_OLD_PATH)) {
await writeFile(
GLYPH_MAP_OLD_PATH,
await readFile(GLYPH_MAP_PATH, "utf-8"),
"utf-8"
);
}
const glyphs = JSON.parse(await readFile(GLYPH_MAP_OLD_PATH, "utf-8"));
const files = await fg("app/**/*.{js,jsx,ts,tsx}");
const pattern = /.name="(.+?)"/gm;
const glyphCodepoints = new Set();
class SilentRenderer {
static get nonTTY() {
return true;
}
render() {}
end() {}
}
const MODIFIED_GLYPH_MAP = {};
const tasks = new Listr([], {
concurrent: os.cpus().length,
renderer: SilentRenderer
});
for (const filePath of files) {
tasks.add({
title: `Searching ${filePath}`,
task: async () => {
const file = await readFile(filePath, "utf-8");
const matches = [
...file.matchAll(pattern),
...file.matchAll(/.icon: "(.+?)"/gm)
];
const icons = matches
.map((m) => m[1])
.filter((value) => value !== null && value !== undefined);
icons.push(...EXTRA_ICON_NAMES);
for (const icon of icons) {
if (!glyphs[icon]) continue;
MODIFIED_GLYPH_MAP[icon] = glyphs[icon];
glyphCodepoints.add(glyphs[icon]);
}
}
});
}
await tasks.run();
const font = Font.create(await readFile(ICON_FONT_PATH), {
type: "ttf",
subset: Array.from(glyphCodepoints.values()),
hinting: true
});
if (!existsSync(path.join(ROOT_DIR, "native", "fonts"))) {
await mkdir(path.join(ROOT_DIR, "native", "fonts"));
}
await writeFile(
path.join(ROOT_DIR, "native", "fonts", "MaterialCommunityIcons.ttf"),
font.write({ type: "ttf", hinting: true })
);
await writeFile(GLYPH_MAP_PATH, JSON.stringify(MODIFIED_GLYPH_MAP), "utf-8");

View File

@@ -16,8 +16,7 @@ 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 { getDefaultPresets } from "@notesnook/editor/dist/toolbar/tool-definitions";
import { useThemeColors, useThemeEngineStore } from "@notesnook/theme";
import { useThemeColors } from "@notesnook/theme";
import React, {
useCallback,
useEffect,
@@ -28,34 +27,47 @@ import React, {
} from "react";
import { Linking, Platform, View } from "react-native";
import { WebView } from "react-native-webview";
import { EDITOR_URI } from "../app/screens/editor/source";
import Commands from "../app/screens/editor/tiptap/commands";
import { EventTypes } from "../app/screens/editor/tiptap/editor-events";
import { EditorEvents, post } from "../app/screens/editor/tiptap/utils";
import {
eSubscribeEvent,
eUnSubscribeEvent
} from "../app/services/event-manager";
import { useSettingStore } from "../app/stores/use-setting-store";
import { eOnLoadNote } from "../app/utils/events";
const EditorMobileSourceUrl =
Platform.OS === "android"
? "file:///android_asset/plaineditor.html"
: "extension.bundle/plaineditor.html";
/**
* Replace this with dev url when debugging or working on the editor mobile repo.
* The url should be something like this: http://192.168.100.126:3000/index.html
*/
export const EDITOR_URI = __DEV__
? EditorMobileSourceUrl
: EditorMobileSourceUrl;
export async function post(ref, type, value = null) {
const message = {
type,
value
};
setImmediate(() => ref.current?.postMessage(JSON.stringify(message)));
}
const useEditor = () => {
const ref = useRef();
const [sessionId] = useState("share-editor-session" + Date.now());
const theme = useThemeEngineStore((state) => state.theme);
const { colors } = useThemeColors("editor");
const commands = useMemo(() => new Commands(ref), [ref]);
const currentNote = useRef();
const doubleSpacedLines = useSettingStore(
(state) => state.settings?.doubleSpacedLines
);
const postMessage = useCallback(
async (type, data) => post(ref, sessionId, type, data),
[sessionId]
async (type, data) => post(ref, type, data),
[]
);
const loadNote = useCallback(
(note) => {
postMessage(EditorEvents.html, note.content.data);
postMessage("html", note.content.data);
currentNote.current = note;
},
[postMessage]
@@ -69,58 +81,41 @@ const useEditor = () => {
}, [loadNote]);
const onLoad = () => {
postMessage(EditorEvents.theme, theme);
commands.setInsets({ top: 0, left: 0, right: 0, bottom: 0 });
commands.setSettings({
deviceMode: "mobile",
fullscreen: false,
premium: false,
readonly: false,
tools: getDefaultPresets().default,
noHeader: true,
noToolbar: true,
keyboardShown: false,
doubleSpacedLines: doubleSpacedLines
});
setTimeout(() => {
postMessage(
"theme",
`
body * {
color: ${colors.primary.paragraph};
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: ${colors.primary.heading};
}
a {
color: ${colors.primary.accent};
}
`
);
}, 300);
};
return { ref, onLoad, sessionId, currentNote, commands };
return { ref, onLoad, currentNote, commands };
};
const useEditorEvents = (editor, onChange) => {
const doubleSpacedLines = useSettingStore(
(state) => state.settings?.doubleSpacedLines
);
useEffect(() => {
editor.commands.setSettings({
deviceMode: "mobile",
fullscreen: false,
premium: false,
readonly: false,
tools: getDefaultPresets().default,
noHeader: true,
noToolbar: true,
keyboardShown: false,
doubleSpacedLines: doubleSpacedLines
});
}, [editor, doubleSpacedLines]);
const onMessage = (event) => {
const data = event.nativeEvent.data;
const editorMessage = JSON.parse(data);
if (
editorMessage.sessionId !== editor.sessionId &&
editorMessage.type !== EditorEvents.status
) {
return;
}
switch (editorMessage.type) {
case EventTypes.logger:
console.log("[WEBVIEW LOG]", editorMessage.value);
break;
case EventTypes.content:
console.log("[WEBVIEW LOG]", "EditorTypes.content");
case "content":
onChange(editorMessage.value);
break;
}
@@ -172,12 +167,6 @@ export const Editor = ({ onChange, onLoad }) => {
ref={editor.ref}
onLoad={editor.onLoad}
nestedScrollEnabled
injectedJavaScriptBeforeContentLoaded={`
globalThis.readonly=${false};
globalThis.noToolbar=${true};
globalThis.noHeader=${true};
`}
injectedJavaScript={`globalThis.sessionId="${editor.sessionId}";`}
javaScriptEnabled={true}
focusable={true}
setSupportMultipleWindows={false}

View File

@@ -17,8 +17,7 @@ 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 { FlashList } from "@shopify/flash-list";
import React, { useEffect, useRef, useState } from "react";
import React, { useEffect, useRef, useState, FlatList } from "react";
import {
Platform,
StatusBar,
@@ -133,10 +132,7 @@ const ListItem = ({ item, mode, close }) => {
numberOfLines={1}
style={{
color: colors.primary.paragraph,
fontFamily:
item.type === "topic"
? "OpenSans-Regular"
: "OpenSans-SemiBold",
fontWeight: item.type === "topic" ? "normal" : "bold",
fontSize: 15
}}
>
@@ -293,7 +289,6 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {
placeholderTextColor={colors.primary.placeholder}
style={{
fontSize: 15,
fontFamily: "OpenSans-Regular",
flex: 1
}}
onChangeText={(value) => {
@@ -321,12 +316,11 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {
height: searchHeight > 550 ? 550 : searchHeight
}}
>
<FlashList
<FlatList
data={searchResults}
keyboardShouldPersistTaps="always"
keyboardDismissMode="none"
renderItem={renderItem}
estimatedItemSize={50}
ListHeaderComponent={
mode === "selectTags" &&
(searchResults.length === 0 ||
@@ -357,7 +351,6 @@ export const Search = ({ close, getKeyboardHeight, quicknote, mode }) => {
>
<Text
style={{
fontFamily: "OpenSans-Regular",
color: colors.secondary.icon
}}
>

View File

@@ -262,6 +262,7 @@ const ShareView = ({ quicknote = false }) => {
defaultNote.content.data = null;
setNote({ ...defaultNote });
const data = await ShareExtension.data();
if (!data || data.length === 0) {
setRawData({
value: ""
@@ -299,8 +300,9 @@ const ShareView = ({ quicknote = false }) => {
}
}
}
setNote({ ...note });
onLoad();
setNote({ ...note });
} catch (e) {
console.error(e);
}
@@ -479,8 +481,7 @@ const ShareView = ({ quicknote = false }) => {
<Text
style={{
color: colors.primary.paragraph,
fontSize: 17,
fontFamily: "OpenSans-Regular"
fontSize: 17
}}
>
Quick note
@@ -580,7 +581,7 @@ const ShareView = ({ quicknote = false }) => {
<Text
style={{
fontSize: 18,
fontFamily: "OpenSans-SemiBold",
fontWeight: "bold",
color: colors.primary.heading
}}
>
@@ -728,7 +729,6 @@ const ShareView = ({ quicknote = false }) => {
style={{
fontSize: 12,
color: colors.secondary.paragraph,
fontFamily: "OpenSans-Regular",
paddingHorizontal: 12,
marginBottom: 10,
flexWrap: "wrap"
@@ -738,7 +738,7 @@ const ShareView = ({ quicknote = false }) => {
<Text
style={{
color: colors.primary.accent,
fontFamily: "OpenSans-SemiBold"
fontWeight: "bold"
}}
>
{`"${appendNote.title}"`}
@@ -1191,7 +1191,6 @@ const Button = ({
style={[
{
fontSize: fontSize || 18,
fontFamily: "OpenSans-Regular",
color: textColor,
marginLeft: loading ? 10 : 5
},

View File

@@ -107,6 +107,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"ts-json-schema-generator": "^1.2.0"
},
"peerDependencies": {
@@ -23776,6 +23777,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"tinycolor2": "^1.4.2",
"ts-json-schema-generator": "^1.2.0",
"zustand": "^4.3.8"

56
package-lock.json generated
View File

@@ -19,6 +19,7 @@
},
"devDependencies": {
"@commitlint/cli": "^17.1.1",
"@types/listr": "^0.14.4",
"@types/node": "^18.7.13",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
@@ -2791,6 +2792,34 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
"dev": true
},
"node_modules/@types/listr": {
"version": "0.14.4",
"resolved": "https://registry.npmjs.org/@types/listr/-/listr-0.14.4.tgz",
"integrity": "sha512-+MWvidNujBUgJsi4yMVwEQQwaHe6oHedPSy+dwk3akGEeuIbvhWkK+TGsXSwbFup7Y0cCBb+wzzdD+yGKp7sOg==",
"dev": true,
"dependencies": {
"@types/node": "*",
"rxjs": "^6.5.1"
}
},
"node_modules/@types/listr/node_modules/rxjs": {
"version": "6.6.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
"integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"dependencies": {
"tslib": "^1.9.0"
},
"engines": {
"npm": ">=2.0.0"
}
},
"node_modules/@types/listr/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
},
"node_modules/@types/minimist": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",
@@ -11755,6 +11784,33 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
"dev": true
},
"@types/listr": {
"version": "0.14.4",
"resolved": "https://registry.npmjs.org/@types/listr/-/listr-0.14.4.tgz",
"integrity": "sha512-+MWvidNujBUgJsi4yMVwEQQwaHe6oHedPSy+dwk3akGEeuIbvhWkK+TGsXSwbFup7Y0cCBb+wzzdD+yGKp7sOg==",
"dev": true,
"requires": {
"@types/node": "*",
"rxjs": "^6.5.1"
},
"dependencies": {
"rxjs": {
"version": "6.6.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
"integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
}
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
}
}
},
"@types/minimist": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz",

View File

@@ -34,6 +34,7 @@
},
"devDependencies": {
"@commitlint/cli": "^17.1.1",
"@types/listr": "^0.14.4",
"@types/node": "^18.7.13",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",

View File

@@ -130,6 +130,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"ts-json-schema-generator": "^1.2.0"
},
"peerDependencies": {
@@ -21649,6 +21650,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"tinycolor2": "^1.4.2",
"ts-json-schema-generator": "^1.2.0",
"zustand": "^4.3.8"

View File

@@ -3093,6 +3093,7 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"dev": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -3113,6 +3114,7 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"dev": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
@@ -3245,6 +3247,7 @@
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"dev": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -4062,8 +4065,7 @@
"@emotion/use-insertion-effect-with-fallbacks": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz",
"integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==",
"requires": {}
"integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw=="
},
"@emotion/utils": {
"version": "1.2.1",
@@ -4542,104 +4544,87 @@
"@tiptap/core": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/core/-/core-2.0.3.tgz",
"integrity": "sha512-jLyVIWAdjjlNzrsRhSE2lVL/7N8228/1R1QtaVU85UlMIwHFAcdzhD8FeiKkqxpTnGpaDVaTy7VNEtEgaYdCyA==",
"requires": {}
"integrity": "sha512-jLyVIWAdjjlNzrsRhSE2lVL/7N8228/1R1QtaVU85UlMIwHFAcdzhD8FeiKkqxpTnGpaDVaTy7VNEtEgaYdCyA=="
},
"@tiptap/extension-blockquote": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-blockquote/-/extension-blockquote-2.0.3.tgz",
"integrity": "sha512-rkUcFv2iL6f86DBBHoa4XdKNG2StvkJ7tfY9GoMpT46k3nxOaMTqak9/qZOo79TWxMLYtXzoxtKIkmWsbbcj4A==",
"requires": {}
"integrity": "sha512-rkUcFv2iL6f86DBBHoa4XdKNG2StvkJ7tfY9GoMpT46k3nxOaMTqak9/qZOo79TWxMLYtXzoxtKIkmWsbbcj4A=="
},
"@tiptap/extension-bold": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-bold/-/extension-bold-2.0.3.tgz",
"integrity": "sha512-OGT62fMRovSSayjehumygFWTg2Qn0IDbqyMpigg/RUAsnoOI2yBZFVrdM2gk1StyoSay7gTn2MLw97IUfr7FXg==",
"requires": {}
"integrity": "sha512-OGT62fMRovSSayjehumygFWTg2Qn0IDbqyMpigg/RUAsnoOI2yBZFVrdM2gk1StyoSay7gTn2MLw97IUfr7FXg=="
},
"@tiptap/extension-bullet-list": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-bullet-list/-/extension-bullet-list-2.0.3.tgz",
"integrity": "sha512-RtaLiRvZbMTOje+FW5bn+mYogiIgNxOm065wmyLPypnTbLSeHeYkoqVSqzZeqUn+7GLnwgn1shirUe6csVE/BA==",
"requires": {}
"integrity": "sha512-RtaLiRvZbMTOje+FW5bn+mYogiIgNxOm065wmyLPypnTbLSeHeYkoqVSqzZeqUn+7GLnwgn1shirUe6csVE/BA=="
},
"@tiptap/extension-character-count": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-character-count/-/extension-character-count-2.0.3.tgz",
"integrity": "sha512-Ge4aUmgYOmQR/HLPkbQSFKEywyRu6IalHAQmH3laY6LB9qrmT90AoaiFnaVCDpphYFQ7RygnBXJMgjtJ3WpZmw==",
"requires": {}
"integrity": "sha512-Ge4aUmgYOmQR/HLPkbQSFKEywyRu6IalHAQmH3laY6LB9qrmT90AoaiFnaVCDpphYFQ7RygnBXJMgjtJ3WpZmw=="
},
"@tiptap/extension-code": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-code/-/extension-code-2.0.3.tgz",
"integrity": "sha512-LsVCKVxgBtkstAr1FjxN8T3OjlC76a2X8ouoZpELMp+aXbjqyanCKzt+sjjUhE4H0yLFd4v+5v6UFoCv4EILiw==",
"requires": {}
"integrity": "sha512-LsVCKVxgBtkstAr1FjxN8T3OjlC76a2X8ouoZpELMp+aXbjqyanCKzt+sjjUhE4H0yLFd4v+5v6UFoCv4EILiw=="
},
"@tiptap/extension-code-block": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-code-block/-/extension-code-block-2.0.3.tgz",
"integrity": "sha512-F4xMy18EwgpyY9f5Te7UuF7UwxRLptOtCq1p2c2DfxBvHDWhAjQqVqcW/sq/I/WuED7FwCnPLyyAasPiVPkLPw==",
"requires": {}
"integrity": "sha512-F4xMy18EwgpyY9f5Te7UuF7UwxRLptOtCq1p2c2DfxBvHDWhAjQqVqcW/sq/I/WuED7FwCnPLyyAasPiVPkLPw=="
},
"@tiptap/extension-color": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-color/-/extension-color-2.0.3.tgz",
"integrity": "sha512-LYj3CWahhuJOy4/bwOur+cob8eky7xx7wyyBFIYELuzLcZt9hBmZwXxinQzD7BaQv4YdT+3oqr8BhChuPNj52w==",
"requires": {}
"integrity": "sha512-LYj3CWahhuJOy4/bwOur+cob8eky7xx7wyyBFIYELuzLcZt9hBmZwXxinQzD7BaQv4YdT+3oqr8BhChuPNj52w=="
},
"@tiptap/extension-document": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-document/-/extension-document-2.0.3.tgz",
"integrity": "sha512-PsYeNQQBYIU9ayz1R11Kv/kKNPFNIV8tApJ9pxelXjzcAhkjncNUazPN/dyho60mzo+WpsmS3ceTj/gK3bCtWA==",
"requires": {}
"integrity": "sha512-PsYeNQQBYIU9ayz1R11Kv/kKNPFNIV8tApJ9pxelXjzcAhkjncNUazPN/dyho60mzo+WpsmS3ceTj/gK3bCtWA=="
},
"@tiptap/extension-dropcursor": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-dropcursor/-/extension-dropcursor-2.0.3.tgz",
"integrity": "sha512-McthMrfusn6PjcaynJLheZJcXto8TaIW5iVitYh8qQrDXr31MALC/5GvWuiswmQ8bAXiWPwlLDYE/OJfwtggaw==",
"requires": {}
"integrity": "sha512-McthMrfusn6PjcaynJLheZJcXto8TaIW5iVitYh8qQrDXr31MALC/5GvWuiswmQ8bAXiWPwlLDYE/OJfwtggaw=="
},
"@tiptap/extension-font-family": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-font-family/-/extension-font-family-2.0.3.tgz",
"integrity": "sha512-Fg7lqoaiKfBHFzJDLa2QE4QtF/dX2KG0kV4P+Kx2s0S0Z6vfKQ7KLgOg8QBkgNsI/b1KdXN7hAefHCC/L8l7bQ==",
"requires": {}
"integrity": "sha512-Fg7lqoaiKfBHFzJDLa2QE4QtF/dX2KG0kV4P+Kx2s0S0Z6vfKQ7KLgOg8QBkgNsI/b1KdXN7hAefHCC/L8l7bQ=="
},
"@tiptap/extension-gapcursor": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-gapcursor/-/extension-gapcursor-2.0.3.tgz",
"integrity": "sha512-6I9EzzsYOyyqDvDvxIK6Rv3EXB+fHKFj8ntHO8IXmeNJ6pkhOinuXVsW6Yo7TcDYoTj4D5I2MNFAW2rIkgassw==",
"requires": {}
"integrity": "sha512-6I9EzzsYOyyqDvDvxIK6Rv3EXB+fHKFj8ntHO8IXmeNJ6pkhOinuXVsW6Yo7TcDYoTj4D5I2MNFAW2rIkgassw=="
},
"@tiptap/extension-hard-break": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-hard-break/-/extension-hard-break-2.0.3.tgz",
"integrity": "sha512-RCln6ARn16jvKTjhkcAD5KzYXYS0xRMc0/LrHeV8TKdCd4Yd0YYHe0PU4F9gAgAfPQn7Dgt4uTVJLN11ICl8sQ==",
"requires": {}
"integrity": "sha512-RCln6ARn16jvKTjhkcAD5KzYXYS0xRMc0/LrHeV8TKdCd4Yd0YYHe0PU4F9gAgAfPQn7Dgt4uTVJLN11ICl8sQ=="
},
"@tiptap/extension-heading": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-heading/-/extension-heading-2.0.3.tgz",
"integrity": "sha512-f0IEv5ms6aCzL80WeZ1qLCXTkRVwbpRr1qAETjg3gG4eoJN18+lZNOJYpyZy3P92C5KwF2T3Av00eFyVLIbb8Q==",
"requires": {}
"integrity": "sha512-f0IEv5ms6aCzL80WeZ1qLCXTkRVwbpRr1qAETjg3gG4eoJN18+lZNOJYpyZy3P92C5KwF2T3Av00eFyVLIbb8Q=="
},
"@tiptap/extension-history": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-history/-/extension-history-2.0.3.tgz",
"integrity": "sha512-00KHIcJ8kivn2ARI6NQYphv2LfllVCXViHGm0EhzDW6NQxCrriJKE3tKDcTFCu7LlC5doMpq9Z6KXdljc4oVeQ==",
"requires": {}
"integrity": "sha512-00KHIcJ8kivn2ARI6NQYphv2LfllVCXViHGm0EhzDW6NQxCrriJKE3tKDcTFCu7LlC5doMpq9Z6KXdljc4oVeQ=="
},
"@tiptap/extension-horizontal-rule": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.0.3.tgz",
"integrity": "sha512-SZRUSh07b/M0kJHNKnfBwBMWrZBEm/E2LrK1NbluwT3DBhE+gvwiEdBxgB32zKHNxaDEXUJwUIPNC3JSbKvPUA==",
"requires": {}
"integrity": "sha512-SZRUSh07b/M0kJHNKnfBwBMWrZBEm/E2LrK1NbluwT3DBhE+gvwiEdBxgB32zKHNxaDEXUJwUIPNC3JSbKvPUA=="
},
"@tiptap/extension-italic": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-italic/-/extension-italic-2.0.3.tgz",
"integrity": "sha512-cfS5sW0gu7qf4ihwnLtW/QMTBrBEXaT0sJl3RwkhjIBg/65ywJKE5Nz9ewnQHmDeT18hvMJJ1VIb4j4ze9jj9A==",
"requires": {}
"integrity": "sha512-cfS5sW0gu7qf4ihwnLtW/QMTBrBEXaT0sJl3RwkhjIBg/65ywJKE5Nz9ewnQHmDeT18hvMJJ1VIb4j4ze9jj9A=="
},
"@tiptap/extension-link": {
"version": "2.0.3",
@@ -4652,104 +4637,87 @@
"@tiptap/extension-list-item": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-list-item/-/extension-list-item-2.0.3.tgz",
"integrity": "sha512-p7cUsk0LpM1PfdAuFE8wYBNJ3gvA0UhNGR08Lo++rt9UaCeFLSN1SXRxg97c0oa5+Ski7SrCjIJ5Ynhz0viTjQ==",
"requires": {}
"integrity": "sha512-p7cUsk0LpM1PfdAuFE8wYBNJ3gvA0UhNGR08Lo++rt9UaCeFLSN1SXRxg97c0oa5+Ski7SrCjIJ5Ynhz0viTjQ=="
},
"@tiptap/extension-ordered-list": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-ordered-list/-/extension-ordered-list-2.0.3.tgz",
"integrity": "sha512-ZB3MpZh/GEy1zKgw7XDQF4FIwycZWNof1k9WbDZOI063Ch4qHZowhVttH2mTCELuyvTMM/o9a8CS7qMqQB48bw==",
"requires": {}
"integrity": "sha512-ZB3MpZh/GEy1zKgw7XDQF4FIwycZWNof1k9WbDZOI063Ch4qHZowhVttH2mTCELuyvTMM/o9a8CS7qMqQB48bw=="
},
"@tiptap/extension-paragraph": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-paragraph/-/extension-paragraph-2.0.3.tgz",
"integrity": "sha512-a+tKtmj4bU3GVCH1NE8VHWnhVexxX5boTVxsHIr4yGG3UoKo1c5AO7YMaeX2W5xB5iIA+BQqOPCDPEAx34dd2A==",
"requires": {}
"integrity": "sha512-a+tKtmj4bU3GVCH1NE8VHWnhVexxX5boTVxsHIr4yGG3UoKo1c5AO7YMaeX2W5xB5iIA+BQqOPCDPEAx34dd2A=="
},
"@tiptap/extension-placeholder": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-placeholder/-/extension-placeholder-2.0.3.tgz",
"integrity": "sha512-Z42jo0termRAf0S0L8oxrts94IWX5waU4isS2CUw8xCUigYyCFslkhQXkWATO1qRbjNFLKN2C9qvCgGf4UeBrw==",
"requires": {}
"integrity": "sha512-Z42jo0termRAf0S0L8oxrts94IWX5waU4isS2CUw8xCUigYyCFslkhQXkWATO1qRbjNFLKN2C9qvCgGf4UeBrw=="
},
"@tiptap/extension-strike": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-strike/-/extension-strike-2.0.3.tgz",
"integrity": "sha512-RO4/EYe2iPD6ifDHORT8fF6O9tfdtnzxLGwZIKZXnEgtweH+MgoqevEzXYdS+54Wraq4TUQGNcsYhe49pv7Rlw==",
"requires": {}
"integrity": "sha512-RO4/EYe2iPD6ifDHORT8fF6O9tfdtnzxLGwZIKZXnEgtweH+MgoqevEzXYdS+54Wraq4TUQGNcsYhe49pv7Rlw=="
},
"@tiptap/extension-subscript": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-subscript/-/extension-subscript-2.0.3.tgz",
"integrity": "sha512-XFAEUaKxWRmTq7ePEF4aj7knelJPr2fTz0y/iSXydtS094LKwBHBzxatIZY3phrgfpDc+f51ycwarsgz27UJfg==",
"requires": {}
"integrity": "sha512-XFAEUaKxWRmTq7ePEF4aj7knelJPr2fTz0y/iSXydtS094LKwBHBzxatIZY3phrgfpDc+f51ycwarsgz27UJfg=="
},
"@tiptap/extension-superscript": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-superscript/-/extension-superscript-2.0.3.tgz",
"integrity": "sha512-5EBjUvkw2SXL1e8C1i0UF26/GBNHxEbiNQKw7Shy88omVa4HTY+D8KWC/j29ZW/IomUbGPlbpXp1z+1TETzmyw==",
"requires": {}
"integrity": "sha512-5EBjUvkw2SXL1e8C1i0UF26/GBNHxEbiNQKw7Shy88omVa4HTY+D8KWC/j29ZW/IomUbGPlbpXp1z+1TETzmyw=="
},
"@tiptap/extension-table": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-table/-/extension-table-2.0.3.tgz",
"integrity": "sha512-8swHqm8vRM1w9WzaAhLmY24gGoTozctz4KHKBjvFY/Ka0yXabT0+hoCCdkZLnXWi15H3pbHs2HnDBaTGL9bZTw==",
"requires": {}
"integrity": "sha512-8swHqm8vRM1w9WzaAhLmY24gGoTozctz4KHKBjvFY/Ka0yXabT0+hoCCdkZLnXWi15H3pbHs2HnDBaTGL9bZTw=="
},
"@tiptap/extension-table-cell": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-table-cell/-/extension-table-cell-2.0.3.tgz",
"integrity": "sha512-d0vpwQfRIOhqKJdoiOJybwWhjnug3QA4Mkgccp378moDRyOer3hPKavG1Ljgz087qHrN4WfdUlMGEvasYsWE7w==",
"requires": {}
"integrity": "sha512-d0vpwQfRIOhqKJdoiOJybwWhjnug3QA4Mkgccp378moDRyOer3hPKavG1Ljgz087qHrN4WfdUlMGEvasYsWE7w=="
},
"@tiptap/extension-table-header": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-table-header/-/extension-table-header-2.0.3.tgz",
"integrity": "sha512-SnGl1U6usRRS6LyAjSdhaCYLF6NWbGhjVFSmiPrjb0pOzsiVeDOiUNCyUAIYaDNnjAF2pfK6+H+uHzYPqTi+/w==",
"requires": {}
"integrity": "sha512-SnGl1U6usRRS6LyAjSdhaCYLF6NWbGhjVFSmiPrjb0pOzsiVeDOiUNCyUAIYaDNnjAF2pfK6+H+uHzYPqTi+/w=="
},
"@tiptap/extension-table-row": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-table-row/-/extension-table-row-2.0.3.tgz",
"integrity": "sha512-tyqeXmQLNSBsYyiNsnQuJMxNbz6dYt+P5W58+h10mjbt+hERA5+alQQyP06O2DggsT3Z0LPt7QRAlNmOBe7cyQ==",
"requires": {}
"integrity": "sha512-tyqeXmQLNSBsYyiNsnQuJMxNbz6dYt+P5W58+h10mjbt+hERA5+alQQyP06O2DggsT3Z0LPt7QRAlNmOBe7cyQ=="
},
"@tiptap/extension-task-item": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-task-item/-/extension-task-item-2.0.3.tgz",
"integrity": "sha512-13u1Q769WiSNcjFieYAMuJyWXNaY9yOdw6WFg9tQg4EZ5h6+2DaxB0qmu6I3pH+wwSn2UkCkXIirAo/k7wnzbw==",
"requires": {}
"integrity": "sha512-13u1Q769WiSNcjFieYAMuJyWXNaY9yOdw6WFg9tQg4EZ5h6+2DaxB0qmu6I3pH+wwSn2UkCkXIirAo/k7wnzbw=="
},
"@tiptap/extension-task-list": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-task-list/-/extension-task-list-2.0.3.tgz",
"integrity": "sha512-NdW0RtMF2L96qy+j946mTB5Av6Qn5L3vGVWFmJA6/JPXr9Uj/grItCmqUQKHfPBSFow7UqBY82ODblP+GQFgew==",
"requires": {}
"integrity": "sha512-NdW0RtMF2L96qy+j946mTB5Av6Qn5L3vGVWFmJA6/JPXr9Uj/grItCmqUQKHfPBSFow7UqBY82ODblP+GQFgew=="
},
"@tiptap/extension-text": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-text/-/extension-text-2.0.3.tgz",
"integrity": "sha512-LvzChcTCcPSMNLUjZe/A9SHXWGDHtvk73fR7CBqAeNU0MxhBPEBI03GFQ6RzW3xX0CmDmjpZoDxFMB+hDEtW1A==",
"requires": {}
"integrity": "sha512-LvzChcTCcPSMNLUjZe/A9SHXWGDHtvk73fR7CBqAeNU0MxhBPEBI03GFQ6RzW3xX0CmDmjpZoDxFMB+hDEtW1A=="
},
"@tiptap/extension-text-align": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-text-align/-/extension-text-align-2.0.3.tgz",
"integrity": "sha512-VlLgqncKdjMjVjbU60/ALYhFs0wUdjAyvjDXnH1OoM/HuzbILvufPMYz4DUieJIWVJOYUKHQgg4XwBWceAM2Tw==",
"requires": {}
"integrity": "sha512-VlLgqncKdjMjVjbU60/ALYhFs0wUdjAyvjDXnH1OoM/HuzbILvufPMYz4DUieJIWVJOYUKHQgg4XwBWceAM2Tw=="
},
"@tiptap/extension-text-style": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-text-style/-/extension-text-style-2.0.3.tgz",
"integrity": "sha512-yHIYtZVewSwfBfI6TffnsDRiOuXzytppcCsaDlsZFm8OtLG8v9ioH0ItMoOstmZZBiWJOm8iOy2yWSc4rNQEJw==",
"requires": {}
"integrity": "sha512-yHIYtZVewSwfBfI6TffnsDRiOuXzytppcCsaDlsZFm8OtLG8v9ioH0ItMoOstmZZBiWJOm8iOy2yWSc4rNQEJw=="
},
"@tiptap/extension-underline": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@tiptap/extension-underline/-/extension-underline-2.0.3.tgz",
"integrity": "sha512-oMYa7qib/5wJjpUp79GZEe+E/iyf1oZBsgiG26IspEtVTHZmpn3+Ktud7l43y/hpTeEzFTKOF1/uVbayHtSERg==",
"requires": {}
"integrity": "sha512-oMYa7qib/5wJjpUp79GZEe+E/iyf1oZBsgiG26IspEtVTHZmpn3+Ktud7l43y/hpTeEzFTKOF1/uVbayHtSERg=="
},
"@tiptap/pm": {
"version": "2.0.3",
@@ -5795,8 +5763,7 @@
}
},
"prosemirror-codemark": {
"version": "0.4.2",
"requires": {}
"version": "0.4.2"
},
"prosemirror-collab": {
"version": "1.3.0",
@@ -5940,26 +5907,26 @@
}
},
"re-resizable": {
"version": "6.9.9",
"requires": {}
"version": "6.9.9"
},
"react": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
}
},
"react-colorful": {
"version": "5.6.1",
"requires": {}
"version": "5.6.1"
},
"react-dom": {
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
"integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1",
@@ -6046,6 +6013,7 @@
"version": "0.20.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
"integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -6273,8 +6241,7 @@
}
},
"use-sync-external-store": {
"version": "1.2.0",
"requires": {}
"version": "1.2.0"
},
"util-deprecate": {
"version": "1.0.2",

View File

@@ -80,6 +80,7 @@
"scripts": {
"test": "vitest run",
"prebuild": "node ./scripts/build.mjs",
"postbuild": "node ./scripts/postbuild.mjs",
"prewatch": "node ./scripts/build.mjs",
"build": "tsc",
"watch": "tsc --watch",

View File

@@ -0,0 +1,53 @@
/*
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 * as Mjs from "@mdi/js";
import path from "path";
import fs from "fs";
import { fileURLToPath } from "url";
import { readFile, writeFile } from "fs/promises";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const ROOT_DIR = path.resolve(path.join(__dirname, ".."));
const DIST_DIR = path.resolve(ROOT_DIR, "dist");
const ICONS_FILE_PATH = path.join(DIST_DIR, "toolbar", "icons.js");
if (!fs.existsSync(DIST_DIR) || !fs.existsSync(ICONS_FILE_PATH))
throw new Error("Please build the editor before running this script.");
console.log("Replacing icons with their path...");
let ICON_FILE = await readFile(ICONS_FILE_PATH, "utf-8");
const icons = ICON_FILE.matchAll(/: (mdi.+),/g);
for (const icon of icons) {
const iconPath = Mjs[icon[1]];
if (!iconPath) throw new Error(`Could not find path for icon: ${icon[1]}.`);
ICON_FILE = ICON_FILE.replace(icon[0], `: "${iconPath}",`);
}
console.log("Removing @mdi/js import...");
ICON_FILE = ICON_FILE.replace(/^import \{.+ } from "@mdi\/js";/gm, "");
console.log("Saving file...");
await writeFile(ICONS_FILE_PATH, ICON_FILE);
console.log("Done.");

View File

@@ -743,6 +743,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"dependencies": {
"js-tokens": "^3.0.0 || ^4.0.0"
},
@@ -852,6 +853,7 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"dev": true,
"dependencies": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -1272,8 +1274,7 @@
"@emotion/use-insertion-effect-with-fallbacks": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.1.tgz",
"integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw==",
"requires": {}
"integrity": "sha512-jT/qyKZ9rzLErtrjGgdkMBn2OP8wl0G3sQlBb3YPryvKHsjvINUhVaPFfP+fpBcOkmrVOVEEHQFJ7nbj2TH2gw=="
},
"@emotion/utils": {
"version": "1.2.1",
@@ -1723,6 +1724,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
"dev": true,
"requires": {
"js-tokens": "^3.0.0 || ^4.0.0"
}
@@ -1797,6 +1799,7 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
"integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
"dev": true,
"requires": {
"loose-envify": "^1.1.0",
"object-assign": "^4.1.1"
@@ -1949,8 +1952,7 @@
"use-sync-external-store": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
"integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
"requires": {}
"integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA=="
},
"webidl-conversions": {
"version": "3.0.1",

View File

@@ -53,6 +53,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"ts-json-schema-generator": "^1.2.0"
},
"peerDependencies": {

View File

@@ -42,6 +42,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"ts-json-schema-generator": "^1.2.0"
},
"peerDependencies": {
@@ -2148,6 +2149,7 @@
"@types/react": "17.0.2",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
"react": "17.0.2",
"tinycolor2": "^1.4.2",
"ts-json-schema-generator": "^1.2.0",
"zustand": "^4.3.8"