diff --git a/apps/mobile/app/components/side-menu/index.tsx b/apps/mobile/app/components/side-menu/index.tsx index d95d731f1..a4972a38e 100644 --- a/apps/mobile/app/components/side-menu/index.tsx +++ b/apps/mobile/app/components/side-menu/index.tsx @@ -21,15 +21,6 @@ import { strings } from "@notesnook/intl"; import { useThemeColors } from "@notesnook/theme"; import React from "react"; import { View } from "react-native"; -import { SafeAreaView } from "react-native-safe-area-context"; -import { - NavigationState, - Route, - SceneMap, - SceneRendererProps, - TabDescriptor, - TabView -} from "react-native-tab-view"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; import { db } from "../../common/database"; import { useGroupOptions } from "../../hooks/use-group-options"; @@ -59,7 +50,104 @@ import SettingsService from "../../services/settings"; import { isFeatureAvailable } from "@notesnook/common"; import PaywallSheet from "../sheets/paywall"; import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets"; -const renderScene = SceneMap({ + +/** + * Simple Tab View Implementation for the Side bar + */ +type SimpleRoute = { + key: string; + title?: string; +}; + +type SimpleNavigationState = { + index: number; + routes: SimpleRoute[]; +}; + +type SimpleTabBarProps = { + navigationState: SimpleNavigationState; + jumpTo: (key: string) => void; +}; + +type SimpleTabViewProps = { + navigationState: SimpleNavigationState; + renderScene: ({ route }: { route: SimpleRoute }) => React.ReactNode; + renderTabBar?: (props: SimpleTabBarProps) => React.ReactNode; + onIndexChange?: (index: number) => void; +}; + +const createSceneMap = ( + scenes: Record> +): ((props: { route: SimpleRoute }) => React.ReactNode) => { + return ({ route }: { route: SimpleRoute }) => { + const SceneComponent = scenes[route.key]; + if (!SceneComponent) return null; + return ; + }; +}; + +const SimpleTabView = ({ + navigationState, + renderScene, + renderTabBar, + onIndexChange +}: SimpleTabViewProps) => { + const loadedKeysRef = React.useRef(new Set()); + const scenesRef = React.useRef(new Map()); + const jumpTo = React.useCallback( + (key: string) => { + const nextIndex = navigationState.routes.findIndex( + (route) => route.key === key + ); + if (nextIndex !== -1 && nextIndex !== navigationState.index) { + onIndexChange?.(nextIndex); + } + }, + [navigationState.index, navigationState.routes, onIndexChange] + ); + + const activeKey = navigationState.routes[navigationState.index]?.key; + if (activeKey && !loadedKeysRef.current.has(activeKey)) { + loadedKeysRef.current.add(activeKey); + } + + const getSceneForRoute = React.useCallback( + (route: SimpleRoute) => { + const cached = scenesRef.current.get(route.key); + if (cached) return cached; + const created = renderScene({ route }); + scenesRef.current.set(route.key, created); + return created; + }, + [renderScene] + ); + + return ( + + + {navigationState.routes.map((route, routeIndex) => ( + + {loadedKeysRef.current.has(route.key) + ? getSceneForRoute(route) + : navigationState.index === routeIndex + ? getSceneForRoute(route) + : null} + + ))} + + + {renderTabBar ? renderTabBar({ navigationState, jumpTo }) : null} + + ); +}; + +const renderScene = createSceneMap({ home: SideMenuHome, notebooks: SideMenuNotebooks, tags: SideMenuTags, @@ -73,7 +161,7 @@ export const SideMenu = React.memo( const [index, setIndex] = React.useState( SettingsService.getProperty("defaultSidebarTab") ); - const [routes] = React.useState([ + const [routes] = React.useState([ { key: "home", title: "Home" @@ -98,15 +186,11 @@ export const SideMenu = React.memo( paddingLeft: insets.left }} > - } - tabBarPosition="bottom" renderScene={renderScene} onIndexChange={setIndex} - swipeEnabled={false} - animationEnabled={false} - lazy /> ); @@ -114,12 +198,7 @@ export const SideMenu = React.memo( () => true ); -const TabBar = ( - props: SceneRendererProps & { - navigationState: NavigationState; - options: Record> | undefined; - } -) => { +const TabBar = (props: SimpleTabBarProps) => { const dragging = useSideBarDraggingStore((state) => state.dragging); const { colors, isDark } = useThemeColors(); const groupOptions = useGroupOptions( diff --git a/apps/mobile/app/components/side-menu/side-menu-home.tsx b/apps/mobile/app/components/side-menu/side-menu-home.tsx index b8b78efcb..efee88c87 100644 --- a/apps/mobile/app/components/side-menu/side-menu-home.tsx +++ b/apps/mobile/app/components/side-menu/side-menu-home.tsx @@ -85,6 +85,7 @@ export function SideMenuHome() { keyboardDismissMode="interactive" keyboardShouldPersistTaps="handled" keyExtractor={() => "scroll-items"} + bounces={false} renderItem={() => ( <> 1.0) - - Yoga - react-native-pdf (7.0.3): - boost - DoubleConversion @@ -3062,10 +3033,10 @@ PODS: - Yoga - RNKeychain (4.0.5): - React - - RNNotifee (7.4.10): + - RNNotifee (7.4.11): - React-Core - - RNNotifee/NotifeeCore (= 7.4.10) - - RNNotifee/NotifeeCore (7.4.10): + - RNNotifee/NotifeeCore (= 7.4.11) + - RNNotifee/NotifeeCore (7.4.11): - React-Core - RNPrivacySnapshot (1.0.0): - React-Core @@ -3161,7 +3132,7 @@ PODS: - RNWorklets - SocketRocket - Yoga - - RNScreens (4.18.0): + - RNScreens (4.19.0): - boost - DoubleConversion - fast_float @@ -3188,10 +3159,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNScreens/common (= 4.18.0) + - RNScreens/common (= 4.19.0) - SocketRocket - Yoga - - RNScreens/common (4.18.0): + - RNScreens/common (4.19.0): - boost - DoubleConversion - fast_float @@ -3414,7 +3385,6 @@ PODS: - pop (~> 1.0) - SocketRocket (0.7.1) - SSZipArchive (2.4.3) - - SwiftUIIntrospect (1.3.0) - SwiftyRSA (1.7.0): - SwiftyRSA/ObjC (= 1.7.0) - SwiftyRSA/ObjC (1.7.0) @@ -3486,7 +3456,6 @@ DEPENDENCIES: - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-notification-sounds (from `../node_modules/react-native-notification-sounds`) - react-native-orientation-locker (from `../node_modules/react-native-orientation-locker`) - - react-native-pager-view (from `../node_modules/react-native-pager-view`) - react-native-pdf (from `../node_modules/react-native-pdf`) - react-native-quick-sqlite (from `../node_modules/react-native-quick-sqlite`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) @@ -3570,7 +3539,6 @@ SPEC REPOS: - SDWebImage - SocketRocket - SSZipArchive - - SwiftUIIntrospect - SwiftyRSA - TOCropViewController @@ -3694,8 +3662,6 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-notification-sounds" react-native-orientation-locker: :path: "../node_modules/react-native-orientation-locker" - react-native-pager-view: - :path: "../node_modules/react-native-pager-view" react-native-pdf: :path: "../node_modules/react-native-pdf" react-native-quick-sqlite: @@ -3906,7 +3872,6 @@ SPEC CHECKSUMS: react-native-netinfo: cec9c4e86083cb5b6aba0e0711f563e2fbbff187 react-native-notification-sounds: ce106d58df0dd384bccbd2e84fb53accab7cc068 react-native-orientation-locker: cc6f357b289a2e0dd2210fea0c52cb8e0727fdaa - react-native-pager-view: d7d2aa47f54343bf55fdcee3973503dd27c2bd37 react-native-pdf: edc236298f13f1609e42d41e45b8b6ea88ed10f9 react-native-quick-sqlite: 1ed8d3db1e22a8604d006be69f06053382e93bb0 react-native-safe-area-context: c6e2edd1c1da07bdce287fa9d9e60c5f7b514616 @@ -3962,10 +3927,10 @@ SPEC CHECKSUMS: RNIap: 61f183ac917792fae42b0326b1bef33598c1adf6 RNImageCropPicker: 5fd4ceaead64d8c53c787e4e559004f97bc76df7 RNKeychain: ffd0513e676445c637410b47249460cbf56bc9cb - RNNotifee: 3840cc81add9954a5dec040f96442498f3f95d7b + RNNotifee: c4827fa2cec60ab634d62bafdb5cf57cd2999d54 RNPrivacySnapshot: ccad3a548338c2f526bb7b1789af3fb0618b7d1d RNReanimated: f1868b36f4b2b52a0ed00062cfda69506f75eaee - RNScreens: d821082c6dd1cb397cc0c98b026eeafaa68be479 + RNScreens: ffbb0296608eb3560de641a711bbdb663ed1f6b4 RNSecureRandom: b64d263529492a6897e236a22a2c4249aa1b53dc RNShare: 5d39a36f2d3d9a6c9344bfb3232c8ed607924a35 RNSVG: 8c0bbfa480a24b24468f1c76bd852a4aac3178e6 @@ -3976,7 +3941,6 @@ SPEC CHECKSUMS: SexyTooltip: 5c9b4dec52bfb317938cb0488efd9da3717bb6fd SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef - SwiftUIIntrospect: fee9aa07293ee280373a591e1824e8ddc869ba5d SwiftyRSA: 8c6dd1ea7db1b8dc4fb517a202f88bb1354bc2c6 TOCropViewController: 797deaf39c90e6e9ddd848d88817f6b9a8a09888 toolbar-android: c426ed5bd3dcccfed20fd79533efc0d1ae0ef018 diff --git a/apps/mobile/package-lock.json b/apps/mobile/package-lock.json index a8a365465..eb9092287 100644 --- a/apps/mobile/package-lock.json +++ b/apps/mobile/package-lock.json @@ -102,7 +102,6 @@ "react-native-navigation-bar-color": "2.0.2", "react-native-notification-sounds": "0.5.5", "react-native-orientation-locker": "^1.7.0", - "react-native-pager-view": "^8.0.0", "react-native-pdf": "^7.0.3", "react-native-privacy-snapshot": "github:standardnotes/react-native-privacy-snapshot", "react-native-progress": "5.0.0", @@ -113,12 +112,11 @@ "react-native-safe-area-context": "^5.6.1", "react-native-scoped-storage": "^1.9.5", "react-native-screenguard": "1.0.0", - "react-native-screens": "^4.16.0", + "react-native-screens": "^4.19.0", "react-native-securerandom": "^1.0.1", "react-native-share": "^12.0.3", "react-native-svg": "^15.12.0", "react-native-swiper-flatlist": "3.2.2", - "react-native-tab-view": "^4.2.2", "react-native-theme-switch-animation": "^0.6.0", "react-native-tooltips": "^1.0.3", "react-native-url-polyfill": "^2.0.0", @@ -17742,16 +17740,6 @@ } } }, - "node_modules/react-native-pager-view": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/react-native-pager-view/-/react-native-pager-view-8.0.0.tgz", - "integrity": "sha512-oAwlWT1lhTkIs9HhODnjNNl/owxzn9DP1MbP+az6OTUdgbmzA16Up83sBH8NRKwrH8rNm7iuWnX1qMqiiWOLhg==", - "license": "MIT", - "peerDependencies": { - "react": "*", - "react-native": "*" - } - }, "node_modules/react-native-pdf": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/react-native-pdf/-/react-native-pdf-7.0.3.tgz", @@ -17900,9 +17888,9 @@ } }, "node_modules/react-native-screens": { - "version": "4.18.0", - "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-4.18.0.tgz", - "integrity": "sha512-mRTLWL7Uc1p/RFNveEIIrhP22oxHduC2ZnLr/2iHwBeYpGXR0rJZ7Bgc0ktxQSHRjWTPT70qc/7yd4r9960PBQ==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-4.19.0.tgz", + "integrity": "sha512-qSDAO3AL5bti0Ri7KZRSVmWlhDr8MV86N5GruiKVQfEL7Zx2nUi3Dl62lqHUAD/LnDvOPuDDsMHCfIpYSv3hPQ==", "license": "MIT", "dependencies": { "react-freeze": "^1.0.0", @@ -17958,20 +17946,6 @@ "react-native": ">=0.59.0" } }, - "node_modules/react-native-tab-view": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/react-native-tab-view/-/react-native-tab-view-4.2.2.tgz", - "integrity": "sha512-NXtrG6OchvbGjsvbySJGVocXxo4Y2vA17ph4rAaWtA2jh+AasD8OyikKBRg2SmllEfeQ+GEhcKe8kulHv8BhTg==", - "license": "MIT", - "dependencies": { - "use-latest-callback": "^0.2.4" - }, - "peerDependencies": { - "react": ">= 18.2.0", - "react-native": "*", - "react-native-pager-view": ">= 6.0.0" - } - }, "node_modules/react-native-theme-switch-animation": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/react-native-theme-switch-animation/-/react-native-theme-switch-animation-0.6.0.tgz", diff --git a/apps/mobile/package.json b/apps/mobile/package.json index 68ba6d40d..66f671ca3 100644 --- a/apps/mobile/package.json +++ b/apps/mobile/package.json @@ -118,7 +118,6 @@ "react-native-navigation-bar-color": "2.0.2", "react-native-notification-sounds": "0.5.5", "react-native-orientation-locker": "^1.7.0", - "react-native-pager-view": "^8.0.0", "react-native-pdf": "^7.0.3", "react-native-privacy-snapshot": "github:standardnotes/react-native-privacy-snapshot", "react-native-progress": "5.0.0", @@ -129,12 +128,11 @@ "react-native-safe-area-context": "^5.6.1", "react-native-scoped-storage": "^1.9.5", "react-native-screenguard": "1.0.0", - "react-native-screens": "^4.16.0", + "react-native-screens": "^4.19.0", "react-native-securerandom": "^1.0.1", "react-native-share": "^12.0.3", "react-native-svg": "^15.12.0", "react-native-swiper-flatlist": "3.2.2", - "react-native-tab-view": "^4.2.2", "react-native-theme-switch-animation": "^0.6.0", "react-native-tooltips": "^1.0.3", "react-native-url-polyfill": "^2.0.0", diff --git a/apps/monograph/app/assets/fonts/Inter-Bold.ttf b/apps/monograph/app/assets/fonts/Inter-Bold.ttf new file mode 100644 index 000000000..9fb9b751e Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Bold.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-Bold.woff2 b/apps/monograph/app/assets/fonts/Inter-Bold.woff2 new file mode 100644 index 000000000..b9e3cb3b1 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Bold.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-BoldItalic.ttf b/apps/monograph/app/assets/fonts/Inter-BoldItalic.ttf new file mode 100644 index 000000000..8d050001a Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-BoldItalic.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-BoldItalic.woff2 b/apps/monograph/app/assets/fonts/Inter-BoldItalic.woff2 new file mode 100644 index 000000000..31cd05221 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-BoldItalic.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-Italic.ttf b/apps/monograph/app/assets/fonts/Inter-Italic.ttf new file mode 100644 index 000000000..e7ed211d2 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Italic.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-Italic.woff2 b/apps/monograph/app/assets/fonts/Inter-Italic.woff2 new file mode 100644 index 000000000..9a1ad2167 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Italic.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-Medium.ttf b/apps/monograph/app/assets/fonts/Inter-Medium.ttf new file mode 100644 index 000000000..458cd0601 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Medium.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-Medium.woff2 b/apps/monograph/app/assets/fonts/Inter-Medium.woff2 new file mode 100644 index 000000000..fdfdcc699 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Medium.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-MediumItalic.ttf b/apps/monograph/app/assets/fonts/Inter-MediumItalic.ttf new file mode 100644 index 000000000..22b898df3 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-MediumItalic.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-MediumItalic.woff2 b/apps/monograph/app/assets/fonts/Inter-MediumItalic.woff2 new file mode 100644 index 000000000..0dc5a3068 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-MediumItalic.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-Regular.ttf b/apps/monograph/app/assets/fonts/Inter-Regular.ttf new file mode 100644 index 000000000..b7aaca8de Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Regular.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-Regular.woff2 b/apps/monograph/app/assets/fonts/Inter-Regular.woff2 new file mode 100644 index 000000000..2bcd222ec Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-Regular.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-SemiBold.ttf b/apps/monograph/app/assets/fonts/Inter-SemiBold.ttf new file mode 100644 index 000000000..47f8ab1d6 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-SemiBold.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-SemiBold.woff2 b/apps/monograph/app/assets/fonts/Inter-SemiBold.woff2 new file mode 100644 index 000000000..fbae113d2 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-SemiBold.woff2 differ diff --git a/apps/monograph/app/assets/fonts/Inter-SemiBoldItalic.ttf b/apps/monograph/app/assets/fonts/Inter-SemiBoldItalic.ttf new file mode 100644 index 000000000..3f704a208 Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-SemiBoldItalic.ttf differ diff --git a/apps/monograph/app/assets/fonts/Inter-SemiBoldItalic.woff2 b/apps/monograph/app/assets/fonts/Inter-SemiBoldItalic.woff2 new file mode 100644 index 000000000..d67d01c6c Binary files /dev/null and b/apps/monograph/app/assets/fonts/Inter-SemiBoldItalic.woff2 differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.ttf b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.ttf deleted file mode 100644 index 0f921544b..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.ttf and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff deleted file mode 100644 index 32c56a307..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff2 b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff2 deleted file mode 100644 index 26599958d..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff2 and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.ttf b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.ttf deleted file mode 100644 index 797f40f30..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.ttf and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff deleted file mode 100644 index 8612cca5c..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff2 b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff2 deleted file mode 100644 index 932bb4d0e..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff2 and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.ttf b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.ttf deleted file mode 100644 index e183c89bd..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.ttf and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff deleted file mode 100644 index fd9eb374f..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2 b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2 deleted file mode 100644 index e44d73d1f..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2 and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.ttf b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.ttf deleted file mode 100644 index 408f07d21..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.ttf and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff deleted file mode 100644 index e9cf9d654..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff2 b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff2 deleted file mode 100644 index fd04386e1..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff2 and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.ttf b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.ttf deleted file mode 100644 index c761fc6d0..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.ttf and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff deleted file mode 100644 index 7b91f730c..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2 b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2 deleted file mode 100644 index f559fd43e..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2 and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.ttf b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.ttf deleted file mode 100644 index cafe79820..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.ttf and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff deleted file mode 100644 index 9bc5d1eed..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff and /dev/null differ diff --git a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2 b/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2 deleted file mode 100644 index 2aa7f3338..000000000 Binary files a/apps/monograph/app/assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2 and /dev/null differ diff --git a/apps/monograph/app/components/header.tsx b/apps/monograph/app/components/header.tsx index 124229c33..a0fcdc125 100644 --- a/apps/monograph/app/components/header.tsx +++ b/apps/monograph/app/components/header.tsx @@ -39,7 +39,16 @@ export function Header() { > Monograph - + ); } diff --git a/apps/monograph/app/components/monograph-chat.tsx b/apps/monograph/app/components/monograph-chat.tsx index 5c577609b..5f4325715 100644 --- a/apps/monograph/app/components/monograph-chat.tsx +++ b/apps/monograph/app/components/monograph-chat.tsx @@ -139,7 +139,7 @@ const ChatItem = ({ > - {message} + {message} diff --git a/apps/monograph/app/components/theme-provider.tsx b/apps/monograph/app/components/theme-provider.tsx index 62f2530e5..4a53a23da 100644 --- a/apps/monograph/app/components/theme-provider.tsx +++ b/apps/monograph/app/components/theme-provider.tsx @@ -72,7 +72,23 @@ export function BaseThemeProvider( return ( <> - + {children} diff --git a/apps/monograph/app/root.css b/apps/monograph/app/root.css index ce6ec04cd..738e8a25f 100644 --- a/apps/monograph/app/root.css +++ b/apps/monograph/app/root.css @@ -1,98 +1,75 @@ -/* open-sans-regular - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */ + @font-face { - font-family: "Open Sans"; + font-family: "Inter"; font-style: normal; - font-display: fallback; + font-display: swap; font-weight: 400; - src: local(""), - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff") - format("woff"), - /* Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-regular.ttf") - format("truetype"); + src: local(""), url("./assets/fonts/Inter-Regular.woff2") format("woff2"), + url("./assets/fonts/Inter-Regular.ttf") format("truetype"); } -/* open-sans-600 - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */ + @font-face { - font-family: "Open Sans"; + font-family: "Inter"; font-style: normal; + font-display: swap; font-weight: 600; - font-display: fallback; - src: local(""), - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.woff") - format("woff"), - /* Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600.ttf") - format("truetype"); + src: local(""), url("./assets/fonts/Inter-SemiBold.woff2") format("woff2"), + url("./assets/fonts/Inter-SemiBold.ttf") format("truetype"); } -/* open-sans-700 - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */ + @font-face { - font-family: "Open Sans"; + font-family: "Inter"; font-style: normal; + font-display: swap; font-weight: 700; - font-display: fallback; - src: local(""), - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.woff") - format("woff"), - /* Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700.ttf") - format("truetype"); + src: local(""), url("./assets/fonts/Inter-Bold.woff2") format("woff2"), + url("./assets/fonts/Inter-Bold.ttf") format("truetype"); } -/* open-sans-italic - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */ + @font-face { - font-family: "Open Sans"; + font-family: "Inter"; + font-style: normal; + font-display: swap; + font-weight: 500; + src: local(""), url("./assets/fonts/Inter-Medium.woff2") format("woff2"), + url("./assets/fonts/Inter-Medium.ttf") format("truetype"); +} + +@font-face { + font-family: "Inter"; font-style: italic; + font-display: swap; font-weight: 400; - font-display: fallback; - src: local(""), - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff") - format("woff"), - /* Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-italic.ttf") - format("truetype"); + src: local(""), url("./assets/fonts/Inter-Italic.woff2") format("woff2"), + url("./assets/fonts/Inter-Italic.ttf") format("truetype"); } -/* open-sans-600italic - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */ + @font-face { - font-family: "Open Sans"; + font-family: "Inter"; font-style: italic; + font-display: swap; font-weight: 600; - font-display: fallback; src: local(""), - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.woff") - format("woff"), - /* Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-600italic.ttf") - format("truetype"); + url("./assets/fonts/Inter-SemiBoldItalic.woff2") format("woff2"), + url("./assets/fonts/Inter-SemiBoldItalic.ttf") format("truetype"); } -/* open-sans-700italic - vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic */ + @font-face { - font-family: "Open Sans"; + font-family: "Inter"; font-style: italic; + font-display: swap; font-weight: 700; - font-display: fallback; - src: local(""), - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff2") - format("woff2"), - /* Super Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff") - format("woff"), - /* Modern Browsers */ - url("./assets/fonts/open-sans-v34-vietnamese_latin-ext_latin_hebrew_greek-ext_greek_cyrillic-ext_cyrillic-700italic.ttf") - format("truetype"); + src: local(""), url("./assets/fonts/Inter-BoldItalic.woff2") format("woff2"), + url("./assets/fonts/Inter-BoldItalic.ttf") format("truetype"); +} + +@font-face { + font-family: "Inter"; + font-style: italic; + font-display: swap; + font-weight: 500; + src: local(""), url("./assets/fonts/Inter-MediumItalic.woff2") format("woff2"), + url("./assets/fonts/Inter-MediumItalic.ttf") format("truetype"); } body { diff --git a/apps/monograph/app/routes/_index.tsx b/apps/monograph/app/routes/_index.tsx index 503d96491..e6c1bb516 100644 --- a/apps/monograph/app/routes/_index.tsx +++ b/apps/monograph/app/routes/_index.tsx @@ -127,6 +127,7 @@ export default function Monograph() { mt={6} > {feature.name} - {feature.body} + {feature.body} ))} diff --git a/apps/monograph/package-lock.json b/apps/monograph/package-lock.json index 858fe1c70..daa802ee7 100644 --- a/apps/monograph/package-lock.json +++ b/apps/monograph/package-lock.json @@ -1,12 +1,12 @@ { "name": "@notesnook/monograph", - "version": "1.2.6", + "version": "1.2.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@notesnook/monograph", - "version": "1.2.6", + "version": "1.2.7", "dependencies": { "@emotion/cache": "11.11.0", "@emotion/react": "11.11.1", diff --git a/apps/monograph/package.json b/apps/monograph/package.json index d5cc64771..05095369e 100644 --- a/apps/monograph/package.json +++ b/apps/monograph/package.json @@ -1,6 +1,6 @@ { "name": "@notesnook/monograph", - "version": "1.2.6", + "version": "1.2.7", "private": true, "sideEffects": false, "type": "module", diff --git a/apps/monograph/vite.config.ts b/apps/monograph/vite.config.ts index 6a4bc5a83..3691e5e1d 100644 --- a/apps/monograph/vite.config.ts +++ b/apps/monograph/vite.config.ts @@ -20,7 +20,7 @@ import { vitePlugin as remix } from "@remix-run/dev"; import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; import arraybuffer from "vite-plugin-arraybuffer"; -import ThemeDark from "@notesnook/theme/theme-engine/themes/default-dark.json" with {type:"json"}; +import ThemeDark from "@notesnook/theme/theme-engine/themes/default-dark.json" with { type:"json" }; import type { Plugin, ResolvedConfig } from "vite"; import { writeFile } from "fs/promises"; import path from "path"; @@ -51,8 +51,9 @@ export default defineConfig(({ isSsrBuild }) => ({ scripts: { start: pkg.scripts.start }, dependencies: { "@napi-rs/canvas": pkg.dependencies["@napi-rs/canvas"], - "@remix-run/server-runtime": pkg.devDependencies["@remix-run/server-runtime"], - }, + "@remix-run/server-runtime": + pkg.devDependencies["@remix-run/server-runtime"] + } }) }), remix({ @@ -65,13 +66,15 @@ export default defineConfig(({ isSsrBuild }) => ({ }), tsconfigPaths(), arraybuffer(), - isSsrBuild ? viteStaticCopy({ - targets: [ - { src: "./server.ts", dest: "../../" }, - { src: "./app/assets", dest: "../" }, - { src: "./fonts", dest: "../" } - ] - }) : undefined + isSsrBuild + ? viteStaticCopy({ + targets: [ + { src: "./server.ts", dest: "../../" }, + { src: "./app/assets", dest: "../" }, + { src: "./fonts", dest: "../" } + ] + }) + : undefined ], worker: { format: "es", @@ -90,7 +93,7 @@ export default defineConfig(({ isSsrBuild }) => ({ build: { target: isSsrBuild ? "node20" : undefined, rollupOptions: { - external: ["@napi-rs/canvas"] + external: ["@napi-rs/canvas"], } }, define: {